QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#540213#8726. Magic Showzzafanti0 0ms1872kbC++231.4kb2024-08-31 16:39:112024-08-31 16:39:11

Judging History

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

  • [2024-08-31 16:39:11]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:1872kb
  • [2024-08-31 16:39:11]
  • 提交

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 4800
#define P 100
using namespace std;
std::vector<std::pair<int,int>> Alice(){
  long long X=setN(N+1);

  vector<pair<int,int>> T;
  for(int i=1; i<=N/2; i++){
    int u=(i-1)%P;
    if(((i-1)/P%2)&&(X>>u&1)||((i-1)/P%2==0)&&(X>>(P-u-1)&1)) T.emplace_back(i,i*2+1);
    else T.emplace_back(i,i*2);
  }
  for(int i=N/2+1; i<N; i++) T.emplace_back(i,i+1);
  assert(T.size()==N-1);
  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 100
#define N 4800
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/2) continue;
    if(pt.second==pt.first*2) 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
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1868kb,1768kb

input:

1
4005

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Number of edges returned by Alice() is not n-1.

input:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Number of edges returned by Alice() is not n-1.

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Number of edges returned by Alice() is not n-1.

input:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Number of edges returned by Alice() is not n-1.

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Number of edges returned by Alice() is not n-1.

Subtask #2:

score: 0
Wrong Answer

Test #13:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1868kb,1768kb

input:

1
17476204

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Number of edges returned by Alice() is not n-1.

input:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Number of edges returned by Alice() is not n-1.

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Number of edges returned by Alice() is not n-1.

input:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Number of edges returned by Alice() is not n-1.

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Number of edges returned by Alice() is not n-1.

Subtask #3:

score: 0
Wrong Answer

Test #25:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1872kb,1772kb

input:

1
355365355024496523

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Number of edges returned by Alice() is not n-1.

input:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Number of edges returned by Alice() is not n-1.

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Number of edges returned by Alice() is not n-1.

input:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Number of edges returned by Alice() is not n-1.

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Number of edges returned by Alice() is not n-1.