# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
72417 | 2018-08-26T07:58:13 Z | 인프라웨어 상한가 가주세요. 물렸어요(#2188, c4big, cepiloth) | Box Run (FXCUP3_box) | C++17 | 1000 ms | 736 KB |
#include <vector> #include <iostream> using namespace std; int main() { int N; cin >> N; vector<long long> arr(N + 1); for (int i = 1; i <= N; ++i) cin >> arr[i]; vector<int> sol; for (int i = 1; i <= N; ++i) { // �ʺ� int lessCnt = 0; int here = arr[1]; // ������� bool hasSol = false; for (int j = i + 1; j <= N; ++j) { int lessCnt = 0; for (int k = j - 1; k >= j - i; --k) { if (arr[j] > arr[k]) lessCnt++; } if (lessCnt == i) { int sub = i - 1; sol.push_back(j - 1 - sub); hasSol = true; break; } } if (hasSol == false) sol.push_back(-1); } for (int i = 0; i < sol.size(); ++i) cout << sol[i] << " "; return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 248 KB | Output is correct |
2 | Correct | 2 ms | 356 KB | Output is correct |
3 | Correct | 2 ms | 356 KB | Output is correct |
4 | Correct | 3 ms | 392 KB | Output is correct |
5 | Correct | 2 ms | 468 KB | Output is correct |
6 | Correct | 2 ms | 484 KB | Output is correct |
7 | Correct | 2 ms | 516 KB | Output is correct |
8 | Correct | 2 ms | 516 KB | Output is correct |
9 | Correct | 2 ms | 536 KB | Output is correct |
10 | Correct | 2 ms | 536 KB | Output is correct |
11 | Correct | 3 ms | 536 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 248 KB | Output is correct |
2 | Correct | 2 ms | 356 KB | Output is correct |
3 | Correct | 2 ms | 356 KB | Output is correct |
4 | Correct | 3 ms | 392 KB | Output is correct |
5 | Correct | 2 ms | 468 KB | Output is correct |
6 | Correct | 2 ms | 484 KB | Output is correct |
7 | Correct | 2 ms | 516 KB | Output is correct |
8 | Correct | 2 ms | 516 KB | Output is correct |
9 | Correct | 2 ms | 536 KB | Output is correct |
10 | Correct | 2 ms | 536 KB | Output is correct |
11 | Correct | 3 ms | 536 KB | Output is correct |
12 | Correct | 119 ms | 592 KB | Output is correct |
13 | Execution timed out | 1085 ms | 736 KB | Time limit exceeded |
14 | Halted | 0 ms | 0 KB | - |