Codeforces Round 361 (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
689 Codeforces Round 361 (Div. 2) FINISHED False 7200 269789104 July 6, 2016, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5298 ) A Mike and Cellphone PROGRAMMING brute force constructive algorithms implementation 1400

B'While swimming at the beach, Mike has accidentally dropped his cellphone into the water. There was no worry as he bought a cheap replacement phone with an old-fashioned keyboard. The keyboard has only ten digital equal-sized keys, located in the following way: Together with his old phone, he lost all his contacts and now he can only remember the way his fingers moved when he put some number in. One can formally consider finger movements as a sequence of vectors connecting centers of keys pressed consecutively to put in a number. For example, the finger movements for number "586" are the same as finger movements for number "253": Mike has already put in a number by his "finger memory" and started calling it, so he is now worrying, can he be sure that he is calling the correct number? In other words, is there any other number, that has the same finger movements? The first line of the input contains the only integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x899) -- the number of digits in the phone number that Mike put in. The second line contains the string consisting of n digits (characters from '0 ' to '9 ') representing the number that Mike put in. If there is no other phone number with the same finger movements and Mike can be sure he is calling the correct number, print "YES" (without quotes) in the only line. Otherwise print "NO" (without quotes) in the first line. You can find the picture clarifying the first sample case in the statement above. '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
53010458 dani97 A April 19, 2019, 11:52 a.m. OK Clang++17 Diagnostics TESTS 94 46 0 1400
18928090 yosupo A July 6, 2016, 5:26 p.m. OK D TESTS 93 15 0 1400
18934491 Kaktus23 A July 6, 2016, 6:28 p.m. OK Delphi TESTS 93 31 0 1400
19388421 BaL1337 A July 24, 2016, 6:12 p.m. OK Delphi TESTS 94 31 0 1400
18974477 open A July 8, 2016, 6:40 p.m. OK Delphi TESTS 94 31 102400 1400
18936610 ruban A July 6, 2016, 7:18 p.m. OK Delphi TESTS 93 31 34406400 1400
19030970 Aglophotis A July 11, 2016, 1:18 p.m. OK FPC TESTS 94 15 0 1400
19164385 i69.NHNguyen A July 16, 2016, 2:40 a.m. OK FPC TESTS 94 15 0 1400
19156141 LossABike A July 15, 2016, 2:58 p.m. OK FPC TESTS 94 15 0 1400
19002631 lerom A July 10, 2016, 9:20 a.m. OK FPC TESTS 94 15 0 1400
18982796 Kael007 A July 9, 2016, 9:25 a.m. OK FPC TESTS 94 15 0 1400
18942089 MintGreen A July 7, 2016, 3:28 a.m. OK FPC TESTS 93 15 0 1400
18940353 Ghost_cqh A July 7, 2016, 1:11 a.m. OK FPC TESTS 93 15 0 1400
18936539 ice_tea A July 6, 2016, 7:15 p.m. OK FPC TESTS 93 15 0 1400
18932055 nhnguyen_vietnam A July 6, 2016, 6:03 p.m. OK FPC TESTS 93 15 0 1400
19404480 WalkingDeade A July 25, 2016, 1:26 p.m. OK FPC TESTS 94 15 0 1400
21880064 flying_turtle A Oct. 29, 2016, 6:49 p.m. OK GNU C TESTS 94 15 0 1400
22823317 PratikMandlecha A Dec. 8, 2016, 11:49 p.m. OK GNU C TESTS 94 15 0 1400
18976963 invisP A July 9, 2016, 12:13 a.m. OK GNU C TESTS 94 15 0 1400
18956313 double301 A July 7, 2016, 6:10 p.m. OK GNU C TESTS 94 15 0 1400
18955473 gogateiiit A July 7, 2016, 5:06 p.m. OK GNU C TESTS 94 15 0 1400
18946439 reyad A July 7, 2016, 8:10 a.m. OK GNU C TESTS 93 15 0 1400
18937437 vakan A July 6, 2016, 7:52 p.m. OK GNU C TESTS 93 15 0 1400
18936697 Kausam_1234 A July 6, 2016, 7:20 p.m. OK GNU C TESTS 93 15 0 1400
18936499 kallolroy A July 6, 2016, 7:15 p.m. OK GNU C TESTS 93 15 0 1400
18932972 zeosutt A July 6, 2016, 6:12 p.m. OK GNU C TESTS 93 15 0 1400
32423505 vjudge2 A Nov. 18, 2017, 7:30 a.m. OK GNU C++ TESTS 94 15 0 1400
39025300 vjudge5 A June 7, 2018, 3:10 p.m. OK GNU C++ TESTS 94 15 0 1400
32353239 vjudge2 A Nov. 16, 2017, 11:20 a.m. OK GNU C++ TESTS 94 15 0 1400
32353158 vjudge1 A Nov. 16, 2017, 11:15 a.m. OK GNU C++ TESTS 94 15 0 1400
32353056 vjudge5 A Nov. 16, 2017, 11:11 a.m. OK GNU C++ TESTS 94 15 0 1400
30633074 vjudge3 A Sept. 23, 2017, 6:19 a.m. OK GNU C++ TESTS 94 15 0 1400
27906521 vjudge3 A June 19, 2017, 2:16 p.m. OK GNU C++ TESTS 94 15 0 1400
32193783 vjudge1 A Nov. 10, 2017, 11:38 a.m. OK GNU C++ TESTS 94 15 0 1400
32190591 vjudge4 A Nov. 10, 2017, 9:48 a.m. OK GNU C++ TESTS 94 15 0 1400
30686536 arvind_ A Sept. 24, 2017, 5:06 p.m. OK GNU C++ TESTS 94 15 0 1400
63247528 kaiboy A Oct. 23, 2019, 3:04 p.m. OK GNU C11 TESTS 94 31 0 1400
27217523 neruest A May 19, 2017, 3:28 p.m. OK GNU C11 TESTS 94 31 0 1400
27206803 miseri A May 19, 2017, 2:55 a.m. OK GNU C++11 TESTS 94 15 0 1400
32354190 vjudge1 A Nov. 16, 2017, 12:03 p.m. OK GNU C++11 TESTS 94 15 0 1400
32353155 vjudge2 A Nov. 16, 2017, 11:15 a.m. OK GNU C++11 TESTS 94 15 0 1400
31734102 ArthurD A Oct. 26, 2017, 9:48 a.m. OK GNU C++11 TESTS 94 15 0 1400
31196122 Venio A Oct. 10, 2017, 3:47 p.m. OK GNU C++11 TESTS 94 15 0 1400
29939646 legendary A Aug. 31, 2017, 10:07 a.m. OK GNU C++11 TESTS 94 15 0 1400
29602937 ahs95 A Aug. 19, 2017, 3:58 p.m. OK GNU C++11 TESTS 94 15 0 1400
27833202 dmh1528 A June 16, 2017, 8:48 p.m. OK GNU C++11 TESTS 94 15 0 1400
27457777 Umi A May 31, 2017, 1:42 a.m. OK GNU C++11 TESTS 94 15 0 1400
27199812 Cynthia19971225 A May 18, 2017, 3:33 p.m. OK GNU C++11 TESTS 94 15 0 1400
31834075 vjudge2 A Oct. 28, 2017, 11:32 a.m. OK GNU C++14 TESTS 94 15 0 1400
31697172 -wolfie- A Oct. 25, 2017, 2:34 a.m. OK GNU C++14 TESTS 94 15 0 1400
30938843 Curtain A Oct. 2, 2017, 9:39 a.m. OK GNU C++14 TESTS 94 15 0 1400
30833515 arru A Sept. 29, 2017, 3:15 p.m. OK GNU C++14 TESTS 94 15 0 1400
30732150 coder_atulit_2017 A Sept. 25, 2017, 4:05 p.m. OK GNU C++14 TESTS 94 15 0 1400
29824493 satylogin A Aug. 27, 2017, 10:50 a.m. OK GNU C++14 TESTS 94 15 0 1400
29685672 Akatsuki_ A Aug. 22, 2017, 2:38 p.m. OK GNU C++14 TESTS 94 15 0 1400
29541920 Big_black_jujube A Aug. 18, 2017, 2:38 a.m. OK GNU C++14 TESTS 94 15 0 1400
31982199 anujdhawan7 aakashag1996 tkg97 A Nov. 2, 2017, 1:53 p.m. OK GNU C++14 TESTS 94 15 0 1400
32150802 quotitquot A Nov. 9, 2017, 4:11 a.m. OK GNU C++14 TESTS 94 15 0 1400
35872302 vjudge5 A March 3, 2018, 7:09 a.m. OK GNU C++17 TESTS 94 15 1945600 1400
35570891 kukyo A Feb. 22, 2018, 11 a.m. OK GNU C++17 TESTS 94 15 1945600 1400
35966548 vjudge2 A March 5, 2018, 1:20 p.m. OK GNU C++17 TESTS 94 15 2048000 1400
42264153 Su_Y A Aug. 30, 2018, 6:04 a.m. OK GNU C++17 TESTS 94 30 0 1400
51802851 AK. A March 24, 2019, 7:07 p.m. OK GNU C++17 TESTS 94 30 0 1400
35875852 vjudge5 A March 3, 2018, 8:40 a.m. OK GNU C++17 TESTS 94 30 2048000 1400
69067635 avisharma A Jan. 18, 2020, 7:26 p.m. OK GNU C++17 TESTS 94 31 0 1400
69062029 ivan100sic A Jan. 18, 2020, 4:56 p.m. OK GNU C++17 TESTS 94 31 0 1400
69791778 suraj_gupta842683866 A Jan. 29, 2020, 6:44 p.m. OK GNU C++17 TESTS 94 31 0 1400
69868193 aki167yuuki A Jan. 30, 2020, 9:37 p.m. OK GNU C++17 TESTS 94 31 0 1400
36011724 cgtllp1 A March 6, 2018, 3:57 p.m. OK GNU C++17 Diagnostics TESTS 94 951 99328000 1400
19160172 gooo A July 15, 2016, 6:52 p.m. OK Go TESTS 94 15 307200 1400
18931271 robostac A July 6, 2016, 5:55 p.m. OK Go TESTS 93 31 102400 1400
18930992 shadowknight A July 6, 2016, 5:52 p.m. OK Haskell TESTS 93 15 8499200 1400
31518580 daniboybye A Oct. 19, 2017, 8:44 p.m. OK Haskell TESTS 94 15 53350400 1400
18973894 asdacap A July 8, 2016, 5:43 p.m. OK Haskell TESTS 94 30 0 1400
31518596 daniboybye A Oct. 19, 2017, 8:46 p.m. OK Haskell TESTS 94 30 53248000 1400
19035598 jrc1215 A July 11, 2016, 6:50 p.m. OK Haskell TESTS 94 31 8396800 1400
18929223 torus711 A July 6, 2016, 5:36 p.m. OK Haskell TESTS 93 31 8396800 1400
69890292 pranavmenon0810 A Jan. 31, 2020, 9:45 a.m. OK Java 11 TESTS 94 171 0 1400
18923709 aladdin3 A July 6, 2016, 4:56 p.m. OK Java 7 TESTS 93 108 0 1400
18926482 Parikh A July 6, 2016, 5:14 p.m. OK Java 7 TESTS 93 109 0 1400
19613195 sevimlikedicik A Aug. 4, 2016, 10:22 a.m. OK Java 7 TESTS 94 109 0 1400
19589510 deepraiya17 A Aug. 3, 2016, 1:59 a.m. OK Java 7 TESTS 94 109 0 1400
19553540 lehar A Aug. 1, 2016, 7:32 a.m. OK Java 7 TESTS 94 109 0 1400
19040587 Success A July 12, 2016, 3:34 a.m. OK Java 7 TESTS 94 109 0 1400
18979350 Mohannad A July 9, 2016, 4:28 a.m. OK Java 7 TESTS 94 109 0 1400
18972787 maldonadokevin11 A July 8, 2016, 4:07 p.m. OK Java 7 TESTS 94 109 0 1400
18927302 finalfix A July 6, 2016, 5:21 p.m. OK Java 7 TESTS 93 109 0 1400
18926190 MazzForces A July 6, 2016, 5:13 p.m. OK Java 7 TESTS 93 109 0 1400
57558452 youssefhafez A July 22, 2019, 9:38 p.m. OK Java 8 TESTS 94 109 0 1400
59435925 Shetaya A Aug. 25, 2019, 8:47 a.m. OK Java 8 TESTS 94 109 0 1400
58141162 nadaabdo588 A Aug. 1, 2019, 6:14 p.m. OK Java 8 TESTS 94 109 0 1400
57903541 JrElaraby A July 28, 2019, 4:40 p.m. OK Java 8 TESTS 94 109 0 1400
56819547 MahmoudJobeel A July 10, 2019, 10:09 p.m. OK Java 8 TESTS 94 109 0 1400
56793295 Mostafax10 A July 10, 2019, 11:30 a.m. OK Java 8 TESTS 94 109 0 1400
56793022 Mostafax10 A July 10, 2019, 11:23 a.m. OK Java 8 TESTS 94 109 0 1400
48068075 Harbin A Jan. 7, 2019, 7:31 p.m. OK Java 8 TESTS 94 109 0 1400
45693359 ali92809 A Nov. 13, 2018, 10:46 p.m. OK Java 8 TESTS 94 109 0 1400
27328929 Minaa A May 25, 2017, 3:56 a.m. OK Java 8 TESTS 94 109 0 1400
49167545 TRR A Jan. 29, 2019, 4:59 p.m. OK Mono C# TESTS 94 46 0 1400
51465362 fastnoise A March 19, 2019, 12:39 a.m. OK Mono C# TESTS 94 61 0 1400
51912150 nemars A March 27, 2019, 6:47 p.m. OK Mono C# TESTS 94 108 4096000 1400
21997284 og.kostya A Nov. 2, 2016, 4:43 p.m. OK MS C# TESTS 94 46 102400 1400
18967706 lightseller A July 8, 2016, 10:49 a.m. OK MS C# TESTS 94 46 102400 1400
19220884 d_smorodinnikov A July 18, 2016, 11:22 p.m. OK MS C# TESTS 94 46 204800 1400
23616170 m1_k3 A Jan. 7, 2017, 3:57 a.m. OK MS C# TESTS 94 61 9113600 1400
18930778 Goron97 A July 6, 2016, 5:50 p.m. OK MS C# TESTS 93 62 102400 1400
18967434 yu3mars A July 8, 2016, 10:31 a.m. OK MS C# TESTS 94 62 102400 1400
19028061 vitoshacademy A July 11, 2016, 10:52 a.m. OK MS C# TESTS 94 62 204800 1400
30246016 InstouT94 A Sept. 10, 2017, 1:19 p.m. OK MS C# TESTS 94 62 2457600 1400
22400731 pomjuice A Nov. 22, 2016, 10:24 a.m. OK MS C# TESTS 94 62 2457600 1400
19828279 rus100 A Aug. 12, 2016, 12:23 p.m. OK MS C# TESTS 94 62 11366400 1400
20831025 Ally0729 A Sept. 23, 2016, 6:10 a.m. OK MS C++ TESTS 94 15 0 1400
23002739 xarshila_ A Dec. 15, 2016, 10:01 a.m. OK MS C++ TESTS 94 15 0 1400
22181474 xsc A Nov. 12, 2016, 4:22 p.m. OK MS C++ TESTS 94 15 0 1400
21821375 vjudge2 A Oct. 27, 2016, 12:30 p.m. OK MS C++ TESTS 94 15 0 1400
21780872 daniboybye A Oct. 25, 2016, 7:50 p.m. OK MS C++ TESTS 94 15 0 1400
20776938 lxga A Sept. 20, 2016, 1:30 p.m. OK MS C++ TESTS 94 15 0 1400
20609216 Player12 A Sept. 14, 2016, 8:17 a.m. OK MS C++ TESTS 94 15 0 1400
19607183 Liangfj A Aug. 4, 2016, 1:09 a.m. OK MS C++ TESTS 94 15 0 1400
19474375 vjudge5 A July 29, 2016, 7:09 a.m. OK MS C++ TESTS 94 15 0 1400
19360125 tinktick A July 23, 2016, 8:26 a.m. OK MS C++ TESTS 94 15 0 1400
57600552 CtrlAlt A July 23, 2019, 3:37 p.m. OK MS C++ 2017 TESTS 94 31 0 1400
66561972 Samanter A Dec. 9, 2019, 7:22 p.m. OK MS C++ 2017 TESTS 94 31 204800 1400
51871148 ___sss A March 26, 2019, 5:27 p.m. OK MS C++ 2017 TESTS 94 46 0 1400
19013627 _index A July 10, 2016, 5:16 p.m. OK Perl TESTS 94 31 0 1400
18953547 s_p A July 7, 2016, 2:42 p.m. OK Perl TESTS 93 31 0 1400
19013614 _index A July 10, 2016, 5:15 p.m. OK Perl TESTS 94 46 0 1400
18942764 mayakin A July 7, 2016, 4:30 a.m. OK PHP TESTS 93 31 0 1400
19539905 JhonTorres A July 31, 2016, 2:23 p.m. OK PHP TESTS 94 31 0 1400
18936019 Eeyore A July 6, 2016, 7:03 p.m. OK PyPy 2 TESTS 93 62 0 1400
27211531 bigobigo A May 19, 2017, 9:33 a.m. OK PyPy 2 TESTS 94 62 0 1400
18923746 Yash_ A July 6, 2016, 4:56 p.m. OK PyPy 2 TESTS 93 77 0 1400
18923204 tanmayc25 A July 6, 2016, 4:52 p.m. OK PyPy 2 TESTS 93 92 0 1400
18939063 boombastic A July 6, 2016, 10:34 p.m. OK PyPy 2 TESTS 93 92 0 1400
18924155 tastymath75025 A July 6, 2016, 4:59 p.m. OK PyPy 2 TESTS 93 93 0 1400
18936229 kalyanp A July 6, 2016, 7:07 p.m. OK PyPy 2 TESTS 93 93 0 1400
18931332 chaosagent A July 6, 2016, 5:55 p.m. OK PyPy 2 TESTS 93 155 0 1400
18937294 jhilary A July 6, 2016, 7:44 p.m. OK PyPy 2 TESTS 93 170 0 1400
18927266 har_vi A July 6, 2016, 5:20 p.m. OK PyPy 2 TESTS 93 218 13619200 1400
18922866 Vetand A July 6, 2016, 4:50 p.m. OK PyPy 3 TESTS 93 124 0 1400
26506369 mola.mola A April 20, 2017, 1:53 a.m. OK PyPy 3 TESTS 94 124 23347200 1400
26538736 and800 A April 21, 2017, 1:38 p.m. OK PyPy 3 TESTS 94 124 23347200 1400
18922761 Boterphile A July 6, 2016, 4:49 p.m. OK PyPy 3 TESTS 93 139 0 1400
18924107 knight-erraunt A July 6, 2016, 4:58 p.m. OK PyPy 3 TESTS 93 139 0 1400
18987544 patrickcormac A July 9, 2016, 2:26 p.m. OK PyPy 3 TESTS 94 140 0 1400
18925969 cmashinho A July 6, 2016, 5:11 p.m. OK PyPy 3 TESTS 93 140 0 1400
18924694 maximaxi A July 6, 2016, 5:02 p.m. OK PyPy 3 TESTS 93 155 0 1400
18936767 Vosatorp A July 6, 2016, 7:22 p.m. OK PyPy 3 TESTS 93 155 0 1400
18925453 ruslanbes A July 6, 2016, 5:07 p.m. OK Python 2 TESTS 93 46 0 1400
19373149 acesine A July 23, 2016, 11:08 p.m. OK Python 2 TESTS 94 46 0 1400
18937965 elistark A July 6, 2016, 8:26 p.m. OK Python 2 TESTS 93 61 0 1400
21623416 WhatTheFua A Oct. 20, 2016, 4:48 p.m. OK Python 2 TESTS 94 61 0 1400
18923791 yuto A July 6, 2016, 4:56 p.m. OK Python 2 TESTS 93 61 0 1400
18991197 Ali.Pi A July 9, 2016, 7:59 p.m. OK Python 2 TESTS 94 61 0 1400
19052145 m7mdbadawy A July 12, 2016, 1:33 p.m. OK Python 2 TESTS 94 61 0 1400
20564109 _hawkins A Sept. 13, 2016, 10 a.m. OK Python 2 TESTS 94 61 0 1400
18937667 anitocode A July 6, 2016, 8:05 p.m. OK Python 2 TESTS 93 61 102400 1400
22149053 clarinet758 A Nov. 10, 2016, 1:35 p.m. OK Python 2 TESTS 94 62 0 1400
31950984 soto_nlp A Nov. 1, 2017, 1:13 p.m. OK Python 3 TESTS 94 62 0 1400
30843466 Qumeric A Sept. 29, 2017, 10:38 p.m. OK Python 3 TESTS 94 62 0 1400
20398921 serg_alb A Sept. 5, 2016, 11:54 a.m. OK Python 3 TESTS 94 62 0 1400
19310672 sxx A July 21, 2016, 11:54 p.m. OK Python 3 TESTS 94 62 0 1400
19302764 Pib A July 21, 2016, 1:11 p.m. OK Python 3 TESTS 94 62 0 1400
19217501 receed A July 18, 2016, 5:33 p.m. OK Python 3 TESTS 94 62 0 1400
19191431 orailly A July 17, 2016, 2:13 p.m. OK Python 3 TESTS 94 62 0 1400
19107551 bazyar.sepehr A July 14, 2016, 12:36 p.m. OK Python 3 TESTS 94 62 0 1400
19105860 adjanybekov A July 14, 2016, 11:05 a.m. OK Python 3 TESTS 94 62 0 1400
32065908 RccHD A Nov. 5, 2017, 1:01 a.m. OK Python 3 TESTS 94 62 0 1400
18924773 Lumin A July 6, 2016, 5:02 p.m. OK Ruby TESTS 93 62 0 1400
18926142 Naoki_M A July 6, 2016, 5:12 p.m. OK Ruby TESTS 93 77 0 1400
18937716 salogorilka A July 6, 2016, 8:08 p.m. OK Ruby TESTS 93 77 204800 1400
18945877 cielavenir A July 7, 2016, 7:41 a.m. OK Ruby TESTS 93 108 0 1400
19067490 ninoseki A July 13, 2016, 8:03 a.m. OK Ruby TESTS 94 109 0 1400
18968284 whisper A July 8, 2016, 11:25 a.m. OK Ruby TESTS 94 139 0 1400
19461952 jiangzhijie A July 28, 2016, 1:10 p.m. OK Rust TESTS 94 15 0 1400
23388386 belovedeagle A Dec. 28, 2016, 11:42 p.m. OK Rust TESTS 94 31 1536000 1400
19168623 xuelanghu A July 16, 2016, 7:52 a.m. OK Scala TESTS 94 280 0 1400
19022417 zhonghaoxi A July 11, 2016, 6:30 a.m. OK Scala TESTS 94 280 0 1400
18937381 Gobi03 A July 6, 2016, 7:49 p.m. OK Scala TESTS 93 295 0 1400
21788043 reldan A Oct. 26, 2016, 6:25 a.m. OK Scala TESTS 94 296 0 1400
18927889 wrick A July 6, 2016, 5:25 p.m. OK Scala TESTS 93 326 0 1400
19009787 Hamada_ A July 10, 2016, 12:39 p.m. OK Scala TESTS 94 343 0 1400
18959106 smas A July 8, 2016, 12:36 a.m. OK Scala TESTS 94 514 0 1400

remove filters

Back to search problems