Long long ago there is a strong tribe living on the earth. They always have wars and eonquer others. One day, there is another tribe become their target. The strong tribe has decide to terminate them!!! There are m villages in the other tribe. Each…
Defeat The Enemy Time Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %llu Long long ago there is a strong tribe living on the earth. They always have wars and eonquer others. One day, there is another tribe become their target. The stron…
题目链接: 传送门 Defeat the Enemy Time Limit: 3000MS Memory Limit: 32768 KB Description Long long ago there is a strong tribe living on the earth. They always have wars and eonquer others.One day, there is another tribe become their target. The strong t…
这个题跟codeforces 556 D Case of Fugitive思路一样 关于codeforces 556 D Case of Fugitive的做法的链接http://blog.csdn.net/stl112514/article/details/46868749 题意大概我方有n个军队,敌方有m个军队.军队有两个属性:攻击力和防御力 一个军队能打败还有一个军队的条件:一军队攻击力不低于还有一个军队防御力 大概是2014上海区域赛最简单的一个题? #include<map> #in…
D. Exams time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasiliy has an exam period which will continue for n days. He has to pass exams on m subjects. Subjects are numbered from 1 to m. Ab…
Long long ago there is a strong tribe living on the earth. They always have wars and eonquer others.One day, there is another tribe become their target. The strong tribe has decide to terminate them!!!There are m villages in the other tribe. Each vil…
ZSoft Corp. is a software company in GaoKe Hall. And the workers in the hall are very hard-working. But the elevator in that hall always drives them crazy. Why? Because there is only one elevator in GaoKe Hall, while there are hundreds of companies i…
题目链接: B. Skills time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Lesha plays the recently published new version of the legendary game hacknet. In this version character skill mechanism was…
The Revenge of the Princess’ Knight Problem Description There is an old country and the king fell in love with a devil. The devil always asks the king to do some crazy things. Although the king used to be wise and beloved by his people. Now he is jus…
思路:这里就要看往那边贪心了,因为解决的是最大值最小化,最小值最大化.也就是说当满足大于等于c时,l=mid+1这样的二分得到的就是在所有满足条件函数下的最右端. #include<iostream> #include<algorithm> using namespace std; #define ll long long ; int a[maxn], n, maxx, ans; ll c, mid; bool check(ll x){ ll sum = ; ; i <= n…
The main city magazine offers its readers an opportunity to publish their ads. The format of the ad should be like this: There are space-separated non-empty words of lowercase and uppercase Latin letters. There are hyphen characters '-' in some words…