# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1066717 | irmuun | Robot Contest (IOI23_robot) | C++17 | 90 ms | 5968 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#include "robot.h"
using namespace std;
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()
//west-zuun
//south-dood
//east-baruun
//north-deed
void program_pulibot(){
vector<int>v(5);
for(v[0]=0;v[0]<=5;v[0]++){
for(v[1]=-2;v[1]<=5;v[1]++){
for(v[2]=-2;v[2]<=5;v[2]++){
for(v[3]=-2;v[3]<=5;v[3]++){
for(v[4]=-2;v[4]<=5;v[4]++){
if(v[2]==-2&&v[3]==-2){//at RD corner
if(v[1]==3){
set_instruction(v,1,'W');
}
else if(v[4]==2){
set_instruction(v,1,'N');
}
continue;
}
if(v[2]==1||v[3]==1){
if(v[1]==-2&&v[2]==-1){
set_instruction(v,1,'T');
}
else if(v[1]==3){
set_instruction(v,1,'W');
}
else if(v[4]==2){
set_instruction(v,1,'N');
}
continue;
}
//finding path
if(v[0]==0){
if(v[2]==0){
set_instruction(v,2,'S');
}
else if(v[3]==0){
set_instruction(v,3,'E');
}
else{//back
if(v[1]==3){
set_instruction(v,5,'W');
}
else if(v[4]==2){
set_instruction(v,4,'N');
}
}
continue;
}
if(v[0]==2){
if(v[3]==0){
set_instruction(v,3,'E');
}
else{
if(v[1]==3){
set_instruction(v,5,'W');
}
else if(v[4]==2){
set_instruction(v,4,'N');
}
}
continue;
}
if(v[0]==3){
if(v[1]==3){
set_instruction(v,5,'W');
}
else if(v[4]==2){
set_instruction(v,4,'N');
}
continue;
}
}
}
}
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |