제출 #604259

#제출 시각아이디문제언어결과실행 시간메모리
604259cheissmart선물상자 (IOI15_boxes)C++14
0 / 100
1 ms300 KiB
#include "boxes.h" #include <bits/stdc++.h> #define F first #define S second #define V vector #define PB push_back #define EB emplace_back #define MP make_pair #define SZ(v) int((v).size()) #define ALL(v) (v).begin(), (v).end() using namespace std; typedef long long ll; typedef pair<int, int> pi; typedef V<int> vi; const int INF = 1e9 + 7; ll delivery(int n, int k, int l, int p[]) { vi a; for(int i = 0; i < n; i++) if(p[i]) a.PB(p[i]); n = SZ(a); ll ans = 0; for(int i = 0; i < n; i++) { ans += min(a[i], l - a[i]); } return ans; }

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

boxes.cpp: In function 'll delivery(int, int, int, int*)':
boxes.cpp:20:24: warning: unused parameter 'k' [-Wunused-parameter]
   20 | 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...