该文被密码保护。 阅读全文
posted @ 2020-04-12 03:12 KisekiPurin2019 阅读(16) 评论(1) 推荐(0) 编辑
摘要: ##算法基础 输入输出 数组处理 归并排序 离线询问 ##动态规划 最长上升子序列 数位dp ##字符串 [哈希 / Hashing] 字典树 / Trie KMP算法 Manacher算法 回文自动机 / Palindromic Automaton ##数学 ###数论 数论常识 扩展Euler定 阅读全文
posted @ 2019-11-12 16:56 KisekiPurin2019 阅读(359) 评论(0) 推荐(0) 编辑
摘要: A - Donut Shops void TestCase() { ll a, b, c; scanf("%lld%lld%lld", &a, &b, &c); if(a > c) { printf("-1 1\n"); return; } else if(a == c) { printf("-1 阅读全文
posted @ 2020-06-26 12:23 KisekiPurin2019 阅读(300) 评论(0) 推荐(0) 编辑
摘要: https://codeforces.com/contest/1364 ##A - XXXXX 题意:给一个 \(n\leq 10^5\) 的数组,求一段最长的区间,这段区间的和不被 \(x\) 整除。 题解:先考虑所有以第一个元素为左端点的区间,这时候往右扫描,得到的前缀和 \(prefix[i] 阅读全文
posted @ 2020-06-14 15:54 KisekiPurin2019 阅读(365) 评论(0) 推荐(1) 编辑
摘要: https://codeforces.com/contest/1366 ##A - Shovels and Swords 贪心 ##B - Shuffle 正解应该是随便乱搞就可以的,不过当时没有仔细想,而且受到以前做过的另一个idea的影响,导致这道题搞复杂了。 下面的解法可以对付多个 \(x\) 阅读全文
posted @ 2020-06-13 04:05 KisekiPurin2019 阅读(207) 评论(0) 推荐(1) 编辑
摘要: ##普通Codeforces场 Codeforces Round #599 (Div. 2) 阅读全文
posted @ 2020-06-08 11:40 KisekiPurin2019 阅读(156) 评论(0) 推荐(0) 编辑
摘要: https://codeforces.com/contest/1365 ##A - Matrix Game 取空行和空列的最小值,判断其奇偶性。 ##B - Trouble Sort 仔细读题,任意两个不同type的元素就可以交换位置,而不需要相邻。所以并不是要保持各个type里内部有序,只需要存在 阅读全文
posted @ 2020-06-08 09:23 KisekiPurin2019 阅读(381) 评论(0) 推荐(1) 编辑
摘要: https://codeforces.com/contest/1355 ##A - Sequence with Digits 挺有意思的一道题,需要注意到很快就会出现有一个0,所以直接暴力就行了。 ##B - Young Explorers 排序 ##D - Game With Array 题意:给 阅读全文
posted @ 2020-06-07 19:28 KisekiPurin2019 阅读(201) 评论(0) 推荐(0) 编辑
摘要: https://codeforces.com/contest/1362 ##A - Johnny and Ancient Computer 无语 ##B - Johnny and His Hobbies 暴力 ##*C - Johnny and Another Rating Drop 找规律 题意: 阅读全文
posted @ 2020-06-07 17:01 KisekiPurin2019 阅读(232) 评论(0) 推荐(0) 编辑
摘要: https://codeforces.com/contest/1359 ##A - Berland Poker 随便平均分配一下。 ##B - New Theatre Square 比A还水。但是以后要注意,不要尝试节省不必要的空间,能不优化就不优化。 ##*C - Mixing Water 题意: 阅读全文
posted @ 2020-06-04 17:02 KisekiPurin2019 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 康复场1。 https://codeforces.com/contest/1363 ##A - Odd Selection 题意:问是否能在给出的 \(n\) 个数中选恰好 \(x\) 个数,使得他们的和为奇数。 题解:必须选择奇数个奇数,然后不用思考这么复杂,枚举选择 \([1,x]\) 个奇数是 阅读全文
posted @ 2020-06-04 00:19 KisekiPurin2019 阅读(128) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2020-05-14 08:32 KisekiPurin2019 阅读(7) 评论(0) 推荐(0) 编辑