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.
Problems
B"Finally, you have defeated Razor and now, you are the Most Wanted street racer. Sergeant Cross has sent the full police force after you in a deadly pursuit. Fortunately, you have found a hiding spot but you fear that Cross and his force will eventually find you. To increase your chances of survival, you want to tune and repaint your BMW M3 GTR. The car can be imagined as a permuted n -dimensional hypercube. A simple n -dimensional hypercube is an undirected unweighted graph built recursively as follows: A permuted n -dimensional hypercube is formed by permuting the vertex numbers of a simple n -dimensional hypercube in any arbitrary manner. Examples of a simple and permuted 3 -dimensional hypercubes are given below: Note that a permuted n -dimensional hypercube has the following properties: Let's denote the permutation used to generate the permuted n -dimensional hypercube, representing your car, from a simple n -dimensional hypercube by P . Before messing up the functionalities of the car, you want to find this permutation so that you can restore the car if anything goes wrong. But the job isn't done yet. You have n different colours numbered from 0 to n-1 . You want to colour the vertices of this permuted n -dimensional hypercube in such a way that for each and every vertex u satisfying 0 <= q u < 2^n and for each and every colour c satisfying 0 <= q c < n , there is at least one vertex v adjacent to u having a colour c . In other words, from each and every vertex, it must be possible to reach a vertex of any colour by just moving to an adjacent vertex. Given the permuted n -dimensional hypercube, find any valid permutation P and colouring. The first line of input contains a single integer t ( 1 <= q t <= q 4096 ) -- the number of test cases. For each test case, the first line contains a single integer n ( 1 <= q n <= q 16"... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
121654887 |
rainboy |
E |
July 7, 2021, 6:35 p.m. |
OK |
GNU C11 |
TESTS |
23 |
686 |
5836800 |
|
|
121645225 |
prabowo |
E |
July 7, 2021, 4:43 p.m. |
OK |
GNU C++11 |
TESTS |
23 |
265 |
9625600 |
|
|
121643592 |
OMG_link |
E |
July 7, 2021, 4:39 p.m. |
OK |
GNU C++11 |
TESTS |
23 |
295 |
9318400 |
|
|
121658502 |
Nanako |
E |
July 7, 2021, 7:16 p.m. |
OK |
GNU C++11 |
TESTS |
23 |
841 |
15155200 |
|
|
121657215 |
MrMirotic |
E |
July 7, 2021, 6:59 p.m. |
OK |
GNU C++11 |
TESTS |
23 |
904 |
14336000 |
|
|
121656959 |
MrMirotic |
E |
July 7, 2021, 6:56 p.m. |
OK |
GNU C++11 |
TESTS |
23 |
997 |
14438400 |
|
|
121669265 |
EEIEE |
E |
July 8, 2021, 12:21 a.m. |
OK |
GNU C++11 |
TESTS |
23 |
1684 |
32051200 |
|
|
121676607 |
DuyAnhTM |
E |
July 8, 2021, 3:19 a.m. |
OK |
GNU C++14 |
TESTS |
23 |
280 |
8908800 |
|
|
121677102 |
MooNight |
E |
July 8, 2021, 3:28 a.m. |
OK |
GNU C++14 |
TESTS |
23 |
451 |
10137600 |
|
|
121662675 |
AwakeAnay |
E |
July 7, 2021, 8:30 p.m. |
OK |
GNU C++14 |
TESTS |
23 |
561 |
22835200 |
|
|
121660531 |
ParthDwivedi |
E |
July 7, 2021, 7:50 p.m. |
OK |
GNU C++14 |
TESTS |
23 |
654 |
15360000 |
|
|
121654923 |
mraron |
E |
July 7, 2021, 6:35 p.m. |
OK |
GNU C++14 |
TESTS |
23 |
717 |
10137600 |
|
|
121677720 |
pranjalsinha1965 |
E |
July 8, 2021, 3:38 a.m. |
OK |
GNU C++14 |
TESTS |
23 |
873 |
42598400 |
|
|
121671392 |
couplefire |
E |
July 8, 2021, 1:29 a.m. |
OK |
GNU C++17 |
TESTS |
23 |
280 |
8908800 |
|
|
121681825 |
Lain |
E |
July 8, 2021, 4:49 a.m. |
OK |
GNU C++17 |
TESTS |
23 |
295 |
8908800 |
|
|
121677230 |
Normie28 |
E |
July 8, 2021, 3:30 a.m. |
OK |
GNU C++17 |
TESTS |
23 |
296 |
10035200 |
|
|
121669906 |
kamer |
E |
July 8, 2021, 12:46 a.m. |
OK |
GNU C++17 |
TESTS |
23 |
296 |
10035200 |
|
|
121671900 |
flukehn |
E |
July 8, 2021, 1:42 a.m. |
OK |
GNU C++17 |
TESTS |
23 |
312 |
8089600 |
|
|
121676219 |
tkj |
E |
July 8, 2021, 3:12 a.m. |
OK |
GNU C++17 |
TESTS |
23 |
312 |
26726400 |
|
|
121668942 |
torisasami |
E |
July 8, 2021, 12:08 a.m. |
OK |
GNU C++17 |
TESTS |
23 |
326 |
15974400 |
|
|
121686142 |
SheepRanger |
E |
July 8, 2021, 5:45 a.m. |
OK |
GNU C++17 |
TESTS |
23 |
327 |
12902400 |
|
|
121658415 |
marxist |
E |
July 7, 2021, 7:14 p.m. |
OK |
GNU C++17 |
TESTS |
23 |
343 |
8908800 |
|
|
121654222 |
tapir1729 |
E |
July 7, 2021, 6:30 p.m. |
OK |
GNU C++17 |
TESTS |
23 |
373 |
9318400 |
|
|
121665135 |
Kude |
E |
July 7, 2021, 9:35 p.m. |
OK |
GNU C++17 (64) |
TESTS |
23 |
249 |
10547200 |
|
|
121682377 |
HolyK |
E |
July 8, 2021, 4:57 a.m. |
OK |
GNU C++17 (64) |
TESTS |
23 |
280 |
10547200 |
|
|
121679061 |
tabr |
E |
July 8, 2021, 4:02 a.m. |
OK |
GNU C++17 (64) |
TESTS |
23 |
280 |
10547200 |
|
|
121667141 |
_overrated_ |
E |
July 7, 2021, 10:48 p.m. |
OK |
GNU C++17 (64) |
TESTS |
23 |
280 |
11878400 |
|
|
121669091 |
llllllll |
E |
July 8, 2021, 12:14 a.m. |
OK |
GNU C++17 (64) |
TESTS |
23 |
295 |
10547200 |
|
|
121665098 |
galen_colin |
E |
July 7, 2021, 9:34 p.m. |
OK |
GNU C++17 (64) |
TESTS |
23 |
295 |
44441600 |
|
|
121676659 |
dblark |
E |
July 8, 2021, 3:20 a.m. |
OK |
GNU C++17 (64) |
TESTS |
23 |
296 |
11468800 |
|
|
121670435 |
wlzhouzhuan |
E |
July 8, 2021, 1:03 a.m. |
OK |
GNU C++17 (64) |
TESTS |
23 |
311 |
11468800 |
|
|
121670468 |
wlzhouzhuan |
E |
July 8, 2021, 1:04 a.m. |
OK |
GNU C++17 (64) |
TESTS |
23 |
327 |
11468800 |
|
|
121655619 |
natsugiri |
E |
July 7, 2021, 6:42 p.m. |
OK |
GNU C++17 (64) |
TESTS |
23 |
342 |
11468800 |
|
|
121675728 |
augurar |
E |
July 8, 2021, 3:04 a.m. |
OK |
Java 8 |
TESTS |
23 |
452 |
17817600 |
|
|
remove filters
Back to search problems