QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#601267#8726. Magic Showxwh_Marvelous0 1ms1952kbC++141.6kb2024-09-29 21:59:352024-09-29 21:59:35

Judging History

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

  • [2024-09-29 21:59:35]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:1952kb
  • [2024-09-29 21:59:35]
  • 提交

Alice

#include<bits/stdc++.h>
#include"Alice.h"
using namespace std;
//#define int long long
//#define mod 1000000007
#define N 5005
//#define pii pair<int,int>
//#define fi first
//#define se second
//#define rep(i,j,k) for(int i=j;i<=k;i++)
vector<std::pair<int, int>>op;
int a[N],b[N];
vector<int>ls[2];
int n=5000;
mt19937 rd(156168);
int p[N];
void gen(){
	for(int i=3;i<=5000;i++)a[i]=rd()%63;
	b[1]=0,b[2]=1;
	for(int i=3;i<=5000;i++)b[i]=rd()%2;
	for(int i=1;i<=5000;i++)p[i]=i;
	for(int i=5000;i>1;i--)swap(p[i],p[rd()%i+1]);
}
std::vector<std::pair<int, int>> Alice(){
	long long x=setN(5000);
	gen();
	op.push_back({1,2});
	ls[0].push_back(p[1]),ls[1].push_back(p[2]);
	for(int i=3;i<=n;i++){
		op.push_back({p[ls[(x>>a[i])&1][rd()%ls[(x>>a[i])&1].size()]],p[i]});
		ls[b[i]].push_back(i);
	}
	return op;
}

Bob

#include<bits/stdc++.h>
#include"Bob.h"
using namespace std;
// #define int long long
//#define mod 1000000007
#define N 5005
//#define pii pair<int,int>
#define fi first
#define se second
//#define rep(i,j,k) for(int i=j;i<=k;i++)
vector<std::pair<int, int>>op;
int a[N],b[N];
int n=5000;
mt19937 rd(156168);
int p[N],q[N];
void gen(){
	for(int i=3;i<=5000;i++)a[i]=rd()%63;
	b[1]=0,b[2]=1;
	for(int i=3;i<=5000;i++)b[i]=rd()%2;
	for(int i=1;i<=5000;i++)p[i]=i;
	for(int i=5000;i>1;i--)swap(p[i],p[rd()%i+1]);
	for(int i=1;i<=5000;i++)q[p[i]]=i;
}
long long Bob(std::vector<std::pair<int, int>> V){
	gen();
	long long ans=0;
	for(auto op:V){
		int u=op.fi,v=op.se;
		u=q[u],v=q[v];
		if(u>v)swap(u,v);
		ans|=(b[u]<<a[v]);
	}
	return ans;
}

詳細信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 1ms = 1ms + 0ms
memory: 1952kb,1780kb

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1 2
944 4716
4280 669
4280 3799
3799 1814
1814 2617
2617 4972
1814 1400
3799 4078
4078 660
1814 788
3799 4475
3799 339
4475 2852
788 3892
4475 3906
4475 4676
4280 3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1 2
944 4716
4280 669
4280 3799
3799 1814
1814 2617
2617 4972
1814 1400
3799 4078
4078 660
1814 788
3799 4475
3799 339
4475 2852
788 3892
4475 3906
4475 4676
4280 3...

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.

input:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.

Subtask #2:

score: 0
Wrong Answer

Test #13:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1948kb,1780kb

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1 2
4280 4716
4280 669
4280 3799
3799 1814
1814 2617
2617 4972
1814 1400
3799 4078
4078 660
1814 788
3799 4475
3799 339
4475 2852
788 3892
4475 3906
4475 4676
4280 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1 2
4280 4716
4280 669
4280 3799
3799 1814
1814 2617
2617 4972
1814 1400
3799 4078
4078 660
1814 788
3799 4475
3799 339
4475 2852
788 3892
4475 3906
4475 4676
4280 ...

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.

input:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.

Subtask #3:

score: 0
Wrong Answer

Test #25:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1952kb,1776kb

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1 2
944 4716
944 669
4280 3799
3799 1814
1814 2617
4280 4972
4972 1400
3799 4078
4972 660
1814 788
669 4475
3799 339
4475 2852
339 3892
3892 3906
3892 4676
669 3105...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1 2
944 4716
944 669
4280 3799
3799 1814
1814 2617
4280 4972
4972 1400
3799 4078
4972 660
1814 788
669 4475
3799 339
4475 2852
339 3892
3892 3906
3892 4676
669 3105...

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.

input:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.