Codeforces Round #358(div 2)】的更多相关文章

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…
B. Alyona and Mex 题目连接: http://www.codeforces.com/contest/682/problem/B Description Someone gave Alyona an array containing n positive integers a1, a2, ..., an. In one operation, Alyona can choose any element of the array and decrease it, i.e. replac…
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…
A:统计个数题,要注意ans+=a*b+c*d中,如果a*b>int,那么即使ans是long long也会越界,所以ans+=(long long)a*b+(long long)c*d B:模拟一下删的过程 C:定义一个节点u是sad当且仅当u的子节点中存在一个节点v,使得dist(u,v)>a[v],给定一个树,每次操作只能删除一个叶子节点,问最少删多少次后剩下来的树没有sad点.首先明确这题最后树的形态是确定的,所以这里的求最少也就相当于模拟一遍删除过程,如果我们认定一个节点是sad的(…
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…
题目链接: 题目 D. Alyona and Strings time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output 问题描述 After returned from forest, Alyona started reading a book. She noticed strings s and t, lengths of which are…
A. Alyona and Numbers time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output After finishing eating her bun, Alyona came up with two integers n and m. She decided to write down two columns of inte…
C. Alyona and the Tree time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Alyona decided to go on a diet and went to the forest to get some apples. There she unexpectedly found a magic rooted…