QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#139478 | #2674. Vision program | Qwerty1232# | 0 | 970ms | 24572kb | C++20 | 1.1kb | 2023-08-13 17:30:24 | 2024-07-04 01:41:13 |
Judging History
answer
#include "vision.h"
#include <bits/stdc++.h>
void construct_network(int n, int m, int k) {
auto get = [&](int i, int j) {
return i * m + j;
};
std::unordered_set<int64_t> set;
std::vector<std::vector<int>> gr(n * m);
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
for (int i1 = 0; i1 < n; i1++) {
for (int j1 = 0; j1 < m; j1++) {
if (abs(i - i1) + abs(j - j1) == k && !set.count(get(i, j) * n * m + get(i1, j1))) {
set.insert(get(i, j) * n * m + get(i1, j1));
gr[get(i, j)].push_back(get(i1, j1));
}
}
}
}
}
std::vector<int> vec;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
auto& vc = gr[get(i, j)];
if (vc.empty()) {
continue;
}
int a = add_or(vc);
int b = add_and({get(i, j), a});
vec.push_back(b);
break;
}
}
add_or(vec);
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3732kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 3 1 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 3 1 1 1 0 2 0 3 1 1 4
result:
wrong answer on inputs (0, 1), (0, 2), expected 1, but computed 0
Subtask #2:
score: 0
Wrong Answer
Test #19:
score: 0
Wrong Answer
time: 0ms
memory: 3884kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 9 3 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 3 1 1 3 0 2 0 9 1 1 10
result:
wrong answer on inputs (0, 1), (0, 4), expected 1, but computed 0
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: 0
Wrong Answer
time: 1ms
memory: 4120kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 199 1 -1
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 3 1 1 1 0 2 0 199 1 1 200
result:
wrong answer on inputs (0, 1), (0, 2), expected 1, but computed 0
Subtask #6:
score: 0
Time Limit Exceeded
Test #70:
score: 8
Accepted
time: 0ms
memory: 3824kb
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 1 2 1 2 0 2 0 4 1 2 0 3 0 2 2 6 1 2 5 7
result:
ok
Test #71:
score: 0
Accepted
time: 0ms
memory: 3840kb
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 1 1 3 0 2 0 4 1 1 1 0 2 2 6 1 2 5 7
result:
ok
Test #72:
score: 0
Accepted
time: 6ms
memory: 4356kb
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 203 1 2 1 29 0 2 0 2929 1 3 0 30 58 0 2 29 2931 1 3 29 59 87 0 2 58 2933 1 3 58 88 116 0 2 87 2935 1 3 87 117 145 0 2 116 2937 1 3 116 146 174 0 2 145 2939 1 3 145 175 203 0 2 174 2941 1 3 174 204 232 0 2 203 2943 1 3 203 233 261 0 2 232 2945 1 3 232 262 290 0...
result:
ok
Test #73:
score: 0
Accepted
time: 24ms
memory: 9348kb
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 203 1 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 0 2929 1 29 144 172 200 228 256 284 312 340 368 396 424 452 480 508 536 564 592 620 648 676 704 732 760 788 816 844 872 900 928 0 2...
result:
ok
Test #74:
score: 0
Accepted
time: 7ms
memory: 6860kb
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 203 1 29 1072 1100 1128 1156 1184 1212 1240 1268 1296 1324 1352 1380 1408 1436 1464 1492 1520 1548 1576 1604 1632 1660 1688 1716 1744 1772 1800 1828 1856 0 2 0 2929 1 29 1101 1129 1157 1185 1213 1241 1269 1297 1325 1353 1381 1409 1437 1465 1493 1521 1549 1577 ...
result:
ok
Test #75:
score: 0
Accepted
time: 5ms
memory: 4864kb
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 OK 137 1 29 1971 1999 2027 2055 2083 2111 2139 2167 2195 2223 2251 2279 2307 2335 2363 2391 2419 2447 2475 2503 2531 2559 2587 2615 2643 2671 2699 2727 2755 0 2 0 2929 1 29 2000 2028 2056 2084 2112 2140 2168 2196 2224 2252 2280 2308 2336 2364 2392 2420 2448 2476 ...
result:
ok
Test #76:
score: 0
Accepted
time: 5ms
memory: 3820kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 101 29 128 7 381 381 2606 381 2578 381 2573 381 2601 381 352 381 353 381 380
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 5 1 1 2928 0 2 0 2929 1 1 28 0 2 2900 2931 1 2 2930 2932
result:
ok
Test #77:
score: 0
Accepted
time: 18ms
memory: 5024kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 44 135 1 8 303 303 302 303 424 303 301 303 33 303 423 303 5660 303 6018 303 425
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 89 1 2 1 135 0 2 0 5940 1 3 0 136 270 0 2 135 5942 1 3 135 271 405 0 2 270 5944 1 3 270 406 540 0 2 405 5946 1 3 405 541 675 0 2 540 5948 1 3 540 676 810 0 2 675 5950 1 3 675 811 945 0 2 810 5952 1 3 810 946 1080 0 2 945 5954 1 3 945 1081 1215 0 2 1080 5956 1 ...
result:
ok
Test #78:
score: 0
Accepted
time: 146ms
memory: 24572kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 44 135 45 97 347 347 375 347 6133 347 523 347 4413 347 653 347 1205 347 99 347 4137 347 2885 347 489 347 3097 347 2397 347 1755 347 2519 347 4535 347 229 347 5369 347 2673 347 2121 347 3071 347 5191 347 3585 347 3771 347 3437 347 1075 347 4901 347 4817 347 1465 3...
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 89 1 44 45 179 313 447 581 715 849 983 1117 1251 1385 1519 1653 1787 1921 2055 2189 2323 2457 2591 2725 2859 2993 3127 3261 3395 3529 3663 3797 3931 4065 4199 4333 4467 4601 4735 4869 5003 5137 5271 5405 5539 5673 5807 0 2 0 5940 1 44 44 180 314 448 582 716 85...
result:
ok
Test #79:
score: 0
Accepted
time: 71ms
memory: 15100kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 44 135 89 97 391 391 479 391 5981 391 1413 391 3439 391 3021 391 1949 391 6099 391 4657 391 2903 391 1697 391 5445 391 5193 391 3557 391 2651 391 2367 391 763 391 1295 391 4491 391 2485 391 1043 391 1161 391 4909 391 4791 391 4373 391 2115 391 4255 391 2233 391 3...
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 89 1 44 89 223 357 491 625 759 893 1027 1161 1295 1429 1563 1697 1831 1965 2099 2233 2367 2501 2635 2769 2903 3037 3171 3305 3439 3573 3707 3841 3975 4109 4243 4377 4511 4645 4779 4913 5047 5181 5315 5449 5583 5717 5851 0 2 0 5940 1 44 88 224 358 492 626 760 8...
result:
ok
Test #80:
score: 0
Accepted
time: 30ms
memory: 6552kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 44 135 133 96 435 435 311 435 5813 435 5939 435 2265 435 2115 435 5193 435 1287 435 3515 435 2895 435 1761 435 4491 435 4689 435 2391 435 3987 435 5469 435 4217 435 2609 435 3113 435 1643 435 4365 435 539 435 1919 435 657 435 3389 435 3861 435 3013 435 3585 435 5...
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 89 1 44 133 267 401 535 669 803 937 1071 1205 1339 1473 1607 1741 1875 2009 2143 2277 2411 2545 2679 2813 2947 3081 3215 3349 3483 3617 3751 3885 4019 4153 4287 4421 4555 4689 4823 4957 5091 5225 5359 5493 5627 5761 5895 0 2 0 5940 1 44 132 268 402 536 670 804...
result:
ok
Test #81:
score: 0
Accepted
time: 20ms
memory: 3776kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 44 135 177 7 479 479 6003 479 5869 479 5868 479 6002 479 344 479 345 479 478
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 5 1 1 5939 0 2 0 5940 1 1 134 0 2 5805 5942 1 2 5941 5943
result:
ok
Test #82:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 199 1 3 324 324 325 324 326 324 386
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 3 1 1 1 0 2 0 199 1 1 200
result:
ok
Test #83:
score: 0
Accepted
time: 0ms
memory: 3840kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 199 60 5 383 383 324 383 323 383 322 383 441 383 382
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 3 1 1 60 0 2 0 199 1 1 200
result:
ok
Test #84:
score: 0
Accepted
time: 1ms
memory: 4108kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 199 137 5 460 460 324 460 325 460 326 460 266 460 461
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 3 1 1 137 0 2 0 199 1 1 200
result:
ok
Test #85:
score: 0
Accepted
time: 0ms
memory: 4064kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 1 199 198 3 521 521 716 521 719 521 520
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 3 1 1 198 0 2 0 199 1 1 200
result:
ok
Test #86:
score: 0
Accepted
time: 0ms
memory: 3868kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 199 1 1 3 324 324 325 324 326 324 386
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 399 1 1 1 0 2 0 199 1 2 0 2 0 2 1 201 1 2 1 3 0 2 2 203 1 2 2 4 0 2 3 205 1 2 3 5 0 2 4 207 1 2 4 6 0 2 5 209 1 2 5 7 0 2 6 211 1 2 6 8 0 2 7 213 1 2 7 9 0 2 8 215 1 2 8 10 0 2 9 217 1 2 9 11 0 2 10 219 1 2 10 12 0 2 11 221 1 2 11 13 0 2 12 223 1 2 12 14 0 2 1...
result:
ok
Test #87:
score: 0
Accepted
time: 1ms
memory: 3828kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 199 1 99 5 422 422 452 422 453 422 450 422 352 422 423
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 399 1 1 99 0 2 0 199 1 1 100 0 2 1 201 1 1 101 0 2 2 203 1 1 102 0 2 3 205 1 1 103 0 2 4 207 1 1 104 0 2 5 209 1 1 105 0 2 6 211 1 1 106 0 2 7 213 1 1 107 0 2 8 215 1 1 108 0 2 9 217 1 1 109 0 2 10 219 1 1 110 0 2 11 221 1 1 111 0 2 12 223 1 1 112 0 2 13 225 1...
result:
ok
Test #88:
score: 0
Accepted
time: 1ms
memory: 4100kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 199 1 198 3 521 521 716 521 719 521 520
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 5 1 1 198 0 2 0 199 1 1 0 0 2 198 201 1 2 200 202
result:
ok
Test #89:
score: 0
Accepted
time: 235ms
memory: 7356kb
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 200 100 1 8 424 424 425 424 460 424 426 424 352 424 461 424 20407 424 19476 424 459
output:
b17553fd-ba5a-4140-836c-491f938c515b OK 401 1 2 1 100 0 2 0 20000 1 3 0 101 200 0 2 100 20002 1 3 100 201 300 0 2 200 20004 1 3 200 301 400 0 2 300 20006 1 3 300 401 500 0 2 400 20008 1 3 400 501 600 0 2 500 20010 1 3 500 601 700 0 2 600 20012 1 3 600 701 800 0 2 700 20014 1 3 700 801 900 0 2 800 20...
result:
ok
Test #90:
score: -8
Time Limit Exceeded
input:
c2675211-ade0-44b0-8c15-741dd835f3d2 200 100 100 99 523 523 616 523 9383 523 2364 523 4251 523 8140 523 5966 523 5532 523 8700 523 4879 523 2449 523 7512 523 5221 523 9809 523 7138 523 6215 523 7829 523 3885 523 5617 523 4134 523 4661 523 6526 523 2580 523 5865 523 10221 523 4778 523 8389 523 2053 5...
output:
Unauthorized output
result:
Subtask #7:
score: 0
Wrong Answer
Test #101:
score: 0
Wrong Answer
time: 970ms
memory: 11832kb
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 OK 401 1 2 1 200 0 2 0 40000 1 3 0 201 400 0 2 200 40002 1 3 200 401 600 0 2 400 40004 1 3 400 601 800 0 2 600 40006 1 3 600 801 1000 0 2 800 40008 1 3 800 1001 1200 0 2 1000 40010 1 3 1000 1201 1400 0 2 1200 40012 1 3 1200 1401 1600 0 2 1400 40014 1 3 1400 1601 ...
result:
wrong answer on inputs (80, 199), (81, 199), expected 1, but computed 0
Subtask #8:
score: 0
Skipped
Dependency #1:
0%