A. Greed time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Jafar has n cans of cola. Each can is described by two integers: remaining volume of cola ai and can's capacity bi (ai ≤ bi). Jaf…
Codeforces Round #446 (Div. 2) 总体:rating涨了好多,虽然有部分是靠和一些大佬(例如redbag和ShichengXiao)交流的--希望下次能自己做出来2333 A. Greed 题意:给你\(n\)个罐子,每个罐子都告诉了你它当前的饮料体积和它的总容积,问能否用两个罐子装下所有饮料(\(n\le 100000\)) 题解:简单模拟即可,用两个最大的算一下,注意累和会爆\(int\) int a[100100], b[100100]; long long s…
B. Wrath time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Hands that shed innocent blood! There are n guilty people in a line, the i-th of them holds a claw with length Li. The bell rings a…
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 贪心选容量大的瓶子就好 [代码] #include <bits/stdc++.h> #define int long long using namespace std; const int N = 1e5; int n; int a[N+10],b[N+10]; main(){ #ifdef LOCAL_DEFINE freopen("F:\\c++source\\rush_in.txt", "r…
A. Combination Lock time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output Scrooge McDuck keeps his most treasured savings in a home safe with a combination lock. Each time he wants to put there…
A. Joysticks time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output Friends are going to play console. They have two joysticks and only one charger for them. Initially first joystick is charged at…
A. Snacktower 题目连接: http://codeforces.com/contest/767/problem/A Description According to an old legeng, a long time ago Ankh-Morpork residents did something wrong to miss Fortune, and she cursed them. She said that at some time n snacks of distinct s…
链接:http://codeforces.com/contest/404/problem/B B. Marathon time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Valera takes part in the Berland Marathon. The marathon race starts at the stadium…