QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#555970 | #9240. Mosaic | A_programmer | 34 | 83ms | 27256kb | C++20 | 2.4kb | 2024-09-10 13:15:19 | 2024-09-10 13:15:21 |
Judging History
answer
#include "mosaic.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
const int maxn = 2e5 + 5;
const int N = 4e5 + 5;
int n, q, len;
bool rw[maxn][4], cl[maxn][4], arr[N];
int pr[maxn][4], pc[maxn][4], sum[N];
ll sum2[N];
ll calc(int l, int r) { return sum2[r] - sum2[l - 1] - 1ll * (l - 1) * (sum[r] - sum[l - 1]); }
vector<ll> mosaic(vi X, vi Y, vi T, vi B, vi L, vi R)
{
n = X.size(), q = T.size();
X.resize(n + 1), Y.resize(n + 1);
for (int i = n; i; i--) X[i] = X[i - 1]; X[0] = 0;
for (int i = n; i; i--) Y[i] = Y[i - 1]; Y[0] = 0;
if (n <= 2)
{
vector<ll> res; res.resize(q);
for (int Q = 0; Q < q; Q++)
{
int l = L[Q] + 1, r = R[Q] + 1, x = T[Q] + 1, y = B[Q] + 1; ll ans = 0;
for (int i = x; i <= y; i++)
for (int j = l; j <= r; j++)
if (i == 1 && j == 1) ans += X[1];
else if (i == 2 && j == 2) ans += (!X[2] && !Y[2]);
else ans += (i == 2 ? Y[2] : X[2]);
res[Q] = ans;
}
return res;
}
for (int i = 1; i <= n; i++) rw[i][1] = Y[i], cl[i][1] = X[i];
rw[1][2] = X[2], cl[1][2] = Y[2]; rw[1][3] = X[3], cl[1][3] = Y[3];
for (int j = 2; j <= 3; j++)
for (int i = 2; i <= n; i++) rw[i][j] = !rw[i - 1][j] && !rw[i][j - 1], cl[i][j] = !cl[i - 1][j] && !cl[i][j - 1];
for (int j = 1; j <= 3; j++)
for (int i = 1; i <= n; i++) pr[i][j] = pr[i - 1][j] + rw[i][j], pc[i][j] = pc[i - 1][j] + cl[i][j];
int len = 2 * n - 5;
for (int i = 1; i <= n - 2; i++) arr[i] = rw[n - i + 1][3];
for (int i = n - 1; i <= len; i++) arr[i] = cl[i - (n - 5)][3];
for (int i = 1; i <= len; i++) sum[i] = sum[i - 1] + arr[i], sum2[i] = sum2[i - 1] + (arr[i] ? i : 0);
vector<ll> res; res.resize(q);
for (int Q = 0; Q < q; Q++)
{
int l = L[Q] + 1, r = R[Q] + 1, x = T[Q] + 1, y = B[Q] + 1; ll ans = 0;
for (int i = x; i <= y && i <= 2; i++) ans += pc[r][i] - pc[l - 1][i];
if (y <= 2) { res[Q] = ans; continue; }
for (int i = l; i <= r && i <= 2; i++) ans += pr[y][i] - pr[max(2, x - 1)][i];
if (r <= 2) { res[Q] = ans; continue; }
l = max(l, 3), x = max(x, 3);
int p1 = l - y + n - 2, p2 = l - x + n - 2, p3 = r - y + n - 2, p4 = r - x + n - 2, dis = min(r - l, y - x);
if (p2 > p3) swap(p2, p3);
ans += 1ll * (sum[p3 - 1] - sum[p2]) * dis;
ans += calc(p1, p2) + 1ll * (dis + 1) * (sum[p4] - sum[p3 - 1]) - calc(p3, p4);
res[Q] = ans;
}
return res;
}
详细
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 1ms
memory: 4032kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 1 0 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 0 0 0 0 0 0 0 0 0 0
result:
ok
Test #2:
score: 5
Accepted
time: 0ms
memory: 3800kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 1 1 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 1 1 1 1 1 1 1 1 1 1
result:
ok
Test #3:
score: 5
Accepted
time: 1ms
memory: 3856kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 2 1 0 1 0 10 1 1 0 1 1 1 0 1 0 0 0 0 0 1 0 1 0 1 0 1 1 1 0 0 0 1 0 1 0 1 1 1 1 1 0 1 0 0 0 1
output:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 1 1 1 2 2 0 2 1 1 1
result:
ok
Test #4:
score: 5
Accepted
time: 1ms
memory: 3776kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 2 1 0 1 0 10 0 1 1 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 0 1 0 1 0 0 1 1 1 1 0 0 0 1 0 1 0 0 1 1 0 0
output:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 1 2 1 1 2 1 1 1 1 0
result:
ok
Test #5:
score: 5
Accepted
time: 0ms
memory: 3780kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 2 0 1 0 0 10 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 1 1 1 0 1 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1
output:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 0 1 0 0 0 0 1 1 1 1
result:
ok
Test #6:
score: 5
Accepted
time: 0ms
memory: 3860kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 2 1 1 1 0 10 0 0 0 1 0 0 0 1 1 1 0 1 0 1 0 1 0 1 0 0 0 1 1 1 1 1 0 1 0 0 1 1 0 1 0 0 0 1 0 0
output:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 2 2 0 2 1 1 0 1 1 1
result:
ok
Test #7:
score: 5
Accepted
time: 0ms
memory: 3780kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 2 0 0 0 1 10 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 0 1 1 0 0 0 1 0 1 0 0 1 1 0 1 1 1 0 1
output:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 0 1 1 1 0 0 0 1 1 1
result:
ok
Test #8:
score: 5
Accepted
time: 0ms
memory: 3732kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 2 1 0 1 1 10 0 1 0 0 1 1 0 1 0 0 0 1 1 1 1 1 1 1 0 0 0 1 1 1 0 1 0 0 0 0 1 1 1 1 0 1 0 1 0 1
output:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 2 1 1 0 1 0 2 0 1 2
result:
ok
Test #9:
score: 5
Accepted
time: 0ms
memory: 3800kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 2 0 1 0 1 10 0 1 0 1 0 1 0 1 1 1 1 1 0 1 0 1 0 0 1 1 0 1 0 1 0 1 1 1 0 0 0 0 0 1 0 0 0 1 0 1
output:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 2 2 0 2 1 2 1 0 1 2
result:
ok
Test #10:
score: 5
Accepted
time: 0ms
memory: 3776kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 2 1 1 1 1 10 0 0 0 1 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 1 1
output:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 2 2 2 3 1 3 3 1 3 0
result:
ok
Subtask #2:
score: 0
Wrong Answer
Dependency #1:
100%
Accepted
Test #11:
score: 0
Wrong Answer
time: 1ms
memory: 5848kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 199 0 0 1 0 0 1 0 0 0 1 0 0 1 1 1 0 1 0 1 1 1 1 0 1 0 1 1 1 0 0 1 1 0 1 1 0 0 1 1 0 1 0 1 1 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 1 1 1 0 1 1 0 0 1 0 1 1 1 1 1 1 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 1 1 0 0 0 1 1 1 0 0 1 1 1 0 1 1 1 0 1 0 1 0 1 0 1 1 0 1 0 1 0 0 0 0 1...
output:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 1055 5015 874 412 10311 1226 1700 4257 671 1822 30 408 674 5618 5245 606 1 7 181 378 3011 59 4022 43 1331 1177 75 1399 1044 4980 5492 2635 52 2495 1046 0 3648 1964 311 2740 402 1489 515 1578 731 5205 1895 1859 229 3481 1945 4315 903 1464 1928 1783 38 9781 1216 323...
result:
wrong answer 3rd lines differ - on the 1st token, expected: '1078', found: '1055'
Subtask #3:
score: 7
Accepted
Test #18:
score: 7
Accepted
time: 74ms
memory: 27064kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 199999 0 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 1 0 1 1 0 1 1 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 1 0 1 1 1 1 1 0 0 0 1 0 0 0 0 1 0 0 0 1 1 1 1 0 1 0 1 1 1 0 1 0 1 0 0 0 1 1 1 1 0 0 0 1 1 1 1 0 1 0 1 1 0 0 0 0 ...
output:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 1314 79312 13238 63518 27135 86532 21129 53105 14461 13920 65981 66950 13385 23885 37091 56646 69855 64947 74166 41759 50738 1366 65318 58452 24337 58380 29379 59258 39016 4990 60529 23351 60370 12835 25686 8151 17007 56172 10913 7224 30221 73673 55593 33643 44070...
result:
ok
Test #19:
score: 7
Accepted
time: 52ms
memory: 27140kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 199999 0 1 1 0 0 1 1 1 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 1 1 0 0 0 1 0 0 1 1 1 1 0 1 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 1 1 1 1 1 1 1 0 1 1 0 0 1 1 1 1 0 0 1 1 0 1 1 1 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 0 0 1 1 1 ...
output:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 97288 84412 98958 98546 95894 91536 99791 94852 96879 98784 94005 99030 95916 90829 96593 96545 90518 95251 93882 95122 94925 96009 98788 98866 95996 97263 95422 95733 96576 97730 98106 96939 94030 94576 94019 92982 96921 95715 96639 93579 97372 97983 95123 95211 ...
result:
ok
Test #20:
score: 7
Accepted
time: 73ms
memory: 27040kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 200000 1 0 0 1 0 0 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 1 1 0 1 0 1 0 0 1 0 1 0 1 0 1 1 0 0 0 0 0 0 1 1 0 1 1 1 1 1 0 0 1 0 1 1 0 0 1 0 1 1 1 1 0 1 0 1 1 0 1 1 1 0 0 0 1 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 1 1 0 1 1 0 0 1 0 ...
output:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 63186 59869 80378 71302 94439 63006 84372 99459 21243 54879 86436 65742 94261 35276 55849 93734 72881 49090 34951 93280 90257 58145 84070 58055 95069 56733 82475 51301 59357 39555 95572 87255 37523 68017 80309 52815 95469 29140 85700 46052 56013 71305 90947 7434 6...
result:
ok
Test #21:
score: 7
Accepted
time: 59ms
memory: 27120kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 200000 1 0 0 0 1 1 0 1 0 1 1 0 0 0 0 1 1 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 1 1 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 0 1 1 0 1 1 1 0 0 1 0 0 0 0 1 0 0 1 0 1 1 0 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 0 1 0 0 1 0 1 1 1 0 0 1 1 0 1 0 0 0 0 0 1 0 1 0 1 0 1 1 1 1 ...
output:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 99156 96398 98499 93058 98359 93547 93120 98997 99065 97926 99050 95046 96687 98137 97249 97530 96983 98126 89892 94397 98111 96471 95754 99320 97511 95029 96780 93937 97095 97566 97024 99338 97729 99722 97152 98216 95895 97942 98980 99845 96992 97397 99255 97894 ...
result:
ok
Test #22:
score: 7
Accepted
time: 51ms
memory: 21808kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 100000 0 0 1 1 0 1 1 0 0 0 0 1 1 0 0 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 1 1 0 1 1 1 1 1 0 1 0 1 0 1 0 0 1 0 1 1 0 1 0 1 0 0 0 1 1 0 0 1 0 0 1 0 0 1 1 0 0 0 0 1 1 1 0 1 1 1 0 1 1 1 0 1 0 0 0 1 0 1 1 0 1 0 1 1 1 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 1 1 0 1 1 1 0 1 0 1 1 1 0 1 1 0 ...
output:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 34862 31357 15637 16893 7670 123 17919 20936 7467 18723 34082 1835 18668 23866 630 26206 40304 6217 25617 18490 11507 39163 5570 16345 4695 30449 15992 13307 5315 5393 8864 29876 34139 3227 28910 11628 2250 38538 12586 299 1066 8238 40627 7418 7600 3123 18111 9012...
result:
ok
Subtask #4:
score: 0
Skipped
Dependency #2:
0%
Subtask #5:
score: 0
Wrong Answer
Test #31:
score: 0
Wrong Answer
time: 38ms
memory: 13112kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200000 1 7 0 4 3 4 3 4 3 6 2 5 4 5 6 7 5 7 2 8 0 6 4 7 0 5 6 7 1 3 9 9 6 9 1 7 2 9 4 6 4 4 6 7 0 1 8 8 7 7 0 3 0 4 1 7 2 2 0 9 3 9 4 6 3 9 0 9 1 8 4 6 4 5 5 7 0 6 2 3 2 3 0 6 1 9 8 8 2 4 3 4 3 6 2 9 3 9 2 7 1 3 0 3 0 8 2 4 3...
output:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 11 2 6 2 7 10 4 2 12 8 1 0 1 12 1 7 28 9 2 4 4 0 2 12 18 5 9 5 4 8 9 0 6 2 4 12 4 3 5 6 13 21 1 3 8 6 12 2 0 9 3 5 19 0 0 3 4 0 1 1 1 0 5 3 16 29 8 1 4 5 2 9 8 4 3 3 8 5 0 13 7 11 5 1 2 6 18 1 2 2 3 12 18 11 7 1 2 1 1 13 17 4 1 5 1 13 13 6 33 5 4 4 6 7 10 2 5 3 19...
result:
wrong answer 3rd lines differ - on the 1st token, expected: '14', found: '11'
Subtask #6:
score: 22
Accepted
Test #42:
score: 22
Accepted
time: 82ms
memory: 26972kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 199999 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 1 0 0 1 1 1 1 1 0 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1 1 1 0 0 1 1 1 1 0 1 0 0 0 0 0 1 1 1 0 1 1 0 1 1 0 0 1 1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 0 0 0 0 0 0 0 1 1 1 1 1 0 1 1 1 1 1 0 0 0 0 0 0 0 1 0 0 1 1 0 1 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 1 1 1 0 1 0 0 0 1 0 1 0 ...
result:
ok
Subtask #7:
score: 0
Wrong Answer
Dependency #3:
100%
Accepted
Dependency #6:
100%
Accepted
Test #49:
score: 0
Wrong Answer
time: 79ms
memory: 27144kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 199999 0 1 0 0 1 0 1 0 0 0 0 0 0 1 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 1 1 1 0 0 1 0 0 1 1 0 0 1 0 0 0 1 1 1 0 1 1 1 0 1 1 0 1 0 0 1 1 1 1 1 1 0 1 0 1 1 1 0 1 1 0 1 1 1 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 1 1 0 0 0 1 0 1 1 0 0 1 0 0 ...
output:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 1 0 0 1 1 1 1 1 0 1 1 1 0 1 0 1 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1 0 1 0 0 1 0 1 1 1 1 1 0 0 1 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 0 0 0 0 1 1 1 0 0 0 1 1 0 1 1 0 1 0 0 0 1 0 1 0 1 1 1 0 1 1 1 0 0 0 0 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 0 0 1 1 0 1 1 0 1 1 1 0 1 1 0 0 0 1 1 0 1 0 ...
result:
wrong answer 3rd lines differ - on the 1st token, expected: '18642', found: '1'
Subtask #8:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
0%