QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#521052#8726. Magic ShowMisty70 89ms2020kbC++14806b2024-08-15 20:30:122024-08-15 20:30:12

Judging History

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

  • [2024-08-15 20:30:12]
  • 评测
  • 测评结果:0
  • 用时:89ms
  • 内存:2020kb
  • [2024-08-15 20:30:12]
  • 提交

Alice

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

using i64 = long long;

constexpr int N = 5000;

std::vector<std::pair<int, int>> Alice () {
    i64 n = setN(N);
    std::vector<std::pair<int, int>> edges;
    for (int i = 1; i < n; i++) {
        edges.emplace_back(n % i + 1, i + 1);
    }
    return edges;
}

Bob

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

using i64 = long long;

constexpr i64 limit = 1E15;

i64 lcm (i64 a, i64 b) {
    return a / std::__gcd(a, b) * b;
}

i64 Bob (std::vector<std::pair<int, int>> edges) {
    i64 ans = 0, per = 0;
    for (auto [x, y] : edges) {
        x--, y--;
        while (ans % x != y) {
            ans += per;
        }
        per = lcm(per, y);
        if (per >= limit) {
            break;
        }
    }
    return ans;
}

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

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

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
Time Limit Exceeded

Test #25:

score: 0
Time Limit Exceeded

input:

1
355365355024496523

output: