摘要: http://www.cnblogs.com/nier/archive/2012/08/15/2640279.html 阅读全文
posted @ 2016-03-10 19:56 sola94 阅读(269) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#includeusing namespace std;int main(){ int n,p,q; int i,j,k; while(scanf("%d%d%d",&n,&p,&q)!=EOF) { ... 阅读全文
posted @ 2015-08-19 21:50 sola94 阅读(144) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#includeusing namespace std;int main(){ int t,n,m; int i,j,k; //scanf("%d",&t); while(scanf("%d%d",&n,&m)!=EOF) ... 阅读全文
posted @ 2015-08-19 00:13 sola94 阅读(108) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#includeusing namespace std;int main(){ int t,n,m; int i,j,k; scanf("%d",&t); while(t--) { scanf("%d%d",... 阅读全文
posted @ 2015-08-18 22:39 sola94 阅读(104) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#include#include#include#include#define LL __int64using namespace std;int fa[3000];int val[3000];int find(int x){ i... 阅读全文
posted @ 2015-08-17 22:36 sola94 阅读(137) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#include#define LL __int64using namespace std;int num[30];int c1[100];int c2[100];void fun(){ int i,j,k,l; memse... 阅读全文
posted @ 2015-08-17 22:30 sola94 阅读(153) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#includeusing namespace std;int mat[1010][1010];int link[1010];int vis[1010];int n,m;bool find(int u){ int v; for(v=0;v<... 阅读全文
posted @ 2015-08-17 11:08 sola94 阅读(146) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#includeusing namespace std;int n,m,k;int mat[110][110];int link[110];int vis[110];bool find(int u){ int v; for(v=0;v0&&... 阅读全文
posted @ 2015-08-17 09:29 sola94 阅读(133) 评论(0) 推荐(0) 编辑
摘要: struct node{ int next[27]; int v; void init() { v=0; memset(next,-1,sizeof(next)); }};node L[1000500];int tot=0;void add(... 阅读全文
posted @ 2015-08-15 09:56 sola94 阅读(155) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;char num[10000];int get_sum(){ int ret=0; for(int i=0;i<strlen(num);i++) { ret+=(num[i]-'0... 阅读全文
posted @ 2015-08-13 23:20 sola94 阅读(114) 评论(0) 推荐(0) 编辑