답안 #4267

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
4267 2013-09-08T04:41:58 Z dbfud 줄 세우기 (KOI13_jul) C++
컴파일 오류
0 ms 0 KB
#include <iostream>
using namespace std; 

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 ) ; 
    }
    
    int Count = 1; 
    int Max = 0 ; 
    
    for ( int i = 0; i < numChild ; i++ )
    {
        if ( Child[i] < Child[i+1] ) 
           Count++ ;
        else 
           Count = 0 ;
        
        if ( Count > Max )
           Max = Count ; 
        
    }
    
    cout << numChild - Max ; 
    
    return 0;
}

Compilation message

jul.cpp: In function 'int main()':
jul.cpp:9:5: error: 'vector' was not declared in this scope
jul.cpp:9:12: error: expected primary-expression before 'int'
jul.cpp:9:12: error: expected ';' before 'int'
jul.cpp:14:10: error: 'Child' was not declared in this scope
jul.cpp:22:14: error: 'Child' was not declared in this scope