QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#557176 | #8726. Magic Show | Le0Chan | 0 | 0ms | 1896kb | C++20 | 1.3kb | 2024-09-11 07:46:09 | 2024-09-11 07:46:09 |
Alice
#include <bits/stdc++.h>
using namespace std;
#include "Alice.h"
#define LL long long
#define pii pair<int,int>
#define fi first
#define se second
std::vector<std::pair<int, int>> Alice();
long long setN(int n);
vector<pii> Alice(){
int n=4922;
LL V=setN(4922);
vector<pii> as;
as.push_back({1,2});
for(int l=3;l<=4922;l+=60){
int now=l;
for(int i=0;i<=60;i++){
if(V&(1ll<<i)) as.push_back({now,now-2});
else as.push_back({now,now-1});
now++;
}
}
return as;
}
Bob
#include <bits/stdc++.h>
// #include "Bob.h"
using namespace std;
#define LL long long
#define pii pair<int,int>
#define fi first
#define se second
long long Bob(std::vector<std::pair<int, int>> V);
const int N=5e3+5;
bool vis[N];
int fa[N],ans[N];
int n=4922;
vector<int> g[N];
void add(int x,int y){g[x].push_back(y);}
LL Bob(vector<pii> as){
for(auto [x,y]:as){
if(x<y) fa[y]=x;
else fa[x]=y;
}
for(int l=3;l<=n;l+=60){
int now=l;
for(int j=0;j<=60;j++){
if(fa[now]){
ans[j]=now-fa[now]-1;
}
now++;
}
}
LL rs=0;
for(int j=0;j<=60;j++) rs+=1ll<<ans[j];
cout<<rs<<"\n";
}
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,1892kb
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,1896kb
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: 1868kb,1892kb
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.