Submission #815359

# Submission time Handle Problem Language Result Execution time Memory
815359 2023-08-08T14:23:50 Z PagodePaiva Vision Program (IOI19_vision) C++14
0 / 100
19 ms 6592 KB
    #include "vision.h"
    #include<bits/stdc++.h>
    #define fr first
    #define sc second
     
    using namespace std;
     
    int dist(pair <int,int>a,pair<int,int>b){
    	return abs(a.fr-b.fr)+abs(a.sc-b.sc);
    }
     
    void construct_network(int H, int W, int K) {
    	// std::vector<int> Ns;
    	// Ns = {0, 1};
    	// int a = add_and(Ns);
    	// Ns = {0, a};
    	// int b = add_or(Ns);
    	// Ns = {0, 1, b};
    	// int c = add_xor(Ns);
    	// add_not(c);
     
    	int n = H, m = W, k = K;
    	int r = n*m;
     	vector <int> auxx;
     	vector <int> aux;

    	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(dist({i, j}, {i1, j1}) == k){
    						// r = add_and({i*m+j, i1*m+j1});
    						auxx.push_back(i1*m+j1);	
    					}
    				}
    			}

    			int a1 = add_xor(auxx);
    			auxx.push_back({i*m+j});
    			int a2 = add_xor(auxx);
    			a2 = add_not(a2);
    			r = add_and({a1, a2});
    			aux.push_back(r);
    		}
    	}
     
    	add_or(aux);
     
    	return;
    }
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 1236 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 0), (1, 1), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 19 ms 6592 KB WA in grader: Too many inputs
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB on inputs (0, 0), (0, 2), expected 0, but computed 1
2 Halted 0 ms 0 KB -