In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from permutation.cpp:1:
/usr/include/c++/10/bits/stl_algo.h: In instantiation of 'void std::random_shuffle(_RAIter, _RAIter, _Generator&&) [with _RAIter = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; _Generator = std::uniform_int_distribution<long int>&]':
permutation.cpp:54:43: required from here
/usr/include/c++/10/bits/stl_algo.h:4636:48: error: no match for call to '(std::uniform_int_distribution<long int>) (__gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type)'
4636 | _RandomAccessIterator __j = __first + __rand((__i - __first) + 1);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/bits/stl_algo.h:66,
from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from permutation.cpp:1:
/usr/include/c++/10/bits/uniform_int_dist.h:188:2: note: candidate: 'std::uniform_int_distribution<_IntType>::result_type std::uniform_int_distribution<_IntType>::operator()(_UniformRandomNumberGenerator&) [with _UniformRandomNumberGenerator = long int; _IntType = long int; std::uniform_int_distribution<_IntType>::result_type = long int]' (near match)
188 | operator()(_UniformRandomNumberGenerator& __urng)
| ^~~~~~~~
/usr/include/c++/10/bits/uniform_int_dist.h:188:2: note: conversion of argument 1 would be ill-formed:
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from permutation.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:4636:65: error: cannot bind non-const lvalue reference of type 'long int&' to an rvalue of type '__gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type' {aka 'long int'}
4636 | _RandomAccessIterator __j = __first + __rand((__i - __first) + 1);
| ~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/10/bits/stl_algo.h:66,
from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from permutation.cpp:1:
/usr/include/c++/10/bits/uniform_int_dist.h:193:2: note: candidate: 'template<class _UniformRandomNumberGenerator> std::uniform_int_distribution<_IntType>::result_type std::uniform_int_distribution<_IntType>::operator()(_UniformRandomNumberGenerator&, const std::uniform_int_distribution<_IntType>::param_type&) [with _UniformRandomNumberGenerator = _UniformRandomNumberGenerator; _IntType = long int]'
193 | operator()(_UniformRandomNumberGenerator& __urng,
| ^~~~~~~~
/usr/include/c++/10/bits/uniform_int_dist.h:193:2: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from permutation.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:4636:48: note: candidate expects 2 arguments, 1 provided
4636 | _RandomAccessIterator __j = __first + __rand((__i - __first) + 1);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~
stub.cpp: In function 'int query(int*)':
stub.cpp:15:9: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
15 | fscanf(stdin, "%d", &x);
| ~~~~~~^~~~~~~~~~~~~~~~~
stub.cpp: In function 'int main(int, char**)':
stub.cpp:48:9: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
48 | fscanf(stdin, "%d", &N);
| ~~~~~~^~~~~~~~~~~~~~~~~