QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#563195 | #9240. Mosaic | ModyKachef | 8 | 68ms | 14488kb | C++23 | 1.4kb | 2024-09-14 04:48:54 | 2024-09-14 04:48:54 |
Judging History
answer
#include "mosaic.h"
#include <bits/stdc++.h>
using namespace std;
#define int long long
#include <vector>
int solve(int x1 , int x2 , int y1 , int y2){
if (x1 == 0) x1++;
if (y1 == 0) y1++;
if (x1 > x2 || y1 > y2) return 0;
int h = x2 - x1 + 1 , w = y2 - y1 + 1;
//cout << h << ' ' << w << ' ' ;
int ans = 0;
if (h % 2 == 0 && w % 2 == 0) ans = (h * w) / 2;
else if (h % 2 == 0) ans = (h/2 * w);
else if (w % 2 == 0) ans = (w/2 * h);
else ans = (((h-1)/2 * w) + (w + (x1%2 == y1%2))/2);
//cout << ans << ' ';
//cout << '\n';
return ans;
}
std::vector<long long> mosaic(std::vector<signed> X, std::vector<signed> Y, std::vector<signed> T, std::vector<signed> B , std::vector<signed> L, std::vector<signed> R) {
int Q = T.size() , N = X.size();
vector<int> ans(Q);
// int a[N][N] = {};
// for (int j = 0 ; j < N ; j++){
// a[0][j] = X[j];
// }
// for (int i = 0 ; i < N ; i++){
// a[i][0] = Y[i];
// }
// for (int i = 1 ; i < N ; i++){
// for (int j = 1 ; j < N ; j++){
// a[i][j] = (!a[i-1][j] && !a[i][j-1]);
// }
// }
// for (int i = 0 ; i < N ; i++){
// for (int j = 0 ; j < N ; j++){
// cout << a[i][j];
// }
// cout << '\n';
// }
for (int i = 0 ; i < Q ; i++){
ans[i] = solve(T[i] , B[i] , L[i] , R[i]);
}
return ans;
}
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 5
Accepted
time: 0ms
memory: 3888kb
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: 0
Wrong Answer
time: 0ms
memory: 3824kb
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 0 0 0 0 0 0 0 0 0 0
result:
wrong answer 3rd lines differ - on the 1st token, expected: '1', found: '0'
Subtask #2:
score: 0
Skipped
Dependency #1:
0%
Subtask #3:
score: 0
Wrong Answer
Test #18:
score: 0
Wrong Answer
time: 57ms
memory: 14292kb
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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
wrong answer 3rd lines differ - on the 1st token, expected: '1314', found: '0'
Subtask #4:
score: 0
Skipped
Dependency #2:
0%
Subtask #5:
score: 8
Accepted
Test #31:
score: 8
Accepted
time: 35ms
memory: 11112kb
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 14 2 8 2 10 12 5 2 14 12 1 0 2 14 4 10 32 12 3 6 6 4 3 16 21 5 12 6 7 11 12 3 7 3 6 15 6 4 6 8 15 24 2 5 11 8 16 3 4 12 4 9 23 1 2 5 6 4 1 4 4 3 6 4 18 32 10 2 7 7 5 12 11 7 4 4 10 6 4 16 8 13 8 3 3 8 21 1 2 3 6 14 21 14 9 2 3 2 4 16 20 7 3 5 3 15 16 8 36 7 6 7 9 ...
result:
ok
Test #32:
score: 8
Accepted
time: 68ms
memory: 14284kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 199999 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 8120124544 2752273618 652362120 3572900496 7229702005 8480641653 6918084280 1267958106 904477638 1997350413 7012230475 1362860576 163899948 797037988 656632144 5591112615 3071773904 8768430125 4850111320 8165741606 1554651170 1797902728 374751575 9903806946 519998...
result:
ok
Test #33:
score: 8
Accepted
time: 65ms
memory: 14192kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 200000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 3570040188 3318070798 8631503328 6373540329 560572082 812170996 10132940228 7734369045 4291788438 3990792526 1508274527 7435250506 2410810420 3929002587 42412734 6175343964 6651965200 2985906307 6315888787 2227135547 1138686010 1352599425 9555034480 3719516836 628...
result:
ok
Test #34:
score: 8
Accepted
time: 68ms
memory: 14488kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 200000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 8939395244 5011877325 5286271590 3547238661 1654885646 6828788960 7469464650 9466465932 2748117410 4821162993 4386747068 4915799951 6338256240 7006606360 926836202 4330330051 10546142155 1947719980 7361580008 8746762352 5915138727 3714331376 5484402315 994826472 3...
result:
ok
Test #35:
score: 8
Accepted
time: 51ms
memory: 14488kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 200000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 17867548576 18831450652 18568769765 18418076073 18083693541 18642130474 19355431583 19687992009 19238003647 17914499413 19139947528 17637142200 18884367608 18644294448 17842030367 18917685664 19248869678 19036530786 19767756709 17491804815 18904101040 19707370743 ...
result:
ok
Test #36:
score: 8
Accepted
time: 54ms
memory: 14204kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 200000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 54437 85099 9025 478 80531 40258 44834 52441 16506 17580 4212 21659 15640 60835 54010 13898 19813 62442 60518 48299 30311 33628 14703 81460 47178 77318 79090 65157 29874 20280 1180 32387 46550 10247 1394 53896 32646 18652 20801 60481 26878 22939 43360 12518 79936 ...
result:
ok
Test #37:
score: 8
Accepted
time: 52ms
memory: 14288kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 200000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 56771 25325 7855 21931 24973 59779 33690 25827 2776 20450 35766 9160 11668 19064 11173 18942 12789 21937 21038 34391 7307 41750 38340 1093 46005 8066 64096 10836 68912 80515 66710 36919 19763 48176 26284 57483 32392 2767 44232 26264 21828 6813 4790 9045 3159 59984...
result:
ok
Test #38:
score: 8
Accepted
time: 56ms
memory: 14408kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 200000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 0 0 1 0 0 1 1 1 0 1 1 1 0 0 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 0 0 1 0 0 0 0 0 1 1 0 1 0 1 1 1 0 0 0 0 0 0 1 1 0 0 1 1 1 1 0 1 0 0 0 1 0 1 0 1 0 0 0 1 1 1 1 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 ...
result:
ok
Test #39:
score: 8
Accepted
time: 61ms
memory: 12904kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 98765 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 195956880 1830794238 1889160424 1032014556 478191700 450315684 1043245247 954601965 68607854 603979719 1490902898 349128672 205584813 116639600 11407164 1901396104 120888461 405500 899118801 174394653 330868120 9886483 2821124 3339594272 1134585185 1258395206 1355...
result:
ok
Test #40:
score: 8
Accepted
time: 55ms
memory: 12620kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 98766 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 6440 2345 4590 20700 10149 11283 8424 30492 6389 780 497 18532 12369 7957 3170 22342 1661 16938 12367 17157 6023 15490 4532 36620 2828 36537 17 13999 34684 5578 2607 30996 37713 14449 35052 5018 25651 920 33278 1828 670 1869 31741 3808 15194 16928 24243 20543 4674...
result:
ok
Test #41:
score: 8
Accepted
time: 55ms
memory: 12904kb
input:
njJ9Z7VxxKGR6SUcJMgdzy3qMz4JZ1Tq 98767 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 6498 40272 36086 28355 8581 10712 1320 892 44484 30974 18413 4468 7242 6865 34674 10610 30880 25271 15473 32318 2661 4696 40933 184 30368 859 17757 9642 7022 8828 8238 43635 4288 45250 18534 45379 38408 3516 30831 23813 5954 39034 4063 27599 7650 11519 9806 24529 ...
result:
ok
Subtask #6:
score: 0
Wrong Answer
Test #42:
score: 0
Wrong Answer
time: 50ms
memory: 14368kb
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 0 0 0 0 1 0 1 ...
output:
Wm5rkGNobnYjFI7TIY17RAm6FAQ2LlO9 OK 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 1 1 1 1 0 0 1 1 0 0 0 0 0 1 1 1 1 1 1 0 0 1 0 1 1 0 1 0 1 1 0 1 0 0 1 1 1 0 0 0 1 1 0 0 1 1 1 0 0 1 1 1 0 1 1 0 1 1 0 1 0 0 1 1 1 1 1 0 1 1 0 1 1 1 0 1 0 0 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 0 0 0 0 0 0 1 0 0 1 1 1 0 1 1 0 1 1 1 ...
result:
wrong answer 4th lines differ - on the 1st token, expected: '1', found: '0'
Subtask #7:
score: 0
Skipped
Dependency #3:
0%
Subtask #8:
score: 0
Skipped
Dependency #1:
0%