QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#123636#6661. 야유회lcjlcj0 0ms0kbC++14751b2023-07-13 08:00:422023-07-13 08:00:44

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-13 08:00:44]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2023-07-13 08:00:42]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

const int maxn=2e5; 

int f1[maxn+5],f2[maxn+5],f3[maxn+5]; 
void init() {
	int cnt=0; 
	for (int i=0;i<(1<<20);i++) {
		if (__builtin_popcount(i)==10) {
			f1[cnt++]=i; 
		}		
	}
	cnt=0;
	for (int i=0;i<(1<<6);i++) {
		if (__builtin_popcount(i)==3) {
			f2[cnt++]=i; 
		}
	}
	cnt=0;
	for (int i=0;i<(1<<6);i++) {
		if (__builtin_popcount(i)==2) {
			f3[cnt++]=i;
		}
	}
}
int F(int f[],int u,int v) {
	int x=u,y=v;
	for (int i=0;;i++) {
		if ((x>>i&1)==1 && (y>>i&1)==0) return i; 
	} 
}

int morning(int x,int y) {
	return F(f1,x,y); 	
} 
int afternoon(int x,int y,int z) {
	return F(f3,F(f2,x,y),F(f2,y,z));  
}
int evening(int x,int y,int z) {
	return y; 
}

詳細信息

Subtask #1:

score: 0
Time Limit Exceeded

Test #1:

score: 0
Time Limit Exceeded

input:

2dc2b1d4-8de2-INPUT-bcd3-aa55b691fdb3
1
2
40 40
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
40 40
0 3 1 5 7 9 6 4 2 10 8 23 21 25 27 29 26 24 22 30 28 13 11 15 17 19 16 14 12 20 18 33 31 35 37 39 36 34 32 38

output:


result:


Subtask #2:

score: 0
Time Limit Exceeded

Test #8:

score: 0
Time Limit Exceeded

input:

2dc2b1d4-8de2-INPUT-bcd3-aa55b691fdb3
2
2
40 40
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
40 40
0 3 1 5 7 9 6 4 2 10 8 23 21 25 27 29 26 24 22 30 28 13 11 15 17 19 16 14 12 20 18 33 31 35 37 39 36 34 32 38

output:


result: