QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#401024 | #6671. Zadatak | nvujica | 42 | 413ms | 350500kb | C++14 | 2.6kb | 2024-04-27 21:01:39 | 2024-04-27 21:01:39 |
Judging History
answer
#include <bits/stdc++.h>
#define ll long long
#define fi first
#define se second
using namespace std;
const int maxn = 2e5 + 10, off = 1 << 17, maxcnt = 2e7;
int n, cnt;
set <int> s[maxn];
ll tour[maxcnt];
int prop[maxcnt];
int l[maxcnt];
int r[maxcnt];
int root[maxn];
vector <int> v;
ll pravi[maxn];
int arr[maxn];
vector <int> saz;
void push(int x, int lo, int hi){
if(hi - lo == 1 || prop[x] == 0) return;
int mid = (lo + hi) / 2;
prop[x] = 0;
tour[l[x]] = pravi[mid] - pravi[lo] - tour[l[x]];
tour[r[x]] = pravi[hi] - pravi[mid] - tour[r[x]];
prop[l[x]] ^= 1;
prop[r[x]] ^= 1;
}
void update(int x, int lo, int hi, int rig){
// cout << x << ' ' << lo << ' ' << hi << ' ' << rig << ' ' << tour[x] << endl;
if(l[x] == 0){
cnt++;
l[x] = cnt;
cnt++;
r[x] = cnt;
}
push(x, lo, hi);
if(lo >= rig) return;
if(hi <= rig){
tour[x] = pravi[hi] - pravi[lo] - tour[x];
prop[x] ^= 1;
return;
}
int mid = (lo + hi) / 2;
update(l[x], lo, mid, rig);
update(r[x], mid, hi, rig);
tour[x] = tour[l[x]] + tour[r[x]];
}
ll query(int x, int lo, int hi, int lef, int rig){
if(l[x] == 0){
cnt++;
l[x] = cnt;
cnt++;
r[x] = cnt;
}
push(x, lo, hi);
if(hi <= lef || lo >= rig) return 0;
if(lef <= lo && hi <= rig) return tour[x];
int mid = (lo + hi) / 2;
return query(l[x], lo, mid, lef, rig) + query(r[x], mid, hi, lef, rig);
}
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n;
for(int i = 1; i <= n; i++){
cin >> arr[i];
arr[i] /= 2;
saz.push_back(arr[i]);
}
saz.push_back(0);
sort(saz.begin(), saz.end());
saz.erase(unique(saz.begin(), saz.end()), saz.end());
for(int i = 1; i <= n; i++){
int poz = lower_bound(saz.begin(), saz.end(), arr[i]) - saz.begin();
pravi[poz] = (ll)arr[i] * arr[i];
arr[i] = poz;
cnt++;
root[i] = cnt;
s[i].insert(arr[i]);
}
for(int i = 1; i < n; i++){
update(root[i], 0, off, arr[i]);
}
for(int i = 1; i <= n - 1; i++){
int a, b;
cin >> a >> b;
if(s[b].size() > s[a].size()) swap(a, b);
v.clear();
v.push_back(0);
auto it = s[b].begin();
while(it != s[b].end()){
v.push_back(*it);
it++;
}
s[b].clear();
ll ans = 0;
for(int j = v.size() - 1; j >= 1; j -= 2){
ans += query(root[a], 0, off, v[j - 1], v[j]);
}
for(int j = 0; j < v.size(); j++){
if(s[a].find(v[j]) == s[a].end()) s[a].insert(v[j]);
else s[a].erase(v[j]);
update(root[a], 0, off, v[j]);
}
root[n + i] = root[a];
swap(s[n + i], s[a]);
cout << ans * 4 << "\n";
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 14
Accepted
time: 16ms
memory: 25140kb
input:
5000 217378 945562 533764 323494 69148 240722 205370 463122 552700 31800 616898 678076 893816 258468 34822 905360 967562 731346 340940 584418 684926 785402 107584 995542 363278 255302 196912 870994 329464 338390 154870 977540 65120 130388 350020 239660 553428 710306 385138 633274 841672 740778 17929...
output:
359872811236 632705703184 113223620400 251229507984 470237900880 0 142492660324 492745033764 0 89244392644 551725099524 278399748496 311560446976 233709556800 476939443200 0 172741415748 92640103936 28418613120 60443205904 0 341931572900 73529592508 193225675856 248612109488 393354817264 21576167436...
result:
ok 4999 lines
Test #2:
score: 14
Accepted
time: 19ms
memory: 25072kb
input:
5000 557036 70224 982294 274570 679032 366976 367038 112802 876614 935716 371614 748288 542664 882900 375142 764194 914714 950008 82332 319528 450794 411332 35640 777836 965926 318372 6094 65570 826320 399704 140548 712120 856166 958862 954558 237084 220868 113964 724714 640422 190452 583740 374746 ...
output:
2605489936 833671259136 414614936836 0 11179255824 0 13449040900 38313579296 2854337476 252799910572 35219278224 39983911600 26199954496 11528446148 230055599996 63127615760 259097657560 20563560000 15511706116 19994158784 56455910604 30454011016 521586821584 6342848164 356728474752 229864631364 0 6...
result:
ok 4999 lines
Test #3:
score: 14
Accepted
time: 16ms
memory: 25168kb
input:
5000 936198 118156 843936 409048 88156 445792 461900 986578 327034 983586 217476 66650 311086 444006 281024 421540 906380 127956 116660 221082 3444 251782 237620 706530 840660 250016 385806 752038 46452 743864 699406 282492 591478 997902 782384 294532 530466 483054 382552 819706 3168 817104 704402 1...
output:
775502151876 0 304072839184 0 22885638400 54715759396 184898280004 0 383151096064 0 426080648736 87190278400 4551931024 131871923712 323870547764 4551931024 308671256992 65806494996 203741618808 34333542612 25275890160 31018028976 437116414852 457568843248 289529607920 219397605508 663670915600 0 33...
result:
ok 4999 lines
Test #4:
score: 14
Accepted
time: 17ms
memory: 25228kb
input:
5000 121584 789584 304802 181686 868074 745276 196204 806990 247270 169050 975132 510442 333770 131006 529210 792 495796 783576 203742 207786 602330 279034 617006 128012 777130 434758 456494 336586 145644 141816 993702 712904 946054 585370 758128 584160 597890 612480 979628 171206 336738 710642 9106...
output:
29028662884 141989977052 491256732772 318296815684 0 410656875748 0 16125952144 2480239204 181518602500 216895118400 0 172029175696 332017964100 0 693795600 365552360372 238019409744 15039892756 22703859684 397928825856 0 400243014688 204745381412 377539155004 121347102076 338335126128 106793011264 ...
result:
ok 4999 lines
Test #5:
score: 14
Accepted
time: 16ms
memory: 27368kb
input:
5000 404518 895646 728 551730 441144 663970 911906 202138 760402 998632 72706 548234 494136 531482 308906 577000 456816 283090 832164 599136 916570 581988 705372 669868 855538 433682 149626 792300 293058 897870 781874 158196 325714 844204 264120 863366 35388 93746 665458 619392 766046 405570 203190 ...
output:
2289622500 181990972816 6492169476 575319216004 177609987844 18764616256 150857667216 241440545956 3748378176 494884516 107392533264 432753465600 11819168656 512867957904 234598797316 5088539556 89609225104 89383060900 109746576 17012506624 254183355556 217769688964 57062916 176746249744 48852492676...
result:
ok 4999 lines
Test #6:
score: 0
Wrong Answer
time: 20ms
memory: 27524kb
input:
5000 752312 142808 417760 470364 864646 418622 637574 546366 446842 948448 8550 570858 271826 900940 883516 418196 223402 705522 357554 499844 532594 733774 914428 360906 108086 240508 277210 256304 447250 855114 844436 302508 357160 529718 151672 245070 932614 849410 539324 885118 588226 350790 394...
output:
217904107204 192543376 138315560464 260176900 9622040464 376730798656 5040148036 4221880576 857864964100 91315169856 105336597136 6462230544 123379372516 497670989764 427776170116 49994276836 28861252996 231690120964 53699719824 127361906884 108803661316 193441632400 163992601600 790374340900 156518...
result:
wrong answer 1476th lines differ - expected: '5493477924', found: '0'
Subtask #2:
score: 25
Accepted
Test #27:
score: 25
Accepted
time: 199ms
memory: 156888kb
input:
100000 590812 862538 815196 397712 773198 172122 270600 609324 841858 4868 597128 216378 982576 385590 842010 55844 671758 885088 577804 194248 229770 859754 274744 678176 607974 791062 607192 210234 863164 619708 804538 430978 237704 10512 840374 843732 875326 255462 970338 898540 925508 661464 413...
output:
349058819344 315485699072 158174834944 190883984400 29625982884 43598377116 136793375460 505222145492 23697424 122055789444 17217153424 363561360060 92672441524 343745206436 23697424 301341472004 256291624008 271426226484 26531127972 17175971548 316411631620 19435877084 392412501116 57202957148 3506...
result:
ok 99999 lines
Test #28:
score: 25
Accepted
time: 173ms
memory: 156996kb
input:
100000 913682 117898 890276 810502 347306 22864 538414 826942 143310 127564 337302 506318 558582 209656 237462 513864 499810 675334 447848 10990 411390 84222 40766 279716 722086 994224 919524 192682 535352 695818 590360 665246 696722 918458 912368 122190 666212 809412 404714 287478 32068 841084 6417...
output:
13899938404 778691417772 13899938404 106721519232 522762496 182645353668 474268138336 13377175908 2895398188 17642357912 231866740780 58022894616 26313280424 30074921020 219434177672 36923739452 242708805348 36923739452 120780100 132197212548 6691362888 401982396 24764222592 268095202256 32245600944...
result:
ok 99999 lines
Test #29:
score: 25
Accepted
time: 159ms
memory: 156984kb
input:
100000 507122 90654 242520 73476 418742 622326 964126 598470 412334 407164 721486 266314 513046 822986 697796 336946 830820 540476 608754 693100 533912 630638 666914 87756 76234 379552 540464 539728 315224 555708 189024 995492 976558 908034 649638 342698 680534 469620 470852 348752 260296 534244 612...
output:
8218147716 50597802684 5398722576 119348337304 137824385580 249465264696 137824385580 114022802296 55996525260 349357548580 55996525260 100991286316 348112129176 295571036440 98605985580 154247563716 213568759020 144597581880 319081810360 78545547556 289276728272 108427558772 5398722576 412900180 10...
result:
ok 99999 lines
Test #30:
score: 25
Accepted
time: 186ms
memory: 157032kb
input:
100000 718644 544512 122886 8580 497230 333548 159910 500088 936068 710620 14248 545846 153516 19984 602874 720458 875784 173378 426646 877028 686206 317528 16418 15098 783558 248614 247768 573564 103726 845160 803848 683560 141314 519442 610520 668780 852228 396916 440266 840342 749726 992990 42437...
output:
296493318144 0 73616400 15027352596 96226915708 15027352596 146527260100 323516628236 192932570500 129389104 104959512512 8595582364 269971152 264732962844 242858352584 524139262072 13224887196 98029381108 234617054304 275154759252 13224887196 129389104 98560500 376511596632 13183286076 48205695748 ...
result:
ok 99999 lines
Test #31:
score: 25
Accepted
time: 193ms
memory: 157048kb
input:
100000 361496 902432 831032 425268 794678 763240 768850 540792 45902 758564 665288 265052 621098 720810 929344 931166 487360 919890 591972 532922 618490 706178 138296 62060 573414 582282 999636 77724 436984 258482 475488 803006 789246 848650 984428 115276 921484 519482 560806 348758 305488 535564 57...
output:
130679358016 559934827008 130679358016 50173513808 532361783792 58768538708 242282473456 0 335243862244 240175479852 2106993604 211625821248 230982301696 459852840692 403827429644 118319082908 460734444476 173255300572 119200686692 222780032912 216595244528 17018790012 2106993604 185878459508 153173...
result:
ok 99999 lines
Test #32:
score: 25
Accepted
time: 183ms
memory: 157020kb
input:
100000 458016 143770 439276 923266 596052 416814 651478 134766 522454 607972 998784 76152 621572 256700 412836 785722 850812 310430 689956 420360 169490 260706 366350 795482 440358 45394 409266 132240 753674 985316 479516 6092 95264 611604 555084 930522 663744 428096 245744 364686 974444 139864 4688...
output:
20669812900 172293591276 37485064980 317792921724 20669812900 239024947556 18161874756 84916957584 270361029120 527265445936 5799127104 281283700416 8307065248 57587824752 247678556964 369680504320 38778960148 266487421568 42079307848 20419794852 45475095148 60338060888 295969224572 79899283164 2060...
result:
ok 99999 lines
Test #33:
score: 25
Accepted
time: 180ms
memory: 157016kb
input:
100000 533666 696320 262670 284338 690592 333812 393056 40968 814424 139758 306688 57362 219200 525864 570124 29738 564422 994742 207428 280450 226788 639786 757060 192880 622690 886726 54116 83392 15100 141996 666406 545516 915040 563728 378356 106888 91502 554120 947382 133964 527088 243770 627356...
output:
284799399556 0 68995528900 203970480252 99577882000 54915137136 1678377024 236150117332 1678377024 29706490884 1678377024 30128363456 95139164336 221635757980 884348644 102521268752 546351769796 17035927900 46937336184 22058192716 110038911072 307231446660 20166766500 106908072472 559700796796 79402...
result:
ok 99999 lines
Test #34:
score: 25
Accepted
time: 156ms
memory: 157064kb
input:
100000 167378 28694 202000 478774 796490 207126 153224 221646 230436 443470 130314 637844 885244 268340 38058 723802 902786 547190 970560 154532 591652 938406 38668 901198 224062 366966 529694 271874 524566 205478 14684 300050 236778 988774 839334 363992 428038 331408 584242 151980 865240 432536 966...
output:
823345636 27192049248 13611950752 215612592324 13611950752 22654248540 7458326220 41668623096 11432127000 16158392960 347518891836 286877428264 45239181276 625065728 329245164792 343904789848 221817092556 326900482936 16759217716 212178796148 469761538300 625065728 408224638712 35528509504 335808758...
result:
ok 99999 lines
Test #35:
score: 25
Accepted
time: 183ms
memory: 156988kb
input:
100000 298902 476220 894534 252224 422758 27040 992342 547792 757486 326634 311428 469720 893396 542262 195244 377402 110598 110498 499402 631008 423784 376594 936466 148350 616148 233430 864034 687488 933072 681050 187362 592738 83316 16360 738982 629774 88892 754812 957978 931254 226082 481478 352...
output:
89342405604 137443082796 63616946176 25725459428 731161600 725673294292 74517782864 225558292400 26456621028 70530778156 78071543636 422422909696 145334131880 37389057936 69615381468 11500756004 731161600 115235445496 140194910728 109086835496 69028262300 524310773856 753271200 195510366928 16865768...
result:
ok 99999 lines
Test #36:
score: 25
Accepted
time: 198ms
memory: 157068kb
input:
100000 498430 58252 342546 736144 5384 916206 275612 487494 685580 555870 618832 352168 530374 446456 994456 569060 477758 518302 603680 167082 526468 462788 962300 941694 325192 254888 61564 499870 682288 639356 240734 567550 147572 166662 252242 985022 6332 46826 441202 9626 57138 919176 694290 36...
output:
3393295504 113944466612 134487998288 0 407448977904 3364308048 192910304416 55522160484 253469296416 129483747808 79282204604 191232310408 79282204604 543110035096 165311586380 120040755332 118994016096 217938082932 24552086676 106337829288 141228533960 298511652036 627509637964 51409887868 24552086...
result:
ok 99999 lines
Test #37:
score: 25
Accepted
time: 178ms
memory: 156904kb
input:
100000 574414 564886 944758 449184 94972 744526 822772 181910 400468 105932 64654 750164 10896 539366 677904 826510 690752 751660 558650 215130 525930 460524 247008 20280 352116 8340 816242 609536 853234 504966 306440 469008 734736 259764 15342 210702 962988 969898 246370 44006 57566 529686 292944 7...
output:
319096192996 10855250400 201766265856 0 350717129204 326236634780 9019680784 24071567316 9019680784 0 475362866900 0 68219570192 233551362164 240594549388 251135854452 305429838928 222696111764 26827923360 60844640372 151237714204 19452993540 118722816 41733791292 69555600 347393180136 151410756632 ...
result:
ok 99999 lines
Test #38:
score: 25
Accepted
time: 185ms
memory: 157028kb
input:
100000 262888 339376 359222 731440 809850 578820 222738 431780 226708 970502 608320 600178 337696 796886 44286 787138 236840 656292 656112 975654 898764 280176 846280 932670 835558 491102 514240 807466 540508 682718 260126 794640 16302 694468 474220 393902 844498 382636 398806 426296 366804 148194 4...
output:
69110100544 46065968832 82974476452 452029997148 82974476452 0 153071708592 1784300620 350641348732 140264422568 229788799832 46712788492 315989094484 0 305558386356 52347635184 161140475584 269578713680 566647702656 375226429348 16762465360 385937069308 421839658388 367904402272 120914044712 143528...
result:
ok 99999 lines
Test #39:
score: 25
Accepted
time: 189ms
memory: 156968kb
input:
100000 576860 910562 647862 258690 525388 67780 350424 458472 158406 123700 292750 209434 123000 400682 317368 570896 606614 257944 346238 639198 816402 18506 927480 537272 311746 778586 858350 614590 393332 682058 947772 254110 461166 452666 199752 843984 274294 598160 93492 471878 355446 872330 82...
output:
332767459600 86957711444 66920516100 209112034444 4594128400 62326387700 60470592076 20498332436 4594128400 52535616864 14384899236 10534871600 80068089668 58403443104 163933738604 168833720996 23536957920 80938500836 176611766268 478749371496 342472036 350031312312 184866033980 35062900864 36476467...
result:
ok 99999 lines
Subtask #3:
score: 17
Accepted
Test #40:
score: 17
Accepted
time: 384ms
memory: 350352kb
input:
65536 131908 883754 813278 197778 704074 981802 297078 903698 485360 496064 726120 251990 462786 129558 704500 920556 903884 454552 949354 328526 921462 975888 780002 276668 675308 49774 83014 136308 679916 42174 151084 358830 284218 259680 65684 526980 516764 200170 265060 294150 128046 658864 2984...
output:
17399720464 39116137284 495720197476 88255338084 235574329600 63498960100 16785275364 496320250000 206617520704 107929332676 849092217444 76545182224 2477451076 6891324196 1778646276 22826375056 67433702400 4314387856 40068028900 70256803600 16395778116 89086728676 242284466176 8531108496 4721146752...
result:
ok 65535 lines
Test #41:
score: 17
Accepted
time: 401ms
memory: 350120kb
input:
65536 332468 857006 744700 174932 336036 674934 218934 834112 123748 645852 685152 183000 5842 386074 352832 892014 871206 963050 921654 77480 810042 991442 128490 364312 109930 877570 13610 615798 797796 931778 132026 5950 782008 789062 625950 435498 908514 948642 551698 170722 700722 204852 627438...
output:
110534971024 30601204624 112920193296 47932096356 15313567504 33489000000 34128964 124490420224 758999894436 6003150400 656168041764 16509680100 12084604900 185232100 636478457616 35402500 611536512064 189658508004 825397688196 29146001284 41964341904 393678443844 1024000000 361237060900 6328202500 ...
result:
ok 65535 lines
Test #42:
score: 17
Accepted
time: 412ms
memory: 350124kb
input:
65536 581018 813298 219730 711802 630866 632722 862404 47116 410076 650366 436198 773770 342008 988206 759334 346842 938414 569068 721656 724036 239482 80396 438628 277990 82114 635784 407698 150588 936366 585600 734110 736372 457274 952222 464068 751844 653636 129978 299118 227182 79876 471476 5334...
output:
337581916324 48281272900 397991909956 2219917456 168162325776 190268695204 116969472064 120299372964 323838388624 520787382336 6463516816 77278440100 6742708996 22676745744 342927360000 538917492100 209099511076 215359108624 16894280484 51611661124 6380175376 1744231696 197820352900 192284004004 231...
result:
ok 65535 lines
Test #43:
score: 17
Accepted
time: 373ms
memory: 350468kb
input:
65536 864218 67620 946474 280060 887274 500988 393036 614168 345158 11238 263824 185884 837456 486648 269418 504618 211218 302328 794976 603898 224010 439580 983158 296756 759898 243766 137240 505356 803050 170738 975670 49542 204824 522090 517696 738072 457070 333022 333644 553708 188086 567950 156...
output:
4572464400 78433603600 250988976144 154477297296 126292644 34552861456 236826275904 72586058724 44613043524 364692794404 50180480100 88064123536 59421862756 18834817600 29151464644 2454409764 41952870976 268009148416 110903652484 111318318736 35376343396 24397815204 22332313600 62500 454707462400 77...
result:
ok 65535 lines
Test #44:
score: 17
Accepted
time: 371ms
memory: 350236kb
input:
65536 301028 390226 169962 989088 964164 732548 609984 297358 958012 8400 88532 109414 321554 383576 513296 378502 345282 800932 596832 321952 630202 330124 610616 310504 266488 697334 885566 926736 762892 40504 377274 298344 230418 843114 202388 834746 514586 932722 901694 174854 530332 763874 5187...
output:
90617856784 28887081444 536626572304 88421780164 70560000 7837915024 103396974916 143263764004 119219659524 103653090304 108981855376 96412734016 71015854144 784227140356 1640574016 89009142336 53092454724 40960902544 264798751396 30573921316 281252030224 269116087696 33547264 632861616676 770392398...
result:
ok 65535 lines
Test #45:
score: 17
Accepted
time: 392ms
memory: 350500kb
input:
65536 22280 890088 922284 514800 755534 702708 244042 621284 611298 194134 479354 784234 764530 237806 762018 364240 114970 206858 807630 871286 666608 856592 297472 344678 261826 132624 892796 284016 380248 31802 492376 980698 591218 523500 288706 173062 608398 106914 319308 118520 405240 706332 47...
output:
496398400 265019040000 493798533264 59556497764 37688009956 229780257316 56551693636 132670777600 13218100900 652266216900 444366225664 88489590784 17589125376 80665088256 1011367204 242434125376 274052250000 29950455844 11430603396 14046990400 164219457600 130821102864 62472003136 1105562500 150480...
result:
ok 65535 lines
Test #46:
score: 17
Accepted
time: 379ms
memory: 350204kb
input:
65536 986706 186424 993040 371672 905678 416238 557130 601576 497690 113874 254276 780740 8570 838634 993786 808788 983134 358812 900392 501038 102494 494358 474758 711508 514660 769604 872448 303046 927044 361816 203652 173458 633332 725818 413714 660994 927574 302612 278056 392412 523702 815790 12...
output:
34753907776 138140075584 173254072644 310393836900 12967287876 64656284176 73444900 654138028944 128746051344 251039077444 10505020036 225395158564 264874915600 91836878116 130910817856 30087677764 401109422224 171159273796 91574022544 77315139136 274263784804 16419859600 753354561600 4730688400 302...
result:
ok 65535 lines
Test #47:
score: 17
Accepted
time: 376ms
memory: 350312kb
input:
65536 39646 889548 572348 20356 490590 54278 482844 30608 496522 412974 816904 555250 990504 394354 272590 649462 634204 481758 368458 117518 466796 56906 120012 972724 640434 221792 14470 29434 330776 289920 454282 245206 617558 287576 383152 624870 366560 781498 169042 611810 166084 707018 651482 ...
output:
1571805316 414366736 2946101284 936849664 170547524676 308302562500 155515077316 74305308100 232090770564 13810480324 3238292836 14402880144 49191691264 209380900 84053606400 60125982436 82699955776 146805455104 134366233600 28575197764 27583895056 392602496400 249830028900 263678142016 125041446544...
result:
ok 65535 lines
Test #48:
score: 17
Accepted
time: 413ms
memory: 350196kb
input:
65536 904350 790864 311022 648242 61508 102002 131222 912136 394730 440624 599932 565612 841122 221454 874562 916886 661308 3120 925364 61784 199500 91744 444866 515316 211352 363252 946616 928302 931566 626520 511878 601850 259004 865140 676322 230108 100290 590512 420184 542776 169782 134136 15061...
output:
625465866496 96734684484 3783234064 17219213284 155811772900 319916934544 49041874116 764858691844 9734400 3817262656 8416961536 197905757956 44669667904 861744603204 392527310400 262019086884 67083072016 52949691664 10058084100 176554593856 17992466496 22685781924 65161751824 380802536464 315218719...
result:
ok 65535 lines
Test #49:
score: 17
Accepted
time: 371ms
memory: 350200kb
input:
65536 686112 960452 719490 430348 424068 945386 938866 702362 720432 889266 432502 120786 270636 874012 843198 515628 540900 409408 403686 101154 527490 52452 171094 157824 377472 999110 841542 352960 601686 791628 557400 992688 98300 479380 87846 275498 77552 227394 789930 310640 899006 143982 2189...
output:
470749676544 185199401104 179833668624 493312379044 519022266624 14589257796 73243844496 265872234384 167614910464 10232131716 2751212304 24908414976 142485110784 124580761600 362026042596 310694760000 9662890000 7716919716 6014312704 96497209600 20730816324 29730725476 18126852496 64415455204 10000...
result:
ok 65535 lines
Test #50:
score: 17
Accepted
time: 169ms
memory: 165652kb
input:
32768 61310 642718 805966 881418 340926 114848 884928 47008 996704 787342 171768 862182 720596 686272 142344 634678 805928 760402 959688 899796 442328 317390 881816 219278 22200 145828 820880 310108 65342 291960 387754 150430 6658 214094 122956 351984 689880 554994 112128 454718 625202 240304 615472...
output:
3758916100 649581193156 13190063104 2209752064 619907424964 29504245824 470969257984 20261814336 578211201604 809632841616 100736412100 48082841284 492840000 96166971664 4269576964 22629184900 44328964 15118177936 308018340036 12572688384 57746012416 378805782784 10063701124 285728735296 43345895737...
result:
ok 32767 lines
Test #51:
score: 17
Accepted
time: 164ms
memory: 165572kb
input:
32768 622148 835130 330578 785890 579704 695344 577078 65420 896238 109380 165818 126854 916640 166120 955606 418918 573618 944686 985172 124238 563746 540802 960052 605742 32860 608966 716308 494324 541560 307548 992010 367930 60922 545578 468904 435730 752560 208110 268042 885238 814588 92582 7657...
output:
387068133904 109281814084 336056727616 4279776400 11963984400 16091937316 27595854400 175492290724 329037609924 15435080644 292466803204 366923370564 1079779600 244356216976 94585772304 135372484900 3711490084 189860632900 43309772100 71846513764 8571426724 586339369984 56471819044 92300516100 53438...
result:
ok 32767 lines
Test #52:
score: 17
Accepted
time: 156ms
memory: 165624kb
input:
32768 972676 225816 113428 135518 614600 530588 253934 669182 700044 659058 834370 260470 736066 723356 145942 427416 704964 504212 928726 45728 354960 920686 303362 919628 89232 802696 224034 146276 22024 597684 705592 329504 3308 259172 566670 305722 677804 296726 6614 197692 355742 300782 243520 ...
output:
50992865856 12865911184 281523625744 64482476356 434357447364 67844620900 523243902736 21299067364 254229740944 2091049984 125996601600 92028503044 7962349824 21396668176 485056576 108572886016 10942864 93465941284 88046319076 43744996 90469811524 59301990400 102543410176 20331908100 100461105936 18...
result:
ok 32767 lines
Test #53:
score: 17
Accepted
time: 178ms
memory: 165680kb
input:
32768 248150 278952 502220 799050 586214 293480 210090 831702 457094 668646 950702 955236 186332 593196 602054 905212 858502 933142 173274 6820 505724 939374 594648 789698 771570 413032 505048 147356 943228 595202 364888 674956 149296 21664 688594 832476 901652 683126 594394 63054 277786 422948 8412...
output:
61578422500 252224928400 86130510400 44137808100 208934924836 903834292804 34719614224 362469018916 737025684004 46512400 255756764176 353606243904 170595433024 21713790736 354265420804 133143252544 469328896 474161696836 466661131876 3975806916 77165061796 5567248996 25112740900 76143987364 9159255...
result:
ok 32767 lines
Test #54:
score: 17
Accepted
time: 178ms
memory: 165764kb
input:
32768 847074 257904 276164 125744 670490 379570 360298 554616 62874 67104 489400 58552 337912 223722 739210 985220 998840 50618 639822 341416 437200 232366 94266 343212 301966 632032 485144 208974 979420 398684 326994 780090 928926 137248 883228 757588 139402 708032 329278 170336 716224 613818 29049...
output:
66514473216 15811553536 144073384900 129814648804 3953139876 3428336704 50051533284 546431424100 2562181924 116564885056 53993957956 8886078756 91183465156 43670132676 158948931856 106925076036 18837013504 573939577744 19432917604 29014352896 376772537124 59523312676 306802994404 506713338244 411168...
result:
ok 32767 lines
Subtask #4:
score: 0
Skipped
Dependency #1:
0%
Subtask #5:
score: 0
Skipped
Dependency #1:
0%