QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#558905#8835. GoodmanlntanoCompile Error//C++14527b2024-09-11 19:15:352024-09-11 19:15:35

Judging History

你现在查看的是最新测评结果

  • [2024-09-11 19:15:35]
  • 评测
  • [2024-09-11 19:15:35]
  • 提交

answer

#include<bits[表情]dc++.h>
#define ll long long
using namespace std;
ll num[2020200],f[2020200];
int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll t,n;
	cin>>t;
	while(t--){
		cin>>n;
		vector<ll> a;
		for(int i=1;i<=n;i++){
			f[i]=0;
			cin>>num[i];
		}
		for(int i=1;i<=n;i++){
			if(f[i]) continue;
			ll temp=i;
			while(!f[temp]){
				a.push_back(temp);
				f[temp]=1;
				temp=num[temp];
			}
		}
		for(auto it:a){
			cout<<it<<" ";
		}
		cout<<'\n';
	} 
	return 0;
}

詳細信息

answer.code:1:9: fatal error: bits[表情]dc++.h: No such file or directory
    1 | #include<bits[表情]dc++.h>
      |         ^~~~~~~~~~~~~~~~~~
compilation terminated.