foo.cpp: In function 'int main()':
foo.cpp:140:32: warning: unknown conversion type character 'l' in format [-Wformat=]
if(flag)printf("%lld\n",ans);
^
foo.cpp:140:32: warning: too many arguments for format [-Wformat-extra-args]
foo.cpp:115:11: warning: unused variable 'j' [-Wunused-variable]
int i,j;
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62:0,
from foo.cpp:5:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h: In instantiation of '_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&) [with _RandomAccessIterator = secnode*; _Tp = secnode]':
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:2307:70: required from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator) [with _RandomAccessIterator = secnode*]'
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:2338:54: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size) [with _RandomAccessIterator = secnode*; _Size = int]'
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:5475:36: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = secnode*]'
foo.cpp:119:21: required from here
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:2269:19: error: passing 'const secnode' as 'this' argument of 'bool secnode::operator<(const secnode&)' discards qualifiers [-fpermissive]
while (__pivot < *__last)
^