제출 #673729

#제출 시각아이디문제언어결과실행 시간메모리
673729Hacv16선물상자 (IOI15_boxes)C++17
10 / 100
1 ms212 KiB
#include<bits/stdc++.h> using namespace std; const int INF = 0x3f3f3f3f; typedef long long ll; ll getDist(ll x, ll y, ll l){ if(y > x) swap(x, y); return min(x - y, l - x + y); } ll delivery(int n, int k, int l, int p[]){ ll ans = 0; for(int i = 0; i < n; i++) ans += 2 * getDist(0, p[i], l); return ans; }

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

boxes.cpp: In function 'll delivery(int, int, int, int*)':
boxes.cpp:13:24: warning: unused parameter 'k' [-Wunused-parameter]
   13 | ll delivery(int n, int k, int l, int p[]){
      |                    ~~~~^
#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...