제출 #724324

#제출 시각아이디문제언어결과실행 시간메모리
724324raul2008487메기 농장 (IOI22_fish)C++17
컴파일 에러
0 ms0 KiB
#include "fish.h" #include <vector> long long max_weights(int N, int M, std::vector<int> X, std::vector<int> Y, std::vector<int> W) { ll ans=0,i; for(i=0;i<W.size();i++){ ans+=W[i]; } return ans; }

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

fish.cpp: In function 'long long int max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:6:5: error: 'll' was not declared in this scope
    6 |     ll ans=0,i;
      |     ^~
fish.cpp:7:9: error: 'i' was not declared in this scope
    7 |     for(i=0;i<W.size();i++){
      |         ^
fish.cpp:8:9: error: 'ans' was not declared in this scope
    8 |         ans+=W[i];
      |         ^~~
fish.cpp:10:12: error: 'ans' was not declared in this scope
   10 |     return ans;
      |            ^~~