Codeforces Round 176 (Div. 1)

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
286 Codeforces Round 176 (Div. 1) FINISHED False 7200 367797599 March 23, 2013, 8 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 833 ) E Ladies' Shop PROGRAMMING constructive algorithms fft math 2600

B'A ladies ' shop has recently opened in the city of Ultima Thule. To get ready for the opening, the shop bought n bags. Each bag is characterised by the total weight ai of the items you can put there. The weird thing is, you cannot use these bags to put a set of items with the total weight strictly less than ai. However the weights of the items that will be sold in the shop haven 't yet been defined. That 's what you should determine right now. Your task is to find the set of the items ' weights p1, xe2 x80 x89p2, xe2 x80 x89..., xe2 x80 x89pk (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89p1 xe2 x80 x89< xe2 x80 x89p2 xe2 x80 x89< xe2 x80 x89... xe2 x80 x89< xe2 x80 x89pk), such that: Find and print the required set. The first line contains space-separated integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106). The second line contains n distinct space-separated integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a1 xe2 x80 x89< xe2 x80 x89a2 xe2 x80 x89< xe2 x80 x89... xe2 x80 x89< xe2 x80 x89an xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m) -- the bags ' weight limits. In the first line print "NO" (without the quotes) if there isn 't set pi, that would meet the conditions. Otherwise, in the first line print "YES" (without the quotes), in the second line print an integer k (showing how many numbers are in the suitable set with the minimum number of weights), in the third line print k space-separated integers p1, xe2 x80 x89p2, xe2 x80 x89..., xe2 x80 x89pk (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89p1 xe2 x80 x89< xe2 x80 x89p2 xe2 x80 x89< xe2 x80 x89... xe2 x80 x89< xe2 x80 x89pk). If there are multiple solutions, print any of them.'...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3761876 Alex_2oo8 E May 23, 2013, 5:06 p.m. OK Delphi TESTS 112 7234 180428800 2600
3761866 Alex_2oo8 E May 23, 2013, 5:03 p.m. OK FPC TESTS 112 8000 236544000 2600
6406102 moji E April 18, 2014, 4:31 p.m. OK GNU C++ TESTS 112 374 2355200 2600
31729117 Flash-boy E Oct. 26, 2017, 5:32 a.m. OK GNU C++ TESTS 112 716 67379200 2600
27357002 laofudasuan E May 26, 2017, 1:57 p.m. OK GNU C++ TESTS 112 746 112230400 2600
33242266 Thefinal E Dec. 14, 2017, 2:17 p.m. OK GNU C++ TESTS 112 746 226508800 2600
23492748 phantomI E Jan. 2, 2017, 4 a.m. OK GNU C++ TESTS 112 810 210636800 2600
18404721 HalfSummer11 E June 13, 2016, 2:58 a.m. OK GNU C++ TESTS 112 872 94617600 2600
23515553 h10_is_our_red_son E Jan. 3, 2017, 11:45 a.m. OK GNU C++ TESTS 112 902 113664000 2600
23515611 h10_is_our_red_son E Jan. 3, 2017, 11:49 a.m. OK GNU C++ TESTS 112 966 49766400 2600
24217096 Leefir E Jan. 28, 2017, 8:27 a.m. OK GNU C++ TESTS 112 966 94515200 2600
23555021 vjtest E Jan. 5, 2017, 1:01 p.m. OK GNU C++ TESTS 112 966 210636800 2600
3408651 MinakoKojima E March 26, 2013, 2:34 p.m. OK GNU C++0x TESTS 112 1281 144998400 2600
8427015 zshi E Oct. 27, 2014, 7:18 a.m. OK GNU C++0x TESTS 112 1340 170496000 2600
3410616 MinakoKojima E March 27, 2013, 6:57 a.m. OK GNU C++0x TESTS 112 1359 144998400 2600
3408387 MinakoKojima E March 26, 2013, 1:25 p.m. OK GNU C++0x TESTS 112 1484 144998400 2600
3408477 MinakoKojima E March 26, 2013, 1:48 p.m. OK GNU C++0x TESTS 112 1500 144998400 2600
10222589 johnasselta E March 9, 2015, 11:55 p.m. OK GNU C++0x TESTS 112 1620 37785600 2600
10222557 johnasselta E March 9, 2015, 11:44 p.m. OK GNU C++0x TESTS 112 1622 37785600 2600
10222577 johnasselta E March 9, 2015, 11:52 p.m. OK GNU C++0x TESTS 112 1716 37785600 2600
10222554 johnasselta E March 9, 2015, 11:44 p.m. OK GNU C++0x TESTS 112 1840 37785600 2600
3395434 ZOTAC89 E March 23, 2013, 2:57 p.m. OK GNU C++0x TESTS 112 1875 44134400 2600
26528879 vjudge4 E April 21, 2017, 1:54 a.m. OK GNU C++11 TESTS 112 374 3891200 2600
40990074 ReaLNero1 E July 30, 2018, 11:34 p.m. OK GNU C++11 TESTS 112 404 1843200 2600
35176689 Anson529 E Feb. 12, 2018, 11:53 a.m. OK GNU C++11 TESTS 112 842 86323200 2600
25637293 vjudge4 E March 19, 2017, 6:25 a.m. OK GNU C++11 TESTS 112 902 102912000 2600
61885859 liqing E Oct. 5, 2019, 3:25 a.m. OK GNU C++11 TESTS 112 934 55910400 2600
59210693 Dilute E Aug. 21, 2019, 8:27 a.m. OK GNU C++11 TESTS 112 936 97792000 2600
59210640 Dilute E Aug. 21, 2019, 8:26 a.m. OK GNU C++11 TESTS 112 936 97792000 2600
59197708 lohannes E Aug. 21, 2019, 2:38 a.m. OK GNU C++11 TESTS 112 966 88166400 2600
22360563 likecs E Nov. 20, 2016, 11:03 a.m. OK GNU C++11 TESTS 112 996 192204800 2600
57847398 luogu_bot1 E July 27, 2019, 11:45 a.m. OK GNU C++11 TESTS 112 998 141824000 2600
34352636 ugly2333 E Jan. 20, 2018, 12:33 p.m. OK GNU C++14 TESTS 112 1122 136396800 2600
34184467 Sanja E Jan. 14, 2018, 8:49 p.m. OK GNU C++14 TESTS 112 1214 87552000 2600
34086582 Jori E Jan. 11, 2018, 11:33 a.m. OK GNU C++14 TESTS 112 1278 158208000 2600
34184227 Sanja E Jan. 14, 2018, 8:29 p.m. OK GNU C++14 TESTS 112 1308 87552000 2600
34184081 Sanja E Jan. 14, 2018, 8:16 p.m. OK GNU C++14 TESTS 112 1308 87552000 2600
26034784 khatribiru E March 31, 2017, 8:02 p.m. OK GNU C++14 TESTS 112 1340 118784000 2600
46708329 _Sakits E Dec. 7, 2018, 8:42 a.m. OK GNU C++14 TESTS 112 1372 33587200 2600
47872207 Vax E Jan. 3, 2019, 1:29 p.m. OK GNU C++14 TESTS 112 1372 93696000 2600
23048709 __debug E Dec. 17, 2016, 1:47 p.m. OK GNU C++14 TESTS 112 1372 178176000 2600
41273642 applese E Aug. 6, 2018, 11:59 a.m. OK GNU C++14 TESTS 112 1402 45772800 2600
47189381 Trisolaris E Dec. 18, 2018, 11:25 a.m. OK GNU C++17 TESTS 112 966 39014400 2600
61784117 vjudge3 E Oct. 3, 2019, 2 p.m. OK GNU C++17 TESTS 112 1184 112230400 2600
55924940 idxcalccalc E June 22, 2019, 8:56 a.m. OK GNU C++17 TESTS 112 1216 92979200 2600
57140872 SendThemToHell E July 16, 2019, 10:59 a.m. OK GNU C++17 TESTS 112 1278 79872000 2600
42281311 ybmj E Aug. 30, 2018, 2:20 p.m. OK GNU C++17 TESTS 112 1370 89600000 2600
42235777 2014CAIS01 E Aug. 29, 2018, 9:32 a.m. OK GNU C++17 TESTS 112 1434 89804800 2600
38574631 iloi E May 24, 2018, 1:45 a.m. OK GNU C++17 TESTS 112 1434 96256000 2600
57140768 SendThemToHell E July 16, 2019, 10:56 a.m. OK GNU C++17 TESTS 112 1464 130252800 2600
50150429 luogu_bot4 E Feb. 19, 2019, 7:07 a.m. OK GNU C++17 TESTS 112 1496 91340800 2600
50150204 Fulisike E Feb. 19, 2019, 7 a.m. OK GNU C++17 TESTS 112 1496 91340800 2600
3419720 uwi E March 29, 2013, 3:06 p.m. OK Java 6 TESTS 112 1500 61235200 2600
3666453 hiukim E May 4, 2013, 12:50 a.m. OK Java 6 TESTS 112 2609 167014400 2600
3417957 uwi E March 29, 2013, 6:45 a.m. OK Java 6 TESTS 112 5703 174592000 2600
4265090 todo E Aug. 11, 2013, 9:37 a.m. OK Java 6 TESTS 112 7956 113766400 2600
4265249 todo E Aug. 11, 2013, 10:15 a.m. OK Java 7 TESTS 112 1808 70553600 2600
3392631 Egor E March 23, 2013, 10:11 a.m. OK Java 7 TESTS 112 2421 130560000 2600
11881112 marcose18 E July 1, 2015, 11:25 a.m. OK Java 7 TESTS 112 2868 78745600 2600
11881134 marcose18 E July 1, 2015, 11:27 a.m. OK Java 7 TESTS 112 2994 78745600 2600
47725882 romit17 E Dec. 30, 2018, 2:12 p.m. OK Java 8 TESTS 112 1872 124108800 2600
47725558 romit17 E Dec. 30, 2018, 2:02 p.m. OK Java 8 TESTS 112 3056 124006400 2600
28787502 krijgertje E July 22, 2017, 10:07 p.m. OK MS C++ TESTS 112 998 89907200 2600
28787556 krijgertje E July 22, 2017, 10:13 p.m. OK MS C++ TESTS 112 1028 89907200 2600
28787469 krijgertje E July 22, 2017, 10:02 p.m. OK MS C++ TESTS 112 1246 89702400 2600
3424129 hgame E March 30, 2013, 6:38 p.m. OK MS C++ TESTS 112 1500 38604800 2600
3470261 craybeats E April 3, 2013, 5:53 p.m. OK MS C++ TESTS 112 1531 76185600 2600
3424140 hgame E March 30, 2013, 6:42 p.m. OK MS C++ TESTS 112 1812 38604800 2600
3390546 al13n E March 23, 2013, 9:30 a.m. OK MS C++ TESTS 112 1875 44134400 2600
3424146 hgame E March 30, 2013, 6:44 p.m. OK MS C++ TESTS 112 2078 38604800 2600
3529965 caustique E April 13, 2013, 9:22 p.m. OK MS C++ TESTS 112 2875 92057600 2600
3402850 caustique E March 25, 2013, 8:31 a.m. OK MS C++ TESTS 112 2984 92057600 2600

remove filters

Back to search problems