boxes.cpp: In function 'long long int delivery(int, int, int, int*)':
boxes.cpp:13:19: error: reference to 'left' is ambiguous
if(i < k) left[i] = 2*p[i];
^~~~
boxes.cpp:5:18: note: candidates are: long long int left [10000005]
static long long left[10000005];
^~~~
In file included from /usr/include/c++/7/ios:42:0,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from boxes.cpp:2:
/usr/include/c++/7/bits/ios_base.h:999:3: note: std::ios_base& std::left(std::ios_base&)
left(ios_base& __base)
^~~~
boxes.cpp:14:14: error: reference to 'left' is ambiguous
else left[i] = left[i-k] + p[i] * 2;
^~~~
boxes.cpp:5:18: note: candidates are: long long int left [10000005]
static long long left[10000005];
^~~~
In file included from /usr/include/c++/7/ios:42:0,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from boxes.cpp:2:
/usr/include/c++/7/bits/ios_base.h:999:3: note: std::ios_base& std::left(std::ios_base&)
left(ios_base& __base)
^~~~
boxes.cpp:14:24: error: reference to 'left' is ambiguous
else left[i] = left[i-k] + p[i] * 2;
^~~~
boxes.cpp:5:18: note: candidates are: long long int left [10000005]
static long long left[10000005];
^~~~
In file included from /usr/include/c++/7/ios:42:0,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from boxes.cpp:2:
/usr/include/c++/7/bits/ios_base.h:999:3: note: std::ios_base& std::left(std::ios_base&)
left(ios_base& __base)
^~~~
boxes.cpp:16:18: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
for(int i = n-1;i >= 0;i--){
~^~
boxes.cpp:17:24: error: reference to 'right' is ambiguous
if(i + k >= n) right[i] = (l - p[i]) * 2;
^~~~~
boxes.cpp:6:18: note: candidates are: long long int right [10000005]
static long long right[10000005];
^~~~~
In file included from /usr/include/c++/7/ios:42:0,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from boxes.cpp:2:
/usr/include/c++/7/bits/ios_base.h:1007:3: note: std::ios_base& std::right(std::ios_base&)
right(ios_base& __base)
^~~~~
boxes.cpp:18:14: error: reference to 'right' is ambiguous
else right[i] = right[i+k] + (l - p[i]) * 2;
^~~~~
boxes.cpp:6:18: note: candidates are: long long int right [10000005]
static long long right[10000005];
^~~~~
In file included from /usr/include/c++/7/ios:42:0,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from boxes.cpp:2:
/usr/include/c++/7/bits/ios_base.h:1007:3: note: std::ios_base& std::right(std::ios_base&)
right(ios_base& __base)
^~~~~
boxes.cpp:18:25: error: reference to 'right' is ambiguous
else right[i] = right[i+k] + (l - p[i]) * 2;
^~~~~
boxes.cpp:6:18: note: candidates are: long long int right [10000005]
static long long right[10000005];
^~~~~
In file included from /usr/include/c++/7/ios:42:0,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from boxes.cpp:2:
/usr/include/c++/7/bits/ios_base.h:1007:3: note: std::ios_base& std::right(std::ios_base&)
right(ios_base& __base)
^~~~~
boxes.cpp:26:25: error: reference to 'left' is ambiguous
long long ans = min(left[n-1], right[0]);
^~~~
boxes.cpp:5:18: note: candidates are: long long int left [10000005]
static long long left[10000005];
^~~~
In file included from /usr/include/c++/7/ios:42:0,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from boxes.cpp:2:
/usr/include/c++/7/bits/ios_base.h:999:3: note: std::ios_base& std::left(std::ios_base&)
left(ios_base& __base)
^~~~
boxes.cpp:26:36: error: reference to 'right' is ambiguous
long long ans = min(left[n-1], right[0]);
^~~~~
boxes.cpp:6:18: note: candidates are: long long int right [10000005]
static long long right[10000005];
^~~~~
In file included from /usr/include/c++/7/ios:42:0,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from boxes.cpp:2:
/usr/include/c++/7/bits/ios_base.h:1007:3: note: std::ios_base& std::right(std::ios_base&)
right(ios_base& __base)
^~~~~
boxes.cpp:29:30: error: reference to 'left' is ambiguous
if(i != -1) value += left[i];
^~~~
boxes.cpp:5:18: note: candidates are: long long int left [10000005]
static long long left[10000005];
^~~~
In file included from /usr/include/c++/7/ios:42:0,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from boxes.cpp:2:
/usr/include/c++/7/bits/ios_base.h:999:3: note: std::ios_base& std::left(std::ios_base&)
left(ios_base& __base)
^~~~
boxes.cpp:34:30: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
int pnt2 = i + 1 + k * (circles - 1);
~~~~~~^~~~~~~~~~~~~~~~~~~
boxes.cpp:47:28: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
int endpnt = i + 1 + k * circles;
~~~~~~^~~~~~~~~~~~~
boxes.cpp:48:33: error: reference to 'right' is ambiguous
if(endpnt < n) value += right[endpnt];
^~~~~
boxes.cpp:6:18: note: candidates are: long long int right [10000005]
static long long right[10000005];
^~~~~
In file included from /usr/include/c++/7/ios:42:0,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from boxes.cpp:2:
/usr/include/c++/7/bits/ios_base.h:1007:3: note: std::ios_base& std::right(std::ios_base&)
right(ios_base& __base)
^~~~~
boxes.cpp: At global scope:
boxes.cpp:6:18: warning: 'right' defined but not used [-Wunused-variable]
static long long right[10000005];
^~~~~
boxes.cpp:5:18: warning: 'left' defined but not used [-Wunused-variable]
static long long left[10000005];
^~~~