Submission #1057964

#TimeUsernameProblemLanguageResultExecution timeMemory
1057964TheQuantiXRobot Contest (IOI23_robot)C++17
16 / 100
106 ms5948 KiB
#include <bits/stdc++.h>
#include "robot.h"

using namespace std;
using ll = long long;

ll n, m, q, k, x, y, a, b, c, l;
set< vector<int> > st;

void set_any(vector<int> v, int z, int a) {
    // for (auto i : v) {
    //     cout << i << ' ';
    // }
    // cout << endl;
    for (int i = 0; i < 5; i++) {
        if (v[i] == -3) {
            for (int j = -2; j <= 2; j++) {
                v[i] = j;
                set_any(v, z, a);
            }
            v[i] = -3;
            return;
        }
        if (v[i] == -4) {
            for (int j = -2; j <= -1; j++) {
                v[i] = j;
                set_any(v, z, a);
            }
            v[i] = -4;
            return;
        }
    }
    if (!st.count(v)) {
        set_instruction(v, z, a);
        st.insert(v);
    }
}

void program_pulibot() {
    set_any({-3, -3, -2, -2, -3}, 1, 'T');
    set_any({-3, -3, -3, 0, -3}, 1, 'E');
    set_any({-3, -3, 0, -3, -3}, 1, 'S');
    set_any({-3, -3, -3, -3, 0}, 1, 'N');
    set_any({-3, 1, -4, -4, -4}, 2, 'W');
}
#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...