답안 #627353

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
627353 2022-08-12T13:31:54 Z Valenz 메기 농장 (IOI22_fish) C++17
컴파일 오류
0 ms 0 KB
long long max_weights(int N, int M,std::vector<int> X,std::vector<int> Y,std::vector<int> W)
{
    long long ans=0;
    for(int i=0;i<M;i++)
    {
        ans+=W[i];
    }
    return ans;
}

Compilation message

fish.cpp:1:36: error: 'std::vector' has not been declared
    1 | long long max_weights(int N, int M,std::vector<int> X,std::vector<int> Y,std::vector<int> W)
      |                                    ^~~
fish.cpp:1:47: error: expected ',' or '...' before '<' token
    1 | long long max_weights(int N, int M,std::vector<int> X,std::vector<int> Y,std::vector<int> W)
      |                                               ^
fish.cpp: In function 'long long int max_weights(int, int, int)':
fish.cpp:6:14: error: 'W' was not declared in this scope
    6 |         ans+=W[i];
      |              ^