QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#590488#8726. Magic Showisirazeev0 0ms1828kbC++201.5kb2024-09-26 00:48:352024-09-26 00:48:36

Judging History

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

  • [2024-09-26 00:48:36]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:1828kb
  • [2024-09-26 00:48:35]
  • 提交

Alice

#include <vector>
#include "Alice.h"

using namespace std;

// 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().

std::vector<std::pair<int,int>> Alice(){
    const int N = 61 * 40 + 61;
    long long x = setN(N);
    vector<pair<int, int>> edges;
    int cnt[N + 1];
    for(int i = 0; i <= N; i++) cnt[i] = 0;
    for(int i = 1; i < 61; i++){
        edges.emplace_back(i, i + 1);
    }
    for(int bit = 60; bit >= 0; bit--){
        if(((x >> bit) & 1) == 1){
            for(int j = 62 + bit * 40; j < 62 + (bit + 1) * 40; j++){
                edges.emplace_back(bit + 1, j);
                cnt[j]++;
            }
        }
    }
    for(int i = 62; i < N; i++){
        if(cnt[i] == 0 || cnt[i + 1] == 0)
            edges.emplace_back(i, i + 1);
    }
    return edges;
}

Bob

#include <vector>
#include "Bob.h"

using namespace std;

long long Bob(std::vector<std::pair<int,int>> V){
    const int N = 61 * 40 + 61;
    int cnt[N + 1];
    for(int i = 0; i <= N; i++) cnt[i] = 0;
    for(int i = 1; i < (int)V.size(); i++){
        pair<int, int> p = V[i];
        cnt[p.first]++, cnt[p.second]++;
    }
    int res = 0;
    for(int i = 1; i <= 61; i++){
        int bit = i - 1;
        if(cnt[i] > 0)
            res += (1 << bit);
    }
    return res;
}

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1824kb,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: 1828kb,1764kb

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: 1820kb,1764kb

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.