Submission #1233918

#TimeUsernameProblemLanguageResultExecution timeMemory
1233918Ghulam_JunaidRobot Contest (IOI23_robot)C++20
16 / 100
85 ms5716 KiB
#include <bits/stdc++.h>
#include "robot.h"
using namespace std;

void program_pulibot(){
    vector<int> poss = {-2, -1, 0, 1, 2};
    for (int cur : poss){
        for (int left : poss){
            for (int down : poss){
                for (int right : poss){
                    for (int up : poss){
                        vector<int> state = {cur, left, down, right, up};
                        vector<int> chars = {'H', 'W', 'S', 'E', 'N'};
                        if (state[3] == -2 and state[2] == -2){
                            set_instruction(state, 1, 'T');
                            continue;
                        }
                        if ((state[3] == -1 or state[3] == -2 or state[3] == 2) and (state[2] == -1 or state[2] == -2 or state[2] == 2)){
                            int back = 1;
                            if (state[4] == 1) back = 4;
                            set_instruction(state, 2, chars[back]);
                            continue;
                        }
                        if (state[3] == 0)
                            set_instruction(state, 1, chars[3]);
                        else
                            set_instruction(state, 1, chars[2]);
                    }
                }
            }
        }
    }
}
#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...