Submission #971877

#TimeUsernameProblemLanguageResultExecution timeMemory
971877jadai007Global Warming (CEOI18_glo)C++17
10 / 100
27 ms3164 KiB
#include<bits/stdc++.h> using namespace std; int n,x, arr[200200], p, dp[200200]; int main(){ cin.tie(nullptr)->sync_with_stdio(false); cin >> n >> x; for(int i = 0; i<n; ++i) cin >> arr[i]; if(x == 0){ for(int i = 0; i<n; ++i){ int idx = lower_bound(dp, dp+p, arr[i]) - dp; if(idx == p) ++p; dp[idx] = arr[i]; } cout << p; 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...