boxes.cpp: In function 'int rnd(int, int)':
boxes.cpp:5:30: warning: conversion to 'int' from 'std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>::result_type {aka long unsigned int}' may alter its value [-Wconversion]
int rnd(int l,int r){return l+rng()%(r-l+1);}
~^~~~~~~~~~~~~~
boxes.cpp: In function 'int delivery(int, int, int, std::vector<int>)':
boxes.cpp:48:45: warning: declaration of 'N' shadows a global declaration [-Wshadow]
int delivery(int N,int K,int L,vector<int> p){ n=N, k=K, m=L;
^
boxes.cpp:28:11: note: shadowed declaration is here
const int N=1010;
^
boxes.cpp:7:23: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
#define forinc(a,b,c) for(int a=b,_c=c;a<=_c;++a)
^
boxes.cpp:52:5: note: in expansion of macro 'forinc'
forinc(i,0,n-1) a[(int)(lower_bound(all(val),p[i])-val.begin())]++; a[0]=0;
^~~~~~
boxes.cpp:52:73: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
forinc(i,0,n-1) a[(int)(lower_bound(all(val),p[i])-val.begin())]++; a[0]=0;
^
boxes.cpp:53:15: warning: conversion to 'int' from 'std::vector<int>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
L=val.size();
~~~~~~~~^~
/tmp/ccr4CXD7.o: In function `main':
grader.c:(.text.startup+0x22f): undefined reference to `delivery(int, int, int, int*)'
collect2: error: ld returned 1 exit status