QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#295429#4833. Tetra-puzzleucup-team087#0 52ms5948kbC++144.9kb2023-12-31 06:19:292023-12-31 06:19:30

Judging History

你现在查看的是最新测评结果

  • [2023-12-31 06:19:30]
  • 评测
  • 测评结果:0
  • 用时:52ms
  • 内存:5948kb
  • [2023-12-31 06:19:29]
  • 提交

answer

#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

using namespace std;

using Int = long long;

template <class T1, class T2> ostream &operator<<(ostream &os, const pair<T1, T2> &a) { return os << "(" << a.first << ", " << a.second << ")"; };
template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; }
template <class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; }
template <class T> bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; }
template <class T> bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; }
#define COLOR(s) ("\x1b[" s "m")


const string ILOTZ = "ILOTZ";
constexpr int L = 25;
constexpr int BEAM = 100;

constexpr int BINGOS[10] = {
  31 << 0, 31 << 5, 31 << 10, 31 << 15, 31 << 20,
  1082401 << 0, 1082401 << 1, 1082401 << 2, 1082401 << 3, 1082401 << 4,
};
vector<vector<int>> MINOSS;

void init() {
  constexpr int DAT[5][9][4] = {
{{0,1,2,3}, {0,5,10,15}, {-1,-1,-1,-1}},
{{0,5,10,11}, {2,5,6,7}, {0,1,6,11}, {0,1,2,5}, {1,6,10,11}, {0,1,2,7}, {0,1,5,10}, {0,5,6,7}, {-1,-1,-1,-1}},
{{0,1,5,6}, {-1,-1,-1,-1}},
{{0,1,2,6}, {0,5,6,10}, {1,5,6,7}, {1,5,6,11}, {-1,-1,-1,-1}},
{{0,1,6,7}, {1,5,6,10}, {1,2,5,6}, {0,5,6,11}, {-1,-1,-1,-1}},
  };
  MINOSS.assign(5, {});
  for (int a = 0; a < 5; ++a) {
    for (int i = 0; ~DAT[a][i][0]; ++i) {
      int base = 0;
      int maxX = 0, maxY = 0;
      for (int j = 0; j < 4; ++j) {
        const int z = DAT[a][i][j];
        base |= 1 << z;
        chmax(maxX, z / 5);
        chmax(maxY, z % 5);
      }
      for (int dx = 0; maxX + dx < 5; ++dx) for (int dy = 0; maxY + dy < 5; ++dy) {
        MINOSS[a].push_back(base << (dx * 5 + dy));
      }
    }
// cerr<<ILOTZ[a]<<": "<<MINOSS[a].size()<<endl;
  }
}

int move(int p, int a, int b) {
  const int mino = MINOSS[a][b];
  if (p & mino) {
    return -1;
  }
  p |= mino;
  int q = 0;
  for (int i = 0; i < 10; ++i) {
    if (!(~p & BINGOS[i])) {
      q |= BINGOS[i];
    }
  }
  p -= q;
  return p;
}

constexpr int INF = 1001001001;
int eval(int p) {
  return p;
}

struct State {
  int score;
  int p;
  int prv;
  int a, b;
};

State select(int p, int a) {
          State sm{-INF, -1, -1, -1, -1};
          for (int b = 0; b < (int)MINOSS[a].size(); ++b) {
            const int pp = move(p, a, b);
            if (~pp) {
              const State s{eval(pp), pp, -1, a, b};
              if (sm.score < s.score) {
                sm = s;
              }
            }
          }
          return sm;
}


int main() {
  init();
  
  char typ[110];
  scanf("%s", typ);
  if (!strcmp(typ, "prepare")) {
    int N;
    scanf("%d", &N);
    char A[1010][3];
    for (int i = 0; i < N; ++i) {
      scanf("%s", A[i]);
    }
    
    vector<vector<State>> dp(N + 1);
    dp[0].push_back(State{0, 0, -1, -1, -1});
    for (int i = 0; i < N; ++i) {
      for (int x = 0; x < (int)dp[i].size(); ++x) {
        const int p = dp[i][x].p;
        for (int j = 0; j < 2; ++j) {
          const int a = ILOTZ.find(A[i][j]);
          State sm = select(p, a);
          sm.prv = x;
          if (~sm.p) {
            dp[i + 1].push_back(sm);
          }
        }
        sort(dp[i + 1].begin(), dp[i + 1].end(), [&](const State &s0, const State &s1) -> bool {
          return (s0.score > s1.score);
        });
        if ((int)dp[i + 1].size() > BEAM) {
          dp[i + 1].resize(BEAM);
        }
      }
cerr<<"|dp["<<i+1<<"]| = "<<dp[i+1].size()<<endl;
    }
    string ans(N, '?');
    for (int i = N, x = 0; i; ) {
      const State s = dp[i][x];
      --i;
      ans[i] = ILOTZ[s.a];
      x = s.prv;
    }
    puts(ans.c_str());
  } else if (!strcmp(typ, "play")) {
    int N;
    scanf("%d", &N);
    int p = 0;
    for (int i = 0; i < N; ++i) {
      char c;
      scanf(" %c", &c);
      const int a = ILOTZ.find(c);
      const State s = select(p, a);
      for (int x = 0; x < 5; ++x) {
        for (int y = 0; y < 5; ++y) {
          const int z = x * 5 + y;
          putchar((p >> z & 1) ? '#' : (MINOSS[s.a][s.b] >> z & 1) ? '*' : '.');
        }
        puts("");
      }
      fflush(stdout);
      p = s.p;
    }
  } else {
    assert(false);
  }
  return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3708kb

First Run Input

prepare
6
TO LO ZI LI LT LT

First Run Output

OOIILL

Second Run Input

play
6
O
O
I
I
L
L

Second Run Output

.....
.....
.....
...**
...**
.....
.....
.....
.**##
.**##
.....
.....
.****
.####
.####
.....
.****
.####
.####
.####
**...
*####
*####
.####
.####
#....
.....
.**..
.*###
.*###

result:

ok good job!

Test #2:

score: 100
Accepted
time: 0ms
memory: 3608kb

First Run Input

prepare
1
ZI

First Run Output

I

Second Run Input

play
1
I

Second Run Output

.....
.....
.....
.....
.****

result:

ok good job!

Test #3:

score: 100
Accepted
time: 1ms
memory: 3944kb

First Run Input

prepare
10
LO TZ ZO OI OL ZL ZO TL OZ LO

First Run Output

OZOILZOLOO

Second Run Input

play
10
O
Z
O
I
L
Z
O
L
O
O

Second Run Output

.....
.....
.....
...**
...**
.....
.....
.....
**.##
.**##
.....
...**
...**
##.##
.####
..*..
..*##
..*##
##*##
.####
.....
...##
...##
..***
.#*##
.....
..*##
.**##
.*###
.####
**...
**###
.####
.####
.####
#....
.....
**###
.*###
.*###
#....
...**
...**
.####
.####
#....
.**##
.**##
.####
.####

result:

ok good job!

Test #4:

score: 100
Accepted
time: 2ms
memory: 3968kb

First Run Input

prepare
29
ZT OT ZL LT ZI LO IZ LT OI ZT ZT OL ZI LT LZ TZ IL ZI OT LZ LT LZ OT OI IO OZ IZ ZL ZL

First Run Output

TTLTILILITZLZLLZIZOZLLTOOZZLL

Second Run Input

play
29
T
T
L
T
I
L
I
L
I
T
Z
L
Z
L
L
Z
I
Z
O
Z
L
L
T
O
O
Z
Z
L
L

Second Run Output

.....
.....
.....
...*.
..***
.....
.....
.....
***#.
.*###
.....
....*
..***
####.
.####
.....
***.#
.*###
####.
.####
.****
###.#
.####
####.
.####
...##
#...#
..*##
#.*#.
.**##
.*.##
#*..#
.*###
#*##.
.####
...##
#...#
**###
#*##.
.*###
...##
#...#
.****
####.
.####
***##
#*..#
.####
####.
.####
...

result:

ok good job!

Test #5:

score: 100
Accepted
time: 3ms
memory: 3708kb

First Run Input

prepare
36
TI ZT IT IT OT OZ IL TZ ZO LO LZ ZL OT ZI IL OT OT ZI ZT TZ TI LT LO OL IL OL IZ OZ OL ZL LT IO ZO ZL ZO LT

First Run Output

TZIIOOLTOLZLTILOOITTTTLLLLZZOLLOOZZL

Second Run Input

play
36
T
Z
I
I
O
O
L
T
O
L
Z
L
T
I
L
O
O
I
T
T
T
T
L
L
L
L
Z
Z
O
L
L
O
O
Z
Z
L

Second Run Output

.....
.....
.....
...*.
..***
.....
.....
..*..
.**#.
.*###
*....
*....
*.#..
*###.
.####
#****
#....
#.#..
####.
.####
.....
#..**
#.#**
####.
.####
.**..
#**##
#.###
####.
.####
.#...
.....
#**##
##*#.
.#*##
.#...
...*.
..***
####.
.####
.#...
**.#.
**###
####.
.####
.....
#..#.
.**..
#*##.
.*###
...

result:

ok good job!

Test #6:

score: 100
Accepted
time: 4ms
memory: 3848kb

First Run Input

prepare
57
LT OI TL IZ OT TL LT TI LO LT LO LO OL IO LI IT TZ TZ IO ZT TI OT OI TL TL ZT TZ OL OI LI OZ ZI TO LZ IO IO LT OZ TO OZ IZ TZ LT ZO TO TZ OT LT ZO OL IL LO ZT OZ OL IL ZI

First Run Output

TILZTTTILLOLOILITZOTITOLTTTOIIOITLIITOTOZTTOTZOTZLLOZZLII

Second Run Input

play
57
T
I
L
Z
T
T
T
I
L
L
O
L
O
I
L
I
T
Z
O
T
I
T
O
L
T
T
T
O
I
I
O
I
T
L
I
I
T
O
T
O
Z
T
T
O
T
Z
O
T
Z
L
L
O
Z
Z
L
I
I

Second Run Output

.....
.....
.....
...*.
..***
.....
.*...
.*...
.*.#.
.*###
.....
.#...
.#***
.#.#*
.####
.**..
.#**.
.####
.#.##
.####
..#..
..##.
.*###
**.##
.*###
*.#..
**##.
*####
##.##
.####
#.#..
####.
.***.
##*##
.####
#....
##*#.
.#*#.
..*..
.#*##
#....
####*
.###*
..#**
.####
#....
**...
*####
*.###
.####
...

result:

ok good job!

Test #7:

score: 100
Accepted
time: 7ms
memory: 3840kb

First Run Input

prepare
88
ZL OL OT IT LO ZL OI ZT TO OI OL OL LZ ZT TL TZ IO ZL TZ TO IL LO ZT OL LT ZI TZ IL LT ZL OT TI ZO ZO ZT OZ TL TL LO OI TO OZ LI ZO ZT ZT IO IZ OZ ZO ZI ZO IO IO TI OL IL IT IL TL TL ZL IT IT ZO IO OL IL ZI TO OL IL ZI LZ LT IL LI ZO IL TL IT LI ZI OL TO OZ IZ OZ

First Run Output

ZLOTLLIZTILLZTLZILTTLLTLLZZLLLTIOOTZTLLOTOLOTTIIZZZOOIIOIILLLLIIZOLLZTOLZLLLLOILILILOZIZ

Second Run Input

play
88
Z
L
O
T
L
L
I
Z
T
I
L
L
Z
T
L
Z
I
L
T
T
L
L
T
L
L
Z
Z
L
L
L
T
I
O
O
T
Z
T
L
L
O
T
O
L
O
T
T
I
I
Z
Z
Z
O
O
I
I
O
I
I
L
L
L
L
I
I
Z
O
L
L
Z
T
O
L
Z
L
L
L
L
O
I
L
I
L
I
L
O
Z
I
Z

Second Run Output

.....
.....
.....
..**.
...**
.....
.....
.*...
.*##.
.**##
.....
...**
.#.**
.###.
.####
*....
**.##
*#.##
.###.
.####
#**..
##*##
##*##
.###.
.####
#....
.....
..*..
..*#.
.**##
#....
.****
..#..
..##.
.####
#....
*####
**#..
.*##.
.####
#....
....*
###**
.###*
.####
#....
....#
.****
.####
.####
...

result:

ok good job!

Test #8:

score: 100
Accepted
time: 8ms
memory: 3860kb

First Run Input

prepare
105
LI LI OI TL OZ LZ IL IZ IL TI IL IO OT LT LO ZO LI LZ OI IL ZT IT LZ IZ IZ LI IT LI IO TI ZL OI IT LO TZ OI IL OL IL OT IL OZ LT IO OL OL LO ZO TI LI LI LI ZO ZI LI OL TI TZ LO LT IL LZ IL OL ZT LT IZ IL TZ IT OZ TL ZI IZ IZ TO IT IO TO TI TO TZ ZT IZ LI IL ZI TI TL TZ TO LI LO OL IL IL ...

First Run Output

IIILZLIILILITTLOILOLTIZIIIILOTZITLZOILITIZTOLOLZTIIIZZLLIZLLILILZLILTIOLIIITTOTTTZZIIIIILTOLOLLITZLZOZTTL

Second Run Input

play
105
I
I
I
L
Z
L
I
I
L
I
L
I
T
T
L
O
I
L
O
L
T
I
Z
I
I
I
I
L
O
T
Z
I
T
L
Z
O
I
L
I
T
I
Z
T
O
L
O
L
Z
T
I
I
I
Z
Z
L
L
I
Z
L
L
I
L
I
L
Z
L
I
L
T
I
O
L
I
I
I
T
T
O
T
T
T
Z
Z
I
I
I
I
I
L
T
O
L
O
L
L
I
T
Z
L
Z
O
Z
T
T
L

Second Run Output

.....
.....
.....
.....
.****
.....
.....
.....
.****
.####
.....
.....
.****
.####
.####
*....
***..
.####
.####
.####
#.**.
###**
.####
.####
.####
#....
.....
.#.*#
.#.*#
.#**#
#....
.****
.#.##
.#.##
.####
#****
.####
.#.##
.#.##
.####
.....
..#..
....*
....*
..#**
.....
.*#..
.*..#
.*..#
.*###
...

result:

ok good job!

Test #9:

score: 100
Accepted
time: 15ms
memory: 4212kb

First Run Input

prepare
204
TZ TL OL TL ZO OT ZO LI TZ IO TI OL LZ TI TO ZT IL OI LT IT OZ TI OT TI ZL ZI ZO TI OI ZI TL LI ZI IO TI ZL LZ OL ZI TZ OI OI IZ LO IL LO IZ ZT ZT OL ZI OZ TL OI TI IT IZ ZL TI OI LZ OI TZ IZ IO OZ ZI TO OT TI TO IO IZ OI TZ LT TZ ZI OL LO LO OZ LO ZL LZ TZ LT TO OL LO LT TZ TL OZ ZO LO ...

First Run Output

ZLLTOTOLZITLLTOTIILTOTTTZIOIIITLZOTLLLIZIIILLLZTTOZZLOTIILIILOTZIOZOOITOZOZLZIOLOOLLLTLTLOLTLOOLZLIIZIOZTTLLZTOLOIIILOOTIZTLZIIIZZLLTLILILZLTLLTTILZOOLIZZLTILIOOZLILOLZIZOTZLOTZZIILLIOZLITITIZOZOLLTLLTLZO

Second Run Input

play
204
Z
L
L
T
O
T
O
L
Z
I
T
L
L
T
O
T
I
I
L
T
O
T
T
T
Z
I
O
I
I
I
T
L
Z
O
T
L
L
L
I
Z
I
I
I
L
L
L
Z
T
T
O
Z
Z
L
O
T
I
I
L
I
I
L
O
T
Z
I
O
Z
O
O
I
T
O
Z
O
Z
L
Z
I
O
L
O
O
L
L
L
T
L
T
L
O
L
T
L
O
O
L
Z
L
I
I
Z
I
O
Z
T
T
L
L
Z
T
O
L
O
I
I
I
L
O
O
T
I
Z
T
L
Z
I
I
I
Z
Z
L
L
T
L
I
L
I
L
Z
L
T
L
L
T
T
I...

Second Run Output

.....
.....
.....
..**.
...**
.....
.....
.*...
.*##.
.**##
.....
.....
.#***
.###*
.####
*....
**...
*####
.####
.####
#....
##.**
...**
.####
.####
#***.
##*##
...##
.####
.####
###..
**...
**..#
.##.#
.##.#
#.#..
#....
#.**#
..#*#
..#*#
#.#..
#....
#*###
**###
*.###
..#..
.*...
.*...
.*...
.*###
...

result:

ok good job!

Test #10:

score: 100
Accepted
time: 20ms
memory: 4676kb

First Run Input

prepare
303
ZT ZT IO ZL LT TI LO LZ TI ZT TI ZT LO OZ ZT TL IT TZ ZI IL TL OZ IO OT ZT TI LT ZT ZL ZL IO LZ IZ IZ ZT TZ OT OI LZ IL IZ TL IT ZO TL ZL IZ IZ LO LO ZI TI OT ZT OI IT ZI IL OI TO ZL LI TL LT OI LZ TI TZ OL ZO OZ IL LO ZT ZL IT TO ZI TZ IL IO LO LT IT OL LO ZT OZ OI TI OL OZ ZI IT IO IT ...

First Run Output

ZTOLTTLLITTZLZZTTZILLZOOTTTZLZOZIIZTTOZIILTOLLZILOITTZIIILOOLLTTOZITLOOILTLTTIZIILTILLZZOTLOITIILLZLOLLTLTTLLOOLZTTTZZZOTIZOZLLOTTZZOOILIIOLOOITZLLZZIZZLZTILLIILZOTTLZLLLTIILOOLTILZILIZZOIITOLOLZLOILLZIZLLITTTLTOLITOOTIOOLTZTOZILTOOOTLOZTLIOZLZOTOZTLLLOILLLZOIIOILLOOLLIOLLZLLIIZILTLLTLOOTTTTILTZLLLO...

Second Run Input

play
303
Z
T
O
L
T
T
L
L
I
T
T
Z
L
Z
Z
T
T
Z
I
L
L
Z
O
O
T
T
T
Z
L
Z
O
Z
I
I
Z
T
T
O
Z
I
I
L
T
O
L
L
Z
I
L
O
I
T
T
Z
I
I
I
L
O
O
L
L
T
T
O
Z
I
T
L
O
O
I
L
T
L
T
T
I
Z
I
I
L
T
I
L
L
Z
Z
O
T
L
O
I
T
I
I
L
L
Z
L
O
L
L
T
L
T
T
L
L
O
O
L
Z
T
T
T
Z
Z
Z
O
T
I
Z
O
Z
L
L
O
T
T
Z
Z
O
O
I
L
I
I
O
L
O
O
I
T
Z
L...

Second Run Output

.....
.....
.....
..**.
...**
.....
.....
.*...
**##.
.*.##
.....
...**
.#.**
####.
.#.##
.**..
..*##
.#*##
####.
.#.##
*##..
**###
*####
####.
.#.##
#.#..
....*
...**
#.##*
...##
#.#..
....#
.*.##
#*###
.**##
#.#..
....#
.#*##
..***
.####
#.#..
****#
.####
..###
.####
#....
.....
.#*##
.**##
.#*##
...

result:

ok good job!

Test #11:

score: 100
Accepted
time: 32ms
memory: 4892kb

First Run Input

prepare
502
LO LI OZ LO IO ZT LO OZ OZ ZI IO OT ZO LZ IZ ZT TL TL LI IL IZ TO IO IL OL OL OL LO ZI OZ OZ ZO OZ IT OZ LZ TZ TO LZ TL ZL IZ LZ ZO ZL IO IL LI LT ZI OZ IZ OI TZ LI ZT IT LO TO ZI LT OT LZ OI LZ OZ LZ IT TO TI OI TO TO OI TZ ZL IO OZ ZO ZL LZ IZ OI TL TO TI LZ ZL ZL OZ TI ZI TL LO ZT LI ...

First Run Output

OIOLIZLOZZITZLIZLTILITOLOLLLZOZZZIOZTOZLLZZZLILLTZOIOZLZTOTZLTLILZLIOTOTTOZLOZOZZIOTTIZLLOTZLLTIIITZTTZZLLOOLZTZOTLZOZLOLOOZOTLTILOZZLILLITZOOITIZOLTLOTILTLTZZIOIILZOLTLZLTOILLTOLTLTTTZTIOZLZLLZTILZTTZTIZZLLLOIOIITZOZTOLLLOZZIZLZOZOILLTLOIILTTOZZIIZTTLLTTTTILZZZOOZZITLLILLZLLTIIOZOOLTIZOTOITLIZOLIOO...

Second Run Input

play
502
O
I
O
L
I
Z
L
O
Z
Z
I
T
Z
L
I
Z
L
T
I
L
I
T
O
L
O
L
L
L
Z
O
Z
Z
Z
I
O
Z
T
O
Z
L
L
Z
Z
Z
L
I
L
L
T
Z
O
I
O
Z
L
Z
T
O
T
Z
L
T
L
I
L
Z
L
I
O
T
O
T
T
O
Z
L
O
Z
O
Z
Z
I
O
T
T
I
Z
L
L
O
T
Z
L
L
T
I
I
I
T
Z
T
T
Z
Z
L
L
O
O
L
Z
T
Z
O
T
L
Z
O
Z
L
O
L
O
O
Z
O
T
L
T
I
L
O
Z
Z
L
I
L
L
I
T
Z
O
O
I
T
I
Z...

Second Run Output

.....
.....
.....
...**
...**
.....
..*..
..*..
..*##
..*##
.....
..#**
..#**
..###
..###
.....
..###
**###
.*###
.*###
.....
..###
.****
.####
.####
.*...
**###
*####
.####
.####
.....
.....
.**..
.*###
.*###
.....
...**
.##**
.####
.####
**...
.**##
.####
.####
.####
#....
..###
*.###
**###
.*###
...

result:

ok good job!

Test #12:

score: 100
Accepted
time: 52ms
memory: 5948kb

First Run Input

prepare
801
TL TL TZ LO LO TI ZI LI LZ OT OZ LT OL IL OZ OT OT IO ZL OZ OT ZL LO TO TZ TL OI ZO TI ZI TO IT ZL TZ IZ IT IL ZO IO LT ZI OZ LO TI OI TO LI IL LT LZ LT OZ IL LZ ZO ZT IL ZL TZ OI IZ TL ZI OT TO IL IO OZ IO ZL OT IZ IZ IT IT OI OZ ZL ZT ZT OI IT IZ IL ZL LZ TI IZ IZ IZ ZI LT ZT LZ IO LZ ...

First Run Output

LLTLLIILZTOTLIZOTOLZTLOOZLOOTIOIZTIIIZOLIOLIITLLTLTZILOTLLTIZLZTOLIZOLOIIIIIOLTTITILZLTIZIILTZOLZITZZTZLLZTILIILLZLILITIOOOLLIZOZILZLIILLZOIOZLLTZZTIIITLOZIZOOTLILTZLIIOLLLIOOTOOTIITZLLIZLLLOLLITOIILOIOLTILOIZOILIOTIOZOLTLLZLZLOILIIIOZITTOLZOLOLLLIZLILLIZTOOLTLOLILILZOZITLOOITZOOOOLITZLITLIOZZOTZOZT...

Second Run Input

play
801
L
L
T
L
L
I
I
L
Z
T
O
T
L
I
Z
O
T
O
L
Z
T
L
O
O
Z
L
O
O
T
I
O
I
Z
T
I
I
I
Z
O
L
I
O
L
I
I
T
L
L
T
L
T
Z
I
L
O
T
L
L
T
I
Z
L
Z
T
O
L
I
Z
O
L
O
I
I
I
I
I
O
L
T
T
I
T
I
L
Z
L
T
I
Z
I
I
L
T
Z
O
L
Z
I
T
Z
Z
T
Z
L
L
Z
T
I
L
I
I
L
L
Z
L
I
L
I
T
I
O
O
O
L
L
I
Z
O
Z
I
L
Z
L
I
I
L
L
Z
O
I
O
Z
L
L
T
Z...

Second Run Output

.....
.....
.....
....*
..***
.....
.....
.....
.***#
.*###
.....
...*.
..***
.####
.####
.....
***#.
*.###
.####
.####
..***
####*
#.###
.####
.####
.....
....*
#...*
.#..*
.#..*
.....
...*#
#..*#
.#.*#
.#.*#
.....
...##
#**##
.#*##
.#*##
.....
.**##
..**.
.####
.####
.....
*####
**##.
*####
.####
...

result:

ok good job!

Test #13:

score: 0
Stage 1: Program answer Runtime Error

First Run Input

prepare
1000
LT LT TO OL ZI OI IO IL TO IO IT LZ ZL ZL OL OI OL TO IO OL IZ ZO TZ OZ TL LT IZ LO IZ IO IO ZT IO TZ LI ZL ZT LT TL TL IL TI OZ LO TO OI LI LI OL ZI ZI TI IO OL ZT LT ZL ZI TZ TL OT ZL OT TI OL IT ZL IT OT LZ LZ LZ IL OZ LO ZI TZ IT TO TZ OZ ZI IT TZ LZ ZT ZO LT OT TI OZ LI OZ TL LO OT...

First Run Output


Second Run Input


Second Run Output


result: