Submission #244709

# Submission time Handle Problem Language Result Execution time Memory
244709 2020-07-04T16:33:52 Z santaclaus03 Political Development (BOI17_politicaldevelopment) C++14
0 / 100
3000 ms 3456 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 (graph[i][j]) 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 Incorrect 4 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 3080 ms 3456 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -