QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#395890#63. MeetingsRafi2229 469ms4744kbC++141.9kb2024-04-22 00:14:532024-04-22 00:14:54

Judging History

你现在查看的是最新测评结果

  • [2024-04-22 00:14:54]
  • 评测
  • 测评结果:29
  • 用时:469ms
  • 内存:4744kb
  • [2024-04-22 00:14:53]
  • 提交

answer

#include <bits/stdc++.h>
#include "meetings.h"

//#define int long long
#define ll long long
#define ld long double
//#define endl '\n'
#define st first
#define nd second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
using namespace std;
int inf=1000000007;
ll infl=1000000000000000007;
ll mod=1000000007;
ll mod1=998244353;

const int N=2007;

set<int>G[N];
bool odw[N];
bool was[N];
int s[N];

void del(int u,int v)
{
	G[v].erase(u);
	G[u].erase(v);
	//cout<<"DEL "<<u<<" "<<v<<endl;
}
void add(int u,int v)
{
	G[v].insert(u);
	G[u].insert(v);
	//cout<<"ADD "<<u<<" "<<v<<endl;
}

void dfs(int v,int o)
{
	s[v]=1;
	for(auto u:G[v]) 
	{
		if(u==o||odw[u]) continue;
		dfs(u,v);
		s[v]+=s[u];
	}
}

void Solve(int n)
{
	vector<int>V;
	for(int i=0;i<n;i++) V.pb(i);
	random_shuffle(all(V));
	add(V[0],V[1]);
	for(int i=2;i<n;i++)
	{
		if(was[V[i]]) continue;
		memset(odw,0,sizeof odw);
		int r=V[0];
		//cout<<"XD "<<V[i]<<endl;
		while(true)
		{
			dfs(r,0);
			int v=r;
			while(true)
			{
				int nx=-1;
				for(auto u:G[v]) if(!odw[u]&&s[u]>i/2&&s[u]<s[v]) nx=u;
				if(nx==-1) break;
				v=nx;
			}
			odw[v]=1;
			//cout<<v<<endl;
			vector<pair<int,int>>X;
			for(auto u:G[v]) if(!odw[u]) X.pb({s[u],u});
			//sort(all(X),greater<pair<int,int>>());
			bool is=0,is1=0;
			for(auto [k,u]:X)
			{
				int t=Query(v,u,V[i]);
				if(t!=v)
				{
					if(t==u) 
					{
						r=u;
						is1=1;
					}
					else if(t==V[i])
					{
						is=1;
						del(u,v);
						add(u,V[i]);
						add(V[i],v);
					}
					else
					{
						is=1;
						del(u,v);
						add(u,t);
						add(t,v);
						add(t,V[i]);
						was[t]=1;
					}
					break;
				}
			}
			if(is) break;
			if(!is1)
			{
				add(v,V[i]);
				break;
			}
		}
	}
	for(int u=0;u<n;u++) for(auto v:G[u]) if(u<v) Bridge(u,v);
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 7
Accepted

Test #1:

score: 7
Accepted
time: 0ms
memory: 4036kb

input:

3
0 2
0 1

output:

Accepted: 1

result:

ok 1 move(s)

Test #2:

score: 0
Accepted
time: 0ms
memory: 3976kb

input:

4
1 2
0 2
0 3

output:

Accepted: 2

result:

ok 2 move(s)

Test #3:

score: 0
Accepted
time: 0ms
memory: 3972kb

input:

4
0 3
2 3
0 1

output:

Accepted: 3

result:

ok 3 move(s)

Test #4:

score: 0
Accepted
time: 0ms
memory: 4052kb

input:

5
2 4
2 3
0 2
1 3

output:

Accepted: 5

result:

ok 5 move(s)

Test #5:

score: 0
Accepted
time: 0ms
memory: 3976kb

input:

5
3 4
0 1
0 2
0 3

output:

Accepted: 2

result:

ok 2 move(s)

Test #6:

score: 0
Accepted
time: 0ms
memory: 3972kb

input:

6
1 5
2 4
0 4
1 3
3 4

output:

Accepted: 9

result:

ok 9 move(s)

Test #7:

score: 0
Accepted
time: 0ms
memory: 4048kb

input:

6
2 4
0 1
0 2
0 5
3 4

output:

Accepted: 6

result:

ok 6 move(s)

Test #8:

score: 0
Accepted
time: 0ms
memory: 3980kb

input:

7
1 4
0 6
0 5
1 2
0 3
0 4

output:

Accepted: 8

result:

ok 8 move(s)

Test #9:

score: 0
Accepted
time: 0ms
memory: 3972kb

input:

7
0 4
1 4
2 3
2 4
0 6
2 5

output:

Accepted: 9

result:

ok 9 move(s)

Test #10:

score: 0
Accepted
time: 0ms
memory: 3948kb

input:

7
3 5
4 5
0 2
2 6
1 2
1 5

output:

Accepted: 4

result:

ok 4 move(s)

Test #11:

score: 0
Accepted
time: 0ms
memory: 3920kb

input:

7
3 6
5 6
4 6
1 6
2 6
0 6

output:

Accepted: 13

result:

ok 13 move(s)

Test #12:

score: 0
Accepted
time: 0ms
memory: 3968kb

input:

7
2 3
0 5
4 6
1 6
0 2
3 4

output:

Accepted: 7

result:

ok 7 move(s)

Test #13:

score: 0
Accepted
time: 0ms
memory: 4036kb

input:

7
5 6
1 2
4 5
2 3
3 4
0 1

output:

Accepted: 10

result:

ok 10 move(s)

Subtask #2:

score: 10
Accepted

Dependency #1:

100%
Accepted

Test #14:

score: 10
Accepted
time: 1ms
memory: 3980kb

input:

50
25 32
16 48
36 46
13 48
18 27
18 30
9 29
19 47
30 35
2 36
1 49
33 34
41 47
11 13
7 10
17 38
2 18
1 15
1 33
4 23
8 11
36 47
14 20
25 39
5 7
12 48
2 45
21 47
0 21
1 23
19 43
32 33
4 14
22 36
38 46
5 28
1 29
2 31
3 4
40 47
34 44
34 42
24 43
33 36
11 26
6 11
7 47
37 38
1 6

output:

Accepted: 246

result:

ok 246 move(s)

Test #15:

score: 0
Accepted
time: 1ms
memory: 4048kb

input:

49
10 47
29 42
18 38
21 45
11 17
8 34
8 46
27 31
29 32
14 30
5 28
36 41
20 24
17 27
13 45
3 38
7 34
1 8
27 40
0 7
22 34
11 23
13 28
14 35
24 47
3 43
2 33
0 37
18 44
3 7
2 26
4 17
23 41
28 30
3 17
28 32
17 26
16 31
6 17
19 30
9 25
4 12
42 48
17 28
17 47
17 39
2 15
7 25

output:

Accepted: 234

result:

ok 234 move(s)

Test #16:

score: 0
Accepted
time: 1ms
memory: 4004kb

input:

48
6 19
1 33
34 44
29 30
27 35
8 40
17 39
8 47
11 46
14 40
17 32
8 23
26 40
9 27
4 8
11 39
33 38
8 15
21 40
2 41
7 11
20 26
12 28
16 24
31 41
18 24
34 46
0 40
34 38
5 15
10 34
18 45
26 29
40 43
35 47
6 21
28 34
8 41
8 42
14 18
22 30
3 14
34 37
13 46
14 36
17 25
8 46

output:

Accepted: 264

result:

ok 264 move(s)

Test #17:

score: 0
Accepted
time: 1ms
memory: 3992kb

input:

50
15 16
25 42
41 42
31 48
44 45
7 43
7 30
1 19
13 26
0 23
4 38
18 49
40 41
8 42
7 38
14 33
18 19
2 47
3 15
1 3
30 47
3 7
1 26
20 38
21 36
3 25
39 42
28 45
3 45
6 8
33 48
6 17
25 35
29 47
12 29
1 34
21 46
17 37
41 46
3 22
5 45
1 31
7 24
32 38
11 30
27 36
0 39
3 9
10 20

output:

Accepted: 221

result:

ok 221 move(s)

Test #18:

score: 0
Accepted
time: 1ms
memory: 3988kb

input:

50
29 46
2 21
3 16
22 31
11 49
2 43
36 40
7 17
1 46
30 32
42 49
5 15
7 44
6 12
20 46
23 30
21 23
26 27
28 34
7 10
6 20
38 42
39 45
2 8
8 33
20 39
19 43
30 35
14 38
3 12
17 47
13 26
12 21
25 49
0 40
27 40
28 47
5 47
16 17
22 24
37 38
16 42
22 23
39 48
6 27
18 26
8 9
4 43
5 41

output:

Accepted: 157

result:

ok 157 move(s)

Test #19:

score: 0
Accepted
time: 1ms
memory: 3996kb

input:

50
32 36
23 29
27 37
33 48
0 17
17 49
38 41
17 19
6 17
20 29
27 38
10 29
12 36
11 40
16 48
36 38
11 38
30 48
27 34
11 15
29 38
17 38
35 48
9 48
13 36
18 48
3 11
4 48
29 42
11 39
8 29
11 28
17 24
5 27
31 36
36 43
29 47
27 46
14 17
11 44
22 36
21 36
7 17
29 45
11 25
2 27
1 27
26 27
38 48

output:

Accepted: 271

result:

ok 271 move(s)

Test #20:

score: 0
Accepted
time: 0ms
memory: 3956kb

input:

49
24 42
4 21
2 21
12 48
16 24
24 45
6 21
21 46
21 23
20 24
22 24
21 38
14 24
12 25
24 30
21 24
12 39
31 32
0 31
11 21
12 37
12 36
9 31
18 24
24 47
24 35
7 24
12 27
13 21
12 33
12 21
5 12
21 41
3 12
21 31
24 26
12 29
10 12
24 28
24 44
1 21
17 21
8 12
12 15
24 34
19 21
12 40
12 43

output:

Accepted: 505

result:

ok 505 move(s)

Test #21:

score: 0
Accepted
time: 1ms
memory: 3988kb

input:

50
10 36
39 42
23 39
8 39
24 43
24 46
10 17
33 39
10 38
10 41
10 45
10 40
10 16
28 39
10 24
14 39
4 24
18 39
7 39
26 39
10 44
1 24
21 24
9 24
13 39
10 31
39 48
24 37
24 35
19 24
10 27
39 49
25 39
2 24
39 47
10 20
24 39
3 10
0 24
10 29
6 24
10 12
22 24
10 30
34 39
15 24
10 11
24 32
5 10

output:

Accepted: 553

result:

ok 553 move(s)

Test #22:

score: 0
Accepted
time: 1ms
memory: 4256kb

input:

50
14 29
13 43
13 37
13 40
5 14
1 13
22 34
13 24
13 23
3 14
2 13
34 41
14 36
18 34
31 34
34 45
13 39
14 21
14 19
13 33
14 20
34 46
13 32
15 34
0 14
34 35
14 42
14 25
13 49
11 13
34 44
13 28
7 34
14 34
4 34
13 47
14 38
9 14
6 34
26 34
8 13
13 14
27 34
14 16
13 17
10 13
14 48
12 14
30 34

output:

Accepted: 531

result:

ok 531 move(s)

Test #23:

score: 0
Accepted
time: 1ms
memory: 4016kb

input:

50
3 20
11 12
9 33
17 24
13 49
5 36
10 47
4 48
41 44
14 16
9 48
6 16
12 18
6 30
2 23
2 40
31 41
1 17
3 21
25 37
34 39
44 49
19 42
7 27
7 15
20 35
18 24
14 32
1 32
9 43
0 29
22 38
34 38
12 21
42 48
17 31
29 45
22 49
8 42
28 34
10 11
10 37
4 32
3 5
13 27
5 26
14 46
16 29
2 46

output:

Accepted: 182

result:

ok 182 move(s)

Test #24:

score: 0
Accepted
time: 1ms
memory: 4000kb

input:

50
20 46
25 39
4 22
8 17
10 47
1 23
41 48
14 20
15 39
4 21
45 49
13 45
33 42
34 35
36 41
29 31
30 44
29 32
3 32
16 49
27 38
27 47
0 10
8 37
9 18
9 43
0 44
11 25
12 31
37 46
5 19
28 43
13 17
6 21
28 40
23 26
2 24
33 48
2 18
5 40
7 30
6 16
1 19
24 34
14 42
7 26
15 22
11 12
3 35

output:

Accepted: 394

result:

ok 394 move(s)

Test #25:

score: 0
Accepted
time: 1ms
memory: 4016kb

input:

50
28 42
10 23
31 36
38 48
30 45
15 49
14 21
24 36
25 35
16 43
19 49
6 17
15 43
29 39
9 27
8 13
37 45
37 44
7 20
4 25
22 26
6 46
13 38
11 19
3 33
4 28
8 40
1 5
10 31
0 1
2 20
24 32
14 27
3 26
18 47
11 41
7 42
12 17
16 23
5 12
2 34
32 34
21 33
39 41
35 40
0 22
44 47
30 48
29 46

output:

Accepted: 354

result:

ok 354 move(s)

Test #26:

score: 0
Accepted
time: 1ms
memory: 4060kb

input:

50
43 44
16 17
32 33
9 10
15 16
26 27
24 25
18 19
45 46
37 38
28 29
44 45
36 37
27 28
0 1
10 11
8 9
5 6
46 47
34 35
39 40
40 41
38 39
19 20
1 2
7 8
35 36
33 34
48 49
17 18
3 4
47 48
22 23
4 5
14 15
6 7
42 43
2 3
31 32
13 14
25 26
23 24
30 31
20 21
11 12
29 30
21 22
12 13
41 42

output:

Accepted: 386

result:

ok 386 move(s)

Subtask #3:

score: 12
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #27:

score: 12
Accepted
time: 5ms
memory: 4060kb

input:

300
191 265
158 220
169 267
75 180
82 215
171 245
68 142
229 246
72 89
85 222
123 156
103 245
47 65
260 272
55 240
66 262
119 185
85 110
120 173
114 217
38 288
247 292
68 203
239 285
208 275
123 157
124 142
50 265
181 258
55 272
0 27
25 48
225 250
66 181
165 259
37 154
32 176
17 121
70 131
40 76
10 ...

output:

Accepted: 2490

result:

ok 2490 move(s)

Test #28:

score: 0
Accepted
time: 5ms
memory: 4020kb

input:

299
13 145
175 235
8 55
133 286
73 147
89 103
47 241
82 151
23 98
158 202
19 94
57 221
117 198
8 210
47 258
93 198
105 255
95 236
83 208
100 124
166 253
137 280
1 76
176 236
165 226
14 15
56 195
45 183
281 282
58 216
39 102
46 234
4 210
37 149
126 293
212 234
90 284
81 121
33 276
152 264
99 241
7 21...

output:

Accepted: 2661

result:

ok 2661 move(s)

Test #29:

score: 0
Accepted
time: 2ms
memory: 4040kb

input:

298
165 206
60 250
121 218
73 228
156 163
6 124
199 200
123 238
6 263
17 163
147 250
40 63
8 206
124 126
111 285
112 203
217 260
83 151
28 241
18 279
172 224
112 121
116 189
66 138
216 243
125 225
181 255
97 232
93 229
74 138
55 90
204 264
84 248
77 221
4 142
101 191
182 276
35 199
150 284
120 241
1...

output:

Accepted: 2678

result:

ok 2678 move(s)

Test #30:

score: 0
Accepted
time: 3ms
memory: 4056kb

input:

300
71 228
160 285
48 87
33 266
151 195
72 113
124 134
47 125
32 286
185 294
80 89
30 154
78 158
182 260
106 293
164 242
151 224
98 293
100 277
53 267
1 258
134 248
51 235
49 50
265 270
69 274
155 188
72 191
71 268
165 209
87 190
134 215
125 295
139 284
79 178
63 77
272 297
118 180
146 237
159 224
1...

output:

Accepted: 3192

result:

ok 3192 move(s)

Test #31:

score: 0
Accepted
time: 4ms
memory: 4312kb

input:

300
59 259
72 136
138 231
87 126
128 148
70 189
199 284
100 118
125 185
190 278
92 99
129 267
241 270
139 160
89 189
234 236
23 84
100 212
110 186
27 198
258 277
45 164
172 299
10 286
48 135
92 255
125 227
49 263
39 141
29 130
95 298
5 296
211 250
76 223
98 189
183 202
132 137
54 157
112 291
210 245...

output:

Accepted: 1902

result:

ok 1902 move(s)

Test #32:

score: 0
Accepted
time: 5ms
memory: 4340kb

input:

300
170 212
80 293
192 236
86 289
43 181
244 298
121 124
169 218
260 262
48 191
184 272
84 96
48 224
15 113
20 236
70 292
96 100
77 122
8 24
73 162
20 278
34 134
22 218
74 181
261 292
150 193
81 171
20 277
94 122
30 280
166 236
63 178
42 249
146 171
72 260
71 214
145 149
225 297
67 162
0 5
24 191
2 ...

output:

Accepted: 2506

result:

ok 2506 move(s)

Test #33:

score: 0
Accepted
time: 7ms
memory: 4112kb

input:

299
10 212
34 69
97 294
124 186
135 288
52 212
77 140
71 108
100 241
19 94
220 294
101 204
204 285
1 135
19 72
184 294
117 147
18 19
124 158
96 124
80 207
11 124
114 291
124 211
57 120
53 120
32 124
143 220
63 100
124 191
135 286
128 135
0 80
23 137
71 164
120 267
100 162
65 71
51 171
51 75
100 225
...

output:

Accepted: 4149

result:

ok 4149 move(s)

Test #34:

score: 0
Accepted
time: 9ms
memory: 4056kb

input:

300
83 89
145 259
133 149
255 277
203 269
226 241
102 262
83 183
149 191
83 285
70 160
248 262
36 277
259 263
139 200
104 228
146 226
99 228
183 218
97 228
16 40
30 218
123 149
214 277
122 262
131 139
269 290
149 229
9 40
183 259
160 183
54 286
62 83
125 269
37 83
28 136
149 242
38 160
110 259
95 25...

output:

Accepted: 4647

result:

ok 4647 move(s)

Test #35:

score: 0
Accepted
time: 4ms
memory: 4060kb

input:

300
56 123
98 191
13 22
186 221
132 248
32 158
103 222
22 290
43 139
148 236
12 22
47 123
40 221
132 253
235 251
123 173
222 225
23 86
18 271
23 41
212 291
124 221
213 236
125 212
211 222
150 191
17 233
96 123
128 214
23 30
7 161
5 251
43 141
132 249
27 191
18 42
212 279
43 144
230 247
22 134
230 28...

output:

Accepted: 4581

result:

ok 4581 move(s)

Test #36:

score: 0
Accepted
time: 5ms
memory: 4044kb

input:

300
153 237
93 255
238 285
159 259
165 227
123 297
110 111
187 193
32 34
71 103
72 156
8 136
28 45
28 71
150 299
113 221
212 246
139 255
130 208
61 223
15 234
26 66
167 285
150 266
231 238
73 165
44 263
18 113
200 278
161 205
11 31
58 249
134 268
155 259
229 288
121 249
220 232
14 105
131 225
52 235...

output:

Accepted: 2256

result:

ok 2256 move(s)

Test #37:

score: 0
Accepted
time: 68ms
memory: 4032kb

input:

300
121 184
29 35
146 251
28 34
100 180
135 171
9 126
9 65
8 117
23 91
57 114
90 202
94 273
12 192
187 263
199 271
71 107
53 78
108 178
67 83
50 121
5 21
51 244
101 261
217 269
138 212
241 288
21 120
4 127
68 254
167 207
44 276
53 93
90 197
66 152
24 188
174 256
200 209
20 75
147 275
31 157
55 86
3 ...

output:

Accepted: 10679

result:

ok 10679 move(s)

Test #38:

score: 0
Accepted
time: 69ms
memory: 4068kb

input:

300
110 202
68 161
51 183
286 296
230 288
91 195
240 277
148 176
50 92
81 143
242 262
182 292
148 212
77 234
212 285
105 126
33 219
11 61
17 25
144 227
124 265
58 195
76 186
6 132
67 74
133 299
155 276
226 264
53 284
26 241
36 185
71 177
256 299
53 86
2 13
110 134
67 165
146 198
59 185
23 194
42 276...

output:

Accepted: 10823

result:

ok 10823 move(s)

Test #39:

score: 0
Accepted
time: 69ms
memory: 4352kb

input:

300
178 179
145 146
293 294
127 128
220 221
222 223
135 136
195 196
97 98
221 222
162 163
291 292
201 202
257 258
51 52
272 273
76 77
274 275
46 47
285 286
263 264
255 256
3 4
96 97
141 142
82 83
74 75
44 45
52 53
57 58
92 93
228 229
104 105
94 95
2 3
140 141
54 55
177 178
183 184
112 113
28 29
283 ...

output:

Accepted: 11651

result:

ok 11651 move(s)

Subtask #4:

score: 0
Time Limit Exceeded

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #40:

score: 71
Accepted
time: 448ms
memory: 4744kb

input:

2000
58 503
623 1403
1004 1083
249 491
1524 1849
192 562
1261 1877
547 909
267 896
747 1986
381 1329
57 317
779 886
469 1652
628 1456
1732 1790
700 825
494 1799
1450 1733
103 1069
1114 1342
243 1496
930 1361
240 905
398 1737
1008 1765
357 954
1157 1898
1228 1344
1062 1731
160 1977
40 364
343 694
108...

output:

Accepted: 30298

result:

ok 30298 move(s)

Test #41:

score: 71
Accepted
time: 465ms
memory: 4484kb

input:

2000
708 1863
9 1590
217 1903
135 249
1413 1878
189 1114
697 1866
314 643
149 1872
816 1309
91 1784
73 1965
525 1062
390 947
121 929
242 1450
486 1229
688 736
759 1972
16 1778
458 983
1139 1168
78 1742
1386 1487
460 514
1704 1896
206 649
1325 1580
365 445
100 1325
51 324
1955 1983
820 1183
90 1264
3...

output:

Accepted: 32040

result:

ok 32040 move(s)

Test #42:

score: 71
Accepted
time: 450ms
memory: 4424kb

input:

2000
1229 1536
538 1216
151 1124
582 683
696 1744
665 1140
382 502
815 900
440 646
910 1376
688 1965
420 811
572 584
1089 1964
24 1832
1419 1925
1147 1690
1 1203
478 773
1879 1959
1274 1357
548 1533
1315 1339
560 1205
1747 1904
371 936
941 1119
563 941
393 1328
121 457
178 1352
361 992
1702 1999
438...

output:

Accepted: 28082

result:

ok 28082 move(s)

Test #43:

score: 71
Accepted
time: 457ms
memory: 4456kb

input:

2000
15 235
732 811
638 1702
136 884
1550 1921
261 1387
175 1330
828 1406
1102 1759
32 1880
550 854
118 352
987 1811
1630 1987
223 1071
21 1190
13 119
143 536
551 1269
350 1573
374 418
735 941
382 965
1157 1436
386 1986
811 1064
1155 1241
978 1530
776 1291
511 1415
974 1599
662 1580
338 803
676 976
...

output:

Accepted: 32522

result:

ok 32522 move(s)

Test #44:

score: 71
Accepted
time: 265ms
memory: 4420kb

input:

1999
516 1751
760 1597
875 1120
209 1018
51 1603
1051 1773
766 1610
646 934
796 821
1059 1662
1094 1747
264 1052
1988 1992
1028 1393
1141 1781
842 855
543 940
304 1984
496 526
1279 1387
1484 1912
307 1465
1226 1983
442 1723
562 1114
672 1224
332 934
626 1699
381 1624
159 681
641 1994
1188 1732
1753 ...

output:

Accepted: 17644

result:

ok 17644 move(s)

Test #45:

score: 71
Accepted
time: 228ms
memory: 4464kb

input:

2000
1777 1981
86 1460
254 1019
381 1893
69 980
605 1734
1233 1877
252 1365
427 621
343 1610
1192 1225
549 1371
109 765
1128 1374
425 739
838 1000
425 1775
1185 1611
654 1812
701 1752
349 1031
99 1249
741 1831
742 1090
1255 1942
307 1635
305 1892
1074 1974
434 1219
1876 1885
1017 1244
1736 1942
98 1...

output:

Accepted: 17412

result:

ok 17412 move(s)

Test #46:

score: 71
Accepted
time: 344ms
memory: 4428kb

input:

2000
1015 1885
353 1472
383 467
705 1492
219 1927
68 1251
290 1215
9 629
331 524
421 1902
87 1901
1283 1982
264 1932
431 1041
746 772
457 822
1551 1901
546 666
290 462
1375 1378
1029 1527
1491 1775
663 1708
663 973
464 1165
834 1365
290 1572
66 1624
813 855
709 984
600 721
615 857
1271 1542
272 1758...

output:

Accepted: 32529

result:

ok 32529 move(s)

Test #47:

score: 71
Accepted
time: 413ms
memory: 4380kb

input:

2000
379 1057
726 1149
1407 1920
413 654
1217 1656
130 1130
192 873
255 1364
472 509
256 1447
7 542
700 1210
58 159
1008 1784
592 1357
680 1664
1809 1840
7 1042
232 1389
1228 1785
460 1585
1123 1570
652 1276
115 1276
543 1179
744 1361
481 788
599 1261
687 891
128 1217
257 1785
700 803
5 1161
407 105...

output:

Accepted: 39707

result:

ok 39707 move(s)

Test #48:

score: 49
Acceptable Answer
time: 392ms
memory: 4452kb

input:

2000
150 643
607 1264
914 1857
454 482
1110 1950
904 1383
740 1370
1029 1335
1678 1946
1469 1912
678 800
1239 1506
1065 1257
1011 1396
782 1416
711 1370
320 1167
1624 1847
1743 1804
783 1031
339 860
1630 1747
1233 1684
34 1285
105 1073
614 982
256 657
906 1408
247 657
1566 1950
34 648
439 1179
1179 ...

output:

Accepted: 41749

result:

points 0.69014084510 41749 move(s)

Test #49:

score: 49
Acceptable Answer
time: 386ms
memory: 4508kb

input:

2000
194 1562
1404 1637
1415 1436
79 1140
744 812
495 752
1331 1558
674 1608
822 969
34 982
913 1881
753 1228
812 920
541 892
540 1054
1458 1562
215 1211
208 1101
674 818
211 939
1332 1675
143 816
1466 1990
25 1314
1324 1833
526 902
670 1367
400 1129
161 632
228 1913
636 1037
827 1585
12 865
322 155...

output:

Accepted: 43870

result:

points 0.69014084510 43870 move(s)

Test #50:

score: 49
Acceptable Answer
time: 469ms
memory: 4440kb

input:

2000
154 300
248 962
613 729
40 1615
1408 1953
335 1587
1803 1815
610 785
112 959
616 1817
356 673
869 1168
1372 1941
1292 1460
118 1344
248 280
247 1899
848 1278
1611 1975
335 1004
34 848
613 798
673 1777
226 1707
1597 1683
1247 1439
541 556
703 1636
136 791
85 1354
1175 1571
133 1379
1292 1388
604...

output:

Accepted: 46244

result:

points 0.69014084510 46244 move(s)

Test #51:

score: 0
Time Limit Exceeded

input:

2000
340 1614
176 466
175 690
1617 1788
556 1224
223 1923
729 1421
1448 1740
1038 1260
452 1120
302 1387
1039 1256
1193 1523
644 1663
521 744
1291 1981
805 835
418 710
1159 1404
1388 1650
212 1530
1169 1571
533 1271
619 677
594 1898
1013 1343
1117 1957
1267 1655
509 551
824 980
933 1026
285 296
69 1...

output:

Unauthorized output

result: