Submission #298167

# Submission time Handle Problem Language Result Execution time Memory
298167 2020-09-12T13:12:40 Z shayan_p Vision Program (IOI19_vision) C++17
0 / 100
161 ms 1048 KB
#include<bits/stdc++.h>
#include "vision.h"

#define F first
#define S second
#define PB push_back
#define sz(s) (int(s.size()))
#define bit(n, k) (((n)>>(k))&1)

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;


void construct_network(int H, int W, int K){
    /*
    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);*/

    auto to = [&](int x, int y){
		  return x * W + y;
	      };
    int cnt = 0;
    for(int a = 0; a < H; a++){
	for(int b = 0; b < W; b++){
	    for(int c = 0; c < H; c++){
		for(int d = 0; d < W; d++){
		    if(abs(a-d) + abs(b-d) == K){
			vector<int> vec;
			vec.PB(to(a, b)), vec.PB(to(c, d));
			add_and(vec);
			cnt++;
		    }
		}
	    }
	}	
    }
    vector<int> vec;
    for(int i = 0; i < cnt; i++){
	vec.PB(H * W + i);
    }
    add_or(vec);
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Incorrect 1 ms 256 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Incorrect 1 ms 256 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Incorrect 1 ms 256 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Incorrect 1 ms 256 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 256 KB on inputs (0, 1), (0, 3), expected 0, but computed 1
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Incorrect 1 ms 256 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 161 ms 1048 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Incorrect 1 ms 256 KB on inputs (0, 0), (0, 1), expected 0, but computed 1
3 Halted 0 ms 0 KB -