QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#511497 | #2674. Vision program | kimmoqt | 0 | 236ms | 5244kb | C++20 | 1010b | 2024-08-09 23:12:58 | 2024-08-09 23:12:58 |
Judging History
answer
#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
void construct_network(int H, int W, int K) {
vector<vector<array<int,3>>> S;
S.push_back({});
for(int i=0;i<H;i++) {
for(int j=0;j<W;j++) {
S.back().push_back({i+j,i,j});
}
}
int k=K;
while(k%2==0) {
vector<vector<array<int,3>>> nS;
for(auto v:S) {
vector<array<int,3>> P,Q;
for(int i=0;i<v.size();i++) {
if(v[i][0]&1) P.push_back({v[i][0]/2,v[i][1],v[i][2]});
else Q.push_back({v[i][0]/2,v[i][1],v[i][2]});
}
nS.push_back(P);
nS.push_back(Q);
}
swap(S,nS);
k/=2;
}
vector<int> cands;
for(auto v:S) {
for(int i=0;i<v.size();i+=2) {
vector<int> qry;
for(int j=0;j<v.size();j++) {
if(i==j) continue;
int d=abs(v[i][1]-v[j][1])+abs(v[i][2]-v[j][2]);
if(d==K) {
qry.push_back(v[j][1]*W+v[j][2]);
}
}
int t0=add_xor(qry);
cands.push_back(add_and({t0,v[i][1]*W+v[i][2]}));
}
}
int ans0=add_or(cands);
}
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 10
Accepted
time: 0ms
memory: 3780kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 3 1 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 5 2 1 1 0 2 3 0 2 1 1 0 2 5 2 1 2 4 6
result:
ok
Test #2:
score: 0
Wrong Answer
time: 0ms
memory: 4016kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 3 2 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b WA Instruction with no inputs
result:
wrong answer WA in grader: Instruction with no inputs
Subtask #2:
score: 0
Wrong Answer
Test #19:
score: 11
Accepted
time: 0ms
memory: 3776kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 9 3 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 11 2 1 3 0 2 9 0 2 1 5 0 2 11 2 2 2 1 7 0 2 13 4 2 1 3 0 2 15 6 2 1 5 0 2 17 8 1 5 10 12 14 16 18
result:
ok
Test #20:
score: 0
Wrong Answer
time: 0ms
memory: 3796kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 9 1 5 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b WA Instruction with no inputs
result:
wrong answer WA in grader: Instruction with no inputs
Subtask #3:
score: 0
Skipped
Dependency #2:
0%
Subtask #4:
score: 0
Skipped
Dependency #3:
0%
Subtask #5:
score: 0
Wrong Answer
Test #48:
score: 12
Accepted
time: 0ms
memory: 4080kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 199 1 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 201 2 1 1 0 2 199 0 2 2 1 3 0 2 201 2 2 2 3 5 0 2 203 4 2 2 5 7 0 2 205 6 2 2 7 9 0 2 207 8 2 2 9 11 0 2 209 10 2 2 11 13 0 2 211 12 2 2 13 15 0 2 213 14 2 2 15 17 0 2 215 16 2 2 17 19 0 2 217 18 2 2 19 21 0 2 219 20 2 2 21 23 0 2 221 22 2 2 23 25 0 2 223 24 2...
result:
ok
Test #49:
score: 12
Accepted
time: 0ms
memory: 4084kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 199 99 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 201 2 1 99 0 2 199 0 2 1 101 0 2 201 2 2 1 103 0 2 203 4 2 1 105 0 2 205 6 2 1 107 0 2 207 8 2 1 109 0 2 209 10 2 1 111 0 2 211 12 2 1 113 0 2 213 14 2 1 115 0 2 215 16 2 1 117 0 2 217 18 2 1 119 0 2 219 20 2 1 121 0 2 221 22 2 1 123 0 2 223 24 2 1 125 0 2 225...
result:
ok
Test #50:
score: 0
Wrong Answer
time: 0ms
memory: 3672kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 199 100 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b WA Instruction with no inputs
result:
wrong answer WA in grader: Instruction with no inputs
Subtask #6:
score: 0
Wrong Answer
Test #70:
score: 8
Accepted
time: 0ms
memory: 4032kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 2 2 1 3 128 128 129 128 130 128 131
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 5 2 2 1 2 0 2 4 0 2 2 0 3 0 2 6 2 1 2 5 7
result:
ok
Test #71:
score: 8
Accepted
time: 0ms
memory: 4064kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 2 2 2 3 129 129 128 129 131 129 130
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 5 2 1 2 0 2 4 1 2 1 3 0 2 6 0 1 2 5 7
result:
ok
Test #72:
score: 8
Accepted
time: 6ms
memory: 4072kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 101 29 1 8 254 254 255 254 227 254 252 254 196 254 224 254 2958 254 2986 254 226
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 2931 2 2 1 29 0 2 2929 0 2 3 1 3 31 0 2 2931 2 2 3 3 5 33 0 2 2933 4 2 3 5 7 35 0 2 2935 6 2 3 7 9 37 0 2 2937 8 2 3 9 11 39 0 2 2939 10 2 3 11 13 41 0 2 2941 12 2 3 13 15 43 0 2 2943 14 2 3 15 17 45 0 2 2945 16 2 3 17 19 47 0 2 2947 18 2 3 19 21 49 0 2 2949 2...
result:
ok
Test #73:
score: 8
Accepted
time: 9ms
memory: 4468kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 101 29 31 92 284 284 330 284 634 284 598 284 114 284 366 284 966 284 814 284 922 284 510 284 474 284 194 284 930 284 42 284 230 284 1002 284 438 284 526 284 778 284 186 284 6 284 958 284 150 284 562 284 886 284 78 284 402 284 850 284 482 284 222 284 367 284 671 2...
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 2931 2 29 115 143 171 199 227 255 283 311 339 367 395 423 451 479 507 535 563 591 619 647 675 703 731 759 787 815 843 871 899 0 2 2929 0 2 29 173 201 229 257 285 313 341 369 397 425 453 481 509 537 565 593 621 649 677 705 733 761 789 817 841 845 871 873 901 0 ...
result:
ok
Test #74:
score: 8
Accepted
time: 2ms
memory: 4276kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 101 29 64 92 317 317 1326 317 1566 317 1090 317 1962 317 1046 317 1890 317 2034 317 1190 317 1934 317 1442 317 1074 317 1846 317 1118 317 1234 317 1298 317 1162 317 1862 317 1398 317 2006 317 1918 317 1470 317 1262 317 1514 317 1370 317 1594 317 1486 317 1414 317...
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 2959 2 1 2899 0 2 2929 1043 2 2 2899 2927 0 2 2931 1099 2 2 2899 2927 0 2 2933 1155 2 2 2899 2927 0 2 2935 1211 2 2 2899 2927 0 2 2937 1267 2 2 2899 2927 0 2 2939 1323 2 2 2899 2927 0 2 2941 1379 2 2 2899 2927 0 2 2943 1435 2 2 2899 2927 0 2 2945 1491 2 2 2899...
result:
ok
Test #75:
score: 0
Wrong Answer
time: 0ms
memory: 4140kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 101 29 95 92 348 348 1738 348 3066 348 1682 348 2058 348 2886 348 3030 348 2830 348 2094 348 2866 348 1774 348 2454 348 2310 348 2546 348 2490 348 2238 348 2258 348 2510 348 2142 348 2394 348 2294 348 2402 348 2202 348 2114 348 2922 348 2430 348 1718 348 2210 348...
output:
b17553fd-ba5a-4140-836c-491f938c515b WA Instruction with no inputs
result:
wrong answer WA in grader: Instruction with no inputs
Subtask #7:
score: 0
Wrong Answer
Test #101:
score: 0
Wrong Answer
time: 236ms
memory: 5244kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 200 200 1 100 524 24804 34853 20956 34628 18830 29184 28919 32573 11364 24911 2226 5624 3715 30838 2206 17143 21162 27531 20198 27242 5007 12724 27160 32586 3535 7307 17015 25466 626 13891 9132 26194 9198 33073 815 7328 6938 21395 9489 30995 10804 21530 14698 394...
output:
b17553fd-ba5a-4140-836c-491f938c515b WA Too many instructions
result:
wrong answer WA in grader: Too many instructions
Subtask #8:
score: 0
Skipped
Dependency #1:
0%