Submission #857456

#TimeUsernameProblemLanguageResultExecution timeMemory
857456mychecksedadRobot Contest (IOI23_robot)C++17
6 / 100
91 ms5712 KiB
#include "robot.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long int
#define MOD (1000000000)+7;
#define all(x) x.begin(), x.end()
#define en cout << '\n'
const int N = 1e3+100;

void set_instruction(std::vector<int> S, int Z, char A);
void sett(int west, int south, int east, int north){
	if(east == 0){
		if(south == 0){
			set_instruction({0, -2, 0, 0, -2}, 1, 'E');
			set_instruction({0, -2, 0, 0, -1}, 1, 'E');
			set_instruction({0, -2, 0, 0, 1}, 1, 'E');
			set_instruction({0, -2, 0, 0, 0}, 1, 'E');
			set_instruction({0, -1, 0, 0, -2}, 1, 'E');
			set_instruction({0, -1, 0, 0, -1}, 1, 'E');
			set_instruction({0, -1, 0, 0, 1}, 1, 'E');
			set_instruction({0, -1, 0, 0, 0}, 1, 'E');
			set_instruction({0, 1, 0, 0, -2}, 1, 'E');
			set_instruction({0, 1, 0, 0, -1}, 1, 'E');
			set_instruction({0, 1, 0, 0, 1}, 1, 'E');
			set_instruction({0, 1, 0, 0, 0}, 1, 'E');
			set_instruction({0, 0, 0, 0, -2}, 1, 'E');
			set_instruction({0, 0, 0, 0, -1}, 1, 'E');
			set_instruction({0, 0, 0, 0, 1}, 1, 'E');
			set_instruction({0, 0, 0, 0, 0}, 1, 'E');
		}else{
			set_instruction({0, -2, -2, 0, -2}, 1, 'E');
			set_instruction({0, -2, -2, 0, -1}, 1, 'E');
			set_instruction({0, -2, -2, 0, 1}, 1, 'E');
			set_instruction({0, -2, -2, 0, 0}, 1, 'E');
			set_instruction({0, -1, -2, 0, -2}, 1, 'E');
			set_instruction({0, -1, -2, 0, -1}, 1, 'E');
			set_instruction({0, -1, -2, 0, 1}, 1, 'E');
			set_instruction({0, -1, -2, 0, 0}, 1, 'E');
			set_instruction({0, 1, -2, 0, -2}, 1, 'E');
			set_instruction({0, 1, -2, 0, -1}, 1, 'E');
			set_instruction({0, 1, -2, 0, 1}, 1, 'E');
			set_instruction({0, 1, -2, 0, 0}, 1, 'E');
			set_instruction({0, 0, -2, 0, -2}, 1, 'E');
			set_instruction({0, 0, -2, 0, -1}, 1, 'E');
			set_instruction({0, 0, -2, 0, 1}, 1, 'E');
			set_instruction({0, 0, -2, 0, 0}, 1, 'E');

			set_instruction({0, -2, -1, 0, -2}, 1, 'E');
			set_instruction({0, -2, -1, 0, -1}, 1, 'E');
			set_instruction({0, -2, -1, 0, 1}, 1, 'E');
			set_instruction({0, -2, -1, 0, 0}, 1, 'E');
			set_instruction({0, -1, -1, 0, -2}, 1, 'E');
			set_instruction({0, -1, -1, 0, -1}, 1, 'E');
			set_instruction({0, -1, -1, 0, 1}, 1, 'E');
			set_instruction({0, -1, -1, 0, 0}, 1, 'E');
			set_instruction({0, 1, -1, 0, -2}, 1, 'E');
			set_instruction({0, 1, -1, 0, -1}, 1, 'E');
			set_instruction({0, 1, -1, 0, 1}, 1, 'E');
			set_instruction({0, 1, -1, 0, 0}, 1, 'E');
			set_instruction({0, 0, -1, 0, -2}, 1, 'E');
			set_instruction({0, 0, -1, 0, -1}, 1, 'E');
			set_instruction({0, 0, -1, 0, 1}, 1, 'E');
			set_instruction({0, 0, -1, 0, 0}, 1, 'E');

			set_instruction({0, -2, 1, 0, -2}, 1, 'E');
			set_instruction({0, -2, 1, 0, -1}, 1, 'E');
			set_instruction({0, -2, 1, 0, 1}, 1, 'E');
			set_instruction({0, -2, 1, 0, 0}, 1, 'E');
			set_instruction({0, -1, 1, 0, -2}, 1, 'E');
			set_instruction({0, -1, 1, 0, -1}, 1, 'E');
			set_instruction({0, -1, 1, 0, 1}, 1, 'E');
			set_instruction({0, -1, 1, 0, 0}, 1, 'E');
			set_instruction({0, 1, 1, 0, -2}, 1, 'E');
			set_instruction({0, 1, 1, 0, -1}, 1, 'E');
			set_instruction({0, 1, 1, 0, 1}, 1, 'E');
			set_instruction({0, 1, 1, 0, 0}, 1, 'E');
			set_instruction({0, 0, 1, 0, -2}, 1, 'E');
			set_instruction({0, 0, 1, 0, -1}, 1, 'E');
			set_instruction({0, 0, 1, 0, 1}, 1, 'E');
			set_instruction({0, 0, 1, 0, 0}, 1, 'E');
		}
	}else if(south == 0){
		set_instruction({0, -2, 0, -2, -2}, 1, 'S');
		set_instruction({0, -2, 0, -2, -1}, 1, 'S');
		set_instruction({0, -2, 0, -2, 1}, 1, 'S');
		set_instruction({0, -2, 0, -2, 0}, 1, 'S');
		set_instruction({0, -1, 0, -2, -2}, 1, 'S');
		set_instruction({0, -1, 0, -2, -1}, 1, 'S');
		set_instruction({0, -1, 0, -2, 1}, 1, 'S');
		set_instruction({0, -1, 0, -2, 0}, 1, 'S');
		set_instruction({0, 1, 0, -2, -2}, 1, 'S');
		set_instruction({0, 1, 0, -2, -1}, 1, 'S');
		set_instruction({0, 1, 0, -2, 1}, 1, 'S');
		set_instruction({0, 1, 0, -2, 0}, 1, 'S');
		set_instruction({0, 0, 0, -2, -2}, 1, 'S');
		set_instruction({0, 0, 0, -2, -1}, 1, 'S');
		set_instruction({0, 0, 0, -2, 1}, 1, 'S');
		set_instruction({0, 0, 0, -2, 0}, 1, 'S');

		set_instruction({0, -2, 0, -1, -2}, 1, 'S');
		set_instruction({0, -2, 0, -1, -1}, 1, 'S');
		set_instruction({0, -2, 0, -1, 1}, 1, 'S');
		set_instruction({0, -2, 0, -1, 0}, 1, 'S');
		set_instruction({0, -1, 0, -1, -2}, 1, 'S');
		set_instruction({0, -1, 0, -1, -1}, 1, 'S');
		set_instruction({0, -1, 0, -1, 1}, 1, 'S');
		set_instruction({0, -1, 0, -1, 0}, 1, 'S');
		set_instruction({0, 1, 0, -1, -2}, 1, 'S');
		set_instruction({0, 1, 0, -1, -1}, 1, 'S');
		set_instruction({0, 1, 0, -1, 1}, 1, 'S');
		set_instruction({0, 1, 0, -1, 0}, 1, 'S');
		set_instruction({0, 0, 0, -1, -2}, 1, 'S');
		set_instruction({0, 0, 0, -1, -1}, 1, 'S');
		set_instruction({0, 0, 0, -1, 1}, 1, 'S');
		set_instruction({0, 0, 0, -1, 0}, 1, 'S');

		set_instruction({0, -2, 0, 1, -2}, 1, 'S');
		set_instruction({0, -2, 0, 1, -1}, 1, 'S');
		set_instruction({0, -2, 0, 1, 1}, 1, 'S');
		set_instruction({0, -2, 0, 1, 0}, 1, 'S');
		set_instruction({0, -1, 0, 1, -2}, 1, 'S');
		set_instruction({0, -1, 0, 1, -1}, 1, 'S');
		set_instruction({0, -1, 0, 1, 1}, 1, 'S');
		set_instruction({0, -1, 0, 1, 0}, 1, 'S');
		set_instruction({0, 1, 0, 1, -2}, 1, 'S');
		set_instruction({0, 1, 0, 1, -1}, 1, 'S');
		set_instruction({0, 1, 0, 1, 1}, 1, 'S');
		set_instruction({0, 1, 0, 1, 0}, 1, 'S');
		set_instruction({0, 0, 0, 1, -2}, 1, 'S');
		set_instruction({0, 0, 0, 1, -1}, 1, 'S');
		set_instruction({0, 0, 0, 1, 1}, 1, 'S');
		set_instruction({0, 0, 0, 1, 0}, 1, 'S');
	}
}
void program_pulibot()
{
	sett(1, 0, 0, 1);
	sett(1, 0, 1, 1);
	sett(1, 1, 0, 1);
	set_instruction({0, -2, -2, -2, -2}, 1, 'T');
	set_instruction({0, -2, -2, -2, -1}, 1, 'T');
	set_instruction({0, -2, -2, -2, 1}, 1, 'T');
	set_instruction({0, -2, -2, -2, 0}, 1, 'T');
	set_instruction({0, -1, -2, -2, -2}, 1, 'T');
	set_instruction({0, -1, -2, -2, -1}, 1, 'T');
	set_instruction({0, -1, -2, -2, 1}, 1, 'T');
	set_instruction({0, -1, -2, -2, 0}, 1, 'T');
	set_instruction({0, 1, -2, -2, -2}, 1, 'T');
	set_instruction({0, 1, -2, -2, -1}, 1, 'T');
	set_instruction({0, 1, -2, -2, 1}, 1, 'T');
	set_instruction({0, 1, -2, -2, 0}, 1, 'T');
	set_instruction({0, 0, -2, -2, -2}, 1, 'T');
	set_instruction({0, 0, -2, -2, -1}, 1, 'T');
	set_instruction({0, 0, -2, -2, 1}, 1, 'T');
	set_instruction({0, 0, -2, -2, 0}, 1, 'T');
}
#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...