# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1109702 | 2024-11-07T10:48:58 Z | KindaGoodGames | Global Warming (CEOI18_glo) | C++14 | 77 ms | 3012 KB |
//11:48 #include<bits/stdc++.h> #define ll long long #define pii pair<int,int> #define tiii tuple<int,int,int> using namespace std; int main(){ int n, x; cin >> n >> x; vector<int> arr(n); for(int i = 0; i < n; i++ ){ cin >> arr[i]; } vector<int> dp; for(int i = 0; i < n; i++){ auto it = upper_bound(dp.begin(),dp.end(),arr[i]) - dp.begin(); if(it >= dp.size()) { dp.push_back(arr[i]); }else{ dp[it] = arr[i]; } } cout << dp.size() << endl; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 336 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 336 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 336 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 60 ms | 2988 KB | Output is correct |
2 | Correct | 58 ms | 2888 KB | Output is correct |
3 | Correct | 57 ms | 2984 KB | Output is correct |
4 | Correct | 77 ms | 2984 KB | Output is correct |
5 | Incorrect | 40 ms | 3012 KB | Output isn't correct |
6 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 16 ms | 1128 KB | Output is correct |
2 | Correct | 15 ms | 1104 KB | Output is correct |
3 | Correct | 16 ms | 1104 KB | Output is correct |
4 | Incorrect | 11 ms | 1180 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 31 ms | 1800 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 336 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |