# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
420643 | 2021-06-08T13:05:09 Z | schse | Financial Report (JOI21_financial) | C++17 | 4000 ms | 3788 KB |
#include <bits/stdc++.h> #define INF INT32_MAX using namespace std; int main() { vector<int> arr; int N, D; cin >> N >> D; vector<int> biggest(N + 2, INF); vector<int> lastindex(N + 2, -1); arr.resize(N); for (int &i : arr) cin >> i; for (int index = 0; index < N; index++) { int val = arr[index]; for (int i = 1; i < lastindex.size(); i++) // nicht mehr aktuelles löschen if (lastindex[i] < index - D) biggest[i] = INF; for (int i = 0; i < biggest.size() - 1; i++) // neue längenoption if (biggest[i] < val && val < biggest[i + 1]) biggest[i + 1] = val; for (int e = 0; e < biggest.size(); e++) // ablaufsdatum updaten if (biggest[e] >= val) lastindex[e] = index; } int t = biggest.size() - 1; while (biggest[t] == INF) t--; cout << t; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 4074 ms | 3788 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 4088 ms | 3788 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |