# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
260691 | 2020-08-10T18:11:14 Z | bigg | Global Warming (CEOI18_glo) | C++14 | 54 ms | 5496 KB |
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int MAXN = 2e5 + 10; const ll INF =1e18; ll dp[MAXN], v[MAXN]; int main(){ int n; ll x; scanf("%d %lld", &n, &x); for(int i = 1; i <= n; i++) scanf("%lld", &v[i]), dp[i] = INF; dp[0] = INF; int ans = -1; for(int i = 1; i <= n; i++){ int it1 = lower_bound(dp, dp + n, v[i]) - dp; dp[it1] = v[i]; ans = max(ans, it1 + 1); } printf("%d\n",ans ); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 384 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 384 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 384 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 54 ms | 5420 KB | Output is correct |
2 | Correct | 54 ms | 5496 KB | Output is correct |
3 | Correct | 54 ms | 5368 KB | Output is correct |
4 | Correct | 54 ms | 5368 KB | Output is correct |
5 | Correct | 38 ms | 4600 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 15 ms | 1536 KB | Output is correct |
2 | Correct | 14 ms | 1640 KB | Output is correct |
3 | Correct | 13 ms | 1536 KB | Output is correct |
4 | Incorrect | 10 ms | 1364 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 27 ms | 2816 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 384 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |