QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#469410 | #8892. Power Grid | Lynkcat# | 28 | 87ms | 18756kb | C++20 | 2.2kb | 2024-07-09 18:54:15 | 2024-07-09 18:54:16 |
Judging History
answer
#include<bits/stdc++.h>
#define poly vector<int>
#define IOS ios::sync_with_stdio(false)
#define ll long long
#define mp make_pair
#define mt make_tuple
#define pa pair < int,int >
#define fi first
#define se second
#define inf 1e18
#define mod 998244353
#define sz(x) ((int)((x).size()))
#define int ll
// #define N
using namespace std;
const int N=1005;
int n,m;
int ans[N][N],b[N],a[N];
int c[N][N];
void dfs(int k,int sm)
{
if (k==n)
{
// cout<<"??"<<sm<<" "<<" "<<(n-m)<<endl;
if (sm!=0&&(n==m||sm%(n-m)!=0)) return;
// for (int i=0;i<n;i++) cout<<b[i]<<" ";cout<<endl;
// for (int i=0;i<m;i++) cout<<a[i]<<" ";cout<<endl;
int o=0;
if (sm!=0) o=sm/(n-m);
// cout<<"??"<<o<<endl;
for (int i=0;i<m;i++) a[i]-=o;
for (int i=0;i<n;i++) b[i]-=o;
// for (int i=0;i<n;i++) cout<<b[i]<<" ";cout<<endl;
// for (int i=0;i<m;i++) cout<<a[i]<<" ";cout<<endl;
for (int i=1;i<m;i++) ans[0][i]=a[i],b[0]-=a[i];
// cout<<"??"<<b[1]<<endl;
for (int i=0;i<n;i++)
{
ans[i][0]=b[i];
}
for (int i=0;i<m;i++)
{
for (int j=0;j<n;j++) cout<<ans[j][i]<<" ";
cout<<'\n';
}
fflush(stdout);
exit(0);
}
int l=-2000,r=2000;
for (int i=l;i<=r;i++)
{
b[k]=i;
bool bl=1;
for (int j=0;j<m;j++)
{
if (abs(b[k]-a[j])!=c[k][j])
{
bl=0;
break;
}
}
if (bl) dfs(k+1,sm+i);
}
}
void BellaKira()
{
cin>>n>>m;
for (int i=0;i<n;i++)
for (int j=0;j<m;j++)
cin>>c[j][i];
swap(n,m);
for (int s=0;s<(1<<m);s++)
{
poly g;
for (int i=0;i<m;i++)
if ((s>>i)&1) a[i]=c[0][i];
else a[i]=-c[0][i];
// for (int i=0;i<m;i++)
// cout<<a[i]<<" ";
// cout<<endl;
int sm=0;
for (int i=0;i<m;i++) sm-=a[i];
dfs(1,sm);
}
}
signed main()
{
IOS;
cin.tie(0);
int T=1;
while (T--)
{
BellaKira();
}
}
详细
Subtask #1:
score: 8
Accepted
Test #1:
score: 8
Accepted
time: 1ms
memory: 7764kb
input:
1 1 0
output:
0
result:
ok correct
Test #2:
score: 0
Accepted
time: 1ms
memory: 5704kb
input:
1 1 0
output:
0
result:
ok correct
Test #3:
score: 0
Accepted
time: 1ms
memory: 5712kb
input:
1 2 1 1
output:
1 -1
result:
ok correct
Test #4:
score: 0
Accepted
time: 0ms
memory: 5772kb
input:
3 1 0 3 1
output:
2 -1 1
result:
ok correct
Test #5:
score: 0
Accepted
time: 0ms
memory: 5780kb
input:
2 2 1 1 1 1
output:
1 -2 -1 0
result:
ok correct
Test #6:
score: 0
Accepted
time: 0ms
memory: 5732kb
input:
3 3 2 1 1 2 1 1 0 1 3
output:
2 -1 -3 -2 0 0 0 0 0
result:
ok correct
Test #7:
score: 0
Accepted
time: 0ms
memory: 5768kb
input:
3 3 0 1 0 2 1 2 1 2 1
output:
-1 1 0 2 0 0 -1 0 0
result:
ok correct
Test #8:
score: 0
Accepted
time: 1ms
memory: 5712kb
input:
3 3 0 0 2 2 2 0 0 0 2
output:
2 0 -2 -2 0 0 0 0 0
result:
ok correct
Test #9:
score: 0
Accepted
time: 1ms
memory: 5656kb
input:
3 3 3 1 2 3 1 2 3 1 2
output:
6 -4 -5 -3 0 0 -3 0 0
result:
ok correct
Test #10:
score: 0
Accepted
time: 1ms
memory: 5712kb
input:
3 3 3 3 3 0 0 0 3 3 3
output:
3 0 0 0 0 0 -3 0 0
result:
ok correct
Subtask #2:
score: 5
Accepted
Dependency #1:
100%
Accepted
Test #11:
score: 5
Accepted
time: 1ms
memory: 5744kb
input:
1 6 1 0 3 1 3 0
output:
1 0 -3 -1 3 0
result:
ok correct
Test #12:
score: 0
Accepted
time: 1ms
memory: 5720kb
input:
6 1 2 1 1 1 5 0
output:
0 1 1 1 -3 2
result:
ok correct
Test #13:
score: 0
Accepted
time: 1ms
memory: 5664kb
input:
6 6 3 1 0 3 4 0 1 1 2 1 2 2 1 1 2 1 2 2 1 3 4 1 0 4 1 1 2 1 2 2 2 0 1 2 3 1
output:
4 -2 -3 0 1 -3 -1 0 0 0 0 0 -1 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 -2 0 0 0 0 0
result:
ok correct
Test #14:
score: 0
Accepted
time: 1ms
memory: 5644kb
input:
6 6 2 4 4 0 2 2 5 1 1 3 1 1 4 2 2 2 0 0 2 4 4 0 2 2 6 0 0 4 2 2 3 3 3 1 1 1
output:
20 -6 -6 -2 -4 -4 -5 0 0 0 0 0 -4 0 0 0 0 0 -2 0 0 0 0 0 -6 0 0 0 0 0 -3 0 0 0 0 0
result:
ok correct
Test #15:
score: 0
Accepted
time: 1ms
memory: 5696kb
input:
6 6 1 0 4 5 3 2 4 5 1 0 2 3 3 4 0 1 1 2 2 3 1 2 0 1 1 2 2 3 1 0 0 1 3 4 2 1
output:
10 1 -3 -4 -2 -1 -4 0 0 0 0 0 -3 0 0 0 0 0 -2 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0
result:
ok correct
Test #16:
score: 0
Accepted
time: 1ms
memory: 5708kb
input:
6 6 6 4 2 4 1 3 6 4 2 4 1 3 6 4 2 4 1 3 6 4 2 4 1 3 6 4 2 4 1 3 6 4 2 4 1 3
output:
30 -10 -8 -10 -5 -3 -6 0 0 0 0 0 -6 0 0 0 0 0 -6 0 0 0 0 0 -6 0 0 0 0 0 -6 0 0 0 0 0
result:
ok correct
Test #17:
score: 0
Accepted
time: 1ms
memory: 5724kb
input:
6 3 6 3 3 6 3 3 6 3 3 6 3 3 6 3 3 6 3 3
output:
6 -3 -3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
result:
ok correct
Test #18:
score: 0
Accepted
time: 1ms
memory: 5708kb
input:
6 3 1 1 1 2 2 2 5 5 5 6 6 6 6 6 6 2 2 2
output:
-7 6 6 8 0 0 1 0 0 0 0 0 0 0 0 4 0 0
result:
ok correct
Test #19:
score: 0
Accepted
time: 1ms
memory: 7844kb
input:
3 6 6 5 5 5 5 5 6 5 5 5 5 5 6 5 5 5 5 5
output:
3 -2 -2 -2 -2 8 3 0 0 0 0 0 3 0 0 0 0 0
result:
ok correct
Test #20:
score: 0
Accepted
time: 1ms
memory: 5740kb
input:
6 3 5 5 5 5 5 5 6 6 6 5 5 5 5 5 5 5 5 5
output:
-2 7 7 2 0 0 1 0 0 2 0 0 2 0 0 2 0 0
result:
ok correct
Test #21:
score: 0
Accepted
time: 1ms
memory: 5656kb
input:
6 4 1 6 2 3 1 6 2 3 1 6 2 3 1 6 2 3 1 6 2 3 1 6 2 3
output:
21 -11 -7 -8 -5 0 0 0 -5 0 0 0 -5 0 0 0 -5 0 0 0 -5 0 0 0
result:
ok correct
Test #22:
score: 0
Accepted
time: 1ms
memory: 5656kb
input:
6 6 2 2 1 4 1 1 2 2 1 4 1 1 3 3 0 3 0 2 2 2 1 4 1 1 2 2 1 4 1 1 2 2 1 4 1 1
output:
11 0 -3 -6 -3 -1 -2 0 0 0 0 0 -3 0 0 0 0 0 -2 0 0 0 0 0 -2 0 0 0 0 0 -2 0 0 0 0 0
result:
ok correct
Subtask #3:
score: 0
Time Limit Exceeded
Test #23:
score: 11
Accepted
time: 1ms
memory: 5632kb
input:
1 1 0
output:
0
result:
ok correct
Test #24:
score: 0
Accepted
time: 0ms
memory: 5756kb
input:
1 10 230 289 918 752 224 184 573 217 398 715
output:
520 1 -628 -462 66 106 -283 73 -108 1005
result:
ok correct
Test #25:
score: 0
Accepted
time: 19ms
memory: 17748kb
input:
1 1000 298 440 513 326 225 36 897 92 347 346 919 370 28 957 593 332 736 960 346 969 329 893 380 523 104 345 860 451 290 958 164 386 508 786 605 778 453 500 376 670 86 283 844 408 282 541 479 827 9 558 473 251 184 694 920 905 1000 515 846 506 741 403 552 869 37 667 377 350 711 304 509 471 164 901 487...
output:
796 58 -15 172 273 462 -399 406 151 152 -421 128 470 -459 -95 166 -238 -462 152 -471 169 -395 118 -25 394 153 -362 47 208 -460 334 112 -10 -288 -107 -280 45 -2 122 -172 412 215 -346 90 216 -43 19 -329 489 -60 25 247 314 -196 -422 -407 -502 -17 -348 -8 -243 95 -54 -371 461 -169 121 148 -213 194 -11 2...
result:
ok correct
Test #26:
score: 0
Accepted
time: 4ms
memory: 17808kb
input:
1 1000 684 573 532 550 99 296 284 671 559 397 215 977 399 460 710 152 111 966 525 184 613 982 274 805 541 238 258 357 884 969 343 700 55 610 351 470 212 842 908 911 752 593 257 396 343 937 253 395 452 718 513 754 990 149 853 895 783 329 20 728 119 602 15 202 475 49 578 427 27 349 547 225 223 209 197...
output:
1180 -77 -36 -54 397 200 212 -175 -63 99 281 -481 97 36 -214 344 385 -470 -29 312 -117 -486 222 -309 -45 258 238 139 -388 -473 153 -204 441 -114 145 26 284 -346 -412 -415 -256 -97 239 100 153 -441 243 101 44 -222 -17 -258 -494 347 -357 -399 -287 167 476 -232 377 -106 481 294 21 447 -82 69 469 147 -5...
result:
ok correct
Test #27:
score: 0
Accepted
time: 4ms
memory: 17724kb
input:
1 1000 379 888 365 408 845 405 394 954 362 367 421 913 426 418 401 422 389 890 393 898 924 405 916 408 378 419 393 372 398 863 363 903 408 872 403 372 368 383 400 401 849 878 386 923 863 410 884 387 905 388 929 390 338 416 385 388 420 371 930 411 391 923 389 952 388 385 387 936 931 384 867 889 390 8...
output:
925 -342 181 138 -299 141 152 -408 184 179 125 -367 120 128 145 124 157 -344 153 -352 -378 141 -370 138 168 127 153 174 148 -317 183 -357 138 -326 143 174 178 163 146 145 -303 -332 160 -377 -317 136 -338 159 -359 158 -383 156 208 130 161 158 126 175 -384 135 155 -377 157 -406 158 161 159 -390 -385 1...
result:
ok correct
Test #28:
score: -11
Time Limit Exceeded
input:
1 1000 1 0 0 3 1 0 0 0 0 0 0 2 1 1 0 0 1 0 1 0 0 0 2 3 0 0 2 0 3 2 2 1 1 0 2 0 1 2 1 0 0 1 0 1 0 0 1 1 2 2 1 0 0 0 1 3 2 3 1 1 0 1 2 1 1 0 2 1 1 2 1 2 1 4 1 2 0 2 2 1 0 1 2 4 1 0 1 1 2 0 4 1 1 0 0 0 0 1 1 0 0 1 0 0 2 1 1 2 1 0 4 1 2 2 0 1 0 0 0 1 2 3 0 0 1 2 0 2 2 0 1 2 0 2 1 1 2 0 2 0 0 0 0 1 0 1 1...
output:
result:
Subtask #4:
score: 0
Time Limit Exceeded
Test #30:
score: 6
Accepted
time: 0ms
memory: 5720kb
input:
2 2 0 0 0 0
output:
0 0 0 0
result:
ok correct
Test #31:
score: 0
Accepted
time: 1ms
memory: 5764kb
input:
2 2 7 7 7 7
output:
7 -14 -7 0
result:
ok correct
Test #32:
score: 0
Accepted
time: 1ms
memory: 5712kb
input:
2 4 7 7 7 7 7 7 7 7
output:
7 0 0 0 7 0 0 0
result:
ok correct
Test #33:
score: 0
Accepted
time: 1ms
memory: 5872kb
input:
20 40 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 ...
output:
-2656 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 152 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 152 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 152 0 0 0 ...
result:
ok correct
Test #34:
score: 0
Accepted
time: 1ms
memory: 5820kb
input:
20 40 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 ...
output:
-332 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
result:
ok correct
Test #35:
score: -6
Time Limit Exceeded
input:
1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 ...
output:
result:
Subtask #5:
score: 15
Accepted
Test #46:
score: 15
Accepted
time: 1ms
memory: 5728kb
input:
2 4 253 431 207 483 243 65 289 13
output:
243 8 232 -44 -57 0 0 0
result:
ok correct
Test #47:
score: 0
Accepted
time: 1ms
memory: 5716kb
input:
2 4 188 566 555 176 471 283 272 459
output:
471 -329 -318 413 -46 0 0 0
result:
ok correct
Test #48:
score: 0
Accepted
time: 1ms
memory: 5740kb
input:
5 6 39 93 668 330 117 610 13 145 720 382 65 662 417 285 290 48 495 232 210 78 497 159 288 439 813 681 106 444 891 164
output:
488 181 -394 -56 391 -336 326 0 0 0 0 0 -104 0 0 0 0 0 103 0 0 0 0 0 -500 0 0 0 0 0
result:
ok correct
Test #49:
score: 0
Accepted
time: 1ms
memory: 5800kb
input:
4 7 330 140 57 520 147 685 359 70 540 457 120 547 285 41 168 638 555 22 645 187 139 425 45 38 615 52 780 454
output:
25 -389 -306 271 -396 436 110 151 0 0 0 0 0 0 249 0 0 0 0 0 0 -344 0 0 0 0 0 0
result:
ok correct
Test #50:
score: 0
Accepted
time: 0ms
memory: 5684kb
input:
10 10 853 399 803 868 626 195 356 314 232 136 409 45 359 424 182 249 88 130 212 308 134 320 84 149 93 524 363 405 487 583 60 394 10 75 167 598 437 479 561 657 50 404 0 65 177 608 447 489 571 667 828 374 778 843 601 170 331 289 207 111 457 3 407 472 230 201 40 82 164 260 34 420 16 49 193 624 463 505 ...
output:
2895 -454 -50 15 -227 -658 -497 -539 -621 -717 -409 0 0 0 0 0 0 0 0 0 -134 0 0 0 0 0 0 0 0 0 -60 0 0 0 0 0 0 0 0 0 -50 0 0 0 0 0 0 0 0 0 -828 0 0 0 0 0 0 0 0 0 -457 0 0 0 0 0 0 0 0 0 -34 0 0 0 0 0 0 0 0 0 -530 0 0 0 0 0 0 0 0 0 -393 0 0 0 0 0 0 0 0 0
result:
ok correct
Test #51:
score: 0
Accepted
time: 1ms
memory: 5676kb
input:
10 10 376 557 253 418 586 309 363 261 20 193 343 524 220 385 553 276 330 228 53 160 322 141 445 280 112 389 335 437 718 505 123 58 246 81 87 190 136 238 519 306 39 142 162 3 171 106 52 154 435 222 6 175 129 36 204 73 19 121 402 189 297 478 174 339 507 230 284 182 99 114 441 260 564 399 231 508 454 5...
output:
88 181 -123 42 210 -67 -13 -115 -396 -183 -343 0 0 0 0 0 0 0 0 0 322 0 0 0 0 0 0 0 0 0 123 0 0 0 0 0 0 0 0 0 39 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 0 -297 0 0 0 0 0 0 0 0 0 441 0 0 0 0 0 0 0 0 0 -30 0 0 0 0 0 0 0 0 0 -349 0 0 0 0 0 0 0 0 0
result:
ok correct
Test #52:
score: 0
Accepted
time: 2ms
memory: 5684kb
input:
10 10 608 306 681 555 168 504 161 276 342 308 236 66 309 183 204 132 211 96 30 64 589 287 662 536 149 485 142 257 323 289 70 372 3 123 510 174 517 402 336 370 160 462 87 213 600 264 607 492 426 460 178 124 251 125 262 74 269 154 88 122 458 156 531 405 18 354 11 126 192 158 61 241 134 8 379 43 386 27...
output:
1563 -302 73 -53 -440 -104 -447 -332 -266 -300 -236 0 0 0 0 0 0 0 0 0 -589 0 0 0 0 0 0 0 0 0 70 0 0 0 0 0 0 0 0 0 160 0 0 0 0 0 0 0 0 0 -178 0 0 0 0 0 0 0 0 0 -458 0 0 0 0 0 0 0 0 0 -61 0 0 0 0 0 0 0 0 0 111 0 0 0 0 0 0 0 0 0 -382 0 0 0 0 0 0 0 0 0
result:
ok correct
Test #53:
score: 0
Accepted
time: 1ms
memory: 5660kb
input:
2 4 1 2 3 4 5 6 7 8
output:
5 -5 -4 -3 -11 0 0 0
result:
ok correct
Test #54:
score: 0
Accepted
time: 0ms
memory: 5784kb
input:
10 20 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 100 10...
output:
1789 -109 -108 -107 -106 -105 -104 -103 -102 -101 -100 -99 -98 -97 -96 -95 -94 -93 -92 -91 -131 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -151 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -171 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -191 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -211 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
result:
ok correct
Test #55:
score: 0
Accepted
time: 0ms
memory: 7948kb
input:
21 42 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 100 10...
output:
17618 -461 -460 -459 -458 -457 -456 -455 -454 -453 -452 -451 -450 -449 -448 -447 -446 -445 -444 -443 -442 -441 -440 -439 -438 -437 -436 -435 -434 -433 -432 -431 -430 -429 -428 -427 -426 -425 -424 -423 -422 -421 -505 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok correct
Test #56:
score: 0
Accepted
time: 0ms
memory: 5676kb
input:
8 11 350 680 125 424 555 68 443 319 540 709 71 170 160 395 96 35 452 77 201 20 189 449 121 451 104 195 326 161 214 90 311 480 158 322 8 547 248 117 604 229 353 132 37 601 156 174 381 82 49 438 63 187 34 203 435 251 581 26 325 456 31 344 220 441 610 28 513 183 738 439 308 795 420 544 323 154 792 116 ...
output:
-451 293 -262 37 168 -319 56 -68 153 322 -316 133 0 0 0 0 0 0 0 0 0 0 -158 0 0 0 0 0 0 0 0 0 0 285 0 0 0 0 0 0 0 0 0 0 119 0 0 0 0 0 0 0 0 0 0 -288 0 0 0 0 0 0 0 0 0 0 476 0 0 0 0 0 0 0 0 0 0 -153 0 0 0 0 0 0 0 0 0 0
result:
ok correct
Test #57:
score: 0
Accepted
time: 5ms
memory: 5720kb
input:
15 5 148 610 23 697 750 176 286 301 373 426 528 66 653 21 74 64 526 61 613 666 133 595 8 682 735 122 584 3 671 724 637 175 762 88 35 196 266 321 353 406 607 145 732 58 5 87 375 212 462 515 234 696 109 783 836 484 22 609 65 118 495 33 620 54 107 598 136 723 49 4 421 41 546 128 181
output:
1024 -258 329 -345 -398 28 0 0 0 0 -324 0 0 0 0 268 0 0 0 0 337 0 0 0 0 326 0 0 0 0 -433 0 0 0 0 8 0 0 0 0 -403 0 0 0 0 117 0 0 0 0 438 0 0 0 0 -280 0 0 0 0 -291 0 0 0 0 -394 0 0 0 0 -217 0 0 0 0
result:
ok correct
Subtask #6:
score: 0
Time Limit Exceeded
Test #58:
score: 5
Accepted
time: 87ms
memory: 18756kb
input:
1000 1000 1 0 0 1 0 1 0 1 0 0 1 1 0 0 1 1 1 1 1 1 1 1 0 0 0 1 0 1 1 0 1 1 0 1 1 1 0 0 1 1 0 0 0 1 1 0 1 1 0 1 1 1 0 0 0 1 0 0 0 1 0 1 1 0 0 0 1 0 0 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 0 0 0 0 1 0 1 1 0 0 1 1 0 1 0 1 1 1 1 0 1 1 0 0 1 0 1 0 1 1 0 1 0 0 0 0 0 1 1 1 0 1 0 1 0 0 1 1 1 0 1 1 0 0 0 0 1 1 0 1 1 ...
output:
503 -1 -1 0 -1 0 -1 0 -1 -1 0 0 -1 -1 0 0 0 0 0 0 0 0 -1 -1 -1 0 -1 0 0 -1 0 0 -1 0 0 0 -1 -1 0 0 -1 -1 -1 0 0 -1 0 0 -1 0 0 0 -1 -1 -1 0 -1 -1 -1 0 -1 0 0 -1 -1 -1 0 -1 -1 -1 0 0 -1 0 0 -1 -1 -1 -1 0 -1 0 0 -1 -1 -1 -1 -1 0 -1 0 0 -1 -1 0 0 -1 0 -1 0 0 0 0 -1 0 0 -1 -1 0 -1 0 -1 0 0 -1 0 -1 -1 -1 -...
result:
ok correct
Test #59:
score: -5
Time Limit Exceeded
input:
1000 1000 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 ...
output:
result:
Subtask #7:
score: 0
Wrong Answer
Test #68:
score: 15
Accepted
time: 0ms
memory: 5712kb
input:
2 2 5 52 52 5
output:
52 -57 -52 0
result:
ok correct
Test #69:
score: -15
Wrong Answer
time: 45ms
memory: 12168kb
input:
1000 1000 640 423 797 825 85 491 146 594 713 894 923 193 511 700 556 269 32 177 29 16 394 971 754 194 930 404 686 794 19 267 410 880 859 52 477 347 94 826 638 132 385 628 642 795 332 98 606 377 681 330 731 339 157 855 875 836 450 46 225 661 138 909 917 873 371 223 152 19 44 67 792 3 466 740 151 681 ...
output:
result:
wrong output format Unexpected end of file - int32 expected
Subtask #8:
score: 0
Wrong Answer
Dependency #2:
100%
Accepted
Test #83:
score: 0
Wrong Answer
time: 1ms
memory: 6196kb
input:
100 100 14 50 6 9 35 31 9 1 40 31 30 17 58 53 33 43 19 37 41 35 20 51 29 44 20 19 4 4 59 29 56 50 37 38 49 59 41 1 37 10 19 41 2 4 29 20 13 7 25 25 54 31 38 14 22 3 35 37 22 49 35 29 1 24 23 7 38 9 41 33 55 19 19 17 8 55 59 9 29 8 40 36 21 3 12 24 59 59 2 14 59 59 0 15 19 37 2 9 3 20 60 4 40 55 81 1...
output:
result:
wrong output format Unexpected end of file - int32 expected
Subtask #9:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
0%