http://codeforces.com/contest/845】的更多相关文章

A. Chess Tourney time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Berland annual chess tournament is coming! Organizers have gathered 2·n chess players who should be divided into two teams w…
题目链接:codeforces 725D . Contest Balloons 先按气球数从大到小排序求出初始名次,并把名次排在第一队前面的队放入优先队列,按w-t-1值从小到大优先,然后依次给气球给排名在前面的的队,给完后自己的气球数减少,继续跟之前排在第一队后面的队比较,考虑是否加入队列,每次记录最好的名次. #include<cstdio> #include<cstring> #include<algorithm> #include<queue> us…
http://codeforces.com/contest/325/problem/B B. Stadium and Games time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Daniel is organizing a football tournament. He has come up with the followin…
A. Cinema Line time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output The new "Die Hard" movie has just been released! There are n people at the cinema box office standing in a huge line. Ea…
          D. Contest Balloons          time limit per test 3 seconds         memory limit per test 256 megabytes input standard input output standard output One tradition of ACM-ICPC contests is that a team gets a balloon for every solved problem. We…
比赛时虽然贪了心,不过后面没想到怎么处理和set的排序方法忘了- -,其实是和优先队列的仿函数一样的... 比赛后用set pair过了... #include <bits/stdc++.h> using namespace std; #define ll long long const int N = 200005; const ll mod = 1e9 + 7; const double eps = 1e-12; ll a[N]; struct node1 { ll d, dm, pos;…
D. Vika and Segments time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vika has an infinite sheet of squared paper. Initially all squares are white. She introduced a two-dimensional coordina…
D. The Union of k-Segments time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output You are given n segments on the coordinate axis Ox and the number k. The point is satisfied if it belongs to at l…
B. Tavas and Malekas time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Tavas is a strange creature. Usually "zzz" comes out of people's mouth while sleeping, but string s of length n co…
C. Tavas and Karafs time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Karafs is some kind of vegetable in shape of an 1 × h rectangle. Tavaspolis people love Karafs and they use Karafs in al…