摘要: //对面穿过等于换一个人继续走,整体状态没变 #include<bits/stdc++.h> using namespace std; int l,n,maxn,minn; int main(){ scanf("%d%d",&l,&n); l++; while(n--){ int x; scanf( 阅读全文
posted @ 2017-06-24 21:38 wqtnb_tql_qwq_%%% 阅读(195) 评论(0) 推荐(0) 编辑
摘要: //和luogu1004一毛一样有木有 #include<bits/stdc++.h> using namespace std; int n,m,ans[60][60],a[60][60][60][60]; int max(int a,int b,int c,int d){ return max(m 阅读全文
posted @ 2017-06-24 21:18 wqtnb_tql_qwq_%%% 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 题目描述 设有N*N的方格图(N<=9),我们将其中的某些方格中填入正整数,而其他的方格中则放 人数字0。如下图所示(见样例): 某人从图的左上角的A点出发,可以向下行走,也可以向右走,直到到达右下角的B 点。在走过的路上,他可以取走方格中的数(取走后的方格中将变为数字0)。 此人从A点到B点共走两 阅读全文
posted @ 2017-06-24 20:12 wqtnb_tql_qwq_%%% 阅读(137) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<algorithm>using namespace std;int main(){ int n,a1[10010],b1[10010],a2[10010],b2[10010],i,x,y; cin>>n; for(i=1;i<=n;i++)cin 阅读全文
posted @ 2017-06-24 19:45 wqtnb_tql_qwq_%%% 阅读(104) 评论(0) 推荐(0) 编辑
摘要: //哇塞,真的坑,要long long = = #include <iostream>using namespace std;long long a[30][30];int n,m,x,y,sum;bool b[30][30];void C(int x,int y){ b[x][y]=b[x+1][ 阅读全文
posted @ 2017-06-24 19:42 wqtnb_tql_qwq_%%% 阅读(126) 评论(0) 推荐(0) 编辑
摘要: //(a,b)最小公倍数=a*b/(a,b)最大公因数 //最大公因数用欧几里得定律求(这里不证明)可百度(说实话我好想不会orz)#include<bits/stdc++.h> using namespace std; int gcd(int x,int y){ return y==0?x:gcd 阅读全文
posted @ 2017-06-24 18:45 wqtnb_tql_qwq_%%% 阅读(126) 评论(0) 推荐(0) 编辑
摘要: //特殊数据好坑爹啊- -#include<bits/stdc++.h> using namespace std; int a[2010],n; char s[2010]; bool first; int main(){ while(scanf("%s",&s)!=EOF){ memset(a,0, 阅读全文
posted @ 2017-06-24 18:30 wqtnb_tql_qwq_%%% 阅读(590) 评论(0) 推荐(0) 编辑
摘要: //如果 剩下的人+1 > 最大的人 就是Yes 不然 no#include<cstdio> int q,a[1000010],n,x,maxn; long long sum; bool answer; int main(){ scanf("%d",&q); while(q--){ x=0,maxn 阅读全文
posted @ 2017-06-24 13:35 wqtnb_tql_qwq_%%% 阅读(135) 评论(0) 推荐(0) 编辑
摘要: #include int main(){ int n,a,b,c,sum,i,j; scanf("%d",&n); while(n--){ scanf("%d-%d-%d",&a,&b,&c); sum=0; if(b==2&&c==29){printf("-1\n"); continue;} if(b<=2)... 阅读全文
posted @ 2017-06-24 13:16 wqtnb_tql_qwq_%%% 阅读(95) 评论(0) 推荐(0) 编辑
摘要: // 题目数据有问题 这样都能过? 如果没有循环就不行 但是数组也开不了那么大 所以数据或者数据范围有问题#include<bits/stdc++.h> using namespace std; int main(){ int a[10000],x,y,n,m,i; a[1]=a[2]=1; whi 阅读全文
posted @ 2017-06-24 12:46 wqtnb_tql_qwq_%%% 阅读(113) 评论(0) 推荐(0) 编辑