제출 #1331212

#제출 시각아이디문제언어결과실행 시간메모리
1331212michael12선물상자 (IOI15_boxes)C++20
컴파일 에러
0 ms0 KiB
#include "boxes.h"
#include<bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define endl '\n'
using namespace std;
const int maxn = 1e6 + 5;
const int inf = 1e9 + 5;
int delivery(int N, int K, int L, int p[]){
    int cur = 0;
    for(int i = 0; i < N; i++){
        cur += 2 * p[i];
    }

    return cur;

}

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

boxes.cpp:10:5: error: ambiguating new declaration of 'int delivery(int, int, int, int*)'
   10 | int delivery(int N, int K, int L, int p[]){
      |     ^~~~~~~~
In file included from boxes.cpp:1:
boxes.h:4:11: note: old declaration 'long long int delivery(int, int, int, int*)'
    4 | long long delivery(int N, int K, int L, int p[]);
      |           ^~~~~~~~