Submission #516228

#TimeUsernameProblemLanguageResultExecution timeMemory
516228MohamedAliSaidane선물상자 (IOI15_boxes)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
#include "souvenirs.h"
using namespace std;

typedef long long ll;
typedef long double ld;

typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;

typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpi;
typedef vector<pll> vpl;

#define pb push_back
#define popb pop_back
#define all(v) (v).begin(),(v).end()

#define ff first
#define ss second

const ll INF=  1e18 ;
const ll MOD = 1e9 + 7;

int n, k, l;
vi A;
ll delivery(int N, int K, int L, vi positions)
{
    n = N, k = K, l = L;
    A = positions;
    ll ans = 0ll;
    ll maxt = 0ll;
    for(auto e: positions)
    {
        ans += (ll)(min(e,l-e));
    }
    return 2ll*ans;
}
/*
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    int N, K, L;
    vi positions;
    cin >> N >> K >> L;
    for(int i = 0; i <N; i ++)
    {
        int x; cin >> x;
        positions.pb(x);
    }
    cout << delivery(N,K,L,positions);
}*/

Compilation message (stderr)

boxes.cpp:2:10: fatal error: souvenirs.h: No such file or directory
    2 | #include "souvenirs.h"
      |          ^~~~~~~~~~~~~
compilation terminated.