답안 #948496

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
948496 2024-03-18T07:07:41 Z irmuun 선물상자 (IOI15_boxes) C++17
0 / 100
1 ms 348 KB
#include<bits/stdc++.h>

using namespace std;

#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()

ll delivery(int N,int K,int L,int pos[]){
    ll ans=0;
    for(int i=0;i<N;i++){
        ans+=min(pos[i],L-pos[i]);
    }
    return ans;
}

Compilation message

boxes.cpp: In function 'long long int delivery(int, int, int, int*)':
boxes.cpp:12:23: warning: unused parameter 'K' [-Wunused-parameter]
   12 | ll delivery(int N,int K,int L,int pos[]){
      |                   ~~~~^
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -