boxes.cpp: In function 'int dist(int, int)':
boxes.cpp:13:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (L < NN && R >= NN) ret = (LL - V1) + V2; ret *= 2;
^~
boxes.cpp:13:47: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
if (L < NN && R >= NN) ret = (LL - V1) + V2; ret *= 2;
^~~
boxes.cpp:14:12: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
return min(1LL * LL, ret);
~~~^~~~~~~~~~~~~~~
boxes.cpp: In function 'long long int delivery(int, int, int, int*)':
boxes.cpp:36:46: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
minx = min(minx, sum + dist(cx, ex + N - 1));
^
boxes.cpp:36:43: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
minx = min(minx, sum + dist(cx, ex + N - 1));
~~~~~~~^~~