QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#669075#8726. Magic Showpyiming0 0ms1872kbC++141.3kb2024-10-23 17:12:222024-10-23 17:12:30

Judging History

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

  • [2024-10-23 17:12:30]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:1872kb
  • [2024-10-23 17:12:22]
  • 提交

Alice

#include"Alice.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=5e3;
// int exgcd(int a,int b,int &x0,int &y0){
//     if(b==0){
//         x0=1;
//         y0=0;
//         return a;
//     }
//     int g=exgcd(b,a%b,y0,x0);
//     y0-=a/b*x0;
//     return g;
// }
ll setN(int n);
vector<pair<int,int>> Alice(){
    ll x=setN(N);
    vector<pair<int,int>> edges;
    for(int i=2;i<=N;i++){
        edges.push_back({x%i,i});
    }
    return edges;
}

Bob

#include"Bob.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int V=1e18;
int exgcd(int a,int b,int &x0,int &y0){
    if(b==0){
        x0=1;
        y0=0;
        return a;
    }
    int g=exgcd(b,a%b,y0,x0);
    y0-=a/b*x0;
    return g;
}
ll Bob(vector<pair<int,int>> edges){
    vector<pair<int,int>> t;
    __int128 n=1;
    for(auto i:edges){
        int x=i.first,y=i.second;
        if(x>y){
            swap(x,y);
        }
        n*=y;
        t.push_back({x,y});
        if(n>V){
            break;
        }
    }
    __int128 X=0;
    for(auto i:t){
        int a=i.first,b=i.second;
        __int128 m=n/b;
        int x,y;
        exgcd(m%b,b,x,y);
        x=(x%b+b)%b;
        X=(X+a*m*x)%n;
    }
    return X;
}

詳細信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1864kb,1764kb

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: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1872kb,1768kb

input:

1
17476204

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: 1868kb,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.