제출 #623482

#제출 시각아이디문제언어결과실행 시간메모리
623482teki선물상자 (IOI15_boxes)C++11
10 / 100
1 ms308 KiB
#include <bits/stdc++.h>
#ifndef LOCAL_DEBUG
    #include "boxes.h"
#endif

#define pb push_back
#define MS(x,y) memset((x), (y), sizeof((x)))
typedef long long ll;
const ll MN = 1000000007;

using namespace std;

ll delivery (int n, int k, int l, int pos[]) {
    ll res = 0;

    for (int i = 0; i<n; i++) res += min(pos[i],l-pos[i])*2;

    return res;
}

#ifdef LOCAL_DEBUG
int main() {
    #ifdef LOCAL_DEBUG
        fstream cin("in.txt");
    #endif

    ios_base::sync_with_stdio(false);
    cout.tie(0);
    cin.tie(0);


}
#endif

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

boxes.cpp: In function 'll delivery(int, int, int, int*)':
boxes.cpp:13:25: warning: unused parameter 'k' [-Wunused-parameter]
   13 | ll delivery (int n, int k, int l, int pos[]) {
      |                     ~~~~^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...