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 |
|---|---|---|---|---|---|---|
| 702 | Educational Codeforces Round 15 | FINISHED | False | 7200 | 306687585 | July 29, 2016, 3 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 1917 ) | F | T-Shirts | PROGRAMMING | data structures | 2800 |
The big consignment of t-shirts goes on sale in the shop before the beginning of the spring. In all n types of t-shirts go on sale. The t-shirt of the i -th type has two integer parameters — c i and q i , where c i — is the price of the i -th type t-shirt, q i — is the quality of the i -th type t-shirt. It should be assumed that the unlimited number of t-shirts of each type goes on sale in the shop, but in general the quality is not concerned with the price. As predicted, k customers will come to the shop within the next month, the j -th customer will get ready to spend up to b j on buying t-shirts. All customers have the same strategy. First of all, the customer wants to buy the maximum possible number of the highest quality t-shirts, then to buy the maximum possible number of the highest quality t-shirts from residuary t-shirts and so on. At the same time among several same quality t-shirts the customer will buy one that is cheaper. The customers don't like the same t-shirts, so each customer will not buy more than one t-shirt of one type. Determine the number of t-shirts which each customer will buy, if they use the described strategy. All customers act independently from each other, and the purchase of one does not affect the purchase of another. The first line contains the positive integer n ( 1 ≤ n ≤ 2·10 5 ) — the number of t-shirt types. Each of the following n lines contains two integers c i and q i ( 1 ≤ c i , q i ≤ 10 9 ) — the price and the quality of the i -th type t-shirt. The next line contains the positive integer k ( 1 ≤ k ≤ 2·10 5 ) — the number of the customers. The next line contains k positive integers b 1 , b 2 , ..., b k ( 1 ≤ b j ≤ 10 9 ), where the j -th number is equal to the sum, which the j -th customer gets ready to spend on t-shirts. The first line of the input data should contain the sequence of k integers, where the i -th number should be equal to the number of t-shirts, which the i -th customer will buy. In the first exampl |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 40983950 | ReaLNero1 | F | July 30, 2018, 7:07 p.m. | OK | GNU C++ | TESTS | 70 | 374 | 10444800 | 2800 | |
| 32845653 | vjudge3 | F | Dec. 2, 2017, 3:33 a.m. | OK | GNU C++ | TESTS | 70 | 390 | 12492800 | 2800 | |
| 20320769 | Hillan | F | Sept. 1, 2016, 11:55 a.m. | OK | GNU C++ | TESTS | 70 | 420 | 52121600 | 2800 | |
| 32827966 | vjudge5 | F | Dec. 1, 2017, 11:24 a.m. | OK | GNU C++ | TESTS | 70 | 468 | 12697600 | 2800 | |
| 33495398 | vjudge5 | F | Dec. 22, 2017, 5:18 a.m. | OK | GNU C++ | TESTS | 70 | 686 | 9932800 | 2800 | |
| 37122513 | vjudge5 | F | April 9, 2018, 1:06 p.m. | OK | GNU C++ | TESTS | 70 | 686 | 21504000 | 2800 | |
| 25491010 | zyding | F | March 15, 2017, 6:30 a.m. | OK | GNU C++ | TESTS | 70 | 716 | 22937600 | 2800 | |
| 33495380 | vjudge2 | F | Dec. 22, 2017, 5:17 a.m. | OK | GNU C++ | TESTS | 70 | 717 | 9932800 | 2800 | |
| 36517905 | saoyang | F | March 23, 2018, 12:45 a.m. | OK | GNU C++ | TESTS | 70 | 717 | 31539200 | 2800 | |
| 40919414 | luogu_bot2 | F | July 29, 2018, 1:41 p.m. | OK | GNU C++ | TESTS | 70 | 795 | 7270400 | 2800 | |
| 60474259 | LIKEIKE | F | Sept. 13, 2019, 7:14 a.m. | OK | GNU C++11 | TESTS | 70 | 311 | 52121600 | 2800 | |
| 50088773 | vjudge4 | F | Feb. 18, 2019, 9:02 a.m. | OK | GNU C++11 | TESTS | 70 | 358 | 36352000 | 2800 | |
| 19783342 | 666sb666 | F | Aug. 11, 2016, 11:52 a.m. | OK | GNU C++11 | TESTS | 70 | 374 | 12595200 | 2800 | |
| 49613605 | vjudge3 | F | Feb. 8, 2019, 4:17 a.m. | OK | GNU C++11 | TESTS | 70 | 452 | 98611200 | 2800 | |
| 62030961 | TiwAirOAO | F | Oct. 7, 2019, 12:36 a.m. | OK | GNU C++11 | TESTS | 70 | 483 | 8806400 | 2800 | |
| 39674365 | NikolaTECH | F | June 26, 2018, 11:44 a.m. | OK | GNU C++11 | TESTS | 70 | 514 | 10547200 | 2800 | |
| 35120166 | NikolaTECH | F | Feb. 10, 2018, 10:18 a.m. | OK | GNU C++11 | TESTS | 70 | 529 | 12595200 | 2800 | |
| 65565759 | luogu_bot2 | F | Nov. 23, 2019, 5:48 a.m. | OK | GNU C++11 | TESTS | 70 | 530 | 7270400 | 2800 | |
| 59795806 | shurongwang | F | Aug. 31, 2019, 8:37 a.m. | OK | GNU C++11 | TESTS | 70 | 561 | 7270400 | 2800 | |
| 20433158 | anta | F | Sept. 7, 2016, 10:23 a.m. | OK | GNU C++11 | TESTS | 70 | 561 | 8806400 | 2800 | |
| 68339203 | Srushtiboda | F | Jan. 7, 2020, 1:43 a.m. | OK | GNU C++14 | TESTS | 70 | 451 | 48435200 | 2800 | |
| 68339262 | fegla | F | Jan. 7, 2020, 1:47 a.m. | OK | GNU C++14 | TESTS | 70 | 451 | 60825600 | 2800 | |
| 68339147 | fegla | F | Jan. 7, 2020, 1:40 a.m. | OK | GNU C++14 | TESTS | 70 | 467 | 48435200 | 2800 | |
| 44437562 | AnnieCai | F | Oct. 17, 2018, 10:49 a.m. | OK | GNU C++14 | TESTS | 70 | 483 | 12800000 | 2800 | |
| 34239379 | sggutier | F | Jan. 17, 2018, 3:56 a.m. | OK | GNU C++14 | TESTS | 70 | 577 | 14131200 | 2800 | |
| 35172544 | cyz666 | F | Feb. 12, 2018, 8:29 a.m. | OK | GNU C++14 | TESTS | 70 | 577 | 15667200 | 2800 | |
| 25464352 | la1la1la | F | March 14, 2017, 1:35 a.m. | OK | GNU C++14 | TESTS | 70 | 592 | 17510400 | 2800 | |
| 42080896 | darry140 | F | Aug. 25, 2018, 8:10 a.m. | OK | GNU C++14 | TESTS | 70 | 608 | 8806400 | 2800 | |
| 52884185 | vjudge5 | F | April 17, 2019, 3:36 a.m. | OK | GNU C++14 | TESTS | 70 | 670 | 14438400 | 2800 | |
| 33973046 | radoslav11 | F | Jan. 6, 2018, 9:36 p.m. | OK | GNU C++14 | TESTS | 70 | 701 | 28672000 | 2800 | |
| 68141789 | keko37 | F | Jan. 3, 2020, 11:21 p.m. | OK | GNU C++17 | TESTS | 70 | 529 | 12083200 | 2800 | |
| 68913595 | hank55663 | F | Jan. 16, 2020, 8:05 a.m. | OK | GNU C++17 | TESTS | 70 | 577 | 13004800 | 2800 | |
| 68200002 | imilki | F | Jan. 4, 2020, 3:08 p.m. | OK | GNU C++17 | TESTS | 70 | 639 | 80896000 | 2800 | |
| 46662757 | Jatana | F | Dec. 5, 2018, 8:51 p.m. | OK | GNU C++17 | TESTS | 70 | 655 | 205209600 | 2800 | |
| 69199253 | Ethylene | F | Jan. 20, 2020, 3:57 p.m. | OK | GNU C++17 | TESTS | 70 | 670 | 7270400 | 2800 | |
| 58415864 | vjudge3 | F | Aug. 7, 2019, 4:53 a.m. | OK | GNU C++17 | TESTS | 70 | 670 | 11468800 | 2800 | |
| 66661376 | forgottencsc | F | Dec. 12, 2019, 4:44 a.m. | OK | GNU C++17 | TESTS | 70 | 670 | 14643200 | 2800 | |
| 66660109 | forgottencsc | F | Dec. 12, 2019, 3:51 a.m. | OK | GNU C++17 | TESTS | 70 | 686 | 15360000 | 2800 | |
| 69199360 | vjudge3 | F | Jan. 20, 2020, 3:59 p.m. | OK | GNU C++17 | TESTS | 70 | 717 | 7270400 | 2800 | |
| 58416120 | roll_no_1 | F | Aug. 7, 2019, 5:04 a.m. | OK | GNU C++17 | TESTS | 70 | 717 | 11468800 | 2800 | |
| 50514755 | dalt | F | Feb. 26, 2019, 5:32 a.m. | OK | Java 8 | TESTS | 70 | 623 | 31232000 | 2800 | |
| 19681516 | JialinOuyang | F | Aug. 7, 2016, 6:52 a.m. | OK | Java 8 | TESTS | 70 | 1091 | 43008000 | 2800 | |
| 19678216 | JialinOuyang | F | Aug. 7, 2016, 12:22 a.m. | OK | Java 8 | TESTS | 70 | 1153 | 43008000 | 2800 | |
| 19715377 | JialinOuyang | F | Aug. 7, 2016, 9:21 p.m. | OK | Java 8 | TESTS | 70 | 1154 | 43008000 | 2800 | |
| 41377287 | mariem_kandil | F | Aug. 8, 2018, 10:15 p.m. | OK | Java 8 | TESTS | 70 | 1403 | 39321600 | 2800 | |
| 31148765 | Ahmad_Elsagheer | F | Oct. 8, 2017, 3:52 p.m. | OK | Java 8 | TESTS | 70 | 1808 | 21504000 | 2800 | |
| 19603571 | FFyuan | F | Aug. 3, 2016, 6:21 p.m. | OK | Java 8 | TESTS | 70 | 2620 | 25497600 | 2800 | |
| 49342858 | vjudge4 | F | Feb. 2, 2019, 2:13 a.m. | OK | MS C++ | TESTS | 70 | 935 | 7270400 | 2800 | |
| 62119407 | vjudge4 | F | Oct. 8, 2019, 2:15 p.m. | OK | MS C++ | TESTS | 70 | 935 | 8806400 | 2800 | |
| 62047363 | vjudge4 | F | Oct. 7, 2019, 8:20 a.m. | OK | MS C++ | TESTS | 70 | 1138 | 8806400 | 2800 | |
| 62031005 | vjudge4 | F | Oct. 7, 2019, 12:38 a.m. | OK | MS C++ | TESTS | 70 | 1138 | 8806400 | 2800 | |
| 62047625 | vjudge1 | F | Oct. 7, 2019, 8:27 a.m. | OK | MS C++ | TESTS | 70 | 1201 | 8806400 | 2800 | |
| 33446387 | vjudge2 | F | Dec. 20, 2017, 6:07 a.m. | OK | MS C++ | TESTS | 70 | 1575 | 105472000 | 2800 | |
| 66204392 | vjudge2 | F | Dec. 3, 2019, 12:50 a.m. | OK | MS C++ | TESTS | 70 | 2791 | 9728000 | 2800 | |
| 62177644 | vjudge5 | F | Oct. 9, 2019, 5:01 a.m. | OK | MS C++ | TESTS | 70 | 3042 | 7372800 | 2800 | |
| 19596189 | rechmae | F | Aug. 3, 2016, 11:10 a.m. | OK | MS C++ | TESTS | 70 | 3104 | 10547200 | 2800 |
Back to search problems