# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
924415 | 2024-02-09T03:23:11 Z | Faisal_Saqib | Political Development (BOI17_politicaldevelopment) | C++17 | 8 ms | 31324 KB |
#include <iostream> #include <bitset> // any using namespace std; const int N=5e4; bitset<N> ma[N]; int n,k,mx=0; void recur(int& sz,bitset<N>&x) { mx=max(mx,sz); if(x.none()) return; sz++; bitset<N> np=x; for(int l=x._Find_first();l<x.size();l=x._Find_next(l)) { x=(np&ma[l]); recur(sz,x); } sz--; } int main() { cin.tie(0); cout.tie(0); ios::sync_with_stdio(0); scanf("%d %d",&n,&k); for(int i=0;i<n;i++) { int d=0; scanf("%d",&d); while(d--) { int x; scanf("%d",&x); ma[i].set(x); } } bitset<N> tp; for(int i=0;i<n;i++) tp[i]=1; int s=0; recur(s,tp); printf("%d",mx); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 8 ms | 31324 KB | Output is correct |
4 | Correct | 4 ms | 31324 KB | Output is correct |
5 | Correct | 4 ms | 31304 KB | Output is correct |
6 | Correct | 5 ms | 31320 KB | Output is correct |
7 | Correct | 5 ms | 31324 KB | Output is correct |
8 | Correct | 1 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Incorrect | 1 ms | 4444 KB | Output isn't correct |
11 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 8 ms | 31324 KB | Output is correct |
4 | Correct | 4 ms | 31324 KB | Output is correct |
5 | Correct | 4 ms | 31304 KB | Output is correct |
6 | Correct | 5 ms | 31320 KB | Output is correct |
7 | Correct | 5 ms | 31324 KB | Output is correct |
8 | Correct | 1 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Incorrect | 1 ms | 4444 KB | Output isn't correct |
11 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Incorrect | 0 ms | 348 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 8 ms | 31324 KB | Output is correct |
4 | Correct | 4 ms | 31324 KB | Output is correct |
5 | Correct | 4 ms | 31304 KB | Output is correct |
6 | Correct | 5 ms | 31320 KB | Output is correct |
7 | Correct | 5 ms | 31324 KB | Output is correct |
8 | Correct | 1 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Incorrect | 1 ms | 4444 KB | Output isn't correct |
11 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 8 ms | 31324 KB | Output is correct |
4 | Correct | 4 ms | 31324 KB | Output is correct |
5 | Correct | 4 ms | 31304 KB | Output is correct |
6 | Correct | 5 ms | 31320 KB | Output is correct |
7 | Correct | 5 ms | 31324 KB | Output is correct |
8 | Correct | 1 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Incorrect | 1 ms | 4444 KB | Output isn't correct |
11 | Halted | 0 ms | 0 KB | - |