# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
969224 | 2024-04-24T17:12:01 Z | vjudge1 | Global Warming (CEOI18_glo) | C++17 | 27 ms | 1760 KB |
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 1; const int INF = 2e9; int arr[N] , ans; vector<int> dp; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n,x; cin >> n >> x; for (int i=1;i<=n;i++) cin >> arr[i]; for (int j=1;j<=n;j++) { int idx = lower_bound(dp.begin(), dp.end(), arr[j]) - dp.begin(); if (idx==dp.size()) dp.push_back(arr[j]); dp[idx] = arr[j]; } cout << dp.size(); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 24 ms | 1252 KB | Output is correct |
2 | Correct | 24 ms | 1176 KB | Output is correct |
3 | Correct | 27 ms | 1116 KB | Output is correct |
4 | Correct | 24 ms | 1128 KB | Output is correct |
5 | Correct | 14 ms | 1760 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 7 ms | 604 KB | Output is correct |
2 | Correct | 6 ms | 604 KB | Output is correct |
3 | Correct | 6 ms | 604 KB | Output is correct |
4 | Incorrect | 4 ms | 860 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 12 ms | 856 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |