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 +#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; +} 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 +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; +} 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; +} 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; +} 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; +} 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 +#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; +}