Submission #147456

#TimeUsernameProblemLanguageResultExecution timeMemory
147456NucleistVision Program (IOI19_vision)C++14
0 / 100
11 ms1528 KiB
#include <bits/stdc++.h> #include "vision.h" using namespace std; #define flash ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0) #define debug(x) cerr << " - " << #x << ": " << x << endl; #define debugs(x, y) cerr << " - " << #x << ": " << x << " " << #y << ": " << y << endl; #define all(x) (x).begin(),(x).end() #define sz(x) (ll)x.size() #define ll long long #define INF 1000000000 #define pb push_back struct greateri { template<class T> bool operator()(T const &a, T const &b) const { return a > b; } }; map<pair<int,int>,int>gg; void construct_network(int H,int W,int K) { //flash; vector<int>cols[W]; vector<int>rows[H]; for (int i = 0; i < H; ++i) { for (int j = 0; j < W; ++j) { int cell=i*W+j; cols[j].pb(cell); rows[i].pb(cell); } } vector<int>indexcol; for (int i = 0; i < W; ++i) { int last = add_xor(cols[i]); indexcol.pb(last); } vector<int>indexrow; for (int i = 0; i < H; ++i) { int last = add_xor(rows[i]); indexrow.pb(last); } vector<int>lasti; for (int i = 1; i < indexcol.size(); ++i) { vector<int>now; now.pb(indexcol[i]); now.pb(indexcol[i]-1); int yo = add_and(now); lasti.pb(yo); } int doi = add_or(lasti); int kol = add_or(indexrow); int zol = add_not(doi); vector<int>hey; hey.pb(zol),hey.pb(kol); int fo = add_or(hey); int lasto = add_not(fo); vector<int>lasti1; for (int i = 1; i < indexrow.size(); ++i) { vector<int>now; now.pb(indexrow[i]); now.pb(indexrow[i]-1); int yo = add_and(now); lasti1.pb(yo); } int doi1 = add_or(lasti1); int kol1 = add_or(indexcol); int zol1 = add_not(doi1); vector<int>hey1; hey1.pb(zol1),hey1.pb(kol1); int fo1 = add_or(hey1); int lasto1 = add_not(fo1); vector<int>result; result.pb(lasto),result.pb(lasto1); int rep = add_or(result); //int xo = add_not(doi); return; } //code the AC sol ! // BS/queue/map

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:45:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 1; i < indexcol.size(); ++i)
                   ~~^~~~~~~~~~~~~~~~~
vision.cpp:61:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 1; i < indexrow.size(); ++i)
                   ~~^~~~~~~~~~~~~~~~~
vision.cpp:78:7: warning: unused variable 'rep' [-Wunused-variable]
   int rep = add_or(result);
       ^~~
#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...