QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#568035 | #9310. Permutation Counting 4 | zny780624 | Compile Error | / | / | C++20 | 1.0kb | 2024-09-16 15:00:50 | 2024-09-16 15:00:50 |
Judging History
你现在查看的是最新测评结果
- [2024-09-18 14:56:40]
- hack成功,自动添加数据
- (/hack/835)
- [2024-09-18 14:41:06]
- hack成功,自动添加数据
- (/hack/831)
- [2024-09-17 12:14:52]
- hack成功,自动添加数据
- (/hack/825)
- [2024-09-16 15:00:50]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2024-09-16 15:00:50]
- 提交
answer
#include<iostream>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<cmath>
#include<bitset>
#include<cstring>
#include<queue>
#define fst first
#define sec second
using namespace std;
using ll=long long;
typedef pair<int,int>pii;
const int N=1e6+10;
ll f[N];
int find(ll a)
{
return a==f[a]?a:find();
}
void Silverwolf(){
int n,l,r,y=1;
cin>>n;
for(int i=1;i<=n;i++)f[i]=i;
for(int i=1;i<=n;i++)
{
cin>>l>>r;
int fl=find(l);
int fr=find(r+1);
if(fl==fr)
{
y=0;
break;
}
}
if(y)cout<<1<<endl;
else cout<<0<<endl;
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int T;cin>>T;while(T--)
Silverwolf();
//愿艾利欧三度为你窥见,令你的生命永不停歇,骇入永远成功,游戏永远胜利。
//游戏就只是为了游戏,仅此而已
//acm这种东西,三两下搞定就好啦
return 0;
}
Details
answer.code: In function ‘int find(ll)’: answer.code:19:26: error: no matching function for call to ‘find()’ 19 | return a==f[a]?a:find(); | ~~~~^~ In file included from /usr/include/c++/13/bits/locale_facets.h:48, from /usr/include/c++/13/bits/basic_ios.h:37, from /usr/include/c++/13/ios:46, from /usr/include/c++/13/ostream:40, from /usr/include/c++/13/iostream:41, from answer.code:1: /usr/include/c++/13/bits/streambuf_iterator.h:435:5: note: candidate: ‘template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)’ 435 | find(istreambuf_iterator<_CharT> __first, | ^~~~ /usr/include/c++/13/bits/streambuf_iterator.h:435:5: note: template argument deduction/substitution failed: answer.code:19:26: note: candidate expects 3 arguments, 0 provided 19 | return a==f[a]?a:find(); | ~~~~^~ In file included from /usr/include/c++/13/algorithm:61, from answer.code:2: /usr/include/c++/13/bits/stl_algo.h:3889:5: note: candidate: ‘template<class _IIter, class _Tp> constexpr _IIter std::find(_IIter, _IIter, const _Tp&)’ 3889 | find(_InputIterator __first, _InputIterator __last, | ^~~~ /usr/include/c++/13/bits/stl_algo.h:3889:5: note: template argument deduction/substitution failed: answer.code:19:26: note: candidate expects 3 arguments, 0 provided 19 | return a==f[a]?a:find(); | ~~~~^~ In file included from /usr/include/c++/13/algorithm:73: /usr/include/c++/13/pstl/glue_algorithm_defs.h:60:1: note: candidate: ‘template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::find(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)’ 60 | find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); | ^~~~ /usr/include/c++/13/pstl/glue_algorithm_defs.h:60:1: note: template argument deduction/substitution failed: answer.code:19:26: note: candidate expects 4 arguments, 0 provided 19 | return a==f[a]?a:find(); | ~~~~^~ answer.code:17:5: note: candidate: ‘int find(ll)’ 17 | int find(ll a) | ^~~~ answer.code:17:5: note: candidate expects 1 argument, 0 provided