# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
29005 | 2017-07-18T05:39:49 Z | 김동현(#1169) | Arranging Tickets (JOI17_arranging_tickets) | C++14 | 633 ms | 2020 KB |
#include <bits/stdc++.h> using namespace std; int n, m, a[22], b[22], c[22], ans; int main(){ scanf("%d%d", &n, &m); for(int i = 0, _; i < m; i++){ scanf("%d%d%d", a + i, b + i, &_); a[i]--; b[i]--; } ans = m; for(int i = 0; i < (1 << m); i++){ fill(c, c + n, 0); for(int j = 0; j < m; j++){ for(int k = 0; k < n; k++){ c[k] += ((i >> j) & 1) ^ (a[j] <= k && k < b[j]); } } ans = min(ans, *max_element(c, c + n)); } printf("%d\n", ans); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 633 ms | 2020 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 633 ms | 2020 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 633 ms | 2020 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 633 ms | 2020 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 633 ms | 2020 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |