# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
464428 | 2021-08-13T08:17:36 Z | Quentolosse | Rack (eJOI19_rack) | C++14 | 102 ms | 102404 KB |
#include<iostream> #include<vector> #include<cmath> using namespace std; int main() { int nbEtages, nbCrochets, nbManteauxAPoser; cin >> nbEtages >> nbManteauxAPoser; vector<int> manteaux; nbCrochets = pow (2, nbEtages); manteaux.push_back (1); manteaux.push_back((nbCrochets / 2) + 1); int i = 1, debut = 1; while (manteaux.size() < nbManteauxAPoser) { for (int i2 = 0; i2 < i; i2++) { manteaux.push_back(manteaux[debut + i2] - (nbCrochets / (i * 4))); } for (int i2 = 0; i2 < i; i2++) { manteaux.push_back(manteaux[debut + i2] + (nbCrochets / (i * 4))); } debut += i; i = i * 2; } cout << manteaux[nbManteauxAPoser - 1]; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 292 KB | Output is correct |
3 | Correct | 1 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 292 KB | Output is correct |
3 | Correct | 1 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 0 ms | 204 KB | Output is correct |
7 | Correct | 1 ms | 204 KB | Output is correct |
8 | Correct | 1 ms | 588 KB | Output is correct |
9 | Correct | 2 ms | 1348 KB | Output is correct |
10 | Correct | 2 ms | 1348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 292 KB | Output is correct |
3 | Correct | 1 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 0 ms | 204 KB | Output is correct |
7 | Correct | 1 ms | 204 KB | Output is correct |
8 | Correct | 1 ms | 588 KB | Output is correct |
9 | Correct | 2 ms | 1348 KB | Output is correct |
10 | Correct | 2 ms | 1348 KB | Output is correct |
11 | Runtime error | 102 ms | 102404 KB | Execution killed with signal 9 |
12 | Halted | 0 ms | 0 KB | - |