Submission #1096215

#TimeUsernameProblemLanguageResultExecution timeMemory
1096215NiosakaruGlobal Warming (CEOI18_glo)C++11
10 / 100
24 ms5468 KiB
#include <bits/stdc++.h> using namespace std; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); #define int long long #define N 200200 int n , x , p , rt , a[N] , b[N]; signed main(){ cin.tie(0)->sync_with_stdio(0); cin >> n >> x; for (int i = 1 ; i <= n ; i ++) cin >> a[i] , b[i] = 2e9; for (int i = 1 ; i <= n ; i ++){ p = lower_bound(b , b + n + 1 , a[i]) - b; rt = max(rt,p) , b[p] = a[i]; } cout << rt; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...