제출 #593603

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
5936032022-07-11 12:28:25PiejanVDC사탕 분배 (IOI21_candies)C++17
컴파일 에러
0 ms0 KiB
#include "candies.h"
#include <bits/stdc++.h>
using namespace std;
#define int long long
vector<int>distribute_candies(vector<int>c, vector<int>l, vector<int>r, vector<int>v) {
const int n = (int)c.size();
const int m = (int)l.size();
vector<int>value(m+5);
value[0] = 0;
for(int i = 1 ; i <= m ; i++)
value[i] = value[i-1] + v[i-1];
vector<int>suff_max(m+1), suff_min(m+1);
suff_max[m] = INT_MIN;
suff_min[m] = INT_MAX;
for(int i = m-1 ; i >= 0 ; i--) {
suff_max[i] = max(suff_max[i+1], value[i+1]);
suff_min[i] = min(suff_min[i+1], value[i+1]);
}
vector<int>ans(n);
for(int i = 0 ; i < n ; i++) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

/usr/bin/ld: /tmp/ccjBJnfl.o: in function `main':
grader.cpp:(.text.startup+0x30e): undefined reference to `distribute_candies(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status