| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 810549 | rainboy | Bliskost (COI23_bliskost) | C11 | 182 ms | 15868 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
#define N 1000000
int main() {
static char aa[N + 1], bb[N + 1];
int n, q, i, d;
scanf("%d%d%s%s", &n, &q, aa, bb);
if (n == 1) {
printf(aa[0] == bb[0] ? "da\n" : "ne\n");
while (q--) {
static char s[2];
scanf("%d%s", &i, s), i--;
aa[i] = s[0];
printf(aa[0] == bb[0] ? "da\n" : "ne\n");
}
} else {
d = 0;
for (i = 0; i < n; i++)
d = (d + (aa[i] - 'a') * (i % 2 == 0 ? 1 : -1)) % 26;
for (i = 0; i < n; i++)
d = (d - (bb[i] - 'a') * (i % 2 == 0 ? 1 : -1)) % 26;
printf(d == 0 ? "da\n" : "ne\n");
while (q--) {
static char s[2];
scanf("%d%s", &i, s), i--;
d = (d - (aa[i] - 'a') * (i % 2 == 0 ? 1 : -1)) % 26;
aa[i] = s[0];
d = (d + (aa[i] - 'a') * (i % 2 == 0 ? 1 : -1)) % 26;
printf(d == 0 ? "da\n" : "ne\n");
}
}
return 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... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
