結果
| 問題 |
No.1057 素敵な日
|
| コンテスト | |
| ユーザー |
minato
|
| 提出日時 | 2020-05-22 21:24:00 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 1,135 bytes |
| コンパイル時間 | 4,583 ms |
| コンパイル使用メモリ | 230,304 KB |
| 最終ジャッジ日時 | 2025-01-10 14:04:52 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 |
ソースコード
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define all(x) (x).begin(),(x).end()
constexpr char ln = '\n';
constexpr long long MOD = 1000000007LL;
//constexpr long long MOD = 998244353LL;
template<class T, class U> inline bool chmax(T &a, U b) { if (a < b) { a = b; return true;} return false; }
template<class T, class U> inline bool chmin(T &a, U b) { if (a > b) { a = b; return true;} return false; }
void print() { cout << "\n"; }
template <class T, class... Args>
void print(const T &x, const Args &... args) {
cout << x << " ";
print(args...);
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////
int main() {
ios::sync_with_stdio(false); cin.tie(nullptr);
int A,B; cin >> A >> B;
if (A > B) swap(A,B);
cout << min(A*2,A+B-1) << ln;
}
minato