摘要: #include<bits/stdc++.h>using namespace std;char c[2007][2007];char ans[4007];int s[2007][2007];int main(){ memset(s,-1,sizeof(s)); int n,k; scanf("%d% 阅读全文
posted @ 2018-11-28 04:13 sewage 阅读(172) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;int a[107];int b[10007][107];int c[107][107];int main(){ int n; scanf("%d",&n); for(int i=1;i<=n;i++){ scan 阅读全文
posted @ 2018-11-20 19:50 sewage 阅读(131) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;int a[200007];int b[200007][7];int ans[200007];int main(){ for(int i=1;i<=5;i++) b[1][i]=1;//第一个可以从1选到5 int 阅读全文
posted @ 2018-11-19 17:44 sewage 阅读(158) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;const int N=1e6+6;int x[N],y[N];int sx,sy,n;char s[N];bool check(int m){ for(int i=1;i<=n-m+1;i++) { int tx 阅读全文
posted @ 2018-11-11 17:35 sewage 阅读(195) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;int f[1007],SG[1007],S[1007];//f为可以选取的石头个数,SG为sg函数,S为后继状态的集合int n,l,r; int cnt=0;void getSG(int n){//SG函数打表 阅读全文
posted @ 2018-10-31 01:36 sewage 阅读(286) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;int cnt=0;int flag=0;int to[400007],nex[400007],vis[100007],head[100007];void add(int a,int b){//链表的头插法,nex 阅读全文
posted @ 2018-10-27 18:37 sewage 阅读(159) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;int n,k;vector<int>son[1000007];int dp[1000007],depth[1000007],ans[1000007];//dp【i】表示离i最近的叶子节点距离i的深度,depth【 阅读全文
posted @ 2018-10-23 23:16 sewage 阅读(135) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h>using namespace std;const int mod=998244353;long long b[200007];long long ksm(long long x,long long y){//快速幂 long long ans=1; 阅读全文
posted @ 2018-10-21 15:36 sewage 阅读(207) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;int n,x;int chess[17*17];//记录棋盘上的numberarray<int,2>pace[17*17*3][17*17*3],dp[17*17][3];//first记录root,second 阅读全文
posted @ 2018-10-14 17:31 sewage 阅读(139) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;const double eps=1e-8;int n; struct node{ double x,y;}a[1000007]; long double find_r(long double x){ long d 阅读全文
posted @ 2018-10-10 21:17 sewage 阅读(190) 评论(0) 推荐(0) 编辑