QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#809399 | #8892. Power Grid | Max_s_xaM | 34 | 113ms | 265436kb | C++17 | 5.1kb | 2024-12-11 14:50:01 | 2024-12-11 14:50:14 |
Judging History
answer
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <random>
#include <ctime>
#include <chrono>
#include <numeric>
#include <iomanip>
#include <cassert>
typedef long long ll;
typedef double lf;
typedef unsigned long long ull;
// #define DEBUG 1
struct IO
{
#define MAXSIZE (1 << 20)
#define isdigit(x) (x >= '0' && x <= '9')
char buf[MAXSIZE], *p1, *p2;
char pbuf[MAXSIZE], *pp;
#if DEBUG
#else
IO() : p1(buf), p2(buf), pp(pbuf) {}
~IO() {fwrite(pbuf, 1, pp - pbuf, stdout);}
#endif
#define gc() (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, MAXSIZE, stdin), p1 == p2) ? ' ' : *p1++)
#define blank(x) (x == ' ' || x == '\n' || x == '\r' || x == '\t')
template <typename T>
void Read(T &x)
{
#if DEBUG
std::cin >> x;
#else
bool sign = 0; char ch = gc(); x = 0;
for (; !isdigit(ch); ch = gc())
if (ch == '-') sign = 1;
for (; isdigit(ch); ch = gc()) x = x * 10 + (ch ^ 48);
if (sign) x = -x;
#endif
}
void Read(char *s)
{
#if DEBUG
std::cin >> s;
#else
char ch = gc();
for (; blank(ch); ch = gc());
for (; !blank(ch); ch = gc()) *s++ = ch;
*s = 0;
#endif
}
void Read(char &c) {for (c = gc(); blank(c); c = gc());}
void Push(const char &c)
{
#if DEBUG
putchar(c);
#else
if (pp - pbuf == MAXSIZE) fwrite(pbuf, 1, MAXSIZE, stdout), pp = pbuf;
*pp++ = c;
#endif
}
template <typename T>
void Write(T x)
{
if (x < 0) x = -x, Push('-');
static T sta[35];
int top = 0;
do sta[top++] = x % 10, x /= 10; while (x);
while (top) Push(sta[--top] ^ 48);
}
template <typename T>
void Write(T x, char lst) {Write(x), Push(lst);}
} IO;
#define Read(x) IO.Read(x)
#define Write(x, y) IO.Write(x, y)
#define Put(x) IO.Push(x)
using namespace std;
const int MAXN = 1010, MAXM = 2e6 + 10;
int n, m;
ll c[MAXN][MAXN], ans[MAXN][MAXN];
bool Tr;
inline void Swap()
{
Tr = 1;
int mx = max(n, m);
for (int i = 1; i <= mx; i++)
for (int j = 1; j < i; j++)
swap(c[i][j], c[j][i]);
swap(n, m);
}
inline void Print()
{
if (Tr)
{
for (int i = 1; i <= m; i++, cout << "\n")
for (int j = 1; j <= n; j++)
cout << ans[j][i] << ' ';
return;
}
for (int i = 1; i <= n; i++, cout << '\n')
for (int j = 1; j <= m; j++)
cout << ans[i][j] << ' ';
}
ll a[MAXN], b[MAXN];
inline void Trans()
{
if (n == 1)
{
for (int i = 1; i <= m; i++) ans[1][i] = b[i];
return;
}
if (m == 1)
{
for (int i = 1; i <= n; i++) ans[i][1] = a[i];
return;
}
ll sum0 = 0, sum1 = 0;
for (int i = 2; i < n; i++) ans[i][1] = a[i], sum0 += a[i];
for (int i = 2; i < m; i++) ans[1][i] = b[i], sum1 += b[i];
ans[1][m] = a[1] - sum1, ans[n][1] = b[1] - sum0, ans[n][m] = b[m] - ans[1][m];
}
vector <pair <int, int>> op;
bitset <MAXM> f[MAXN];
inline bool Solve(int p, int q)
{
int t = abs(n - m), sum = 0;
for (int i = 1; i <= m; i++) b[i] = -c[p][i], sum -= b[i];
op.clear(), a[p] = 0;
for (int i = 1; i <= n; i++)
{
if (i == p) continue;
int lx = b[q] - c[i][q], rx = b[q] + c[i][q];
bool fl = (lx <= 0), fr = (rx <= 0);
for (int j = 1; j <= m; j++)
fl &= (abs(lx - b[j]) == c[i][j]), fr &= (abs(rx - b[j]) == c[i][j]);
if (!fl && !fr) return 0;
if (!fr) a[i] = lx;
else if (!fl) a[i] = rx;
else a[i] = lx, op.emplace_back(rx - lx, i);
sum += a[i];
}
int tot = op.size();
f[0].reset(), f[0].set(0);
for (int i = 1; i <= tot; i++) f[i] = f[i - 1], f[i] |= (f[i - 1] << op[i - 1].first);
int x;
if (!t) x = -sum;
else
{
for (x = (-sum % t + t) % t; x < MAXM; x += t)
if (f[tot][x]) break;
if (x >= MAXM) x = -1;
}
if (x < 0 || !f[tot][x]) return 0;
for (int i = tot; i >= 1; i--)
if (!f[i - 1][x]) a[op[i].second] += op[i].first, x -= op[i].first;
if (n != m)
{
int sum0 = accumulate(a + 1, a + n + 1, 0), sum1 = accumulate(b + 1, b + m + 1, 0);
int tt = (sum0 - sum1) / (m - n);
for (int i = 1; i <= n; i++) a[i] += tt;
for (int i = 1; i <= m; i++) b[i] += tt;
}
return Trans(), 1;
}
int main()
{
// freopen("D.in", "r", stdin);
// freopen("D.out", "w", stdout);
#if DEBUG
#else
ios::sync_with_stdio(0), cin.tie(0);
#endif
Read(n), Read(m);
int p = -1, q = -1, mx = 0;
for (int i = 1; i <= n; i++)
for (int j = 1; j <= m; j++)
{
Read(c[i][j]);
if (mx < c[i][j]) mx = c[i][j], p = i, q = j;
}
if (Solve(p, q)) Print();
else Swap(), Solve(q, p), Print();
return 0;
}
详细
Subtask #1:
score: 8
Accepted
Test #1:
score: 8
Accepted
time: 1ms
memory: 10708kb
input:
1 1 0
output:
0
result:
ok correct
Test #2:
score: 8
Accepted
time: 2ms
memory: 10768kb
input:
1 1 0
output:
0
result:
ok correct
Test #3:
score: 8
Accepted
time: 0ms
memory: 10460kb
input:
1 2 1 1
output:
1 1
result:
ok correct
Test #4:
score: 8
Accepted
time: 2ms
memory: 11016kb
input:
3 1 0 3 1
output:
-1 2 -2
result:
ok correct
Test #5:
score: 8
Accepted
time: 1ms
memory: 10768kb
input:
2 2 1 1 1 1
output:
0 0 -1 -1
result:
ok correct
Test #6:
score: 8
Accepted
time: 1ms
memory: 10464kb
input:
3 3 2 1 1 2 1 1 0 1 3
output:
0 -1 -1 -2 0 0 2 0 -2
result:
ok correct
Test #7:
score: 8
Accepted
time: 1ms
memory: 10772kb
input:
3 3 0 1 0 2 1 2 1 2 1
output:
0 -1 -1 0 0 0 -2 0 -1
result:
ok correct
Test #8:
score: 8
Accepted
time: 1ms
memory: 12380kb
input:
3 3 0 0 2 2 2 0 0 0 2
output:
0 0 0 -2 0 0 2 0 -2
result:
ok correct
Test #9:
score: 8
Accepted
time: 0ms
memory: 12508kb
input:
3 3 3 1 2 3 1 2 3 1 2
output:
0 -4 1 -3 0 0 3 0 -6
result:
ok correct
Test #10:
score: 8
Accepted
time: 0ms
memory: 11068kb
input:
3 3 3 3 3 0 0 0 3 3 3
output:
0 -3 3 -3 0 0 0 0 -6
result:
ok correct
Subtask #2:
score: 0
Wrong Answer
Dependency #1:
100%
Accepted
Test #11:
score: 0
Wrong Answer
time: 0ms
memory: 12772kb
input:
1 6 1 0 3 1 3 0
output:
-1 0 3 -1 -3 0
result:
wrong answer Rowsum 1 and columnsum 2 did not correspond to C
Subtask #3:
score: 0
Runtime Error
Test #23:
score: 11
Accepted
time: 1ms
memory: 10812kb
input:
1 1 0
output:
0
result:
ok correct
Test #24:
score: 11
Accepted
time: 1ms
memory: 12604kb
input:
1 10 230 289 918 752 224 184 573 217 398 715
output:
270 211 -418 -252 276 316 -73 283 102 -215
result:
ok correct
Test #25:
score: 11
Accepted
time: 1ms
memory: 10516kb
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:
202 60 -13 174 275 464 -397 408 153 154 -419 130 472 -457 -93 168 -236 -460 154 -469 171 -393 120 -23 396 155 -360 49 210 -458 336 114 -8 -286 -105 -278 47 0 124 -170 414 217 -344 92 218 -41 21 -327 491 -58 27 249 316 -194 -420 -405 -500 -15 -346 -6 -241 97 -52 -369 463 -167 123 150 -211 196 -9 29 3...
result:
ok correct
Test #26:
score: 11
Accepted
time: 1ms
memory: 12344kb
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:
-184 -73 -32 -50 401 204 216 -171 -59 103 285 -477 101 40 -210 348 389 -466 -25 316 -113 -482 226 -305 -41 262 242 143 -384 -469 157 -200 445 -110 149 30 288 -342 -408 -411 -252 -93 243 104 157 -437 247 105 48 -218 -13 -254 -490 351 -353 -395 -283 171 480 -228 381 -102 485 298 25 451 -78 73 473 151 ...
result:
ok correct
Test #27:
score: 0
Runtime Error
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:
result:
Subtask #4:
score: 6
Accepted
Test #30:
score: 6
Accepted
time: 0ms
memory: 12592kb
input:
2 2 0 0 0 0
output:
0 0 0 0
result:
ok correct
Test #31:
score: 6
Accepted
time: 0ms
memory: 10744kb
input:
2 2 7 7 7 7
output:
0 0 -7 -7
result:
ok correct
Test #32:
score: 6
Accepted
time: 2ms
memory: 10708kb
input:
2 4 7 7 7 7 7 7 7 7
output:
0 0 0 7 0 0 0 -7
result:
ok correct
Test #33:
score: 6
Accepted
time: 0ms
memory: 16888kb
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:
0 -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 2744 -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...
result:
ok correct
Test #34:
score: 6
Accepted
time: 0ms
memory: 16524kb
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:
0 -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 343 -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...
result:
ok correct
Test #35:
score: 6
Accepted
time: 83ms
memory: 265436kb
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:
0 -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 -100...
result:
ok correct
Test #36:
score: 6
Accepted
time: 39ms
memory: 135256kb
input:
496 499 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 1...
output:
0 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -1976 -197...
result:
ok correct
Test #37:
score: 6
Accepted
time: 45ms
memory: 138076kb
input:
499 498 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 ...
output:
0 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 58149 5814...
result:
ok correct
Test #38:
score: 6
Accepted
time: 39ms
memory: 135984kb
input:
499 499 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 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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
output:
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 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 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 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 #39:
score: 6
Accepted
time: 3ms
memory: 59088kb
input:
177 1000 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 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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
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 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 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 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 #40:
score: 6
Accepted
time: 113ms
memory: 262968kb
input:
997 1000 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871 871...
output:
0 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -288301 -2...
result:
ok correct
Test #41:
score: 6
Accepted
time: 3ms
memory: 13356kb
input:
8 3 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7
output:
0 0 7 -7 0 0 7 0 0 7 0 0 7 0 0 -7 0 0 -7 0 0 0 0 -7
result:
ok correct
Test #42:
score: 6
Accepted
time: 3ms
memory: 13056kb
input:
3 8 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7
output:
0 -7 7 7 7 -7 -7 0 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 -7
result:
ok correct
Test #43:
score: 6
Accepted
time: 80ms
memory: 263700kb
input:
1000 3 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 9...
output:
0 0 937 -937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 937 0 0 93...
result:
ok correct
Test #44:
score: 6
Accepted
time: 44ms
memory: 264816kb
input:
7 1000 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 9...
output:
0 -937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 937 9...
result:
ok correct
Test #45:
score: 6
Accepted
time: 8ms
memory: 32704kb
input:
87 97 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:
0 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -8500 -850...
result:
ok correct
Subtask #5:
score: 15
Accepted
Test #46:
score: 15
Accepted
time: 0ms
memory: 10500kb
input:
2 4 253 431 207 483 243 65 289 13
output:
0 8 232 199 186 0 0 -243
result:
ok correct
Test #47:
score: 15
Accepted
time: 2ms
memory: 10464kb
input:
2 4 188 566 555 176 471 283 272 459
output:
0 329 318 -884 -425 0 0 471
result:
ok correct
Test #48:
score: 15
Accepted
time: 2ms
memory: 12500kb
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:
0 -181 394 56 -391 -152 -326 0 0 0 0 0 104 0 0 0 0 0 -103 0 0 0 0 0 12 0 0 0 0 488
result:
ok correct
Test #49:
score: 15
Accepted
time: 0ms
memory: 10528kb
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:
0 -389 -306 271 -396 436 135 151 0 0 0 0 0 0 249 0 0 0 0 0 0 -319 0 0 0 0 0 -25
result:
ok correct
Test #50:
score: 15
Accepted
time: 1ms
memory: 10580kb
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:
0 -399 -803 -868 -626 -195 -356 -314 -232 3793 -444 0 0 0 0 0 0 0 0 0 -719 0 0 0 0 0 0 0 0 0 -793 0 0 0 0 0 0 0 0 0 -803 0 0 0 0 0 0 0 0 0 -25 0 0 0 0 0 0 0 0 0 -396 0 0 0 0 0 0 0 0 0 -819 0 0 0 0 0 0 0 0 0 -323 0 0 0 0 0 0 0 0 0 3469 0 0 0 0 0 0 0 0 -3929
result:
ok correct
Test #51:
score: 15
Accepted
time: 1ms
memory: 10460kb
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:
0 -260 -564 -399 -231 -508 -454 -556 -837 2992 -784 0 0 0 0 0 0 0 0 0 -119 0 0 0 0 0 0 0 0 0 -318 0 0 0 0 0 0 0 0 0 -402 0 0 0 0 0 0 0 0 0 -435 0 0 0 0 0 0 0 0 0 -738 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -471 0 0 0 0 0 0 0 0 0 2826 0 0 0 0 0 0 0 0 -3616
result:
ok correct
Test #52:
score: 15
Accepted
time: 1ms
memory: 10512kb
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:
0 -306 -681 -555 -168 -504 -161 -276 -342 2993 -372 0 0 0 0 0 0 0 0 0 -19 0 0 0 0 0 0 0 0 0 -678 0 0 0 0 0 0 0 0 0 -768 0 0 0 0 0 0 0 0 0 -430 0 0 0 0 0 0 0 0 0 -150 0 0 0 0 0 0 0 0 0 -547 0 0 0 0 0 0 0 0 0 -719 0 0 0 0 0 0 0 0 0 3075 0 0 0 0 0 0 0 0 -3301
result:
ok correct
Test #53:
score: 15
Accepted
time: 1ms
memory: 10564kb
input:
2 4 1 2 3 4 5 6 7 8
output:
0 5 4 -2 6 0 0 5
result:
ok correct
Test #54:
score: 15
Accepted
time: 1ms
memory: 10464kb
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:
0 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 -1698 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 0 0 0 0 0 231 0 0 0 0 ...
result:
ok correct
Test #55:
score: 15
Accepted
time: 0ms
memory: 10568kb
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:
0 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 -17197 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 547 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: 15
Accepted
time: 2ms
memory: 12576kb
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:
0 293 -262 37 168 -319 56 -68 153 322 -767 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 -604 0 0 0 0 0 0 0 0 0 451
result:
ok correct
Test #57:
score: 15
Accepted
time: 1ms
memory: 10448kb
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:
0 -258 329 -345 626 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 807 0 0 0 -1024
result:
ok correct
Subtask #6:
score: 5
Accepted
Test #58:
score: 5
Accepted
time: 39ms
memory: 140872kb
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:
0 0 0 -1 0 -1 0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 -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 correct
Test #65:
score: 5
Accepted
time: 2ms
memory: 12480kb
input:
1 1 0
output:
0
result:
ok correct
Test #66:
score: 5
Accepted
time: 0ms
memory: 10528kb
input:
1 6 1 1 1 0 1 1
output:
0 0 0 1 0 0
result:
ok correct
Test #67:
score: 5
Accepted
time: 106ms
memory: 263820kb
input:
999 888 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 ...
output:
0 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ...
result:
ok correct
Subtask #7:
score: 0
Wrong Answer
Test #68:
score: 15
Accepted
time: 0ms
memory: 12440kb
input:
2 2 5 52 52 5
output:
0 0 -5 -52
result:
ok correct
Test #69:
score: 15
Accepted
time: 32ms
memory: 23660kb
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:
0 -558 -184 -156 -896 -490 -835 -387 -268 -87 -58 -788 -470 -281 -425 -712 -949 -804 -952 -965 -587 -10 -227 -787 -51 -577 -295 -187 -1000 -714 -571 -101 -122 -929 -504 -634 -887 -155 -343 -849 -596 -353 -339 -186 -649 -883 -375 -604 -300 -651 -250 -642 -824 -126 -106 -145 -531 -935 -756 -320 -843 -...
result:
ok correct
Test #70:
score: 15
Accepted
time: 35ms
memory: 23092kb
input:
1000 1000 26 347 442 93 41 633 378 574 17 254 45 40 505 163 309 257 90 394 74 555 350 496 602 5 228 40 317 266 78 175 172 417 290 129 633 6 601 530 24 500 522 201 391 82 557 123 248 614 204 249 165 58 567 458 340 142 180 544 61 39 498 633 551 273 167 225 469 88 131 4 221 218 470 520 59 209 276 365 1...
output:
0 -20 -809 -460 -408 -1000 -745 -941 -384 -113 -322 -407 -872 -204 -676 -624 -457 -761 -441 -922 -17 -863 -969 -362 -139 -407 -50 -101 -445 -192 -539 -784 -657 -496 -1000 -361 -968 -897 -391 -867 -889 -568 -758 -449 -924 -490 -119 -981 -571 -616 -532 -309 -934 -825 -27 -225 -187 -911 -306 -406 -865 ...
result:
ok correct
Test #71:
score: 15
Accepted
time: 101ms
memory: 262644kb
input:
1000 1000 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 17...
output:
0 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -177 -17...
result:
ok correct
Test #72:
score: 0
Wrong Answer
time: 113ms
memory: 263636kb
input:
1000 1000 487 913 486 475 461 478 487 472 890 856 897 885 484 453 923 892 470 454 491 480 485 476 475 496 881 462 943 455 912 868 486 482 900 494 911 918 451 470 942 459 459 468 451 472 453 937 457 886 876 450 470 492 475 487 462 949 909 469 456 456 456 460 424 462 925 487 476 451 920 926 934 497 44...
output:
0 -87 -514 -525 -539 -522 -513 -528 -110 -144 -103 -115 -516 -547 -77 -108 -530 -546 -509 -520 -515 -524 -525 -504 -119 -538 -57 -545 -88 -132 -514 -518 -100 -506 -89 -82 -549 -530 -58 -541 -541 -532 -549 -528 -547 -63 -543 -114 -124 -550 -530 -508 -525 -513 -538 -51 -91 -531 -544 -544 -544 -540 -57...
result:
wrong answer Rowsum 1 and columnsum 1000 did not correspond to C
Subtask #8:
score: 0
Skipped
Dependency #2:
0%
Subtask #9:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
0%