| # | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 683615 | rainboy | Arranging Tickets (JOI17_arranging_tickets) | C11 | 6018 ms | 212 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
#include <string.h>
#define N 300
#define M 300
#define INF 0x3f3f3f3f
int min(int a, int b) { return a < b ? a : b; }
int max(int a, int b) { return a > b ? a : b; }
int main() {
static int xx[N], yy[N], cc[N], dd[M], ll[N], rr[N];
static char flip[N];
int n, m, i, i_, a, b, tmp, upd, ans;
scanf("%d%d", &m, &n);
for (i = 0; i < n; i++)
scanf("%d%d%d", &xx[i], &yy[i], &cc[i]), xx[i]--, yy[i]--;
ans = INF;
for (a = 0; a < m; a++) {
for (i = 0; i < n; i++) {
ll[i] = (xx[i] - a + m) % m, rr[i] = (yy[i] - a + m) % m;
if (ll[i] > rr[i])
tmp = ll[i], ll[i] = rr[i], rr[i] = tmp;
}
memset(flip, 0, n * sizeof *flip);
while (1) {
memset(dd, 0, m * sizeof *dd);
for (i = 0; i < n; i++)
if (!flip[i])
컴파일 시 표준 에러 (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... | ||||
