제출 #823775

#제출 시각아이디문제언어결과실행 시간메모리
823775ZHIRDILBILDIZVision Program (IOI19_vision)C++14
0 / 100
2 ms976 KiB
#include<bits/stdc++.h> #include "vision.h" #define fi first #define se second #define ll long long using namespace std ; const int N = 200, M = 200 ; bool a[N][M] ; //int add_not(int n) //{ //} //int add_and(int n, int m, vector<int> v) //{ // cout << "and\n" ; // int ind = v[0], ans = a[ind / m][ind % m] ; // for(int i : v) // { // int x = i / m, y = i % m ; // cout << x << ' '<< y << ' ' << a[x][y] << " | " ; // ans &= a[x][y] ; // } // cout << ans << '\n' ; // return ans ; //} //int add_or(vector<int> v) //{ //} //int add_xor(int n, int m, vector<int> v) //{ // cout << "xor\n" ; // int ans = 0 ; // for(int i : v) // { // int x = i / m, y = i % m ; // cout << x << ' '<< y << ' ' << a[x][y] << " | " ; // ans ^= a[x][y] ; // } // cout << ans ; // cout << '\n' ; // return ans ; //} void construct_network(int n, int m, int k) { for(int x1 = 0 ; x1 < n ; x1++) for(int y1 = 0 ; y1 < m ; y1++) for(int x2 = 0 ; x2 < n ; x2++) for(int y2 = 0 ; y2 < m ; y2++) { if(abs(x1 - x2) + abs(y2 - y1) == 0) continue ; vector<int> v ; v.push_back(x1 * m + y1) ; v.push_back(x2 * m + y2) ; if(add_and(v) == 1 && add_xor(v) == 0) { if(abs(x1 - x2) + abs(y2 - y1) == k) add_and(v) ; else add_xor(v) ; return ; } } } //signed main() //{ // int n, m, k ; // cin >> n >> m >> k ; // for(int i = 0 ; i < n ; i++) // for(int j = 0 ; j < m ; j++) // cin >> a[i][j] ; // construct_network(n, m, k) ; // return 0 ; //}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...