Submission #4266

# Submission time Handle Problem Language Result Execution time Memory
4266 2013-09-08T04:37:03 Z dbfud 줄 세우기 (KOI13_jul) C++
0 / 22
824 ms 10872 KB
#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 time Memory Grader output
1 Correct 0 ms 1676 KB Output is correct
2 Incorrect 0 ms 1676 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1676 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 1808 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 12 ms 1808 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 392 ms 5948 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 824 ms 10872 KB Output isn't correct
2 Halted 0 ms 0 KB -