摘要:
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 阅读全文
摘要:
思路来自:与PKU3687一样 在基本的拓扑排序的基础上又增加了一个要求:编号最小的节点要尽量排在前面;在满足上一个条件的基础上,编号第二小的节点要尽量排在前面;在满足前两个条件的基础上,编号第三小的节点要尽量排在前面……依此类推。(注意,这和字典序是两回事,不可以混淆。) 如图 1 所示,满足要求 阅读全文
摘要:
逃生 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], 阅读全文
摘要:
"hihocoder" 对于一个节点i来说,如果我们能够先计算出它所有前驱节点的病毒数量,就可以直接推算出它最后的病毒数量了,但是怎么来计算所有前驱节点呢? 这就要从图的性质入手了。我们现在的网络是没有环的,对于任意一个节点i,当它将自己所有的病毒都传送出去之后,它自身的病毒数量就不会改变了。那么我 阅读全文