QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#244615#7764. 世界沉睡童话zhoukangyang#23.5 4967ms128180kbC++113.2kb2023-11-09 13:39:262024-07-04 02:23:50

Judging History

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

  • [2024-07-04 02:23:50]
  • 评测
  • 测评结果:23.5
  • 用时:4967ms
  • 内存:128180kb
  • [2023-11-09 13:39:26]
  • 提交

answer

#include<bits/stdc++.h>
#define L(i, j, k) for(int i = (j); i <= (k); ++i)
#define R(i, j, k) for(int i = (j); i >= (k); --i)
#define ll long long
#define vi vector <int>
#define sz(a) ((int) (a).size())
#define me(f, x) memset(f, x, sizeof(f))
#define uint unsigned int
#define ull unsigned long long 
#define i128 __int128
using namespace std;
const int N = 1 << 20, Mod = 1019260817, G = 19491001;
const int mod = 998244353;
int n, rt;
vi son[N];

int s[N], fa[N], top;
int a[N], p[N];

int stop;

int mx_sub[N], mn_sub[N]; 
void dfs(int x) {
	s[++stop] = x;
	mx_sub[x] = mn_sub[x] = a[x];
	for(auto&v : son[x]) {
		fa[v] = x;
		dfs(v);
		mx_sub[x] = max(mx_sub[x], mx_sub[v]);
		mn_sub[x] = min(mn_sub[x], mn_sub[v]);
	}
}

void dfs1(int x) {
	for(auto&v : son[x]) {
		fa[v] = x;
		dfs(v);
	}
}

int Pw[N], SUM[N]; 
void chck_slv(int x) {
	SUM[x] = (Pw[a[x]] + Mod - Pw[p[x]]) % Mod;
	for(auto&v : son[x]) {
		chck_slv(v);
		(SUM[x] += SUM[v]) %= Mod;
	}
}

bool chck() {
	vi np(n + 1);
	L(i, 1, n) 
		np[i] = a[i];
	chck_slv(rt);
	L(i, 2, n) {
		if(SUM[s[i]]) {
			swap(np[s[i]], np[fa[s[i]]]);
		}
	}
	L(i, 1, n) 
		if(np[i] != p[i]) 
			return 0;
	return 1;
}

int mp[N]; 
vector < pair < int, int > > vp[N]; 

int vis[N];
pair < int, int > stk[N];

vector < pair < int, int > > vec;
int fnd = 0, ans;

int aimp, rec, pw[N];
int sf[N];
void Get(int x, int lim) {
	if(lim <= sf[x]) {
		if(mx_sub[x] < aimp) {
			(ans += pw[rec - top]) %= mod;
			return;
		}
		if(mn_sub[x] > aimp) {
			return ;
		}
	}
//	cout << " x = " << x << ' ' << rec << endl;
	auto K = lower_bound(vp[x].begin(), vp[x].end(), make_pair(lim, -114514));
	if(K == vp[x].begin()) {
		if(a[x] == aimp) {
			fnd = 1, vec.clear(); 
			L(i, 1, top) 
				vec.emplace_back(stk[i]);
		} else if(a[x] < aimp) {
			(ans += pw[rec - top]) %= mod;
		}
		return ;
	}
	--K;
	int v = K -> second;
	int e = K -> first;
	L(c, 0, 1) {
		if(vis[e] != -1 && vis[e] != c) 
			continue;
		int pb = 0;
		if(vis[e] == -1) 
			pb = 1, stk[++top] = {e, c};
		if(c) Get(v, e);
		else Get(x, e);
		if(pb) --top;
	}
}
int main () {
	ios :: sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	cin >> n >> rt;
	L(i, 1, n) {
		cin >> a[i];
	}
	L(i, 1, n) {
		int k;
		cin >> k;
		while(k--) {
			int x;
			cin >> x;
			son[i].emplace_back(x);
		}
	}
	dfs(rt);
	L(i, 1, n) {
		cin >> p[i];
	}
	Pw[0] = 1;
	L(i, 1, n) {
		Pw[i] = (ll) Pw[i - 1] * G % Mod;
	}
	L(i, 2, n) {
		int u = s[i];
		sf[u] = i;
		vp[fa[u]].emplace_back(i, u);
		vp[u].emplace_back(i, fa[u]);
	}
	if(chck()) cout << "YES\n";
	else cout << "NO\n";
	cout << "no comment\n";
	L(i, 1, n) {
		mp[p[i]] = i;
	}
	L(i, 2, n) {
		vis[i] = -1;
	}
	pw[0] = 1;
	L(i, 1, n) 
		pw[i] = (ll) pw[i - 1] * 2 % mod;
	auto st = clock();
	rec = n - 1;
	ans = 0;
	L(rt, 1, n) {
		aimp = p[rt], vec.clear(), fnd = 0;
		top = 0;
		Get(rt, n + 1);
		if(!fnd) 
			break;
		for(auto&r : vec) 
			vis[r.first] = r.second; 
		rec -= sz(vec);
		if(((double) clock() - st) / CLOCKS_PER_SEC > 4.8) {
			cout << "no comment\n";
			return 0;
		}
	}
	cout << ans << '\n';
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 3ms
memory: 76576kb

input:

20 10
20 6 18 12 8 14 15 5 1 17 11 10 19 13 7 16 2 9 3 4
3 13 16 20
1 4
1 17
0
1 19
0
0
0
3 5 8 11
3 1 3 18
0
0
2 15 12
3 6 9 2
1 14
0
0
0
1 7
0
19 6 17 12 3 14 13 5 8 9 11 7 10 1 20 16 2 18 15 4

output:

YES
no comment
443216

result:

ok Your answer to Question 3 is correct. 100%.

Test #2:

score: 5
Accepted
time: 7ms
memory: 77308kb

input:

20 15
10 16 5 1 14 15 2 8 19 9 6 3 7 12 13 11 4 20 17 18
0
0
1 10
0
0
1 17
0
3 6 20 19
3 8 12 1
1 5
3 18 14 2
2 11 13
0
0
2 9 16
1 3
1 7
1 4
0
0
12 18 9 7 5 16 20 3 17 2 14 15 13 19 11 6 1 10 8 4

output:

NO
no comment
458752

result:

ok Your answer to Question 3 is correct. 100%.

Test #3:

score: 5
Accepted
time: 8ms
memory: 75972kb

input:

20 20
7 6 19 4 16 12 1 15 14 10 8 13 9 18 3 17 2 11 5 20
3 4 14 10
0
3 9 2 16
0
1 18
0
0
2 17 5
0
2 6 12
0
1 3
2 11 1
1 8
0
0
0
1 19
1 15
2 13 7
20 19 17 4 18 12 9 16 14 13 8 10 7 15 11 6 2 5 3 1

output:

YES
no comment
524287

result:

ok Your answer to Question 3 is correct. 100%.

Subtask #2:

score: 5
Accepted

Test #4:

score: 5
Accepted
time: 28ms
memory: 81168kb

input:

80000 1
77649 27240 19178 10270 1981 6216 42189 63630 66779 68852 46110 27187 4598 75779 69930 43632 68065 13395 33234 17719 76420 65825 3003 67410 18637 3380 32923 66692 9430 1915 118 62287 69323 9735 72936 30221 46487 33367 59048 61582 55572 10657 61645 68649 23643 39197 38086 66512 58864 51881 69...

output:

YES
no comment
524240706

result:

ok Your answer to Question 3 is correct. 100%.

Test #5:

score: 5
Accepted
time: 32ms
memory: 81788kb

input:

80000 1
40751 74046 38639 8349 10511 79922 55598 63363 5123 68628 47324 17756 21270 35623 48141 31851 51342 75440 32 64257 20805 21871 72745 39461 76181 72542 12937 23663 69050 49377 74431 74875 66326 28811 65655 37532 53189 6723 56502 67191 76122 35519 22721 36131 31071 4212 11534 64384 71045 33940...

output:

NO
no comment
10861120

result:

ok Your answer to Question 3 is correct. 100%.

Test #6:

score: 5
Accepted
time: 25ms
memory: 81880kb

input:

80000 1
52 92 20 169 34 249 69 125 25 131 77 32 55 182 43 150 219 5 15 236 26 155 6 19 39 4 93 23 21 47 318 40 179 328 7 38 95 42 146 49 268 227 61 214 36 148 73 3 10 60 90 33 28 56 220 18 122 46 64 188 44 1 50 396 173 218 561 58 51 79 72 53 17 100 97 66 78 118 8 68 80 81 211 84 99 136 133 205 11 11...

output:

NO
no comment
599441604

result:

ok Your answer to Question 3 is correct. 100%.

Subtask #3:

score: 5
Accepted

Dependency #2:

100%
Accepted

Test #7:

score: 5
Accepted
time: 69ms
memory: 81640kb

input:

80000 3823
8672 63816 1855 36775 59031 46214 57526 45575 56480 24946 44377 71695 48249 27546 7294 50921 44846 15666 48938 25415 52920 13826 22835 21341 1142 24320 29132 52868 64771 21558 60343 15685 75914 11345 44134 68985 77283 78587 12672 69815 6415 5331 75886 12703 35068 3032 31409 31937 9552 185...

output:

YES
no comment
612179383

result:

ok Your answer to Question 3 is correct. 100%.

Test #8:

score: 5
Accepted
time: 67ms
memory: 80856kb

input:

80000 60188
5794 26969 68934 26583 48201 17389 14742 77469 44368 2137 74498 60703 9179 31494 20743 20484 30465 15763 2175 10298 54198 810 52901 22117 69570 14168 20437 66380 11645 68961 53532 24346 8175 66161 79610 68212 11083 30646 53788 257 6139 33662 24868 65419 14595 38655 32846 48437 5746 7958 ...

output:

NO
no comment
196571817

result:

ok Your answer to Question 3 is correct. 100%.

Test #9:

score: 5
Accepted
time: 62ms
memory: 81656kb

input:

80000 79998
1148 7193 27496 1966 51563 50524 12463 55117 63933 49247 60771 74288 46586 10841 55278 15357 76933 58367 3881 42134 41227 41943 36434 22191 61595 51327 67615 76770 25655 17597 49007 19958 22646 43900 8657 46333 46826 45346 39216 23828 50433 15579 72477 4164 43118 71917 18319 23835 40211 ...

output:

YES
no comment
291865406

result:

ok Your answer to Question 3 is correct. 100%.

Subtask #4:

score: 0.5
Acceptable Answer

Dependency #2:

100%
Accepted

Test #10:

score: 5
Accepted
time: 29ms
memory: 83200kb

input:

80000 1
23182 57274 19130 76507 5924 29197 57478 51488 74017 47401 32091 39255 79861 41955 26974 60662 2225 70963 4735 74401 52909 69178 36760 4690 44532 40697 73039 16264 67322 64193 8773 62412 3428 53091 14416 64609 25648 38035 58938 30410 9510 44821 74764 18342 70921 74358 36541 4577 75727 28512 ...

output:

NO
no comment
295664390

result:

ok Your answer to Question 3 is correct. 100%.

Test #11:

score: 0.5
Acceptable Answer
time: 4827ms
memory: 83220kb

input:

80000 1
61602 27516 53669 51811 14948 76631 192 16777 38570 5946 6954 12227 19942 68561 44448 64006 37108 15992 41511 40400 74124 37704 11985 29943 7097 41084 19256 29568 37388 56685 22863 77327 58896 48299 22126 51515 68870 30219 42431 18685 19954 27935 44008 75233 1372 26374 13728 29643 15853 1632...

output:

YES
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #12:

score: 0.5
Acceptable Answer
time: 4815ms
memory: 81892kb

input:

80000 1
51403 43298 36255 30628 71642 1172 72452 42485 56088 13897 14689 1329 30730 20044 69736 78928 36520 29140 66633 53336 9061 64982 16774 8311 18347 41865 66679 25376 15633 7047 9244 38840 29360 34593 35221 29546 66474 62134 53176 72767 36402 11944 46808 71900 13231 23302 71179 54895 74879 6071...

output:

NO
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Subtask #5:

score: 1
Acceptable Answer

Dependency #3:

100%
Accepted

Dependency #4:

10%
Acceptable Answer

Test #13:

score: 1
Acceptable Answer
time: 4844ms
memory: 83732kb

input:

80000 68659
70109 51558 65623 5410 50194 12671 41851 46707 18979 35789 10399 49850 37276 70066 45861 29543 46347 53794 69442 20916 51977 40992 55104 29643 59837 78096 25821 23109 55191 44098 44245 73969 77591 19759 14966 13938 37043 16654 9706 46429 47377 61081 38400 53329 44377 51683 64422 55995 31...

output:

YES
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #14:

score: 1
Acceptable Answer
time: 4852ms
memory: 84540kb

input:

80000 71491
8509 34565 65970 31200 64340 13312 45906 27161 57934 71860 66725 12271 17528 20101 31600 1869 19409 47126 9481 56413 28150 49372 6574 73613 68669 9670 69305 54854 79784 79919 45266 56440 40901 42373 5415 73930 53628 74717 26775 16342 48345 79779 12804 7655 62559 29042 8955 65320 33276 66...

output:

YES
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #15:

score: 1
Acceptable Answer
time: 4852ms
memory: 85788kb

input:

80000 14866
79736 52777 37263 33532 11548 30859 43098 29058 74526 65225 70279 41170 21289 29412 17440 56889 37066 163 26472 5893 69596 78817 73759 66539 13878 37975 46895 904 25416 38865 43184 63503 10216 9023 30633 71226 43368 54052 37651 39834 34263 13177 15869 55707 22333 4511 55243 70435 78674 2...

output:

NO
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Subtask #6:

score: 1
Acceptable Answer

Dependency #4:

10%
Acceptable Answer

Test #16:

score: 1
Acceptable Answer
time: 4816ms
memory: 84148kb

input:

80000 1
45041 77508 44646 72960 5142 7856 42400 63064 69667 73163 10296 12545 39981 69398 67627 236 46390 62996 76158 17457 18506 47511 27823 77659 37104 45001 69521 34070 72424 54545 76591 35628 43288 38845 54268 55979 5284 76915 15449 57969 44321 11625 55473 55582 41841 33638 75319 24373 61557 597...

output:

YES
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #17:

score: 1
Acceptable Answer
time: 4814ms
memory: 82952kb

input:

80000 1
45041 77508 44646 72960 5142 7856 42400 63064 69667 73163 10296 12545 39981 69398 67627 236 46390 62996 76158 17457 18506 47511 27823 77659 37104 45001 69521 34070 72424 54545 76591 35628 43288 38845 54268 55979 5284 76915 15449 57969 44321 11625 55473 55582 41841 33638 75319 24373 61557 597...

output:

YES
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #18:

score: 1
Acceptable Answer
time: 4826ms
memory: 81192kb

input:

80000 1
50161 3582 54202 25676 14704 5676 46522 59613 47669 13501 11025 17907 56671 19668 23762 26613 59905 15126 74812 37288 72679 62932 49918 36622 43959 76525 6718 29715 60443 37227 60763 11585 62647 70716 40844 31317 37 139 17766 39317 75303 21411 17517 24945 2331 70054 36956 2659 10993 24512 50...

output:

NO
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #19:

score: 10
Accepted
time: 553ms
memory: 81024kb

input:

80000 1
40361 64075 72013 70693 38637 71819 51194 24672 72459 71666 45544 21500 57596 72431 40137 58335 10024 7210 68527 6658 57518 12598 44535 47884 37200 58195 29602 62334 292 35570 34798 64419 15579 61790 70161 65026 33083 11649 8877 36290 46237 58592 67068 72744 9662 66225 8171 15391 3506 31803 ...

output:

YES
no comment
457418813

result:

ok Your answer to Question 3 is correct. 100%.

Test #20:

score: 10
Accepted
time: 38ms
memory: 107160kb

input:

80000 1
2121 32603 23979 35796 52078 3980 45368 46551 72191 32691 54069 69934 8586 23672 23687 39505 21577 6616 70106 12037 8863 24170 47953 56687 31077 41888 7677 74243 2487 13474 5038 44019 849 6008 69906 30329 657 78328 26731 64745 61876 12577 56855 66240 2227 26396 29703 52107 7057 6030 31457 40...

output:

NO
no comment
483632114

result:

ok Your answer to Question 3 is correct. 100%.

Subtask #7:

score: 1.5
Acceptable Answer

Dependency #1:

100%
Accepted

Dependency #5:

10%
Acceptable Answer

Dependency #6:

10%
Acceptable Answer

Test #21:

score: 1.5
Acceptable Answer
time: 4843ms
memory: 87412kb

input:

80000 68966
18501 7689 12538 61837 56048 66833 41846 16650 2112 64357 55836 16783 23098 17515 67205 17598 9418 74816 43732 21946 21458 64129 23645 37604 34697 54480 59090 41357 5471 1097 68445 78917 5167 54499 39313 4953 8146 56495 56867 7734 49591 48791 27238 52719 19320 55035 62995 3417 68579 6516...

output:

YES
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #22:

score: 1.5
Acceptable Answer
time: 4851ms
memory: 85916kb

input:

80000 5799
38674 73537 65905 44693 39349 2366 24695 11948 79494 40949 62803 57258 13693 10303 9122 58674 20612 46690 62632 9081 67639 44133 1406 53227 40941 58271 50642 20308 48227 56032 13319 62626 31448 19524 19622 76658 38242 25673 54711 11685 12457 11872 51477 71241 59389 67640 1652 3790 66048 5...

output:

NO
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #23:

score: 1.5
Acceptable Answer
time: 4849ms
memory: 83716kb

input:

80000 47973
16286 66977 53221 57986 37389 14335 76184 45573 58760 14250 43585 20123 69885 4306 52678 5456 45632 54237 32411 57781 78124 33881 5956 31443 30112 9212 24334 34826 77558 71766 45904 18760 10060 70827 73611 17940 46697 32527 41477 58713 35593 36206 20939 77094 42908 20163 63046 37663 6313...

output:

YES
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #24:

score: 1.5
Acceptable Answer
time: 4841ms
memory: 85508kb

input:

80000 22932
31590 10953 33888 11860 40746 55174 67294 1452 31543 24882 51151 5701 75647 33881 65139 50250 46978 38990 39206 78825 59420 814 79462 72060 29496 55231 36134 56956 57625 35576 42908 38785 77240 57922 54301 45916 59259 62296 11572 50936 64290 17567 75554 43103 25340 20124 69659 32478 3753...

output:

NO
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #25:

score: 1.5
Acceptable Answer
time: 4835ms
memory: 85020kb

input:

80000 39998
13471 20065 25864 5481 77190 75968 10864 8024 45058 52752 55259 72504 33694 35097 48754 66788 70344 69300 50914 16589 69057 74746 34548 75679 43317 21848 10593 26744 55835 2715 5232 65071 16621 71660 57983 44592 15494 22716 47451 39694 29834 57900 10354 38064 27022 76300 71217 78837 5735...

output:

YES
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Subtask #8:

score: 1.5
Acceptable Answer

Dependency #7:

10%
Acceptable Answer

Test #26:

score: 1.5
Acceptable Answer
time: 4877ms
memory: 88912kb

input:

120000 91865
51001 84523 107442 119847 62997 65136 3032 3614 29345 103 47621 11825 118484 71014 109769 28890 21538 68117 36248 89344 67375 43769 2960 86197 23837 93040 114158 7110 74957 66223 52536 39361 62539 7642 110977 14846 93635 29193 88373 19151 117651 118832 52797 33281 13037 19541 31730 289 ...

output:

YES
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #27:

score: 1.5
Acceptable Answer
time: 4865ms
memory: 117200kb

input:

120000 52170
28871 62600 109458 35564 72142 118696 77570 96458 34224 1638 23865 2795 28675 26062 92276 83619 9792 23869 51103 4712 118259 33832 56896 115506 25254 44348 80025 107833 52025 111544 116088 9636 52509 35630 7757 27223 21348 31621 33928 102411 119557 101476 89811 31869 105618 49512 42170 ...

output:

NO
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #28:

score: 1.5
Acceptable Answer
time: 4876ms
memory: 87332kb

input:

120000 33696
85191 53246 95303 58575 35691 77491 101635 5055 45196 86327 93924 76672 96628 77310 118203 98533 45826 44378 112017 57376 56899 89411 48602 21739 71257 72920 65006 59064 109289 36866 115327 735 95627 20018 6268 53312 40385 10920 12412 79284 22376 63051 99405 27576 69554 68730 7367 84960...

output:

YES
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #29:

score: 1.5
Acceptable Answer
time: 4884ms
memory: 90280kb

input:

120000 115781
54375 3001 69662 11122 98046 37364 119496 36599 77187 68124 103492 74374 4829 29457 94973 115886 70941 63986 111074 55150 57901 16926 116383 68911 2658 111272 93204 32078 59594 118746 103455 49327 93580 378 5152 77007 119806 70921 100605 58189 104070 36858 82547 60064 70102 90033 12782...

output:

NO
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #30:

score: 1.5
Acceptable Answer
time: 4837ms
memory: 84968kb

input:

120000 72796
92668 91103 51026 101141 86543 98982 108993 116321 39267 30406 112157 35696 29707 62973 117776 85605 40536 3257 68470 59951 35823 50955 16030 81486 91055 117066 59605 11542 67654 38691 82229 99029 54344 72295 59316 24048 1910 110555 76287 94773 77006 41153 101564 3649 40203 340 93281 47...

output:

NO
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Subtask #9:

score: 1.5
Acceptable Answer

Dependency #8:

10%
Acceptable Answer

Test #31:

score: 1.5
Acceptable Answer
time: 4896ms
memory: 119572kb

input:

160000 138651
105719 19883 73581 98922 113480 49526 85275 97188 92864 110995 117059 77054 143821 72937 105714 101818 59560 124641 88618 48821 111429 132863 53698 57518 34198 137289 130005 131574 71415 138012 116541 158626 45195 12962 104601 65958 38974 101395 109988 113484 114386 90687 20977 126125 ...

output:

YES
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #32:

score: 1.5
Acceptable Answer
time: 4887ms
memory: 121240kb

input:

160000 64500
74763 124618 11095 33338 63241 45375 100447 48026 19193 56839 125722 41495 18923 57687 33795 124676 29488 36820 36909 64323 31165 101062 17641 124747 74968 93818 8471 50019 75912 24431 45779 55052 30505 127919 112637 91266 145606 22901 6323 120553 57603 2113 100328 133805 69322 60955 62...

output:

NO
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #33:

score: 1.5
Acceptable Answer
time: 4914ms
memory: 90048kb

input:

160000 123492
16164 144995 129762 63276 146982 52538 61884 129844 17948 82388 152812 60523 5460 28593 23108 27029 47124 71883 74171 52622 99552 90197 19736 60308 14581 5448 91976 49502 1767 15116 52962 27283 28480 82839 137144 75022 7370 145648 44280 147856 65581 9136 57203 12132 5419 89225 24019 12...

output:

YES
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #34:

score: 1.5
Acceptable Answer
time: 4931ms
memory: 123532kb

input:

160000 16332
17805 138979 18872 30331 145369 44784 106547 139661 111702 68147 25943 133573 103842 100701 61798 56067 120357 98999 43517 63954 49736 112039 89337 143310 55609 21787 107068 148697 37638 54032 150313 40424 44285 110142 72360 8330 91932 61670 152658 72184 155462 121766 17156 30793 116183...

output:

NO
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #35:

score: 1.5
Acceptable Answer
time: 4879ms
memory: 119360kb

input:

160000 151406
122529 115999 159894 113825 126196 7514 32617 150668 18985 149170 108315 48449 83070 61557 2530 17434 72900 155093 109886 79308 1920 124639 147394 61135 4571 95053 104990 90982 118197 116892 40021 99322 99320 108686 72208 63210 134416 63226 60779 158380 128298 50745 138962 124045 46314...

output:

YES
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Subtask #10:

score: 1.5
Acceptable Answer

Dependency #9:

10%
Acceptable Answer

Test #36:

score: 1.5
Acceptable Answer
time: 4930ms
memory: 96372kb

input:

200000 103015
89912 15700 44614 120687 30883 122405 187458 140591 142515 34776 105874 158239 113270 21297 16196 44356 134388 83558 51880 10012 18237 26622 156148 28082 114271 41484 68558 31823 159653 191254 142843 16329 166846 84192 154535 130817 163336 92649 128278 126290 6298 185956 14578 131360 7...

output:

YES
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #37:

score: 1.5
Acceptable Answer
time: 4962ms
memory: 98912kb

input:

200000 24574
150620 59298 100984 165805 104287 196617 37103 127766 135688 20637 127356 143524 71652 50499 169174 150084 175814 136682 136378 37281 131994 96860 112674 150159 84633 87650 138979 173018 198736 75714 125875 51294 147833 95473 142793 80094 81061 39318 183952 180394 75311 37914 193657 495...

output:

NO
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #38:

score: 1.5
Acceptable Answer
time: 4967ms
memory: 128180kb

input:

200000 95095
2945 182521 82933 193586 23865 95555 119949 157081 103546 166482 83294 91954 127739 78194 50558 77293 61609 82298 129595 170354 50773 94182 185880 68831 9708 171934 112030 157545 98861 194407 117707 170464 164190 99502 93458 175115 153867 92086 163205 189583 107812 60634 112254 22530 75...

output:

NO
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #39:

score: 1.5
Acceptable Answer
time: 4864ms
memory: 90532kb

input:

200000 169043
156641 189928 118459 112587 110720 11117 30451 154163 35417 73512 76801 188683 112613 172840 34776 6457 43884 14043 181007 168589 22082 103315 99276 173025 182157 24969 199584 160758 159893 82656 5811 4191 107579 107542 18440 142196 181241 24078 166371 91852 24618 193700 18663 39023 66...

output:

NO
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.

Test #40:

score: 1.5
Acceptable Answer
time: 4918ms
memory: 99084kb

input:

200000 148952
27332 163123 197844 37831 136961 7726 94469 185316 195762 61360 112771 57518 77477 151057 41149 89858 77068 134695 6215 78122 108140 147058 147145 9545 136897 64928 196937 177463 59475 71708 31713 12766 169782 44192 122887 177713 124925 14975 176367 62463 32886 97051 37963 46657 177651...

output:

YES
no comment
no comment

result:

points 0.10 Your answer to Question 1 is correct. 10%.