結果
問題 | No.91 赤、緑、青の石 |
ユーザー |
![]() |
提出日時 | 2025-01-23 00:51:19 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 32 ms / 5,000 ms |
コード長 | 447 bytes |
コンパイル時間 | 4,202 ms |
コンパイル使用メモリ | 276,732 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-01-23 00:51:53 |
合計ジャッジ時間 | 4,848 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 28 |
ソースコード
#include <bits/stdc++.h>using namespace std;#ifdef LOCAL#include "settings/debug.cpp"#else#define Debug(...) void(0)#endif#define rep(i, n) for (int i = 0; i < (n); ++i)using ll = long long;using ull = unsigned long long;int main() {array<int, 3> a;rep(i, 3) cin >> a[i];sort(a.begin(), a.end());while (a[2] - a[0] > 2) {a[2] -= 2, a[0] += 1;sort(a.begin(), a.end());}cout << a[0] << endl;return 0;}