QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#470477#1834. Eulerian?GenshinImpactsFaultCompile Error//C++14550b2024-07-10 14:03:122024-07-10 14:03:13

Judging History

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

  • [2024-07-10 14:03:13]
  • 评测
  • [2024-07-10 14:03:12]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 500010;
mt19937 rnd(random_device());
int n;
int a[N];

int main() {
	ios::sync_with_stdio(0); cin.tie(nullptr);
	cin >> n;
	for(int i = 1; i <= n; i++) a[i] = i;
	for(int i = 1; i <= 60; i++) {
		shuffle(a + 1, a + n + 1, rnd);
		cout << "? " << n / 2;
		for(int j = 1; j <= n / 2; j++) cout << " " << a[j];
		cout << endl;
		int x; cin >> x;
		if(x % 2) {
			cout << "! NO" << endl;
			return 0;
		}
	}
	cout << "! YES" << endl;
	return 0;
}

详细

In file included from /usr/include/c++/13/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51,
                 from answer.code:1:
/usr/include/c++/13/bits/stl_algo.h: In instantiation of ‘void std::shuffle(_RAIter, _RAIter, _UGenerator&&) [with _RAIter = int*; _UGenerator = mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253> (&)(random_device (*)())]’:
answer.code:14:10:   required from here
/usr/include/c++/13/bits/stl_algo.h:3763:9: error: ‘std::remove_reference<std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253> (&)(std::random_device (*)())>::type’ {aka ‘std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>(std::random_device (*)())’} is not a class, struct, or union type
 3763 |         __uc_type;
      |         ^~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:3791:44: error: ‘std::remove_reference<std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253> (&)(std::random_device (*)())>::type’ {aka ‘std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>(std::random_device (*)())’} is not a class, struct, or union type
 3791 |           const pair<__uc_type, __uc_type> __pospos =
      |                                            ^~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:3791:44: error: ‘std::remove_reference<std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253> (&)(std::random_device (*)())>::type’ {aka ‘std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>(std::random_device (*)())’} is not a class, struct, or union type