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…
B. Vika and Squares 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 infinitely long rectangular piece of paper of width 1, consisting of…
B. Vika and Squares time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output 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 liter…
B. Vika and Squares time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output 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 liter…
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…
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.…
Codeforces Round #297 (Div. 2)C. Ilya and Sticks Time Limit: 2 Sec Memory Limit: 256 MBSubmit: xxx Solved: 2xx 题目连接 http://codeforces.com/contest/525/problem/C Description In the evening, after the contest Ilya was bored, and he really felt like ma…
水 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 %…
B. Vika and Squares time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output 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 liter…