Submission #442147

#TimeUsernameProblemLanguageResultExecution timeMemory
442147peijarVision Program (IOI19_vision)C++17
8 / 100
1 ms292 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; /* * Subtask 1 - 2 - 5 : can just ask all possible pairs * Subtask 7 : Need smart way of doing it * */ void construct_network(int nbLig, int nbCol, int K) { if (K == 1) { } vector<int> aAjouter; for (int iLig = 0; iLig <= 0; ++iLig) for (int iCol = 0; iCol <= 0; ++iCol) for (int deltaLig = 0; deltaLig <= K; ++deltaLig) { int pos1 = iLig * nbCol + iCol; int deltaCol = K - deltaLig; if (iLig + deltaLig >= nbLig) break; if (iCol + deltaCol < nbCol) { int pos2 = (iLig + deltaLig) * nbCol + iCol + deltaCol; aAjouter.push_back(add_and({pos1, pos2})); } if (deltaCol and deltaLig and iCol - deltaCol >= 0) { int pos2 = (iLig + deltaLig) * nbCol + iCol - deltaCol; aAjouter.push_back(add_and({pos1, pos2})); } } add_or(aAjouter); /*std::vector<int> Ns; Ns = {0, 1}; int a = add_and(Ns); Ns = {0, a}; int b = add_or(Ns); Ns = {0, 1, b}; int c = add_xor(Ns); add_not(c);*/ }
#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...