QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#535493#8726. Magic ShowWansur0 0ms1776kbC++231.0kb2024-08-28 05:56:072024-08-28 05:56:08

Judging History

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

  • [2024-08-28 05:56:08]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:1776kb
  • [2024-08-28 05:56:07]
  • 提交

Alice

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

using namespace std;
typedef long long ll;

mt19937 rng(92783458);

int p[5001];

int get(int x){
    if(p[x] == x) return x;
    return p[x] = get(p[x]);
}

vector<pair<int,int>> Alice(){
    vector<pair<int, int>> edge, ans;
    int n = 20;
    ll x = setN(n);
    for(int i=1;i<=n;i++){
        p[i] = i;
    }
    for(int i=1;i<=n;i++){
        for(int j=i+1;j<=n;j++){
            if((x & (1ll << ((i + j) % 60)))){
                edge.push_back({i, j});
            }
        }
    }
    shuffle(edge.begin(), edge.end(), rng);
    for(auto [x, y]:edge){
        if(get(x) != get(y)){
            ans.push_back({x, y});
            p[get(x)] = get(y);
        }
    }
    return ans;
}

Bob

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

using namespace std;
typedef long long ll;

long long Bob(std::vector<std::pair<int,int>> edge){
    ll ans = 0;
    for(auto [x, y]:edge){
        ans |= (1ll << ((x + y) % 60));
    }
    return ans;
}

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

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: 1772kb,1768kb

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
20
1 16
8 9
4 7
2 7
1 4
11 13
6 11
5 6
1 12
7 17
4 9
4 20
4 11
1 14
9 10
3 8
4 15
6 18
5 19

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
20
1 16
8 9
4 7
2 7
1 4
11 13
6 11
5 6
1 12
7 17
4 9
4 20
4 11
1 14
9 10
3 8
4 15
6 18
5 19

output:

2
20 14
1 4
1 12
1 14
1 16
3 8
4 7
4 9
4 20
5 6
6 11
6 18
7 17
9 10
11 13

input:

2
20 14
1 4
1 12
1 14
1 16
3 8
4 7
4 9
4 20
5 6
6 11
6 18
7 17
9 10
11 13

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17475616

Subtask #3:

score: 0
Wrong Answer

Test #25:

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

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
20
1 15
4 20
3 5
8 10
1 6
10 14
10 18
3 14
10 15
6 19
9 16
10 16
6 12
2 5
10 13
4 12
2 7
11 17
7 11

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
20
1 15
4 20
3 5
8 10
1 6
10 14
10 18
3 14
10 15
6 19
9 16
10 16
6 12
2 5
10 13
4 12
2 7
11 17
7 11

output:

2
20 14
1 6
1 15
2 5
3 5
3 14
4 12
6 19
9 16
10 13
10 14
10 15
10 16
10 18
11 17

input:

2
20 14
1 6
1 15
2 5
3 5
3 14
4 12
6 19
9 16
10 13
10 14
10 15
10 16
10 18
11 17

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
394461568