| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1040921 | Andrey | 마술쇼 (APIO24_show) | C++17 | 2 ms | 832 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Alice.h"
#include<bits/stdc++.h>
using namespace std;
std::vector<std::pair<int,int>> Alice(){
long long x = setN(5000);
vector<pair<int,int>> haha(0);
for(int i = 2; i <= 5000; i++) {
haha.push_back({x%(i-1)+1,i});
}
return haha;
}
#include "Bob.h"
#include<bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
if(b == 0) {
return a;
}
return gcd(b,a%b);
}
long long lcm(long long a, long long b) {
return (a/gcd(a,b))*b;
}
long long Bob(std::vector<std::pair<int,int>> haha){
long long c = 1,ost = 0;
for(int i = 0; i < haha.size(); i++) {
int a = haha[i].first,b = haha[i].second;
if(a > b) {
swap(a,b);
}
while(ost%(b-1) != a-1) {
ost+=c;
}
c = lcm(c,b-1);
}
if(ost == 0) {
return c;
}
else {
return ost;
}
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
