# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
813879 | 2023-08-08T04:21:05 Z | 반딧불(#10119) | Arranging Tickets (JOI17_arranging_tickets) | C++17 | 638 ms | 312 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n, k; int arr[200002]; int ex[200002], ey[200002], ew[200002]; int ans = 1e9; int main(){ scanf("%d %d", &n, &k); for(int i=1; i<=k; i++){ scanf("%d %d %d", &ex[i], &ey[i], &ew[i]); if(ex[i] > ey[i]) swap(ex[i], ey[i]); } for(int d=0; d<(1<<(k+1)); d+=2){ for(int i=1; i<=n; i++) arr[i] = 0; for(int i=1; i<=k; i++){ for(int j=1; j<=n; j++){ if(((d>>i)&1) == (ex[i] <= j && j < ey[i])) arr[j]++; } } ans = min(ans, *max_element(arr+1, arr+n+1)); } printf("%d", ans); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 619 ms | 300 KB | Output is correct |
2 | Correct | 581 ms | 300 KB | Output is correct |
3 | Correct | 603 ms | 300 KB | Output is correct |
4 | Correct | 574 ms | 296 KB | Output is correct |
5 | Correct | 601 ms | 304 KB | Output is correct |
6 | Correct | 615 ms | 300 KB | Output is correct |
7 | Correct | 595 ms | 300 KB | Output is correct |
8 | Correct | 592 ms | 300 KB | Output is correct |
9 | Correct | 595 ms | 212 KB | Output is correct |
10 | Correct | 586 ms | 312 KB | Output is correct |
11 | Correct | 601 ms | 296 KB | Output is correct |
12 | Correct | 573 ms | 300 KB | Output is correct |
13 | Correct | 638 ms | 296 KB | Output is correct |
14 | Correct | 622 ms | 300 KB | Output is correct |
15 | Correct | 579 ms | 300 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 619 ms | 300 KB | Output is correct |
2 | Correct | 581 ms | 300 KB | Output is correct |
3 | Correct | 603 ms | 300 KB | Output is correct |
4 | Correct | 574 ms | 296 KB | Output is correct |
5 | Correct | 601 ms | 304 KB | Output is correct |
6 | Correct | 615 ms | 300 KB | Output is correct |
7 | Correct | 595 ms | 300 KB | Output is correct |
8 | Correct | 592 ms | 300 KB | Output is correct |
9 | Correct | 595 ms | 212 KB | Output is correct |
10 | Correct | 586 ms | 312 KB | Output is correct |
11 | Correct | 601 ms | 296 KB | Output is correct |
12 | Correct | 573 ms | 300 KB | Output is correct |
13 | Correct | 638 ms | 296 KB | Output is correct |
14 | Correct | 622 ms | 300 KB | Output is correct |
15 | Correct | 579 ms | 300 KB | Output is correct |
16 | Incorrect | 335 ms | 296 KB | Output isn't correct |
17 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 619 ms | 300 KB | Output is correct |
2 | Correct | 581 ms | 300 KB | Output is correct |
3 | Correct | 603 ms | 300 KB | Output is correct |
4 | Correct | 574 ms | 296 KB | Output is correct |
5 | Correct | 601 ms | 304 KB | Output is correct |
6 | Correct | 615 ms | 300 KB | Output is correct |
7 | Correct | 595 ms | 300 KB | Output is correct |
8 | Correct | 592 ms | 300 KB | Output is correct |
9 | Correct | 595 ms | 212 KB | Output is correct |
10 | Correct | 586 ms | 312 KB | Output is correct |
11 | Correct | 601 ms | 296 KB | Output is correct |
12 | Correct | 573 ms | 300 KB | Output is correct |
13 | Correct | 638 ms | 296 KB | Output is correct |
14 | Correct | 622 ms | 300 KB | Output is correct |
15 | Correct | 579 ms | 300 KB | Output is correct |
16 | Incorrect | 335 ms | 296 KB | Output isn't correct |
17 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 619 ms | 300 KB | Output is correct |
2 | Correct | 581 ms | 300 KB | Output is correct |
3 | Correct | 603 ms | 300 KB | Output is correct |
4 | Correct | 574 ms | 296 KB | Output is correct |
5 | Correct | 601 ms | 304 KB | Output is correct |
6 | Correct | 615 ms | 300 KB | Output is correct |
7 | Correct | 595 ms | 300 KB | Output is correct |
8 | Correct | 592 ms | 300 KB | Output is correct |
9 | Correct | 595 ms | 212 KB | Output is correct |
10 | Correct | 586 ms | 312 KB | Output is correct |
11 | Correct | 601 ms | 296 KB | Output is correct |
12 | Correct | 573 ms | 300 KB | Output is correct |
13 | Correct | 638 ms | 296 KB | Output is correct |
14 | Correct | 622 ms | 300 KB | Output is correct |
15 | Correct | 579 ms | 300 KB | Output is correct |
16 | Incorrect | 335 ms | 296 KB | Output isn't correct |
17 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 619 ms | 300 KB | Output is correct |
2 | Correct | 581 ms | 300 KB | Output is correct |
3 | Correct | 603 ms | 300 KB | Output is correct |
4 | Correct | 574 ms | 296 KB | Output is correct |
5 | Correct | 601 ms | 304 KB | Output is correct |
6 | Correct | 615 ms | 300 KB | Output is correct |
7 | Correct | 595 ms | 300 KB | Output is correct |
8 | Correct | 592 ms | 300 KB | Output is correct |
9 | Correct | 595 ms | 212 KB | Output is correct |
10 | Correct | 586 ms | 312 KB | Output is correct |
11 | Correct | 601 ms | 296 KB | Output is correct |
12 | Correct | 573 ms | 300 KB | Output is correct |
13 | Correct | 638 ms | 296 KB | Output is correct |
14 | Correct | 622 ms | 300 KB | Output is correct |
15 | Correct | 579 ms | 300 KB | Output is correct |
16 | Incorrect | 335 ms | 296 KB | Output isn't correct |
17 | Halted | 0 ms | 0 KB | - |