# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
538960 | Monarchuwu | 바이러스 (JOI19_virus) | C++17 | 2077 ms | 4776 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<iostream>
#include<algorithm>
#include<queue>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define ff first
#define ss second
const int N = 800 + 10;
const int dx[4] = { 0, 0, -1, 1 };
const int dy[4] = { -1, 1, 0, 0 };
int m, n, k;
int u[N][N];
char c[N << 1];
int op[256], cnt[16], ma[16];
void init() {
op['E'] = 0, op['W'] = 1, op['S'] = 2, op['N'] = 3;
copy(c, c + k, c + k);
k <<= 1;
for (int i = 1, x; i < k; ++i) {
x = op[c[i]];
for (int msk = 1; msk < 16; ++msk)
if (msk >> x & 1)
ma[msk] = max(ma[msk], ++cnt[msk]);
else cnt[msk] = 0;
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |