QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#134334 | #2672. Rectangles | pandapythoner# | 18 | 4592ms | 4208kb | C++20 | 4.8kb | 2023-08-03 17:21:00 | 2024-07-04 01:13:43 |
Judging History
answer
#ifdef LOCAL
#define _GLIBCXX_DEBUG
#else
#endif
#include <bits/stdc++.h>
#include "rect.h"
using namespace std;
#define ll long long
#define flt double
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
mt19937 rnd(234);
const ll inf = 1e18;
int n, m;
vector<vector<int>> a;
vector<vector<vector<int>>> gor, god, gor_dpth, god_dpth;
void build_go(vector<int> &f, vector<vector<int>> &go) {
int n = f.size();
go.assign(n, vector<int>());
vector<pair<int, int>> stck;
stck.reserve(n);
for (int i = 0; i < n; i += 1) {
while (!stck.empty() && stck.back().first < f[i]) {
stck.pop_back();
}
if (!stck.empty() && stck.back().second != i - 1) {
go[stck.back().second].push_back(i);
}
stck.push_back(make_pair(f[i], i));
}
stck.clear();
for (int i = n - 1; i >= 0; i -= 1) {
while (!stck.empty() && stck.back().first < f[i]) {
stck.pop_back();
}
if (!stck.empty() && stck.back().second != i + 1) {
go[i].push_back(stck.back().second);
}
stck.push_back(make_pair(f[i], i));
}
}
void build_gor_god() {
gor.assign(n, vector<vector<int>>(m));
for (int i = 0; i < n; i += 1) {
vector<int> f(m);
for (int j = 0; j < m; j += 1) {
f[j] = a[i][j];
}
vector<vector<int>> go;
build_go(f, go);
for (int j = 0; j < m; j += 1) {
gor[i][j] = go[j];
}
}
god.assign(n, vector<vector<int>>(m));
for (int j = 0; j < m; j += 1) {
vector<int> f(n);
for (int i = 0; i < n; i += 1) {
f[i] = a[i][j];
}
vector<vector<int>> go;
build_go(f, go);
for (int i = 0; i < n; i += 1) {
god[i][j] = go[i];
}
}
}
void build_dpths() {
gor_dpth.assign(n, vector<vector<int>>(m));
for (int j = 0; j < m; j += 1) {
vector<int> lst_usd(m, n + 5);
vector<int> lst_dpth(m, 0);
for (int i = n - 1; i >= 0; i -= 1) {
gor_dpth[i][j].resize(gor[i][j].size());
for (int k = 0; k < (int)gor[i][j].size(); k += 1) {
int x = gor[i][j][k];
if (lst_usd[x] == i + 1) {
lst_dpth[x] += 1;
} else {
lst_dpth[x] = 1;
}
lst_usd[x] = i;
gor_dpth[i][j][k] = lst_dpth[x];
}
}
}
god_dpth.assign(n, vector<vector<int>>(m));
for (int i = 0; i < n; i += 1) {
vector<int> lst_usd(n, m + 5);
vector<int> lst_dpth(n, 0);
for (int j = m - 1; j >= 0; j -= 1) {
god_dpth[i][j].resize(god[i][j].size());
for (int k = 0; k < (int)god[i][j].size(); k += 1) {
int x = god[i][j][k];
if (lst_usd[x] == j + 1) {
lst_dpth[x] += 1;
} else {
lst_dpth[x] = 1;
}
lst_usd[x] = j;
god_dpth[i][j][k] = lst_dpth[x];
}
}
}
}
ll solve_fuck() {
build_gor_god();
build_dpths();
ll rs = 0;
for (int i = 1; i < n - 1; i += 1) {
for (int j = 1; j < m - 1; j += 1) {
for (int x = 0; x < (int)gor[i][j - 1].size(); x += 1) {
int j1 = gor[i][j - 1][x];
int dpthx = gor_dpth[i][j - 1][x];
for (int y = 0; y < (int)god[i - 1][j].size(); y += 1) {
int i1 = god[i - 1][j][y];
int dpthy = god_dpth[i - 1][j][y];
if ((j1 - j) <= dpthy && (i1 - i) <= dpthx) {
rs += 1;
}
}
}
}
}
return rs;
}
ll solve_slow() {
ll rs = 0;
for (int i1 = 0; i1 < n; i1 += 1) {
for (int i2 = i1 + 2; i2 < n; i2 += 1) {
for (int j1 = 0; j1 < m; j1 += 1) {
for (int j2 = j1 + 2; j2 < m; j2 += 1) {
int ok = true;
for (int i = i1 + 1; i < i2; i += 1) {
for (int j = j1 + 1; j < j2; j += 1) {
if (a[i][j] >= min(a[i1][j], a[i2][j]) || a[i][j] >= min(a[i][j1], a[i][j2])) {
ok = false;
}
}
}
rs += ok;
}
}
}
}
return rs;
}
long long count_rectangles(vector<vector<int>> _a) {
a = _a;
n = (int)a.size();
m = (int)a[0].size();
if (n <= 2 || m <= 2) {
return 0;
}
ll rs = solve_slow();
return rs;
}
详细
Subtask #1:
score: 8
Accepted
Test #1:
score: 8
Accepted
time: 14ms
memory: 4020kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 30 30 3996 3689 3664 3657 3646 3630 3621 3619 3609 3604 3601 3598 3584 3581 3574 3561 3554 3543 3537 3531 3522 3519 3505 3500 3498 3492 3476 3467 3460 3994 3993 3458 3451 3440 3431 3420 3395 3346 3333 3282 3268 3261 3241 3204 3168 3121 3103 3083 3076 2923 2872 28...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 784
result:
ok 3 lines
Test #2:
score: 0
Accepted
time: 14ms
memory: 3860kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 30 30 6996495 6421812 6403903 6382663 6362922 6334993 6329757 6315983 6278578 6262778 6254104 6244987 6232172 6226987 6194797 6176457 6167900 6140865 6123884 6116295 6101556 6079188 6068604 6049308 6034911 6034041 6015464 6004614 5992300 6995512 6987555 5978527 5...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 784
result:
ok 3 lines
Test #3:
score: 0
Accepted
time: 14ms
memory: 4116kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 30 30 12330 11301 11283 11257 11240 11194 11170 11135 11116 11095 11085 11048 11000 10972 10914 10909 10897 10877 10835 10823 10789 10781 10769 10745 10708 10690 10665 10661 10645 12329 12326 10635 10633 10590 10557 10542 10513 10491 10418 10406 10096 10086 9930 ...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 784
result:
ok 3 lines
Test #4:
score: 0
Accepted
time: 13ms
memory: 3756kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 30 30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 0
result:
ok 3 lines
Test #5:
score: 0
Accepted
time: 64ms
memory: 4124kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 30 30 1023589 2780022 3479561 3782160 3952727 450470 3945264 2170843 3225056 1786041 1389306 1419234 3915988 520009 1251948 104723 1856504 3637799 1807024 2170722 2803041 2964655 2003819 1048641 3939016 2826494 3085605 1000286 3022731 1498648 3779781 3073573 7294...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 268
result:
ok 3 lines
Test #6:
score: 0
Accepted
time: 6ms
memory: 3756kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 30 13 2314857 2951714 2551799 1262649 877317 2582030 1583139 3582015 1970170 2496877 252584 1959948 809239 1363336 486953 3562759 2227001 1996347 1994014 2317663 3232136 648728 2110306 2235717 2759784 2530855 258050 2824581 1243255 3198783 565865 231889 3727287 8...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 112
result:
ok 3 lines
Test #7:
score: 0
Accepted
time: 4ms
memory: 3764kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 12 30 1713490 434279 757758 2071347 3203350 423584 3882119 3134239 1954599 1689833 1956535 3906809 3531554 3887373 3954136 2363040 3764367 1582213 271999 3004358 1532278 1181001 435806 2138704 2615171 1339870 717957 1485488 3841400 1190729 2110431 3716435 2650629...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 87
result:
ok 3 lines
Test #8:
score: 0
Accepted
time: 59ms
memory: 3820kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 30 30 9 2 6 6 9 5 7 6 4 4 4 4 0 1 7 3 8 0 6 4 8 1 5 2 2 9 9 9 9 8 5 4 0 7 2 3 7 8 4 10 0 9 3 8 5 1 3 9 6 2 4 2 5 2 7 5 10 6 9 5 10 9 7 9 3 3 8 1 3 3 8 10 0 6 1 1 7 8 10 0 8 1 4 5 9 4 2 9 5 0 3 10 10 0 4 5 1 2 6 10 2 8 8 9 10 2 2 8 2 3 3 10 0 2 7 0 7 9 10 6 3 3 4 ...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 189
result:
ok 3 lines
Test #9:
score: 0
Accepted
time: 60ms
memory: 3852kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 30 30 89 58 32 43 76 79 48 2 31 26 51 12 17 19 93 0 37 54 100 76 73 46 38 46 34 47 99 97 42 20 55 14 72 28 25 79 37 28 30 13 42 94 45 29 90 92 5 5 100 46 65 26 57 75 68 49 99 97 34 41 86 3 38 4 33 40 49 35 13 62 62 36 92 84 7 24 0 51 100 89 57 77 63 12 39 37 99 9...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 235
result:
ok 3 lines
Test #10:
score: 0
Accepted
time: 64ms
memory: 3744kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 30 30 1915 533 904 1917 459 602 1419 963 1587 1715 886 1351 1406 1775 1170 909 543 289 616 717 623 531 1022 1245 390 1654 23 693 539 1488 1875 743 1220 224 459 1300 755 1009 195 228 1988 103 1312 1601 1314 482 621 1919 107 1637 1477 1852 482 1402 564 986 1085 326...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 251
result:
ok 3 lines
Test #11:
score: 0
Accepted
time: 58ms
memory: 3796kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 30 30 1791839 3171005 126890 3999980 1870566 19865 2616736 3287382 281079 3380697 2820606 938251 3689860 2904336 50801 2365719 280362 2693770 3999972 3571330 249259 256875 3812828 408564 2317613 3654534 2735648 3307878 3264923 2800617 3855911 2226794 1132955 3999...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 245
result:
ok 3 lines
Test #12:
score: 0
Accepted
time: 0ms
memory: 4108kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 1 1 1
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 0
result:
ok 3 lines
Test #13:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 1 5 0 0 0 1 0
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 0
result:
ok 3 lines
Test #14:
score: 0
Accepted
time: 33ms
memory: 3768kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 30 30 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 1 1 0 0 0 0 1 0 0 0 1 1 0 1 0 0 0 0 1 0 0 1 1 1 1 0 0 1 0 0 0 0 1 0 0 1 0 0 1 0 1 1 0 1 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1 1 0 1 1 1 1 1 1 0 1 1 1 0 0 1 0 1 0 1 0 0 0 0 0 0 1 1 0 1 0 0 1 0 0 1...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 22
result:
ok 3 lines
Test #15:
score: 0
Accepted
time: 2ms
memory: 3700kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 30 15 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 0
result:
ok 3 lines
Test #16:
score: 0
Accepted
time: 0ms
memory: 3980kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 10 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 0
result:
ok 3 lines
Test #17:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 1 1 390
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 0
result:
ok 3 lines
Test #18:
score: 0
Accepted
time: 0ms
memory: 3812kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 10 2 789 869 38 634 720 283 421 663 85 217 520 923 1198 1014 434 437 481 346 989 1128
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 0
result:
ok 3 lines
Test #19:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 10 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 0
result:
ok 3 lines
Test #20:
score: 0
Accepted
time: 0ms
memory: 3740kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 3 3 1117 259 944 753 34 626 408 210 361
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 1
result:
ok 3 lines
Subtask #2:
score: 0
Time Limit Exceeded
Dependency #1:
100%
Accepted
Test #21:
score: 7
Accepted
time: 4592ms
memory: 4208kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 80 80 6399 6239 6237 6235 6233 6231 6229 6227 6225 6223 6221 6219 6217 6215 6213 6211 6209 6207 6205 6203 6201 6199 6197 6195 6193 6191 6189 6187 6185 6183 6181 6179 6177 6175 6173 6171 6169 6167 6165 6163 6161 6159 6157 6155 6153 6151 6149 6147 6145 6143 6141 61...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 6084
result:
ok 3 lines
Test #22:
score: 0
Accepted
time: 4542ms
memory: 3868kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 80 80 6995869 6823979 6821148 6815756 6815207 6814302 6813354 6810306 6802453 6801971 6800699 6796988 6793939 6789808 6789656 6789173 6787038 6783779 6781873 6780805 6777577 6775172 6773879 6771815 6771457 6770529 6769434 6768871 6765682 6762327 6761788 6760221 6...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 6084
result:
ok 3 lines
Test #23:
score: 0
Accepted
time: 4536ms
memory: 3856kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 80 80 45666 44500 44487 44478 44472 44457 44437 44427 44425 44417 44389 44376 44363 44349 44343 44330 44327 44316 44311 44275 44263 44250 44236 44217 44207 44202 44198 44187 44176 44171 44164 44152 44139 44132 44121 44118 44114 44106 44098 44080 44062 44035 44031...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 6084
result:
ok 3 lines
Test #24:
score: -7
Time Limit Exceeded
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 80 80 2 0 0 1 2 0 2 2 0 2 2 1 0 1 2 0 1 2 0 1 2 2 1 0 0 1 1 0 2 2 0 1 1 0 2 0 1 2 2 0 1 2 1 1 0 0 0 0 2 1 1 1 2 1 0 2 1 2 0 0 2 2 0 1 0 2 0 0 0 0 2 0 1 1 0 2 2 2 0 1 0 2 1 2 2 2 0 0 2 1 0 1 0 1 1 1 0 1 2 1 0 0 2 0 0 1 2 2 2 2 1 1 2 2 2 2 2 0 1 2 0 2 0 1 2 2 0 2 1...
output:
Unauthorized output
result:
Subtask #3:
score: 0
Skipped
Dependency #2:
0%
Subtask #4:
score: 0
Skipped
Dependency #3:
0%
Subtask #5:
score: 10
Accepted
Test #53:
score: 10
Accepted
time: 2559ms
memory: 4140kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 3 2500 3999533 3994407 3992243 3991052 3990430 3988819 3987546 3985557 3983808 3983398 3982565 3981632 3981437 3979888 3979428 3978697 3978033 3975044 3973166 3972565 3971499 3970538 3969576 3969014 3968513 3968337 3966950 3965168 3964140 3963957 3962080 3961829 ...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 2498
result:
ok 3 lines
Test #54:
score: 0
Accepted
time: 1582ms
memory: 4148kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 3 2123 3999178 3994918 3993586 3990671 3989261 3988091 3985537 3984649 3983635 3982639 3981319 3980647 3979462 3978557 3977387 3976784 3975890 3975694 3975367 3975193 3973331 3971593 3970332 3969892 3968052 3967213 3966031 3963229 3963001 3962625 3961725 3959892 ...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 2121
result:
ok 3 lines
Test #55:
score: 0
Accepted
time: 1533ms
memory: 4128kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 3 2500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 0
result:
ok 3 lines
Test #56:
score: 0
Accepted
time: 0ms
memory: 4036kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 3 1 2 0 3
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 0
result:
ok 3 lines
Test #57:
score: 0
Accepted
time: 2126ms
memory: 4140kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 3 2500 3073920 3547280 2578996 515881 1457637 3747191 3335718 1093356 188596 2501359 1707005 923685 1254329 1274578 2451887 1948214 3495100 706306 2036295 3924470 2870740 2253399 2559834 2223853 3524040 448754 2838433 2573451 1627516 2712253 1015735 1941089 29861...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 688
result:
ok 3 lines
Test #58:
score: 0
Accepted
time: 2119ms
memory: 3876kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 3 2500 956507 3801894 3199483 6585310 812126 2818592 2669408 5464237 4252596 1952833 4693677 3365605 4499904 3386900 1960432 4511461 1338880 1430060 3156994 1847807 4802896 5992027 1936374 4766951 4759230 1548846 5592000 759863 3462998 1783861 3893700 6928854 230...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 673
result:
ok 3 lines
Test #59:
score: 0
Accepted
time: 2095ms
memory: 3884kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 3 2500 3899265 2127060 3179336 385518 1777334 2221597 3486817 3371389 1125733 5183809 1203885 1131986 4091262 2101525 4748156 5376347 3256434 4789253 5407807 4461288 2494895 5504801 1781825 190092 1642923 521237 3800202 3385087 3828441 866970 3681590 2845515 1332...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 629
result:
ok 3 lines
Test #60:
score: 0
Accepted
time: 2054ms
memory: 4120kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 3 2500 6827 6690 2935 1032 6925 397 4509 8004 5927 6743 4358 7902 7239 2939 3693 2834 6940 9870 6120 3250 4561 8813 6907 7907 8918 3466 1111 8172 6164 9779 9145 3560 3853 374 8950 6716 4712 8587 6446 1731 9977 8936 5617 8149 4600 4532 5069 3980 9322 4496 6908 962...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 608
result:
ok 3 lines
Test #61:
score: 0
Accepted
time: 2047ms
memory: 3948kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 3 2500 2237965 687445 2621922 3980698 3999973 3999983 2453251 2559651 3489050 2633538 3497108 1214996 2020667 2462216 3555293 2124809 3999991 1864244 19304 1786392 1858083 3169698 3261730 2667102 224139 3999993 240880 1399521 3999964 1558547 1172796 912200 133841...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 569
result:
ok 3 lines
Test #62:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 1 2500 3699216 130643 5033835 3805008 5074061 2048959 419051 5514783 5194748 2315570 3718514 1399587 4434175 444483 4700750 6507677 5711722 5828756 6567765 1582528 448735 810518 2747305 1045101 5026202 6216297 5563213 242266 6659948 1973694 4883635 756283 3822988...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 0
result:
ok 3 lines
Test #63:
score: 0
Accepted
time: 0ms
memory: 3916kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 2 2500 780862 477136 161842 568524 652912 264613 415417 59634 436067 1067956 882087 158951 80968 69382 754204 150303 548432 610319 731231 84272 583452 143105 699314 491045 617561 970063 670786 557308 134628 865642 331432 233825 742850 81239 198370 575889 302003 7...
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 0
result:
ok 3 lines
Subtask #6:
score: 0
Time Limit Exceeded
Test #64:
score: 13
Accepted
time: 0ms
memory: 3820kb
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 10 10 1 1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 1 1 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0 1 0 0 0 1 1 1 0 1 1 0 0 1 1 0 1 0 0 1 0 0 0 1 1 0 0 1 0 1 1 1 1 1 1 1 0 1 0 0 0 1 1 1 1 0 0 1 0 0 1 1 0 1 0 1 1 0 0 0 0 0 1 0 1 1 0
output:
907404fa-efbb-4a2c-83b8-4c377409c80c OK 2
result:
ok 3 lines
Test #65:
score: -13
Time Limit Exceeded
input:
8d9a74d5-4c4b-4437-9c49-114beaeb8f1a 1234 2321 0 0 0 1 0 0 0 1 0 0 0 1 1 1 0 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 0 0 0 1 0 0 1 1 0 1 1 1 1 1 0 0 1 1 1 1 0 1 1 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 0 0 1 0 0 0 1 0 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 1 1...
output:
Unauthorized output
result:
Subtask #7:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
0%