Submission #381051

#TimeUsernameProblemLanguageResultExecution timeMemory
381051BlancaHMPainting Squares (IOI20_squares)C++14
10 / 100
145 ms496 KiB
#include <iostream> #include <vector> #include <map> using namespace std; map<string, int> used; int k = 8; vector<int> paint(int n) { vector<int> squares = vector<int>(n+1, 1); squares[n] = n; k = 0; string wind = ""; for (int i = 0; i < n; i++) wind += "1"; used[wind] = 0; return squares; } int find_location(int n, vector<int> c) { for (int i = 0; i < (int) c.size(); i++) { if (c[i] == -1) return n - i; } if (k == 8) paint(n); string s = ""; for (int i = 0; i < (int) c.size(); i++) s.push_back('0' + c[i]); return used[s]; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...