제출 #1357154

#제출 시각아이디문제언어결과실행 시간메모리
1357154lyra_g13메기 농장 (IOI22_fish)C++20
컴파일 에러
0 ms0 KiB
#include "fish.h"
#include <bits/stdc++.h>
using ll = long long;
using namespace std;

int64_t max_weights(int n, int m, vector<int> x, vector<int> y, vector<int> w) {

  vector<vector<ll>> grid(n, vector<ll>(n));

  ll sum = 0;
  for (int i = 0; i < w.size(); i++) {
    sum += w[i];
  }
  return sum;
};

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

fish.cpp:6:9: error: ambiguating new declaration of 'int64_t max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)'
    6 | int64_t max_weights(int n, int m, vector<int> x, vector<int> y, vector<int> w) {
      |         ^~~~~~~~~~~
In file included from fish.cpp:1:
fish.h:3:11: note: old declaration 'long long int max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)'
    3 | long long max_weights(int N, int M, std::vector<int> X, std::vector<int> Y,
      |           ^~~~~~~~~~~