# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
480119 | rainboy | ACM (COCI19_acm) | C11 | 6 ms | 460 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
#include <string.h>
#define N 1000
int main() {
static char cc[N][32];
static int aa[N], bb[N];
int n, m, i, j, a, b, cnt;
scanf("%d%d", &n, &m);
for (i = 0; i < n; i++) {
scanf("%s", cc[i]);
for (j = 0; j < m; j++) {
static char str[16];
int k, h, m, s;
scanf("%s", str);
if (str[0] == '-')
continue;
sscanf(str, "%*c%d/%d:%d:%d", &k, &h, &m, &s);
aa[i]++, bb[i] += k * 20 * 60 + (h * 60 + m) * 60 + s;
}
}
scanf("%*s");
a = b = 0;
for (j = 0; j < m; j++) {
static char str[16];
int k, h, m, s;
scanf("%s", str);
if (str[0] == '+') {
sscanf(str, "%*c%d/%d:%d:%d", &k, &h, &m, &s);
a++, b += k * 20 * 60 + (h * 60 + m) * 60 + s;
}
}
cnt = 1;
for (i = 0; i < n; i++) {
int c = strcmp(cc[i], "NijeZivotJedanACM");
if (c == 0)
continue;
if (a < aa[i] || a == aa[i] && (b > bb[i] || b == bb[i] && c < 0))
cnt++;
}
printf("%d\n", cnt);
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |