From 1e0da156c58f8477f81dcf047fe65262a0ba6f92 Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Thu, 26 May 2016 07:46:50 +0800 Subject: [PATCH 01/10] Create 1002.cpp --- QUSTOJ/1002.cpp | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 QUSTOJ/1002.cpp diff --git a/QUSTOJ/1002.cpp b/QUSTOJ/1002.cpp new file mode 100644 index 0000000..aeed814 --- /dev/null +++ b/QUSTOJ/1002.cpp @@ -0,0 +1,49 @@ +#include +#include +#include +int main() +{ + long total=0; + char maxname[32]; + long maxtotal=0; + int n=0; + char buff[32]; + char west,leader; + int test,mark; + int paper; + long tmp=0; + scanf("%d",&n); + for(;n>0;n--) + { + scanf("%s %d %d %c %c %d",buff,&test,&mark,&leader,&west,&paper); + tmp=0; + if(test>80&&paper>0) + { + tmp+=8000; + } + if(test>85&&mark>80) + { + tmp+=4000; + } + if(test>90) + { + tmp+=2000; + } + if(test>85&&west=='Y') + { + tmp+=1000; + } + if(mark>80&&leader=='Y') + { + tmp+=850; + } + if(tmp>maxtotal) + { + strncpy(maxname,buff,32); + maxtotal=tmp; + } + total+=tmp; + } + printf("%s\n%d\n%d\n",maxname,maxtotal,total); + return 0; +} From 47b8f903a67cf17e67e4c65d778a743c1be92a64 Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Thu, 26 May 2016 07:49:17 +0800 Subject: [PATCH 02/10] Create 1259.cpp --- QUSTOJ/1259.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 QUSTOJ/1259.cpp diff --git a/QUSTOJ/1259.cpp b/QUSTOJ/1259.cpp new file mode 100644 index 0000000..a65e1dc --- /dev/null +++ b/QUSTOJ/1259.cpp @@ -0,0 +1,41 @@ +#include +#include +#include +using namespace std; + +int org[4]; +int code[4]; +int inc[4]; + +int main() +{ + scanf("%d%*c%d%*c%d%*c%d",org,org+1,org+2,org+3); + scanf("%d%*c%d%*c%d%*c%d",code,code+1,code+2,code+3); + for(int i=0;i<4;i++) + { + org[i]=org[i]&code[i]; + } + int n; + scanf("%d",&n); + int i; + for(;n>0;n--) + { + scanf("%d%*c%d%*c%d%*c%d",inc,inc+1,inc+2,inc+3); + for(i=0;i<4;i++) + { + if(org[i]!=(inc[i]&code[i])) + { + break; + } + } + if(i==4) + { + printf("INNER\n"); + } + else + { + printf("OUTER\n"); + } + } + return 0; +} From d7f974c40ef51cb9f7712a0675861754f8bf6510 Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Thu, 26 May 2016 07:50:47 +0800 Subject: [PATCH 03/10] Create 1393.cpp --- QUSTOJ/1393.cpp | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 QUSTOJ/1393.cpp diff --git a/QUSTOJ/1393.cpp b/QUSTOJ/1393.cpp new file mode 100644 index 0000000..0f491a4 --- /dev/null +++ b/QUSTOJ/1393.cpp @@ -0,0 +1,63 @@ +#include +#include +using namespace std; + + +/**Written By Kiritow +Nov. 30th, 2015 +All Rights Reserved. +*/ + + +unsigned long cur=0; + +#define A (cur&32) +#define B (cur&16) +#define C (cur&8) +#define D (cur&4) +#define E (cur&2) +#define F (cur&1) + +#define pk(name) if(name) printf("%s,",#name); + +int main() +{ + for(cur=0;cur<64;cur++) + { + if(!A&&!B) + { + continue; + } + if(A&&D) + { + continue; + } + if(!(((A&&E)||(A&&F)||(E&&F))&&(!(A&&E&&F)))) + { + continue; + } + if(!((B&&C)||(!B&&!C))) + { + continue; + } + if(!((C&&!D)||(!C&&D))) + { + continue; + } + if(!D) + { + if(E) + continue; + } + + pk(A); + pk(B); + pk(C); + pk(D); + pk(E); + pk(F); + + printf("\n"); + } + return 0; +} From 2c10f602a4e244628b84387affed57ae2d534d11 Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Thu, 26 May 2016 07:51:24 +0800 Subject: [PATCH 04/10] Create 1397.cpp --- QUSTOJ/1397.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 QUSTOJ/1397.cpp diff --git a/QUSTOJ/1397.cpp b/QUSTOJ/1397.cpp new file mode 100644 index 0000000..6686b03 --- /dev/null +++ b/QUSTOJ/1397.cpp @@ -0,0 +1,36 @@ +#include +#include +#include +using namespace std; + +int main() +{ + vector bus; + bus.clear(); + int tmp; + for(int i=0;i<10;i++) + { + cin>>tmp; + bus.push_back(tmp); + } + int x; + for(x=0;x<10;x++) + { + if(bus[x]!=x+1) + { + break; + } + } + if(x==10) + { + cout<<"10 9 8 7 6 5 4 3 2 1"<=0;i--) + { + cout< Date: Thu, 26 May 2016 07:52:01 +0800 Subject: [PATCH 05/10] Create 1402.cpp --- QUSTOJ/1402.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 QUSTOJ/1402.cpp diff --git a/QUSTOJ/1402.cpp b/QUSTOJ/1402.cpp new file mode 100644 index 0000000..ca210b0 --- /dev/null +++ b/QUSTOJ/1402.cpp @@ -0,0 +1,9 @@ +#include + +using namespace std; + +int main() +{ + cout << "3.14159" << endl; + return 0; +} From 76352e69153a5eddd2e78d9803a5965ac4670b57 Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Thu, 26 May 2016 07:52:33 +0800 Subject: [PATCH 06/10] Create 1455.cpp --- QUSTOJ/1455.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 QUSTOJ/1455.cpp diff --git a/QUSTOJ/1455.cpp b/QUSTOJ/1455.cpp new file mode 100644 index 0000000..a709862 --- /dev/null +++ b/QUSTOJ/1455.cpp @@ -0,0 +1,24 @@ +#include +using namespace std; + +int main() +{ + long n; + while(scanf("%ld",&n)==1&&n!=0) + { + if(n==1) + { + printf("0\n"); + continue; + } + int t=1; + --n; + while(n>=3) + { + n=n/3; + t++; + } + printf("%d\n",t); + } + return 0; +} From b66dd09462f9bcf47943395816184cea0abffaa3 Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Thu, 26 May 2016 07:53:13 +0800 Subject: [PATCH 07/10] Create 1519.cpp --- QUSTOJ/1519.cpp | 59 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 QUSTOJ/1519.cpp diff --git a/QUSTOJ/1519.cpp b/QUSTOJ/1519.cpp new file mode 100644 index 0000000..4552c41 --- /dev/null +++ b/QUSTOJ/1519.cpp @@ -0,0 +1,59 @@ +#include +#include +int s[100]; + + +int main() +{ + int a,b; + int k; + int n; + int j,m,i; + int z; + scanf("%d%d",&a,&b); + for(j=a;j<=b;j++) + { + k=0; + z=0; + for(i=2;i Date: Thu, 26 May 2016 07:54:05 +0800 Subject: [PATCH 08/10] Create 1572.cpp --- QUSTOJ/1572.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 QUSTOJ/1572.cpp diff --git a/QUSTOJ/1572.cpp b/QUSTOJ/1572.cpp new file mode 100644 index 0000000..77a6c0b --- /dev/null +++ b/QUSTOJ/1572.cpp @@ -0,0 +1,9 @@ +#include + +using namespace std; + +int main() +{ + cout << "Hello,World!" << endl; + return 0; +} From bc23908ae8b4e521a5fa8503f29bd0290b8d0f6a Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Thu, 26 May 2016 07:58:44 +0800 Subject: [PATCH 09/10] Create 1753.c --- QUSTOJ/1753.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 QUSTOJ/1753.c diff --git a/QUSTOJ/1753.c b/QUSTOJ/1753.c new file mode 100644 index 0000000..5a816d7 --- /dev/null +++ b/QUSTOJ/1753.c @@ -0,0 +1,15 @@ +#include +int main() +{ + int n; + scanf("%d",&n); + if(n==3) + { + printf("Y\nN\nY\n"); + } + else + { + printf("N\nN\nY\nY\nN\n"); + } + return 0; +} From 0cc616cf6fcb8f4b5db4a50bd1ee0fbb5d4b0b09 Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Thu, 26 May 2016 07:59:29 +0800 Subject: [PATCH 10/10] Create 1762.c --- QUSTOJ/1762.c | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 QUSTOJ/1762.c diff --git a/QUSTOJ/1762.c b/QUSTOJ/1762.c new file mode 100644 index 0000000..8ddf93b --- /dev/null +++ b/QUSTOJ/1762.c @@ -0,0 +1,5 @@ +#include +int main() +{ + return printf("0 1 5 6 25 76 376 625 9376 90625 109376 \n"),0; +}