QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#592908#8726. Magic Show-Ofast0 0ms1892kbC++201.4kb2024-09-27 09:46:042024-09-27 09:46:05

Judging History

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

  • [2024-09-27 09:46:05]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:1892kb
  • [2024-09-27 09:46:04]
  • 提交

Alice

#include <bits/stdc++.h>
#define mp make_pair
#define fir first
#define sec second
using namespace std;

long long setN(int n);
int fa[5005];
vector <pair<int,int>> Alice(){
mt19937 rnd(20080511);
		long long X=setN(4098);
		vector <int> id;
		for(int i=0;i<4096;i++)
			id.push_back(i+3);
		shuffle(id.begin(),id.end(),rnd);
		vector <pair<int,int>> res;
		res.push_back(mp(2,1));fa[2]=1;
		int cnt=0;
		for(int i=0;i<4096;i+=64){
			for(int j=i;j<i+64;j++){
				fa[id[j]]=rnd()%(id[j]/2)+1;
				if((X>>cnt)&1){
					fa[id[j]]+=(id[j]/2)-1;
					if(id[j]==3)fa[id[j]]++;
				}
			}
			cnt++;
		}
		for(int i=3;i<=4098;i++)
			res.push_back(mp(i,fa[i]));
		return res;
	}

/*
int main(){
	ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	Alice();
	return 0;
}
*/

Bob

#include <bits/stdc++.h>
#define mp make_pair
#define fir first
#define sec second
using namespace std;

int fa[5005],inv[5005];
long long Bob(vector <pair<int,int>> p){
mt19937 rnd(20080511);
	vector <int> id;
	for(int i=0;i<4096;i++)
		id.push_back(i+3);
	shuffle(id.begin(),id.end(),rnd);
	for(int i=0;i<4096;i++)
		inv[id[i]]=i/64;
	long long ans=0;
	for(auto it:p){
		if(it.fir==2)continue;
		if(it.sec>it.fir/2)
			ans|=1ll<<(inv[it.fir]);
	}
	return ans;
}
/*
int main(){
	ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	Bob();
	return 0;
}
*/

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1892kb,1872kb

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4098
2 1
3 1
4 1
5 2
6 2
7 3
8 1
9 1
10 2
11 5
12 6
13 5
14 5
15 7
16 1
17 5
18 9
19 4
20 2
21 6
22 9
23 20
24 9
25 12
26 9
27 5
28 10
29 7
30 2
31 13
32 1
33 18
34 5
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4098
2 1
3 1
4 1
5 2
6 2
7 3
8 1
9 1
10 2
11 5
12 6
13 5
14 5
15 7
16 1
17 5
18 9
19 4
20 2
21 6
22 9
23 20
24 9
25 12
26 9
27 5
28 10
29 7
30 2
31 13
32 1
33 18
34 5
35...

output:

2
4098 3478
1 2
1 3
1 8
1 9
1 16
1 32
1 49
1 54
1 117
1 194
1 537
1 592
1 701
1 922
1 1214
2 5
2 6
2 10
2 20
2 59
2 283
2 397
2 2721
3 7
3 37
3 135
3 142
3 154
3 304
3 385
3 450
3 796
3 1091
3 2252
3 2767
4 35
4 41
4 56
4 89
4 93
4 158
4 162
4 232
4 249
4 376
4 426
4 1068
4 3897
5 11
5 13
5 14
5 17
...

input:

2
4098 3478
1 2
1 3
1 8
1 9
1 16
1 32
1 49
1 54
1 117
1 194
1 537
1 592
1 701
1 922
1 1214
2 5
2 6
2 10
2 20
2 59
2 283
2 397
2 2721
3 7
3 37
3 135
3 142
3 154
3 304
3 385
3 450
3 796
3 1091
3 2252
3 2767
4 35
4 41
4 56
4 89
4 93
4 158
4 162
4 232
4 249
4 376
4 426
4 1068
4 3897
5 11
5 13
5 14
5 17
...

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Incorrect answer.

Subtask #2:

score: 0
Wrong Answer

Test #13:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1892kb,1872kb

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4098
2 1
3 1
4 1
5 2
6 2
7 3
8 1
9 1
10 2
11 5
12 11
13 5
14 5
15 13
16 8
17 5
18 1
19 12
20 2
21 6
22 9
23 20
24 9
25 12
26 21
27 17
28 10
29 7
30 2
31 13
32 1
33 3
34 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4098
2 1
3 1
4 1
5 2
6 2
7 3
8 1
9 1
10 2
11 5
12 11
13 5
14 5
15 13
16 8
17 5
18 1
19 12
20 2
21 6
22 9
23 20
24 9
25 12
26 21
27 17
28 10
29 7
30 2
31 13
32 1
33 3
34 ...

output:

2
4098 3478
1 2
1 3
1 8
1 9
1 18
1 32
1 49
1 54
1 117
1 194
1 537
1 592
1 922
1 1214
2 5
2 6
2 10
2 20
2 59
2 283
2 397
2 2721
3 7
3 33
3 37
3 135
3 142
3 304
3 385
3 450
3 1091
3 2252
4 41
4 56
4 93
4 158
4 162
4 232
4 376
4 426
4 1034
4 1068
4 3897
5 11
5 13
5 14
5 17
5 34
5 38
5 82
5 87
5 267
5 6...

input:

2
4098 3478
1 2
1 3
1 8
1 9
1 18
1 32
1 49
1 54
1 117
1 194
1 537
1 592
1 922
1 1214
2 5
2 6
2 10
2 20
2 59
2 283
2 397
2 2721
3 7
3 33
3 37
3 135
3 142
3 304
3 385
3 450
3 1091
3 2252
4 41
4 56
4 93
4 158
4 162
4 232
4 376
4 426
4 1034
4 1068
4 3897
5 11
5 13
5 14
5 17
5 34
5 38
5 82
5 87
5 267
5 6...

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Incorrect answer.

Subtask #3:

score: 0
Wrong Answer

Test #25:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1892kb,1872kb

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4098
2 1
3 2
4 1
5 3
6 4
7 5
8 1
9 4
10 2
11 9
12 11
13 5
14 11
15 13
16 8
17 12
18 9
19 12
20 2
21 15
22 19
23 10
24 20
25 12
26 21
27 17
28 23
29 20
30 2
31 27
32 1
33...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4098
2 1
3 2
4 1
5 3
6 4
7 5
8 1
9 4
10 2
11 9
12 11
13 5
14 11
15 13
16 8
17 12
18 9
19 12
20 2
21 15
22 19
23 10
24 20
25 12
26 21
27 17
28 23
29 20
30 2
31 27
32 1
33...

output:

2
4098 3478
1 2
1 8
1 32
1 49
1 117
1 194
1 922
1 1214
2 3
2 10
2 20
2 283
2 397
3 5
3 190
3 385
3 450
3 796
3 1091
4 6
4 9
4 89
4 158
4 426
4 1068
4 3897
5 7
5 13
5 87
5 267
5 602
5 2436
6 50
6 66
6 205
6 603
6 1673
6 2826
6 3717
7 80
7 1483
8 16
8 164
8 322
8 398
8 460
8 589
8 1296
8 2029
8 2440
8...

input:

2
4098 3478
1 2
1 8
1 32
1 49
1 117
1 194
1 922
1 1214
2 3
2 10
2 20
2 283
2 397
3 5
3 190
3 385
3 450
3 796
3 1091
4 6
4 9
4 89
4 158
4 426
4 1068
4 3897
5 7
5 13
5 87
5 267
5 602
5 2436
6 50
6 66
6 205
6 603
6 1673
6 2826
6 3717
7 80
7 1483
8 16
8 164
8 322
8 398
8 460
8 589
8 1296
8 2029
8 2440
8...

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Incorrect answer.