Educational Codeforces Round 65 (Rated for Div. 2)题解 题目链接 A. Telephone Number 水题,代码如下: Code #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 2e5 + 5; int a[N] ; int n, T; char s[N] ; int main() { cin >> T; whil…
链接:https://codeforces.com/contest/1167/problem/D 题意: A string is called bracket sequence if it does not contain any characters other than "(" and ")". A bracket sequence is called regular (shortly, RBS) if it is possible to obtain corr…
链接:https://codeforces.com/contest/1167/problem/C 题意: In some social network, there are nn users communicating with each other in mm groups of friends. Let's analyze the process of distributing some news between users. Initially, some user xx receives…
链接:https://codeforces.com/contest/1167/problem/B 题意: This is an interactive problem. Remember to flush your output while communicating with the testing program. You may use fflush(stdout) in C++, system.out.flush() in Java, stdout.flush() in Python o…
链接:https://codeforces.com/contest/1167/problem/A 题意: A telephone number is a sequence of exactly 11 digits, where the first digit is 8. For example, the sequence 80011223388 is a telephone number, but the sequences 70011223388and 80000011223388 are n…
This is an interactive problem. Remember to flush your output while communicating with the testing program. You may use fflush(stdout) in C++, system.out.flush() in Java, stdout.flush() in Python or flush(output) in Pascal to flush the output. If you…
https://codeforc.es/contest/1167/problem/E E. Range Deleting time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given an array consisting of nn integers a1,a2,…,ana1,a2,…,an and an in…
A:签到. #include<bits/stdc++.h> using namespace std; #define ll long long #define inf 1000000010 #define N 110 char getc(){char c=getchar();while ((c<'A'||c>'Z')&&(c<'a'||c>'z')&&(c<'0'||c>'9')) c=getchar();return c;}…
传送门 参考资料: [1]:https://blog.csdn.net/weixin_43262291/article/details/90271693 题意: 给你一个包含 n 个数的序列 a,并且 max{ai} ≤ x: 定义一个操作 f(L,R) 将序列 a 中  L ≤ ai ≤ R 的数删除: 问有多少对满足条件的 (L,R) 使得执行完 f(L,R) 操作后的序列非递减: 题解: [1]博文看了一晚上,终于理解了: 枚举左区间 i,找到符合条件的最小的右区间 ki,f(1,k1),…
A. Telephone Number A telephone number is a sequence of exactly 11 digits, where the first digit is 8. For example, the sequence 80011223388 is a telephone number, but the sequences 70011223388 and 80000011223388 are not. You are given a string ss of…