QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#793010#8952. 解谜游戏misfits#30 115ms4076kbC++141.5kb2024-11-29 15:50:552024-11-29 15:51:00

Judging History

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

  • [2024-11-29 15:51:00]
  • 评测
  • 测评结果:30
  • 用时:115ms
  • 内存:4076kb
  • [2024-11-29 15:50:55]
  • 提交

answer

#include<bits/stdc++.h>
#include "puzzle.h"
#define LL int
#define SZ(x) ((LL)(x.size()))
#define all(x) (x).begin(),(x).end()
using namespace std;
/*inline LL read(){
  LL q=0,w=1;char ch=getchar();
  while(ch>'9' || ch<'0'){if(ch=='-')w=-1;ch=getchar();}
  while(ch>='0'&&ch<='9'){q=q*10+(ch-'0');ch=getchar();}
  return q*w;
}
void write(LL x){
  if(x<0){putchar('-');x=(-x);}
  if(x>9)write(x/10);
  putchar('0'+x%10);
}
inline void writeln(LL x){write(x);puts("");}
inline void writecs(LL x){write(x);putchar(' ');}*/

inline void dmin(LL &x,LL y){if(x>y)x=y;return ;}
inline void dmax(LL &x,LL y){if(x<y)x=y;return ;}

#define cout cerr
#define pb push_back

namespace GenHelper{
#define ull unsigned long long
  ull seed=19260817ull;
  inline void Get(){seed^=(seed<<7);seed^=(seed>>11);seed^=(seed<<13);}
  inline ull Rand(){Get();return (seed^(seed<<32ull));}
}using GenHelper::Rand;
inline LL random(LL l,LL r){return (Rand()%(r-l+1)+l);}

const LL N = 1000+95 ;
bitset<N>ok[N];LL a[N];
void play(LL n){
  for(LL x=0;x<n;x++){a[x]=n;for(LL i=0;i<n;i++)ok[x][i]=1;}
  while(true){
    vector<LL>p(n);
    for(LL i=0;i<n;i++)p[i]=i;
    for(LL i=0;i<n;i++)swap(p[i],p[random(0,(n-1))]);
    LL cnt=query(p);
    if(!cnt){for(LL i=0;i<n;i++){a[i]-=ok[i][p[i]];ok[i][p[i]]=0;}}
    LL TC=0;
    for(LL i=0;i<n;i++)TC+=((a[i]==1)?(1):(0));
    if(TC==n)break;
  }
  vector<LL>p;
  for(LL i=0;i<n;i++)
    for(LL j=0;j<n;j++)if(ok[i][j])p.pb(j);
  check(p);return ;
}

详细

Subtask #1:

score: 2
Accepted

Test #1:

score: 2
Accepted
time: 0ms
memory: 3872kb

input:

1 2 816815200

result:

ok accepted: cnt = 1

Test #2:

score: 2
Accepted
time: 0ms
memory: 3780kb

input:

1 3 723182155

result:

ok accepted: cnt = 14

Test #3:

score: 2
Accepted
time: 0ms
memory: 4068kb

input:

1 5 971867682

result:

ok accepted: cnt = 36

Test #4:

score: 2
Accepted
time: 0ms
memory: 3808kb

input:

1 3 887042235

result:

ok accepted: cnt = 4

Test #5:

score: 2
Accepted
time: 0ms
memory: 3876kb

input:

1 3 568659743

result:

ok accepted: cnt = 14

Test #6:

score: 2
Accepted
time: 0ms
memory: 3780kb

input:

1 5 930991667

result:

ok accepted: cnt = 48

Test #7:

score: 2
Accepted
time: 0ms
memory: 4016kb

input:

1 5 185481439

result:

ok accepted: cnt = 29

Test #8:

score: 2
Accepted
time: 0ms
memory: 3800kb

input:

1 5 405685705

result:

ok accepted: cnt = 37

Test #9:

score: 2
Accepted
time: 0ms
memory: 4068kb

input:

1 5 693401039

result:

ok accepted: cnt = 24

Test #10:

score: 2
Accepted
time: 0ms
memory: 3788kb

input:

1 5 570594473

result:

ok accepted: cnt = 21

Subtask #2:

score: 4
Accepted

Test #11:

score: 4
Accepted
time: 0ms
memory: 3780kb

input:

2 2 931107645

result:

ok accepted: cnt = 1

Test #12:

score: 4
Accepted
time: 0ms
memory: 3784kb

input:

2 4 512124670

result:

ok accepted: cnt = 17

Test #13:

score: 4
Accepted
time: 0ms
memory: 3980kb

input:

2 4 793864173

result:

ok accepted: cnt = 19

Test #14:

score: 4
Accepted
time: 0ms
memory: 3808kb

input:

2 7 322910591

result:

ok accepted: cnt = 111

Test #15:

score: 4
Accepted
time: 0ms
memory: 3804kb

input:

2 9 316192686

result:

ok accepted: cnt = 94

Test #16:

score: 4
Accepted
time: 0ms
memory: 3780kb

input:

2 10 350886420

result:

ok accepted: cnt = 76

Test #17:

score: 4
Accepted
time: 0ms
memory: 3776kb

input:

2 10 914937911

result:

ok accepted: cnt = 97

Test #18:

score: 4
Accepted
time: 0ms
memory: 3808kb

input:

2 10 68729974

result:

ok accepted: cnt = 106

Test #19:

score: 4
Accepted
time: 0ms
memory: 3800kb

input:

2 10 15788440

result:

ok accepted: cnt = 73

Test #20:

score: 4
Accepted
time: 0ms
memory: 4064kb

input:

2 10 950846282

result:

ok accepted: cnt = 129

Subtask #3:

score: 6
Accepted

Test #21:

score: 6
Accepted
time: 0ms
memory: 3780kb

input:

3 2 667362636

result:

ok accepted: cnt = 4

Test #22:

score: 6
Accepted
time: 0ms
memory: 4068kb

input:

3 4 890842001

result:

ok accepted: cnt = 17

Test #23:

score: 6
Accepted
time: 0ms
memory: 3800kb

input:

3 3 225277415

result:

ok accepted: cnt = 4

Test #24:

score: 6
Accepted
time: 0ms
memory: 3788kb

input:

3 26 235413642

result:

ok accepted: cnt = 606

Test #25:

score: 6
Accepted
time: 0ms
memory: 3812kb

input:

3 25 139642984

result:

ok accepted: cnt = 362

Test #26:

score: 6
Accepted
time: 0ms
memory: 4068kb

input:

3 30 991911708

result:

ok accepted: cnt = 943

Test #27:

score: 6
Accepted
time: 0ms
memory: 4076kb

input:

3 30 4514256

result:

ok accepted: cnt = 519

Test #28:

score: 6
Accepted
time: 1ms
memory: 3736kb

input:

3 30 157113423

result:

ok accepted: cnt = 547

Test #29:

score: 6
Accepted
time: 0ms
memory: 3792kb

input:

3 30 557648974

result:

ok accepted: cnt = 417

Test #30:

score: 6
Accepted
time: 1ms
memory: 4068kb

input:

3 30 645022468

result:

ok accepted: cnt = 801

Test #31:

score: 6
Accepted
time: 0ms
memory: 3808kb

input:

4 2 427653480

result:

ok accepted: cnt = 4

Test #32:

score: 6
Accepted
time: 0ms
memory: 3804kb

input:

4 3 219860551

result:

ok accepted: cnt = 14

Test #33:

score: 6
Accepted
time: 0ms
memory: 3804kb

input:

4 4 165138325

result:

ok accepted: cnt = 17

Test #34:

score: 6
Accepted
time: 2ms
memory: 3876kb

input:

4 93 525060479

result:

ok accepted: cnt = 2568

Test #35:

score: 6
Accepted
time: 2ms
memory: 4076kb

input:

4 99 829735778

result:

ok accepted: cnt = 3027

Subtask #4:

score: 8
Accepted

Test #36:

score: 8
Accepted
time: 2ms
memory: 3788kb

input:

4 100 6610818

result:

ok accepted: cnt = 2551

Test #37:

score: 8
Accepted
time: 2ms
memory: 4076kb

input:

4 100 653323659

result:

ok accepted: cnt = 2391

Test #38:

score: 8
Accepted
time: 2ms
memory: 3796kb

input:

4 100 268513130

result:

ok accepted: cnt = 2440

Test #39:

score: 8
Accepted
time: 2ms
memory: 3876kb

input:

4 100 479581529

result:

ok accepted: cnt = 2990

Test #40:

score: 8
Accepted
time: 2ms
memory: 3796kb

input:

4 100 119844914

result:

ok accepted: cnt = 3308

Subtask #5:

score: 10
Accepted

Test #41:

score: 10
Accepted
time: 0ms
memory: 3880kb

input:

5 2 527801655

result:

ok accepted: cnt = 1

Test #42:

score: 10
Accepted
time: 0ms
memory: 4072kb

input:

5 5 235665947

result:

ok accepted: cnt = 50

Test #43:

score: 10
Accepted
time: 0ms
memory: 3784kb

input:

5 3 648413779

result:

ok accepted: cnt = 4

Test #44:

score: 10
Accepted
time: 13ms
memory: 3916kb

input:

5 272 737778828

result:

ok accepted: cnt = 8128

Test #45:

score: 10
Accepted
time: 14ms
memory: 3852kb

input:

5 278 173436130

result:

ok accepted: cnt = 8373

Test #46:

score: 10
Accepted
time: 19ms
memory: 3724kb

input:

5 300 997862299

result:

ok accepted: cnt = 10978

Test #47:

score: 10
Accepted
time: 17ms
memory: 3828kb

input:

5 300 764271855

result:

ok accepted: cnt = 9571

Test #48:

score: 10
Accepted
time: 13ms
memory: 3904kb

input:

5 300 428892383

result:

ok accepted: cnt = 9493

Test #49:

score: 10
Accepted
time: 17ms
memory: 3908kb

input:

5 300 166706392

result:

ok accepted: cnt = 11548

Test #50:

score: 10
Accepted
time: 13ms
memory: 3848kb

input:

5 300 843444435

result:

ok accepted: cnt = 9376

Subtask #6:

score: 0
Wrong Answer

Test #51:

score: 10
Accepted
time: 0ms
memory: 3800kb

input:

6 2 183795068

result:

ok accepted: cnt = 1

Test #52:

score: 10
Accepted
time: 0ms
memory: 3780kb

input:

6 5 63668012

result:

ok accepted: cnt = 30

Test #53:

score: 10
Accepted
time: 0ms
memory: 4068kb

input:

6 5 990398365

result:

ok accepted: cnt = 37

Test #54:

score: 10
Accepted
time: 44ms
memory: 4040kb

input:

6 488 942578687

result:

ok accepted: cnt = 17267

Test #55:

score: 10
Accepted
time: 45ms
memory: 3880kb

input:

6 475 915148470

result:

ok accepted: cnt = 16802

Test #56:

score: 10
Accepted
time: 49ms
memory: 3828kb

input:

6 500 736505651

result:

ok accepted: cnt = 17452

Test #57:

score: 0
Wrong Answer
time: 56ms
memory: 3712kb

input:

6 500 352417213

result:

wrong answer too_many_queries

Subtask #7:

score: 0
Wrong Answer

Test #61:

score: 60
Accepted
time: 0ms
memory: 3784kb

input:

7 2 412859550

result:

ok accepted: cnt = 1

Test #62:

score: 60
Accepted
time: 0ms
memory: 3780kb

input:

7 4 892225546

result:

ok accepted: cnt = 44

Test #63:

score: 60
Accepted
time: 0ms
memory: 4064kb

input:

7 4 577686541

result:

ok accepted: cnt = 41

Test #64:

score: 0
Wrong Answer
time: 115ms
memory: 3784kb

input:

7 902 974849567

result:

wrong answer too_many_queries