Anton and School】的更多相关文章

E. Anton and Tree time limit per test: 3 seconds memory limit per test :256 megabytes input:standard input output: standard output Anton is growing a tree in his garden. In case you forgot, the tree is a connected acyclic undirected graph. There are …
题目传送门 /* 题意:从前面找一个数字和末尾数字调换使得变成偶数且为最大 贪心:考虑两种情况:1. 有偶数且比末尾数字大(flag标记):2. 有偶数但都比末尾数字小(x位置标记) 仿照别人写的,再看自己的代码发现有清晰的思维是多重要 */ #include <cstdio> #include <iostream> #include <algorithm> #include <cmath> #include <cstring> #include…
E. Anton and Tree 题目连接: http://codeforces.com/contest/734/problem/E Description Anton is growing a tree in his garden. In case you forgot, the tree is a connected acyclic undirected graph. There are n vertices in the tree, each of them is painted bla…
D. Anton and Chess 题目连接: http://codeforces.com/contest/734/problem/D Description Anton likes to play chess. Also, he likes to do programming. That is why he decided to write the program that plays chess. However, he finds the game on 8 to 8 board to…
C. Anton and Making Potions 题目连接: http://codeforces.com/contest/734/problem/C Description Anton is playing a very interesting computer game, but now he is stuck at one of the levels. To pass to the next level he has to prepare n potions. Anton has a…
B. Anton and Digits 题目连接: http://codeforces.com/contest/734/problem/B Description Recently Anton found a box with digits in his room. There are k2 digits 2, k3 digits 3, k5 digits 5 and k6 digits 6. Anton's favorite integers are 32 and 256. He decide…
A. Anton and Danik 题目连接: http://codeforces.com/contest/734/problem/A Description Anton likes to play chess, and so does his friend Danik. Once they have played n games in a row. For each game it's known who was the winner - Anton or Danik. None of th…
题目链接: http://codeforces.com/contest/734/problem/D D. Anton and Chess time limit per test4 secondsmemory limit per test256 megabytes 问题描述 Anton likes to play chess. Also, he likes to do programming. That is why he decided to write the program that pla…
LINK time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The teacher gave Anton a large geometry homework, but he didn't do it (as usual) as he participated in a regular round on Codeforces. In…
E. Anton and Tree time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Anton is growing a tree in his garden. In case you forgot, the tree is a connected acyclic undirected graph. There are n v…