题目链接:http://codeforces.com/contest/777/problem/C C. Alyona and Spreadsheet time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output During the lesson small girl Alyona works with one famous spreadsh…
Codeforces Round #401 (Div. 2) 很happy,现场榜很happy,完全将昨晚的不悦忘了.终判我校一片惨白,小董同学怒怼D\E,离AK就差一个C了,于是我AC了C题还剩35分钟立刻开D题,不料英文苦涩难懂,懂了题意之后发现也是个水题,从后往前遍历一遍即可.然而代码速度和思维都不算很好,还有半分钟在徘徊要不要测一下样例,但又怕OJ卡了,直接交第一组就跪了,然后发现个小问题改改又直接交最后5秒然而以第一组WA结束本场CF. A Shell Game 题意:有三个位置分别…
A. Shell Game time limit per test 0.5 seconds memory limit per test 256 megabytes input standard input output standard output Bomboslav likes to look out of the window in his room and watch lads outside playing famous shell game. The game is played b…
A. Shell Game time limit per test 0.5 seconds memory limit per test 256 megabytes input standard input output standard output Bomboslav likes to look out of the window in his room and watch lads outside playing famous shell game. The game is played b…
最近状态极差..水题不想写,难题咬不动..哎,CF的题那么简单,还搞崩了= =.真是巨菜无比. Codeforces777A 题意:略. 思路: 构造出3!次变换,然后输出就好. Code: #include <bits/stdc++.h> using namespace std; int a[6][4]={{1,2,3},{2,1,3},{2,3,1},{3,2,1},{3,1,2},{1,3,2}}; int main() { int n,x; scanf("%d",&…
B. Alyona and a tree 题目连接: http://codeforces.com/contest/739/problem/B Description Alyona has a tree with n vertices. The root of the tree is the vertex 1. In each vertex Alyona wrote an positive integer, in the vertex i she wrote ai. Moreover, the g…
A. Alyona and mex 题目连接: http://codeforces.com/contest/739/problem/A Description Alyona's mother wants to present an array of n non-negative integers to Alyona. The array should be special. Alyona is a capricious girl so after she gets the array, she…
题目链接: http://codeforces.com/contest/740/problem/D D. Alyona and a tree time limit per test2 secondsmemory limit per test256 megabytes 问题描述 Alyona has a tree with n vertices. The root of the tree is the vertex 1. In each vertex Alyona wrote an positiv…
E. Alyona and Triangles 题目连接: http://codeforces.com/contest/682/problem/E Description You are given n points with integer coordinates on the plane. Points are given in a way such that there is no triangle, formed by any three of these n points, which…
D. Alyona and Strings 题目连接: http://www.codeforces.com/contest/682/problem/D Description After returned from forest, Alyona started reading a book. She noticed strings s and t, lengths of which are n and m respectively. As usual, reading bored Alyona…
C. Alyona and the Tree 题目连接: http://www.codeforces.com/contest/682/problem/C Description Alyona decided to go on a diet and went to the forest to get some apples. There she unexpectedly found a magic rooted tree with root in the vertex 1, every verte…
A. Alyona and Numbers 题目连接: http://www.codeforces.com/contest/682/problem/A Description After finishing eating her bun, Alyona came up with two integers n and m. She decided to write down two columns of integers - the first column containing integers…
D. Alyona and a tree Problem Description: Alyona has a tree with n vertices. The root of the tree is the vertex 1. In each vertex Alyona wrote an positive integer, in the vertex i she wrote ai. Moreover, the girl wrote a positive integer to every edg…
C. Alyona and mex Problem Description: Alyona's mother wants to present an array of n non-negative integers to Alyona. The array should be special. Alyona is a capricious girl so after she gets the array, she inspects m of its subarrays. Subarray is…
B. Alyona and flowers Problem Description: Let's define a subarray as a segment of consecutive flowers. The mother suggested some set of subarrays. Alyona wants to choose several of the subarrays suggested by her mother. After that, each of the flowe…
A. Alyona and copybooks Problem Description: Little girl Alyona is in a shop to buy some copybooks for school. She study four subjects so she wants to have equal number of copybooks for each of the subjects. There are three types of copybook's packs…
B. Alyona and Mex time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Someone gave Alyona an array containing n positive integers a1, a2, ..., an. In one operation, Alyona can choose any elemen…