답안 #924410

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
924410 2024-02-09T03:11:43 Z Faisal_Saqib Political Development (BOI17_politicaldevelopment) C++17
62 / 100
3000 ms 309328 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;
	for(int l=x._Find_first();l<x.size();l=x._Find_next(l))
	{
		bitset<N> np=(x&ma[l]);
		recur(sz+1,np);
	}
}
int main()
{
	cin.tie(0);
	cout.tie(0);
	ios::sync_with_stdio(0);
	cin>>n>>k;
	for(int i=0;i<n;i++)
	{
		int d=0;
		cin>>d;
		while(d--)
		{
			int x;
			cin>>x;
			ma[i].set(x);
		}
	}
	bitset<N> tp;
	for(int i=0;i<n;i++)
		tp[i]=1;		
	recur(0,tp);
	cout<<mx<<'\n';
	return 0;
}

Compilation message

politicaldevelopment.cpp: In function 'void recur(int, std::bitset<50000>&)':
politicaldevelopment.cpp:13:29: warning: comparison of integer expressions of different signedness: 'int' and 'std::size_t' {aka 'long unsigned int'} [-Wsign-compare]
   13 |  for(int l=x._Find_first();l<x.size();l=x._Find_next(l))
      |                            ~^~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 31 ms 31416 KB Output is correct
4 Correct 19 ms 31324 KB Output is correct
5 Correct 20 ms 31320 KB Output is correct
6 Correct 21 ms 31320 KB Output is correct
7 Correct 21 ms 31324 KB Output is correct
8 Correct 6 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 6 ms 4592 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 31 ms 31416 KB Output is correct
4 Correct 19 ms 31324 KB Output is correct
5 Correct 20 ms 31320 KB Output is correct
6 Correct 21 ms 31320 KB Output is correct
7 Correct 21 ms 31324 KB Output is correct
8 Correct 6 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 6 ms 4592 KB Output is correct
11 Correct 19 ms 31324 KB Output is correct
12 Correct 19 ms 31324 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 27 ms 31324 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 20 ms 31436 KB Output is correct
17 Correct 1 ms 344 KB Output is correct
18 Correct 20 ms 31324 KB Output is correct
19 Correct 5 ms 348 KB Output is correct
20 Correct 15 ms 31416 KB Output is correct
21 Correct 16 ms 31320 KB Output is correct
22 Correct 6 ms 4440 KB Output is correct
23 Correct 26 ms 31436 KB Output is correct
24 Correct 6 ms 4444 KB Output is correct
25 Correct 25 ms 31332 KB Output is correct
26 Correct 23 ms 31324 KB Output is correct
27 Correct 21 ms 31324 KB Output is correct
28 Correct 23 ms 31228 KB Output is correct
29 Correct 22 ms 31320 KB Output is correct
30 Correct 31 ms 31324 KB Output is correct
31 Correct 27 ms 31320 KB Output is correct
32 Correct 25 ms 31324 KB Output is correct
33 Correct 26 ms 31324 KB Output is correct
34 Correct 25 ms 31324 KB Output is correct
35 Correct 12 ms 16988 KB Output is correct
36 Correct 15 ms 16984 KB Output is correct
37 Correct 12 ms 17188 KB Output is correct
38 Correct 7 ms 8792 KB Output is correct
39 Correct 8 ms 8796 KB Output is correct
40 Correct 36 ms 31452 KB Output is correct
41 Correct 7 ms 8796 KB Output is correct
42 Correct 34 ms 31324 KB Output is correct
43 Correct 38 ms 31320 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 1 ms 460 KB Output is correct
10 Correct 1 ms 600 KB Output is correct
11 Correct 856 ms 309172 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 1690 ms 309204 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 812 ms 309168 KB Output is correct
16 Correct 857 ms 309204 KB Output is correct
17 Correct 1736 ms 309328 KB Output is correct
18 Correct 874 ms 309208 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 31 ms 31416 KB Output is correct
4 Correct 19 ms 31324 KB Output is correct
5 Correct 20 ms 31320 KB Output is correct
6 Correct 21 ms 31320 KB Output is correct
7 Correct 21 ms 31324 KB Output is correct
8 Correct 6 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 6 ms 4592 KB Output is correct
11 Correct 19 ms 31324 KB Output is correct
12 Correct 19 ms 31324 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 27 ms 31324 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 20 ms 31436 KB Output is correct
17 Correct 1 ms 344 KB Output is correct
18 Correct 20 ms 31324 KB Output is correct
19 Correct 5 ms 348 KB Output is correct
20 Correct 15 ms 31416 KB Output is correct
21 Correct 16 ms 31320 KB Output is correct
22 Correct 6 ms 4440 KB Output is correct
23 Correct 26 ms 31436 KB Output is correct
24 Correct 6 ms 4444 KB Output is correct
25 Correct 25 ms 31332 KB Output is correct
26 Correct 23 ms 31324 KB Output is correct
27 Correct 21 ms 31324 KB Output is correct
28 Correct 23 ms 31228 KB Output is correct
29 Correct 22 ms 31320 KB Output is correct
30 Correct 31 ms 31324 KB Output is correct
31 Correct 27 ms 31320 KB Output is correct
32 Correct 25 ms 31324 KB Output is correct
33 Correct 26 ms 31324 KB Output is correct
34 Correct 25 ms 31324 KB Output is correct
35 Correct 12 ms 16988 KB Output is correct
36 Correct 15 ms 16984 KB Output is correct
37 Correct 12 ms 17188 KB Output is correct
38 Correct 7 ms 8792 KB Output is correct
39 Correct 8 ms 8796 KB Output is correct
40 Correct 36 ms 31452 KB Output is correct
41 Correct 7 ms 8796 KB Output is correct
42 Correct 34 ms 31324 KB Output is correct
43 Correct 38 ms 31320 KB Output is correct
44 Execution timed out 3034 ms 31612 KB Time limit exceeded
45 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 31 ms 31416 KB Output is correct
4 Correct 19 ms 31324 KB Output is correct
5 Correct 20 ms 31320 KB Output is correct
6 Correct 21 ms 31320 KB Output is correct
7 Correct 21 ms 31324 KB Output is correct
8 Correct 6 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 6 ms 4592 KB Output is correct
11 Correct 19 ms 31324 KB Output is correct
12 Correct 19 ms 31324 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 27 ms 31324 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 20 ms 31436 KB Output is correct
17 Correct 1 ms 344 KB Output is correct
18 Correct 20 ms 31324 KB Output is correct
19 Correct 5 ms 348 KB Output is correct
20 Correct 15 ms 31416 KB Output is correct
21 Correct 16 ms 31320 KB Output is correct
22 Correct 6 ms 4440 KB Output is correct
23 Correct 26 ms 31436 KB Output is correct
24 Correct 6 ms 4444 KB Output is correct
25 Correct 25 ms 31332 KB Output is correct
26 Correct 23 ms 31324 KB Output is correct
27 Correct 21 ms 31324 KB Output is correct
28 Correct 23 ms 31228 KB Output is correct
29 Correct 22 ms 31320 KB Output is correct
30 Correct 31 ms 31324 KB Output is correct
31 Correct 27 ms 31320 KB Output is correct
32 Correct 25 ms 31324 KB Output is correct
33 Correct 26 ms 31324 KB Output is correct
34 Correct 25 ms 31324 KB Output is correct
35 Correct 12 ms 16988 KB Output is correct
36 Correct 15 ms 16984 KB Output is correct
37 Correct 12 ms 17188 KB Output is correct
38 Correct 7 ms 8792 KB Output is correct
39 Correct 8 ms 8796 KB Output is correct
40 Correct 36 ms 31452 KB Output is correct
41 Correct 7 ms 8796 KB Output is correct
42 Correct 34 ms 31324 KB Output is correct
43 Correct 38 ms 31320 KB Output is correct
44 Correct 1 ms 344 KB Output is correct
45 Correct 552 ms 308332 KB Output is correct
46 Correct 341 ms 307240 KB Output is correct
47 Correct 543 ms 308244 KB Output is correct
48 Correct 564 ms 308308 KB Output is correct
49 Correct 198 ms 307092 KB Output is correct
50 Correct 513 ms 309052 KB Output is correct
51 Correct 539 ms 308564 KB Output is correct
52 Correct 215 ms 307056 KB Output is correct
53 Correct 216 ms 306984 KB Output is correct
54 Correct 58 ms 1108 KB Output is correct
55 Correct 505 ms 308820 KB Output is correct
56 Correct 170 ms 307028 KB Output is correct
57 Correct 217 ms 307048 KB Output is correct
58 Correct 846 ms 307476 KB Output is correct
59 Correct 165 ms 306772 KB Output is correct
60 Correct 164 ms 306788 KB Output is correct
61 Correct 834 ms 307468 KB Output is correct
62 Correct 339 ms 307284 KB Output is correct
63 Correct 371 ms 307600 KB Output is correct
64 Correct 169 ms 306784 KB Output is correct
65 Correct 549 ms 307704 KB Output is correct
66 Correct 327 ms 307156 KB Output is correct
67 Correct 372 ms 307600 KB Output is correct
68 Correct 436 ms 307640 KB Output is correct
69 Correct 603 ms 307796 KB Output is correct
70 Correct 238 ms 307016 KB Output is correct
71 Correct 435 ms 308052 KB Output is correct
72 Correct 341 ms 307288 KB Output is correct
73 Correct 480 ms 308304 KB Output is correct
74 Correct 237 ms 307144 KB Output is correct
75 Correct 195 ms 155104 KB Output is correct
76 Correct 318 ms 307540 KB Output is correct
77 Correct 491 ms 308152 KB Output is correct
78 Correct 229 ms 155280 KB Output is correct
79 Correct 185 ms 154960 KB Output is correct
80 Correct 83 ms 78844 KB Output is correct
81 Correct 234 ms 155272 KB Output is correct
82 Correct 395 ms 307744 KB Output is correct
83 Correct 84 ms 78684 KB Output is correct
84 Correct 389 ms 307856 KB Output is correct