제출 #582748

#제출 시각아이디문제언어결과실행 시간메모리
582748MohamedFaresNebili선물상자 (IOI15_boxes)C++14
0 / 100
0 ms212 KiB
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
 
        using namespace std;
        using namespace __gnu_pbds;
 
        using ll = long long;
        using pi = pair<ll, pair<ll, ll>>;
        using ii = pair<int, int>;
 
        #define pb push_back
        #define pp pop_back
        #define ff first
        #define ss second
 
        typedef tree<int, null_type, less<int>, rb_tree_tag,
            tree_order_statistics_node_update> indexed_set;
 
        int delivery(int N, int K, int L, int P[]) {
            ll res = 0;
            for(int l = 0; l < N; l++) {
                res += min(P[l], L - P[l]);
            }
            return res;
        }

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

boxes.cpp: In function 'int delivery(int, int, int, int*)':
boxes.cpp:24:20: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
   24 |             return res;
      |                    ^~~
boxes.cpp:19:33: warning: unused parameter 'K' [-Wunused-parameter]
   19 |         int 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...