제출 #813139

#제출 시각아이디문제언어결과실행 시간메모리
813139OrazB선물상자 (IOI15_boxes)C++14
0 / 100
0 ms212 KiB
#include <bits/stdc++.h> // #include "boxes.h" using namespace std; #define all(x) (x).begin(), (x).end() #define ll long long int #define pii pair <int, int> #define pb push_back #define ff first #define ss second // const int N = 1e5+5; ll delivery(int n, int K, int L, int p[]){ int j = -1; for (int i = 0; i < n; i++){ if (L-p[i] >= p[i]) j = i; } if (j == -1 or j == n-1) return n; return min(n, min(n, p[j]*2)+min(n, (L-p[j+1])*2)); } // int main () // { // ios::sync_with_stdio(false); // cin.tie(0); // cin >> t; // while (t--){ // } // }

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

boxes.cpp: In function 'long long int 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...