QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#29602#2554. AND PLUS ORAK_DreamTL 0ms0kbC++348b2022-04-21 16:23:032022-04-28 15:25:15

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-04-28 15:25:15]
  • 评测
  • 测评结果:TL
  • 用时:0ms
  • 内存:0kb
  • [2022-04-21 16:23:03]
  • 提交

answer

#include <bits/stdc++.h>
#define N 1200005
using namespace std;

int n, a[N];

int main() {
	mt19937 rnd(time(0));
	scanf("%d", &n); n = 1<<n;
	for (int i = 0; i < n; i++) scanf("%d", &a[i]);
	while (1) {
		int x, y; 
		x = rnd()%n, y = rnd()%n;
		if (a[x]+a[y] < a[x&y]+a[x|y]) {
			printf("%d %d\n", x, y);
		}
	}	
	return 0;
} 

詳細信息

Test #1:

score: 0
Time Limit Exceeded

input:

2
0 1 1 2

output:


result: