摘要:
【链接】: "CF" 【题意】:对于一个数n,每次加一的代价是a,每次减一的代价是b,求被m整除时的最小代价。 【分析】:分情况讨论,自己多举几个栗子。 【代码】: include include include include include include include include inc 阅读全文
摘要:
变形课 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others) Total Submission(s): 29518 Accepted Submission(s): 10683 Problem 阅读全文
摘要:
诡异的楼梯 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others) Total Submission(s): 17892 Accepted Submission(s): 4652 Proble 阅读全文
摘要:
Dungeon Master Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 45743 Accepted: 17256 Description You are trapped in a 3D dungeon and need t 阅读全文
摘要:
Task schedule Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 515 Accepted: 309 Special Judge Description There are n preemptive jobs to be 阅读全文
摘要:
include using namespace std; const int maxn = 1e5 + 10; const int mod = 142857; int t,n,m,k,x,u,v,num,ans; vector G[maxn]; int inDeg[maxn]; int sum[ma 阅读全文
摘要:
确定比赛名次 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 33964 Accepted Submission(s): 13321 Probl 阅读全文
摘要:
Legal or Not Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 10407 Accepted Submission(s): 4876 阅读全文
摘要:
逃生 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6686 Accepted Submission(s): 1958 Problem Des 阅读全文
摘要:
Genealogical tree Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7101 Accepted: 4585 Special Judge Description The system of Martians' blo 阅读全文
摘要:
Sorting It All Out Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 38100 Accepted: 13453 Description An ascending sorted sequence of distin 阅读全文
摘要:
"CF" A. Party time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output A company has n employees numb 阅读全文
摘要:
``` #include using namespace std; const int maxn = 1e5 + 10; const int mod = 142857; int t,n,m,k,x,u,v,w,num,flag; vector G[maxn]; int inDeg[maxn], ruDeg[maxn]; int virus[maxn]; queue q; bool topS... 阅读全文
摘要:
"计蒜课" 【代码】: include using namespace std; const int maxn = 1e5 + 10; const int mod = 142857; int t,n,m,k,x,u,v,w,num; vector G[maxn]; int inDeg[maxn], 阅读全文
摘要:
【链接】: "A" 【题意】:给你n个数的序列和k。判断是否可以三个数组成k(同一个数可以拿多次) 【分析】:每个数vis记录一下。2层循环。两数之和不超过k以及剩下的数出现在序列中那么ok。 【代码】: include define ll long long define pb push_back 阅读全文
摘要:
【链接】: "A" 【分析】:可以设置方向数组和标记数组。当不合法(越界/访问过)就转向,转向可以用now=(now+1)%4 【代码】: include define ll long long define pb push_back define inf 0x3f3f3f3f define pll 阅读全文