QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#282000 | #7869. 建设终末树 | dengtingyu | 15 | 1050ms | 376104kb | C++14 | 3.4kb | 2023-12-11 09:34:48 | 2023-12-11 09:34:49 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define ll int
ll n,m,q;
ll cn=0;
struct sat{
#define M 20000100
ll fir[M],nxt[M],v[M],cnt=0;
inline void Add(ll x,ll u){v[++cnt]=u;nxt[cnt]=fir[x];fir[x]=cnt;return ;}
inline void add(ll x,ll y,ll u,ll v){
x=2*x+y;u=2*u+v;Add(x,u);Add(u^1,x^1);
return;
}ll dfn[M],low[M],dfncnt=0;
ll st[M],top=0,col[M];ll colcnt=0;
bool ins[M];
inline void tar(ll x){
dfn[x]=low[x]=++dfncnt;st[++top]=x;ins[x]=1;
for(int i=fir[x];i;i=nxt[i]){
ll vi=v[i];if(dfn[vi]){if(ins[vi])low[x]=min(low[x],dfn[vi]);}
else{
tar(vi);low[x]=min(low[x],low[vi]);
}
}if(dfn[x]==low[x]){
col[x]=++colcnt;ins[x]=0;while(st[top]!=x){
col[st[top]]=colcnt;ins[st[top]]=0;top--;
}top--;
}return ;
}
inline void solve(){
for(int i=2;i<=cn+cn+1;i++)if(!dfn[i])tar(i);
return ;
}
}o;
#define N 2010
vector<ll>e[N];
ll fa[N],dfn[N],xu[N],dfncnt=0;
ll top[N],siz[N],son[N],dep[N];
inline void dfs(ll x,ll faa){
dep[x]=dep[faa]+1;siz[x]=1;fa[x]=faa;for(auto o:e[x]){
if(o==faa)continue;dfs(o,x);siz[x]+=siz[o];
if(siz[o]>siz[son[x]])son[x]=o;
}return ;
}
inline void dfs1(ll x,ll tp){
dfn[x]=++dfncnt;top[x]=tp;xu[dfncnt]=x;
if(son[x]){
dfs1(son[x],tp);
}for(auto o:e[x]){
if(dfn[o])continue;dfs1(o,o);
}return ;
}
inline ll lca(ll x,ll y){
while(top[x]!=top[y]){
if(dep[top[x]]<dep[top[y]])swap(x,y);
x=fa[top[x]];
}return (dep[x]<dep[y])?x:y;
}
ll vis[N][N];
struct dsu{
ll fa[N];inline void init(){for(int i=1;i<=m;i++)fa[i]=i;return ;}
inline ll getf(ll x){return (fa[x]==x)?x:fa[x]=getf(fa[x]);}
inline bool merge(ll x,ll y){ll o=getf(x),p=getf(y);if(o==p)return false;fa[o]=p;return true;}
}g[N];
struct xg{ll pos,x,y;};
vector<xg>rc[N];
ll tem[N],tt[N];
ll bh[N][N];
ll nw[N];
int main(){
// freopen("test1.in","r",stdin);
//freopen(".in","r",stdin);
//freopen(".out","w",stdout);
ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
cin>>n>>m>>q;for(int i=1;i<n;i++){
ll u,v;cin>>u>>v;e[u].push_back(v);e[v].push_back(u);
}for(int i=1;i<=n;i++)g[i].init();
dfs(1,0);dfs1(1,1);
for(int i=1;i<=m;i++){
ll k;cin>>k;for(int j=1,x;j<=k;j++)cin>>x,vis[i][x]++;
for(int j=n;j>=2;j--)vis[i][fa[xu[j]]]+=vis[i][xu[j]];
}for(int i=1;i<=q;i++){
ll k;cin>>k;for(int j=1;j<=k;j++)cin>>tem[j];tem[k+1]=tem[1];
ll l;cin>>l;for(int j=1;j<=l;j++)cin>>tt[j];tt[l+1]=tt[1];
for(int j=1;j<=k;j++){
ll u=lca(tem[j],tem[j+1]);
for(int p=1;p<=l;p++)rc[u].push_back((xg){tem[j],tt[p],tt[p+1]});
}
}for(int t=1;t<=n;t++){
ll i=xu[t];for(auto o:rc[i]){
ll nw=o.pos;
while(nw!=i&&g[nw].merge(o.x,o.y))nw=fa[nw];
}
}for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
if(g[i].getf(j)==j)bh[j][i]=++cn;
}for(int j=1;j<=n;j++)bh[j][i]=bh[g[i].getf(j)][i];
}for(int i=1;i<=m;i++){
memcpy(nw,bh[i],sizeof(nw));
for(int t=n;t>=1;t--){
ll j=xu[t],g=bh[i][j];if(!vis[i][j])o.add(g,1,g,0);
else if(vis[i][j]==vis[i][1])o.add(g,0,g,1);
else{
ll f=nw[fa[j]];o.add(g,1,f,1);
if(dfn[fa[j]]+1!=dfn[j]){
++cn;o.add(g,1,cn,0);
o.add(cn,1,f,1);nw[fa[j]]=cn;
}
}
}
}
o.solve();//for(int i=2;i<=cn+cn+1;i++)cout<<o.col[i]<<'\n';
for(int i=1;i<=m;i++){
ll rc=0;for(int j=1;j<=n;j++){
ll tem=bh[i][xu[j]];if(o.col[tem*2+1]<o.col[tem*2])rc=xu[j];
if(o.col[tem*2+1]==o.col[tem*2]){
cout<<-1;return 0;
}
}cout<<rc<<' ';
}return 0;
}
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 10
Accepted
time: 1036ms
memory: 372376kb
input:
1999 1998 27199 1368 233 233 617 233 388 233 1127 1905 233 907 233 233 40 233 1325 233 1940 1739 233 501 233 233 33 735 233 233 283 233 1427 1992 233 233 632 233 685 1188 233 648 233 233 344 233 1321 986 233 848 233 770 233 256 233 164 233 936 233 1206 233 53 233 1054 233 1430 233 1714 233 86 233 11...
output:
1294 1264 1662 1036 1036 1450 899 641 906 1005 1005 1683 1547 1547 878 1654 1630 1085 503 1338 1654 641 1388 1388 878 1904 1547 1036 1662 1388 906 906 1662 987 878 1683 467 815 1662 1909 1388 1654 899 9 1338 1450 1909 1610 1671 899 1671 181 1036 906 987 467 899 815 705 705 641 1547 899 1904 1662 154...
result:
ok Accepted.
Test #2:
score: -10
Wrong Answer
time: 1050ms
memory: 376104kb
input:
1998 2000 25224 1860 579 579 1400 720 579 579 1379 579 1628 579 69 579 400 1941 579 579 811 579 252 1816 579 579 1786 579 335 579 1467 1480 579 98 579 579 755 579 55 579 1059 650 579 579 1846 1437 579 579 861 338 579 1687 579 579 1248 579 1827 579 1169 1613 579 579 1494 579 1502 1090 579 612 579 579...
output:
219 942 158 865 295 1458 219 158 1855 906 557 295 1855 1545 422 557 1545 937 1855 906 634 872 872 1442 1458 1450 158 239 872 295 422 942 295 937 1689 1213 295 634 219 1183 1855 1213 443 1450 1458 872 1117 488 239 1577 698 865 422 219 1699 443 1823 1183 1689 634 488 1117 1545 323 1458 323 1458 443 90...
result:
wrong answer Integer element [index=1998] equals to -1, violates the range [1, 1998]
Subtask #2:
score: 15
Accepted
Test #8:
score: 15
Accepted
time: 0ms
memory: 24208kb
input:
10 10 8 4 2 2 9 6 9 8 7 4 10 7 2 5 2 2 1 5 3 3 10 7 2 2 10 2 2 4 10 2 10 4 2 8 2 2 4 10 1 8 2 2 10 1 1 1 10 2 10 9 3 10 3 4 2 7 1 3 10 6 3 2 4 8 2 3 2 4 2 9 4 6 2 5 7 2 3 9 2 2 1 4 10 6 8 5 4 10 6 1 2 2 1 4 2 7 5 2 5 3 2 8 3
output:
10 10 10 10 2 10 8 2 1 10
result:
ok Accepted.
Test #9:
score: 0
Accepted
time: 0ms
memory: 24208kb
input:
10 10 9 9 10 3 5 2 3 9 2 2 6 1 3 8 5 1 7 6 4 1 7 1 8 2 10 2 4 8 5 1 2 2 10 9 2 2 7 1 8 4 1 8 5 2 2 10 6 4 9 2 4 3 2 3 10 2 5 3 2 8 3 2 8 5 2 5 3 2 6 5 2 5 9 2 9 3 2 9 8 2 1 8 3 7 1 6 2 2 8 2 10 2 3 8 1 4 2 9 5 3 1 6 8 3 9 4 3 2 1 7
output:
7 8 9 1 9 1 8 3 9 3
result:
ok Accepted.
Test #10:
score: 0
Accepted
time: 0ms
memory: 24260kb
input:
10 10 8 7 1 3 2 6 1 2 1 3 5 10 8 4 7 9 2 6 10 1 9 2 3 5 2 10 8 3 9 1 5 1 9 2 1 8 1 10 4 2 7 9 3 3 9 3 6 3 1 9 3 3 3 1 2 3 8 2 9 2 1 9 2 8 9 2 4 2 3 2 8 9 3 4 9 6 3 7 3 6 2 7 10 2 5 8 2 5 9 2 1 5 3 9 7 1 2 9 4 3 8 3 7 3 7 6 3
output:
9 3 10 2 9 10 10 3 3 1
result:
ok Accepted.
Test #11:
score: 0
Accepted
time: 0ms
memory: 26268kb
input:
10 10 6 8 1 3 10 6 1 9 2 8 5 3 7 9 7 6 4 6 3 2 1 6 3 6 10 3 1 8 4 10 1 4 3 3 3 1 6 3 1 4 10 2 9 2 2 9 2 3 6 1 4 2 7 10 3 3 2 9 3 3 4 6 5 4 8 10 5 9 5 5 6 4 9 1 2 5 9 4 2 6 5 10 3 7 3 8 3 1 9 2 3 2 8 9 2 10 2 4 10 5 3 2 3 6 2 10
output:
-1
result:
ok Accepted.
Test #12:
score: 0
Accepted
time: 2ms
memory: 26276kb
input:
10 10 9 1 7 7 5 7 8 3 7 7 10 4 7 7 9 6 7 2 7 3 6 3 9 3 8 2 4 6 2 7 5 3 6 8 3 4 5 10 4 6 4 10 9 7 5 10 4 6 9 8 1 6 8 9 4 10 5 2 3 4 5 1 7 7 8 5 1 10 9 6 2 8 7 2 3 7 2 6 2 2 3 6 3 3 9 2 2 10 1 2 8 1 2 8 5 2 9 5 2 7 3 2 5 3 3 2 10 8 2 5 8 2 1 3 2 8 4 3 4 5 6 2 9 2 2 10 9 3 3 8 9
output:
7 7 7 7 7 1 7 7 1 7
result:
ok Accepted.
Test #13:
score: 0
Accepted
time: 2ms
memory: 24260kb
input:
10 10 6 4 9 8 4 4 7 3 4 5 4 2 4 4 6 1 4 10 4 9 8 1 6 4 9 10 5 3 2 5 4 2 10 7 3 2 4 6 2 6 4 8 2 6 10 5 3 9 1 8 8 7 9 10 6 5 3 2 1 8 7 8 10 5 2 1 9 3 8 5 10 7 6 2 9 8 3 9 10 5 7 1 8 9 3 2 6 6 3 2 6 10 5 7 3 5 2 4 2 10 4 4 10 6 8 2 3 10 5 2 4 3 1 8 5 2 6 9 3 7 4 10 6 8 9 7 3 6 1 4 3 8 7 2 3 5 10 2 2 5 ...
output:
1 4 4 4 1 1 1 4 1 4
result:
ok Accepted.
Test #14:
score: 0
Accepted
time: 0ms
memory: 26276kb
input:
10 10 7 10 6 10 4 2 10 8 10 10 1 5 10 3 10 7 10 9 10 5 8 1 3 5 6 10 2 10 8 5 7 9 3 6 4 1 7 4 8 6 10 3 5 9 2 1 10 7 7 6 10 8 4 1 9 1 5 9 9 4 6 10 1 7 2 3 5 10 6 4 3 9 1 5 8 7 2 10 2 8 2 8 6 1 3 5 7 4 8 9 3 8 5 4 3 10 5 4 2 10 4 3 4 2 10 3 6 7 1 3 4 10 5 2 6 3 2 7 2 4 8 7 6 4 3 8 3 9 4 10 8 4 5 3 10 2...
output:
1 1 10 1 1 5 1 1 10 1
result:
ok Accepted.
Test #15:
score: 0
Accepted
time: 3ms
memory: 24156kb
input:
10 10 9 8 7 5 3 1 8 7 6 10 4 3 6 1 2 5 9 9 4 5 7 6 9 1 10 3 10 5 9 2 9 6 2 3 4 5 10 6 5 4 3 3 9 3 8 4 3 8 2 10 3 8 4 2 5 3 9 10 8 2 1 5 2 5 7 2 7 4 2 10 7 2 7 9 2 6 5 2 8 1 2 8 1 2 3 5 2 3 10 4 5 8 3 7 3 2 4 5 2 7 5 3 5 1 2 2 1 6 2 2 10 2 8 4 2 2 8 2 7 1
output:
3 9 6 3 3 3 3 3 3 5
result:
ok Accepted.
Test #16:
score: 0
Accepted
time: 0ms
memory: 24228kb
input:
10 10 9 2 7 1 8 2 5 9 4 5 3 10 7 4 6 10 8 6 1 2 7 5 4 1 4 10 9 2 1 2 5 10 9 4 2 7 3 1 9 4 2 8 9 4 6 8 3 2 2 8 1 3 2 1 9 4 5 8 9 4 2 9 10 2 1 7 2 10 8 2 7 8 2 3 10 2 7 6 2 8 6 2 5 10 2 6 2 2 5 10 3 5 9 8 2 4 10 2 1 5 2 2 9 2 5 7 3 3 10 1 3 8 4 5 3 5 10 9
output:
-1
result:
ok Accepted.
Test #17:
score: 0
Accepted
time: 0ms
memory: 24156kb
input:
10 10 6 8 10 3 5 4 1 9 6 7 10 7 9 2 8 3 1 4 6 1 1 2 10 9 3 3 6 2 2 8 10 2 10 7 2 8 7 5 9 4 3 10 5 3 8 9 10 1 7 2 2 10 3 4 1 5 3 10 9 5 3 1 9 10 3 6 4 10 5 9 6 1 2 8 4 4 2 5 3 2 4 7 3 9 2 4 3 7 1 3 4 5 8 2 4 4 3 10 1 9 3 10 8 3
output:
1 10 10 10 10 10 1 10 7 10
result:
ok Accepted.
Test #18:
score: 0
Accepted
time: 2ms
memory: 26280kb
input:
10 10 8 3 4 2 8 1 4 1 9 7 5 7 6 5 8 6 10 10 9 2 10 2 3 10 1 2 4 8 5 7 1 2 10 2 1 10 4 1 9 8 5 6 4 8 6 5 2 9 2 1 9 4 7 1 9 2 6 10 2 4 3 9 8 2 9 4 3 1 4 2 2 7 4 3 6 8 7 2 7 8 2 10 7 3 7 3 1 3 2 9 1 3 10 1 3 2 4 1 3 8 5 6 2 4 9 2 8 1 2 9 2 3 3 6 2 3 6 7 8
output:
10 10 1 10 10 1 1 1 10 1
result:
ok Accepted.
Subtask #3:
score: 0
Wrong Answer
Test #19:
score: 20
Accepted
time: 11ms
memory: 39524kb
input:
500 498 5000 60 409 462 125 461 410 42 178 133 372 137 265 358 27 450 294 45 454 76 405 132 118 333 331 365 230 114 218 112 377 49 429 60 299 488 95 85 362 89 33 426 308 427 198 468 481 289 363 195 430 61 21 162 55 12 487 395 85 79 475 391 215 244 351 331 43 452 186 247 271 224 390 206 347 447 165 9...
output:
498 368 6 72 163 77 212 74 6 269 322 74 74 359 243 48 373 1 92 1 500 71 161 409 455 321 104 161 25 390 305 390 469 369 74 309 415 366 239 429 352 425 74 389 47 429 161 74 161 161 341 92 275 174 1 378 441 74 29 485 266 266 4 47 1 21 479 342 390 375 207 365 161 246 378 92 435 352 1 350 431 322 104 479...
result:
ok Accepted.
Test #20:
score: 0
Accepted
time: 11ms
memory: 39572kb
input:
500 500 5000 297 429 444 310 304 235 470 8 33 395 174 34 276 320 298 478 149 117 400 211 118 399 448 268 446 484 268 180 465 471 68 443 33 358 256 431 490 452 110 389 304 418 286 219 498 16 416 376 495 173 408 138 473 228 317 199 344 279 31 469 159 16 377 397 492 402 308 107 461 11 332 105 377 77 31...
output:
39 252 124 376 250 200 48 31 336 117 179 31 481 203 415 380 65 292 114 244 60 6 15 60 357 441 370 279 296 38 41 65 44 133 1 463 65 179 423 79 446 489 405 83 357 376 472 65 223 371 354 265 481 280 377 74 87 70 171 481 436 471 203 163 237 464 65 13 114 280 249 321 65 481 13 416 165 110 357 1 306 380 1...
result:
ok Accepted.
Test #21:
score: 0
Accepted
time: 6ms
memory: 44344kb
input:
499 498 5000 28 246 54 26 13 312 346 225 377 80 274 410 352 446 394 386 204 453 54 355 337 480 313 263 90 395 388 61 193 71 213 265 125 121 65 120 154 216 331 206 475 413 263 332 322 306 75 290 335 222 149 360 89 139 52 10 91 132 202 88 211 106 205 422 19 467 250 156 382 223 161 486 4 8 495 16 64 12...
output:
128 176 407 490 374 128 62 438 354 405 442 225 434 33 117 374 269 136 1 211 369 176 442 438 441 369 110 221 98 405 277 198 151 172 136 6 475 1 314 62 377 166 1 107 305 200 344 1 229 136 71 200 10 369 78 301 6 1 221 200 438 172 48 358 458 135 7 395 254 455 133 405 29 200 298 412 117 200 200 355 342 3...
result:
ok Accepted.
Test #22:
score: -20
Wrong Answer
time: 5ms
memory: 43096kb
input:
499 500 5000 71 225 374 470 413 420 422 368 357 141 479 360 172 237 21 40 16 386 434 274 188 207 249 16 9 259 152 63 488 264 166 467 51 70 90 417 209 411 43 101 102 206 320 29 110 408 182 333 115 394 138 458 29 296 73 241 392 145 235 428 197 114 271 125 131 401 122 377 215 252 186 253 38 309 11 491 ...
output:
66 299 264 133 346 22 322 2 378 141 4 497 29 2 133 378 2 2 29 378 108 4 108 421 378 4 390 421 29 346 323 2 322 497 141 312 295 421 2 66 21 497 422 2 497 390 422 497 108 497 264 422 378 22 390 295 467 93 29 113 497 2 22 422 312 264 312 497 22 21 322 93 21 299 29 21 4 22 312 2 322 497 22 29 93 141 93 ...
result:
wrong answer Integer element [index=499] equals to -1, violates the range [1, 499]
Subtask #4:
score: 0
Wrong Answer
Dependency #2:
100%
Accepted
Test #28:
score: 20
Accepted
time: 25ms
memory: 48540kb
input:
499 499 265 20 482 382 88 211 434 122 198 238 180 411 104 462 291 28 215 220 69 192 172 493 52 25 455 162 29 405 278 161 339 316 212 443 257 419 262 411 458 331 93 106 144 422 264 488 248 86 165 62 411 426 236 443 30 140 260 499 37 295 372 315 237 15 67 403 366 467 235 42 262 61 300 312 362 469 202 ...
output:
298 488 28 246 17 17 222 222 81 396 488 488 28 479 215 17 1 28 74 488 74 222 488 17 369 222 250 369 479 250 479 479 250 1 57 488 81 298 17 298 496 17 496 298 363 496 1 222 488 57 81 479 74 488 28 267 246 17 28 17 298 51 479 298 71 28 28 17 28 222 74 51 1 222 488 28 479 488 488 222 28 298 42 28 51 48...
result:
ok Accepted.
Test #29:
score: 0
Accepted
time: 22ms
memory: 50240kb
input:
500 498 275 323 261 41 144 117 22 223 61 412 79 403 191 166 56 401 274 42 204 439 277 439 175 475 382 320 164 179 397 143 302 68 276 11 9 252 25 421 419 109 353 451 165 63 461 28 241 7 91 302 420 60 284 283 113 418 176 443 177 64 412 144 497 493 14 483 209 287 375 287 100 298 376 298 193 188 321 288...
output:
156 491 491 11 339 263 11 420 157 157 420 208 193 76 157 157 160 208 76 339 208 76 11 229 193 157 491 191 235 443 191 1 491 420 157 157 420 11 156 144 420 156 76 160 160 1 76 193 420 420 143 156 11 420 156 193 193 189 11 420 1 420 11 156 11 237 156 160 11 156 1 156 11 420 11 11 157 420 491 237 160 1...
result:
ok Accepted.
Test #30:
score: 0
Accepted
time: 28ms
memory: 46312kb
input:
500 499 215 233 327 276 433 188 7 393 452 431 389 55 485 238 103 411 344 273 193 351 211 248 161 489 149 13 427 336 210 487 199 76 324 452 477 290 134 108 418 378 300 371 218 499 85 418 450 480 353 248 451 89 3 249 248 283 203 294 443 102 360 412 20 234 177 479 171 357 165 490 340 133 110 52 106 374...
output:
-1
result:
ok Accepted.
Test #31:
score: 0
Accepted
time: 19ms
memory: 49456kb
input:
499 499 260 157 101 80 132 333 13 206 419 136 233 322 168 48 362 32 485 426 214 493 349 179 181 245 284 332 366 234 63 407 254 429 337 32 217 469 130 18 129 147 42 223 473 9 310 330 6 242 483 233 228 154 498 31 351 171 377 455 328 497 301 343 244 355 144 386 489 437 247 307 493 134 316 185 256 199 2...
output:
-1
result:
ok Accepted.
Test #32:
score: 0
Accepted
time: 17ms
memory: 43188kb
input:
498 498 1951 289 275 304 352 50 441 95 466 432 162 324 216 367 399 413 154 163 345 290 127 450 195 437 41 326 421 236 299 248 449 60 233 31 183 278 228 184 444 384 448 135 462 39 486 215 123 136 120 12 200 182 416 475 292 180 40 381 334 324 310 113 429 177 398 393 447 67 350 112 46 133 23 205 218 33...
output:
136 381 233 255 416 173 137 39 416 137 100 136 44 416 136 151 262 173 185 173 402 44 151 137 311 137 154 198 151 136 416 133 44 185 11 198 327 475 416 416 334 136 402 262 255 100 475 44 100 475 151 107 39 381 1 1 173 173 173 173 262 11 416 39 136 173 398 446 255 475 260 100 416 137 152 262 311 352 1...
result:
ok Accepted.
Test #33:
score: 0
Accepted
time: 12ms
memory: 43376kb
input:
498 499 2728 88 127 472 81 109 272 124 323 459 371 316 200 321 29 306 46 458 36 95 143 148 205 207 308 252 440 39 74 131 100 237 277 298 341 16 473 349 492 83 461 98 382 17 13 295 198 65 83 165 426 127 412 413 327 237 268 183 211 207 255 221 41 128 433 100 217 40 9 151 64 426 360 189 322 209 26 290 ...
output:
-1
result:
ok Accepted.
Test #34:
score: -20
Wrong Answer
time: 28ms
memory: 47848kb
input:
498 500 285 165 321 87 3 184 139 75 133 257 406 187 14 396 96 323 248 63 165 69 170 388 281 117 164 114 329 103 355 138 177 169 498 182 462 368 424 323 474 322 317 303 416 57 259 498 425 135 216 137 38 30 437 151 205 147 19 459 12 174 280 400 348 248 435 362 213 180 54 363 77 54 157 65 303 447 366 6...
output:
189 400 362 57 362 323 47 425 425 189 323 132 47 189 47 189 57 323 47 57 189 323 362 165 47 189 57 132 165 362 425 57 362 47 323 400 362 165 47 132 400 132 323 362 47 27 47 47 132 323 165 425 400 400 27 323 47 132 323 323 57 189 57 362 323 362 57 47 47 455 27 400 27 400 323 400 1 27 165 455 47 425 3...
result:
wrong answer Integer element [index=498] equals to -1, violates the range [1, 498]
Subtask #5:
score: 0
Skipped
Dependency #3:
0%
Subtask #6:
score: 0
Skipped
Dependency #1:
0%