C. Heap Operations time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Petya has recently learned data structure named "Binary heap". The heap he is now operating with allows the following…
C. Heap Operations 题目连接: http://www.codeforces.com/contest/681/problem/C Description Petya has recently learned data structure named "Binary heap". The heap he is now operating with allows the following operations: put the given number into the…
E. Runaway to a Shadow 题目连接: http://www.codeforces.com/contest/681/problem/E Description Dima is living in a dormitory, as well as some cockroaches. At the moment 0 Dima saw a cockroach running on a table and decided to kill it. Dima needs exactly T…
A. A Good Contest 题目连接: http://www.codeforces.com/contest/681/problem/A Description Codeforces user' handle color depends on his rating - it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or…
C. Heap Operations time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Petya has recently learned data structure named "Binary heap". The heap he is now operating with allows the following…
C. Cardiogram time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output In this problem, your task is to use ASCII graphics to paint a cardiogram. A cardiogram is a polyline with the following corner…
C. Thor time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Thor is getting used to the Earth. As a gift Loki gave him a smartphone. There are n applications on this phone. Thor is fascinated…
依照题意暴力模拟即可A掉 #include <cstdio> #include <algorithm> #include <cstring> #include <set> using namespace std; ]; ]; int main(){ scanf("%d %d",&n,&k); scanf(); ;i<=n;i++) barrel[s[i]-]++; int ans=0x3f3f3f3f; ;i<…
D. Gifts by the List 题目连接: http://www.codeforces.com/contest/681/problem/D Description Sasha lives in a big happy family. At the Man's Day all the men of the family gather to celebrate it following their own traditions. There are n men in Sasha's fam…
B. Economy Game 题目连接: http://www.codeforces.com/contest/681/problem/B Description Kolya is developing an economy simulator game. His most favourite part of the development process is in-game testing. Once he was entertained by the testing so much, th…