摘要: /*n #include #include #include #include #include using namespace std; typedef long long ll; const int MAXN = 6000; const int MOD = 1000000007; int f[MAXN][MAXN] = {{0}}; int n, a, b, k; inl... 阅读全文
posted @ 2016-09-24 23:17 ACforever 阅读(296) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #define ll long long using namespace std; const ll mod = 1000000007; ll n,k,c[20][20]; ll ansa,ansb,ans; void get_c(){ for(int i = 1;i >= 1; } ... 阅读全文
posted @ 2016-09-24 23:13 ACforever 阅读(275) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; const int maxn = 200005; int n,k,a[maxn]; char cmd; int main(){ freopen("str.in","r",stdin); freopen("str.out","w",stdout... 阅读全文
posted @ 2016-09-24 23:10 ACforever 阅读(172) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #define ll long long using namespace std; const int maxn = 100005; const ll mod = 1000000007; struct edge{ int to; int nxt; }; int n,f... 阅读全文
posted @ 2016-09-24 23:08 ACforever 阅读(409) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; const int maxn = 5000; int n,a[maxn],b[maxn],c[maxn],rka[maxn],rkb[maxn],rkc[maxn]; bool visa[maxn],visb[maxn],visc[maxn]; int rk,r... 阅读全文
posted @ 2016-09-24 23:06 ACforever 阅读(499) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #define ll int using namespace std; const int maxn = 1000005; ll read(){ ll x=0,f=1;char ch=getchar(); while(ch'9'){if(ch=='-')f=-1;ch=getchar()... 阅读全文
posted @ 2016-09-24 23:03 ACforever 阅读(264) 评论(0) 推荐(0) 编辑
摘要: /* 用f[i][k]表示考虑到第i个雕塑,分成k组,可不可行(这是一个bool类型的数组) 转移: f[i][k]=f[j][k-1],sum[i]-sum[j]合法 */ #include #include #include #include using namespace std; typedef long long ll; const int max_n = 2010; c... 阅读全文
posted @ 2016-09-24 23:00 ACforever 阅读(333) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; const int maxn = 6005; int n,x[maxn]; int cmd,cnt,ans,max_x; int main(){ freopen("box.in","r",stdin); freopen("box.out","w... 阅读全文
posted @ 2016-09-24 22:58 ACforever 阅读(297) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; int n; char s[205][205],cmd; int main(){ freopen("puzzle.in","r",stdin); freopen("puzzle.out","w",stdout); cin>>n; ... 阅读全文
posted @ 2016-09-24 22:56 ACforever 阅读(237) 评论(0) 推荐(0) 编辑