随笔分类 -  Contest

codeforce Codeforces Round #201 (Div. 2)
摘要:cf 上的一道好题; 首先发现能生成所有数字-N 判断奇偶 就行了,但想不出来,如何生成所有数字,解题报告 说是 所有数字的中最大的那个数/所有数字的最小公倍数,好像有道理;纪念纪念;#include#include#include#include#include#includeusing namespace std;int arr[112];int gcd( int a,int b ){ if( b == 0 )return a; else return gcd( b,a%b );}int main( ){ int N; while( scanf("%d",&N) 阅读全文

posted @ 2013-09-22 14:47 浪舟 阅读(277) 评论(0) 推荐(0)

Codeforces Round #174 (Div. 2)
摘要:A题 模拟题 比赛是 sb 了 1 #include<iostream> 2 #include<stdio.h> 3 #include<cstring> 4 #include<algorithm> 5 using namespace std; 6 7 int main( ) 8 { 9 int N,res,k;10 while( scanf("%d",&N) != EOF )11 {12 res = 0;13 for( int i = 1; i < N; i++ )14 {15 bool fel... 阅读全文

posted @ 2013-03-26 22:15 浪舟 阅读(228) 评论(0) 推荐(0)

Codeforces Round #173 (Div. 2)
摘要:A题 水题 1 #include<iostream> 2 #include<stdio.h> 3 #include<algorithm> 4 using namespace std; 5 6 int main( ) 7 { 8 int i,N;char str[11]; 9 while( scanf("%d",&N) != EOF )10 {11 int res = 0;12 for( i = ... 阅读全文

posted @ 2013-03-20 21:38 浪舟 阅读(189) 评论(0) 推荐(0)

Codeforces Round #171 (Div. 2)
摘要:A题 看懂题意之后 简单模拟 1 #include<iostream> 2 #include<stdio.h> 3 #include<cstring> 4 #include<algorithm> 5 using namespace std; 6 7 int f[100005]; 8 9 int main( )10 {11 int x,y,w,t,x1,y1,count;12 scanf("%d%d",&x1,&y1);13 x = y = w = 0,t = 1,count = 0;14 while( true 阅读全文

posted @ 2013-03-13 22:37 浪舟 阅读(168) 评论(0) 推荐(0)

Codeforces Round #172 (Div. 2)
摘要:A 题 水题 将字符串的第一个字母转换成大写#include<iostream>#include<stdio.h>#include<cstring>using namespace std; char str[1002];int main( ){ while( scanf("%s",&str) != EOF ) { if( (str[0] - 'A' ) > 26 ) str[0] = (str[0] - '0') - 32 +'0'; printf("%s\n&quo 阅读全文

posted @ 2013-03-13 22:01 浪舟 阅读(249) 评论(0) 推荐(0)

导航