# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1068426 | amirhoseinfar1385 | 로봇 대회 (IOI23_robot) | C++17 | 93 ms | 5848 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "robot.h"
#include<bits/stdc++.h>
using namespace std;
void program_pulibot()
{
for(int khod=0;khod<=4;khod++){
for(int chap=-2;chap<=4;chap++){
for(int paee=-2;paee<=4;paee++){
for(int rast=-2;rast<=4;rast++){
for(int bal=-2;bal<=4;bal++){
vector<int>v={khod,chap,paee,rast,bal};
if(khod==0||khod==2){
if(chap==0){
set_instruction(v,2,'W');
continue;
}
if(paee==0){
set_instruction(v,2,'S');
continue;
}
if(rast==0){
set_instruction(v,2,'E');
continue;
}
if(bal==0){
set_instruction(v,2,'N');
continue;
}
int z=3;
if((paee==-2&&rast==-2)||max(max(chap,rast),max(paee,bal))==4){
z=4;
}
if(chap==2){
set_instruction(v,z,'W');
continue;
}
if(paee==2){
set_instruction(v,z,'S');
continue;
}
if(rast==2){
set_instruction(v,z,'E');
continue;
}
if(bal==2){
set_instruction(v,z,'N');
continue;
}
set_instruction(v,z,'H');
}else if(khod==3){
if(chap==3){
set_instruction(v,3,'W');
continue;
}
if(paee==3){
set_instruction(v,3,'S');
continue;
}
if(rast==3){
set_instruction(v,3,'E');
continue;
}
if(bal==3){
set_instruction(v,3,'N');
continue;
}
if(chap!=0&&chap>=0){
set_instruction(v,0,'W');
continue;
}
if(paee!=0&&paee>=0){
set_instruction(v,0,'S');
continue;
}
if(rast!=0&&rast>=0){
set_instruction(v,0,'E');
continue;
}
if(bal!=0&&bal>=0){
set_instruction(v,0,'N');
continue;
}
}else{
if(chap==3){
set_instruction(v,4,'W');
continue;
}
if(paee==3){
set_instruction(v,4,'S');
continue;
}
if(rast==3){
set_instruction(v,4,'E');
continue;
}
if(bal==3){
set_instruction(v,4,'N');
continue;
}
if(chap==4){
set_instruction(v,1,'W');
continue;
}
if(paee==4){
set_instruction(v,1,'S');
continue;
}
if(rast==4){
set_instruction(v,1,'E');
continue;
}
if(bal==4){
set_instruction(v,1,'N');
continue;
}
set_instruction(v,1,'T');
}
}
}
}
}
}
// set_instruction({0, -2, -1, 0, -2}, 1, 'E');
// set_instruction({0, 1, -1, 0, -2}, 1, 'E');
// set_instruction({0, 1, 0, -2, -2}, 1, 'S');
// set_instruction({0, -1, -2, -2, 1}, 1, 'T');
}
# | 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... |