답안 #530357

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
530357 2022-02-25T07:54:43 Z toilaai132 사탕 분배 (IOI21_candies) C++17
컴파일 오류
0 ms 0 KB
#pragma GCC optimize("O2")
#include<bits/stdc++.h>
#define ll long long
#define ii pair<ll, ll>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define si (ll)(1e6 + 9)
#define mod (ll)(1e9 + 7)
#define multiTest unsigned ll numTest; for (cin >> numTest; numTest--;)
#define el cout << "\n"

using namespace std;

vector<int> distribute_candies(vector<int> C, vector<int> L, vector<int> R, vector<int> V) {
    int N = C.size(), Q = V.size();

    vector<int> s(N, 0);
    for (int i = 0; i < Q; ++ i) for (int j = L[i]; j <= R[i]; ++ j) s[j] = max(0, min(C[j], s[j] + V[i]));
    return s;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
}

Compilation message

/usr/bin/ld: /tmp/ccm6kCj2.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccScngn2.o:candies.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status