제출 #657538

#제출 시각아이디문제언어결과실행 시간메모리
657538coding_snorlaxCatfish Farm (IOI22_fish)C++17
컴파일 에러
0 ms0 KiB
#include "fish.h" #include<bits/stdc++.h> using namespace std; long long int max_weights(int N,int M,vector<int> x,vector<int> y,vector<int> w){ long long int answer=0; for(int i=0;i<M;i++){ answer+=W[i]; } return answer; }

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

fish.cpp: In function 'long long int max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:7:17: error: 'W' was not declared in this scope
    7 |         answer+=W[i];
      |                 ^