QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#540195 | #8726. Magic Show | zzafanti | 0 | 0ms | 1872kb | C++23 | 1.4kb | 2024-08-31 16:36:55 | 2024-08-31 16:36:56 |
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 5000
#define P 100
using namespace std;
std::vector<std::pair<int,int>> Alice(){
long long X=setN(N);
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 5000
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,1772kb
input:
1 4005
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Edges returned by Alice() have invalid node.
input:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Edges returned by Alice() have invalid node.
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Edges returned by Alice() have invalid node.
input:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Edges returned by Alice() have invalid node.
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Edges returned by Alice() have invalid node.
Subtask #2:
score: 0
Wrong Answer
Test #13:
score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1868kb,1816kb
input:
1 17476204
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 2 4 3 6 4 8 5 10 6 12 7 14 8 16 9 18 10 20 11 22 12 25 13 26 14 28 15 30 16 32 17 35 18 36 19 39 20 40 21 43 22 44 23 47 24 48 25 51 26 52 27 55 28 56 29 58 30 ...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 2 4 3 6 4 8 5 10 6 12 7 14 8 16 9 18 10 20 11 22 12 25 13 26 14 28 15 30 16 32 17 35 18 36 19 39 20 40 21 43 22 44 23 47 24 48 25 51 26 52 27 55 28 56 29 58 30 ...
output:
2 5000 3158 1 2 3 6 4 8 5 10 6 12 7 14 11 22 12 25 13 26 15 30 16 32 17 35 19 39 22 44 24 48 25 51 26 52 27 55 28 56 30 61 31 63 32 64 33 67 34 69 35 70 37 74 38 76 42 84 45 90 48 96 50 100 53 106 56 112 58 116 61 122 62 124 64 128 67 134 68 136 70 140 71 142 75 150 76 153 78 156 80 160 81 163 83 16...
input:
2 5000 3158 1 2 3 6 4 8 5 10 6 12 7 14 11 22 12 25 13 26 15 30 16 32 17 35 19 39 22 44 24 48 25 51 26 52 27 55 28 56 30 61 31 63 32 64 33 67 34 69 35 70 37 74 38 76 42 84 45 90 48 96 50 100 53 106 56 112 58 116 61 122 62 124 64 128 67 134 68 136 70 140 71 142 75 150 76 153 78 156 80 160 81 163 83 16...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 17476204
Test #14:
score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1864kb,1820kb
input:
1 11926600
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 2 4 3 6 4 8 5 10 6 12 7 14 8 16 9 18 10 20 11 22 12 24 13 27 14 28 15 31 16 33 17 34 18 37 19 38 20 41 21 43 22 45 23 47 24 49 25 51 26 53 27 54 28 56 29 58 30 ...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 2 4 3 6 4 8 5 10 6 12 7 14 8 16 9 18 10 20 11 22 12 24 13 27 14 28 15 31 16 33 17 34 18 37 19 38 20 41 21 43 22 45 23 47 24 49 25 51 26 53 27 54 28 56 29 58 30 ...
output:
2 5000 3158 1 2 3 6 4 8 5 10 6 12 7 14 11 22 12 24 13 27 15 31 16 33 17 34 19 38 22 45 24 49 25 51 26 53 27 54 28 56 30 61 31 62 32 64 33 67 34 68 35 70 37 74 38 76 42 84 45 90 48 96 50 100 53 106 56 112 58 116 61 122 62 124 64 128 67 134 68 136 70 140 71 142 75 150 76 152 78 156 80 161 81 162 83 16...
input:
2 5000 3158 1 2 3 6 4 8 5 10 6 12 7 14 11 22 12 24 13 27 15 31 16 33 17 34 19 38 22 45 24 49 25 51 26 53 27 54 28 56 30 61 31 62 32 64 33 67 34 68 35 70 37 74 38 76 42 84 45 90 48 96 50 100 53 106 56 112 58 116 61 122 62 124 64 128 67 134 68 136 70 140 71 142 75 150 76 152 78 156 80 161 81 162 83 16...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 11926600
Test #15:
score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1868kb,1820kb
input:
1 16602378
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 2 4 3 6 4 8 5 10 6 12 7 14 8 16 9 18 10 20 11 22 12 24 13 27 14 29 15 31 16 33 17 35 18 37 19 38 20 41 21 42 22 45 23 46 24 49 25 50 26 53 27 54 28 57 29 58 30 ...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 5000 1 2 2 4 3 6 4 8 5 10 6 12 7 14 8 16 9 18 10 20 11 22 12 24 13 27 14 29 15 31 16 33 17 35 18 37 19 38 20 41 21 42 22 45 23 46 24 49 25 50 26 53 27 54 28 57 29 58 30 ...
output:
2 5000 3158 1 2 3 6 4 8 5 10 6 12 7 14 11 22 12 24 13 27 15 31 16 33 17 35 19 38 22 45 24 49 25 50 26 53 27 54 28 57 30 60 31 62 32 64 33 67 34 68 35 71 37 74 38 76 42 84 45 90 48 96 50 100 53 106 56 112 58 116 61 122 62 124 64 128 67 134 68 136 70 140 71 142 75 150 76 152 78 157 80 161 81 163 83 16...
input:
2 5000 3158 1 2 3 6 4 8 5 10 6 12 7 14 11 22 12 24 13 27 15 31 16 33 17 35 19 38 22 45 24 49 25 50 26 53 27 54 28 57 30 60 31 62 32 64 33 67 34 68 35 71 37 74 38 76 42 84 45 90 48 96 50 100 53 106 56 112 58 116 61 122 62 124 64 128 67 134 68 136 70 140 71 142 75 150 76 152 78 157 80 161 81 163 83 16...
output:
08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e 16602378
Test #16:
score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1864kb,1772kb
input:
3 13129243
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Edges returned by Alice() have invalid node.
input:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Edges returned by Alice() have invalid node.
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Edges returned by Alice() have invalid node.
input:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Edges returned by Alice() have invalid node.
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Edges returned by Alice() have invalid node.
Subtask #3:
score: 0
Wrong Answer
Test #25:
score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1872kb,1768kb
input:
1 355365355024496523
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Edges returned by Alice() have invalid node.
input:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Edges returned by Alice() have invalid node.
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Edges returned by Alice() have invalid node.
input:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Edges returned by Alice() have invalid node.
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Edges returned by Alice() have invalid node.