2020年4月27日
摘要: 链接:https://codeforces.com/contest/1342/problem/C 题意:给定两个数a、b, 再给 q 个范围 l、r,问在 l~r 的范围中有多少个数x是 x % a % b != x % b % a ,输出符合条件的数的个数 显然,求余是周期性的,比如,(1-20) 阅读全文
posted @ 2020-04-27 19:22 mmn 阅读(186) 评论(0) 推荐(0)
摘要: 链接:https://codeforces.com/contest/1342/problem/B 题意:给个01串的子串t让找原串s,要使得周期最小: 满足条件: 1,字符串s只包含0和1; 2,s的长度不超过2⋅t (t是字符串t的长度); 3,字符串t是字符串s的子序列; 显然让s的周期最小只有 阅读全文
posted @ 2020-04-27 18:46 mmn 阅读(162) 评论(0) 推荐(0)
摘要: 链接:https://codeforces.com/contest/1342/problem/A 题意:两种操作方式,问最小花费使得x=y=0; 签到题,分情况讨论: code: #include <bits/stdc++.h> using namespace std; typedef long l 阅读全文
posted @ 2020-04-27 18:13 mmn 阅读(100) 评论(0) 推荐(0)