제출 #1327726

#제출 시각아이디문제언어결과실행 시간메모리
1327726SpyrosAliv로봇 대회 (IOI23_robot)C++20
16 / 100
37 ms5736 KiB
#include "robot.h"
#include <bits/stdc++.h>
using namespace std;

set<vector<int>> b4;

void add_instr(vector<int> S, int Z, char A) {
    if (b4.find(S) == b4.end()) {
        set_instruction(S, Z, A);
        b4.insert(S);
    }
}

void program_pulibot()
{
    for (int i = -2; i <= 1; i++) {
        for (int j = -2; j <= 1; j++) {
            for (int k = -2; k <= 1; k++) {
                add_instr({i, j, -2, -2, k}, 1, 'T'); // boundary both right and down
            }
        }
    }
    for (int i = -2; i <= 1; i++) {
        for (int j = -2; j <= 1; j++) {
            for (int k = -2; k <= 1; k++) {
                for (int l = -2; l <= 1; l++) {
                    add_instr({i, j, k, 0, l}, 1, 'E'); // no boundary at right
                }
            }
        }
    }
    for (int i = -2; i <= 1; i++) {
        for (int j = -2; j <= 1; j++) {
            for (int k = -2; k <= 1; k++) {
                add_instr({i, j, 0, -2, k}, 1, 'S'); // boundary at right but not down
                add_instr({i, j, 0, -1, k}, 1, 'S'); // boundary at right but not down
                add_instr({i, j, k, -2, 0}, 1, 'N'); // boundary at right but not up
                add_instr({i, j, k, -1, 0}, 1, 'N'); // boundary at right but not up
            }
        }
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...