# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1165177 | Agageldi | 로봇 (APIO13_robots) | C++20 | 1 ms | 328 KiB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define N 600005
#define pb push_back
#define ff first
#define ss second
#define all(x) x.begin(),x.end()
#define SZ(s) (int)s.size()
ll n, w, h, vis[500][500][10], answer = INT_MAX, tp;
pair <int,int> location[10];
char a[500][500];
int check(char c,int direction){
if(direction == 1 && c == 'C' || direction == 2 && c == 'A') return 4;
else if(direction == 1 && c == 'A' || direction == 2 && c == 'C') return 3;
else if(direction == 3 && c == 'C' || direction == 4 && c == 'A') return 1;
else return 2;
}
pair<pair<int,int>,pair<int,int>> f(int i,int j,int direction) {
while(direction == 1 && j < h && a[i][j + 1] != 'x') {
j++;
if(a[i][j] != '.') return {{i,1},{j,check(a[i][j],direction)}};
}
while(direction == 2 && j > 1 && a[i][j - 1] != 'x') {
j--;
if(a[i][j] != '.') return {{i,1},{j,check(a[i][j],direction)}};
}
# | 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... |