Submission #418523

#TimeUsernameProblemLanguageResultExecution timeMemory
418523ismoilovVision Program (IOI19_vision)C++14
14 / 100
12 ms1100 KiB
#include "vision.h" #include<bits/stdc++.h> using namespace std; #pragma GCC optimize("Ofast") #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; #define IOS ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); //#define int ll #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define fp(a,i,c) for(int (a) = (i); (a) < (c); (a)++) #define fpp(a,i,c) for(int (a) = (i); (a) <= (c); (a)++) #define fv(a, c) for(int (a) = (1); (a) <= (c); (a)++) #define fz(a, c) for(int (a) = (0); (a) < (c); (a)++) #define fm(a,i,c) for(int (a) = (i); (a) > (c); (a)--) #define fmm(a,i,c) for(int (a) = (i); (a) >= (c); (a)--) #define pb push_back #define in insert #define ss second #define ff first #define vi vector <int> #define fa(a, v) for(auto (a) : (v)) #define mnel(a) *min_element(all(a)) #define mxel(a) *max_element(all(a)) #define si set<int> #define sov(a) sort(all((a))) void construct_network(int h, int w, int K) { int cnt = h*w-1; vector <int> ss; vector <int> H, W, hh(h), ww(w); fp(i,0,h){ vector <int> now; fp(j,0,w) now.pb(i*w+j); add_or(now); hh[i] = ++cnt; H.pb(cnt); } fp(j,0,w){ vector <int> now; fp(i,0,h) now.pb(i*w+j); add_or(now); ww[j] = ++cnt; W.pb(cnt); } add_xor(H); int xor_h = ++cnt; add_xor(W); int xor_w = ++cnt; fp(i,1,h){ add_and({hh[i-1], hh[i], xor_w}); ss.pb(++cnt); } fp(i,1,w){ add_and({ww[i-1], ww[i], xor_h}); ss.pb(++cnt); } add_or(ss); }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:14:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   14 | #define fp(a,i,c) for(int (a) = (i); (a) < (c); (a)++)
      |                           ^
vision.cpp:34:2: note: in expansion of macro 'fp'
   34 |  fp(i,0,h){
      |  ^~
vision.cpp:14:27: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   14 | #define fp(a,i,c) for(int (a) = (i); (a) < (c); (a)++)
      |                           ^
vision.cpp:36:3: note: in expansion of macro 'fp'
   36 |   fp(j,0,w)
      |   ^~
vision.cpp:14:27: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   14 | #define fp(a,i,c) for(int (a) = (i); (a) < (c); (a)++)
      |                           ^
vision.cpp:43:2: note: in expansion of macro 'fp'
   43 |  fp(j,0,w){
      |  ^~
vision.cpp:14:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   14 | #define fp(a,i,c) for(int (a) = (i); (a) < (c); (a)++)
      |                           ^
vision.cpp:45:3: note: in expansion of macro 'fp'
   45 |   fp(i,0,h)
      |   ^~
vision.cpp:14:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   14 | #define fp(a,i,c) for(int (a) = (i); (a) < (c); (a)++)
      |                           ^
vision.cpp:56:2: note: in expansion of macro 'fp'
   56 |  fp(i,1,h){
      |  ^~
vision.cpp:14:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   14 | #define fp(a,i,c) for(int (a) = (i); (a) < (c); (a)++)
      |                           ^
vision.cpp:60:2: note: in expansion of macro 'fp'
   60 |  fp(i,1,w){
      |  ^~
#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...