結果
問題 | No.1057 素敵な日 |
ユーザー | scol_kp |
提出日時 | 2020-05-22 21:29:14 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 930 bytes |
コンパイル時間 | 2,661 ms |
コンパイル使用メモリ | 191,608 KB |
最終ジャッジ日時 | 2025-01-10 14:15:08 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 7 |
ソースコード
#include <bits/stdc++.h> #define FASTIO using namespace std; using ll = long long; using Vi = vector<int>; using Vl = vector<ll>; using Pii = pair<int, int>; using Pll = pair<ll, ll>; constexpr int I_INF = numeric_limits<int>::max(); constexpr ll L_INF = numeric_limits<ll>::max(); //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% void solve() { ll A, B; cin >> A >> B; if (A == B) { cout << A * 2 - 1 << endl; } else { cout << min(A, B) * 2 << endl; } } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% int main() { #ifdef FASTIO cin.tie(0), cout.tie(0); ios::sync_with_stdio(false); #endif #ifdef FILEINPUT ifstream ifs("./in_out/input.txt"); cin.rdbuf(ifs.rdbuf()); #endif #ifdef FILEOUTPUT ofstream ofs("./in_out/output.txt"); cout.rdbuf(ofs.rdbuf()); #endif solve(); cout << flush; return 0; }