QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#511496#2674. Vision programkimmoqt0 221ms5184kbC++201010b2024-08-09 23:11:412024-08-09 23:11:42

Judging History

你现在查看的是最新测评结果

  • [2024-08-09 23:11:42]
  • 评测
  • 测评结果:0
  • 用时:221ms
  • 内存:5184kb
  • [2024-08-09 23:11:41]
  • 提交

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=1;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: 3772kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 3 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
3
2 2 0 2
0 2 3 1
1 1 4

result:

ok 

Test #2:

score: 10
Accepted
time: 0ms
memory: 3768kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 3 2
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
3
2 1 0
0 2 3 2
1 1 4

result:

ok 

Test #3:

score: 10
Accepted
time: 0ms
memory: 4064kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
3 1 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
3
2 2 0 2
0 2 3 1
1 1 4

result:

ok 

Test #4:

score: 10
Accepted
time: 0ms
memory: 4060kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
3 1 2
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
3
2 1 0
0 2 3 2
1 1 4

result:

ok 

Test #5:

score: 0
Wrong Answer
time: 0ms
memory: 3772kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
2 2 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
5
2 2 0 3
0 2 4 1
2 2 1 2
0 2 6 3
1 2 5 7

result:

wrong answer on inputs (0, 0), (1, 0), expected 1, but computed 0

Subtask #2:

score: 0
Wrong Answer

Test #19:

score: 11
Accepted
time: 0ms
memory: 3800kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 9 3
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
9
2 1 4
0 2 9 1
2 2 0 6
0 2 11 3
2 2 2 8
0 2 13 5
2 1 4
0 2 15 7
1 4 10 12 14 16

result:

ok 

Test #20:

score: 11
Accepted
time: 0ms
memory: 3776kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
9 1 5
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
9
2 1 6
0 2 9 1
2 1 8
0 2 11 3
2 1 0
0 2 13 5
2 1 2
0 2 15 7
1 4 10 12 14 16

result:

ok 

Test #21:

score: 0
Wrong Answer
time: 0ms
memory: 3804kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
10 5 2
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
49
2 4 1 7 9 13
0 2 50 3
2 7 1 3 5 9 11 13 17
0 2 52 7
2 7 1 5 7 13 15 17 21
0 2 54 11
2 5 5 11 17 21 25
0 2 56 15
2 5 9 13 17 23 29
0 2 58 19
2 7 13 17 19 21 27 29 33
0 2 60 23
2 8 17 21 23 25 29 31 33 37
0 2 62 27
2 7 21 25 27 33 35 37 41
0 2 64 31
2 5 25 31...

result:

wrong answer on inputs (0, 1), (1, 0), 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: 12
Accepted
time: 0ms
memory: 3792kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 199 1
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
199
2 2 0 2
0 2 199 1
2 2 2 4
0 2 201 3
2 2 4 6
0 2 203 5
2 2 6 8
0 2 205 7
2 2 8 10
0 2 207 9
2 2 10 12
0 2 209 11
2 2 12 14
0 2 211 13
2 2 14 16
0 2 213 15
2 2 16 18
0 2 215 17
2 2 18 20
0 2 217 19
2 2 20 22
0 2 219 21
2 2 22 24
0 2 221 23
2 2 24 26
0 2 223 ...

result:

ok 

Test #49:

score: 12
Accepted
time: 0ms
memory: 3792kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 199 99
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
199
2 1 100
0 2 199 1
2 1 102
0 2 201 3
2 1 104
0 2 203 5
2 1 106
0 2 205 7
2 1 108
0 2 207 9
2 1 110
0 2 209 11
2 1 112
0 2 211 13
2 1 114
0 2 213 15
2 1 116
0 2 215 17
2 1 118
0 2 217 19
2 1 120
0 2 219 21
2 1 122
0 2 221 23
2 1 124
0 2 223 25
2 1 126
0 2 22...

result:

ok 

Test #50:

score: 12
Accepted
time: 0ms
memory: 3796kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 199 100
-1

output:

b17553fd-ba5a-4140-836c-491f938c515b
OK
199
2 1 107
0 2 199 7
2 1 115
0 2 201 15
2 1 123
0 2 203 23
2 1 131
0 2 205 31
2 1 139
0 2 207 39
2 1 147
0 2 209 47
2 1 155
0 2 211 55
2 1 163
0 2 213 63
2 1 171
0 2 215 71
2 1 179
0 2 217 79
2 1 187
0 2 219 87
2 1 195
0 2 221 95
2 1 3
0 2 223 103
2 1 11
0 2 ...

result:

ok 

Test #51:

score: 0
Wrong Answer
time: 0ms
memory: 3804kb

input:

c2675211-ade0-44b0-8c15-741dd835f3d2
1 199 198
-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: 0
Wrong Answer
time: 0ms
memory: 3776kb

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 0 3
0 2 4 1
2 2 1 2
0 2 6 3
1 2 5 7

result:

wrong answer on inputs (0, 0), (1, 0), expected 1, but computed 0

Subtask #7:

score: 0
Wrong Answer

Test #101:

score: 0
Wrong Answer
time: 221ms
memory: 5184kb

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%