# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1165133 | Muhammet | 로봇 (APIO13_robots) | C++20 | 0 ms | 328 KiB |
#include "bits/stdc++.h"
using namespace std;
#define ff first
#define ss second
#define ll long long
const int N = 505;
char a[N][N];
int b[10][N][N], n, w, h;
struct ab {
int x, y, k;
};
pair <int, int> f1(int i, int j, int x1, int y1) {
while(a[i + x1][j + y1] != 'x' and i + x1 <= h and i + x1 > 0 and j + y1 <= w and j + y1 > 0) {
i += x1, j += y1;
if(a[i][j] == 'C') {
if(x1 == -1 and y1 == 0) x1 = 0, y1 = 1;
else if(x1 == 0 and y1 == 1) x1 = 1, y1 = 0;
else if(x1 == 1 and y1 == 0) x1 = 0, y1 = -1;
else if(x1 == 0 and y1 == -1) x1 = -1, y1 = 0;
}
if(a[i][j] == 'A') {
if(x1 == -1 and y1 == 0) x1 = 0, y1 = -1;
else if(x1 == 0 and y1 == 1) x1 = -1, y1 = 0;
# | 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... |