Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.
ContestId |
Name |
Phase |
Frozen |
Duration (Seconds) |
Relative Time |
Start Time |
|---|---|---|---|---|---|---|
| 609 | Educational Codeforces Round 3 | FINISHED | False | 7200 | 325868423 | Dec. 19, 2015, 3 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 1504 ) | F | Frogs and mosquitoes | PROGRAMMING | data structures greedy | 2500 |
There are n frogs sitting on the coordinate axis Ox . For each frog two values x i , t i are known — the position and the initial length of the tongue of the i -th frog (it is guaranteed that all positions x i are different). m mosquitoes one by one are landing to the coordinate axis. For each mosquito two values are known p j — the coordinate of the position where the j -th mosquito lands and b j — the size of the j -th mosquito. Frogs and mosquitoes are represented as points on the coordinate axis. The frog can eat mosquito if mosquito is in the same position with the frog or to the right, and the distance between them is not greater than the length of the tongue of the frog. If at some moment several frogs can eat a mosquito the leftmost frog will eat it (with minimal x i ). After eating a mosquito the length of the tongue of a frog increases with the value of the size of eaten mosquito. It's possible that after it the frog will be able to eat some other mosquitoes (the frog should eat them in this case). For each frog print two values — the number of eaten mosquitoes and the length of the tongue after landing all mosquitoes and after eating all possible mosquitoes by frogs. Each mosquito is landing to the coordinate axis only after frogs eat all possible mosquitoes landed before. Mosquitoes are given in order of their landing to the coordinate axis. First line contains two integers n , m ( 1 ≤ n , m ≤ 2·10 5 ) — the number of frogs and mosquitoes. Each of the next n lines contains two integers x i , t i ( 0 ≤ x i , t i ≤ 10 9 ) — the position and the initial length of the tongue of the i -th frog. It is guaranteed that all x i are different. Next m lines contain two integers each p j , b j ( 0 ≤ p j , b j ≤ 10 9 ) — the position and the size of the j -th mosquito. Print n lines. The i -th line should contain two integer values c i , l i — the number of mosquitoes eaten by the i -th frog and the length of the tongue of the i -th frog. |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 15059004 | igdor99 | F | Dec. 27, 2015, 4:46 p.m. | OK | FPC | TESTS | 73 | 1482 | 510464000 | 2500 | |
| 22195249 | Minology | F | Nov. 13, 2016, 3:11 p.m. | OK | GNU C++ | TESTS | 73 | 217 | 15155200 | 2500 | |
| 15070945 | Owaski | F | Dec. 28, 2015, 1:07 p.m. | OK | GNU C++ | TESTS | 73 | 280 | 24985600 | 2500 | |
| 15146518 | prayerhgq | F | Jan. 1, 2016, 9:13 a.m. | OK | GNU C++ | TESTS | 73 | 295 | 17612800 | 2500 | |
| 14938469 | linkct | F | Dec. 23, 2015, 12:43 p.m. | OK | GNU C++ | TESTS | 73 | 311 | 16179200 | 2500 | |
| 17796187 | sunhaowen123 | F | May 7, 2016, 5:46 p.m. | OK | GNU C++ | TESTS | 73 | 327 | 16691200 | 2500 | |
| 14904606 | ivanilos | F | Dec. 20, 2015, 8:45 p.m. | OK | GNU C++ | TESTS | 73 | 343 | 19046400 | 2500 | |
| 37490721 | vjudge5 | F | April 20, 2018, 2:43 p.m. | OK | GNU C++ | TESTS | 73 | 358 | 13926400 | 2500 | |
| 40472029 | vjudge1 | F | July 17, 2018, 9:58 a.m. | OK | GNU C++ | TESTS | 73 | 358 | 16179200 | 2500 | |
| 20040847 | Wuvin | F | Aug. 22, 2016, 7:42 a.m. | OK | GNU C++ | TESTS | 73 | 358 | 19660800 | 2500 | |
| 15178973 | smallling | F | Jan. 4, 2016, 8:53 a.m. | OK | GNU C++ | TESTS | 73 | 373 | 15974400 | 2500 | |
| 15269990 | PPFish | F | Jan. 9, 2016, 1:16 p.m. | OK | GNU C++11 | TESTS | 73 | 249 | 11366400 | 2500 | |
| 25815308 | lzr_010506 | F | March 26, 2017, 9:28 a.m. | OK | GNU C++11 | TESTS | 73 | 249 | 17305600 | 2500 | |
| 40985505 | ReaLNero1 | F | July 30, 2018, 7:59 p.m. | OK | GNU C++11 | TESTS | 73 | 265 | 11366400 | 2500 | |
| 15269969 | PPFish | F | Jan. 9, 2016, 1:14 p.m. | OK | GNU C++11 | TESTS | 73 | 280 | 11366400 | 2500 | |
| 14895580 | commomwealth | F | Dec. 20, 2015, 8:03 a.m. | OK | GNU C++11 | TESTS | 73 | 280 | 15974400 | 2500 | |
| 61199991 | nyto | F | Sept. 24, 2019, 7:21 a.m. | OK | GNU C++11 | TESTS | 73 | 296 | 10342400 | 2500 | |
| 61200041 | nyto | F | Sept. 24, 2019, 7:22 a.m. | OK | GNU C++11 | TESTS | 73 | 296 | 16179200 | 2500 | |
| 61006386 | vjudge4 | F | Sept. 21, 2019, 11:16 a.m. | OK | GNU C++11 | TESTS | 73 | 296 | 16179200 | 2500 | |
| 53126148 | Dilute | F | April 22, 2019, 2:07 p.m. | OK | GNU C++11 | TESTS | 73 | 296 | 16179200 | 2500 | |
| 14907432 | lych123 | F | Dec. 21, 2015, 5:49 a.m. | OK | GNU C++11 | TESTS | 73 | 296 | 16793600 | 2500 | |
| 45065538 | Maruf_75 | F | Oct. 29, 2018, 4:50 p.m. | OK | GNU C++14 | TESTS | 73 | 327 | 15360000 | 2500 | |
| 44048515 | Deathly_Hallows | F | Oct. 9, 2018, 6:28 p.m. | OK | GNU C++14 | TESTS | 73 | 358 | 10547200 | 2500 | |
| 33837941 | suibaka | F | Dec. 31, 2017, 7:48 p.m. | OK | GNU C++14 | TESTS | 73 | 358 | 21913600 | 2500 | |
| 68752958 | Turkey | F | Jan. 14, 2020, 7:20 a.m. | OK | GNU C++14 | TESTS | 73 | 373 | 10547200 | 2500 | |
| 50705357 | sidnee | F | March 3, 2019, 3:18 a.m. | OK | GNU C++14 | TESTS | 73 | 374 | 17715200 | 2500 | |
| 58906141 | huzaifa242 | F | Aug. 16, 2019, 11:14 a.m. | OK | GNU C++14 | TESTS | 73 | 389 | 13721600 | 2500 | |
| 58906024 | huzaifa242 | F | Aug. 16, 2019, 11:10 a.m. | OK | GNU C++14 | TESTS | 73 | 389 | 13721600 | 2500 | |
| 53807167 | vjudge3 | F | May 6, 2019, 2:31 a.m. | OK | GNU C++14 | TESTS | 73 | 389 | 27443200 | 2500 | |
| 62169905 | Jiburiru | F | Oct. 8, 2019, 11:32 p.m. | OK | GNU C++14 | TESTS | 73 | 390 | 14540800 | 2500 | |
| 23386433 | kolyukkonen | F | Dec. 28, 2016, 8:27 p.m. | OK | GNU C++14 | TESTS | 73 | 404 | 17203200 | 2500 | |
| 68045534 | Bench0310 | F | Jan. 1, 2020, 4:17 p.m. | OK | GNU C++17 | TESTS | 73 | 358 | 15360000 | 2500 | |
| 50491052 | Vaseline_Warrior | F | Feb. 25, 2019, 1:20 p.m. | OK | GNU C++17 | TESTS | 73 | 358 | 15360000 | 2500 | |
| 44320028 | Momentum | F | Oct. 14, 2018, 1:54 p.m. | OK | GNU C++17 | TESTS | 73 | 374 | 10752000 | 2500 | |
| 68045484 | Bench0310 | F | Jan. 1, 2020, 4:15 p.m. | OK | GNU C++17 | TESTS | 73 | 389 | 15360000 | 2500 | |
| 46623016 | vjudge1 | F | Dec. 4, 2018, 7 p.m. | OK | GNU C++17 | TESTS | 73 | 389 | 22220800 | 2500 | |
| 46620738 | _Ore_ | F | Dec. 4, 2018, 6:04 p.m. | OK | GNU C++17 | TESTS | 73 | 389 | 22220800 | 2500 | |
| 50673062 | zengzk | F | March 2, 2019, 8 a.m. | OK | GNU C++17 | TESTS | 73 | 405 | 45977600 | 2500 | |
| 53306235 | vjudge2 | F | April 26, 2019, 3:20 a.m. | OK | GNU C++17 | TESTS | 73 | 420 | 45977600 | 2500 | |
| 39503309 | nikhilhassija | F | June 22, 2018, 12:48 a.m. | OK | GNU C++17 | TESTS | 73 | 421 | 21094400 | 2500 | |
| 55104468 | Anachor | F | June 5, 2019, 12:32 a.m. | OK | GNU C++17 | TESTS | 73 | 436 | 16281600 | 2500 | |
| 19601785 | pavel.rosputko | F | Aug. 3, 2016, 4:31 p.m. | OK | Haskell | TESTS | 73 | 1387 | 104243200 | 2500 | |
| 19601847 | pavel.rosputko | F | Aug. 3, 2016, 4:35 p.m. | OK | Haskell | TESTS | 73 | 1450 | 104243200 | 2500 | |
| 19601597 | pavel.rosputko | F | Aug. 3, 2016, 4:20 p.m. | OK | Haskell | TESTS | 73 | 1528 | 110489600 | 2500 | |
| 19601554 | pavel.rosputko | F | Aug. 3, 2016, 4:17 p.m. | OK | Haskell | TESTS | 73 | 1622 | 111616000 | 2500 | |
| 19601862 | pavel.rosputko | F | Aug. 3, 2016, 4:36 p.m. | OK | Haskell | TESTS | 73 | 1653 | 109465600 | 2500 | |
| 19601313 | pavel.rosputko | F | Aug. 3, 2016, 4:03 p.m. | OK | Haskell | TESTS | 73 | 1668 | 110592000 | 2500 | |
| 19601453 | pavel.rosputko | F | Aug. 3, 2016, 4:11 p.m. | OK | Haskell | TESTS | 73 | 1684 | 110592000 | 2500 | |
| 19601337 | pavel.rosputko | F | Aug. 3, 2016, 4:05 p.m. | OK | Haskell | TESTS | 73 | 1871 | 110489600 | 2500 | |
| 19598144 | pavel.rosputko | F | Aug. 3, 2016, 1:05 p.m. | OK | Haskell | TESTS | 73 | 1918 | 121036800 | 2500 | |
| 19601278 | pavel.rosputko | F | Aug. 3, 2016, 4:01 p.m. | OK | Haskell | TESTS | 73 | 1949 | 121036800 | 2500 | |
| 16543848 | DukeOfYork | F | March 6, 2016, 2:54 a.m. | OK | Java 7 | TESTS | 73 | 1996 | 47820800 | 2500 | |
| 15147368 | uwi | F | Jan. 1, 2016, 11:18 a.m. | OK | Java 8 | TESTS | 73 | 451 | 19251200 | 2500 | |
| 15076888 | Al3ks1002 | F | Dec. 28, 2015, 8:03 p.m. | OK | Java 8 | TESTS | 73 | 701 | 11366400 | 2500 | |
| 15147816 | uwi | F | Jan. 1, 2016, 12:15 p.m. | OK | Java 8 | TESTS | 73 | 764 | 14745600 | 2500 | |
| 31094361 | Carson | F | Oct. 6, 2017, 10:16 p.m. | OK | Java 8 | TESTS | 73 | 779 | 33587200 | 2500 | |
| 69535907 | lolklol | F | Jan. 25, 2020, 6:50 p.m. | OK | Java 8 | TESTS | 73 | 779 | 39833600 | 2500 | |
| 69536090 | lolklol | F | Jan. 25, 2020, 6:55 p.m. | OK | Java 8 | TESTS | 73 | 810 | 39833600 | 2500 | |
| 38617055 | PrakharJain | F | May 25, 2018, 7:39 p.m. | OK | Java 8 | TESTS | 73 | 919 | 44544000 | 2500 | |
| 48053189 | wigor | F | Jan. 7, 2019, 10:37 a.m. | OK | Java 8 | TESTS | 73 | 1122 | 19660800 | 2500 | |
| 64786937 | Oom | F | Nov. 13, 2019, 9:30 a.m. | OK | Java 8 | TESTS | 73 | 1216 | 101888000 | 2500 | |
| 64774494 | Oom | F | Nov. 13, 2019, 3:06 a.m. | OK | Java 8 | TESTS | 73 | 1309 | 51302400 | 2500 | |
| 14969179 | AnatolyTolstobrov | F | Dec. 24, 2015, 12:16 p.m. | OK | MS C# | TESTS | 73 | 482 | 31744000 | 2500 | |
| 14968420 | AnatolyTolstobrov | F | Dec. 24, 2015, 11:16 a.m. | OK | MS C# | TESTS | 73 | 514 | 31846400 | 2500 | |
| 14968385 | AnatolyTolstobrov | F | Dec. 24, 2015, 11:13 a.m. | OK | MS C# | TESTS | 73 | 733 | 37068800 | 2500 | |
| 14968286 | AnatolyTolstobrov | F | Dec. 24, 2015, 11:05 a.m. | OK | MS C# | TESTS | 73 | 904 | 35532800 | 2500 | |
| 14917735 | AleksanderBalobanov | F | Dec. 21, 2015, 7:22 p.m. | OK | MS C++ | TESTS | 73 | 343 | 26828800 | 2500 | |
| 14927071 | Mosyagin | F | Dec. 22, 2015, 3:21 p.m. | OK | MS C++ | TESTS | 73 | 358 | 18739200 | 2500 | |
| 15060482 | Perforator | F | Dec. 27, 2015, 6:45 p.m. | OK | MS C++ | TESTS | 73 | 421 | 19148800 | 2500 | |
| 14896855 | vovuh | F | Dec. 20, 2015, 9:44 a.m. | OK | MS C++ | TESTS | 73 | 468 | 24166400 | 2500 | |
| 14927258 | vanvector | F | Dec. 22, 2015, 3:35 p.m. | OK | MS C++ | TESTS | 73 | 499 | 23552000 | 2500 | |
| 20271685 | yangxinthu | F | Aug. 30, 2016, 6:50 a.m. | OK | MS C++ | TESTS | 73 | 732 | 22323200 | 2500 | |
| 14939577 | veschii_nevstrui | F | Dec. 23, 2015, 2:05 p.m. | OK | MS C++ | TESTS | 73 | 982 | 224153600 | 2500 | |
| 14899153 | DmitriyH | F | Dec. 20, 2015, 12:56 p.m. | OK | MS C++ | TESTS | 73 | 1357 | 29286400 | 2500 | |
| 14899049 | DmitriyH | F | Dec. 20, 2015, 12:49 p.m. | OK | MS C++ | TESTS | 73 | 1497 | 29286400 | 2500 | |
| 55592116 | hobgoblin23 | F | June 15, 2019, 1 p.m. | OK | MS C++ 2017 | TESTS | 73 | 1560 | 28057600 | 2500 |
Back to search problems