Submission #807143

# Submission time Handle Problem Language Result Execution time Memory
807143 2023-08-04T14:05:14 Z Benmath Vision Program (IOI19_vision) C++14
0 / 100
137 ms 1820 KB
#include "vision.h"
#include<bits/stdc++.h>
using namespace std;
void construct_network(int H, int W, int K) {
	std::vector<int> Ns;
	int a;

			for(int i=0;i<H;i++){
				for(int j=0;j<W;j++){
					Ns.clear();
						for(int k=0;k<H;k++){
							for(int t=0;t<W;t++){
								if((abs(i-k)+abs(j-t))==K){
									Ns.push_back(k*W+t);
								}
							}
						}
						a=add_or(Ns);
						int b=add_and({a,i*W+j});
						a=b;
				}
			}
		
	
	Ns.clear();
	for(int i=H*W+1;i<=a;i=i+2){
		Ns.push_back(i);
	}
	 a = add_or(Ns);
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:26:19: warning: 'a' may be used uninitialized in this function [-Wmaybe-uninitialized]
   26 |  for(int i=H*W+1;i<=a;i=i+2){
      |                  ~^~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Incorrect 1 ms 212 KB WA in grader: Instruction with no inputs
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 10 ms 752 KB Output is correct
4 Correct 23 ms 1820 KB Output is correct
5 Correct 15 ms 1360 KB Output is correct
6 Incorrect 2 ms 340 KB WA in grader: Instruction with no inputs
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 137 ms 988 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB WA in grader: Instruction with no inputs
3 Halted 0 ms 0 KB -