제출 #891823

#제출 시각아이디문제언어결과실행 시간메모리
89182312345678선물상자 (IOI15_boxes)C++17
0 / 100
1 ms444 KiB
#include "boxes.h" #include <bits/stdc++.h> using namespace std; #define ll long long ll res=0; long long delivery(int N, int K, int L, int p[]) { int f=-1, s=-1; for (int i=0; i<N; i++) { if (p[i]<=L-p[i]) f=max(f, p[i]); else s=max(s, L-p[i]); } if (f==-1) return 2*s; else if (s==-1) return 2*f; else return L; }

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

boxes.cpp: In function 'long long int delivery(int, int, int, int*)':
boxes.cpp:10:31: warning: unused parameter 'K' [-Wunused-parameter]
   10 | long long 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...