Problem swords
User G
Submission Time 2024-02-05 20:14:55
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swords.cpp: In function ‘int main()’:
swords.cpp:11:21: error: invalid conversion from ‘std::pair<int, int>*’ to ‘size_t’ {aka ‘long unsigned int’} [-fpermissive]
11 | qsort(swords,swords+n);
| ~~~~~~^~
| |
| std::pair<int, int>*
swords.cpp:11:23: error: too few arguments to function ‘void qsort(void*, size_t, size_t, __compar_fn_t)’
11 | qsort(swords,swords+n);
| ^
In file included from /usr/include/c++/9/cstdlib:75,
from /usr/include/c++/9/ext/string_conversions.h:41,
from /usr/include/c++/9/bits/basic_string.h:6496,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ost