답안 #1093818

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1093818 2024-09-27T15:12:51 Z byunjaewoo 마술쇼 (APIO24_show) C++17
35 / 100
3 ms 1012 KB
#include <bits/stdc++.h>
using namespace std;
#include "Alice.h"

vector<pair<int,int>> Alice(){
    long long x=setN(5000);
    vector<pair<int, int>> V;
    for(int i=2; i<=5000; i++) V.push_back({i, x%(i-1)+1});
    return V;
}
#include <bits/stdc++.h>
using namespace std;
#include "Bob.h"

long long Bob(vector<pair<int,int>> V){
    long long ret=0, lcm=1;
    for(auto [u, v]:V) {
        long long a=u-1, b=v-1;
        while(ret%b!=a) ret+=lcm;
        lcm=lcm*b/__gcd(lcm, b);
        if(lcm<=0) break;
    }
    return ret;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 820 KB Correct.
2 Correct 1 ms 824 KB Correct.
3 Correct 1 ms 820 KB Correct.
4 Correct 2 ms 824 KB Correct.
5 Correct 2 ms 816 KB Correct.
6 Correct 2 ms 832 KB Correct.
7 Correct 1 ms 820 KB Correct.
8 Correct 1 ms 820 KB Correct.
9 Correct 2 ms 1012 KB Correct.
10 Correct 2 ms 832 KB Correct.
11 Correct 2 ms 820 KB Correct.
12 Correct 2 ms 816 KB Correct.
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 820 KB Correct.
2 Correct 1 ms 824 KB Correct.
3 Correct 1 ms 820 KB Correct.
4 Correct 2 ms 824 KB Correct.
5 Correct 2 ms 816 KB Correct.
6 Correct 2 ms 832 KB Correct.
7 Correct 1 ms 820 KB Correct.
8 Correct 1 ms 820 KB Correct.
9 Correct 2 ms 1012 KB Correct.
10 Correct 2 ms 832 KB Correct.
11 Correct 2 ms 820 KB Correct.
12 Correct 2 ms 816 KB Correct.
13 Correct 1 ms 820 KB Correct.
14 Correct 1 ms 820 KB Correct.
15 Correct 1 ms 820 KB Correct.
16 Correct 1 ms 820 KB Correct.
17 Correct 2 ms 832 KB Correct.
18 Correct 1 ms 816 KB Correct.
19 Correct 1 ms 816 KB Correct.
20 Correct 1 ms 820 KB Correct.
21 Correct 1 ms 832 KB Correct.
22 Correct 1 ms 832 KB Correct.
23 Correct 2 ms 824 KB Correct.
24 Correct 1 ms 820 KB Correct.
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 820 KB Correct.
2 Correct 1 ms 824 KB Correct.
3 Correct 1 ms 820 KB Correct.
4 Correct 2 ms 824 KB Correct.
5 Correct 2 ms 816 KB Correct.
6 Correct 2 ms 832 KB Correct.
7 Correct 1 ms 820 KB Correct.
8 Correct 1 ms 820 KB Correct.
9 Correct 2 ms 1012 KB Correct.
10 Correct 2 ms 832 KB Correct.
11 Correct 2 ms 820 KB Correct.
12 Correct 2 ms 816 KB Correct.
13 Correct 1 ms 820 KB Correct.
14 Correct 1 ms 820 KB Correct.
15 Correct 1 ms 820 KB Correct.
16 Correct 1 ms 820 KB Correct.
17 Correct 2 ms 832 KB Correct.
18 Correct 1 ms 816 KB Correct.
19 Correct 1 ms 816 KB Correct.
20 Correct 1 ms 820 KB Correct.
21 Correct 1 ms 832 KB Correct.
22 Correct 1 ms 832 KB Correct.
23 Correct 2 ms 824 KB Correct.
24 Correct 1 ms 820 KB Correct.
25 Correct 2 ms 820 KB Correct.
26 Incorrect 3 ms 820 KB Incorrect answer.
27 Halted 0 ms 0 KB -