| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 675411 | Dan4Life | 이상한 기계 (APIO19_strange_device) | C++17 | 3173 ms | 464448 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define int long long
const int maxn = (int)1e6+10;
int n, A, B;
pair<int,int> a[maxn];
unordered_map<int,unordered_map<int,bool>> vis;
int32_t main()
{
ios_base::sync_with_stdio(false); cin.tie(0);
cin >> n >> A >> B;
for(int i = 0; i < n; i++) cin >> a[i].fi >> a[i].se; int i;
for(i = 0; i < 10000000; i++){
int x = (i+i/B)%A, y = i%B;
//cout << x << " " << y << "\n";
if(vis[x][y]) break; vis[x][y]=1;
}
for(int j = 0; j < n; j++) cout << min(a[j].se-a[j].fi+1, i) << "\n";
}
컴파일 시 표준 에러 (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... | ||||
