제출 #1300682

#제출 시각아이디문제언어결과실행 시간메모리
1300682khoavn2008Robot Contest (IOI23_robot)C++17
25 / 100
38 ms7484 KiB
#include "robot.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define FOR(i,l,r) for(int i = (l), _r = (r); i <= _r; i++) #define FORNG(i,r,l) for(int i = (r), _l = (l); i >= _l; i--) #define REP(i,r) for(int i = 0, _r = (r); i < _r; i++) #define endl '\n' #define fi first #define se second #define pb push_back #define size(v) ((ll)(v).size()) #define all(v) (v).begin(),(v).end() #define MASK(x) (1LL << (x)) #define BIT(x,i) (((x) >> (i)) & 1) const ll MOD = 1e9 + 7, N = 2e5 + 36, LOG = 18; const ll INF = 1e18 + 36; #define MAXCOLOR 5 #define WALL -2 #define BLOCK -1 #define EMPTY 0 #define PATH 1 #define BLOCKPATH 2 /* 4 1 0 3 2 N W 0 E S */ void program_pulibot(){ FOR(CUR,-2,MAXCOLOR)FOR(W,-2,MAXCOLOR)FOR(S,-2,MAXCOLOR)FOR(E,-2,MAXCOLOR)FOR(N,-2,MAXCOLOR){ if(CUR == 0)set_instruction({CUR,W,S,E,N}, PATH, 'H'); if(CUR == PATH){ if(E == WALL && S == WALL)set_instruction({CUR,W,S,E,N}, PATH, 'T'); else if(W != EMPTY && S != EMPTY && N != EMPTY && E == PATH)set_instruction({CUR,W,S,E,N}, BLOCKPATH, 'E'); else if(E != EMPTY && N != EMPTY && W != EMPTY && S == PATH)set_instruction({CUR,W,S,E,N}, BLOCKPATH, 'S'); else if(E != EMPTY && S != EMPTY && N != EMPTY && W == PATH)set_instruction({CUR,W,S,E,N}, BLOCKPATH, 'W'); else if(E != EMPTY && S != EMPTY && W != EMPTY && N == PATH)set_instruction({CUR,W,S,E,N}, BLOCKPATH, 'N'); else if(E == EMPTY)set_instruction({CUR,W,S,E,N}, PATH, 'E'); else if(S == EMPTY)set_instruction({CUR,W,S,E,N}, PATH, 'S'); else if(W == EMPTY)set_instruction({CUR,W,S,E,N}, PATH, 'W'); else if(N == EMPTY)set_instruction({CUR,W,S,E,N}, PATH, 'N'); } } }
#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...