Submission #535401

# Submission time Handle Problem Language Result Execution time Memory
535401 2022-03-10T08:34:32 Z pokmui9909 Distributing Candies (IOI21_candies) C++17
Compilation error
0 ms 0 KB
#include "candies.h"
#include <bits/stdc++.h
using namespace std;
using ll = long long;

ll N, Q;
vector<int> a;

std::vector<int> distribute_candies(std::vector<int> c, std::vector<int> l,
                                    std::vector<int> r, std::vector<int> v) {

    N = c.size(), Q = l.size();
    for(int i = 0; i < Q; i++){
        for(int j = l[i]; j <= r[i]; j++){
            a[j] += v[i];
            a[j] = min(a[j], c[j]);
            a[j] = max(a[j], 0);
        }
    }
    return a;
}

Compilation message

candies.cpp:2:24: error: missing terminating > character
    2 | #include <bits/stdc++.h
      |                        ^