摘要: 见此看大神的博客,写的很好下面附上代码拓扑排序判环,十分管用。#include#include#include#includeusing namespace std;int a[110][100],deg[1100];void topsort(int n){ int k=0; for(int i=1... 阅读全文
posted @ 2016-12-11 10:34 Drinkwater_cnyali 阅读(105) 评论(0) 推荐(0)
摘要: 矩阵快速幂裸题,不过听说好像循环就能过,=_=……蒙蔽的我。。。。1.问题描述Given a code (not optimized), and necessary inputs, you have to find the output of the code for the inputs. The... 阅读全文
posted @ 2016-12-03 10:03 Drinkwater_cnyali 阅读(116) 评论(0) 推荐(0)
摘要: #include#include#include#include#include#includeusing namespace std;int a[1010][1010];int match[1010];int p[1010];int n,m;int dfs(int u){ int i; for(i... 阅读全文
posted @ 2016-11-18 16:14 Drinkwater_cnyali 阅读(111) 评论(0) 推荐(0)
摘要: #include#include#include#include#include#include#includetypedef unsigned long long ull;using namespace std;const long long h1=998244353,h2=1000000007,... 阅读全文
posted @ 2016-11-18 13:42 Drinkwater_cnyali 阅读(209) 评论(0) 推荐(0)
摘要: 哈哈哈,打了一上午。。。#include#include#include#include#include#includeusing namespace std;typedef long long ll;ll a[100000+10];ll lazy[1000000];struct T{ ll lt... 阅读全文
posted @ 2016-11-18 12:13 Drinkwater_cnyali 阅读(108) 评论(0) 推荐(0)
摘要: //请教了wearry大神哈哈哈哈哈#include#include#include#include#include#includeusing namespace std;int Max[1000][100],a[1000],n,Min[1000][100];void pre_handle(){//... 阅读全文
posted @ 2016-11-13 15:41 Drinkwater_cnyali 阅读(114) 评论(0) 推荐(0)
摘要: #include#include#include#includeusing namespace std;const long long mod=2147493647;const int maxn=100000+10;struct T{ long long maxtrix[7][7]; int len... 阅读全文
posted @ 2016-11-09 22:01 Drinkwater_cnyali 阅读(195) 评论(1) 推荐(0)
摘要: #include#include#include#includeusing namespace std;int next[1010];void getnext(int len,string s){ int i=0,j=-1; next[0]=-1; while(i>st>>p; int lenst=... 阅读全文
posted @ 2016-11-07 21:50 Drinkwater_cnyali 阅读(130) 评论(0) 推荐(0)
摘要: #include#include#include#include#include#include#include#define LEFT 1#define RIGHT 2#define UP 3#define DOWN 4#define FOODMAX -2#define FOOD -1#defin... 阅读全文
posted @ 2016-10-21 15:15 Drinkwater_cnyali 阅读(134) 评论(0) 推荐(0)
摘要: #include#include#include#includeusing namespace std;const int maxn=110;int a[maxn],s,n,m,p[maxn],ans;void dfs(int x,int y){ //printf("%d\n",y); if(y<0... 阅读全文
posted @ 2016-10-10 16:24 Drinkwater_cnyali 阅读(217) 评论(0) 推荐(0)