Submission #1365121

#TimeUsernameProblemLanguageResultExecution timeMemory
1365121haiphong5g0Nile (IOI24_nile)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#define task "TEST"
#define task2 "A"
#define pl pair<ll, ll>
#define VI vector<int>
#define pf push_front
#define pb push_back
#define pob pop_back
#define pof pop_front
#define mp make_pair
#define fi first
#define se second
#define FOR(i, a, b, c) for (int i=a; i<=b; i+=c)
#define FORE(i, a, b, c) for (int i=a; i>=b; i+=c)
using namespace std;
using ll = long long;
using ull = unsigned long long;
const int Mod = 1e9+7;
const int maxn = 2e5;
const ll Inf = 1e16;
ll n, q;
VI calculate_costs(VI W, VI A, VI B, VI E) {
    q = E.size(); n = W.size();
    ll sum = 0; vector<ll> res;
    FOR(i, 0, n-1, 1) sum += A[i];
    FOR(i, 0, q-1, 1) res.pb(sum);
    return res;
}
/*void Read()
{
    
}
void Solve()
{
    
}
int main()
{
    if (fopen (task".inp", "r")) {
        freopen (task".inp", "r", stdin);
        freopen (task".out", "w", stdout);
    }
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    int t;
    for (cin >> t; t--;)
    {
        Read(); Solve();
    }
}*/

Compilation message (stderr)

nile.cpp: In function 'std::vector<int> calculate_costs(std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
nile.cpp:27:12: error: could not convert 'res' from 'vector<long long int>' to 'vector<int>'
   27 |     return res;
      |            ^~~
      |            |
      |            vector<long long int>