摘要:
#include #include using namespace std; const int maxn=100000+10; const int p=99991; int a[7]; bool check[maxn]; int next[maxn],adj[maxn]; int snow[maxn][10]; int tot; int H(int x[]){ int h1=0,... 阅读全文
摘要:
#include #include #include using namespace std; const int maxn=1000000; int q[maxn],a[maxn]; int main(){ int n; int m; scanf("%d%d",&n,&m); for (int i=1;i=a[i]) r--;//保证队列的单调性,即保证队... 阅读全文
摘要:
#include #include #include #include using namespace std; const int maxn=1000000; int Q1[maxn]; int Q2[maxn],r1,r2; int sum[maxn],dp[maxn]; int main(){ int n; while(scanf("%d",&n)!=EOF){ ... 阅读全文
摘要:
Corral the Cows Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 1196 Accepted: 502 Description Farmer John wishes to build a corral for his 阅读全文