Submission #673134

#TimeUsernameProblemLanguageResultExecution timeMemory
673134tbzardVision Program (IOI19_vision)C++14
0 / 100
5 ms624 KiB
#include <bits/stdc++.h> using namespace std; int add_not(int n); int add_and(vector<int> ns); int add_or(vector<int> ns); int add_xor(vector<int> ns); void construct_network(int h, int w, int k){ vector<int> row, ans; int cnt = h*w; for(int i=0;i<h;i++){ vector<int> ask; for(int j=0;j<w;j++) ask.push_back(i*w+j); int out = add_or(ask); cnt++; if(out) row.push_back(i); } if(row.size() == 1){ int r = row[0]; for(int i=0;i<w;i++){ for(int j=0;j<w;j++){ if(abs(i-j) == k){ int out = add_and(vector<int>{r*w+i, r*w+j}); ans.push_back(cnt); cnt++; } } } } else{ int r1 = row[0], r2 = row[1]; if(r1 == 0 && r2 == 2){ for(int i=0;i<1000000;i++) ans.push_back(i); add_or(ans); } for(int i=0;i<w;i++){ for(int j=0;j<w;j++){ if(abs(r1-r2) + abs(i-j) == k){ int out = add_and(vector<int>{r1*w+i, r2*w+j}); ans.push_back(cnt); cnt++; } } } } int out = add_or(ans); }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:23:25: warning: unused variable 'out' [-Wunused-variable]
   23 |                     int out = add_and(vector<int>{r*w+i, r*w+j});
      |                         ^~~
vision.cpp:39:25: warning: unused variable 'out' [-Wunused-variable]
   39 |                     int out = add_and(vector<int>{r1*w+i, r2*w+j});
      |                         ^~~
vision.cpp:46:9: warning: unused variable 'out' [-Wunused-variable]
   46 |     int out = add_or(ans);
      |         ^~~
#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...