QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#19588#2426. The Xana couphualianCompile Error//C++14570b2022-02-06 11:39:562022-05-18 04:06:52

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-05-18 04:06:52]
  • 评测
  • [2022-02-06 11:39:56]
  • 提交

answer

#include "swaps.h"
#include <bits/stdc++.h>
#define pi pair<int,int>
#define mk make_pair
#define rep(i,  a) for(register int i=1,i##end=a;i<=i##end;i++)
using namespace std;
void solve(int n, int D) {
	vector<int>ans;ans.resize(n);
	rep(i,n)ans[i-1]=i;
	for (int i=0;i<D;i++) {
		vector<pi>A;
		for(int j=i%2;j+1<ans.size();j+=2) {
			schedule(ans[j],ans[j+1]);
			A.push_back(mk(j,j+1));
		}
		if(!A.empty()){
			auto res=visit();
			for(int j=0;j<A.size();j++)
				if(!res[j])swap(ans[A[j].first],ans[A[j].second]);
		}
	}
	answer(ans);return;
}

詳細信息

answer.code:1:10: fatal error: swaps.h: No such file or directory
    1 | #include "swaps.h"
      |          ^~~~~~~~~
compilation terminated.