제출 #1093820

#제출 시각아이디문제언어결과실행 시간메모리
1093820byunjaewoo마술쇼 (APIO24_show)C++17
100 / 100
3 ms1052 KiB
#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*=b/__gcd(lcm, b);
    }
    return ret;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...