# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
170473 | 2019-12-25T11:39:15 Z | Mounir | Mouse (info1cup19_mouse) | C++14 | 5 ms | 248 KB |
#include <bits/stdc++.h> #include "grader.h" using namespace std; /* vector<int> v; int query(vector<int> c){ int nb = 0; for (int i = 0; i < (int)c.size(); ++i) nb += (c[i] == v[i]); return nb; }*/ void solve(int N){ vector<int> trouves(N), vecteur(N); for (int& a : vecteur) a = -1; for (int i = 0; i < N; ++i){ for (int val = 1; val <= N; ++val){ vecteur[i] = val; if (query(vecteur) == 1){ trouves[i] = val; break; } } vecteur[i] = -1; } int bonjour = query(trouves); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 5 ms | 248 KB | Integer -1 violates the range [1, 7] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 5 ms | 248 KB | Integer -1 violates the range [1, 7] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 5 ms | 248 KB | Integer -1 violates the range [1, 7] |
2 | Halted | 0 ms | 0 KB | - |