QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#124436#6508. This is not an Abnormal Team!1234567890AC ✓1677ms76852kbC++144.1kb2023-07-14 19:50:172023-07-14 19:50:18

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-14 19:50:18]
  • 评测
  • 测评结果:AC
  • 用时:1677ms
  • 内存:76852kb
  • [2023-07-14 19:50:17]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define inf (ll)1e18
#define pii pair <ll, ll>
#define fr first
#define se second
const ll mod = 1e9 + 7;
char buf[1 << 21], *p1 = buf, *p2 = buf;
#define getchar() (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 18, stdin), p1 == p2) ? EOF : *p1++)
inline ll read() {
	ll x = 0, f = 1;
	char ch = getchar();
	while(ch < '0' || ch > '9') f =((ch == '-') ? -1 : f), ch = getchar();
	while(ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
	return x * f;
}
inline void write(ll x) {
	if(x < 0) x = -x, putchar('-');
	if(x >= 10) write(x / 10);
	putchar(x % 10 + '0');
}
const ll MAXN = 400005, MAXM = 4000005;
struct Flow {
	ll N, s, t;
	ll head[MAXN];
	struct Edge {
		ll v, e, c, nxt;
	}edge[MAXM];
	ll tag[MAXM], ti;
	ll tot = 1;
	void addedge(ll u, ll v, ll e, ll c) {
		edge[++tot].v = v;
		edge[tot].e = e;
		edge[tot].c = c;
		edge[tot].nxt = head[u];
		head[u] = tot;
	}
	void Addedge(ll u, ll v, ll e, ll c) {
		addedge(u, v, e, c);
		addedge(v, u, 0, -c);
	}
	ll vis[MAXN], cur[MAXN], dis[MAXN], dis2[MAXN];
	ll ans, anse;
	ll SPFA() {
		for(ll i = 0; i <= N; i++) cur[i] = head[i], vis[i] = 0, dis[i] = dis2[i] = inf;
		dis[s] = dis2[s] = 0, vis[s] = 1;
		queue <ll> Q;
		Q.push(s);
		while(!Q.empty()) {
			ll x = Q.front();
			Q.pop();
			vis[x] = 0;
			for(ll i = head[x]; i; i = edge[i].nxt) {
				ll y = edge[i].v, e = edge[i].e, c = edge[i].c;
				if(e && mp(dis[y], dis2[y]) > mp(dis[x] + c, dis2[x] + 1)) {
					dis[y] = dis[x] + c, dis2[y] = dis2[x] + 1;
					if(!vis[y]) {
						vis[y] = 1;
						Q.push(y);
					}
				} 
			}
		}
		ti++;
		for(ll i = 1; i <= N; i++) for(ll j = head[i]; j; j = edge[j].nxt) if(dis[edge[j].v] == dis[i] + edge[j].c) tag[j] = ti;
		return dis[t] != dis[0];
	}
	ll bfs() {
		for(ll i = 0; i <= N; i++) cur[i] = head[i], vis[i] = 0, dis2[i] = inf;
		dis2[s] = 0, vis[s] = 1;
		queue <ll> Q;
		Q.push(s);
		while(!Q.empty()) {
			ll x = Q.front();
			Q.pop();
			for(ll i = head[x]; i; i = edge[i].nxt) {
				ll y = edge[i].v, e = edge[i].e, c = edge[i].c;
				if(e && dis[y] == dis[x] + c && dis2[y] > dis2[x] + 1) {
					dis2[y] = dis2[x] + 1;
					if(!vis[y]) {
						vis[y] = 1;
						Q.push(y);
					}
				} 
			}
		}
		return dis2[t] != dis2[0];
	}
	ll dfs(ll u, ll E) {
		if(u == t) {
			ans += E;
			return E;
		}
		ll now = 0, used = 0;
		for(ll i = cur[u]; i; i = edge[i].nxt) {
			cur[u] = i;
			ll v = edge[i].v, e = edge[i].e, c = edge[i].c;
			if(tag[i] == ti && dis2[v] == dis2[u] + 1 && e) {
				now = dfs(v, min(E - used, e));
				if(now) {
					used += now;
					anse += c * now;
					edge[i].e -= now;
					edge[i^1].e += now;
					if(used == E) break;
				}
				else dis2[v] = inf;
			}
		}
		return used;
	}
	void Dinic() {
		while(SPFA()) {
			if(dis[t] >= 0) return ;
//			printf("HAHA %lld %lld\n", dis[t], dis2[t]);
			ll cnt = 0;
			while(bfs()) {
				cnt++;
				dfs(s, inf);
			}
//			printf("?? %lld\n", cnt);
//			printf("????\n");
		}
		
	} 	
}F;
ll n1, n2, m;
ll id1[100005][2], id2[100005][2];
signed main() {
    n1 = read(), n2 = read(), m = read();
    F.s = 1, F.t = F.N = 2;
    for(ll i = 1; i <= n1; i++) {
        id1[i][0] = ++F.N;
//        id1[i][1] = ++F.N;
        F.Addedge(F.s, id1[i][0], 1, -(ll)1e12);
        F.Addedge(F.s, id1[i][0], 1, (ll)1e6);
//        F.Addedge(id1[i][1], F.t, 1, 0);
    }
    for(ll i = 1; i <= n2; i++) {
        id2[i][0] = ++F.N;
//        id2[i][1] = ++F.N;
        F.Addedge(id2[i][0], F.t, 1, -(ll)1e12);
        F.Addedge(id2[i][0], F.t, 1, (ll)1e6);
//        F.Addedge(F.s, id2[i][1], 1, 0);
    }
    for(ll i = 1; i <= m; i++) {
        ll u = read(), v = read();
        F.Addedge(id1[u][0], id2[v][0], 1, 0);
//        F.Addedge(id1[u][1], id2[v][0], 1, (ll)1e6);
//        F.Addedge(id1[u][0], id2[v][1], 1, (ll)1e6);
    }
    F.Dinic();
    ll cut = (-F.anse + (ll)1e12 - 1) / (ll)1e12;
    ll ans1 = (n1 + n2) - cut, ans2 = (cut * (ll)1e12 + F.anse) / (ll)1e6;
    write(ans1), putchar(' '), write(ans2), putchar('\n');
	return 0;
}
/*
*/

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 21820kb

input:

5 6 10
1 1
2 1
2 2
3 2
4 2
4 3
5 3
5 4
5 5
5 6

output:

1 2

result:

ok 2 number(s): "1 2"

Test #2:

score: 0
Accepted
time: 119ms
memory: 42644kb

input:

10000 10000 200000
1625 2184
4643 4339
4447 7822
5132 8448
4592 8127
8187 8483
4997 5610
602 8202
519 6268
2534 9479
4231 9307
7216 336
7815 7935
5629 7024
6335 19
4263 9875
8936 4825
3995 1070
6132 3219
8633 1252
2372 2491
1767 1090
3872 6364
5822 8244
2387 2278
8443 9645
3885 5406
9871 3684
2687 6...

output:

0 0

result:

ok 2 number(s): "0 0"

Test #3:

score: 0
Accepted
time: 407ms
memory: 47748kb

input:

40000 40000 200000
23859 15566
12351 26305
1037 7663
30102 17548
20677 36
285 12583
13210 30184
32406 2209
17006 27450
13541 18762
15687 1053
27345 4919
28624 18137
30343 30978
28437 25848
31831 20359
12747 11658
21877 14248
1349 25889
16633 25738
23168 37014
21535 3350
11480 6594
12552 36153
29520 ...

output:

553 69

result:

ok 2 number(s): "553 69"

Test #4:

score: 0
Accepted
time: 657ms
memory: 54212kb

input:

50000 50000 200000
20642 36155
41049 14661
11207 18016
37257 2111
12343 15536
18057 14985
14012 19549
31701 41875
12998 13881
22975 19062
10135 4606
39324 38746
49432 7799
21013 29006
19138 4500
3495 14755
46854 38842
29907 4273
3718 49841
30830 28898
41993 2260
2898 33698
12123 9012
17228 46853
289...

output:

1828 418

result:

ok 2 number(s): "1828 418"

Test #5:

score: 0
Accepted
time: 950ms
memory: 63772kb

input:

60000 60000 200000
57424 12552
5554 55722
35969 12560
27516 26675
904 3740
43124 21578
14814 3505
3700 26950
28989 27609
52410 30849
17287 12351
4007 19868
54432 17461
44387 51225
17135 47344
59351 639
961 22923
34833 54298
18790 19200
9220 4761
818 27506
31557 39854
4253 50215
29199 33361
8420 2778...

output:

4338 1494

result:

ok 2 number(s): "4338 1494"

Test #6:

score: 0
Accepted
time: 1172ms
memory: 60836kb

input:

65000 65000 200000
22859 61459
42978 50882
26752 47027
25954 59190
35858 45662
8411 53084
24766 13681
13999 8446
31836 31895
26759 16926
28346 43661
16099 55471
10841 44215
10374 23905
42038 44760
47384 40169
19674 12495
45562 34550
54675 33260
7653 51437
30817 42759
46380 19015
44570 50850
36741 28...

output:

6169 2461

result:

ok 2 number(s): "6169 2461"

Test #7:

score: 0
Accepted
time: 1585ms
memory: 61072kb

input:

70000 70000 200000
28798 5844
20059 44079
6139 10209
41968 53943
12570 29241
28192 16683
1423 7462
5699 16616
66197 11336
61844 51149
54439 28607
13282 33694
22136 49827
15057 20741
10540 10189
25207 42331
46557 57003
12863 4323
53863 23152
66121 30624
60859 34241
4408 52906
37600 26825
33874 34062
...

output:

8061 4127

result:

ok 2 number(s): "8061 4127"

Test #8:

score: 0
Accepted
time: 1677ms
memory: 63236kb

input:

75000 75000 200000
19641 72856
51675 39238
31922 2379
43917 46458
1716 28059
39967 10485
53272 67637
31806 43520
52828 65623
48898 71417
50498 56406
38078 19297
841 13877
33748 39636
20443 22605
40536 64565
37974 1167
71296 47279
9748 14916
59554 2301
34642 72198
64230 17875
17508 34756
41416 11370
...

output:

10587 5899

result:

ok 2 number(s): "10587 5899"

Test #9:

score: 0
Accepted
time: 1365ms
memory: 67636kb

input:

80000 80000 200000
1388 9537
38756 52435
23605 561
32227 28507
61132 78933
45963 39084
72225 16827
23506 11690
42188 75063
76686 35640
51591 16352
75261 36033
32944 65297
58431 22960
71241 13033
23767 36727
67960 18379
55085 77452
28935 12511
50318 40680
19685 9487
25771 53254
5539 6539
31254 30570
...

output:

13207 8325

result:

ok 2 number(s): "13207 8325"

Test #10:

score: 0
Accepted
time: 949ms
memory: 76468kb

input:

100000 100000 200000
42945 23959
33325 49252
17179 94800
16436 59212
65985 4592
64653 98177
80264 42838
23439 37271
32265 23336
96979 26629
87423 1615
15096 13638
4746 85880
23648 75450
19758 85076
95921 51778
90005 40216
90902 36551
69513 26590
70332 97587
79419 68963
42581 64470
56351 20935
66200 ...

output:

27752 15532

result:

ok 2 number(s): "27752 15532"

Test #11:

score: 0
Accepted
time: 43ms
memory: 72480kb

input:

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

output:

0 0

result:

ok 2 number(s): "0 0"

Test #12:

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

input:

7 5 9
5 4
4 4
3 2
7 3
7 4
7 2
6 1
4 1
5 5

output:

2 0

result:

ok 2 number(s): "2 0"

Test #13:

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

input:

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

output:

5 1

result:

ok 2 number(s): "5 1"

Test #14:

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

input:

2 6 12
1 1
1 2
1 3
1 4
1 5
1 6
2 1
2 2
2 3
2 4
2 5
2 6

output:

2 2

result:

ok 2 number(s): "2 2"

Test #15:

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

input:

4 5 1
2 2

output:

7 0

result:

ok 2 number(s): "7 0"

Test #16:

score: 0
Accepted
time: 984ms
memory: 76260kb

input:

100000 99999 200000
61034 23620
58645 7054
48333 98879
84661 32844
68948 28850
90808 72769
14366 23888
10576 98523
68334 42575
7056 5031
72043 7137
14483 82787
64577 63101
17974 8012
23711 38642
46074 63836
6456 81972
78947 86068
41442 53615
1051 14333
60057 9493
68015 61090
22685 21507
48369 40983
...

output:

27787 15568

result:

ok 2 number(s): "27787 15568"

Test #17:

score: 0
Accepted
time: 974ms
memory: 76416kb

input:

100000 99999 200000
77162 59778
39198 10017
64882 73737
56644 63603
11615 39308
51248 35931
14456 30815
48195 57202
48760 88023
5074 26243
59984 79623
21993 87970
78434 28966
12195 87894
38023 68458
32596 31947
24555 13106
13760 5810
76172 51014
20993 38845
76158 85375
66500 6903
80873 59654
62476 7...

output:

27731 15408

result:

ok 2 number(s): "27731 15408"

Test #18:

score: 0
Accepted
time: 912ms
memory: 72352kb

input:

100000 99999 200000
60586 85689
43944 2734
89944 58841
28628 4609
78475 49765
44391 9340
90354 47989
75414 15880
20675 43717
68501 48484
56436 42894
5310 92124
92291 94830
6417 79052
28144 98274
51822 90839
34142 33994
15868 95842
10901 38166
8230 73603
16451 52042
32281 61931
47574 87554
41992 1427...

output:

27752 15375

result:

ok 2 number(s): "27752 15375"

Test #19:

score: 0
Accepted
time: 978ms
memory: 72364kb

input:

100000 99999 200000
76714 21847
57202 14913
71902 42916
24803 55860
12630 70468
4831 72502
90444 45699
13033 74557
68397 98381
90711 79942
20185 15382
80115 97307
38852 51478
67934 59963
42456 18875
95240 58949
76433 65127
42169 15584
78335 44782
95468 99143
65256 38171
98062 97497
5763 25702
56099 ...

output:

27820 15523

result:

ok 2 number(s): "27820 15523"

Test #20:

score: 0
Accepted
time: 960ms
memory: 72364kb

input:

100000 99999 200000
27434 47759
37755 7630
21155 17773
29490 86619
79490 70679
65271 45910
23239 62872
40252 33235
16120 54075
88729 1155
83933 87869
20329 92245
85413 96851
62155 39846
99873 58937
47170 28089
86020 86014
44278 15862
4553 21689
82705 33902
72844 4838
72355 43309
63951 53602
35615 80...

output:

27682 15567

result:

ok 2 number(s): "27682 15567"

Test #21:

score: 0
Accepted
time: 942ms
memory: 72356kb

input:

100000 99999 200000
43562 63424
75205 10592
46217 92630
92961 27625
13645 81137
34222 89609
23329 50336
77871 91912
20738 8741
19451 23395
71874 51139
27838 97428
99270 62716
23672 31004
14185 88753
66396 85952
4119 17149
79091 5894
71987 8842
69943 58414
88945 90966
38136 89120
97948 967
49722 4469...

output:

27765 15516

result:

ok 2 number(s): "27765 15516"

Test #22:

score: 0
Accepted
time: 1068ms
memory: 73968kb

input:

100000 99999 200000
26986 90365
55759 13555
62766 76705
64945 68630
47800 1841
94662 63018
23419 67509
5090 49561
1165 64434
17469 44607
68327 13381
11155 92365
13127 28581
50597 11916
61201 18571
77111 54063
46410 48282
38096 25635
74012 6241
57180 73708
61942 66850
3917 24687
56137 39114
29238 182...

output:

27558 15629

result:

ok 2 number(s): "27558 15629"

Test #23:

score: 0
Accepted
time: 955ms
memory: 76680kb

input:

100000 99999 200000
43114 16277
93208 15489
12020 61809
93824 9636
14660 2052
55101 26180
56213 65220
42709 8239
73079 29345
80895 65819
32075 85868
18665 6766
59688 85228
44818 91798
18618 58633
96337 23202
55997 79415
7500 25913
41446 93393
52930 8467
78043 43762
2402 70498
90134 77260
43345 38471...

output:

27628 15537

result:

ok 2 number(s): "27628 15537"

Test #24:

score: 0
Accepted
time: 839ms
memory: 76344kb

input:

100000 99999 200000
26538 52434
73762 18451
37081 36667
33103 40395
48815 21726
15541 99588
99408 82393
80328 66916
20801 85038
78913 77814
20016 49138
93470 1704
73545 40848
6335 72710
32930 98695
15563 91311
74096 304
42313 35409
8880 90792
7464 43225
18335 19646
76695 6065
48322 15408
65965 75114...

output:

27805 15486

result:

ok 2 number(s): "27805 15486"

Test #25:

score: 0
Accepted
time: 844ms
memory: 72356kb

input:

100000 99999 200000
66351 61368
39726 71143
10263 73049
99060 95725
22962 78117
2988 46691
36488 4811
9990 63855
98038 68522
6378 46900
3852 42140
96850 6378
69936 17055
4334 71834
99834 2079
79966 58928
82390 62100
86268 97984
54213 11228
63376 94499
20923 92287
3833 77027
85858 32556
96619 69989
6...

output:

27842 15753

result:

ok 2 number(s): "27842 15753"

Test #26:

score: 0
Accepted
time: 827ms
memory: 72348kb

input:

100000 99999 200000
49775 77033
44471 74106
26812 57124
95236 26485
57117 88574
6531 9853
36578 21985
80313 22533
78464 24216
37100 78358
91793 14628
4359 1316
83793 82919
98555 51717
14146 32924
99193 27038
91977 93233
21080 8509
21646 7597
26421 29258
93920 69200
69614 22840
44047 70702
76134 1687...

output:

27526 15679

result:

ok 2 number(s): "27526 15679"

Test #27:

score: 0
Accepted
time: 752ms
memory: 74988kb

input:

100000 99999 200000
65903 3974
57729 77068
51874 42228
67219 67490
23976 99032
99675 63798
36668 18666
74828 81210
50379 78880
35118 99570
55541 87115
79165 6499
30354 38539
92776 32629
4266 62741
85715 96176
77372 24367
55893 7758
23672 94749
13659 44552
10021 45083
68099 58405
78044 7821
90242 637...

output:

27706 15561

result:

ok 2 number(s): "27706 15561"

Test #28:

score: 0
Accepted
time: 836ms
memory: 72384kb

input:

100000 99999 200000
16623 29886
62475 79002
1127 17086
63394 8496
58132 9490
60114 37207
69462 26622
12447 29642
98101 34575
65840 21812
84698 50385
86674 1436
44211 95186
78485 23787
85875 92557
29133 64287
52367 45255
58002 18282
91106 81902
33600 79310
50314 31213
9688 4217
36232 45968
37053 412
...

output:

27662 15633

result:

ok 2 number(s): "27662 15633"

Test #29:

score: 0
Accepted
time: 932ms
memory: 76476kb

input:

100000 99999 200000
32751 66043
43028 81964
26189 90914
35378 49501
92287 19947
20554 369
36849 33549
15474 97537
70015 89239
63858 43023
72638 12627
69991 15836
58068 61051
72706 3670
75995 32620
48359 12934
61954 76388
17007 18561
25836 79301
88134 14069
66414 97878
75469 59246
70229 94360
83865 4...

output:

27743 15448

result:

ok 2 number(s): "27743 15448"

Test #30:

score: 0
Accepted
time: 819ms
memory: 76032kb

input:

100000 99999 200000
16175 91954
56286 74681
75442 76017
64257 90506
59147 30404
13698 63531
36939 41506
77285 56215
50442 34687
94580 74481
36387 85114
10205 10773
4629 26916
66927 84581
23011 62436
91777 91290
47349 97275
86412 28056
60565 66454
8075 29363
6707 84008
73954 94811
28418 22262
30677 8...

output:

27621 15624

result:

ok 2 number(s): "27621 15624"

Test #31:

score: 0
Accepted
time: 951ms
memory: 73912kb

input:

100000 99999 200000
32303 7621
93736 77644
91992 50875
3536 31512
93302 40862
74137 36940
69733 48433
80312 14893
22356 99597
92598 86476
135 58631
17714 15957
18486 73318
28444 55247
80428 92253
43707 50183
89640 28410
21224 28334
95295 53607
95313 64121
22808 50674
39735 40624
86607 60408
53296 30...

output:

27574 15813

result:

ok 2 number(s): "27574 15813"

Test #32:

score: 0
Accepted
time: 829ms
memory: 76764kb

input:

100000 99999 200000
15727 34561
74289 79577
17054 45196
8224 72517
27458 51319
67281 90884
45631 56389
42123 73570
2783 55292
23320 7689
96588 31118
25223 10894
65047 28937
55370 55622
94740 22070
30230 18293
99227 49297
80229 48075
62729 51006
82551 88633
95805 26558
14028 76189
20603 97526
108 777...

output:

27453 15696

result:

ok 2 number(s): "27453 15696"

Test #33:

score: 0
Accepted
time: 835ms
memory: 72420kb

input:

100000 99999 200000
99151 60473
79035 82540
66307 20054
4399 13523
94317 61776
95016 64293
45722 63316
45150 22002
74697 20203
54043 29929
84528 3606
75837 5831
11608 94801
16887 36534
9052 51886
73648 77186
74222 80430
82338 38107
97459 27913
69788 24420
11906 12687
79809 22002
11496 35674
46919 14...

output:

27809 15586

result:

ok 2 number(s): "27809 15586"

Test #34:

score: 0
Accepted
time: 830ms
memory: 76460kb

input:

100000 99999 200000
15279 96630
92293 85503
48265 94911
76382 54528
36985 72234
31264 27456
78516 61027
6961 89896
22420 65650
52061 51141
48277 56630
83346 20231
25465 41203
11108 7200
99173 82732
92874 45296
59618 11565
84447 57848
56380 25312
57026 48932
19494 79353
45590 67813
69685 63574
93731 ...

output:

27712 15373

result:

ok 2 number(s): "27712 15373"

Test #35:

score: 0
Accepted
time: 924ms
memory: 73904kb

input:

100000 99999 200000
65465 82893
2944 62212
75951 18049
55023 12543
51803 97918
9799 51851
64483 53316
46495 84817
90290 54658
63479 32418
59544 81209
47054 2776
29863 96185
22506 35597
2776 87575
60756 64907
14501 30531
4473 73125
77548 13457
34730 87405
47538 84860
44925 31363
35645 10187
80969 188...

output:

27755 15356

result:

ok 2 number(s): "27755 15356"

Test #36:

score: 0
Accepted
time: 792ms
memory: 76364kb

input:

100000 99999 200000
48889 19052
40394 64146
25205 3153
94302 43302
85958 8377
70238 15014
64573 51026
8307 43495
62204 10352
26905 63876
23292 53696
30371 6930
43720 62050
84023 16509
92896 17393
12686 23801
24088 51419
63478 92866
44982 10856
21968 23193
63639 41280
10706 77174
93834 48333
36293 55...

output:

27826 15437

result:

ok 2 number(s): "27826 15437"

Test #37:

score: 0
Accepted
time: 873ms
memory: 72392kb

input:

100000 99999 200000
32313 44963
20947 77355
17563 78010
23182 84307
52818 18834
97974 78175
97367 68199
78630 2173
42631 55799
24923 95334
87041 26184
37881 1868
57577 17669
78244 97420
39913 47209
23400 91910
33675 82552
32882 93144
79712 98008
9205 47704
3932 17164
84999 2495
27831 76234
50401 921...

output:

27778 15523

result:

ok 2 number(s): "27778 15523"

Test #38:

score: 0
Accepted
time: 914ms
memory: 72364kb

input:

100000 99999 200000
15737 61657
25693 70071
66816 62084
95165 35559
86973 29291
91117 42367
40561 65909
48953 60850
47249 20710
22941 7329
74981 79208
45390 96804
36842 74317
5170 87548
97329 77025
42626 50803
51774 3440
67695 2640
38633 85161
96443 82462
20033 3293
18075 48306
86020 23599
97212 585...

output:

27810 15457

result:

ok 2 number(s): "27810 15457"

Test #39:

score: 0
Accepted
time: 882ms
memory: 76852kb

input:

100000 99999 200000
31865 87569
38951 73034
16070 47188
58636 66318
21129 39748
27365 5530
40652 83082
43468 28745
94972 66157
53663 28541
38730 51696
52899 1988
50699 40182
66687 68460
11641 17089
61853 29160
61361 44820
93996 2918
73363 91776
83680 97757
60325 69959
16560 3336
52720 61745
44024 95...

output:

27781 15432

result:

ok 2 number(s): "27781 15432"

Test #40:

score: 0
Accepted
time: 900ms
memory: 76568kb

input:

100000 99999 200000
15290 13481
76400 85213
73835 22046
63324 7324
87988 50206
20509 78937
73446 80793
13791 87422
42694 20823
51681 49753
35182 34429
36217 96924
64556 6047
60908 49372
1762 57151
5271 77806
70948 65707
28809 3196
40797 68683
3622 32515
33322 56088
15045 38901
10909 99892
90835 3180...

output:

27601 15588

result:

ok 2 number(s): "27601 15588"

Test #41:

score: 0
Accepted
time: 931ms
memory: 75016kb

input:

100000 99999 200000
98714 49639
56954 77930
23089 16367
35307 48329
22144 60663
80948 31854
73536 87720
8306 35854
14609 86762
82404 71994
98931 97699
43726 1079
35309 42202
55129 39501
16074 86967
91793 45917
45943 96840
63622 12692
75527 55836
58155 47810
49423 22755
23930 84713
1802 38039
37647 8...

output:

27598 15465

result:

ok 2 number(s): "27598 15465"

Test #42:

score: 0
Accepted
time: 810ms
memory: 75128kb

input:

100000 99999 200000
14842 75550
61700 80893
15446 91224
31482 89334
56299 71120
41388 5263
6330 85430
78629 94531
62331 41427
13126 93206
86872 70187
51235 6263
49166 8068
16646 20413
30387 16784
11019 24273
31338 17729
33026 23216
10256 53235
45393 92814
57012 8884
22415 30525
35798 65940
84458 255...

output:

27814 15685

result:

ok 2 number(s): "27814 15685"

Test #43:

score: 0
Accepted
time: 870ms
memory: 72416kb

input:

100000 99999 200000
98266 1462
74957 73609
64700 66082
3466 30340
55863 81578
34531 59207
6421 2604
73144 53210
99654 97120
35336 24664
50620 32429
34553 1200
63023 73932
10867 91078
87803 47630
54437 83165
73629 39645
92031 22465
44986 40388
65335 17326
5816 84767
20900 66090
93987 13305
31270 6223...

output:

27774 15433

result:

ok 2 number(s): "27774 15433"

Test #44:

score: 0
Accepted
time: 884ms
memory: 72360kb

input:

100000 99999 200000
14394 18157
55511 76572
13953 60402
32345 71345
90018 92035
62267 32616
6511 315
43467 21105
47376 51786
66058 36659
47073 95698
42062 6383
9584 39797
72384 91453
34819 77446
73663 41030
83217 60532
26844 22743
79716 37787
52572 42867
46109 51433
62489 11903
52176 41205
78081 193...

output:

27592 15241

result:

ok 2 number(s): "27592 15241"

Test #45:

score: 0
Accepted
time: 748ms
memory: 76492kb

input:

100000 99999 200000
64580 14666
23058 62499
74344 74323
54090 29359
80644 18750
83906 57011
990 92603
74489 26272
82542 31576
77476 37399
58339 20278
73066 98144
89791 75316
40679 10634
14230 82290
74249 51424
38100 98962
14166 57482
25076 25932
30276 91586
41449 56941
86016 75452
18137 87817
73832 ...

output:

27564 15655

result:

ok 2 number(s): "27564 15655"

Test #46:

score: 0
Accepted
time: 848ms
memory: 76668kb

input:

100000 99999 200000
48004 50823
3612 65461
23598 49180
50265 60118
47504 29207
77049 30420
1080 560
77516 84949
87161 87269
75494 39148
22088 92765
56383 93081
60544 41181
34900 81299
28543 12107
60772 29780
23495 10633
16275 68006
92510 23331
17514 16099
57550 23607
94901 21264
76325 25964
20644 33...

output:

27696 15407

result:

ok 2 number(s): "27696 15407"

Test #47:

score: 0
Accepted
time: 823ms
memory: 72420kb

input:

100000 99999 200000
31428 66489
8358 58178
48659 34284
22248 10341
81659 29418
37489 83336
68466 7487
15135 43627
34883 41935
38920 70606
18540 56035
96597 98264
74401 7046
96417 71428
51367 41923
4190 78427
33082 41767
75280 77502
27239 238
4752 41640
97843 9737
93386 67076
10322 53865
67455 50278
...

output:

27483 15628

result:

ok 2 number(s): "27483 15628"

Test #48:

score: 0
Accepted
time: 813ms
memory: 76212kb

input:

100000 99999 200000
14852 2647
21615 80604
65209 18359
18424 61592
15815 50121
30632 56744
1260 5197
9650 92058
6798 87382
36938 82600
6481 28523
4106 93201
88258 53447
90638 52340
32976 81986
23416 46537
8077 62654
77389 77780
61969 87390
91989 66151
46647 85619
91871 11859
68511 2259
14267 97167
8...

output:

27807 15264

result:

ok 2 number(s): "27807 15264"

Test #49:

score: 0
Accepted
time: 853ms
memory: 75048kb

input:

100000 99999 200000
30980 19342
34873 73320
14462 93216
90407 92351
82674 60579
58368 10690
1351 12125
79973 59953
87224 52293
34956 14059
70230 1011
11615 7603
34819 19313
84859 33252
47288 11803
42642 24893
93472 93787
79497 87275
29403 84789
11931 910
86940 62531
756 57671
59403 39376
61078 33811...

output:

27634 15625

result:

ok 2 number(s): "27634 15625"

Test #50:

score: 0
Accepted
time: 965ms
memory: 74412kb

input:

100000 99999 200000
81700 45253
39619 76283
39524 78320
62390 33357
16830 60790
18808 84098
77249 20081
74488 18631
59138 7987
65679 45517
33978 64281
94933 2540
48676 85177
46376 23381
4704 41619
18764 83786
3059 14676
38502 97799
64133 71942
66464 26451
3041 38415
99241 3483
93400 77523
50994 8070...

output:

27812 15523

result:

ok 2 number(s): "27812 15523"

Test #51:

score: 0
Accepted
time: 804ms
memory: 74492kb

input:

100000 99999 200000
97828 81410
20172 68999
88778 52149
58566 74362
50985 71247
11951 47260
10043 27008
44811 77308
39565 72898
63697 57512
54623 36768
69738 97476
62533 40796
40598 94046
51721 71436
5286 41650
45350 56055
40611 87831
98862 69341
53702 61208
43334 5081
97726 39048
51589 5424
30509 2...

output:

27958 15555

result:

ok 2 number(s): "27958 15555"

Test #52:

score: 0
Accepted
time: 822ms
memory: 72360kb

input:

100000 99999 200000
81252 97076
57622 71962
38031 27006
63253 15368
17844 91951
48199 10423
10133 34964
6622 35986
11479 18346
27123 88969
18371 99009
77247 2660
41798 87197
34819 85204
41841 1253
24513 10790
54937 76943
75424 97326
57784 46248
73643 85720
59434 91210
63507 84860
85586 43571
44617 6...

output:

27856 15617

result:

ok 2 number(s): "27856 15617"

Test #53:

score: 0
Accepted
time: 806ms
memory: 72348kb

input:

100000 99999 200000
97380 33234
38176 84142
30389 12110
26724 56373
84704 92162
41342 73585
10224 41892
9649 94663
59202 83256
25141 10182
82120 71497
84756 6814
55655 53063
96336 75333
23449 32098
67931 78899
5740 8077
10236 97605
25218 42617
60881 11262
99727 67093
5096 30672
76478 71472
24132 111...

output:

27729 15464

result:

ok 2 number(s): "27729 15464"

Test #54:

score: 0
Accepted
time: 804ms
memory: 76104kb

input:

100000 99999 200000
80804 59145
42921 76858
79642 96184
31412 97378
18859 2620
1782 37776
43018 49848
47268 52312
39628 28704
23159 32423
70060 34768
68074 11998
69512 18928
23261 45998
46274 72160
87157 37792
15328 28964
3833 7101
27244 40016
15415 35773
48532 44006
3581 66238
34667 18836
38240 580...

output:

27696 15433

result:

ok 2 number(s): "27696 15433"

Test #55:

score: 0
Accepted
time: 823ms
memory: 74564kb

input:

100000 99999 200000
63695 46438
86276 63814
40033 20351
77349 55392
42190 38551
14909 71389
28985 31891
10995 47233
31690 17712
67281 12671
89839 59346
31782 94541
73910 63663
1955 65179
49877 66758
87743 57403
37507 58177
23859 32623
81116 18944
93119 84493
11168 29021
70211 29788
628 65448
33991 1...

output:

27856 15459

result:

ok 2 number(s): "27856 15459"