摘要:
Codefroces1077F2. Pictures with Kittens (hard version) 做法:裸的单调队列优化dp c++ include define P pair define fr first define sc second typedef long long ll; 阅读全文
摘要:
Codeforces Round 520 (Div. 2) D. Fun with Integers 题意:a与b之间有边,当且仅当存在一个$x$使得$a b = x$或 $a x = b$,这条边的边权为$|x|$,保证$|a|,|b|,|x| define pb push_back typede 阅读全文
摘要:
Educational Codeforces Round 54 (Rated for Div.2) D. Edge Deletion 题意:一张n个点的无向图,保留其中k条边,使得有尽可能多的点与1的最短路长度不变。 做法:求出最短路树,然后自底向上删边即可。 c++ include define 阅读全文
摘要:
Codeforces Round 519 by Botan Investments A. Elections c++ include typedef long long ll; const int N = 3e5 + 7; const int mod = 1e9 + 7; using namespa 阅读全文