結果
| 問題 |
No.333 門松列を数え上げ
|
| コンテスト | |
| ユーザー |
ゆるく
|
| 提出日時 | 2019-04-30 23:31:56 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 541 bytes |
| コンパイル時間 | 886 ms |
| コンパイル使用メモリ | 80,384 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-31 11:56:38 |
| 合計ジャッジ時間 | 1,834 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 |
ソースコード
#include<iostream>
#include<algorithm>
#include<string>
#include<map>
#include<cmath>
#include<vector>
#include<queue>
#include<set>
#include<stdio.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i,n) REP(i,0,n)
#define INF 1e9
int main()
{
int a, b, ans = 0;
cin >> a >> b;
if (a < b) {
ans += b - a - 1;
ans += a - 1;
} else {
ans += 2000000000 - a;
ans += a - b - 1;
}
cout << ans << endl;
return 0;
}
ゆるく