제출 #1307502

#제출 시각아이디문제언어결과실행 시간메모리
1307502huangzijia11Catfish Farm (IOI22_fish)C++20
컴파일 에러
0 ms0 KiB
long long max_weights(int N, int M, vector<int> X, vector<int> Y, vector<int> W) { long long res = 0; for (int i = 0; i < M; i++) { res += W[i]; } return res; }

컴파일 시 표준 에러 (stderr) 메시지

fish.cpp:1:37: error: 'vector' has not been declared
    1 | long long max_weights(int N, int M, vector<int> X, vector<int> Y, vector<int> W) {
      |                                     ^~~~~~
fish.cpp:1:43: error: expected ',' or '...' before '<' token
    1 | long long max_weights(int N, int M, vector<int> X, vector<int> Y, vector<int> W) {
      |                                           ^
fish.cpp: In function 'long long int max_weights(int, int, int)':
fish.cpp:4:16: error: 'W' was not declared in this scope
    4 |         res += W[i];
      |                ^