摘要:
原题链接:http://acm.uestc.edu.cn/problem.php?pid=1256分析:能被11整除的数具有什么特性呢?原来是奇数位与偶数位之差的绝对值是11的倍数。能被3和11整除吗 1 #include<stdio.h> 2 #include<string.h> 3 int main() 4 { 5 int t,s,s1,s2,s3,i; 6 char a[210]; 7 scanf("%d",&t); 8 while(t--) 9 {10 s=s1=s2=0;11 scanf("%s",a);12 . 阅读全文
posted @ 2013-05-31 20:48
EtheGreat
阅读(145)
评论(0)
推荐(0)
摘要:
原题链接:http://acm.uestc.edu.cn/problem.php?pid=1816 阅读全文
posted @ 2013-05-31 20:36
EtheGreat
阅读(249)
评论(0)
推荐(1)
摘要:
原题链接:http://acm.uestc.edu.cn/problem.php?pid=1846分析:设置front记录前一个单词即可,容易题。Angry Grammar Nazi 1 #include<stdio.h> 2 #include<string.h> 3 int lol(char string[105]) 4 { 5 int i,len; 6 len=strlen(string); 7 for(i=0;i<len-2;i++) 8 { 9 if(string[i]=='l'&&string[i+1]=='o 阅读全文
posted @ 2013-05-31 20:27
EtheGreat
阅读(170)
评论(0)
推荐(0)
摘要:
原题链接:http://acm.uestc.edu.cn/problem.php?pid=1849分析:设置一个ori变量记录房间里原有人数。Negative People in Da House 1 #include<stdio.h> 2 int main() 3 { 4 int T,t,M,a,b,i,ori,sum; 5 scanf("%d",&T); 6 while(T--) 7 { 8 sum=0;ori=0; 9 scanf("%d",&M);10 for(i=1;i<=M;i++)11 ... 阅读全文
posted @ 2013-05-31 20:18
EtheGreat
阅读(179)
评论(0)
推荐(0)
摘要:
原题链接:http://acm.uestc.edu.cn/problem.php?pid=1850 1 #include<cstdio> 2 #include<algorithm> 3 #include<iostream> 4 using namespace std; 5 int main() 6 { 7 int T,W,M,num[105],ans,i,flag; 8 scanf("%d",&T); 9 while(T--)10 {11 ans=0;flag=0;12 scanf("%d %d",&W 阅读全文
posted @ 2013-05-31 20:12
EtheGreat
阅读(140)
评论(0)
推荐(0)
摘要:
原题链接:http://acm.uestc.edu.cn/problem.php?pid=1852分析:分情况讨论即可。 1 #include<stdio.h> 2 #include<string.h> 3 int main() 4 { 5 int T,x,y,i,j,temp; 6 char cell[105][105]; 7 scanf("%d",&T); 8 while(T--) 9 {10 scanf("%d%d",&x,&y);11 getchar();12 memset(cell,0,sizeo 阅读全文
posted @ 2013-05-31 20:05
EtheGreat
阅读(166)
评论(0)
推荐(0)