Codeforces Round 292 (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
515 Codeforces Round 292 (Div. 2) FINISHED False 7200 307632299 Feb. 17, 2015, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7463 ) B Drazil and His Happy Friends PROGRAMMING brute force ds meet-in-the-middle number theory 1400

B'Drazil has many friends. Some of them are happy and some of them are unhappy. Drazil wants to make all his friends become happy. So he invented the following plan. There are n boys and m girls among his friends. Let 's number them from 0 to n xe2 x80 x89- xe2 x80 x891 and 0 to m xe2 x80 x89- xe2 x80 x891 separately. In i-th day, Drazil invites -th boy and -th girl to have dinner together (as Drazil is programmer, i starts from 0). If one of those two people is happy, the other one will also become happy. Otherwise, those two people remain in their states. Once a person becomes happy (or if he/she was happy originally), he stays happy forever. Drazil wants to know whether he can use this plan to make all his friends become happy at some moment. The first line contains two integer n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100). The second line contains integer b (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89b xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n), denoting the number of happy boys among friends of Drazil, and then follow b distinct integers x1, xe2 x80 x89x2, xe2 x80 x89..., xe2 x80 x89xb (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89xi xe2 x80 x89< xe2 x80 x89n), denoting the list of indices of happy boys. The third line conatins integer g (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89g xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m), denoting the number of happy girls among friends of Drazil, and then follow g distinct integers y1, xe2 x80 x89y2, xe2 x80 x89... , xe2 x80 x89yg (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89yj xe2 x80 x89< xe2 x80 x89m), denoting the list of indices of happy girls. It is guaranteed that there is at least one person that is unhappy among his friends. If Drazil can make all his friends become happy by this plan, print "Yes". Otherwise, print "No". By we define the remainder of integer division of i by k. In first sample case: '...

Tutorials

Codeforces Round #292 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
10821520 nikitayusupov B April 22, 2015, 11:23 a.m. OK Delphi TESTS 56 30 2560000 1400
10513038 Frogre B March 29, 2015, 8:23 a.m. OK Delphi TESTS 56 31 102400 1400
10513040 RostVel B March 29, 2015, 8:23 a.m. OK Delphi TESTS 56 31 102400 1400
10821500 nikitayusupov B April 22, 2015, 11:21 a.m. OK Delphi TESTS 56 31 2560000 1400
10821510 nikitayusupov B April 22, 2015, 11:22 a.m. OK Delphi TESTS 56 31 2560000 1400
13011137 ruban B Sept. 15, 2015, 4:36 p.m. OK Delphi TESTS 56 31 8396800 1400
12158751 vjudge2 B July 22, 2015, 6:01 a.m. OK FPC TESTS 56 15 0 1400
12161114 vjudge5 B July 22, 2015, 8:35 a.m. OK FPC TESTS 56 15 0 1400
12160149 vjudge2 B July 22, 2015, 7:31 a.m. OK FPC TESTS 56 15 0 1400
12159490 vjudge1 B July 22, 2015, 6:51 a.m. OK FPC TESTS 56 15 0 1400
12159414 vjudge2 B July 22, 2015, 6:46 a.m. OK FPC TESTS 56 15 0 1400
12159270 vjudge1 B July 22, 2015, 6:36 a.m. OK FPC TESTS 56 15 0 1400
12158983 vjudge1 B July 22, 2015, 6:17 a.m. OK FPC TESTS 56 15 0 1400
12158855 vjudge2 B July 22, 2015, 6:08 a.m. OK FPC TESTS 56 15 102400 1400
35904189 yyhhenry B March 4, 2018, 12:48 a.m. OK FPC TESTS 56 15 1638400 1400
35193481 vjudge1 B Feb. 13, 2018, 8:15 a.m. OK FPC TESTS 56 15 1638400 1400
11771216 malhar1995 B June 26, 2015, 10:41 a.m. OK GNU C TESTS 56 15 0 1400
26987782 Musfiq_Mridha B May 9, 2017, 11:07 p.m. OK GNU C TESTS 56 15 0 1400
19456495 bnuvjudge B July 28, 2016, 7:38 a.m. OK GNU C TESTS 56 15 0 1400
19454890 bnuvjudge B July 28, 2016, 5:44 a.m. OK GNU C TESTS 56 15 0 1400
19453248 bnuvjudge B July 28, 2016, 3:25 a.m. OK GNU C TESTS 56 15 0 1400
15917887 yigezhe B Feb. 9, 2016, 4:26 p.m. OK GNU C TESTS 56 15 0 1400
14871973 Ninja__ B Dec. 19, 2015, 8:04 a.m. OK GNU C TESTS 56 15 0 1400
14858516 372561407 B Dec. 18, 2015, 9:13 a.m. OK GNU C TESTS 56 15 0 1400
12908055 cobusevenx B Sept. 9, 2015, 10:33 a.m. OK GNU C TESTS 56 15 0 1400
12003861 saleh12 B July 11, 2015, 3:53 a.m. OK GNU C TESTS 56 15 0 1400
39589823 vjudge5 B June 24, 2018, 5:01 a.m. OK GNU C++ TESTS 56 15 0 1400
39588448 vjudge3 B June 24, 2018, 3:49 a.m. OK GNU C++ TESTS 56 15 0 1400
39045992 vjudge5 B June 8, 2018, 12:29 p.m. OK GNU C++ TESTS 56 15 0 1400
39045245 vjudge4 B June 8, 2018, 12:01 p.m. OK GNU C++ TESTS 56 15 0 1400
31896779 vjudge4 B Oct. 30, 2017, 2:37 p.m. OK GNU C++ TESTS 56 15 0 1400
31855070 vjudge4 B Oct. 29, 2017, 3:55 a.m. OK GNU C++ TESTS 56 15 0 1400
31854938 vjudge5 B Oct. 29, 2017, 3:43 a.m. OK GNU C++ TESTS 56 15 0 1400
31794758 vjudge1 B Oct. 27, 2017, 12:23 p.m. OK GNU C++ TESTS 56 15 0 1400
29777458 vjudge5 B Aug. 25, 2017, 11:20 a.m. OK GNU C++ TESTS 56 15 0 1400
29777449 idiot777 B Aug. 25, 2017, 11:19 a.m. OK GNU C++ TESTS 56 15 0 1400
18277825 nnnnnox B June 7, 2016, 2:59 a.m. OK GNU C11 TESTS 56 15 2048000 1400
62654937 kaiboy B Oct. 16, 2019, 12:37 a.m. OK GNU C11 TESTS 56 46 0 1400
62654902 kaiboy B Oct. 16, 2019, 12:35 a.m. OK GNU C11 TESTS 56 46 0 1400
62646341 kaiboy B Oct. 15, 2019, 7:40 p.m. OK GNU C11 TESTS 56 109 0 1400
44493903 SaidBenha B Oct. 18, 2018, 3:51 p.m. OK GNU C11 TESTS 56 530 0 1400
29556027 UltimateChoker B Aug. 18, 2017, 2:57 p.m. OK GNU C++11 TESTS 56 15 0 1400
32529222 un_known1 B Nov. 21, 2017, 3:14 p.m. OK GNU C++11 TESTS 56 15 0 1400
32125942 YakinRubaiat B Nov. 7, 2017, 4:51 p.m. OK GNU C++11 TESTS 56 15 0 1400
29716516 MaxZubec B Aug. 23, 2017, 7:58 p.m. OK GNU C++11 TESTS 56 15 0 1400
29639729 average_at_best B Aug. 21, 2017, 9:12 a.m. OK GNU C++11 TESTS 56 15 0 1400
27916088 grandpriest B June 20, 2017, 2:53 a.m. OK GNU C++11 TESTS 56 15 0 1400
27539658 Suleyman.A B June 3, 2017, 8:48 a.m. OK GNU C++11 TESTS 56 15 0 1400
27516181 dakuhosu B June 2, 2017, 5:49 a.m. OK GNU C++11 TESTS 56 15 0 1400
27478768 vjudge1 B June 1, 2017, 6:32 a.m. OK GNU C++11 TESTS 56 15 0 1400
27478729 vjudge3 B June 1, 2017, 6:30 a.m. OK GNU C++11 TESTS 56 15 0 1400
63775759 harshkirat B Oct. 30, 2019, 9:28 a.m. OK GNU C++14 TESTS 56 15 0 1400
32517331 Anti-Light B Nov. 21, 2017, 6:20 a.m. OK GNU C++14 TESTS 56 15 0 1400
32324049 blowin_in_the_wind B Nov. 15, 2017, 4:38 a.m. OK GNU C++14 TESTS 56 15 0 1400
32310302 usernameson B Nov. 14, 2017, 11:55 a.m. OK GNU C++14 TESTS 56 15 0 1400
31925607 ifrag B Oct. 31, 2017, 3:16 p.m. OK GNU C++14 TESTS 56 15 0 1400
32548254 Omnia.Saleh B Nov. 22, 2017, 11:27 a.m. OK GNU C++14 TESTS 56 15 0 1400
32548278 Omnia.Saleh B Nov. 22, 2017, 11:28 a.m. OK GNU C++14 TESTS 56 15 0 1400
32548892 Omnia.Saleh B Nov. 22, 2017, 11:49 a.m. OK GNU C++14 TESTS 56 15 0 1400
32549097 Omnia.Saleh B Nov. 22, 2017, 11:56 a.m. OK GNU C++14 TESTS 56 15 0 1400
52734398 awesid B April 14, 2019, 5:49 a.m. OK GNU C++14 TESTS 56 15 0 1400
39590060 vjudge3 B June 24, 2018, 5:11 a.m. OK GNU C++17 TESTS 56 15 0 1400
35810720 Butskhrikidze B March 1, 2018, 12:06 p.m. OK GNU C++17 TESTS 56 15 1945600 1400
56270663 Himanshu.Ramoliya B June 29, 2019, 11:57 a.m. OK GNU C++17 TESTS 56 30 0 1400
52957381 sgupta98 B April 18, 2019, 2:15 p.m. OK GNU C++17 TESTS 56 30 0 1400
52522451 lerooo B April 9, 2019, 9:33 a.m. OK GNU C++17 TESTS 56 30 0 1400
67682556 mind_changer B Dec. 27, 2019, 7:10 a.m. OK GNU C++17 TESTS 56 30 0 1400
66487273 doctor-strange B Dec. 8, 2019, 7 a.m. OK GNU C++17 TESTS 56 30 0 1400
61912536 xyqkoala B Oct. 5, 2019, 11:17 a.m. OK GNU C++17 TESTS 56 30 0 1400
65675208 HunterZolomon B Nov. 24, 2019, 5:40 p.m. OK GNU C++17 TESTS 56 30 0 1400
58954854 neko_nyaaaaaaaaaaaaaaaaa B Aug. 17, 2019, 12:32 p.m. OK GNU C++17 TESTS 56 30 0 1400
40548464 vjudge5 B July 19, 2018, 1:02 p.m. OK GNU C++17 Diagnostics TESTS 56 1013 1331200 1400
66538901 tnht95 B Dec. 9, 2019, 10:44 a.m. OK Go TESTS 56 31 0 1400
66434872 tnht95 B Dec. 7, 2019, 5:40 a.m. OK Go TESTS 56 46 0 1400
66434731 tnht95 B Dec. 7, 2019, 5:36 a.m. OK Go TESTS 56 46 0 1400
61018073 serhiimazurok B Sept. 21, 2019, 1:52 p.m. OK Go TESTS 56 46 0 1400
11768433 fqw B June 26, 2015, 4:53 a.m. OK Haskell TESTS 56 31 0 1400
20480503 pavel.rosputko B Sept. 9, 2016, 2:45 p.m. OK Haskell TESTS 56 218 52736000 1400
10546255 kraskevich B April 1, 2015, 10:04 p.m. OK Haskell TESTS 56 1060 6348800 1400
69582855 1NVAL1D B Jan. 26, 2020, 6:05 p.m. OK Java 11 TESTS 56 264 0 1400
12231754 velraman B July 26, 2015, 8:35 p.m. OK Java 7 TESTS 56 62 0 1400
13236024 waleedwasfy_96 B Sept. 26, 2015, 12:36 p.m. OK Java 7 TESTS 56 77 0 1400
13297964 anandpatel9998 B Sept. 29, 2015, 1:08 p.m. OK Java 7 TESTS 56 77 0 1400
11931715 Empress B July 5, 2015, 6:49 a.m. OK Java 7 TESTS 56 77 0 1400
11626236 cheezecake B June 17, 2015, 11:12 p.m. OK Java 7 TESTS 56 78 0 1400
11079938 kietchau B May 12, 2015, 3:59 p.m. OK Java 7 TESTS 56 78 0 1400
12389297 Trasier B Aug. 6, 2015, 1:30 p.m. OK Java 7 TESTS 56 78 0 1400
10558210 rohitashva1987 B April 3, 2015, 8:54 a.m. OK Java 7 TESTS 56 78 0 1400
13514755 dpk7jn B Oct. 9, 2015, 5:39 p.m. OK Java 7 TESTS 56 93 0 1400
12427398 abhishek125 B Aug. 9, 2015, 3:10 p.m. OK Java 7 TESTS 56 93 0 1400
15515224 ramil.agger B Jan. 23, 2016, 2 p.m. OK Java 8 TESTS 56 108 0 1400
12492356 Abkreno94 B Aug. 13, 2015, 1:18 p.m. OK Java 8 TESTS 56 108 0 1400
44278951 sanju98 B Oct. 14, 2018, 2:08 a.m. OK Java 8 TESTS 56 109 0 1400
58972926 adeepgarg13 B Aug. 17, 2019, 9:38 p.m. OK Java 8 TESTS 56 109 0 1400
51467300 yaminote B March 19, 2019, 3:01 a.m. OK Java 8 TESTS 56 109 0 1400
16733522 kubusgol B March 15, 2016, 7:39 p.m. OK Java 8 TESTS 56 109 0 1400
11996476 blackhorse21 B July 10, 2015, 10:52 a.m. OK Java 8 TESTS 56 109 0 1400
11503492 akorzun B June 8, 2015, 9:58 p.m. OK Java 8 TESTS 56 109 0 1400
11388589 Nirmit B June 2, 2015, 10:40 a.m. OK Java 8 TESTS 56 109 0 1400
10619900 Suchith_JN B April 7, 2015, 9:48 a.m. OK Java 8 TESTS 56 109 0 1400
10918310 redbell014 B April 28, 2015, 11:43 a.m. OK JavaScript TESTS 56 763 7475200 1400
51166682 nemars B March 11, 2019, 2:33 p.m. OK Mono C# TESTS 56 78 3686400 1400
12562576 karunasagark B Aug. 16, 2015, 2:56 p.m. OK MS C# TESTS 56 46 204800 1400
26730352 Sorryforpartyrocking B April 28, 2017, 4:52 p.m. OK MS C# TESTS 56 46 9011200 1400
11513137 og.kostya B June 9, 2015, 4:44 p.m. OK MS C# TESTS 56 61 204800 1400
16927818 zazak B March 25, 2016, 2:04 p.m. OK MS C# TESTS 56 61 9216000 1400
33195027 coder1243 B Dec. 12, 2017, 7:47 p.m. OK MS C# TESTS 56 61 11776000 1400
11334422 sicon54 B May 28, 2015, 2:34 p.m. OK MS C# TESTS 56 62 2560000 1400
16928649 zazak B March 25, 2016, 2:17 p.m. OK MS C# TESTS 56 62 9113600 1400
17173251 Arcey B April 5, 2016, 2:31 p.m. OK MS C# TESTS 56 62 9318400 1400
28278248 artsin666 B July 4, 2017, 11 a.m. OK MS C# TESTS 56 62 11673600 1400
20429536 Chubcheg B Sept. 7, 2016, 5:55 a.m. OK MS C# TESTS 56 77 2560000 1400
21219735 Hovhannes1417 B Oct. 5, 2016, 6:51 p.m. OK MS C++ TESTS 56 15 0 1400
16726048 ahmed_elsaghear B March 15, 2016, 11:17 a.m. OK MS C++ TESTS 56 15 0 1400
16049400 niu B Feb. 16, 2016, 5:45 a.m. OK MS C++ TESTS 56 15 0 1400
16043695 vjudge5 B Feb. 16, 2016, 1:31 a.m. OK MS C++ TESTS 56 15 0 1400
15590547 Bombo B Jan. 26, 2016, 9:59 a.m. OK MS C++ TESTS 56 15 0 1400
15581691 Bombo B Jan. 25, 2016, 8:03 p.m. OK MS C++ TESTS 56 15 0 1400
15569605 a9z B Jan. 25, 2016, 8:31 a.m. OK MS C++ TESTS 56 15 0 1400
14421169 battamon B Nov. 23, 2015, 3:19 a.m. OK MS C++ TESTS 56 15 0 1400
14292114 shio B Nov. 16, 2015, 2:46 a.m. OK MS C++ TESTS 56 15 0 1400
20625219 Bombo B Sept. 14, 2016, 6:23 p.m. OK MS C++ TESTS 56 15 0 1400
51673441 zuoyoukmap B March 22, 2019, 9:16 a.m. OK MS C++ 2017 TESTS 56 31 0 1400
62567939 CtrlAlt B Oct. 14, 2019, 1:42 p.m. OK MS C++ 2017 TESTS 56 31 0 1400
63277114 so1o B Oct. 24, 2019, 7:18 a.m. OK MS C++ 2017 TESTS 56 31 307200 1400
63277168 Bujhm B Oct. 24, 2019, 7:19 a.m. OK MS C++ 2017 TESTS 56 46 0 1400
13130179 mgh_et B Sept. 21, 2015, 5:04 p.m. OK PHP TESTS 56 31 0 1400
13128805 mgh_et B Sept. 21, 2015, 3:19 p.m. OK PHP TESTS 56 46 0 1400
29330024 sambit25 B Aug. 10, 2017, 3:28 p.m. OK PyPy 2 TESTS 56 62 21913600 1400
11785080 jul.ivkina B June 27, 2015, 1:09 p.m. OK PyPy 2 TESTS 56 93 614400 1400
23229620 Trunks B Dec. 22, 2016, 4:23 p.m. OK PyPy 2 TESTS 56 93 22016000 1400
42007475 Onesh0t B Aug. 23, 2018, 7:39 p.m. OK PyPy 2 TESTS 56 124 204800 1400
18905212 Yash_ B July 5, 2016, 5:39 p.m. OK PyPy 2 TESTS 56 233 13824000 1400
35884991 ______u______ B March 3, 2018, 1:21 p.m. OK PyPy 2 TESTS 56 233 28979200 1400
35884646 ______n______ B March 3, 2018, 1:15 p.m. OK PyPy 2 TESTS 56 233 28979200 1400
35883920 _____k_____ B March 3, 2018, 1:03 p.m. OK PyPy 2 TESTS 56 233 28979200 1400
35883630 _____i_____ B March 3, 2018, 12:57 p.m. OK PyPy 2 TESTS 56 233 28979200 1400
35873251 ______h______ B March 3, 2018, 7:28 a.m. OK PyPy 2 TESTS 56 233 28979200 1400
66090502 lIn_nIl B Dec. 1, 2019, 7:10 a.m. OK PyPy 3 TESTS 56 140 1433600 1400
58965938 koptev B Aug. 17, 2019, 5:47 p.m. OK PyPy 3 TESTS 56 155 0 1400
52931225 qbao_asdasd B April 18, 2019, 2:21 a.m. OK PyPy 3 TESTS 56 155 102400 1400
69940642 shivammishra B Feb. 1, 2020, 6:01 a.m. OK PyPy 3 TESTS 56 155 1433600 1400
69512490 Kamsamewar B Jan. 25, 2020, 10:56 a.m. OK PyPy 3 TESTS 56 202 1331200 1400
13719694 vshek B Oct. 18, 2015, 9:29 p.m. OK Python 2 TESTS 56 62 0 1400
12601387 vjudge5 B Aug. 19, 2015, 10:23 a.m. OK Python 2 TESTS 56 62 0 1400
11705247 clarinet758 B June 22, 2015, 6:03 a.m. OK Python 2 TESTS 56 62 0 1400
11008501 Dremov B May 5, 2015, 7:13 p.m. OK Python 2 TESTS 56 62 0 1400
16407026 exentropy B Feb. 28, 2016, 5:29 p.m. OK Python 2 TESTS 56 62 102400 1400
11112892 ssohn B May 16, 2015, 3:46 a.m. OK Python 2 TESTS 56 62 512000 1400
10659830 LouisCK B April 11, 2015, 5:38 p.m. OK Python 2 TESTS 56 62 512000 1400
10918653 t.janssen52 B April 28, 2015, 12:17 p.m. OK Python 2 TESTS 56 62 4710400 1400
11921479 Unlenin B July 4, 2015, 10:26 a.m. OK Python 2 TESTS 56 78 204800 1400
11197157 mihir.gogate B May 22, 2015, 4 a.m. OK Python 2 TESTS 56 108 614400 1400
12096378 Vasiliy_48 B July 17, 2015, 2:32 p.m. OK Python 3 TESTS 56 61 0 1400
10613556 ving.xia B April 6, 2015, 2:26 p.m. OK Python 3 TESTS 56 62 0 1400
10564169 DoesNotCompute B April 3, 2015, 8:34 p.m. OK Python 3 TESTS 56 62 0 1400
28821643 LegendaryTooth B July 24, 2017, 10:19 a.m. OK Python 3 TESTS 56 62 4608000 1400
30450219 nikhilpipal B Sept. 17, 2017, 9 p.m. OK Python 3 TESTS 56 62 5529600 1400
10839101 torpedo B April 23, 2015, 5:44 p.m. OK Python 3 TESTS 56 77 4710400 1400
20602823 Amores B Sept. 14, 2016, 1:37 a.m. OK Python 3 TESTS 56 78 0 1400
24529617 ecnarag B Feb. 8, 2017, 2:50 p.m. OK Python 3 TESTS 56 78 4608000 1400
39087705 vjudge5 B June 10, 2018, 9:01 a.m. OK Python 3 TESTS 56 93 0 1400
39087700 jugalchanda7 B June 10, 2018, 9 a.m. OK Python 3 TESTS 56 93 0 1400
10548650 kolodoz B April 2, 2015, 7:46 a.m. OK Ruby TESTS 56 77 102400 1400
18587052 pvasilyev B June 18, 2016, 9:09 p.m. OK Scala TESTS 56 280 0 1400

remove filters

Back to search problems