QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#411142 | #185. Bridges | AbdelmagedNour# | 14 | 1294ms | 7636kb | C++20 | 2.1kb | 2024-05-15 00:33:32 | 2024-05-15 00:33:32 |
Judging History
answer
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
typedef long long ll;
const int N=100005,B=1000;
struct DSU{
int p[N],sz[N];
vector<pair<int*,int>>upd;
void init(int n){
iota(p,p+n,0);
fill(sz,sz+n,1);
upd.clear();
}
int Find(int v){
while(v!=p[v])v=p[v];
return v;
}
void flag(){upd.push_back({nullptr,0});}
void mark(int&x){upd.push_back({&x,x});}
bool operator()(int u,int v){
u=Find(u);v=Find(v);
if(u==v)return 0;
if(sz[u]>sz[v])swap(u,v);
mark(sz[v]);
sz[v]+=sz[u];
mark(p[u]);
p[u]=v;
return 1;
}
void RollBack(){
while(1){
auto[p,v]=upd.back();
upd.pop_back();
if(p)*p=v;
else break;
}
}
}dsu;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n,m;
cin>>n>>m;
int u[m],v[m],w[m],vis[m]={};
for(int i=0;i<m;i++){
cin>>u[i]>>v[i]>>w[i];
}
int q;
cin>>q;
int ans[B]={};
for(int it=0;it<q;it+=B){
memset(ans,-1,sizeof(ans));
memset(vis,0,sizeof(vis));
dsu.init(n+1);
int len=min(q-it,B);
vector<array<int,3>>Q(len);
vector<int>not_used,to_solve;
for(int i=0;i<len;i++){
cin>>Q[i][0]>>Q[i][1]>>Q[i][2];
if(Q[i][0]==1)Q[i][1]--,vis[Q[i][1]]=1;
else to_solve.push_back(i);
}
vector<pair<int,int>>used;
for(int i=0;i<m;i++){
if(!vis[i])not_used.push_back(i);
else used.push_back({i,w[i]});
}
sort(not_used.begin(),not_used.end(),[&](int i,int j){return w[i]<w[j];});
sort(to_solve.begin(),to_solve.end(),[&](int i,int j){return Q[i][2]>Q[j][2];});
for(auto i:to_solve){
int node=Q[i][1],W=Q[i][2];
while(!not_used.empty()&&w[not_used.back()]>=W){
int e=not_used.back();
not_used.pop_back();
dsu(u[e],v[e]);
}
dsu.flag();
for(int j=0;j<i;j++){
if(Q[j][0]==1){
int e=Q[j][1],val=Q[j][2];
w[e]=val;
}
}
for(auto[e,old]:used){
if(w[e]>=W)dsu(u[e],v[e]);
w[e]=old;
}
ans[i]=dsu.sz[dsu.Find(node)];
dsu.RollBack();
}
for(int i=0;i<len;i++){
if(Q[i][0]==1){
int e=Q[i][0],val=Q[i][1];
w[e]=val;
}else cout<<ans[i]<<"\n";
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 13
Accepted
time: 0ms
memory: 3548kb
input:
3 4 1 2 5 2 3 2 3 1 4 2 3 8 5 2 1 5 1 4 1 2 2 5 1 1 1 2 3 2
output:
3 2 3
result:
ok 3 lines
Test #2:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
7 8 1 2 5 1 6 5 2 3 5 2 7 5 3 4 5 4 5 5 5 6 5 6 7 5 12 2 1 6 1 1 1 2 1 2 1 2 3 2 2 2 1 5 2 1 3 1 2 2 4 2 4 2 1 8 1 2 1 1 2 1 3
output:
1 7 7 5 7 7 4
result:
ok 7 lines
Test #3:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
5 5 5 3 81 2 4 49 4 1 63 4 3 74 1 2 85 10 2 2 22 2 2 20 1 3 49 2 1 77 1 3 44 1 1 6 2 3 49 2 4 31 2 2 54 2 2 7
output:
5 5 2 4 4 2 4
result:
ok 7 lines
Test #4:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
5 10 1 3 51 1 2 74 2 4 63 1 4 86 2 5 9 5 1 28 5 4 1 2 1 23 2 5 16 3 1 75 10 2 2 37 1 6 24 1 1 24 2 5 65 1 7 57 2 1 82 2 1 26 1 4 12 2 2 15 1 4 70
output:
4 1 2 5 5
result:
ok 5 lines
Test #5:
score: -13
Wrong Answer
time: 14ms
memory: 3556kb
input:
100 1000 26 42 977322268 4 29 374382133 1 19 717262653 80 56 835233390 58 54 591443635 63 6 579687470 85 81 118110131 33 100 533388119 24 46 591205239 94 32 637495476 60 93 638216409 55 7 413175730 38 43 414269997 48 30 773236579 67 27 441100383 44 36 784705206 28 56 300064078 13 60 490548719 94 19 ...
output:
100 100 100 100 100 100 100 100 17 100 100 100 100 100 5 100 98 100 100 100 100 100 100 100 100 100 100 100 100 96 100 2 42 100 100 100 86 97 100 100 100 98 100 100 100 100 100 97 100 100 100 100 100 100 100 100 100 100 100 100 100 98 100 100 100 100 100 5 100 100 100 100 100 98 100 100 100 100 1 10...
result:
wrong answer 502nd lines differ - expected: '62', found: '2'
Subtask #2:
score: 0
Wrong Answer
Test #20:
score: 0
Wrong Answer
time: 809ms
memory: 6568kb
input:
50000 49999 1 2 976392398 2 3 773336157 3 4 849545817 4 5 194340376 5 6 386778507 6 7 40561907 7 8 260116638 8 9 85673124 9 10 149683208 10 11 724746156 11 12 155084527 12 13 416939763 13 14 753621724 14 15 384948880 15 16 625917615 16 17 833747431 17 18 764302034 18 19 4518648 19 20 405679793 20 21...
output:
7 2 24 1 3 8 1 2 6 2 535 4 3 2 7 13 40 110 3 41 6 1 108 491 28 1 1 4 2 11 5 9 2 1 2 1 9 1 1 3 1 14 3 1 1 10 44 3 2 3 3 1 1 18 3 2 2 2 1 9 1 15 17 7 1 1 1 4 1 2 6 3 1 1 5 1 10 1 5 2 1 14 14 3 28 17 1 6 1 3 1 9 3 10 2 32 54 4 1 2 2 18 1 1 5 1 11 2 10 1 2 5 4 1 1 2 3 4 1 1 128 17 3 1 2 2 1 160 1 1 2 3 ...
result:
wrong answer 525th lines differ - expected: '1', found: '2'
Subtask #3:
score: 0
Wrong Answer
Test #33:
score: 0
Wrong Answer
time: 608ms
memory: 5192kb
input:
32767 32766 1 2 152523690 1 3 736211233 2 4 163158345 2 5 200010458 3 6 902682843 3 7 427399287 4 8 770411775 4 9 322256303 5 10 252775416 5 11 346597970 6 12 297314023 6 13 727299741 7 14 985621564 7 15 101953231 8 16 405434218 8 17 421655547 9 18 817411034 9 19 310455840 10 20 355126049 10 21 7038...
output:
1 1 2 2 6 6 12547 1 1 1793 3 41 1 37 29734 8197 1 1 1 2 11 3 7 5 18 39 13 136 1 2 1 1 4 2 177 3 279 2 36 114 53 4 9 3 2 1 21 6 2 2 5 2 1 6 7 1 5 4 11 23129 288 196 8 1 5 9 3 1 4 45 4 1 1 5 3 3 10 18 91 1 16 829 24 1 2 8 1247 10 2 1 7 20323 8 1 2 28551 1 6 1 12 4 3 1 27 1 1 1 1 2 3 1 7 1 487 1 21 15 ...
result:
wrong answer 500th lines differ - expected: '14347', found: '7523'
Subtask #4:
score: 14
Accepted
Test #45:
score: 14
Accepted
time: 1275ms
memory: 7564kb
input:
50000 100000 35231 1616 822934828 1668 2202 768458723 26049 41810 238904165 15936 42751 466996423 41068 21425 588205829 29502 11760 732391267 13029 44741 930695124 46168 22085 155239713 9505 43779 638894800 18665 43842 298794735 41763 15511 727702105 7865 27776 53447691 32904 34081 844499614 26327 9...
output:
2 2 1 48165 37106 1 48830 1 47126 3 37777 1 14 1 1 24 1 48755 44817 17617 24322 48909 7 47708 1 41147 48949 45939 48022 1 26304 1 1 22363 24527 46076 37978 1 1 2 44508 1 47625 48554 1 2 4 48711 48431 41315 2 2 9364 3 37323 46978 39881 32373 5 39140 47126 44635 47960 1 48141 47192 28 27190 38467 4 48...
result:
ok 100000 lines
Test #46:
score: 0
Accepted
time: 64ms
memory: 3632kb
input:
1 0 100000 2 1 449565301 2 1 418018081 2 1 566914037 2 1 386096903 2 1 325815043 2 1 515513392 2 1 349622300 2 1 5042450 2 1 469351640 2 1 219472495 2 1 510850771 2 1 885705436 2 1 594457820 2 1 410756749 2 1 959667810 2 1 479458147 2 1 705147675 2 1 140732217 2 1 281668854 2 1 333164650 2 1 3934393...
output:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
result:
ok 100000 lines
Test #47:
score: 0
Accepted
time: 131ms
memory: 5572kb
input:
447 99681 432 259 741787656 82 143 380113631 317 104 156765724 76 270 110432834 212 261 207353276 25 300 39463185 14 56 725978322 155 236 785136504 398 265 446396092 343 1 949863738 1 110 808326751 97 180 623625192 308 92 73346434 253 252 319943247 362 372 874189144 206 402 177923890 22 205 89269820...
output:
447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 446 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 447 272 447 ...
result:
ok 10000 lines
Test #48:
score: 0
Accepted
time: 59ms
memory: 5704kb
input:
447 99681 432 259 1000000000 82 143 1000000000 317 104 1000000000 76 270 1000000000 212 261 1000000000 25 300 1000000000 14 56 1000000000 155 236 1000000000 398 265 1000000000 343 1 1000000000 1 110 1000000000 97 180 1000000000 308 92 1000000000 253 252 1000000000 362 372 1000000000 206 402 10000000...
output:
443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 443 ...
result:
ok 10000 lines
Test #49:
score: 0
Accepted
time: 635ms
memory: 7544kb
input:
50000 100000 36430 26409 3 14637 42323 4 4352 35569 1 14530 43949 2 22805 22365 1 49910 3378 4 1494 5088 2 18398 11098 5 14316 10284 5 11863 11681 2 29896 36912 3 30517 45099 4 36259 16961 1 40065 27965 2 2717 46870 3 34358 5004 1 3460 37101 2 13920 793 1 23824 38760 2 47941 20057 1 25012 1567 2 377...
output:
2 48980 48980 48980 2 48980 46861 46861 2 46861 39197 1 39197 46861 48980 2 18 1 48980 39197 48980 39197 39197 46861 8 48980 39197 46861 13013 39197 46861 39197 48980 48980 39197 39197 48980 48980 39197 39197 1 4 46861 48980 1 46861 46861 1 1 48980 78 13013 39197 46861 48980 46861 5 46861 39197 1 2 ...
result:
ok 100000 lines
Test #50:
score: 0
Accepted
time: 1250ms
memory: 7568kb
input:
50000 100000 36430 26409 891600895 14637 42323 146361404 4352 35569 221787293 14530 43949 358568724 22805 22365 190650305 49910 3378 414088144 1494 5088 592528192 18398 11098 542270793 14316 10284 350034541 11863 11681 878653236 29896 36912 168210793 30517 45099 365684348 36259 16961 960673881 40065...
output:
1 48294 4 20863 1 43446 48305 48732 46205 44911 48772 48525 21 44625 42513 48262 22234 46164 1 1 1 41815 1 44908 3 42859 47778 27167 48693 1 43420 2 47449 1 3 1 48843 2 1 47884 2 5 41904 1 42400 46059 4 2 1 30131 42694 11231 1 1 48952 1 37568 40717 1 44503 1 46559 1 47010 39169 42073 42791 1 1 26772...
result:
ok 100000 lines
Test #51:
score: 0
Accepted
time: 626ms
memory: 7552kb
input:
50000 100000 36430 26409 3 14637 42323 1 4352 35569 3 14530 43949 3 22805 22365 3 49910 3378 4 1494 5088 3 18398 11098 4 14316 10284 6 11863 11681 1 29896 36912 1 30517 45099 6 36259 16961 1 40065 27965 1 2717 46870 1 34358 5004 2 3460 37101 2 13920 793 1 23824 38760 3 47941 20057 2 25012 1567 4 377...
output:
39450 11923 39450 48980 46957 11923 39450 46957 48980 48980 1 1 46957 39450 39450 48980 46957 98 46957 48980 48980 48980 1 48980 48980 39450 39450 46957 46957 46957 11923 46957 48980 4 1 48980 48980 46957 1 1 11923 48980 46957 48980 48980 48980 48980 39450 48980 1 11923 48980 1 39450 46957 1 11923 3...
result:
ok 100000 lines
Test #52:
score: 0
Accepted
time: 603ms
memory: 6576kb
input:
50000 50000 3018 2466 31856784 44110 19797 43049494 29377 21015 99965770 18756 28173 453546998 30313 33813 132485681 29934 42387 8136444 24167 31408 174713487 21584 31531 8206037 37467 45599 1224360 19205 26080 254678499 3769 35418 112134933 8806 44621 74762896 15381 26395 186780991 30397 3214 31302...
output:
37 21 1 1 5 8 66 19 3 3 17 2 3 1 8 15 2 1 3 2 146 11 47 3 1 2 2 3 8 3 7 3 1 27 4 1 1 2 4 1 1 1 2 4 1 3 1 3 1 2 2 1 1 4 3 2 3 1 2 139 6 2 1 1 4 1 1 6 1 5 2 26 1 1 1 81 1 1 3 1 2 2 4 1 414 4 14 1 1 7 1 1 2 1 4 15 4 15 1 1 1 2774 9 8 3 4 35 5 3 4 6 2 9 4 1 1 1 50 35 115 2 33 7 3 3 1 2 1 1 138 2 3 3 15 ...
result:
ok 100000 lines
Test #53:
score: 0
Accepted
time: 596ms
memory: 6576kb
input:
50000 50000 3018 2466 986978263 44110 19797 568890536 29377 21015 499670939 18756 28173 839504998 30313 33813 296515410 29934 42387 607104763 24167 31408 819593187 21584 31531 932588647 37467 45599 781307391 19205 26080 840849964 3769 35418 172098007 8806 44621 514674542 15381 26395 631793541 30397 ...
output:
2 5 7 2 10 1 4 2 3 1 2 1 1 1 1 2 1 1 11 1 1 39 8 6 1 11 4 1 1 3 1 3 5 1 2 9 1 2 2 18 17 2 1 1 2 1 1 1 3 2 12 2 8 8 3 9 10 15 1 10 75 1 2 29 1 2 1 402 78 1 17 2 1 6 13 2 3 11 1 2 2 2 4 1 2 5 3 2 4 2 4 3 3 1 1 1 2 3 1 1 1 3 3 4 10 1 1 9 21 1 1 4 12 4 11 2 1 1 2 4 1 2 1 3 9 2 25 3 6 3 2 12 1704 2 3 4 2...
result:
ok 100000 lines
Test #54:
score: 0
Accepted
time: 605ms
memory: 6568kb
input:
50000 50000 3018 2466 79153577 44110 19797 74388894 29377 21015 68432062 18756 28173 253920608 30313 33813 96749945 29934 42387 211811490 24167 31408 260503273 21584 31531 6623362 37467 45599 10982747 19205 26080 299300783 3769 35418 193906707 8806 44621 101185330 15381 26395 375628184 30397 3214 30...
output:
17 106 67 624 499 2727 182 556 365 801 128 3016 835 25 429 79 301 1186 23 189 10 2 362 17 147 896 88 125 176 77 536 429 352 348 61 98 1061 94 499 2229 79 143 440 16 14 47 40 53 374 215 22 89 2858 55 379 756 218 268 17 191 13 5 1359 232 46 247 105 918 105 1442 243 6 52 1246 17 449 560 115 37 37 57 65...
result:
ok 100000 lines
Test #55:
score: 0
Accepted
time: 967ms
memory: 7160kb
input:
50000 75000 33889 6094 187797790 6038 24958 249870404 39193 12649 47857772 404 6521 64489103 45477 33178 61611498 33350 45699 89159626 39479 5160 5857314 18313 12942 59456592 16738 45598 162999431 6188 46675 375553080 5923 47352 267640 18352 44726 24162741 25970 36584 160755499 21001 12852 115486368...
output:
1 5 6944 1 62 300 9 1 8 4 1 33 35 12 40 324 39 79 1 1 1 203 1 1 151 2 2 1156 390 1 2106 19 2 1 1 3 1 1 4 522 25 2 1 1 5 5 4 6 136 300 8 1 15 5 6781 4 1 50 64 1 6 1 2 3 17 3 67 2 1 3 4 961 7 2 42 2033 1 4 45 128 1 1 1 31 4 2 8 26 7 30 1 1 6781 1 46 63 185 1 2 1 328 11 28 491 16 14 2 156 284 63 41 1 1...
result:
ok 100000 lines
Test #56:
score: 0
Accepted
time: 934ms
memory: 7092kb
input:
50000 75000 33889 6094 420893227 6038 24958 452093259 39193 12649 817331307 404 6521 852910965 45477 33178 817357513 33350 45699 743854302 39479 5160 973119288 18313 12942 823671581 16738 45598 734695190 6188 46675 440713089 5923 47352 358615002 18352 44726 690405567 25970 36584 376493341 21001 1285...
output:
1 8 1 5 9 1 478 6 4 43 8 88 5 2 1 2 6 12 13 17 2 1 4 2 630 2 39 7 5 58 2 1 382 2822 6 1 11 1506 48 8 7 3 10 3 1 38 1 7 4 2 1 364 3 488 16 60 10 1 9 2 11 23 19 6 1 12 20 1 54 1 3 158 5 2473 1 1 834 1 29 1 1 23 4 361 1247 414 1 4 2 80 2 67 1 1 4 1 258 16 2 82 4 3 18 67 76 5046 138 7 1 18 2 1 8 2 1 1 1...
result:
ok 100000 lines
Test #57:
score: 0
Accepted
time: 968ms
memory: 7120kb
input:
50000 75000 33889 6094 312238223 6038 24958 105159308 39193 12649 70014492 404 6521 268819182 45477 33178 30294724 33350 45699 23408487 39479 5160 170044358 18313 12942 462115817 16738 45598 12945966 6188 46675 50759466 5923 47352 10756786 18352 44726 445834887 25970 36584 110254109 21001 12852 1876...
output:
1960 5423 1339 372 4065 5678 3450 3878 3296 2348 2416 2056 3398 2913 11761 2721 18563 5 2913 2905 3752 1974 13388 5423 3076 1689 1974 614 5423 3450 3449 3878 123 5423 48 18563 14 1177 6 1603 19 2146 1339 3749 443 5423 3537 2914 4065 519 2416 3449 3450 887 2720 3810 10743 5423 4262 37 102 536 1556 11...
result:
ok 100000 lines
Test #58:
score: 0
Accepted
time: 568ms
memory: 7636kb
input:
50000 100000 15902 37902 1 17114 1173 1 11644 26158 1 19786 42295 1 7375 13869 1 41274 22976 2 835 37821 2 43555 33134 1 43468 19565 1 9379 47294 1 16398 11626 2 38982 40565 2 37286 12116 1 47601 37754 2 48429 36718 1 42177 6120 1 4654 18153 2 18980 25667 2 14661 40435 2 32390 8457 1 21754 24732 1 4...
output:
48953 39613 39613 48953 48953 48953 39613 1 48953 1 39613 4 48953 48953 39613 48953 48953 39613 39613 39613 39613 48953 39613 48953 39613 48953 48953 39613 48953 48953 48953 48953 39613 39613 39613 39613 39613 39613 39613 39613 48953 39613 48953 39613 39613 48953 39613 39613 2 48953 48953 39613 3961...
result:
ok 100000 lines
Test #59:
score: 0
Accepted
time: 605ms
memory: 7556kb
input:
50000 100000 16622 4042 3 29296 26235 1 924 10146 2 6673 2735 1 7465 16111 1 39191 3402 1 31557 2062 3 41332 16451 1 40029 29774 1 1536 11606 1 9816 21897 2 15118 49569 3 22016 42191 1 37712 3855 2 22722 21172 1 3261 35636 2 38376 20812 2 5328 40248 3 33365 373 3 29011 31608 1 25458 39541 3 22685 16...
output:
1 22819 49028 45603 49028 49028 45603 45603 1 49028 45603 45603 45603 49028 49028 49028 22819 49028 22819 45603 22819 49028 2 49028 22819 45603 45603 2 1 49028 49028 49028 49028 71 49028 1 49028 49028 4 45603 45603 49028 9 22819 45603 49028 22819 22819 49028 49028 17 22819 49028 1 49028 1 45603 4560...
result:
ok 100000 lines
Test #60:
score: 0
Accepted
time: 1283ms
memory: 7516kb
input:
49729 99012 34054 8341 4175351 18682 17977 31563632 19269 15971 316486513 16453 23315 222200372 48031 37963 328549397 35957 4042 144188344 41481 23139 199796339 30840 7454 2956883 9107 36464 105802625 15976 35553 213475524 35520 40158 41633125 27542 9944 262538992 14658 21385 146413217 27915 22932 1...
output:
162 1 152 40185 3 49369 1 43082 40012 13825 2 2 1 37937 37355 8 162 48318 1 1 40417 44848 48355 49114 81 49678 1 49166 1 47344 49715 7 5 49689 11981 46554 49369 1 48326 2326 49608 40335 3 1 10 3 6 9 44579 33623 1 49276 1 40358 1 32187 45056 178 1533 1 40012 39683 8 31113 7 23739 1153 20 7 28 49729 1...
result:
ok 100000 lines
Test #61:
score: 0
Accepted
time: 1294ms
memory: 7532kb
input:
49719 98972 21767 6065 50070961 20464 17361 169248081 27314 45549 36819446 33702 41335 351272826 48558 44834 199266519 30638 21034 674557652 19478 11122 253122173 29904 49011 156855128 47670 28852 109873392 17146 14684 169743003 15703 3814 7374462 16769 39749 189412976 7203 46682 136468490 46010 203...
output:
1 1 1 2 26 147 49689 23561 41142 18 1 1 41021 49054 1 2 42761 1 10756 40184 48557 3 1 5 33981 10933 49719 1 24618 41535 1 25 54 44299 5 858 43743 21961 8665 19 27734 43186 11 23 1 34874 1 49646 1 2 48268 45 49640 48808 1 26597 2 45151 103 1 49615 1 1 1 174 13552 5 48804 48896 10 18 19 2 21753 7 2308...
result:
ok 100000 lines
Test #62:
score: 0
Accepted
time: 1282ms
memory: 7616kb
input:
50000 99400 29410 30330 758567223 17803 21820 941403915 14061 46028 280515052 37193 24091 781060591 25716 20072 882860054 33445 37640 509782731 12541 23219 782716806 18523 6908 531828972 3230 32030 421168543 44552 48693 97642726 1279 2726 643181026 25106 34578 884629614 4038 37779 617488416 38071 11...
output:
49998 9 8 47672 29100 1 1 132 49992 1 7 46808 49976 49726 49996 40748 3 1 48367 6 2 1 3274 49999 992 1207 1 30090 47305 264 2 49642 1 28732 34285 49908 49963 49449 40622 1 49946 2 1 49775 49916 27 49986 85 1 39594 533 49933 1 1 32602 2 49190 49982 2 1 1 46823 3 1 48896 656 16 49594 26850 14 49952 3 ...
result:
ok 100000 lines
Test #63:
score: 0
Accepted
time: 1276ms
memory: 7536kb
input:
49950 99201 36281 36503 763054174 9379 38035 472773481 25806 36188 761440834 24770 43939 593827712 44117 32984 959406044 18886 41008 690486926 49627 4512 624530349 21092 16661 833081827 14094 49233 910931467 31376 2432 747917920 26336 18969 451935820 39553 16163 535086746 26124 43554 903283220 6256 ...
output:
9 49763 219 9 24398 46296 46900 1 1 1 93 5916 2 11 10 18101 49510 49887 1 382 16 49804 1 47896 1 48983 46558 17 48189 1 3151 2988 16 9151 4 46488 1 26 49529 5082 49830 16 7 13 39175 49618 1 87 2 49021 17 2 7804 22087 47920 1 19 1 46104 49549 12010 49940 1 49365 49944 3451 1 16304 48850 39516 49950 1...
result:
ok 100000 lines
Test #64:
score: 0
Accepted
time: 1094ms
memory: 7372kb
input:
49998 83327 39504 32115 603170071 49865 30849 130675480 30107 3167 55412622 33018 6097 94561562 32270 43450 124904278 1328 13459 79410517 5277 31217 436853542 22995 17298 247419872 32399 25864 535304576 20487 35769 11662754 19774 21657 33814282 4158 30463 363491899 40211 40065 187002697 22211 32071 ...
output:
4987 4981 13971 16566 34472 16568 15966 34464 1391 15951 34475 15951 48451 8373 6473 49998 8622 8956 8373 8373 49998 8622 8373 15970 15992 6 4960 8622 13975 15966 16568 8956 8606 34469 8373 13975 8956 8373 34464 4960 4960 5006 15951 15966 285 4989 6446 16568 8962 988 34472 6463 15968 33095 15966 861...
result:
ok 100000 lines
Test #65:
score: 0
Accepted
time: 1081ms
memory: 7304kb
input:
49992 83306 18171 44476 566111419 14354 45323 78491664 31324 42407 86408010 16269 10214 343483203 44837 22800 14793460 45715 9529 8321488 22348 19511 683659900 7036 10120 683944755 9747 12255 43970763 37546 33897 19677943 12388 12210 109434184 24731 34404 33575744 46477 2587 10649026 26986 49355 534...
output:
13375 13386 49992 9092 13500 14470 13375 13375 3112 11001 11018 4113 11002 9110 13386 13497 11001 1292 49992 13380 11002 9119 11018 3108 13289 49992 13384 13289 49992 13391 11001 1116 13384 9094 10949 3112 13375 13386 9094 821 9109 9110 9110 10999 13392 13380 13386 49992 11013 11000 22123 11001 1101...
result:
ok 100000 lines
Test #66:
score: 0
Accepted
time: 1227ms
memory: 7424kb
input:
48729 95081 34569 31119 121468261 44534 42997 32387101 27645 27262 179917793 27160 40400 147086695 24917 45974 392357817 10176 23589 64525446 36132 43032 101470030 48191 26960 218513742 27615 10820 393845101 36869 33441 37211419 40354 27469 38639025 14212 10067 288238270 17744 3968 186572229 24158 3...
output:
48488 47027 46935 46745 44133 43798 47943 1 47759 48461 48565 47726 42357 5 46497 46616 48729 48729 45359 1 48723 47960 46479 48476 47710 1 46777 48729 47331 3 47730 48709 42890 44349 48596 46030 48637 42242 47498 47057 48605 48729 48157 45068 45560 9 48150 48729 48367 48729 46030 48691 48711 48709 ...
result:
ok 100000 lines
Test #67:
score: 0
Accepted
time: 704ms
memory: 7276kb
input:
44729 80122 5199 20293 31 7817 41640 6 34878 22640 20 40005 33324 15 40383 32872 13 34683 29204 20 27984 14878 12 30253 38386 33 25606 20784 8 2189 25911 7 2456 33868 20 11948 9644 40 20299 36926 11 33341 21039 30 32405 33498 16 19620 43993 12 6437 37553 50 13577 29531 25 18855 28841 64 10313 6994 2...
output:
43932 43932 44630 44400 43932 44720 43932 44720 43932 44400 44630 44400 44630 44720 44400 44400 44630 44720 44720 43932 44630 44400 44720 43932 44720 44720 43932 44720 44630 44400 44630 44400 44630 43932 44630 44630 43932 44720 44400 44720 43932 44720 44400 43932 43932 44630 44400 43932 44400 1 4393...
result:
ok 100000 lines
Subtask #5:
score: 0
Skipped
Dependency #2:
0%
Subtask #6:
score: 0
Skipped
Dependency #1:
0%