| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 335089 | nicholask | 이상한 기계 (APIO19_strange_device) | C++14 | 1 ms | 364 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define int long long
#define x first
#define y second
using namespace std;
signed main(){
int n,a,b;
cin>>n>>a>>b;
pair <int,int> p[n];
for (int i=0; i<n; i++) cin>>p[i].x>>p[i].y;
if (n==1){
__int128 f=p[0].y-p[0].x+1;
__int128 s=p[0].x*p[0].y/__gcd(p[0].y,(p[0].y+1)%p[0].x);
} else {
set <pair <int,int> > s;
for (int i=0; i<n; i++){
for (int t=p[i].x; t<=p[i].y; t++) s.insert({(t+t/b)%a,t%b});
}
cout<<s.size();
}
}
컴파일 시 표준 에러 (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... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
