Submission #4266

#TimeUsernameProblemLanguageResultExecution timeMemory
4266dbfud줄 세우기 (KOI13_jul)C++98
0 / 22
824 ms10872 KiB
#include <iostream> #include <set> #include <vector> using namespace std; int LIS(vector<int> A) { int N = A.size(),i; set<int> s; set<int>::iterator k; for (i=0;i<N;i++) { if (s.insert(A[i]).second) { k = s.find(A[i]); k++; if (k!=s.end()) s.erase(k); } } return s.size(); } int main() { int numChild = 0 ; cin >> numChild ; vector<int> Child ; int child_data ; for( int i = 0; i < numChild ; i++ ) { cin >> child_data ; Child.push_back( child_data ) ; } cout << numChild - LIS(Child) ; 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...