B. Vova and Trophies time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vova has won nn trophies in different competitions. Each trophy is either golden or silver. The trophies are arranged i…
传送门:http://codeforces.com/contest/1082/problem/B B. Vova and Trophies time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vova has won nn trophies in different competitions. Each trophy is eit…
B. Vova and Trophies time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Vova has won n trophies in different competitions. Each trophy is either golden or silver. The trophies are arranged in a r…
A. Vasya and Book Solved. 三种方式取$Min$ #include <bits/stdc++.h> using namespace std; #define ll long long #define INF 0x3f3f3f3f3f3f3f3f int t; ll n, x, y, d; ll calc(ll x) { ? x / d : x / d + ; } int main() { scanf("%d", &t); while (t--…
传送门 https://www.cnblogs.com/violet-acmer/p/10035971.html 题意: Vova有n个奖杯,这n个奖杯全部是金奖或银奖,Vova将所有奖杯排成一排,你最多可以交换其中两个奖杯,求最大的连续的金奖杯个数. 题解: 思路: 求出连续的金奖杯位置,找出每两个相邻的连续的金奖杯所能够形成的最大的连续的金奖杯的个数,输出最大值. 相关变量解释: int n; char trophy[maxn]; struct Node { int l,r;//连续金奖杯包…
C. Multi-Subject Competition time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A multi-subject competition is coming! The competition has mm different subjects participants can choose from.…
D. Maximum Diameter Graph time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Graph constructive problems are back! This time the graph you are asked to build should match the following proper…
A. Vasya and Book time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya is reading a e-book. The file of the book consists of nn pages, numbered from 11 to nn. The screen is currently disp…
http://codeforces.com/contest/1082/problem/A WA数发,因为默认为x<y = = 分情况讨论,直达 or x->1->y  or  x->n->y  取最小值. #include<bits/stdc++.h> using namespace std; #define LL long long #define inf 0x3f3f3f3f #define mp make_pair #define pb push_back…
传送门:http://codeforces.com/contest/1082/problem/C C. Multi-Subject Competition time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A multi-subject competition is coming! The competition has mm …