摘要: #include using namespace std; int m,n; int a[100][100]; int main() { while(cin>>m>>n) { int i,j,k,fj,sum=0,max=0; for(i=0;i>a[i][j]; for(i=0;ij) ... 阅读全文
posted @ 2017-03-12 14:12 贱人郭 阅读(116) 评论(0) 推荐(0) 编辑
摘要: AC: 阅读全文
posted @ 2017-03-12 13:41 贱人郭 阅读(159) 评论(0) 推荐(0) 编辑
摘要: AC: 阅读全文
posted @ 2017-03-12 11:45 贱人郭 阅读(166) 评论(0) 推荐(0) 编辑
摘要: (1)辗转相除法必须得会; (2)a1=a/x*x学会这种赋值手法; (3)此题必须求取最大公约数,用x,y除以最大公约数的值进行计算; (4)尤其是这道题的思路,必须弄清楚; AC: 阅读全文
posted @ 2017-03-12 11:03 贱人郭 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 求最大公约数。 (1)不会超过两者中的最小值; (2)对于两者求余都是为0; (3)由于最大公约数只有一个,所以当用for来循环的时候,只要等于最后一个就好。 AC: 阅读全文
posted @ 2017-03-11 22:57 贱人郭 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 请注意一下的WA和AC之间只有isprime函数存在区别:如何缩小运行的时间,, the WA: the AC: 阅读全文
posted @ 2017-03-09 12:57 贱人郭 阅读(164) 评论(0) 推荐(0) 编辑
摘要: #include int main() { char str1[100],str2[100]; while(scanf("%s %s",&str1,&str2)!=EOF) { char tem[200]; int i=0,j=0,k=0; for (i=0;str1[i]!='\0';i++) t... 阅读全文
posted @ 2017-03-06 16:48 贱人郭 阅读(158) 评论(0) 推荐(0) 编辑
摘要: #include #include #include int main() { char *str=(char *)malloc(sizeof(char)); while(scanf("%s",str)!=EOF) { int len,i; len=strlen(str); bool flag=true; f... 阅读全文
posted @ 2017-03-06 14:48 贱人郭 阅读(127) 评论(0) 推荐(0) 编辑
摘要: #include #include #include//三个头文件必不可少 int main() { char *str=(char *)malloc (sizeof(char));//char*必须分配内存 while(scanf("%s",str)!=EOF)//char*的scanf没有& { int i=0,count=0; int... 阅读全文
posted @ 2017-03-06 14:37 贱人郭 阅读(84) 评论(0) 推荐(0) 编辑