随笔分类 -  水题

poj 4044
摘要:很水,但还是WA了好几次#include<cstdio> #include<string.h> #include<algorithm> using namespace std; int cmp(int a,int b){ return a>b; } int cmp2(int a,int b){ if(a%10==b%10) return a<b; return a%10<b%10; } int n,m; int dp[31]; int main(){ int i,j,t,T,a,b,x[31],y[31]; //freopen(" 阅读全文

posted @ 2012-05-13 00:15 c语言源码 阅读(156) 评论(0) 推荐(0)

Google Code Jam 2010 Qualification Round 2012 Problem B && C
摘要:B题当p=0时所有的总分都在sum1++,当p=1时,总分>=1时在sum1++,总分==0,是无论如何都满足不了题意(坑点);总分>=29时是没有surprising情况的,无论p取何值都在sum1++;#include<cstdio> #include<cstring> using namespace std; int main(){ int n,i,j,T,t,s,p,a; char ch; freopen( "B-large.in", "r", stdin ); freopen( "output1.o 阅读全文

posted @ 2012-04-15 11:06 c语言源码 阅读(219) 评论(0) 推荐(0)

Codeforces Problem 37B - Computer Game
摘要:按题目要求写就可以 #include<cstdio> #include<stdlib.h> #include<string.h> struct point{ int pow; int dmg; int num; }str[1010]; int visit[1010]; int ans1[1010],ans2[1010]; int cmp(const void *a,const void *b){ struct point *aa=(struct point *)a; ... 阅读全文

posted @ 2012-01-27 14:04 c语言源码 阅读(215) 评论(0) 推荐(0)

导航