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'Piet is one of the most known visual esoteric programming languages. The programs in Piet are constructed from colorful blocks of pixels and interpreted using pretty complicated rules. In this problem we will use a subset of Piet language with simplified rules. The program will be a rectangular image consisting of colored and black pixels. The color of each pixel will be given by an integer number between 0 and 9, inclusive, with 0 denoting black. A block of pixels is defined as a rectangle of pixels of the same color (not black). It is guaranteed that all connected groups of colored pixels of the same color will form rectangular blocks. Groups of black pixels can form arbitrary shapes. The program is interpreted using movement of instruction pointer (IP) which consists of three parts: Initially BP points to the block which contains the top-left corner of the program, DP points to the right, and CP points to the left (see the orange square on the image below). One step of program interpretation changes the state of IP in a following way. The interpreter finds the furthest edge of the current color block in the direction of the DP. From all pixels that form this edge, the interpreter selects the furthest one in the direction of CP. After this, BP attempts to move from this pixel into the next one in the direction of DP. If the next pixel belongs to a colored block, this block becomes the current one, and two other parts of IP stay the same. It the next pixel is black or outside of the program, BP stays the same but two other parts of IP change. If CP was pointing to the left, now it points to the right, and DP stays the same. If CP was pointing to the right, now it points to the left, and DP is rotated 90 degrees clockwise. This way BP will never point to a black block (it is guaranteed that top-left pixel of the program will not be black). You are given a Piet program. You have to figure out which block of the program will be current after n steps. The fir'... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
1706143 |
bidzilya |
B |
May 20, 2012, 12:09 p.m. |
OK |
Delphi |
TESTS |
73 |
550 |
9523200 |
|
2000 |
929010 |
winterwolf94 |
B |
Dec. 4, 2011, 8:30 a.m. |
OK |
Delphi |
TESTS |
73 |
970 |
1024000 |
|
2000 |
1151897 |
scorpion |
B |
Feb. 5, 2012, 8:05 p.m. |
OK |
FPC |
TESTS |
73 |
30 |
1228800 |
|
2000 |
927087 |
pedja |
B |
Dec. 3, 2011, 6:18 p.m. |
OK |
FPC |
TESTS |
73 |
30 |
2252800 |
|
2000 |
924489 |
Rubanenko |
B |
Dec. 3, 2011, 4:14 p.m. |
OK |
FPC |
TESTS |
73 |
30 |
8704000 |
|
2000 |
2250995 |
7Midav7 |
B |
Sept. 25, 2012, 6 p.m. |
OK |
FPC |
TESTS |
73 |
31 |
1331200 |
|
2000 |
1124956 |
vlad107 |
B |
Jan. 29, 2012, 8:02 a.m. |
OK |
FPC |
TESTS |
73 |
730 |
1024000 |
|
2000 |
1124955 |
vlad107 |
B |
Jan. 29, 2012, 8:02 a.m. |
OK |
FPC |
TESTS |
73 |
810 |
1024000 |
|
2000 |
923340 |
Oryshych |
B |
Dec. 3, 2011, 3:50 p.m. |
OK |
FPC |
TESTS |
73 |
950 |
1228800 |
|
2000 |
929555 |
coolinging |
B |
Dec. 4, 2011, 1:44 p.m. |
OK |
FPC |
TESTS |
73 |
1160 |
1126400 |
|
2000 |
928976 |
kostya_by |
B |
Dec. 4, 2011, 8:10 a.m. |
OK |
FPC |
TESTS |
73 |
1970 |
1331200 |
|
2000 |
924752 |
LayCurse |
B |
Dec. 3, 2011, 4:20 p.m. |
OK |
GNU C |
TESTS |
73 |
30 |
1638400 |
|
2000 |
927698 |
kawatea |
B |
Dec. 3, 2011, 7:33 p.m. |
OK |
GNU C |
TESTS |
73 |
230 |
1740800 |
|
2000 |
986735 |
Sender |
B |
Dec. 26, 2011, 8:44 a.m. |
OK |
GNU C |
TESTS |
73 |
580 |
1433600 |
|
2000 |
923450 |
-.- |
B |
Dec. 3, 2011, 3:52 p.m. |
OK |
GNU C |
TESTS |
73 |
890 |
1433600 |
|
2000 |
22264291 |
vjudge2 |
B |
Nov. 16, 2016, 10:55 a.m. |
OK |
GNU C++ |
TESTS |
73 |
30 |
0 |
|
2000 |
15914840 |
not_bot_but_POT |
B |
Feb. 9, 2016, 1:54 p.m. |
OK |
GNU C++ |
TESTS |
73 |
30 |
0 |
|
2000 |
14183545 |
130705009 |
B |
Nov. 10, 2015, 11:50 a.m. |
OK |
GNU C++ |
TESTS |
73 |
30 |
0 |
|
2000 |
15143972 |
HappyNewYearMike |
B |
Dec. 31, 2015, 11:58 p.m. |
OK |
GNU C++ |
TESTS |
73 |
30 |
307200 |
|
2000 |
927700 |
henshiru |
B |
Dec. 3, 2011, 7:33 p.m. |
OK |
GNU C++ |
TESTS |
73 |
30 |
1433600 |
|
2000 |
1257728 |
tmt514 |
B |
March 2, 2012, 4:38 p.m. |
OK |
GNU C++ |
TESTS |
73 |
30 |
1433600 |
|
2000 |
927538 |
shangjingbo |
B |
Dec. 3, 2011, 6:58 p.m. |
OK |
GNU C++ |
TESTS |
73 |
30 |
1433600 |
|
2000 |
926936 |
oimaster |
B |
Dec. 3, 2011, 6:13 p.m. |
OK |
GNU C++ |
TESTS |
73 |
30 |
1433600 |
|
2000 |
926100 |
Martin |
B |
Dec. 3, 2011, 4:48 p.m. |
OK |
GNU C++ |
TESTS |
73 |
30 |
1433600 |
|
2000 |
925300 |
luvlubb |
B |
Dec. 3, 2011, 4:31 p.m. |
OK |
GNU C++ |
TESTS |
73 |
30 |
1433600 |
|
2000 |
927349 |
PattS |
B |
Dec. 3, 2011, 6:35 p.m. |
OK |
GNU C++0x |
TESTS |
73 |
30 |
1945600 |
|
2000 |
925151 |
package.zaic |
B |
Dec. 3, 2011, 4:28 p.m. |
OK |
GNU C++0x |
TESTS |
73 |
30 |
2355200 |
|
2000 |
923216 |
cafelier |
B |
Dec. 3, 2011, 3:48 p.m. |
OK |
GNU C++0x |
TESTS |
73 |
90 |
1536000 |
|
2000 |
927031 |
AleksBannikov |
B |
Dec. 3, 2011, 6:16 p.m. |
OK |
GNU C++0x |
TESTS |
73 |
220 |
1536000 |
|
2000 |
2132438 |
dzhioev |
B |
Sept. 11, 2012, 9:02 a.m. |
OK |
GNU C++0x |
TESTS |
73 |
250 |
2252800 |
|
2000 |
8467265 |
akaiNeko paulwang eddy1021 |
B |
Oct. 29, 2014, 9:28 a.m. |
OK |
GNU C++0x |
TESTS |
73 |
436 |
409600 |
|
2000 |
6966170 |
marat.snowbear |
B |
June 27, 2014, 12:01 a.m. |
OK |
GNU C++0x |
TESTS |
73 |
436 |
512000 |
|
2000 |
984340 |
Archon.JK |
B |
Dec. 25, 2011, 2:05 a.m. |
OK |
GNU C++0x |
TESTS |
73 |
440 |
1536000 |
|
2000 |
8279256 |
I_love_Hoang_Yen |
B |
Oct. 17, 2014, 9:50 a.m. |
OK |
GNU C++0x |
TESTS |
73 |
468 |
819200 |
|
2000 |
929028 |
wisterik |
B |
Dec. 4, 2011, 8:38 a.m. |
OK |
GNU C++0x |
TESTS |
73 |
480 |
3891200 |
|
2000 |
58972717 |
rainboy |
B |
Aug. 17, 2019, 9:29 p.m. |
OK |
GNU C11 |
TESTS |
73 |
560 |
102400 |
|
2000 |
16884714 |
freebsdx |
B |
March 23, 2016, 10:59 a.m. |
OK |
GNU C++11 |
TESTS |
73 |
30 |
2150400 |
|
2000 |
57903406 |
lopare |
B |
July 28, 2019, 4:37 p.m. |
OK |
GNU C++11 |
TESTS |
73 |
62 |
0 |
|
2000 |
16337214 |
RomeoFantastik |
B |
Feb. 25, 2016, 8:14 p.m. |
OK |
GNU C++11 |
TESTS |
73 |
342 |
1126400 |
|
2000 |
20646991 |
YakutovDmitriy |
B |
Sept. 15, 2016, 6:49 p.m. |
OK |
GNU C++11 |
TESTS |
73 |
436 |
819200 |
|
2000 |
15986019 |
stefanzzz |
B |
Feb. 13, 2016, 11:01 a.m. |
OK |
GNU C++11 |
TESTS |
73 |
560 |
0 |
|
2000 |
17357875 |
joisino |
B |
April 17, 2016, 5 a.m. |
OK |
GNU C++11 |
TESTS |
73 |
1028 |
2457600 |
|
2000 |
13813268 |
tenshi_kanade |
B |
Oct. 23, 2015, 5:57 p.m. |
OK |
GNU C++11 |
TESTS |
73 |
1434 |
102400 |
|
2000 |
25464393 |
Benq |
B |
March 14, 2017, 1:40 a.m. |
OK |
GNU C++14 |
TESTS |
73 |
30 |
2048000 |
|
2000 |
35203697 |
hmc |
B |
Feb. 13, 2018, 3:16 p.m. |
OK |
GNU C++14 |
TESTS |
73 |
30 |
2252800 |
|
2000 |
56023826 |
sorry_im_smurfing |
B |
June 25, 2019, 5:50 a.m. |
OK |
GNU C++14 |
TESTS |
73 |
62 |
102400 |
|
2000 |
41329126 |
Cmise |
B |
Aug. 8, 2018, 7:39 a.m. |
OK |
GNU C++14 |
TESTS |
73 |
466 |
1228800 |
|
2000 |
44380347 |
I_love_Y_UME |
B |
Oct. 16, 2018, 3:07 a.m. |
OK |
GNU C++14 |
TESTS |
73 |
498 |
204800 |
|
2000 |
23619687 |
Ali.Pi |
B |
Jan. 7, 2017, 8:17 a.m. |
OK |
GNU C++14 |
TESTS |
73 |
560 |
2150400 |
|
2000 |
48107503 |
yaksha |
B |
Jan. 9, 2019, 6:42 a.m. |
OK |
GNU C++14 |
TESTS |
73 |
998 |
307200 |
|
2000 |
55971673 |
tnakao |
B |
June 23, 2019, 3:11 p.m. |
OK |
GNU C++17 |
TESTS |
73 |
62 |
409600 |
|
2000 |
60530556 |
MinecraftFuns |
B |
Sept. 14, 2019, 12:14 p.m. |
OK |
GNU C++17 |
TESTS |
73 |
62 |
200499200 |
|
2000 |
41810082 |
ruo |
B |
Aug. 19, 2018, 2:20 a.m. |
OK |
GNU C++17 |
TESTS |
73 |
1560 |
204800 |
|
2000 |
925766 |
Rotsor |
B |
Dec. 3, 2011, 4:41 p.m. |
OK |
Haskell |
TESTS |
73 |
90 |
4198400 |
|
2000 |
926948 |
uwi |
B |
Dec. 3, 2011, 6:13 p.m. |
OK |
Java 6 |
TESTS |
73 |
110 |
43110400 |
|
2000 |
932434 |
stevenkplus |
B |
Dec. 6, 2011, 6:33 a.m. |
OK |
Java 6 |
TESTS |
73 |
130 |
35328000 |
|
2000 |
925968 |
Abra |
B |
Dec. 3, 2011, 4:46 p.m. |
OK |
Java 6 |
TESTS |
73 |
130 |
43008000 |
|
2000 |
924329 |
islam-al-aarag |
B |
Dec. 3, 2011, 4:10 p.m. |
OK |
Java 6 |
TESTS |
73 |
130 |
43110400 |
|
2000 |
923391 |
Egor |
B |
Dec. 3, 2011, 3:51 p.m. |
OK |
Java 6 |
TESTS |
73 |
130 |
43110400 |
|
2000 |
924789 |
bjin |
B |
Dec. 3, 2011, 4:21 p.m. |
OK |
Java 6 |
TESTS |
73 |
130 |
43212800 |
|
2000 |
925079 |
ivan.popelyshev |
B |
Dec. 3, 2011, 4:27 p.m. |
OK |
Java 6 |
TESTS |
73 |
130 |
43417600 |
|
2000 |
929161 |
Slamur |
B |
Dec. 4, 2011, 9:57 a.m. |
OK |
Java 6 |
TESTS |
73 |
130 |
43827200 |
|
2000 |
930966 |
pele |
B |
Dec. 5, 2011, 10 a.m. |
OK |
Java 6 |
TESTS |
73 |
140 |
35328000 |
|
2000 |
927438 |
Kornacker |
B |
Dec. 3, 2011, 6:44 p.m. |
OK |
Java 6 |
TESTS |
73 |
140 |
43110400 |
|
2000 |
58972767 |
Dukkha |
B |
Aug. 17, 2019, 9:31 p.m. |
OK |
Java 8 |
TESTS |
73 |
872 |
0 |
|
2000 |
9236814 |
AlexFetisov |
B |
Dec. 23, 2014, 11:04 p.m. |
OK |
Java 8 |
TESTS |
73 |
1340 |
0 |
|
2000 |
925369 |
it4.kp |
B |
Dec. 3, 2011, 4:33 p.m. |
OK |
Mono C# |
TESTS |
73 |
140 |
11980800 |
|
2000 |
3879187 |
ALWAYSWANNAFLY |
B |
June 13, 2013, 11:55 a.m. |
OK |
MS C++ |
TESTS |
73 |
15 |
307200 |
|
2000 |
925045 |
UESTC_Nocturne |
B |
Dec. 3, 2011, 4:26 p.m. |
OK |
MS C++ |
TESTS |
73 |
30 |
1536000 |
|
2000 |
948632 |
Hinidu |
B |
Dec. 10, 2011, 5:47 a.m. |
OK |
MS C++ |
TESTS |
73 |
30 |
1638400 |
|
2000 |
932445 |
KID. |
B |
Dec. 6, 2011, 6:44 a.m. |
OK |
MS C++ |
TESTS |
73 |
30 |
1740800 |
|
2000 |
922978 |
al13n |
B |
Dec. 3, 2011, 3:43 p.m. |
OK |
MS C++ |
TESTS |
73 |
90 |
1843200 |
|
2000 |
927772 |
Le-Nika |
B |
Dec. 3, 2011, 7:53 p.m. |
OK |
MS C++ |
TESTS |
73 |
140 |
8908800 |
|
2000 |
924373 |
witua |
B |
Dec. 3, 2011, 4:11 p.m. |
OK |
MS C++ |
TESTS |
73 |
220 |
2048000 |
|
2000 |
925520 |
natalia |
B |
Dec. 3, 2011, 4:36 p.m. |
OK |
MS C++ |
TESTS |
73 |
250 |
1536000 |
|
2000 |
921778 |
vitar |
B |
Dec. 3, 2011, 3:25 p.m. |
OK |
MS C++ |
TESTS |
73 |
250 |
1740800 |
|
2000 |
926108 |
Slevin |
B |
Dec. 3, 2011, 4:48 p.m. |
OK |
MS C++ |
TESTS |
73 |
250 |
2969600 |
|
2000 |
57961508 |
CtrlAlt |
B |
July 29, 2019, 11:04 p.m. |
OK |
MS C++ 2017 |
TESTS |
73 |
436 |
102400 |
|
2000 |
928431 |
autumned |
B |
Dec. 4, 2011, 3:22 a.m. |
OK |
Python 2 |
TESTS |
73 |
60 |
3174400 |
|
2000 |
42133565 |
Mk_Python_v1 |
B |
Aug. 26, 2018, 8:52 p.m. |
OK |
Python 2 |
TESTS |
73 |
372 |
307200 |
|
2000 |
remove filters
Back to search problems