B. Chloe and the sequence 题目链接 http://codeforces.com/contest/743/problem/B 题面 Chloe, the same as Vladik, is a competitive programmer. She didn't have any problems to get to the olympiad like Vladik, but she was confused by the task proposed on the ol…
传送门 Description Chloe, the same as Vladik, is a competitive programmer. She didn't have any problems to get to the olympiad like Vladik, but she was confused by the task proposed on the olympiad. Let's consider the following algorithm of generating a…
D - Chloe and pleasant prizes 链接 http://codeforces.com/contest/743/problem/D 题面 Generous sponsors of the olympiad in which Chloe and Vladik took part allowed all the participants to choose a prize for them on their own. Christmas is coming, so sponso…
传送门 Description Vladik and Chloe decided to determine who of them is better at math. Vladik claimed that for any positive integer n he can represent fraction   as a sum of three distinct positive fractions in form . Help Vladik with that, i.e for a g…
Brain's Photos 题目链接: http://codeforces.com/contest/707/problem/A Description Small, but very brave, mouse Brain was not accepted to summer school of young villains. He was upset and decided to postpone his plans of taking over the world, but to becom…
Codeforces Round #529 (Div. 3) 题目传送门 题意: 给你由左右括号组成的字符串,问你有多少处括号翻转过来是合法的序列 思路: 这么考虑: 如果是左括号 1)整个序列左括号个数比右括号多 2 2)在这个位置之前,所有位置的前缀左括号个数都不少于前缀右括号个数 3)在这个位置和这个位置之后,在修改后所有位置的前缀左括号个数减去前缀右括号个数大于2 (这里这么想,把左变成右,左-1,右+1) 右括号也是这样 代码: #include<bits/stdc++.h> usi…
不想欠题了..... 多打打CF才知道自己智商不足啊... A. Vladik and flights 给你一个01串  相同之间随便飞 没有费用 不同的飞需要费用为  abs i-j 真是题意杀啊,,,实际上我们只考虑01转换的代价一定为1如果目的地和起点相同  费用为0 不相同  肯定为1  因为0旁边必然有1 #include <cstdio> #include <iostream> #include <algorithm> #include <vector…
A. Vladik and flights time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vladik is a competitive programmer. This year he is going to win the International Olympiad in Informatics. But it is…
A. Vladik and flights time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vladik is a competitive programmer. This year he is going to win the International Olympiad in Informatics. But it is…
C. Vladik and fractions 题目链接 http://codeforces.com/contest/743/problem/C 题面 Vladik and Chloe decided to determine who of them is better at math. Vladik claimed that for any positive integer n he can represent fraction as a sum of three distinct posit…