E. Alphabet Permutations time limit per test: 1 second memory limit per test: 512 megabytes input: standard input output: standard output You are given a string s of length n, consisting of first k lowercase English letters. We define a c-repeat o…
D. Vika and Segments 题目连接: http://www.codeforces.com/contest/610/problem/D Description Vika has an infinite sheet of squared paper. Initially all squares are white. She introduced a two-dimensional coordinate system on this sheet and drew n black hor…
C. Harmony Analysis 题目连接: http://www.codeforces.com/contest/610/problem/C Description The semester is already ending, so Danil made an effort and decided to visit a lesson on harmony analysis to know how does the professor look like, at least. Danil…
B. Vika and Squares 题目连接: http://www.codeforces.com/contest/610/problem/B Description Vika has n jars with paints of distinct colors. All the jars are numbered from 1 to n and the i-th jar contains ai liters of paint of color i. Vika also has an infi…
A. Pasha and Stick 题目连接: http://www.codeforces.com/contest/610/problem/A Description Pasha has a wooden stick of some positive integer length n. He wants to perform exactly three cuts to get four parts of the stick. Each part must have some positive…
D. Vika and Segments Vika has an infinite sheet of squared paper. Initially all squares are white. She introduced a two-dimensional coordinate system on this sheet and drew n black horizontal and vertical segments parallel to the coordinate axes.…
水 A - Pasha and Stick #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e5 + 5; const int INF = 0x3f3f3f3f; int main(void) { int n; scanf ("%d", &n); int ans = n / 4; if (n % 4 == 0) { ans--; } if (n %…
D. Vika and Segments time limit per test: 2 seconds memory limit per test: 256 megabytes input : standard input output: standard output Vika has an infinite sheet of squared paper. Initially all squares are white. She introduced a two-dimensio…