From d9fa4ba068409441206e70497b83b63b6d5bdcdc Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Tue, 24 May 2016 15:27:19 +0800 Subject: [PATCH 1/2] Create 1520.cpp --- QUSTOJ/1520.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 QUSTOJ/1520.cpp diff --git a/QUSTOJ/1520.cpp b/QUSTOJ/1520.cpp new file mode 100644 index 0000000..d4c5507 --- /dev/null +++ b/QUSTOJ/1520.cpp @@ -0,0 +1,19 @@ +#include +int cnt[26]; + +int main() +{ + char c; + while((c=fgetc(stdin))!='#') + { + if(c>='a'&&c<='z') + { + ++cnt[c-'a']; + } + } + for(int i=0;i<26;i++) + { + printf("%c %d\n",i+'a',cnt[i]); + } + return 0; +} From 875bcfb14c1a94d5bc4e38e68d7bef0a87aa233e Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Tue, 24 May 2016 15:36:33 +0800 Subject: [PATCH 2/2] Create 1516.cpp --- QUSTOJ/1516.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 QUSTOJ/1516.cpp diff --git a/QUSTOJ/1516.cpp b/QUSTOJ/1516.cpp new file mode 100644 index 0000000..a84f256 --- /dev/null +++ b/QUSTOJ/1516.cpp @@ -0,0 +1,35 @@ +#include +#include +#include +#include +using namespace std; +int cnt[1005]; +int main() +{ + int n,tmp; + while(scanf("%d",&n)==1&&n!=0) + { + memset(cnt,0,sizeof(int)*1005); + for(int i=0;i