QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#540260#8726. Magic Showzzafanti0 0ms0kbC++231.4kb2024-08-31 16:45:092024-08-31 16:45:10

Judging History

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

  • [2024-08-31 16:45:10]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2024-08-31 16:45:09]
  • 提交

Alice

#include <vector>
#include "Alice.h"
#include<bits/stdc++.h>

// you may define some global variables, but it does not work if you try to transfer any information from function Alice() to function Bob() through these variables.
// you had better not use the same global variables in function Alice() and in function Bob().

#define N 4977
#define P 63
using namespace std;
std::vector<std::pair<int,int>> Alice(){
  long long X=setN(N+2);

  vector<pair<int,int>> T;
  for(int i=1; i<=N; i++){
    int u=(i-1)%P;
    if(((i-1)/P%2)&&(X>>u&1)||((i-1)/P%3==0)&&(X>>(P-u-1)&1)) T.emplace_back(i,i+2);
    else T.emplace_back(i,i+1);
  }
  T.emplace_back(N+1,N+2);
  assert(T.size()==N);
  return T;
}

Bob

#include <vector>
#include "Bob.h"
#include <bits/stdc++.h>

// you may define some global variables, but it does not work if you try to transfer any information from function Alice() to function Bob() through these variables.
// you had better not use the same global variables in function Alice() and in function Bob().

using namespace std;
#define P 63
#define N 4977
long long Bob(std::vector<std::pair<int,int>> V){
  long long ret=0;
  for(auto pt:V){
    int x=(pt.first-1)%P,y=(pt.first-1)/P;
    if(pt.first>N) continue;
    if(pt.second==pt.first+1) continue;
    if(y%2==0) ret|=(1ll<<(P-x-1));
    else ret|=(1ll<<x);
  }
  return ret;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Runtime Error

Test #1:

score: 0
Runtime Error

input:

1
4005

output:


Subtask #2:

score: 0
Runtime Error

Test #13:

score: 0
Runtime Error

input:

1
17476204

output:


Subtask #3:

score: 0
Runtime Error

Test #25:

score: 0
Runtime Error

input:

1
355365355024496523

output: