Submission #244712

# Submission time Handle Problem Language Result Execution time Memory
244712 2020-07-04T16:37:27 Z santaclaus03 Political Development (BOI17_politicaldevelopment) C++14
16 / 100
200 ms 63224 KB
#include <bits/stdc++.h>
using namespace std;

int main() {
    int N, K; cin >> N >> K;
    vector<bitset<5000>> graph(N);
    for (int i = 0; i < N; ++i) {
        int D; cin >> D;
        for (int j = 0; j < D; ++j) {
            int x; cin >> x;
            graph[i][x] = true;
        }
    }
    int ans = 1;
    for (int i = 0; i < N; ++i) {
        for (int j = 0; j < N; ++j) {
            if (i == j || !graph[i][j]) continue;
            ans = max(ans, 2);
            bitset<5000> x = graph[i];
            x &= graph[j];
            if (x.any()) {
                ans = 3;
            }
        }
    }
    cout << ans << endl;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 4 ms 256 KB Output is correct
3 Correct 37 ms 3456 KB Output is correct
4 Correct 36 ms 3456 KB Output is correct
5 Correct 36 ms 3456 KB Output is correct
6 Correct 37 ms 3456 KB Output is correct
7 Correct 36 ms 3456 KB Output is correct
8 Correct 29 ms 3456 KB Output is correct
9 Correct 5 ms 256 KB Output is correct
10 Correct 30 ms 3456 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 4 ms 256 KB Output is correct
3 Correct 37 ms 3456 KB Output is correct
4 Correct 36 ms 3456 KB Output is correct
5 Correct 36 ms 3456 KB Output is correct
6 Correct 37 ms 3456 KB Output is correct
7 Correct 36 ms 3456 KB Output is correct
8 Correct 29 ms 3456 KB Output is correct
9 Correct 5 ms 256 KB Output is correct
10 Correct 30 ms 3456 KB Output is correct
11 Correct 35 ms 3456 KB Output is correct
12 Correct 36 ms 3456 KB Output is correct
13 Correct 5 ms 384 KB Output is correct
14 Correct 37 ms 3456 KB Output is correct
15 Correct 5 ms 384 KB Output is correct
16 Correct 38 ms 3456 KB Output is correct
17 Correct 4 ms 256 KB Output is correct
18 Correct 35 ms 3456 KB Output is correct
19 Correct 30 ms 3456 KB Output is correct
20 Correct 32 ms 3456 KB Output is correct
21 Correct 34 ms 3456 KB Output is correct
22 Correct 29 ms 3456 KB Output is correct
23 Correct 39 ms 3456 KB Output is correct
24 Correct 30 ms 3456 KB Output is correct
25 Correct 37 ms 3456 KB Output is correct
26 Correct 36 ms 3456 KB Output is correct
27 Correct 35 ms 3456 KB Output is correct
28 Correct 36 ms 3456 KB Output is correct
29 Correct 37 ms 3456 KB Output is correct
30 Correct 39 ms 3456 KB Output is correct
31 Correct 38 ms 3456 KB Output is correct
32 Correct 39 ms 3456 KB Output is correct
33 Correct 41 ms 3456 KB Output is correct
34 Correct 37 ms 3456 KB Output is correct
35 Correct 18 ms 1920 KB Output is correct
36 Correct 18 ms 1920 KB Output is correct
37 Correct 16 ms 1920 KB Output is correct
38 Correct 9 ms 1152 KB Output is correct
39 Correct 9 ms 1152 KB Output is correct
40 Correct 42 ms 3456 KB Output is correct
41 Correct 9 ms 1024 KB Output is correct
42 Correct 42 ms 3456 KB Output is correct
43 Correct 43 ms 3456 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 34 ms 3456 KB Output is correct
2 Correct 6 ms 384 KB Output is correct
3 Correct 4 ms 384 KB Output is correct
4 Correct 5 ms 256 KB Output is correct
5 Incorrect 5 ms 384 KB Output isn't correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 4 ms 256 KB Output is correct
3 Correct 37 ms 3456 KB Output is correct
4 Correct 36 ms 3456 KB Output is correct
5 Correct 36 ms 3456 KB Output is correct
6 Correct 37 ms 3456 KB Output is correct
7 Correct 36 ms 3456 KB Output is correct
8 Correct 29 ms 3456 KB Output is correct
9 Correct 5 ms 256 KB Output is correct
10 Correct 30 ms 3456 KB Output is correct
11 Correct 35 ms 3456 KB Output is correct
12 Correct 36 ms 3456 KB Output is correct
13 Correct 5 ms 384 KB Output is correct
14 Correct 37 ms 3456 KB Output is correct
15 Correct 5 ms 384 KB Output is correct
16 Correct 38 ms 3456 KB Output is correct
17 Correct 4 ms 256 KB Output is correct
18 Correct 35 ms 3456 KB Output is correct
19 Correct 30 ms 3456 KB Output is correct
20 Correct 32 ms 3456 KB Output is correct
21 Correct 34 ms 3456 KB Output is correct
22 Correct 29 ms 3456 KB Output is correct
23 Correct 39 ms 3456 KB Output is correct
24 Correct 30 ms 3456 KB Output is correct
25 Correct 37 ms 3456 KB Output is correct
26 Correct 36 ms 3456 KB Output is correct
27 Correct 35 ms 3456 KB Output is correct
28 Correct 36 ms 3456 KB Output is correct
29 Correct 37 ms 3456 KB Output is correct
30 Correct 39 ms 3456 KB Output is correct
31 Correct 38 ms 3456 KB Output is correct
32 Correct 39 ms 3456 KB Output is correct
33 Correct 41 ms 3456 KB Output is correct
34 Correct 37 ms 3456 KB Output is correct
35 Correct 18 ms 1920 KB Output is correct
36 Correct 18 ms 1920 KB Output is correct
37 Correct 16 ms 1920 KB Output is correct
38 Correct 9 ms 1152 KB Output is correct
39 Correct 9 ms 1152 KB Output is correct
40 Correct 42 ms 3456 KB Output is correct
41 Correct 9 ms 1024 KB Output is correct
42 Correct 42 ms 3456 KB Output is correct
43 Correct 43 ms 3456 KB Output is correct
44 Incorrect 53 ms 3456 KB Output isn't correct
45 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 4 ms 256 KB Output is correct
3 Correct 37 ms 3456 KB Output is correct
4 Correct 36 ms 3456 KB Output is correct
5 Correct 36 ms 3456 KB Output is correct
6 Correct 37 ms 3456 KB Output is correct
7 Correct 36 ms 3456 KB Output is correct
8 Correct 29 ms 3456 KB Output is correct
9 Correct 5 ms 256 KB Output is correct
10 Correct 30 ms 3456 KB Output is correct
11 Correct 35 ms 3456 KB Output is correct
12 Correct 36 ms 3456 KB Output is correct
13 Correct 5 ms 384 KB Output is correct
14 Correct 37 ms 3456 KB Output is correct
15 Correct 5 ms 384 KB Output is correct
16 Correct 38 ms 3456 KB Output is correct
17 Correct 4 ms 256 KB Output is correct
18 Correct 35 ms 3456 KB Output is correct
19 Correct 30 ms 3456 KB Output is correct
20 Correct 32 ms 3456 KB Output is correct
21 Correct 34 ms 3456 KB Output is correct
22 Correct 29 ms 3456 KB Output is correct
23 Correct 39 ms 3456 KB Output is correct
24 Correct 30 ms 3456 KB Output is correct
25 Correct 37 ms 3456 KB Output is correct
26 Correct 36 ms 3456 KB Output is correct
27 Correct 35 ms 3456 KB Output is correct
28 Correct 36 ms 3456 KB Output is correct
29 Correct 37 ms 3456 KB Output is correct
30 Correct 39 ms 3456 KB Output is correct
31 Correct 38 ms 3456 KB Output is correct
32 Correct 39 ms 3456 KB Output is correct
33 Correct 41 ms 3456 KB Output is correct
34 Correct 37 ms 3456 KB Output is correct
35 Correct 18 ms 1920 KB Output is correct
36 Correct 18 ms 1920 KB Output is correct
37 Correct 16 ms 1920 KB Output is correct
38 Correct 9 ms 1152 KB Output is correct
39 Correct 9 ms 1152 KB Output is correct
40 Correct 42 ms 3456 KB Output is correct
41 Correct 9 ms 1024 KB Output is correct
42 Correct 42 ms 3456 KB Output is correct
43 Correct 43 ms 3456 KB Output is correct
44 Correct 4 ms 256 KB Output is correct
45 Runtime error 200 ms 63224 KB Execution killed with signal 11 (could be triggered by violating memory limits)
46 Halted 0 ms 0 KB -