Codeforces Round 275 (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
483 Codeforces Round 275 (Div. 2) FINISHED False 7800 323442004 Oct. 24, 2014, 5 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4112 ) B Friends and Presents PROGRAMMING binary search math 1800

B"You have two friends. You want to present each of them several positive integers. You want to present cnt1 numbers to the first friend and cnt2 numbers to the second friend. Moreover, you want all presented numbers to be distinct, that also means that no number should be presented to both friends. In addition, the first friend does not like the numbers that are divisible without remainder by prime number x. The second one does not like the numbers that are divisible without remainder by prime number y. Of course, you're not going to present your friends numbers they don't like. Your task is to find such minimum number v, that you can form presents using numbers from a set 1, xe2 x80 x892, xe2 x80 x89..., xe2 x80 x89v. Of course you may choose not to present some numbers at all. A positive integer number greater than 1 is called prime if it has no positive divisors other than 1 and itself. The only line contains four positive integers cnt1, cnt2, x, y (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89cnt1, xe2 x80 x89cnt2 xe2 x80 x89< xe2 x80 x89109; cnt1 xe2 x80 x89+ xe2 x80 x89cnt2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109; 2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x xe2 x80 x89< xe2 x80 x89y xe2 x80 x89 xe2 x89 xa4 xe2 x80 x893 xc2 xb7104) -- the numbers that are described in the statement. It is guaranteed that numbers x, y are prime. Print a single integer -- the answer to the problem. In the first sample you give the set of numbers {1, xe2 x80 x893, xe2 x80 x895} to the first friend and the set of numbers {2} to the second friend. Note that if you give set {1, xe2 x80 x893, xe2 x80 x895} to the first friend, then we cannot give any of the numbers 1, 3, 5 to the second friend. In the second sample you give the set of numbers {3} to the first friend, and the set of numbers {1, xe2 x80 x892, xe2 x80 x894} to the second friend. Thus, the answer to the problem is 4."...

Tutorials

Codeforces Round #275 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
27725445 kirill.dragalov B June 11, 2017, 6:11 p.m. OK D TESTS 50 15 0 1800
9300243 cpy B Dec. 29, 2014, 6:05 p.m. OK D TESTS 50 31 0 1800
8543061 ruban B Nov. 4, 2014, 6:11 a.m. OK Delphi TESTS 50 15 0 1800
8436728 AHTuTTuTyX B Oct. 27, 2014, 3:13 p.m. OK Delphi TESTS 50 15 102400 1800
8388052 igor.glushkov B Oct. 24, 2014, 6:11 p.m. OK Delphi TESTS 50 31 102400 1800
8387293 danildudin B Oct. 24, 2014, 6:02 p.m. OK Delphi TESTS 50 31 102400 1800
8388110 RostVel B Oct. 24, 2014, 6:11 p.m. OK Delphi TESTS 50 31 102400 1800
8439164 metalopocalipsis B Oct. 27, 2014, 7:31 p.m. OK Delphi TESTS 50 31 102400 1800
8413118 mc_mosa B Oct. 25, 2014, 3:30 p.m. OK Delphi TESTS 50 62 0 1800
8425206 letung3105 B Oct. 27, 2014, 12:42 a.m. OK FPC TESTS 50 15 0 1800
8425091 thuyhung B Oct. 27, 2014, 12:02 a.m. OK FPC TESTS 50 15 0 1800
27844488 TShT B June 17, 2017, 11:12 a.m. OK FPC TESTS 50 15 0 1800
11402012 igdor99 B June 3, 2015, 1:09 p.m. OK FPC TESTS 50 15 0 1800
11351601 ongvuacon B May 30, 2015, 12:50 a.m. OK FPC TESTS 50 15 0 1800
8530891 notalone94 B Nov. 3, 2014, 4:01 a.m. OK FPC TESTS 50 15 0 1800
8526218 Ecchi_sama B Nov. 2, 2014, 5:41 p.m. OK FPC TESTS 50 15 0 1800
8508318 kihaso B Nov. 1, 2014, 5:22 a.m. OK FPC TESTS 50 15 0 1800
8489441 ReMake B Oct. 30, 2014, 5:17 p.m. OK FPC TESTS 50 15 0 1800
8439107 e2xe5 B Oct. 27, 2014, 7:24 p.m. OK FPC TESTS 50 15 0 1800
20342928 rainboy B Sept. 2, 2016, 2:41 p.m. OK GNU C TESTS 50 15 0 1800
17308848 vj98 B April 14, 2016, 12:25 a.m. OK GNU C TESTS 50 15 0 1800
16546051 vjudge4 B March 6, 2016, 6:32 a.m. OK GNU C TESTS 50 15 0 1800
13972129 step_by_step B Oct. 31, 2015, 2:13 p.m. OK GNU C TESTS 50 15 0 1800
8620424 Seact B Nov. 9, 2014, 6:46 a.m. OK GNU C TESTS 50 15 0 1800
8514604 ss2 B Nov. 1, 2014, 3:23 p.m. OK GNU C TESTS 50 15 0 1800
8479202 angle_qqs B Oct. 30, 2014, 11:15 a.m. OK GNU C TESTS 50 15 0 1800
8416542 heuristic B Oct. 25, 2014, 11:29 p.m. OK GNU C TESTS 50 15 0 1800
8399729 pulkitrohan1 B Oct. 25, 2014, 6:55 a.m. OK GNU C TESTS 50 15 0 1800
8399721 pulkitrohan1 B Oct. 25, 2014, 6:54 a.m. OK GNU C TESTS 50 15 0 1800
31272293 vjudge5 B Oct. 13, 2017, 11:22 a.m. OK GNU C++ TESTS 50 15 0 1800
31271235 vjudge2 B Oct. 13, 2017, 10:29 a.m. OK GNU C++ TESTS 50 15 0 1800
31265868 vjudge2 B Oct. 13, 2017, 5:43 a.m. OK GNU C++ TESTS 50 15 0 1800
31265586 vjudge3 B Oct. 13, 2017, 5:21 a.m. OK GNU C++ TESTS 50 15 0 1800
31265558 vjudge3 B Oct. 13, 2017, 5:19 a.m. OK GNU C++ TESTS 50 15 0 1800
29796061 vjudge1 B Aug. 26, 2017, 3:34 a.m. OK GNU C++ TESTS 50 15 0 1800
29518746 vjudge4 B Aug. 17, 2017, 5:51 a.m. OK GNU C++ TESTS 50 15 0 1800
29518223 zstu_panyunlu B Aug. 17, 2017, 5:12 a.m. OK GNU C++ TESTS 50 15 0 1800
27610857 srinidhibachu B June 6, 2017, 10:25 a.m. OK GNU C++ TESTS 50 15 0 1800
27575896 anandita24 B June 5, 2017, 5:09 a.m. OK GNU C++ TESTS 50 15 0 1800
10160519 miaowu213 B March 5, 2015, 12:22 p.m. OK GNU C++0x TESTS 50 15 0 1800
10305902 jayanto B March 16, 2015, 11:15 p.m. OK GNU C++0x TESTS 50 15 0 1800
10251932 sdcr B March 12, 2015, 9:31 p.m. OK GNU C++0x TESTS 50 15 0 1800
10223642 admtuku B March 10, 2015, 5:32 a.m. OK GNU C++0x TESTS 50 15 0 1800
10129217 xxxyyyzzz B March 3, 2015, 7:14 a.m. OK GNU C++0x TESTS 50 15 0 1800
10097802 illarionovam_onu B March 1, 2015, 3:15 p.m. OK GNU C++0x TESTS 50 15 0 1800
9919629 StretfordEnd B Feb. 18, 2015, 8:32 p.m. OK GNU C++0x TESTS 50 15 0 1800
9825142 kamlesh_cf B Feb. 14, 2015, 11:21 a.m. OK GNU C++0x TESTS 50 15 0 1800
9794968 NgocHai B Feb. 11, 2015, 4:24 a.m. OK GNU C++0x TESTS 50 15 0 1800
9390298 SaDDaS B Jan. 9, 2015, 7:14 a.m. OK GNU C++0x TESTS 50 15 0 1800
57302649 vjudge5 B July 19, 2019, 1:24 a.m. OK GNU C11 TESTS 50 31 0 1800
68836921 vjudge5 B Jan. 15, 2020, 3:45 a.m. OK GNU C11 TESTS 50 31 0 1800
68837301 vjudge3 B Jan. 15, 2020, 3:59 a.m. OK GNU C11 TESTS 50 31 0 1800
31231288 maratonando B Oct. 12, 2017, 3:14 a.m. OK GNU C++11 TESTS 50 15 0 1800
39290121 wizard24 B June 16, 2018, 2:49 p.m. OK GNU C++11 TESTS 50 15 0 1800
31231281 GabrielPessoa B Oct. 12, 2017, 3:13 a.m. OK GNU C++11 TESTS 50 15 0 1800
31231152 maratonando3 B Oct. 12, 2017, 2:56 a.m. OK GNU C++11 TESTS 50 15 0 1800
31879008 maratonando3 B Oct. 30, 2017, 12:17 a.m. OK GNU C++11 TESTS 50 15 0 1800
31879002 rafaelmachado23 B Oct. 30, 2017, 12:15 a.m. OK GNU C++11 TESTS 50 15 0 1800
31775015 maratonando2 B Oct. 26, 2017, 11:22 p.m. OK GNU C++11 TESTS 50 15 0 1800
31818816 Lfp2 B Oct. 27, 2017, 8:27 p.m. OK GNU C++11 TESTS 50 15 0 1800
31287176 maratonando B Oct. 14, 2017, 1:42 a.m. OK GNU C++11 TESTS 50 15 0 1800
31254323 maratonando2 B Oct. 12, 2017, 4:10 p.m. OK GNU C++11 TESTS 50 15 0 1800
31790817 dexter04 B Oct. 27, 2017, 10 a.m. OK GNU C++14 TESTS 50 15 0 1800
42213311 jagat777 B Aug. 28, 2018, 3:37 p.m. OK GNU C++14 TESTS 50 15 0 1800
41439690 Zz7 B Aug. 10, 2018, 5:25 p.m. OK GNU C++14 TESTS 50 15 0 1800
40448036 Mohammed_Abdallah B July 16, 2018, 5:13 p.m. OK GNU C++14 TESTS 50 15 0 1800
32495387 realcomplex B Nov. 20, 2017, 10:02 a.m. OK GNU C++14 TESTS 50 15 0 1800
32199245 I_love_chickpea B Nov. 10, 2017, 3:37 p.m. OK GNU C++14 TESTS 50 15 0 1800
31982856 zapcoder B Nov. 2, 2017, 2:14 p.m. OK GNU C++14 TESTS 50 15 0 1800
31951325 sjardhee B Nov. 1, 2017, 1:24 p.m. OK GNU C++14 TESTS 50 15 0 1800
31231144 ffern B Oct. 12, 2017, 2:55 a.m. OK GNU C++14 TESTS 50 15 0 1800
30806853 MuKassab B Sept. 28, 2017, 1:56 p.m. OK GNU C++14 TESTS 50 15 0 1800
40411145 PEDY4000 B July 16, 2018, 12:30 p.m. OK GNU C++17 TESTS 50 15 0 1800
60168513 System.in.me B Sept. 6, 2019, 11:59 a.m. OK GNU C++17 TESTS 50 15 0 1800
64642099 abdu.srazh B Nov. 10, 2019, 1:34 p.m. OK GNU C++17 TESTS 50 15 0 1800
67967093 gamegame B Dec. 30, 2019, 1:43 p.m. OK GNU C++17 TESTS 50 15 0 1800
37745953 SoGood B April 30, 2018, 10:37 a.m. OK GNU C++17 TESTS 50 15 3481600 1800
61397376 ruo B Sept. 28, 2019, 3:10 a.m. OK GNU C++17 TESTS 50 30 0 1800
69293272 vjudge1 B Jan. 22, 2020, 11:12 a.m. OK GNU C++17 TESTS 50 30 0 1800
67968586 AMIT9019 B Dec. 30, 2019, 2:11 p.m. OK GNU C++17 TESTS 50 30 0 1800
64613357 kesp B Nov. 10, 2019, 3:11 a.m. OK GNU C++17 TESTS 50 30 0 1800
61894873 WaleedEhab_ChelseaFC B Oct. 5, 2019, 6:57 a.m. OK GNU C++17 TESTS 50 30 0 1800
8398457 Eeyore B Oct. 25, 2014, 6:04 a.m. OK Go TESTS 50 15 0 1800
68075226 sunnycarlos B Jan. 2, 2020, 12:13 p.m. OK Java 11 TESTS 50 171 0 1800
8420100 marcose18 B Oct. 26, 2014, 12:27 p.m. OK Java 6 TESTS 50 77 0 1800
9304426 abababab B Dec. 30, 2014, 10:26 a.m. OK Java 6 TESTS 50 77 0 1800
8516785 nkyrt B Nov. 1, 2014, 6:42 p.m. OK Java 6 TESTS 50 77 0 1800
8386815 PrakharJain B Oct. 24, 2014, 5:57 p.m. OK Java 6 TESTS 50 77 0 1800
9541885 yfo B Jan. 24, 2015, 7:48 p.m. OK Java 6 TESTS 50 78 0 1800
8428734 islam-al-aarag B Oct. 27, 2014, 10:59 a.m. OK Java 6 TESTS 50 78 0 1800
9017202 iwantac B Dec. 8, 2014, 10:47 a.m. OK Java 6 TESTS 50 93 0 1800
8543070 iwantac B Nov. 4, 2014, 6:13 a.m. OK Java 6 TESTS 50 93 0 1800
8389420 vitruvius B Oct. 24, 2014, 6:26 p.m. OK Java 6 TESTS 50 93 0 1800
8386073 bufferedreader B Oct. 24, 2014, 5:49 p.m. OK Java 6 TESTS 50 93 0 1800
8492575 joney_000 B Oct. 30, 2014, 11:49 p.m. OK Java 7 TESTS 50 62 0 1800
8446669 N0D1R B Oct. 28, 2014, 6:42 a.m. OK Java 7 TESTS 50 62 0 1800
8427066 Betlista B Oct. 27, 2014, 7:24 a.m. OK Java 7 TESTS 50 62 0 1800
8397198 dwoolley3 B Oct. 25, 2014, 2:40 a.m. OK Java 7 TESTS 50 62 0 1800
8397018 AkshajK B Oct. 25, 2014, 2:14 a.m. OK Java 7 TESTS 50 62 0 1800
12014829 vjudge1 B July 12, 2015, 3:57 a.m. OK Java 7 TESTS 50 77 0 1800
10749052 amanchik B April 17, 2015, 8:31 a.m. OK Java 7 TESTS 50 77 0 1800
10727042 JPaulsen B April 15, 2015, 6:18 a.m. OK Java 7 TESTS 50 77 0 1800
10652964 sking32 B April 10, 2015, 9:09 p.m. OK Java 7 TESTS 50 77 0 1800
10652416 Phuepe B April 10, 2015, 7:54 p.m. OK Java 7 TESTS 50 77 0 1800
10527456 ralonso B March 30, 2015, 6:06 p.m. OK Java 8 TESTS 50 108 0 1800
54712861 ZeyadKhattab B May 27, 2019, 11:31 a.m. OK Java 8 TESTS 50 109 0 1800
46039534 _Sergey_ B Nov. 21, 2018, 6:33 p.m. OK Java 8 TESTS 50 109 0 1800
31932607 parth_15 B Oct. 31, 2017, 7:55 p.m. OK Java 8 TESTS 50 109 0 1800
30263316 JayVeer B Sept. 11, 2017, 10:09 a.m. OK Java 8 TESTS 50 109 0 1800
27671763 psylord B June 8, 2017, 12:59 p.m. OK Java 8 TESTS 50 109 0 1800
27273798 Ajudiya_13 B May 21, 2017, 9:08 p.m. OK Java 8 TESTS 50 109 0 1800
26997292 rishabh16196 B May 10, 2017, 1:40 p.m. OK Java 8 TESTS 50 109 0 1800
19359201 arrrhh B July 23, 2016, 7:44 a.m. OK Java 8 TESTS 50 109 0 1800
19062141 Hazemzz B July 13, 2016, 4:27 a.m. OK Java 8 TESTS 50 109 0 1800
19082600 dzeranov1995 B July 13, 2016, 4:32 p.m. OK MS C# TESTS 50 46 102400 1800
8535806 MingFei B Nov. 3, 2014, 1:06 p.m. OK MS C# TESTS 50 46 102400 1800
8474379 RealAikido B Oct. 29, 2014, 9:40 p.m. OK MS C# TESTS 50 46 102400 1800
8398202 og.kostya B Oct. 25, 2014, 5:31 a.m. OK MS C# TESTS 50 46 204800 1800
22176531 liuxueyang B Nov. 12, 2016, 11:08 a.m. OK MS C# TESTS 50 62 0 1800
8398041 azukun B Oct. 25, 2014, 5:07 a.m. OK MS C# TESTS 50 62 512000 1800
8466817 camypaper B Oct. 29, 2014, 8:24 a.m. OK MS C# TESTS 50 62 2048000 1800
9354703 EasyRider B Jan. 3, 2015, 5:24 p.m. OK MS C# TESTS 50 77 102400 1800
8393670 dev8546 B Oct. 24, 2014, 7:35 p.m. OK MS C# TESTS 50 93 2252800 1800
17301846 ILoveBfsDfs B April 13, 2016, 12:35 p.m. OK MS C++ TESTS 50 15 0 1800
17301609 ILoveBfsDfs B April 13, 2016, noon OK MS C++ TESTS 50 15 0 1800
15549547 xieofxie B Jan. 24, 2016, 7:33 a.m. OK MS C++ TESTS 50 15 0 1800
14494190 AbcFly B Nov. 26, 2015, 2:31 p.m. OK MS C++ TESTS 50 15 0 1800
14122600 vsanjay_nitdgp B Nov. 7, 2015, 11:13 a.m. OK MS C++ TESTS 50 15 0 1800
12215098 goodhope B July 24, 2015, 1:59 p.m. OK MS C++ TESTS 50 15 0 1800
12032243 a9z B July 13, 2015, 6:03 p.m. OK MS C++ TESTS 50 15 0 1800
12002823 BRAD_BIT B July 11, 2015, 12:35 a.m. OK MS C++ TESTS 50 15 0 1800
12002756 Red_Roses B July 11, 2015, 12:20 a.m. OK MS C++ TESTS 50 15 0 1800
11758746 Maks_DP B June 25, 2015, 10:15 a.m. OK MS C++ TESTS 50 15 0 1800
69170834 vjudge4 B Jan. 20, 2020, 6:06 a.m. OK MS C++ 2017 TESTS 50 31 0 1800
57712330 vjudge4 B July 25, 2019, 12:54 a.m. OK MS C++ 2017 TESTS 50 31 0 1800
14211268 mahmud2690 B Nov. 12, 2015, 10:14 a.m. OK Perl TESTS 50 31 0 1800
35875190 ______u______ B March 3, 2018, 8:09 a.m. OK PyPy 2 TESTS 50 77 21401600 1800
35875084 ______n______ B March 3, 2018, 8:08 a.m. OK PyPy 2 TESTS 50 77 21401600 1800
35874479 _____k_____ B March 3, 2018, 7:51 a.m. OK PyPy 2 TESTS 50 77 21401600 1800
35874302 _____i_____ B March 3, 2018, 7:47 a.m. OK PyPy 2 TESTS 50 77 21401600 1800
35870979 ______h______ B March 3, 2018, 6:40 a.m. OK PyPy 2 TESTS 50 77 21401600 1800
35870968 ______k______ B March 3, 2018, 6:40 a.m. OK PyPy 2 TESTS 50 77 21401600 1800
35870214 ______i______ B March 3, 2018, 6:22 a.m. OK PyPy 2 TESTS 50 77 21401600 1800
35863154 ______M______ B March 2, 2018, 10:40 p.m. OK PyPy 2 TESTS 50 77 21401600 1800
23795056 masonsbro B Jan. 13, 2017, 11:35 p.m. OK PyPy 2 TESTS 50 124 22016000 1800
28160904 Yash_ B June 30, 2017, 1:19 a.m. OK PyPy 2 TESTS 50 155 21913600 1800
11139898 minimario B May 19, 2015, 2:30 a.m. OK PyPy 3 TESTS 50 108 0 1800
55688845 shiv1470 B June 17, 2019, 4:57 p.m. OK PyPy 3 TESTS 50 140 0 1800
49516463 PavelChadnov B Feb. 6, 2019, 3:30 a.m. OK PyPy 3 TESTS 50 140 0 1800
45033788 homoeconomicus B Oct. 29, 2018, 6:22 a.m. OK PyPy 3 TESTS 50 140 0 1800
15915348 not_bot_but_POT B Feb. 9, 2016, 2:04 p.m. OK Python 2 TESTS 50 46 0 1800
8522070 nkyrt B Nov. 2, 2014, 10:48 a.m. OK Python 2 TESTS 50 46 0 1800
8513792 Hepic_Antony_Skarlatos B Nov. 1, 2014, 2:31 p.m. OK Python 2 TESTS 50 46 0 1800
8425257 m7mdbadawy B Oct. 27, 2014, 12:59 a.m. OK Python 2 TESTS 50 46 0 1800
8398575 billionprince B Oct. 25, 2014, 6:19 a.m. OK Python 2 TESTS 50 46 0 1800
8396927 sweetalgorithm B Oct. 25, 2014, 1:58 a.m. OK Python 2 TESTS 50 46 0 1800
11074586 wdk B May 12, 2015, 3:07 a.m. OK Python 2 TESTS 50 62 0 1800
8865403 turbofsi B Nov. 27, 2014, 2:34 a.m. OK Python 2 TESTS 50 62 0 1800
8829239 grrdmatching B Nov. 23, 2014, 9:35 p.m. OK Python 2 TESTS 50 62 0 1800
8763043 Hepic_Antony_Skarlatos B Nov. 20, 2014, 10:45 a.m. OK Python 2 TESTS 50 62 0 1800
8437972 tomlau B Oct. 27, 2014, 5:17 p.m. OK Python 3 TESTS 50 61 0 1800
18823592 orailly B June 30, 2016, 12:34 p.m. OK Python 3 TESTS 50 62 0 1800
9702858 xorek222 B Feb. 3, 2015, 3:14 p.m. OK Python 3 TESTS 50 62 0 1800
8554001 harihara_panigrahy B Nov. 5, 2014, 5:16 a.m. OK Python 3 TESTS 50 62 0 1800
8510763 kuludrew B Nov. 1, 2014, 10:46 a.m. OK Python 3 TESTS 50 62 0 1800
8496383 Levantiy B Oct. 31, 2014, 11 a.m. OK Python 3 TESTS 50 62 0 1800
8470765 nav_krh B Oct. 29, 2014, 3:24 p.m. OK Python 3 TESTS 50 62 0 1800
8467493 nijikilling B Oct. 29, 2014, 10:01 a.m. OK Python 3 TESTS 50 62 0 1800
8418306 hatsuyuki15 B Oct. 26, 2014, 9:14 a.m. OK Python 3 TESTS 50 62 0 1800
8397663 f1u77y B Oct. 25, 2014, 3:56 a.m. OK Python 3 TESTS 50 62 0 1800
8383514 scanhex B Oct. 24, 2014, 5:26 p.m. OK Ruby TESTS 50 62 102400 1800
25480976 tkain B March 14, 2017, 3:52 p.m. OK Ruby TESTS 50 93 6451200 1800

remove filters

Back to search problems