Submission #238871

#TimeUsernameProblemLanguageResultExecution timeMemory
238871UserIsUndefinedVision Program (IOI19_vision)C++14
0 / 100
13 ms1152 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; map<pair<int,int> , bool> visited; void construct_network(int H, int W, int K) { vector<int> calsXor; vector<int> rowsXor; vector<int> test; for (int i = 0 ; i < H * W ; i++){ if (i && i % W == 0){calsXor.push_back(add_xor(test)); test.clear();} test.push_back(i); } calsXor.push_back(add_xor(test)); test.clear(); for (int i = 0 ; i < W ; i++){ for (int j = i ; j < W * H ; j+= W){ test.push_back(j); } rowsXor.push_back(add_xor(test)); test.clear(); } vector<int> androws; vector<int> andcals; for (int i = 0 ; i < calsXor.size() - 1 ; i++){ andcals.push_back(add_and({calsXor[i], calsXor[i+1]})); } for (int i = 0 ; i < rowsXor.size() - 1 ; i++){ androws.push_back(add_and({rowsXor[i], rowsXor[i+1]})); } int conrow , concal, samerow, samecal; conrow = add_xor(androws); concal = add_xor(andcals); samecal = add_not(add_xor(andcals)); samerow = add_not(add_xor(androws)); int ConRowSameCal, ConCalSameRow; ConCalSameRow = add_and({concal, samerow}); ConRowSameCal = add_and({conrow , samecal}); add_or({ConCalSameRow , ConRowSameCal}); }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:32:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0 ; i < calsXor.size() - 1 ; i++){
                      ~~^~~~~~~~~~~~~~~~~~~~
vision.cpp:36:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0 ; i < rowsXor.size() - 1 ; i++){
                      ~~^~~~~~~~~~~~~~~~~~~~
#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...