- 博客(8)
- 收藏
- 关注
原创 sdut 2624 Contest Print Server (第四届省赛)
#include #include #include using namespace std; int main(){ int t; scanf("%d",&t); while(t--){ int n,s,x,y,mod; char name[20],nouse[20]; int page,ppage; int counter=0; scanf("%d%d%d%d%d",
2014-05-09 21:32:51 548
原创 NYOJ15 括号匹配(二)
题目链接 http://acm.nyist.net/JudgeOnline/problem.php?pid=15#include #include #include using namespace std; int dp[105][105]; char a[105]; int main(){ int n; scanf("%d",&n); while(n--){ scanf("%s",a)
2014-05-04 18:44:49 505
原创 poj 1067 取石子游戏
裸威佐夫博弈#include #include #include using namespace std; const double key=(sqrt(5.0)+1.0)/2; int main(){ int a,b,k; while(scanf("%d%d",&a,&b)==2){ if(a>b){ a^=b;b^=a;a^=b; } k=b-a; if(floor(
2014-05-04 15:19:49 499
原创 SDACM 五一联赛 3 G - L
#include #include #include #include #define inf 0x3f3f3f3f using namespace std; int ma[1010][1010]; int cost[1010],a[1010]; int n,m; void init(){ for(int i=1;i<=n;i++){ for(int j=1;j<i;j++) ma[
2014-05-03 23:55:59 847
原创 sdut2408 Pick apples(山东第三届省赛)
#include #include #include using namespace std; int dp[1000005]; int gcd(int a,int b){ if(b==0) return a; return gcd(b,a%b); } int lcm(int a,int b){ return a/gcd(a,b)*b; } int main(){ int
2014-05-02 23:30:03 500
原创 sdut2415 Chess (山东第三届省赛)
#include #include #include #include #define N 100005 using namespace std; struct node{ int x,y; int p; int pos; }x[N],y[N],x_y[N],xy[N],xxy[N],xyy[N],x_yy[N],xx_y[N]; int hited[N]; bool cmpxxy(node
2014-05-02 23:24:50 753
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人