Canada Cup 2016

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
725 Canada Cup 2016 FINISHED False 9000 254674499 Oct. 22, 2016, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2648 ) C Hidden Word PROGRAMMING brute force constructive algorithms implementation strings 1600

B'Let xe2 x80 x99s define a grid to be a set of tiles with 2 rows and 13 columns. Each tile has an English letter written in it. The letters don 't have to be unique: there might be two or more tiles with the same letter written on them. Here is an example of a grid: We say that two tiles are adjacent if they share a side or a corner. In the example grid above, the tile with the letter 'A ' is adjacent only to the tiles with letters 'B ', 'N ', and 'O '. A tile is not adjacent to itself. A sequence of tiles is called a path if each tile in the sequence is adjacent to the tile which follows it (except for the last tile in the sequence, which of course has no successor). In this example, "ABC" is a path, and so is "KXWIHIJK". "MAB" is not a path because 'M ' is not adjacent to 'A '. A single tile can be used more than once by a path (though the tile cannot occupy two consecutive places in the path because no tile is adjacent to itself). You xe2 x80 x99re given a string s which consists of 27 upper-case English letters. Each English letter occurs at least once in s. Find a grid that contains a path whose tiles, viewed in the order that the path visits them, form the string s. If there xe2 x80 x99s no solution, print "Impossible" (without the quotes). The only line of the input contains the string s, consisting of 27 upper-case English letters. Each English letter occurs at least once in s. Output two lines, each consisting of 13 upper-case English characters, representing the rows of the grid. If there are multiple solutions, print any of them. If there is no solution print "Impossible". '...

Tutorials

Canada Cup Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
21687906 Gassa C Oct. 22, 2016, 5:27 p.m. OK D TESTS 48 15 0 1600
21852660 vladKB1 C Oct. 28, 2016, 4:41 p.m. OK FPC TESTS 48 15 0 1600
21678559 Tommyr7 C Oct. 22, 2016, 3:58 p.m. OK FPC TESTS 48 15 0 1600
21679659 0lkeh C Oct. 22, 2016, 4:07 p.m. OK FPC TESTS 48 15 0 1600
21736037 MintGreen C Oct. 24, 2016, 8:18 a.m. OK FPC TESTS 48 15 102400 1600
21680551 GiannisAntetokounmpo C Oct. 22, 2016, 4:16 p.m. OK FPC TESTS 48 15 204800 1600
21696609 thethithoi1 C Oct. 23, 2016, 2:01 a.m. OK FPC TESTS 48 15 204800 1600
22796061 andrew C Dec. 7, 2016, 7:27 p.m. OK FPC TESTS 48 15 1740800 1600
24262092 Gray_58 C Jan. 30, 2017, 8:25 a.m. OK FPC TESTS 48 15 1740800 1600
21709870 hanxueshui C Oct. 23, 2016, 11:28 a.m. OK FPC TESTS 48 30 0 1600
21684935 s34vv1nd C Oct. 22, 2016, 4:51 p.m. OK FPC TESTS 48 30 204800 1600
22697852 MegaBidoof C Dec. 4, 2016, 2:43 p.m. OK GNU C TESTS 48 15 0 1600
21769701 srijansingh C Oct. 25, 2016, 11:30 a.m. OK GNU C TESTS 48 15 0 1600
21737252 yeyushengfan C Oct. 24, 2016, 9:21 a.m. OK GNU C TESTS 48 15 0 1600
21682292 CloudStrife C Oct. 22, 2016, 4:34 p.m. OK GNU C TESTS 48 15 0 1600
21681828 c-and-j C Oct. 22, 2016, 4:29 p.m. OK GNU C TESTS 48 15 0 1600
21678188 Snower C Oct. 22, 2016, 3:54 p.m. OK GNU C TESTS 48 15 0 1600
21677584 sogun C Oct. 22, 2016, 3:49 p.m. OK GNU C TESTS 48 15 0 1600
24631608 rainboy C Feb. 13, 2017, 4:07 p.m. OK GNU C TESTS 48 15 1945600 1600
21687679 849145427 C Oct. 22, 2016, 5:24 p.m. OK GNU C TESTS 48 30 0 1600
21696062 reyad C Oct. 23, 2016, 12:48 a.m. OK GNU C TESTS 48 31 0 1600
32094796 F.Darcy C Nov. 6, 2017, 11:58 a.m. OK GNU C++ TESTS 48 15 0 1600
29554819 vjudge2 C Aug. 18, 2017, 1:58 p.m. OK GNU C++ TESTS 48 15 0 1600
29552328 vjudge1 C Aug. 18, 2017, 11:33 a.m. OK GNU C++ TESTS 48 15 0 1600
29551955 vjudge1 C Aug. 18, 2017, 11:09 a.m. OK GNU C++ TESTS 48 15 0 1600
22709892 vjudge2 C Dec. 5, 2016, 11:18 a.m. OK GNU C++ TESTS 48 15 0 1600
22591858 appro C Nov. 29, 2016, 6:18 a.m. OK GNU C++ TESTS 48 15 0 1600
22317775 farmerboy C Nov. 19, 2016, 3:22 a.m. OK GNU C++ TESTS 48 15 0 1600
22261705 _ShadowSong C Nov. 16, 2016, 8:44 a.m. OK GNU C++ TESTS 48 15 0 1600
22162793 rahulpaul118 C Nov. 11, 2016, 12:48 p.m. OK GNU C++ TESTS 48 15 0 1600
22143578 vjudge5 C Nov. 10, 2016, 7:25 a.m. OK GNU C++ TESTS 48 15 0 1600
21875606 digao21 C Oct. 29, 2016, 3:54 p.m. OK GNU C11 TESTS 48 15 0 1600
32285884 coding_is_fun C Nov. 13, 2017, 1:46 p.m. OK GNU C++11 TESTS 48 15 0 1600
45787583 Opcode C Nov. 16, 2018, 3:39 a.m. OK GNU C++11 TESTS 48 15 0 1600
32285985 coding_is_fun C Nov. 13, 2017, 1:50 p.m. OK GNU C++11 TESTS 48 15 0 1600
31917309 vjudge5 C Oct. 31, 2017, 10:23 a.m. OK GNU C++11 TESTS 48 15 0 1600
30494561 wcwswswws C Sept. 19, 2017, 11:04 a.m. OK GNU C++11 TESTS 48 15 0 1600
30296763 _Samir C Sept. 12, 2017, 11:33 p.m. OK GNU C++11 TESTS 48 15 0 1600
30054301 Leemur C Sept. 4, 2017, 1:44 p.m. OK GNU C++11 TESTS 48 15 0 1600
29552565 vjudge2 C Aug. 18, 2017, 11:47 a.m. OK GNU C++11 TESTS 48 15 0 1600
23017409 shruti_gupta C Dec. 15, 2016, 7:56 p.m. OK GNU C++11 TESTS 48 15 0 1600
23010225 dylanfridman C Dec. 15, 2016, 3:11 p.m. OK GNU C++11 TESTS 48 15 0 1600
30609131 gotop C Sept. 22, 2017, 8:20 a.m. OK GNU C++14 TESTS 48 15 0 1600
31917284 Fuko_Ibuki C Oct. 31, 2017, 10:22 a.m. OK GNU C++14 TESTS 48 15 0 1600
29906996 vjudge2 C Aug. 30, 2017, 3:31 a.m. OK GNU C++14 TESTS 48 15 0 1600
29698506 mola.mola C Aug. 23, 2017, 5:47 a.m. OK GNU C++14 TESTS 48 15 0 1600
29553404 vjudge3 C Aug. 18, 2017, 12:43 p.m. OK GNU C++14 TESTS 48 15 0 1600
29552574 vjudge2 C Aug. 18, 2017, 11:48 a.m. OK GNU C++14 TESTS 48 15 0 1600
27719141 0w1 C June 11, 2017, 10:22 a.m. OK GNU C++14 TESTS 48 15 0 1600
27205064 spencer C May 18, 2017, 10 p.m. OK GNU C++14 TESTS 48 15 0 1600
26982560 YazanRi C May 9, 2017, 6:37 p.m. OK GNU C++14 TESTS 48 15 0 1600
30813779 gogateiiit amanmehta-maniac C Sept. 28, 2017, 6:50 p.m. OK GNU C++14 TESTS 48 15 0 1600
42249273 prdx9_abir C Aug. 29, 2018, 5:21 p.m. OK GNU C++17 TESTS 48 15 204800 1600
55699655 89264270823 C June 18, 2019, 2:51 a.m. OK GNU C++17 TESTS 48 15 204800 1600
41399430 vjudge3 C Aug. 9, 2018, 12:51 p.m. OK GNU C++17 TESTS 48 30 0 1600
49938750 gyrgen C Feb. 15, 2019, 8:34 a.m. OK GNU C++17 TESTS 48 30 0 1600
42223161 ucrop C Aug. 28, 2018, 11:16 p.m. OK GNU C++17 TESTS 48 30 204800 1600
68126560 kotamanegi C Jan. 3, 2020, 3:24 p.m. OK GNU C++17 TESTS 48 30 204800 1600
41145282 Akulyat C Aug. 3, 2018, 6:15 a.m. OK GNU C++17 TESTS 48 30 307200 1600
44176808 Juve45 C Oct. 12, 2018, 9:16 a.m. OK GNU C++17 TESTS 48 30 307200 1600
36396621 gaporf C March 18, 2018, 6:08 p.m. OK GNU C++17 TESTS 48 30 3379200 1600
69550658 Igor_2017 C Jan. 26, 2020, 6:16 a.m. OK GNU C++17 TESTS 48 31 0 1600
21689448 orb C Oct. 22, 2016, 5:31 p.m. OK Go TESTS 48 15 102400 1600
22315512 PugachAG C Nov. 18, 2016, 9:43 p.m. OK Go TESTS 48 31 19865600 1600
28105396 togatoga C June 27, 2017, 11:58 p.m. OK Go TESTS 48 31 23040000 1600
21682673 cojna C Oct. 22, 2016, 4:38 p.m. OK Haskell TESTS 48 15 8499200 1600
65935667 dpark3542 C Nov. 29, 2019, 1:48 a.m. OK Java 8 TESTS 48 109 0 1600
68109288 lebaur C Jan. 3, 2020, 8:49 a.m. OK Java 8 TESTS 48 109 0 1600
21731759 gahou C Oct. 24, 2016, 1:51 a.m. OK Java 8 TESTS 48 109 0 1600
21686812 Omar_Kojak C Oct. 22, 2016, 5:13 p.m. OK Java 8 TESTS 48 109 0 1600
21685911 franzks C Oct. 22, 2016, 5:02 p.m. OK Java 8 TESTS 48 109 0 1600
23165355 rbroodryk C Dec. 19, 2016, 9:14 p.m. OK Java 8 TESTS 48 109 20172800 1600
25435745 VerticesEdge C March 12, 2017, 1:34 p.m. OK Java 8 TESTS 48 109 20172800 1600
25186054 martin3 C March 3, 2017, 7:29 p.m. OK Java 8 TESTS 48 109 20480000 1600
22155373 beroul C Nov. 10, 2016, 9:20 p.m. OK Java 8 TESTS 48 124 0 1600
61456881 Ikari_stream C Sept. 29, 2019, 6:43 a.m. OK Java 8 TESTS 48 124 0 1600
21691368 dyukha C Oct. 22, 2016, 6:51 p.m. OK Kotlin TESTS 48 140 0 1600
21687939 inna C Oct. 22, 2016, 5:27 p.m. OK Mono C# TESTS 48 61 0 1600
22681048 pomjuice C Dec. 3, 2016, 4:37 p.m. OK MS C# TESTS 48 46 204800 1600
21692645 pwian C Oct. 22, 2016, 7:35 p.m. OK MS C# TESTS 48 61 102400 1600
21681156 Zvigintsev C Oct. 22, 2016, 4:22 p.m. OK MS C# TESTS 48 62 0 1600
21699519 og.kostya C Oct. 23, 2016, 6:41 a.m. OK MS C# TESTS 48 62 204800 1600
21691468 azukun C Oct. 22, 2016, 6:54 p.m. OK MS C# TESTS 48 62 512000 1600
21805162 Spi C Oct. 26, 2016, 6:56 p.m. OK MS C# TESTS 48 62 2457600 1600
21708083 koyaaniqatsi C Oct. 23, 2016, 10:38 a.m. OK MS C# TESTS 48 62 2457600 1600
24535173 vjudge3 C Feb. 8, 2017, 7:23 p.m. OK MS C# TESTS 48 62 11468800 1600
21681307 renadeen C Oct. 22, 2016, 4:23 p.m. OK MS C# TESTS 48 77 2457600 1600
21681876 jakobjjk C Oct. 22, 2016, 4:29 p.m. OK MS C# TESTS 48 78 2457600 1600
22487392 Jason_Lee C Nov. 25, 2016, 11:15 a.m. OK MS C++ TESTS 48 15 0 1600
22154470 Andreasyan C Nov. 10, 2016, 7:48 p.m. OK MS C++ TESTS 48 15 0 1600
22064709 nikdenev C Nov. 5, 2016, 8:44 p.m. OK MS C++ TESTS 48 15 0 1600
21992772 IrinaSh C Nov. 2, 2016, 1:47 p.m. OK MS C++ TESTS 48 15 0 1600
21818698 rkm0959 C Oct. 27, 2016, 10:37 a.m. OK MS C++ TESTS 48 15 0 1600
21794768 Shu_jzy C Oct. 26, 2016, 1:14 p.m. OK MS C++ TESTS 48 15 0 1600
21755665 miha715lev C Oct. 24, 2016, 5:25 p.m. OK MS C++ TESTS 48 15 0 1600
21751068 NotImplemented C Oct. 24, 2016, 3:17 p.m. OK MS C++ TESTS 48 15 0 1600
21719843 ReD_AwHiLe C Oct. 23, 2016, 6:46 p.m. OK MS C++ TESTS 48 15 0 1600
21710189 gumfum C Oct. 23, 2016, 11:37 a.m. OK MS C++ TESTS 48 15 0 1600
69371002 AleksanderBalobanov C Jan. 22, 2020, 5:12 p.m. OK MS C++ 2017 TESTS 48 46 307200 1600
21720066 rsFalse C Oct. 23, 2016, 6:54 p.m. OK Perl TESTS 48 31 0 1600
21701027 mayakin C Oct. 23, 2016, 7:32 a.m. OK PHP TESTS 48 31 0 1600
21731005 abhigupta4 C Oct. 23, 2016, 11:57 p.m. OK PyPy 2 TESTS 48 77 0 1600
22802329 masonsbro C Dec. 8, 2016, 5:42 a.m. OK PyPy 2 TESTS 48 78 21913600 1600
21678363 zaq1xsw2tktk C Oct. 22, 2016, 3:56 p.m. OK PyPy 2 TESTS 48 92 0 1600
21687176 beched C Oct. 22, 2016, 5:18 p.m. OK PyPy 2 TESTS 48 93 0 1600
21682876 jddymx C Oct. 22, 2016, 4:40 p.m. OK PyPy 2 TESTS 48 93 0 1600
22830786 Yash_ C Dec. 9, 2016, 10:16 a.m. OK PyPy 2 TESTS 48 108 0 1600
21845382 dsharma080 C Oct. 28, 2016, 11:41 a.m. OK PyPy 2 TESTS 48 109 0 1600
21674772 hellman_ C Oct. 22, 2016, 3:29 p.m. OK PyPy 2 TESTS 48 218 8601600 1600
21694212 hellman_ C Oct. 22, 2016, 9:09 p.m. OK PyPy 2 TESTS 48 249 8908800 1600
21691006 Vosatorp C Oct. 22, 2016, 6:42 p.m. OK PyPy 3 TESTS 48 124 0 1600
21681145 kahrabian C Oct. 22, 2016, 4:22 p.m. OK Python 2 TESTS 48 46 0 1600
21678128 jochang C Oct. 22, 2016, 3:54 p.m. OK Python 2 TESTS 48 46 0 1600
21685805 Vegora C Oct. 22, 2016, 5 p.m. OK Python 2 TESTS 48 46 102400 1600
21802267 ABL C Oct. 26, 2016, 5:24 p.m. OK Python 2 TESTS 48 61 0 1600
21698559 naresh7406 C Oct. 23, 2016, 5:36 a.m. OK Python 2 TESTS 48 61 0 1600
21698479 nikivas C Oct. 23, 2016, 5:30 a.m. OK Python 2 TESTS 48 61 0 1600
21691463 TempuX C Oct. 22, 2016, 6:54 p.m. OK Python 2 TESTS 48 61 0 1600
21678085 Neil C Oct. 22, 2016, 3:53 p.m. OK Python 2 TESTS 48 61 0 1600
21983951 xcFelix C Nov. 2, 2016, 7 a.m. OK Python 2 TESTS 48 62 0 1600
21810295 tunnel C Oct. 27, 2016, 1:04 a.m. OK Python 2 TESTS 48 62 0 1600
21679824 LadyPython C Oct. 22, 2016, 4:09 p.m. OK Python 3 TESTS 48 61 0 1600
22017582 cgfs10000 C Nov. 3, 2016, 4:26 p.m. OK Python 3 TESTS 48 62 0 1600
21958567 Amores C Nov. 1, 2016, 6:32 a.m. OK Python 3 TESTS 48 62 0 1600
21716348 orailly C Oct. 23, 2016, 3:42 p.m. OK Python 3 TESTS 48 62 0 1600
21715523 orailly C Oct. 23, 2016, 3 p.m. OK Python 3 TESTS 48 62 0 1600
21715411 surokpro C Oct. 23, 2016, 2:54 p.m. OK Python 3 TESTS 48 62 0 1600
21701645 r8b8 C Oct. 23, 2016, 8:10 a.m. OK Python 3 TESTS 48 62 0 1600
21678270 Denzed C Oct. 22, 2016, 3:55 p.m. OK Python 3 TESTS 48 62 0 1600
21695058 minimario C Oct. 22, 2016, 10:26 p.m. OK Python 3 TESTS 48 62 204800 1600
21695295 IntueorDaniel C Oct. 22, 2016, 10:54 p.m. OK Python 3 TESTS 48 62 307200 1600
21680642 wasss80 C Oct. 22, 2016, 4:16 p.m. OK Ruby TESTS 48 62 0 1600
21681132 yury.dymov C Oct. 22, 2016, 4:21 p.m. OK Ruby TESTS 48 77 0 1600
21685341 Andrew.Tweddle C Oct. 22, 2016, 4:55 p.m. OK Scala TESTS 48 311 0 1600
21680288 limed C Oct. 22, 2016, 4:13 p.m. OK Scala TESTS 48 343 0 1600

remove filters

Back to search problems