QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#426170 | #7281. How to Avoid Disqualification in 75 Easy Steps | Lynkcat | 65.000001 | 316ms | 25204kb | C++20 | 1.6kb | 2024-05-30 21:57:31 | 2024-05-30 21:57:31 |
Judging History
answer
#include<bits/stdc++.h>
#include "avoid.h"
#define poly vector<signed>
#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<signed,signed> scout(signed R, signed H)
{
unordered_map<ll,int>Mp;
for (int i=1;i<=1000;i++)
{
poly ww(B,0);
for (int j=0;j<B;j++) ww[j]=j;
while (1)
{
shuffle(ww.begin(),ww.end(),rnd);
val[i]=0;
for (int j=0;j<8;j++) val[i]|=(1ll<<ww[j]);
unordered_map<ll,int>tmp;
bool bl=1;
for (int j=1;j<=i;j++)
{
bl&=!Mp.count(val[j]|val[i]);
bl&=!tmp.count(val[j]|val[i]);
if (!bl) break;
tmp[val[j]|val[i]]=1;
}
if (!bl) continue;
for (int j=1;j<=i;j++) Mp[val[j]|val[i]]=1;
break;
}
}
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
...
*/
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 208ms
memory: 25028kb
input:
output:
result:
wrong answer Not correct
Subtask #2:
score: 0
Wrong Answer
Test #11:
score: 0
Wrong Answer
time: 223ms
memory: 25204kb
input:
\x14
output:
result:
wrong answer Not correct
Subtask #3:
score: 10
Accepted
Test #66:
score: 10
Accepted
time: 251ms
memory: 24344kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #67:
score: 10
Accepted
time: 256ms
memory: 24348kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #68:
score: 10
Accepted
time: 223ms
memory: 24512kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #69:
score: 10
Accepted
time: 242ms
memory: 24364kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #70:
score: 10
Accepted
time: 264ms
memory: 24400kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #71:
score: 10
Accepted
time: 294ms
memory: 24448kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #72:
score: 10
Accepted
time: 255ms
memory: 24460kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #73:
score: 10
Accepted
time: 257ms
memory: 24356kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #74:
score: 10
Accepted
time: 256ms
memory: 24356kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #75:
score: 10
Accepted
time: 283ms
memory: 24460kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #76:
score: 10
Accepted
time: 316ms
memory: 24364kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #77:
score: 10
Accepted
time: 263ms
memory: 24532kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #78:
score: 10
Accepted
time: 289ms
memory: 24408kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #79:
score: 10
Accepted
time: 275ms
memory: 24440kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #80:
score: 10
Accepted
time: 275ms
memory: 24532kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #81:
score: 10
Accepted
time: 248ms
memory: 24360kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #82:
score: 10
Accepted
time: 273ms
memory: 24400kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #83:
score: 10
Accepted
time: 214ms
memory: 24532kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #84:
score: 10
Accepted
time: 203ms
memory: 24364kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #85:
score: 10
Accepted
time: 229ms
memory: 24452kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #86:
score: 10
Accepted
time: 282ms
memory: 24352kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #87:
score: 10
Accepted
time: 264ms
memory: 24432kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #88:
score: 10
Accepted
time: 253ms
memory: 24352kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #89:
score: 10
Accepted
time: 246ms
memory: 24532kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #90:
score: 10
Accepted
time: 248ms
memory: 24468kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #91:
score: 10
Accepted
time: 283ms
memory: 24452kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #92:
score: 10
Accepted
time: 259ms
memory: 24352kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #93:
score: 10
Accepted
time: 289ms
memory: 24448kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #94:
score: 10
Accepted
time: 266ms
memory: 24532kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #95:
score: 10
Accepted
time: 214ms
memory: 24464kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #96:
score: 10
Accepted
time: 251ms
memory: 24440kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #97:
score: 10
Accepted
time: 247ms
memory: 24456kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #98:
score: 10
Accepted
time: 255ms
memory: 24424kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #99:
score: 10
Accepted
time: 222ms
memory: 24396kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #100:
score: 10
Accepted
time: 266ms
memory: 24400kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #101:
score: 10
Accepted
time: 244ms
memory: 24344kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #102:
score: 10
Accepted
time: 277ms
memory: 24528kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #103:
score: 10
Accepted
time: 274ms
memory: 24452kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #104:
score: 10
Accepted
time: 254ms
memory: 24452kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #105:
score: 10
Accepted
time: 308ms
memory: 24420kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #106:
score: 10
Accepted
time: 291ms
memory: 24460kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #107:
score: 10
Accepted
time: 286ms
memory: 24404kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #108:
score: 10
Accepted
time: 285ms
memory: 24448kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #109:
score: 10
Accepted
time: 276ms
memory: 24360kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #110:
score: 10
Accepted
time: 291ms
memory: 24440kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #111:
score: 10
Accepted
time: 246ms
memory: 24432kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #112:
score: 10
Accepted
time: 281ms
memory: 24392kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #113:
score: 10
Accepted
time: 262ms
memory: 24436kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #114:
score: 10
Accepted
time: 288ms
memory: 24388kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #115:
score: 10
Accepted
time: 267ms
memory: 24356kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #116:
score: 10
Accepted
time: 267ms
memory: 24400kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #117:
score: 10
Accepted
time: 306ms
memory: 24348kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #118:
score: 10
Accepted
time: 283ms
memory: 24412kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Test #119:
score: 10
Accepted
time: 251ms
memory: 24424kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 1 hour(s) passed
Subtask #4:
score: 55
Acceptable Answer
Test #120:
score: 55
Acceptable Answer
time: 229ms
memory: 24440kb
input:
K
output:
result:
points 0.73333334920 points 0.73333334920 Correct: 30 robot(s) used, 1 hour(s) passed
Test #121:
score: 55
Acceptable Answer
time: 250ms
memory: 24444kb
input:
K
output:
result:
points 0.73333334920 points 0.73333334920 Correct: 30 robot(s) used, 1 hour(s) passed
Test #122:
score: 55
Acceptable Answer
time: 281ms
memory: 24404kb
input:
K
output:
result:
points 0.73333334920 points 0.73333334920 Correct: 30 robot(s) used, 1 hour(s) passed
Test #123:
score: 55
Acceptable Answer
time: 265ms
memory: 24404kb
input:
K
output:
result:
points 0.73333334920 points 0.73333334920 Correct: 30 robot(s) used, 1 hour(s) passed
Test #124:
score: 55
Acceptable Answer
time: 278ms
memory: 24464kb
input:
K
output:
result:
points 0.73333334920 points 0.73333334920 Correct: 30 robot(s) used, 1 hour(s) passed
Test #125:
score: 55
Acceptable Answer
time: 268ms
memory: 24392kb
input:
K
output:
result:
points 0.73333334920 points 0.73333334920 Correct: 30 robot(s) used, 1 hour(s) passed
Test #126:
score: 55
Acceptable Answer
time: 232ms
memory: 24528kb
input:
K
output:
result:
points 0.73333334920 points 0.73333334920 Correct: 30 robot(s) used, 1 hour(s) passed
Test #127:
score: 55
Acceptable Answer
time: 272ms
memory: 24344kb
input:
K
output:
result:
points 0.73333334920 points 0.73333334920 Correct: 30 robot(s) used, 1 hour(s) passed
Test #128:
score: 55
Acceptable Answer
time: 258ms
memory: 24440kb
input:
K
output:
result:
points 0.73333334920 points 0.73333334920 Correct: 30 robot(s) used, 1 hour(s) passed
Test #129:
score: 55
Acceptable Answer
time: 242ms
memory: 24440kb
input:
K
output:
result:
points 0.73333334920 points 0.73333334920 Correct: 30 robot(s) used, 1 hour(s) passed
Test #130:
score: 55
Acceptable Answer
time: 244ms
memory: 24348kb
input:
K
output:
result:
points 0.73333334920 points 0.73333334920 Correct: 30 robot(s) used, 1 hour(s) passed
Test #131:
score: 55
Acceptable Answer
time: 251ms
memory: 24364kb
input:
K
output:
result:
points 0.73333334920 points 0.73333334920 Correct: 30 robot(s) used, 1 hour(s) passed
Test #132:
score: 55
Acceptable Answer
time: 238ms
memory: 24444kb
input:
K
output:
result:
points 0.73333334920 points 0.73333334920 Correct: 30 robot(s) used, 1 hour(s) passed
Test #133:
score: 55
Acceptable Answer
time: 247ms
memory: 24468kb
input:
K
output:
result:
points 0.73333334920 points 0.73333334920 Correct: 30 robot(s) used, 1 hour(s) passed
Test #134:
score: 55
Acceptable Answer
time: 236ms
memory: 24412kb
input:
K
output:
result:
points 0.73333334920 points 0.73333334920 Correct: 30 robot(s) used, 1 hour(s) passed