Codeforces Round 321 (Div. 2)

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
580 Codeforces Round 321 (Div. 2) FINISHED False 7200 288883799 Sept. 22, 2015, 4:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 26771 ) B Kefa and Company PROGRAMMING binary search sortings two pointers 1500

B"Kefa wants to celebrate his first big salary by going to restaurant. However, he needs company. Kefa has n friends, each friend will agree to go to the restaurant if Kefa asks. Each friend is characterized by the amount of money he has and the friendship factor in respect to Kefa. The parrot doesn't want any friend to feel poor compared to somebody else in the company (Kefa doesn't count). A friend feels poor if in the company there is someone who has at least d units of money more than he does. Also, Kefa wants the total friendship factor of the members of the company to be maximum. Help him invite an optimal company! The first line of the input contains two space-separated integers, n and d (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105, ) -- the number of Kefa's friends and the minimum difference between the amount of money in order to feel poor, respectively. Next n lines contain the descriptions of Kefa's friends, the (i xe2 x80 x89+ xe2 x80 x891)-th line contains the description of the i-th friend of type mi, si (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89mi, xe2 x80 x89si xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the amount of money and the friendship factor, respectively. Print the maximum total friendship factir that can be reached. In the first sample test the most profitable strategy is to form a company from only the second friend. At all other variants the total degree of friendship will be worse. In the second sample test we can take all the friends."...

Tutorials

Codeforces Round #321 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
54979511 vjudge3 B June 2, 2019, 12:27 p.m. OK Clang++17 Diagnostics TESTS 35 997 1638400 1500
54979948 vjudge5 B June 2, 2019, 12:39 p.m. OK Clang++17 Diagnostics TESTS 35 1200 1843200 1500
54980848 vjudge4 B June 2, 2019, 1:05 p.m. OK Clang++17 Diagnostics TESTS 35 1216 1843200 1500
66185345 igor_kz B Dec. 2, 2019, 2:16 p.m. OK FPC TESTS 35 62 819200 1500
66185227 igor_kz B Dec. 2, 2019, 2:13 p.m. OK FPC TESTS 35 62 819200 1500
67655753 canhtoana2k23 B Dec. 26, 2019, 1:51 p.m. OK FPC TESTS 35 62 921600 1500
66185445 igor_kz B Dec. 2, 2019, 2:18 p.m. OK FPC TESTS 35 62 1024000 1500
66185530 igor_kz B Dec. 2, 2019, 2:20 p.m. OK FPC TESTS 35 62 1638400 1500
66185285 igor_kz B Dec. 2, 2019, 2:14 p.m. OK FPC TESTS 35 77 819200 1500
51663002 pqhieu B March 22, 2019, 4:03 a.m. OK FPC TESTS 35 77 1638400 1500
48875759 PhuongPeu B Jan. 24, 2019, 8:06 a.m. OK FPC TESTS 35 77 1740800 1500
66185962 StEpAn_123 B Dec. 2, 2019, 2:30 p.m. OK FPC TESTS 35 77 1843200 1500
66185498 igor_kz B Dec. 2, 2019, 2:19 p.m. OK FPC TESTS 35 92 1638400 1500
64894082 kaiboy B Nov. 14, 2019, 3:50 p.m. OK GNU C11 TESTS 35 46 1228800 1500
69619094 romarioputra B Jan. 27, 2020, 2:02 p.m. OK GNU C11 TESTS 35 46 1638400 1500
63377091 BugLeave B Oct. 25, 2019, 11:22 a.m. OK GNU C11 TESTS 35 62 1638400 1500
53677487 about B May 2, 2019, 4:50 p.m. OK GNU C11 TESTS 35 62 3072000 1500
63221577 shengzihang B Oct. 23, 2019, 8:02 a.m. OK GNU C++11 TESTS 35 31 819200 1500
50645026 vjudge1 B March 1, 2019, 3:25 p.m. OK GNU C++11 TESTS 35 31 1638400 1500
50644982 lqyzxf B March 1, 2019, 3:24 p.m. OK GNU C++11 TESTS 35 31 1638400 1500
57375418 Kylin_ B July 20, 2019, 12:24 p.m. OK GNU C++11 TESTS 35 31 15872000 1500
62111144 tudor.mocioi B Oct. 8, 2019, 12:13 p.m. OK GNU C++11 TESTS 35 46 614400 1500
51857913 vjudge5 B March 26, 2019, 11:58 a.m. OK GNU C++11 TESTS 35 46 614400 1500
50636374 vjudge3 B March 1, 2019, 11:59 a.m. OK GNU C++11 TESTS 35 46 614400 1500
63221483 shengzihang B Oct. 23, 2019, 8 a.m. OK GNU C++11 TESTS 35 46 819200 1500
68747940 deardeer7 B Jan. 14, 2020, 5:33 a.m. OK GNU C++11 TESTS 35 46 819200 1500
64146916 Jun_Naruse B Nov. 3, 2019, 10:11 a.m. OK GNU C++11 TESTS 35 46 819200 1500
48418069 gfonn B Jan. 15, 2019, 11:36 a.m. OK GNU C++14 TESTS 35 46 819200 1500
51401204 DICS B March 17, 2019, 7:27 a.m. OK GNU C++14 TESTS 35 46 1536000 1500
52751496 threepebbles B April 14, 2019, 2:17 p.m. OK GNU C++14 TESTS 35 46 1638400 1500
65698638 Scut82 B Nov. 25, 2019, 9:39 a.m. OK GNU C++14 TESTS 35 46 2662400 1500
46733631 aboAdnan B Dec. 7, 2018, 6:39 p.m. OK GNU C++14 TESTS 35 61 819200 1500
54997279 Leonardo_Blanger B June 3, 2019, 12:43 a.m. OK GNU C++14 TESTS 35 61 819200 1500
54794509 wmj6 B May 29, 2019, 8:57 a.m. OK GNU C++14 TESTS 35 61 819200 1500
49402319 verzisor B Feb. 3, 2019, 3:23 p.m. OK GNU C++14 TESTS 35 61 819200 1500
57711614 frostbyte2103 B July 25, 2019, 12:19 a.m. OK GNU C++14 TESTS 35 61 1638400 1500
58813116 vjudge4 B Aug. 14, 2019, 11:34 a.m. OK GNU C++14 TESTS 35 61 2457600 1500
54982304 vjudge1 B June 2, 2019, 1:48 p.m. OK GNU C++17 TESTS 35 46 819200 1500
52759412 Obada_sadaqa B April 14, 2019, 7:23 p.m. OK GNU C++17 TESTS 35 46 819200 1500
51140366 green-coder B March 10, 2019, 6:49 p.m. OK GNU C++17 TESTS 35 46 5222400 1500
47843862 OsamaFathy B Jan. 2, 2019, 1:37 p.m. OK GNU C++17 TESTS 35 61 819200 1500
46343511 Egor_Mironenko B Nov. 28, 2018, 5:02 p.m. OK GNU C++17 TESTS 35 61 819200 1500
67673265 melek_zam B Dec. 26, 2019, 10:12 p.m. OK GNU C++17 TESTS 35 61 819200 1500
68910594 voidcs B Jan. 16, 2020, 7:35 a.m. OK GNU C++17 TESTS 35 61 819200 1500
58134418 vjudge4 B Aug. 1, 2019, 3:30 p.m. OK GNU C++17 TESTS 35 61 819200 1500
61349036 vjudge4 B Sept. 27, 2019, 7:01 a.m. OK GNU C++17 TESTS 35 61 1843200 1500
64501608 L-Lawliet B Nov. 8, 2019, 4:35 a.m. OK GNU C++17 TESTS 35 61 80179200 1500
66429177 Maks500 B Dec. 7, 2019, 1:05 a.m. OK Go TESTS 35 77 0 1500
50864820 fayzzz B March 5, 2019, 7:48 p.m. OK Go TESTS 35 187 716800 1500
67119976 OniValKeloni B Dec. 17, 2019, 5:54 p.m. OK Go TESTS 35 202 0 1500
57698434 jmazon B July 24, 2019, 5:09 p.m. OK Haskell TESTS 35 841 54681600 1500
49313488 cribabby B Feb. 1, 2019, 9:10 a.m. OK Java 8 TESTS 35 139 0 1500
64523056 Mann_27__ B Nov. 8, 2019, 12:55 p.m. OK Java 8 TESTS 35 140 0 1500
50252623 atharvat77 B Feb. 20, 2019, 6:02 p.m. OK Java 8 TESTS 35 140 0 1500
46851729 chojh1222 B Dec. 10, 2018, 12:38 p.m. OK Java 8 TESTS 35 140 0 1500
62850514 Azakarka B Oct. 18, 2019, 7:09 a.m. OK Java 8 TESTS 35 155 0 1500
60713908 ajkdrag B Sept. 17, 2019, 9:43 a.m. OK Java 8 TESTS 35 155 0 1500
56369528 Seco_seco B July 1, 2019, 2:31 a.m. OK Java 8 TESTS 35 155 0 1500
50404334 ExplodingFreeze B Feb. 23, 2019, 7:46 p.m. OK Java 8 TESTS 35 155 0 1500
46853241 chojh1222 B Dec. 10, 2018, 1:23 p.m. OK Java 8 TESTS 35 170 0 1500
64742083 offvivek524 B Nov. 12, 2019, 12:19 p.m. OK Java 8 TESTS 35 171 0 1500
62594370 david_varela B Oct. 15, 2019, 12:17 a.m. OK Kotlin TESTS 35 389 1228800 1500
64691425 Zaheed B Nov. 11, 2019, 1:18 p.m. OK Mono C# TESTS 35 124 21606400 1500
51611550 MinProph B March 21, 2019, 10:38 a.m. OK Mono C# TESTS 35 139 21299200 1500
54364465 speed439 B May 19, 2019, 12:46 a.m. OK Mono C# TESTS 35 171 9113600 1500
57274501 nidev B July 18, 2019, 10:17 a.m. OK Mono C# TESTS 35 186 8192000 1500
54975035 vjudge2 B June 2, 2019, 10:23 a.m. OK MS C++ TESTS 35 46 819200 1500
54972838 vjudge3 B June 2, 2019, 9:21 a.m. OK MS C++ TESTS 35 46 819200 1500
54972598 vjudge1 B June 2, 2019, 9:16 a.m. OK MS C++ TESTS 35 46 819200 1500
50637724 vjudge1 B March 1, 2019, 12:32 p.m. OK MS C++ TESTS 35 46 819200 1500
47499904 WhiteVlstln B Dec. 25, 2018, 5:14 p.m. OK MS C++ TESTS 35 46 819200 1500
54982418 vjudge3 B June 2, 2019, 1:52 p.m. OK MS C++ TESTS 35 46 819200 1500
54982003 vjudge5 B June 2, 2019, 1:39 p.m. OK MS C++ TESTS 35 46 819200 1500
55420685 vjudge4 B June 11, 2019, 6:16 a.m. OK MS C++ TESTS 35 46 819200 1500
54982707 vjudge5 B June 2, 2019, 2 p.m. OK MS C++ TESTS 35 46 819200 1500
54979870 vjudge1 B June 2, 2019, 12:37 p.m. OK MS C++ TESTS 35 46 1638400 1500
53976174 zhuiyi B May 11, 2019, 4:13 a.m. OK MS C++ 2017 TESTS 35 77 819200 1500
61830206 vadimz B Oct. 4, 2019, 6:19 a.m. OK MS C++ 2017 TESTS 35 77 13619200 1500
63070131 vjudge2 B Oct. 21, 2019, 12:09 p.m. OK MS C++ 2017 TESTS 35 77 66457600 1500
53849055 F91WoDaGe B May 7, 2019, 12:32 p.m. OK MS C++ 2017 TESTS 35 93 15974400 1500
67176291 YaMi506 B Dec. 18, 2019, 7:25 p.m. OK MS C++ 2017 TESTS 35 171 1638400 1500
49021104 Spiritum B Jan. 26, 2019, 5:33 p.m. OK MS C++ 2017 TESTS 35 186 2764800 1500
65446885 vjudge5 B Nov. 20, 2019, 4:21 p.m. OK MS C++ 2017 TESTS 35 186 4505600 1500
49028565 Still_Theory B Jan. 26, 2019, 8:25 p.m. OK MS C++ 2017 TESTS 35 187 1638400 1500
61217141 bahaaEldeen B Sept. 24, 2019, 1:01 p.m. OK MS C++ 2017 TESTS 35 187 4505600 1500
63080002 HishamDroubi B Oct. 21, 2019, 2:49 p.m. OK MS C++ 2017 TESTS 35 202 819200 1500
55400929 shafwanur010 B June 10, 2019, 2:01 p.m. OK PyPy 2 TESTS 35 514 18432000 1500
59243538 vjudge4 B Aug. 21, 2019, 9:17 p.m. OK PyPy 2 TESTS 35 935 13107200 1500
69382677 beethoven97 B Jan. 22, 2020, 8:22 p.m. OK PyPy 3 TESTS 35 514 27033600 1500
51044460 H4Wk3ye B March 8, 2019, 6:12 p.m. OK PyPy 3 TESTS 35 545 10137600 1500
58251942 bergus B Aug. 4, 2019, 8:16 a.m. OK PyPy 3 TESTS 35 655 19148800 1500
58251884 bergus B Aug. 4, 2019, 8:15 a.m. OK PyPy 3 TESTS 35 670 19353600 1500
69385584 beethoven97 B Jan. 22, 2020, 10:06 p.m. OK PyPy 3 TESTS 35 702 26112000 1500
49132535 satyamcse B Jan. 29, 2019, 5:37 a.m. OK PyPy 3 TESTS 35 810 153497600 1500
59317746 vjudge4 B Aug. 22, 2019, 5:17 p.m. OK PyPy 3 TESTS 35 1044 11366400 1500
59317626 Gabs96 B Aug. 22, 2019, 5:15 p.m. OK PyPy 3 TESTS 35 1060 11264000 1500
62117622 dronev02 B Oct. 8, 2019, 1:47 p.m. OK PyPy 3 TESTS 35 1060 11571200 1500
56639358 scheduler B July 6, 2019, 11:14 p.m. OK PyPy 3 TESTS 35 1060 13312000 1500
53715811 Yans B May 3, 2019, 6:54 p.m. OK Python 2 TESTS 35 498 11059200 1500
61182443 estacio18 B Sept. 23, 2019, 8:24 p.m. OK Python 2 TESTS 35 514 7680000 1500
59335187 vjudge2 B Aug. 23, 2019, 4:12 a.m. OK Python 2 TESTS 35 514 10547200 1500
51620538 vjudge5 B March 21, 2019, 2:08 p.m. OK Python 2 TESTS 35 514 10547200 1500
54979991 vjudge2 B June 2, 2019, 12:40 p.m. OK Python 2 TESTS 35 514 17100800 1500
52025846 vjudge1 B March 30, 2019, 2:52 p.m. OK Python 2 TESTS 35 530 11571200 1500
61182873 estacio18 B Sept. 23, 2019, 8:36 p.m. OK Python 2 TESTS 35 545 7782400 1500
46309238 gax B Nov. 28, 2018, 12:14 p.m. OK Python 2 TESTS 35 545 9728000 1500
59335170 mateusqc B Aug. 23, 2019, 4:11 a.m. OK Python 2 TESTS 35 545 10547200 1500
52025829 antunesdantass B March 30, 2019, 2:52 p.m. OK Python 2 TESTS 35 545 11878400 1500
66285606 slam3085 B Dec. 4, 2019, 7:06 p.m. OK Python 3 TESTS 35 389 8806400 1500
58251087 bergus B Aug. 4, 2019, 7:54 a.m. OK Python 3 TESTS 35 421 11980800 1500
58251139 bergus B Aug. 4, 2019, 7:55 a.m. OK Python 3 TESTS 35 421 14336000 1500
54980008 vjudge5 B June 2, 2019, 12:41 p.m. OK Python 3 TESTS 35 436 14643200 1500
58250020 bergus B Aug. 4, 2019, 7:24 a.m. OK Python 3 TESTS 35 452 14336000 1500
68882043 ibalram B Jan. 15, 2020, 7:14 p.m. OK Python 3 TESTS 35 467 8396800 1500
58251571 bergus B Aug. 4, 2019, 8:07 a.m. OK Python 3 TESTS 35 467 12185600 1500
54228191 k0nst4nt1n B May 16, 2019, 7:30 a.m. OK Python 3 TESTS 35 482 14643200 1500
46900030 Arsanuos B Dec. 11, 2018, 11:28 a.m. OK Python 3 TESTS 35 483 7987200 1500
61550098 vjudge1 B Sept. 30, 2019, 12:08 p.m. OK Python 3 TESTS 35 483 8294400 1500
65797090 melnique B Nov. 27, 2019, 5:27 a.m. OK Rust TESTS 35 61 1536000 1500
59088014 StrausMG B Aug. 19, 2019, 11:45 a.m. OK Rust TESTS 35 61 1638400 1500
65740895 thanks.man B Nov. 26, 2019, 10:08 a.m. OK Rust TESTS 35 62 3788800 1500
56064802 tuna_salad B June 26, 2019, 7:24 a.m. OK Rust TESTS 35 62 4505600 1500

remove filters

Back to search problems