이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "robot.h"
using namespace std;
#define pb push_back
#define st first
#define nd second
typedef long long ll;
typedef long double ld;
const ll I = 1000'000'000'000'000'000LL;
const int II = 2'000'000'000;
const ll M = 1000'000'007LL;
const int N = 1000'007;
int tab[N];
// 1
// 0 1 -2
// 1
void Set(int a, int i, int j, int k, int l)
{
if(a == 0 && i == -2 && l == -2)
{
set_instruction({a, i, j, k, l}, 2, 'H');
return;
}
if(a == 0 && j == -2 && k == -2)
{
set_instruction({a, i, j, k, l}, 1, 'H');
return;
}
if((i == 1 || j == 1 || k == 1 || l == 1) && (a >= 6 && a <= 9))
{
set_instruction({a, i, j, k, l}, 1, 'H');
return;
}
if((i == 1 || i == 10 || j == 1 || j == 10 || k == 1 || k == 10 || l == 1 || l == 10) && (a >= 2 && a <= 5))
{
set_instruction({a, i, j, k, l}, 10, 'H');
return;
}
if(a == 1 || a == 10)
{
if(i == 4)
{
set_instruction({a, i, j, k, l}, a, 'W');
return;
}
if(j == 5)
{
set_instruction({a, i, j, k, l}, a, 'S');
return;
}
if(k == 2)
{
set_instruction({a, i, j, k, l}, a, 'E');
return;
}
if(l == 3)
{
set_instruction({a, i, j, k, l}, a, 'N');
return;
}
}
if(a == 10)
{
if(i == 10)
{
set_instruction({a, i, j, k, l}, 0, 'W');
return;
}
if(j == 10)
{
set_instruction({a, i, j, k, l}, 0, 'S');
return;
}
if(k == 10)
{
set_instruction({a, i, j, k, l}, 0, 'E');
return;
}
if(l == 10)
{
set_instruction({a, i, j, k, l}, 0, 'N');
return;
}
if(i == 1)
{
set_instruction({a, i, j, k, l}, 0, 'W');
return;
}
if(j == 1)
{
set_instruction({a, i, j, k, l}, 0, 'S');
return;
}
if(k == 1)
{
set_instruction({a, i, j, k, l}, 0, 'E');
return;
}
if(l == 1)
{
set_instruction({a, i, j, k, l}, 0, 'N');
return;
}
}
if(a == 1)
{
if(i == -2 && l == -2)
{
set_instruction({a, i, j, k, l}, 1, 'T');
return;
}
if(i == 8)
{
set_instruction({a, i, j, k, l}, 1, 'W');
return;
}
if(j == 9)
{
set_instruction({a, i, j, k, l}, 1, 'S');
return;
}
if(k == 6)
{
set_instruction({a, i, j, k, l}, 1, 'E');
return;
}
if(l == 7)
{
set_instruction({a, i, j, k, l}, 1, 'N');
return;
}
}
if(a == 0)
{
if(i == 8)
{
set_instruction({a, i, j, k, l}, 2, 'W');
return;
}
if(j == 9)
{
set_instruction({a, i, j, k, l}, 3, 'S');
return;
}
if(k == 6)
{
set_instruction({a, i, j, k, l}, 4, 'E');
return;
}
if(l == 7)
{
set_instruction({a, i, j, k, l}, 5, 'N');
return;
}
}
if(a > 1)
{
if(a < 6 && (i == 4 || i == 0))
{
set_instruction({a, i, j, k, l}, 6, 'W');
return;
}
if(a < 7 && (j == 5 || j == 0))
{
set_instruction({a, i, j, k, l}, 7, 'S');
return;
}
if(a < 8 && (k == 2 || k == 0))
{
set_instruction({a, i, j, k, l}, 8, 'E');
return;
}
if(a < 9 && (l == 3 || l == 0))
{
set_instruction({a, i, j, k, l}, 9, 'N');
return;
}
set_instruction({a, i, j, k, l}, 0, 'H');
return;
}
}
void program_pulibot()
{
for(int a = 0; a <= 10; ++a)
for(int i = -2; i <= 10; ++i)
for(int j = -2; j <= 10; ++j)
for(int k = -2; k <= 10; ++k)
for(int l = -2; l <= 10; ++l)
Set(a, i, j, k, l);
}
# | 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... |