| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 479345 | rainboy | Titlovi (COCI19_titlovi) | C11 | 1 ms | 204 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
#include <string.h>
#define K 30
#define L 16384
#define T 86400000
int main() {
static char buf[L], txt[K][L];
static int xx[K], ll[K], rr[K];
int k, h, t;
k = 0;
while (1) {
int h1, m1, s1, ms1, h2, m2, s2, ms2;
char *ptr;
fgets(buf, L, stdin), sscanf(buf, "%d", &xx[k]);
fgets(buf, L, stdin), sscanf(buf, "%d:%d:%d,%d --> %d:%d:%d,%d",
&h1, &m1, &s1, &ms1,
&h2, &m2, &s2, &ms2);
ll[k] = ((h1 * 60 + m1) * 60 + s1) * 1000 + ms1;
rr[k] = ((h2 * 60 + m2) * 60 + s2) * 1000 + ms2;
ptr = txt[k++];
while (1) {
char c;
fgets(ptr, L, stdin);
c = ptr[0], ptr += strlen(ptr);
if (c == '\n')
break;
if (c == '#')
goto out;
}
}
out:
fgets(buf, L, stdin), sscanf(buf, "%d", &t);
for (h = 0; h < k; h++) {
int l = (ll[h] + t + T) % T, r = (rr[h] + t + T) % T;
printf("%d\n", xx[h]);
printf("%02d:%02d:%02d,%03d --> %02d:%02d:%02d,%03d\n",
l / 1000 / 60 / 60, l / 1000 / 60 % 60, l / 1000 % 60, l % 1000,
r / 1000 / 60 / 60, r / 1000 / 60 % 60, r / 1000 % 60, r % 1000);
printf("%s", txt[h]);
}
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
