답안 #724324

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
724324 2023-04-15T05:56:38 Z raul2008487 메기 농장 (IOI22_fish) C++17
컴파일 오류
0 ms 0 KB
#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;
}

Compilation message

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;
      |            ^~~