From 921f9277ba0c0f6792fc5dc00dfe25b1db43394f Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Sun, 22 May 2016 23:01:01 +0800 Subject: [PATCH 1/9] Create 1358.cpp --- QUSTOJ/1358.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 QUSTOJ/1358.cpp diff --git a/QUSTOJ/1358.cpp b/QUSTOJ/1358.cpp new file mode 100644 index 0000000..dfebdf5 --- /dev/null +++ b/QUSTOJ/1358.cpp @@ -0,0 +1,21 @@ +#include +#include +#include +using namespace std; + +char buff[1024]; + +int main() +{ + gets(buff); + int l=strlen(buff); + for(int i=0;i Date: Sun, 22 May 2016 23:02:36 +0800 Subject: [PATCH 2/9] Create 1359.c --- QUSTOJ/1359.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 QUSTOJ/1359.c diff --git a/QUSTOJ/1359.c b/QUSTOJ/1359.c new file mode 100644 index 0000000..6971d39 --- /dev/null +++ b/QUSTOJ/1359.c @@ -0,0 +1,8 @@ +#include +int main() +{ + int inc; + scanf("%d",&inc); + printf("%d %d %d %d \n",inc/1000,(inc%1000)/100,(inc%100)/10,inc%10); + return 0; +} From 7b4f83ff48368b4d6addaf41295b43064f0040ac Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Sun, 22 May 2016 23:06:38 +0800 Subject: [PATCH 3/9] Create 1600.cpp --- QUSTOJ/1600.cpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 QUSTOJ/1600.cpp diff --git a/QUSTOJ/1600.cpp b/QUSTOJ/1600.cpp new file mode 100644 index 0000000..9c8a6bd --- /dev/null +++ b/QUSTOJ/1600.cpp @@ -0,0 +1,37 @@ +#include +using namespace std; + +int main() { +ios::sync_with_stdio(false); cin.tie(0); +int a, b, c; +string name; +while (cin >> a >> b >> c) { +set s; +vector v; +for (int i=0; i> name; +s.insert(name); +} +for (int j=0; j> name; +if (s.count(name)) v.push_back(name); +} +for (int k=0; k> name; +for (int i=0; i Date: Sun, 22 May 2016 23:08:18 +0800 Subject: [PATCH 4/9] Create 3527.cpp --- HDOJ/3527.cpp | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 HDOJ/3527.cpp diff --git a/HDOJ/3527.cpp b/HDOJ/3527.cpp new file mode 100644 index 0000000..5f99c5e --- /dev/null +++ b/HDOJ/3527.cpp @@ -0,0 +1,46 @@ +#include +using namespace std; + +int main() +{ + ios::sync_with_stdio(false); + cin.tie(0); + int a, b, c; + string name; + while (cin >> a >> b >> c) + { + set s; + vector v; + for (int i=0; i> name; + s.insert(name); + } + for (int j=0; j> name; + if (s.count(name)) v.push_back(name); + } + for (int k=0; k> name; + for (int i=0; i Date: Sun, 22 May 2016 23:27:37 +0800 Subject: [PATCH 5/9] Create 1631.c --- QUSTOJ/1631.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 QUSTOJ/1631.c diff --git a/QUSTOJ/1631.c b/QUSTOJ/1631.c new file mode 100644 index 0000000..5140094 --- /dev/null +++ b/QUSTOJ/1631.c @@ -0,0 +1,22 @@ +#include +#include +#include + +char save[] = "`1234567890-=QWERTYUIOP[]\\ASDFGHJKL;\'ZXCVBNM,./"; +char maps[512]; +char data[512]; + +int main() +{ + for ( int i = 1 ; save[i] ; ++ i ) + maps[save[i]] = save[i-1]; + + while ( gets(data) ) { + for ( int i = 0 ; data[i] ; ++ i ) + if ( data[i] == ' ' || data[i] == ' ' ) + printf("%c",data[i]); + else printf("%c",maps[data[i]]); + printf("\n"); + } + return 0; +} From e8eca9546f8a3b8300eeff55065b34c2c728e5ea Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Sun, 22 May 2016 23:34:06 +0800 Subject: [PATCH 6/9] Create 1360.cpp --- QUSTOJ/1360.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 QUSTOJ/1360.cpp diff --git a/QUSTOJ/1360.cpp b/QUSTOJ/1360.cpp new file mode 100644 index 0000000..83a8fdb --- /dev/null +++ b/QUSTOJ/1360.cpp @@ -0,0 +1,33 @@ +#include +#include +#include +using namespace std; + +int a,b,c,d; +char buff[2048]; +int main() +{ + gets(buff); + int L=strlen(buff); + for(int i=0;i='a'&&buff[i]<='z')||(buff[i]>='A'&&buff[i]<='Z')) + { + a++; + } + else if(buff[i]>='0'&&buff[i]<='9') + { + b++; + } + else if(buff[i]==' ') + { + c++; + } + else + { + d++; + } + } + printf("%d %d %d %d \n",a,b,c,d); + return 0; +} From e2d0994387a388a9d0d2e8ce208bb46a3cd0596a Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Sun, 22 May 2016 23:45:15 +0800 Subject: [PATCH 7/9] Create 1362.c --- QUSTOJ/1362.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 QUSTOJ/1362.c diff --git a/QUSTOJ/1362.c b/QUSTOJ/1362.c new file mode 100644 index 0000000..91df013 --- /dev/null +++ b/QUSTOJ/1362.c @@ -0,0 +1,8 @@ +#include +int main() +{ + int a,b; + scanf("%d %d",&a,&b); + printf("%d\n",a%b); + return 0; +} From 88839a98664356119caac24e34d9e28611122ab5 Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Sun, 22 May 2016 23:46:21 +0800 Subject: [PATCH 8/9] Create 1282.cpp --- QUSTOJ/1282.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 QUSTOJ/1282.cpp diff --git a/QUSTOJ/1282.cpp b/QUSTOJ/1282.cpp new file mode 100644 index 0000000..caa403a --- /dev/null +++ b/QUSTOJ/1282.cpp @@ -0,0 +1,39 @@ +#include +#include +#include +int c[26]; +char buff[1024]; +int main() +{ + int n; + while(scanf("%d%*c",&n)==1) + { + gets(buff); + memset(c,0,sizeof(int)*26); + for(int i=0;i='A'&&buff[i]<='Z') + { + ++c[buff[i]-'A']; + } + else + { + ++c[buff[i]-'a']; + } + } + bool flag=true; + for(int i=0;i<26;i++) + { + if(c[i]<1) flag=false; + } + if(!flag) + { + printf("NO\n"); + } + else + { + printf("YES\n"); + } + } + return 0; +} From 14271b73d8276186eb65945418fedfdb0883d1a3 Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Sun, 22 May 2016 23:47:38 +0800 Subject: [PATCH 9/9] Create 1363.c --- QUSTOJ/1363.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 QUSTOJ/1363.c diff --git a/QUSTOJ/1363.c b/QUSTOJ/1363.c new file mode 100644 index 0000000..6c70fe9 --- /dev/null +++ b/QUSTOJ/1363.c @@ -0,0 +1,11 @@ +#include +#include +/*This program does not use #define to solve the problem*/ +int main() +{ + double a,b,c,p; + scanf("%lf %lf %lf",&a,&b,&c); + p=(a+b+c)/2; + printf("%.3lf\n",sqrt(p*(p-a)*(p-b)*(p-c))); + return 0; +}