Submission #165326

#TimeUsernameProblemLanguageResultExecution timeMemory
165326losmi247Boxes with souvenirs (IOI15_boxes)C++14
0 / 100
2 ms376 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e7+67; ll n,k,l,a[N]; int delivery(int d,int K,int L,int positions[]){ n = d,k = K,l = L; for(int i = 1; i <= n; i++){ a[i] = positions[i-1]; } if(k == 1){ ll sol = 0; for(int i = 1; i <= n; i++){ sol += min(2*a[i],l); } return sol; } if(k == n){ } } /*int main(){ }*/

Compilation message (stderr)

boxes.cpp: In function 'int delivery(int, int, int, int*)':
boxes.cpp:18:16: warning: conversion to 'int' from 'll {aka long long int}' may alter its value [-Wconversion]
         return sol;
                ^~~
boxes.cpp:23:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#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...