제출 #1031386

#제출 시각아이디문제언어결과실행 시간메모리
1031386vjudge1Vision Program (IOI19_vision)C++17
33 / 100
7 ms1136 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; #pragma GCC optimize("O3") #define endl '\n' #define db double #define ll __int128 #define pb push_back #define fs first #define sd second #define Mod long(1e9 + 7) #define all(x) x.begin(), x.end() #define unvisited long(-1) #define Eps double(1e-9) #define _for(i, n) for(int i = 0; i < (n); i++) #define dbg(x) cout << #x ": " << x << endl; const int Max = 1e6 + 7, Inf = 1e9 + 7; int pos(int i, int j, int w){ return i * w + j; } void construct_network(int h, int w, int k) { int ini = h*w, last = h*w-1; //cerr << h << " " << w << " " << k << endl; for(int i = 0; i < h; i++) { for(int j = 0; j < w; j++) { for(int l = 0; l <= i; l++) { for(int m = 0; m < w; m++) { if(abs(l - i) + abs(m - j) == k){ add_and({ pos(l, m, w), pos(i, j, w) }); //cerr << pos(l, m, w) << " " << pos(i, j, w) << endl; last++; } } } } } if(ini > last) return; vector <int> s; for(int i = ini; i <= last; i++){ s.push_back(i); } add_or(s); }
#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...