Submission #825739

#TimeUsernameProblemLanguageResultExecution timeMemory
825739tolbiVision Program (IOI19_vision)C++17
0 / 100
2 ms976 KiB
#pragma optimize("Bismilahirrahmanirrahim") //█▀█─█──█──█▀█─█▀█ //█▄█─█──█──█▄█─█■█ //█─█─█▄─█▄─█─█─█─█ //Allahuekber //ahmet23 orz... //FatihSultanMehmedHan //YavuzSultanSelimHan //AbdulhamidHan //Sani buyuk Osman Pasa Plevneden cikmam diyor #define author tolbi #include <bits/stdc++.h> using namespace std; #define coutarr(x) for (auto &it : x) cout<<it<<" ";cout<<endl; #define vint(x) vector<int> x #define sortarr(x) sort(x.begin(), x.end()) #define sortrarr(x) sort(x.rbegin(), x.rend()) #define tol(bi) (1LL<<((int)(bi))) typedef long long ll; const int MOD = 1e9+7; mt19937 ayahya(chrono::high_resolution_clock().now().time_since_epoch().count()); #include "vision.h" void construct_network(int H, int W, int K) { vector<int> final; if (H*W==2){ assert(false); if (K==1){ add_or({0,1}); } else { add_not(0); } return; } for (int i = 0; i < H; i++){ for (int j = 0; j < W; j++){ vector<int> arr; for (int uza = -K; uza <= K; uza++){ int x = i+uza; int y1 = i+(K-abs(uza)); int y2 = i-(K-abs(uza)); if (x<0 || x>=H) continue; if (y1>=0 && y1<W){ arr.push_back(x*W+y1); } if (y2>=0 && y2<W){ arr.push_back(x*W+y2); } } if (arr.size()==0) continue; int pos = add_or(arr); final.push_back(add_and({i*W+j,pos})); } } if (final.size()==0){ add_and({0,1,2}); } else add_or(final); }

Compilation message (stderr)

vision.cpp:1: warning: ignoring '#pragma optimize ' [-Wunknown-pragmas]
    1 | #pragma optimize("Bismilahirrahmanirrahim")
      |
#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...