Submission #668800

#TimeUsernameProblemLanguageResultExecution timeMemory
668800AstraytBoxes with souvenirs (IOI15_boxes)C++17
0 / 100
1 ms212 KiB
#include <bits/stdc++.h> using namespace std; long long delivery(int N, int K, int L, int pos[]){ if(K == 1){ int ret = 0; for(int i = 0; i < N; ++i){ int dist = min(pos[i], L - pos[i]); ret += 2ll * dist; } return ret; } }

Compilation message (stderr)

boxes.cpp: In function 'long long int delivery(int, int, int, int*)':
boxes.cpp:9:8: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
    9 |    ret += 2ll * dist;
      |    ~~~~^~~~~~~~~~~~~
boxes.cpp:13:1: warning: control reaches end of non-void function [-Wreturn-type]
   13 | }
      | ^
#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...