QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#426162 | #7281. How to Avoid Disqualification in 75 Easy Steps | Lynkcat | 0 | 0ms | 0kb | C++20 | 1.5kb | 2024-05-30 21:51:17 | 2024-05-30 21:51:18 |
answer
#include<bits/stdc++.h>
#include "avoid.h"
#define poly vector<int>
#define IOS ios::sync_with_stdio(false)
#define ll long long
#define mp make_pair
#define mt make_tuple
#define pa pair < int,int >
#define fi first
#define se second
#define inf 1e18
#define mod 998244353
#define sz(x) ((int)((x).size()))
// #define int ll
// #define N
using namespace std;
const int d[4]={3,5,7,11};
const int B=30;
mt19937_64 rnd(time(0));
ll val[1005];
pair<int,int> scout(int R, int H)
{
for (int i=1;i<=1000;i++)
{
poly ww(B,0);
for (int j=0;j<B;j++) ww[j]=j;
shuffle(ww.begin(),ww.end(),rnd);
for (int j=0;j<8;j++) val[i]|=(1ll<<ww[j]);
}
unordered_map<ll,int>Mp;
for (int i=1;i<=1000;i++)
for (int j=i;j<=1000;j++)
{
// cout<<i<<" "<<j<<" "<<(val[i]|val[j])<<endl;
assert(!Mp.count(val[i]|val[j]));
Mp[val[i]|val[j]]=1;
}
for (int i=0;i<B;i++)
{
poly now;
for (int j=1;j<=1000;j++)
if ((val[j]>>i)&1) now.push_back(j);
send(now);
}
poly now=wait();
ll res=0;
for (int i=0;i<sz(now);i++)
if (now[i]) res|=(1ll<<i);
for (int i=1;i<=1000;i++)
for (int j=i;j<=1000;j++)
if (res==(val[i]|val[j]))
{
return mp(i,j);
}
}
/*list:
1.mod 998244353 or 1e9+7 or ???
2.N
3.duipai shuju xingtai duoyidian
...
*/
詳細信息
Subtask #1:
score: 0
Runtime Error
Test #1:
score: 0
Runtime Error
input:
output:
result:
Subtask #2:
score: 0
Runtime Error
Test #11:
score: 0
Runtime Error
input:
\x14
output:
result:
Subtask #3:
score: 0
Runtime Error
Test #66:
score: 0
Runtime Error
input:
\x1e
output:
result:
Subtask #4:
score: 0
Runtime Error
Test #120:
score: 0
Runtime Error
input:
K