# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
815332 | 2023-08-08T14:13:41 Z | PagodePaiva | Vision Program (IOI19_vision) | C++14 | 2 ms | 976 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; for(int i = 0;i < n;i++){ for(int j = 0;j < m;j++){ if(i+1 < n) r = add_and({i*m+j, (i+1)*m+j}); if(i-1 >= 0) r = add_and({i*m+j, (i-1)*m+j}); if(j+1 < m) r = add_and({i*m+j, (i)*m+j+1}); if(j-1 >= 0) r = add_and({i*m+j, (i)*m+j-1}); } } vector <int> aux; for(int i = n*m;i <= r;i++){ aux.push_back(i); } add_or(aux); return; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Incorrect | 0 ms | 212 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 | 0 ms | 212 KB | Output is correct |
2 | Incorrect | 0 ms | 212 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 | 0 ms | 212 KB | Output is correct |
2 | Incorrect | 0 ms | 212 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 | 0 ms | 212 KB | Output is correct |
2 | Incorrect | 0 ms | 212 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 | 340 KB | Output is correct |
2 | Incorrect | 1 ms | 340 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 | 212 KB | Output is correct |
2 | Incorrect | 1 ms | 212 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 | 2 ms | 976 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 | on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 | Halted | 0 ms | 0 KB | - |