Educational Codeforces Round 65 E,F】的更多相关文章

E. Range Deleting 题意:给出一个序列,定义一个操作f(x,y)为删除序列中所有在[x,y]区间内的数.问能使剩下的数单调不减的操作f(x,y)的方案数是多少. 解法:不会做,思维跟不上,双指针也不熟练.思路和代码都是学习https://edwiv.com/archives/587这位巨佬的. 说下我的理解:我们考虑怎样的操作[l,r]才是合理的?很容易能想到有3个条件:①删除后剩下的数字[1,l-1]的位置是单调递增,②数字[r+1,x]的位置也是单调递增的,3 数字l-1的所…
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…
题目链接:http://codeforces.com/contest/818 A. Diplomas and Certificates 题解:水题 #include <iostream> #include <cstring> #include <cmath> using namespace std; typedef long long ll; int main() { ll n , k; cin >> n >> k; ll gg = n / 2;…
链接: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…
A.前n-10个有8即合法. #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #define rep(i,l,r) for (int i=(l); i<=(r); i++) typedef long long ll; using namespace std; ; char s[N]; int T,n; int main(){ for (scanf(&qu…
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;}…