Submission #1111037

#TimeUsernameProblemLanguageResultExecution timeMemory
1111037epicci23Vision Program (IOI19_vision)C++17
12 / 100
2 ms508 KiB
#include "vision.h" #include "bits/stdc++.h" //#define int long long #define all(v) v.begin() , v.end() #define sz(a) (int)a.size() using namespace std; int N,M; inline int get_ind(int a,int b){ return a*M+b; } inline bool is_valid(int a,int b){ return a>=0 && a<N && b>=0 && b<M; } void construct_network(int n, int m, int k){ N=n,M=m; if(min(n,m)!=1){ vector<int> query; int a = 0, b = k; for(int u=0;u<3*max(N,M);u++){ if(is_valid(a,b)){ vector<int> xd; xd.push_back(get_ind(0,0)); xd.push_back(get_ind(a,b)); query.push_back(add_and(xd)); } a++,b--; } add_or(query); } if(n==1){ vector<int> query; for(int i=0;i+k<m;i++){ vector<int> xd; xd.push_back(i); xd.push_back(i+k); query.push_back(add_and(xd)); } add_or(query); } else{ vector<int> query; for(int i=0;i+k<n;i++){ vector<int> xd; xd.push_back(i); xd.push_back(i+k); query.push_back(add_and(xd)); } add_or(query); } }
#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...