QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#268535 | #7850. Kernel Scheduler | mshcherba# | AC ✓ | 287ms | 46856kb | C++20 | 1.4kb | 2023-11-28 18:16:48 | 2023-11-28 18:16:49 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--)
#define SZ(a) int(a.size())
#define ALL(a) a.begin(), a.end()
#define PB push_back
#define MP make_pair
#define F first
#define S second
typedef long long LL;
typedef vector<int> VI;
typedef pair<int, int> PII;
typedef double db;
const int N = 1 << 19;
vector<PII> g[N], gr[N];
int bal[N];
bool used[N];
bool aliveEdge[N];
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int n, m;
cin >> n >> m;
FOR(i, 0, m)
{
int u, v;
cin >> u >> v;
u--;
v--;
bal[u]--;
bal[v]++;
g[u].PB({v, i});
gr[v].PB({u, i});
aliveEdge[i] = true;
}
set<PII> s;
FOR(i, 0, n)
s.insert({bal[i], i});
VI ans;
FOR(k, 0, n)
{
auto [bj, j] = *s.begin();
used[j] = true;
s.erase(s.begin());
for (auto [to, idx] : g[j])
{
if (aliveEdge[idx])
{
aliveEdge[idx] = false;
assert(!used[to]);
s.erase({bal[to], to});
bal[to]--;
s.insert({bal[to], to});
ans.PB(idx);
}
}
for (auto [from, idx] : gr[j])
{
if (aliveEdge[idx])
{
aliveEdge[idx] = false;
assert(!used[from]);
s.erase({bal[from], from});
bal[from]++;
s.insert({bal[from], from});
}
}
}
cout << "YES\n" << SZ(ans) << "\n";
for (int i : ans)
cout << i + 1 << " ";
cout << "\n";
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 4ms
memory: 31036kb
input:
3 3 1 2 2 3 3 1
output:
YES 2 1 2
result:
ok YES
Test #2:
score: 0
Accepted
time: 4ms
memory: 29788kb
input:
2 5 1 2 1 2 1 2 2 1 2 1
output:
YES 3 1 2 3
result:
ok YES
Test #3:
score: 0
Accepted
time: 3ms
memory: 29676kb
input:
4 4 1 2 2 3 2 4 3 4
output:
YES 4 1 2 3 4
result:
ok YES
Test #4:
score: 0
Accepted
time: 269ms
memory: 46008kb
input:
100000 300000 10485 69762 43149 85819 65377 48594 87608 16329 90645 27092 96559 28215 56560 52797 15265 81505 21616 20187 60187 61531 40748 58408 20842 53022 29032 29110 99906 38862 10498 32090 75988 46051 72985 18604 62188 36029 47868 12473 87013 93163 29484 1602 98718 53416 9097 93823 7980 86814 8...
output:
YES 240608 20631 33723 44534 80052 80993 90062 93657 95342 127732 137942 195141 27690 28568 107974 122220 148871 170600 183378 195803 196922 223577 277971 291922 4217 10697 13507 69598 121540 156758 172625 174259 213119 243749 254106 269120 34919 35831 116793 117793 145414 160664 176923 199841 25733...
result:
ok YES
Test #5:
score: 0
Accepted
time: 36ms
memory: 36836kb
input:
2 300000 1 2 2 1 1 2 1 2 1 2 1 2 2 1 1 2 1 2 1 2 2 1 2 1 2 1 2 1 1 2 1 2 2 1 1 2 1 2 1 2 2 1 2 1 2 1 1 2 1 2 1 2 1 2 2 1 2 1 2 1 2 1 2 1 1 2 1 2 1 2 1 2 2 1 2 1 1 2 1 2 1 2 1 2 2 1 1 2 2 1 2 1 2 1 1 2 2 1 1 2 2 1 2 1 2 1 2 1 2 1 1 2 2 1 2 1 2 1 2 1 1 2 1 2 1 2 2 1 2 1 2 1 2 1 1 2 2 1 1 2 1 2 2 1 2 1...
output:
YES 150187 1 3 4 5 6 8 9 10 15 16 18 19 20 24 25 26 27 33 34 35 36 39 40 41 42 44 48 50 56 61 62 63 68 70 71 75 78 83 85 86 87 88 90 91 92 93 94 95 96 97 99 100 101 102 103 106 108 109 110 113 114 115 117 118 119 122 124 126 128 130 131 135 136 137 143 144 145 149 150 151 152 154 156 157 158 160 161...
result:
ok YES
Test #6:
score: 0
Accepted
time: 286ms
memory: 46856kb
input:
100000 300000 18282 6721 2785 37716 79803 99300 82300 6029 10254 36293 9349 33204 78250 71944 45021 38522 85391 97674 84554 17390 29724 19982 33545 48055 30494 98695 53470 39407 68144 98072 43417 31321 61119 25088 17876 45202 17303 87809 29747 92666 66804 30456 85218 93867 30197 30974 64096 66753 81...
output:
YES 279756 5183 5427 13149 18004 21614 22443 34444 35089 44524 46616 77531 93035 144585 162217 174723 241298 243603 292949 1233 9272 40234 59656 82036 87322 149948 154299 154906 161957 162078 169074 198947 210783 229768 283655 13466 64520 69059 75270 97294 104747 105300 110556 112270 132636 160382 1...
result:
ok YES
Test #7:
score: 0
Accepted
time: 33ms
memory: 39900kb
input:
2 300000 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1...
output:
YES 300000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 1...
result:
ok YES
Test #8:
score: 0
Accepted
time: 3ms
memory: 29440kb
input:
2 1 1 2
output:
YES 1 1
result:
ok YES
Test #9:
score: 0
Accepted
time: 11ms
memory: 35452kb
input:
100000 1 67076 18127
output:
YES 1 1
result:
ok YES
Test #10:
score: 0
Accepted
time: 96ms
memory: 40208kb
input:
548 299756 211 22 234 21 180 202 467 157 86 457 519 20 418 529 442 333 485 78 269 341 164 187 133 542 22 139 59 14 358 29 307 475 398 490 238 141 448 85 9 54 320 312 357 155 195 148 402 229 273 237 453 421 202 521 241 527 547 256 156 92 183 168 381 78 394 310 531 229 450 117 264 285 344 135 167 118 ...
output:
YES 149878 430 576 1004 1052 1272 1802 1860 2868 2901 3228 4017 4039 4072 4231 4345 4524 4886 5022 5456 5779 6470 6490 6709 6720 7031 8715 9083 9220 9706 10244 11133 11802 12124 12900 13302 14254 15337 15369 15982 16150 16513 16681 16710 17069 17437 17555 19045 19362 19890 20668 21968 22053 23160 23...
result:
ok YES
Test #11:
score: 0
Accepted
time: 3ms
memory: 29440kb
input:
10 90 4 9 5 4 6 10 9 8 7 10 5 8 4 1 5 7 8 6 7 1 8 4 7 2 8 9 1 4 1 3 1 7 9 7 5 3 8 3 3 4 1 8 6 9 10 8 7 4 10 4 7 5 3 6 1 5 10 3 6 7 9 6 9 3 7 6 5 2 6 8 2 9 9 4 10 6 3 5 9 1 7 3 6 2 5 10 2 6 2 7 8 7 10 1 5 9 9 10 3 9 4 10 3 1 3 2 2 1 9 5 6 3 9 2 6 1 1 10 1 2 2 4 8 2 3 7 10 5 7 9 4 7 8 10 2 10 10 9 4 3...
output:
YES 45 14 15 16 21 28 59 60 77 90 36 44 45 61 68 78 81 88 20 27 39 50 63 75 76 1 51 66 74 79 89 6 8 43 48 86 3 22 30 35 5 65 73 13 67 49
result:
ok YES
Test #12:
score: 0
Accepted
time: 7ms
memory: 29816kb
input:
3 6 2 1 1 2 3 1 1 3 3 2 2 3
output:
YES 3 2 4 6
result:
ok YES
Test #13:
score: 0
Accepted
time: 281ms
memory: 45448kb
input:
100000 300000 20318 83771 8219 53011 5371 93626 46566 3537 21161 21531 52863 48797 94192 24412 29348 51325 1348 27077 51980 94850 90370 78500 79846 46052 75930 26804 6257 30774 32486 7784 11652 87922 875 82042 47117 85196 12679 45853 63629 26851 39396 4489 85088 53309 62358 372 96935 92945 62073 218...
output:
YES 240945 4079 5014 37814 146484 171892 187057 224288 224367 247016 274541 276283 280525 45289 48676 83567 96659 120052 158079 171901 181314 195504 215030 237346 30603 55636 83349 124142 142083 183758 184068 206593 234607 272621 279409 9194 30504 37149 78394 109803 112418 119726 132966 148083 15736...
result:
ok YES
Test #14:
score: 0
Accepted
time: 285ms
memory: 46200kb
input:
100000 300000 40418 31654 79680 60610 94629 93749 7535 19549 71078 80684 32350 38461 76171 5254 56658 74000 70109 58464 34414 85288 89626 54083 68569 11353 62518 1263 97441 86272 23594 75696 77617 9746 18668 71903 52564 92908 52925 208 92175 16336 91489 51530 9905 84948 55697 37810 95883 40667 61987...
output:
YES 240669 35814 59297 118139 128536 129451 135775 157027 171960 176300 192257 236029 282175 289102 21819 35781 61631 108101 114890 137849 157578 220293 227730 243587 253267 283989 13300 33790 42939 87945 141752 165955 209716 222668 254035 276043 289252 289534 295108 5748 27063 27713 75930 129182 19...
result:
ok YES
Test #15:
score: 0
Accepted
time: 284ms
memory: 46128kb
input:
100000 300000 11849 29699 52095 62506 52188 34300 82111 75041 9050 12036 72842 69963 49148 20468 17440 4770 46968 83705 15141 94193 426 7173 46269 22212 27906 37880 13713 58651 42742 55498 82648 57514 74447 13018 21315 81296 77827 55669 50032 45257 66955 36252 29708 88250 19351 29077 26776 32349 574...
output:
YES 240788 10095 20458 33620 39811 135009 149286 166998 176290 180959 201385 216680 284841 295135 17601 36663 53764 81031 103855 121742 155784 192285 197401 201333 284057 290138 28638 57857 72288 138307 158345 159532 187875 190553 210151 235199 240053 258500 265421 271197 292501 81464 100291 108798 ...
result:
ok YES
Test #16:
score: 0
Accepted
time: 264ms
memory: 46092kb
input:
100000 300000 59433 48581 5106 77934 5014 84040 81642 23230 40208 76892 3983 17332 1975 65398 9634 47909 76232 76676 76026 29137 32001 2621 92262 86719 78549 75184 65660 20953 80225 25889 31019 70561 61003 97308 49220 56414 41140 39124 13540 65319 2783 64738 86159 72314 23722 28772 26544 4463 86603 ...
output:
YES 240708 8488 27948 79757 89311 114895 130218 178067 188618 237911 243645 249489 255130 296765 43297 75083 96828 118412 127241 176877 187538 191299 196303 251622 256375 296823 14622 49334 61252 74151 147225 148229 151493 154142 176084 274148 276657 287906 93781 111530 129700 142487 144696 150493 1...
result:
ok YES
Test #17:
score: 0
Accepted
time: 276ms
memory: 45644kb
input:
100000 300000 80405 29813 16217 36416 60512 26459 58101 70684 50497 13293 69843 49925 542 35506 72822 3068 48040 80027 82224 20610 76524 24503 83508 14337 59718 73063 52959 95667 25399 70206 6094 39334 74093 89653 28870 57196 53950 5103 50967 21083 19433 92250 86705 56866 83886 90444 5694 53715 1841...
output:
YES 240864 69808 114550 159048 170162 170550 189198 209945 235367 267960 275060 277890 22319 22561 30920 65756 73911 119037 210210 255657 258307 264836 272067 282604 286790 22049 41950 70296 102730 169409 185280 240140 259646 268598 269916 274663 3609 8224 54722 121310 184040 184386 216774 217926 26...
result:
ok YES
Test #18:
score: 0
Accepted
time: 272ms
memory: 45908kb
input:
100000 300000 20495 40827 79484 67568 86327 84116 70117 36947 97932 38696 68458 78319 38315 63438 59022 83619 24575 84194 80918 73838 39803 86622 48026 59530 48232 12308 30383 22962 44840 56220 11763 29035 53292 1390 43565 35286 87293 9895 58699 46586 730 46944 49726 26690 99475 56234 96237 30113 84...
output:
YES 240810 28334 41211 110006 121628 131367 166081 181437 207609 221543 224595 237085 247570 259756 2576 30033 54102 99276 119525 156050 198582 209521 227354 254039 280317 49112 50527 116307 127003 161393 221401 226636 256824 274238 292178 31931 88279 103635 108702 129903 151541 171409 220942 249985...
result:
ok YES
Test #19:
score: 0
Accepted
time: 0ms
memory: 31472kb
input:
2 2 2 1 1 2
output:
YES 1 2
result:
ok YES
Test #20:
score: 0
Accepted
time: 3ms
memory: 31212kb
input:
3 3 2 1 3 2 1 3
output:
YES 2 3 2
result:
ok YES
Test #21:
score: 0
Accepted
time: 4ms
memory: 30744kb
input:
9 9 6 7 9 3 7 5 8 9 1 6 3 4 5 2 2 8 4 1
output:
YES 8 5 1 3 7 8 4 2 6
result:
ok YES
Test #22:
score: 0
Accepted
time: 0ms
memory: 31112kb
input:
100 100 48 66 8 71 42 17 51 9 91 34 71 58 15 92 94 84 24 6 9 20 80 63 30 99 78 95 27 82 100 1 6 16 40 48 29 8 12 100 32 23 17 37 87 40 66 78 81 72 7 73 85 56 18 62 21 76 73 98 54 91 95 61 68 88 5 52 2 10 41 22 4 41 38 4 86 26 28 70 45 85 65 2 25 51 57 30 67 7 55 5 60 25 44 77 34 14 47 79 59 29 79 94...
output:
YES 99 90 24 83 61 43 12 93 56 58 98 47 85 27 100 39 79 66 69 86 22 17 1 23 13 31 67 94 38 64 55 73 44 25 29 74 11 60 9 16 77 41 34 96 37 36 35 63 20 62 49 51 8 88 71 57 72 70 84 82 92 30 5 48 87 65 54 97 28 80 52 53 32 81 46 42 4 10 91 89 45 33 76 7 78 50 18 2 6 68 40 26 99 14 59 3 21 95 75 19
result:
ok YES
Test #23:
score: 0
Accepted
time: 90ms
memory: 41576kb
input:
100000 100000 95781 73318 78730 59685 79239 41261 89057 7562 48583 99600 91723 41699 83471 91237 59930 64457 19274 1928 66955 62001 47379 68540 55372 67029 30250 56046 14431 99791 13165 79132 9013 73176 97524 2841 73833 89058 80064 58915 1302 87029 37665 43056 34595 99496 84287 27179 94429 66044 638...
output:
YES 99999 9781 94672 17964 7587 85745 38283 9422 22369 86048 57462 5703 63642 55551 67111 25473 88882 199 56303 68321 67538 48533 52372 29560 76437 36490 59063 45219 18954 99924 98619 60388 2368 71259 79668 57324 16224 16679 17215 6107 60545 27790 8321 55261 78881 87826 67259 57749 70774 56506 28284...
result:
ok YES
Test #24:
score: 0
Accepted
time: 268ms
memory: 46404kb
input:
100000 300000 73111 14261 57448 73355 30575 69368 7406 54245 50562 37213 83220 29654 77825 14406 25207 73825 37230 54080 77370 40253 32200 66399 86121 24643 66684 10627 11377 96958 50657 64140 91461 61712 19054 31731 88260 13927 32872 26685 49153 96481 45833 33659 9438 23445 74612 42071 318 51736 68...
output:
YES 257302 7197 28973 32898 35384 84914 91022 100099 102079 120768 146195 159889 185150 200269 223049 235897 40485 75437 87635 111094 116617 206580 207367 208502 239511 246187 249533 249781 258066 10691 35902 57359 58877 106061 146292 187659 190813 198698 205335 241450 249780 279144 14233 79104 8065...
result:
ok YES
Test #25:
score: 0
Accepted
time: 4ms
memory: 30036kb
input:
10 100 2 4 7 3 9 10 9 1 7 9 7 1 6 3 6 8 8 1 9 6 7 6 5 4 6 10 3 2 8 6 5 10 3 10 5 10 9 3 5 4 7 3 4 2 7 4 7 4 7 5 8 2 4 2 5 2 7 6 9 6 5 2 6 1 1 3 1 2 1 4 1 2 5 10 6 1 8 2 1 6 9 7 5 7 8 2 8 4 7 6 4 2 6 1 7 10 7 4 6 2 8 2 8 2 5 7 2 3 6 2 1 10 10 3 4 10 9 10 9 4 8 10 9 8 8 2 1 10 8 10 6 3 6 2 5 3 5 4 4 1...
output:
YES 89 2 5 6 11 21 23 24 25 29 45 48 49 79 84 89 94 96 3 4 10 19 30 59 60 62 71 73 76 83 97 98 7 8 13 32 38 47 50 55 66 67 80 85 87 91 92 93 99 9 26 39 43 44 51 52 61 63 65 72 77 78 12 16 18 20 28 31 37 68 69 88 33 34 35 36 56 64 74 22 27 46 58 70 90 54 75 82 100 17
result:
ok YES
Test #26:
score: 0
Accepted
time: 3ms
memory: 29472kb
input:
2 100 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 1 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 ...
output:
YES 99 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
result:
ok YES
Test #27:
score: 0
Accepted
time: 272ms
memory: 45988kb
input:
100000 300000 71951 84998 94082 54685 87985 69035 98780 2958 91406 93156 74507 28932 36309 79557 70529 81994 57918 51086 33800 8195 96079 59998 56533 1852 55606 5469 33942 12589 62562 19119 47819 91038 38736 27766 25687 4430 68474 74586 12323 36221 78726 81138 51739 89171 63365 53350 2922 60754 6797...
output:
YES 257381 48984 109829 122652 122867 131139 166385 170610 175245 202645 207304 220704 221000 245618 293099 16878 27500 30984 34547 53554 65461 76098 94833 150045 173148 183601 191459 220237 256451 36357 61696 64412 75609 97869 118667 135240 145401 150987 173798 176997 179152 250087 264903 8058 2964...
result:
ok YES
Test #28:
score: 0
Accepted
time: 240ms
memory: 46392kb
input:
100000 300000 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 50 51 51 ...
output:
YES 256572 83571 114974 131689 145132 173747 180952 193713 194228 201162 231539 237863 248321 261491 277573 91931 109973 113498 165425 167807 180733 200796 208251 209079 242227 247774 266233 272919 277728 99063 117572 136242 145789 161144 175181 195527 196770 202077 224610 226350 246684 257961 28351...
result:
ok YES
Test #29:
score: 0
Accepted
time: 232ms
memory: 45724kb
input:
100000 300000 34838 61420 14402 9459 12478 63893 14016 37790 61743 14483 35651 75953 23182 5853 83938 92385 75521 95119 11358 42133 30759 14950 7005 48689 26046 76108 35361 57128 94037 72623 56747 22570 66047 27332 50445 36663 60860 55024 20726 694 36536 25013 36799 23641 64661 89866 33428 73307 432...
output:
YES 179622 9927 11179 15206 16994 46944 67568 128661 144796 154849 254616 24399 38115 101234 169727 207562 260557 185658 64858 72121 127631 176113 2070 27915 37059 56197 16279 172505 226578 298571 16672 32268 61399 109859 136898 230202 274725 42353 71221 196326 291101 38609 64258 101068 220709 27688...
result:
ok YES
Test #30:
score: 0
Accepted
time: 284ms
memory: 45640kb
input:
100000 299998 74256 30612 32692 95375 3797 17773 15591 80852 63976 44021 49788 89575 11361 41592 69206 19186 62728 66328 19491 31919 58277 40809 75499 5658 61298 20949 81666 76398 16547 98567 66554 15589 96482 1890 76985 40536 7767 69041 65658 36045 77761 29570 56150 87010 20572 14536 22021 45936 67...
output:
YES 204249 15391 30621 47843 49682 77939 85170 98231 125724 200970 11053 31718 72150 107064 170566 187526 51442 58656 90796 119176 96777 106707 147487 10184 19691 52917 132156 146276 212979 252456 19842 131935 38923 136032 160553 164565 284931 1780 68155 78524 88141 145848 146223 204251 45444 70677 ...
result:
ok YES
Test #31:
score: 0
Accepted
time: 269ms
memory: 46092kb
input:
100000 299917 38017 35640 37541 13121 51856 64809 53839 89027 32045 71167 76122 45416 8266 41360 99489 79232 99360 61092 48207 44411 69930 35029 45654 71180 17390 91983 64525 41147 28201 95115 68678 22775 92617 60507 6611 53883 6036 29308 51570 43793 69389 15405 68262 75296 90983 63968 50448 69176 1...
output:
YES 206605 19410 59349 61020 117024 185196 203290 268361 51128 84332 172677 254164 55045 56968 181575 266847 35499 155860 175303 190844 221685 248073 254396 100120 144596 173234 215373 220022 263431 264436 202395 14672 19138 103929 11740 37691 109134 149329 152989 183711 193792 228764 252027 273709 ...
result:
ok YES
Test #32:
score: 0
Accepted
time: 287ms
memory: 45584kb
input:
100000 299530 8852 39601 84150 56322 66499 54586 69744 81443 96201 68395 20382 84332 1768 65629 67945 90860 4167 49349 19959 93008 42520 97350 46636 77919 14305 96952 96798 45837 11386 27111 88732 54264 31246 86190 14130 6321 65293 80024 88697 62875 59599 96060 27842 41913 85359 37635 12743 81491 55...
output:
YES 206507 34753 47063 78661 175865 177718 9135 117111 158927 30251 104771 106504 137296 141435 87234 168652 251753 76743 102837 118321 79511 165060 23649 45499 96005 175543 239796 75405 213912 250420 271193 273976 45847 101826 183573 14230 268693 53805 221305 234381 257618 264105 264197 70315 97807...
result:
ok YES
Test #33:
score: 0
Accepted
time: 246ms
memory: 46028kb
input:
100000 276072 86701 38196 13180 47722 47439 33251 96905 41837 40035 31523 74756 64011 12898 29712 94896 59019 14573 56588 61160 50273 97009 95261 9593 96152 33831 72875 8081 6472 821 67803 86143 96537 42305 73631 55404 14424 53442 89841 11640 57531 88814 71400 9124 95678 18823 34016 68826 17194 2118...
output:
YES 195782 18345 22344 60242 230964 237527 250923 253863 13552 155273 226258 45150 54380 76638 146243 241252 153030 186594 54516 64027 84564 190175 109954 229042 249431 250360 90445 201731 253377 69280 209945 241041 23676 31853 52628 131346 207400 22799 177524 37851 221551 14159 62844 102194 193367 ...
result:
ok YES