摘要:
Arkady needs your help again! This time he decided to build his own high-speed Internet exchange point. It should consist of n nodes connected with mi 阅读全文
Codeforces Round #423 (Div. 2, rated, based on VK Cup Finals) Problem C (Codeforces 828C) - 链表 - 并查集
摘要:
Ivan had string s consisting of small English letters. However, his friend Julia decided to make fun of him and hid the string s. Ivan preferred makin 阅读全文
摘要:
Pronlem A In a small restaurant there are a tables for one person and b tables for two persons. Pronlem A In a small restaurant there are a tables for 阅读全文
摘要:
我先用费用流的方法去跑spfa,然后完美T掉6个点。 就说正解吧,正解是跑两次spfa,然后就可以找出最短路覆盖的边(详细过程请看代码rebuild())。然后建图跑最大流 Code 二分答案,然后奇、偶数分开分别连源点和汇点,两者加起来是素数就加一条边。特殊处理1,只保留一个。 Code 先Tar 阅读全文