QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#394817 | #2536. Akcija | lfxxx | 80 | 8ms | 50304kb | C++17 | 1.9kb | 2024-04-20 19:58:02 | 2024-04-20 19:58:02 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define all(x) (x).begin(), (x).end()
bool be;
constexpr int N = 2005;
int n, k, f[N][N], ansf[N], tpf[N << 1], p[N];
ll g[N][N], ansg[N], tpg[N << 1];
struct node {
int w, d;
}a[N];
bool en;
int main() {
cerr << (&be - &en) / 1024.0 / 1024 << " MB\n--------------------------------" << endl;
#ifdef IAKIOI
freopen("in.in", "r", stdin);
// freopen("out.out", "w", stdout);
#endif
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n >> k;
for (int i = 1; i <= n; ++i) cin >> a[i].w >> a[i].d;
sort(a + 1, a + 1 + n, [](node a, node b) {
return a.d < b.d;
});
for (int i = n - 1; i >= 0; --i) {
for (int j = 0; j <= i; ++j) {
f[i][j] = f[i + 1][j];
g[i][j] = g[i + 1][j];
if (a[i + 1].d > j) {
if (f[i][j] < f[i + 1][j + 1] + 1 || (f[i][j] == f[i + 1][j + 1] + 1 && g[i][j] > g[i + 1][j + 1] + a[i + 1].w)) {
f[i][j] = f[i + 1][j + 1] + 1;
g[i][j] = g[i + 1][j + 1] + a[i + 1].w;
}
}
}
}
int cnt = 1;
for (int i = 1; i <= n; ++i) {
int tot = 0;
for (int j = 1; j <= cnt; ++j) {
tpf[++tot] = ansf[j];
tpg[tot] = ansg[j];
if (a[i].d > ansf[j]) {
tpf[++tot] = ansf[j] + 1;
tpg[tot] = ansg[j] + a[i].w;
// cerr << tpf[tot] << ' ' << tpg[tot] << '\n';
}
}
cnt = min(tot, k);
iota(p, p + 1 + tot, 0);
sort(p + 1, p + 1 + tot, [&](int x, int y) {
if (tpf[x] + f[i][tpf[x]] != tpf[y] + f[i][tpf[y]]) return tpf[x] + f[i][tpf[x]] > tpf[y] + f[i][tpf[y]];
return tpg[x] + g[i][tpf[x]] < tpg[y] + g[i][tpf[y]];
});
// for (int j = 1; j <= tot; ++j) cerr << p[i] << ' ' << tpf[p[i]] << ' ' << tpg[p[i]] << '\n';
for (int j = 1; j <= cnt; ++j) ansf[j] = tpf[p[j]], ansg[j] = tpg[p[j]];
}
for (int i = 1; i <= k; ++i) cout << ansf[i] << ' ' << ansg[i] << '\n';
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 4ms
memory: 47936kb
input:
1919 1 126746165 1373 126746165 1621 126746165 1157 126746165 1647 126746165 1046 126746165 1626 126746165 813 126746165 1197 126746165 1240 126746165 738 126746165 840 126746165 571 126746165 1712 126746165 109 126746165 1850 126746165 524 126746165 736 126746165 917 126746165 1520 126746165 1559 1...
output:
1893 239930490345
result:
ok single line: '1893 239930490345'
Test #2:
score: 0
Accepted
time: 0ms
memory: 49516kb
input:
2000 1 955444834 1441 955444834 1866 955444834 1 955444834 257 955444834 605 955444834 1999 955444834 294 955444834 473 955444834 185 955444834 794 955444834 373 955444834 776 955444834 692 955444834 1340 955444834 794 955444834 1872 955444834 1078 955444834 1693 955444834 839 955444834 627 95544483...
output:
1966 1878404543644
result:
ok single line: '1966 1878404543644'
Test #3:
score: 0
Accepted
time: 3ms
memory: 46588kb
input:
1837 1 404217733 48 404217733 1712 404217733 1010 404217733 1741 404217733 800 404217733 891 404217733 773 404217733 589 404217733 607 404217733 284 404217733 376 404217733 1284 404217733 1138 404217733 221 404217733 551 404217733 892 404217733 491 404217733 1163 404217733 1142 404217733 1504 404217...
output:
1772 716273822876
result:
ok single line: '1772 716273822876'
Test #4:
score: 0
Accepted
time: 5ms
memory: 47172kb
input:
1814 1 673960138 1285 673960138 1524 673960138 528 673960138 221 673960138 927 673960138 1033 673960138 1620 673960138 793 673960138 1626 673960138 35 673960138 228 673960138 74 673960138 376 673960138 450 673960138 94 673960138 170 673960138 800 673960138 1261 673960138 55 673960138 264 673960138 8...
output:
1795 1209758447710
result:
ok single line: '1795 1209758447710'
Test #5:
score: 0
Accepted
time: 4ms
memory: 49396kb
input:
1981 1 655754816 1085 655754816 343 655754816 1927 655754816 1695 655754816 1417 655754816 1207 655754816 1383 655754816 1184 655754816 429 655754816 281 655754816 1935 655754816 445 655754816 13 655754816 1384 655754816 502 655754816 1790 655754816 862 655754816 1254 655754816 1544 655754816 11 655...
output:
1951 1279377646016
result:
ok single line: '1951 1279377646016'
Test #6:
score: 0
Accepted
time: 6ms
memory: 46524kb
input:
1811 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 934941692 1 93494...
output:
1 934941692
result:
ok single line: '1 934941692'
Test #7:
score: 0
Accepted
time: 5ms
memory: 49732kb
input:
1990 1 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 356460601 5 35646...
output:
5 1782303005
result:
ok single line: '5 1782303005'
Test #8:
score: 0
Accepted
time: 0ms
memory: 47056kb
input:
1845 1 439788326 4 439788326 2 439788326 3 439788326 5 439788326 4 439788326 3 439788326 5 439788326 2 439788326 3 439788326 2 439788326 3 439788326 1 439788326 1 439788326 3 439788326 2 439788326 1 439788326 3 439788326 3 439788326 4 439788326 5 439788326 5 439788326 2 439788326 2 439788326 2 43978...
output:
5 2198941630
result:
ok single line: '5 2198941630'
Test #9:
score: 0
Accepted
time: 0ms
memory: 45552kb
input:
1802 1 332342588 41 332342588 11 332342588 37 332342588 16 332342588 23 332342588 35 332342588 10 332342588 18 332342588 1 332342588 26 332342588 19 332342588 33 332342588 17 332342588 17 332342588 22 332342588 37 332342588 21 332342588 39 332342588 24 332342588 7 332342588 23 332342588 30 332342588...
output:
42 13958388696
result:
ok single line: '42 13958388696'
Test #10:
score: 0
Accepted
time: 3ms
memory: 48508kb
input:
1873 1 613474075 936 613474075 1 613474075 1 613474075 1 613474075 1 613474075 1 613474075 1 613474075 1 613474075 1 613474075 936 613474075 1 613474075 1 613474075 1 613474075 1 613474075 1 613474075 1 613474075 1 613474075 1 613474075 1 613474075 1 613474075 936 613474075 1 613474075 936 613474075...
output:
923 566236571225
result:
ok single line: '923 566236571225'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3976kb
input:
1 1 22282234 1
output:
1 22282234
result:
ok single line: '1 22282234'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3984kb
input:
2 1 713738007 1 713738007 1
output:
1 713738007
result:
ok single line: '1 713738007'
Test #13:
score: 0
Accepted
time: 1ms
memory: 4308kb
input:
47 1 754775836 35 754775836 42 754775836 13 754775836 5 754775836 26 754775836 35 754775836 1 754775836 17 754775836 44 754775836 2 754775836 43 754775836 14 754775836 2 754775836 4 754775836 45 754775836 35 754775836 7 754775836 18 754775836 14 754775836 32 754775836 29 754775836 47 754775836 45 75...
output:
43 32455360948
result:
ok single line: '43 32455360948'
Subtask #2:
score: 20
Accepted
Dependency #1:
100%
Accepted
Test #14:
score: 20
Accepted
time: 4ms
memory: 49116kb
input:
1919 1 126746165 1373 668827372 1621 842598033 1157 119717982 1647 527842278 1046 492815129 1626 917098873 813 346103003 1197 144760418 1240 339840086 738 518170881 840 527423104 571 783646464 1712 77685618 109 74284316 1850 300769843 524 944005181 736 969138120 917 789000286 1520 358649048 1559 189...
output:
1893 934318516761
result:
ok single line: '1893 934318516761'
Test #15:
score: 0
Accepted
time: 4ms
memory: 50304kb
input:
2000 1 955444834 1441 87345570 1866 807140020 1 452949476 257 818869981 605 161621665 1999 504099265 294 598031629 473 226306660 185 713394097 794 44533525 373 345561041 776 361821668 692 39849424 1340 545901297 794 745021573 1872 939642412 1078 719782870 1693 269723920 839 462215558 627 695935199 1...
output:
1966 990213629004
result:
ok single line: '1966 990213629004'
Test #16:
score: 0
Accepted
time: 8ms
memory: 47136kb
input:
1837 1 404217733 48 760111913 1712 635231398 1010 112054506 1741 297775642 800 988252633 891 547492872 773 447889215 589 184474212 607 98312137 284 514971126 376 705702660 1284 428618641 1138 284561840 221 229651857 551 239129770 892 679610908 491 661999745 1163 564888989 1142 606821489 1504 2943314...
output:
1772 845948441583
result:
ok single line: '1772 845948441583'
Test #17:
score: 0
Accepted
time: 3ms
memory: 46760kb
input:
1814 1 673960138 1285 81028746 1524 421252653 528 23986853 221 239140624 927 891249203 1033 962614277 1620 792355265 793 628225416 1626 970645055 35 385299960 228 737128556 74 351438607 376 255496258 450 185170885 94 93888187 170 198693111 800 844239992 1261 716879039 55 162912511 264 307460806 829 ...
output:
1795 883197439380
result:
ok single line: '1795 883197439380'
Test #18:
score: 0
Accepted
time: 8ms
memory: 49716kb
input:
1981 1 655754816 1085 678728908 343 133130441 1927 373977459 1695 938792353 1417 905077842 1207 24418879 1383 525819604 1184 807011577 429 558345553 281 160730060 1935 933294628 445 321504227 13 231009700 1384 362825113 502 450254037 1790 410951067 862 732893408 1254 664094189 1544 36187258 11 72576...
output:
1951 945978796419
result:
ok single line: '1951 945978796419'
Test #19:
score: 0
Accepted
time: 0ms
memory: 46164kb
input:
1811 1 934941692 1 892631472 1 221963002 1 390559518 1 986350949 1 524427523 1 96444602 1 656854970 1 425992688 1 822387303 1 380252829 1 556647080 1 522523573 1 318687106 1 201564132 1 867885853 1 86695278 1 697351162 1 792894229 1 879902215 1 473852172 1 260425780 1 169983923 1 820738833 1 9448251...
output:
1 411136
result:
ok single line: '1 411136'
Test #20:
score: 0
Accepted
time: 7ms
memory: 49580kb
input:
1990 1 356460601 5 224848374 5 881788059 5 68992860 5 44771412 5 397401947 5 115595477 5 638932295 5 106806913 5 568887059 5 653343572 5 449691055 5 569508871 5 360141436 5 518437673 5 668425148 5 886061724 5 470450770 5 810689001 5 790147395 5 418733089 5 556237364 5 257498102 5 621544695 5 1670904...
output:
5 6765520
result:
ok single line: '5 6765520'
Test #21:
score: 0
Accepted
time: 0ms
memory: 48388kb
input:
1845 1 439788326 4 290322352 2 986205736 3 710314349 5 685726300 4 853875260 3 971736329 5 438979736 2 886818995 3 172808191 2 420841453 3 510881405 1 431215518 1 199291335 3 467841446 2 683750115 1 257564895 3 202281694 3 826348885 4 385400539 5 217140246 5 456942122 2 41496387 2 829740419 2 751741...
output:
5 6933249
result:
ok single line: '5 6933249'
Test #22:
score: 0
Accepted
time: 0ms
memory: 46316kb
input:
1802 1 332342588 41 970441845 11 719381653 37 922576512 16 177275034 23 488255662 35 253050193 10 620786108 18 709863734 1 807506164 26 624934371 19 657679271 33 968188704 17 636677279 17 733619521 22 326275757 37 349557250 21 712026273 39 248279211 24 165404787 7 373691690 23 404033360 30 769815056...
output:
42 500827803
result:
ok single line: '42 500827803'
Test #23:
score: 0
Accepted
time: 7ms
memory: 47548kb
input:
1873 1 613474075 936 191550631 1 565168039 1 940922606 1 723793989 1 936250872 1 651398486 1 818818788 1 554633771 1 275490534 936 290775497 1 843102091 1 650604084 1 499561988 1 758111235 1 459142648 1 400436681 1 730320150 1 756878960 1 964498323 1 145557078 936 896291394 1 759694823 936 850781148...
output:
923 459262234401
result:
ok single line: '923 459262234401'
Test #24:
score: 0
Accepted
time: 0ms
memory: 3956kb
input:
1 1 22282234 1
output:
1 22282234
result:
ok single line: '1 22282234'
Test #25:
score: 0
Accepted
time: 0ms
memory: 3980kb
input:
2 1 713738007 1 497377109 1
output:
1 497377109
result:
ok single line: '1 497377109'
Test #26:
score: 0
Accepted
time: 0ms
memory: 4384kb
input:
47 1 754775836 35 720966791 42 536811951 13 505979127 5 217605295 26 876354039 35 675775060 1 310941447 17 154939582 44 787188025 2 56856271 43 754435010 14 176488825 2 351725042 4 930103697 45 359325051 35 40188748 7 233690931 18 670639934 14 185587886 32 824070707 29 130571086 47 885846939 45 5856...
output:
43 19340489859
result:
ok single line: '43 19340489859'
Subtask #3:
score: 20
Accepted
Test #27:
score: 20
Accepted
time: 8ms
memory: 49920kb
input:
1919 2 126746165 1373 668827372 1621 842598033 1157 119717982 1647 527842278 1046 492815129 1626 917098873 813 346103003 1197 144760418 1240 339840086 738 518170881 840 527423104 571 783646464 1712 77685618 109 74284316 1850 300769843 524 944005181 736 969138120 917 789000286 1520 358649048 1559 189...
output:
1893 934318516761 1893 934319294852
result:
ok 2 lines
Test #28:
score: 0
Accepted
time: 4ms
memory: 50180kb
input:
2000 2 955444834 1441 87345570 1866 807140020 1 452949476 257 818869981 605 161621665 1999 504099265 294 598031629 473 226306660 185 713394097 794 44533525 373 345561041 776 361821668 692 39849424 1340 545901297 794 745021573 1872 939642412 1078 719782870 1693 269723920 839 462215558 627 695935199 1...
output:
1966 990213629004 1966 990214368560
result:
ok 2 lines
Test #29:
score: 0
Accepted
time: 3ms
memory: 47384kb
input:
1837 2 404217733 48 760111913 1712 635231398 1010 112054506 1741 297775642 800 988252633 891 547492872 773 447889215 589 184474212 607 98312137 284 514971126 376 705702660 1284 428618641 1138 284561840 221 229651857 551 239129770 892 679610908 491 661999745 1163 564888989 1142 606821489 1504 2943314...
output:
1772 845948441583 1772 845949272280
result:
ok 2 lines
Test #30:
score: 0
Accepted
time: 7ms
memory: 46548kb
input:
1814 2 673960138 1285 81028746 1524 421252653 528 23986853 221 239140624 927 891249203 1033 962614277 1620 792355265 793 628225416 1626 970645055 35 385299960 228 737128556 74 351438607 376 255496258 450 185170885 94 93888187 170 198693111 800 844239992 1261 716879039 55 162912511 264 307460806 829 ...
output:
1795 883197439380 1795 883197614490
result:
ok 2 lines
Test #31:
score: 0
Accepted
time: 0ms
memory: 50268kb
input:
1981 2 655754816 1085 678728908 343 133130441 1927 373977459 1695 938792353 1417 905077842 1207 24418879 1383 525819604 1184 807011577 429 558345553 281 160730060 1935 933294628 445 321504227 13 231009700 1384 362825113 502 450254037 1790 410951067 862 732893408 1254 664094189 1544 36187258 11 72576...
output:
1951 945978796419 1951 945979383131
result:
ok 2 lines
Test #32:
score: 0
Accepted
time: 3ms
memory: 47964kb
input:
1811 2 934941692 1 892631472 1 221963002 1 390559518 1 986350949 1 524427523 1 96444602 1 656854970 1 425992688 1 822387303 1 380252829 1 556647080 1 522523573 1 318687106 1 201564132 1 867885853 1 86695278 1 697351162 1 792894229 1 879902215 1 473852172 1 260425780 1 169983923 1 820738833 1 9448251...
output:
1 411136 1 1259454
result:
ok 2 lines
Test #33:
score: 0
Accepted
time: 3ms
memory: 49836kb
input:
1990 2 356460601 5 224848374 5 881788059 5 68992860 5 44771412 5 397401947 5 115595477 5 638932295 5 106806913 5 568887059 5 653343572 5 449691055 5 569508871 5 360141436 5 518437673 5 668425148 5 886061724 5 470450770 5 810689001 5 790147395 5 418733089 5 556237364 5 257498102 5 621544695 5 1670904...
output:
5 6765520 5 7314334
result:
ok 2 lines
Test #34:
score: 0
Accepted
time: 5ms
memory: 48776kb
input:
1845 2 439788326 4 290322352 2 986205736 3 710314349 5 685726300 4 853875260 3 971736329 5 438979736 2 886818995 3 172808191 2 420841453 3 510881405 1 431215518 1 199291335 3 467841446 2 683750115 1 257564895 3 202281694 3 826348885 4 385400539 5 217140246 5 456942122 2 41496387 2 829740419 2 751741...
output:
5 6933249 5 7333923
result:
ok 2 lines
Test #35:
score: 0
Accepted
time: 3ms
memory: 46632kb
input:
1802 2 332342588 41 970441845 11 719381653 37 922576512 16 177275034 23 488255662 35 253050193 10 620786108 18 709863734 1 807506164 26 624934371 19 657679271 33 968188704 17 636677279 17 733619521 22 326275757 37 349557250 21 712026273 39 248279211 24 165404787 7 373691690 23 404033360 30 769815056...
output:
42 500827803 42 500922238
result:
ok 2 lines
Test #36:
score: 0
Accepted
time: 0ms
memory: 47836kb
input:
1873 2 613474075 936 191550631 1 565168039 1 940922606 1 723793989 1 936250872 1 651398486 1 818818788 1 554633771 1 275490534 936 290775497 1 843102091 1 650604084 1 499561988 1 758111235 1 459142648 1 400436681 1 730320150 1 756878960 1 964498323 1 145557078 936 896291394 1 759694823 936 850781148...
output:
923 459262234401 923 459262425406
result:
ok 2 lines
Test #37:
score: 0
Accepted
time: 0ms
memory: 3892kb
input:
1 2 22282234 1
output:
1 22282234 0 0
result:
ok 2 lines
Test #38:
score: 0
Accepted
time: 0ms
memory: 3800kb
input:
2 2 713738007 1 497377109 1
output:
1 497377109 1 713738007
result:
ok 2 lines
Test #39:
score: 0
Accepted
time: 1ms
memory: 6288kb
input:
47 2 754775836 35 720966791 42 536811951 13 505979127 5 217605295 26 876354039 35 675775060 1 310941447 17 154939582 44 787188025 2 56856271 43 754435010 14 176488825 2 351725042 4 930103697 45 359325051 35 40188748 7 233690931 18 670639934 14 185587886 32 824070707 29 130571086 47 885846939 45 5856...
output:
43 19340489859 43 19423796403
result:
ok 2 lines
Subtask #4:
score: 0
Wrong Answer
Test #40:
score: 0
Wrong Answer
time: 0ms
memory: 4120kb
input:
19 1910 872059530 14 567896598 17 515371564 12 609933207 17 421749461 11 993851818 17 897732743 9 76274388 12 362276371 13 93554371 8 695969254 9 21709341 6 395396341 17 894018749 2 835539456 19 150700500 6 934168428 8 934249073 10 508532761 16
output:
3514 2445814368 3513 3215732475 3512 2425103924 3511 3577928201 3510 2062827553 3509 3215651830 3508 2388668239 3507 3575427764 3506 2026391868 3505 3213151393 3504 2334652653 3503 3575387475 3502 1972376282 3501 3213111104 3500 2261330862 3499 3575347119 3498 1881774508 3497 3213070748 3496 2113905...
result:
wrong answer 1st lines differ - expected: '18 9787132136', found: '3514 2445814368'
Subtask #5:
score: 30
Accepted
Test #53:
score: 30
Accepted
time: 1ms
memory: 4736kb
input:
96 96 390531470 69 349016804 82 612244127 58 41258987 83 470944790 53 681046579 82 109569778 41 700928268 60 224279712 63 681889278 37 173204769 43 701269722 29 624757038 86 271969787 6 444924884 93 500697380 27 509702566 37 262449977 46 669488879 77 170692294 78 362932916 51 118514404 47 724509790 ...
output:
94 42881894279 94 42885031902 94 42886655954 94 42893770642 94 42895394694 94 42898532317 94 42925575942 94 42928026677 94 42934314682 94 42936765417 94 42937452305 94 42939076357 94 42939903040 94 42941527092 94 42942082928 94 42950821668 94 42953959291 94 42955583343 94 42966521813 94 42971243241 ...
result:
ok 96 lines
Test #54:
score: 0
Accepted
time: 0ms
memory: 4828kb
input:
100 94 728894101 73 984472362 94 227233955 1 977586505 13 285128553 31 320973763 100 527822662 15 627483044 24 57297596 10 607643414 40 616454087 19 659211250 39 157548605 35 632762003 67 280224048 40 751359820 94 248050921 54 109880759 85 572785958 42 444589230 32 745606493 69 529418708 53 44472160...
output:
93 47229378659 93 47232402986 93 47240022572 93 47243046899 93 47243080404 93 47244995575 93 47248019902 93 47253724317 93 47255639488 93 47258663815 93 47258716409 93 47269360322 93 47274333325 93 47284977238 93 47311778501 93 47314802828 93 47325480246 93 47327395417 93 47330419744 93 47341116251 ...
result:
ok 94 lines
Test #55:
score: 0
Accepted
time: 0ms
memory: 4560kb
input:
92 94 833824080 3 502342051 86 575100606 51 294391290 88 857061142 41 584339058 45 874174469 39 88148751 30 393357153 31 883565650 15 913593771 19 553126421 65 436234512 57 237294962 12 29208319 28 801689376 45 265404538 25 463360153 59 72095717 58 953808886 76 540105291 49 859270862 63 753811898 13...
output:
81 39299786951 81 39311847968 81 39312702071 81 39322169910 81 39323024013 81 39329815398 81 39334624591 81 39335085030 81 39335478694 81 39337877883 81 39338731986 81 39339206579 81 39340137340 81 39342946819 81 39347539711 81 39349012273 81 39349528521 81 39350793003 81 39352198357 81 39352592021 ...
result:
ok 94 lines
Test #56:
score: 0
Accepted
time: 0ms
memory: 4568kb
input:
90 96 629484261 64 935306493 76 304392773 27 871049171 11 298476078 46 401713369 52 488146744 81 80745508 40 220557674 81 816664936 2 216228749 12 68472304 4 551940937 19 903061070 23 93661821 5 743709824 9 519246013 40 478781953 63 388883752 3 389060106 14 759872727 42 554152379 41 801812652 59 491...
output:
83 39941151331 83 39950335016 83 39953411848 83 39954850187 83 39957150426 83 39960227258 83 39961665597 83 39969410943 83 39970849282 83 39973163230 83 39973926114 83 39976240062 83 39977678401 83 39985423747 83 39986862086 83 39989938918 83 39992239157 83 39993677496 83 39996754328 83 40005938013 ...
result:
ok 96 lines
Test #57:
score: 0
Accepted
time: 1ms
memory: 6668kb
input:
99 100 997942797 55 389611075 18 253554815 97 684571690 85 870702547 71 205564015 61 135486527 70 534502368 60 81289102 22 195899258 15 736144729 97 986106280 23 463665422 1 338951827 70 891407683 26 940889978 90 447510152 44 749649611 63 971379429 78 382652692 1 434677763 20 971281184 57 355595918 ...
output:
92 45920709473 92 45922574199 92 45944404733 92 45957903338 92 45958920531 92 45959768064 92 45960785257 92 46000892272 92 46001722203 92 46003586929 92 46005558455 92 46007423181 92 46012687929 92 46014390877 92 46015408070 92 46016255603 92 46017272796 92 46025417463 92 46026186534 92 46027203727 ...
result:
ok 100 lines
Test #58:
score: 0
Accepted
time: 1ms
memory: 4692kb
input:
90 91 934941692 1 892631472 1 221963002 1 390559518 1 986350949 1 524427523 1 96444602 1 656854970 1 425992688 1 822387303 1 380252829 1 556647080 1 522523573 1 318687106 1 201564132 1 867885853 1 86695278 1 697351162 1 792894229 1 879902215 1 473852172 1 260425780 1 169983923 1 820738833 1 94482519...
output:
1 1763267 1 2377496 1 6157975 1 15655962 1 24624220 1 26098971 1 69263754 1 86695278 1 96444602 1 97225921 1 100247796 1 119078792 1 127877669 1 154795234 1 169983923 1 177825450 1 190316581 1 201564132 1 202308690 1 214496470 1 219209494 1 219639845 1 221963002 1 260425780 1 272288258 1 278203924 1...
result:
ok 91 lines
Test #59:
score: 0
Accepted
time: 0ms
memory: 6524kb
input:
100 99 356460601 5 224848374 5 881788059 5 68992860 5 44771412 5 397401947 5 115595477 5 638932295 5 106806913 5 568887059 5 653343572 5 449691055 5 569508871 5 360141436 5 518437673 5 668425148 5 886061724 5 470450770 5 810689001 5 790147395 5 418733089 5 556237364 5 257498102 5 621544695 5 1670904...
output:
5 324767380 5 327325796 5 343035094 5 346872135 5 351823658 5 351892640 5 357373441 5 362581433 5 365139849 5 367601938 5 370160354 5 370257120 5 371093583 5 371369997 5 373082739 5 373928413 5 375641155 5 376390502 5 378948918 5 381871303 5 384429719 5 386802881 5 389361297 5 389637711 5 389706693 ...
result:
ok 99 lines
Test #60:
score: 0
Accepted
time: 1ms
memory: 4712kb
input:
92 90 973264570 4 852089299 2 193758456 3 368621045 5 795770336 4 322486632 3 453520673 5 541117717 2 457901037 3 669215845 2 681160198 3 705418654 1 561466257 1 278244915 3 445480431 2 435079180 1 1532101 3 716465796 3 99065944 4 471910939 5 761706427 5 839382115 2 563011796 2 735114705 2 747496604...
output:
5 243868061 5 247450067 5 262919655 5 285581097 5 289469511 5 291771729 5 299021523 5 302862167 5 303946339 5 304939099 5 309878292 5 318331755 5 319415927 5 321913761 5 322507891 5 327600541 5 333543795 5 333791173 5 337373179 5 338560573 5 340993197 5 341040967 5 342077369 5 344575203 5 344983910 ...
result:
ok 90 lines
Test #61:
score: 0
Accepted
time: 1ms
memory: 6652kb
input:
90 99 611963689 9 627027155 3 280522489 8 41781762 4 194145632 5 479342947 8 401801721 3 202048698 4 509720171 1 673295877 6 268952783 4 231195725 7 905370083 4 162102917 4 908068381 5 575680564 8 775958558 5 107789503 9 474618094 5 785075390 2 588933550 5 672841926 7 536587289 7 402372406 4 7919946...
output:
9 627312446 9 629519191 9 634964641 9 653783136 9 666569284 9 669104270 9 671311015 9 676756465 9 680305569 9 682512314 9 687957764 9 695273397 9 695574960 9 700718847 9 702925592 9 706776259 9 708361108 9 711427019 9 713633764 9 713668575 9 715896048 9 716512151 9 718718896 9 719079214 9 719114025 ...
result:
ok 99 lines
Test #62:
score: 0
Accepted
time: 1ms
memory: 6476kb
input:
94 90 993426020 47 340110397 1 42364286 1 694836282 1 46011633 1 685105256 1 182658669 1 495744089 1 300355472 1 56972124 47 433165733 1 41415211 1 723395243 1 182032973 1 257277309 1 853139301 1 190546605 1 174596917 1 137821497 1 148969545 1 75253797 47 378941690 1 682441131 47 520226255 47 934283...
output:
47 18328508147 47 18337846245 47 18338795320 47 18342442667 47 18400357226 47 18407084475 47 18409695324 47 18410644399 47 18413802305 47 18414291746 47 18423908340 47 18425986692 47 18433246438 47 18434195513 47 18434252531 47 18435324790 47 18436273865 47 18437842860 47 18438147877 47 18439921212 ...
result:
ok 90 lines
Test #63:
score: 0
Accepted
time: 0ms
memory: 3916kb
input:
1 2 22282234 1
output:
1 22282234 0 0
result:
ok 2 lines
Test #64:
score: 0
Accepted
time: 0ms
memory: 3920kb
input:
2 3 713738007 1 497377109 1
output:
1 497377109 1 713738007 0 0
result:
ok 3 lines
Test #65:
score: 0
Accepted
time: 1ms
memory: 6120kb
input:
47 91 754775836 35 720966791 42 536811951 13 505979127 5 217605295 26 876354039 35 675775060 1 310941447 17 154939582 44 787188025 2 56856271 43 754435010 14 176488825 2 351725042 4 930103697 45 359325051 35 40188748 7 233690931 18 670639934 14 185587886 32 824070707 29 130571086 47 885846939 45 585...
output:
43 19340489859 43 19423796403 43 19575291033 43 19614982748 43 19658597577 43 19682150952 43 19726395713 43 19765457496 43 19786847908 43 19836405037 43 19849783922 43 19919711581 43 19951189059 43 19956643841 43 19961196887 43 20011641254 43 20024576260 43 20034495603 43 20068056806 43 20094947798 ...
result:
ok 91 lines
Subtask #6:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
0%