QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#118476#6661. 야유회eyiigjkn0 3ms4524kbC++14802b2023-07-03 16:30:162023-07-03 16:30:18

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-03 16:30:18]
  • 评测
  • 测评结果:0
  • 用时:3ms
  • 内存:4524kb
  • [2023-07-03 16:30:16]
  • 提交

answer

# include "workshop.h"
# include <bits/stdc++.h>
using namespace std;
using ll=long long;
constexpr int N=1e5,B=1e3;
constexpr ll B4=(ll)B*B*B*B;
int id[100010];
unordered_map<ll,int> mp;
unordered_map<ll,bitset<40>> pre,suf;
mt19937 rnd;
void init()
{
	static int a[100010];
	iota(a,a+N,0);
	shuffle(a,a+N,rnd);
	for(int i=0;i<N;i++) id[a[i]]=i%B;
}
int morning(int my_num,int right_num){return id[my_num];}
int afternoon(int left_num,int my_num,int right_num){return left_num*B*B+my_num*B+right_num;}
int evening(int left_num,int my_num,int right_num)
{
	ll x=(ll)left_num*B*B+right_num%(B*B);
	auto it=mp.find(x);
	if(it!=mp.end()) return it->second;
	bitset<40> nvis=~(pre[x/B]|suf[x%B4]);
	int t=mp[x]=nvis._Find_first();
	pre[x%B4].set(t);suf[x/B].set(t);
	return t;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 3ms = 2ms + 1ms
memory: 4436kb,3688kb

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:

dd180566-1d37-PIPE-b85d-c176ae85727d
3 2
28 28 28 28
89 88 8b 8a 8d 8c 8f 8e 81 80 83 82 85 84 87 86 99 98 9b 9a 9d 9c 9f 9e 91 90 93 92 95 94 97 96 a9 a8 ab aa ad ac af ae 
00000241 00000280 000003cd 00000042 00000122 00000241 000000f0 00000358 00000091 0000016e 000002c5 00000066 00000029 00000350 ...

input:

dd180566-1d37-PIPE-b85d-c176ae85727d
3 2
28 28 28 28
89 88 8b 8a 8d 8c 8f 8e 81 80 83 82 85 84 87 86 99 98 9b 9a 9d 9c 9f 9e 91 90 93 92 95 94 97 96 a9 a8 ab aa ad ac af ae 
00000241 00000280 000003cd 00000042 00000122 00000241 000000f0 00000358 00000091 0000016e 000002c5 00000066 00000029 00000350 ...

output:

64be09ab-d709-ERROR-82bc-c23f6124dd26
Wrong Answer [7]

result:

wrong answer Wrong Answer [7]

Subtask #2:

score: 0
Wrong Answer

Test #8:

score: 0
Wrong Answer
time: 1ms = 0ms + 1ms
memory: 4524kb,3708kb

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:

dd180566-1d37-PIPE-b85d-c176ae85727d
3 2
28 28 28 28
89 88 8b 8a 8d 8c 8f 8e 81 80 83 82 85 84 87 86 99 98 9b 9a 9d 9c 9f 9e 91 90 93 92 95 94 97 96 a9 a8 ab aa ad ac af ae 
00000241 00000280 000003cd 00000042 00000122 00000241 000000f0 00000358 00000091 0000016e 000002c5 00000066 00000029 00000350 ...

input:

dd180566-1d37-PIPE-b85d-c176ae85727d
3 2
28 28 28 28
89 88 8b 8a 8d 8c 8f 8e 81 80 83 82 85 84 87 86 99 98 9b 9a 9d 9c 9f 9e 91 90 93 92 95 94 97 96 a9 a8 ab aa ad ac af ae 
00000241 00000280 000003cd 00000042 00000122 00000241 000000f0 00000358 00000091 0000016e 000002c5 00000066 00000029 00000350 ...

output:

64be09ab-d709-ERROR-82bc-c23f6124dd26
Wrong Answer [7]

result:

wrong answer Wrong Answer [7]