結果

問題 No.1893 Cycle
ユーザー srjywrdnprkt
提出日時 2023-05-21 01:53:37
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 15 ms / 2,000 ms
コード長 658 bytes
コンパイル時間 1,309 ms
コンパイル使用メモリ 108,672 KB
最終ジャッジ日時 2025-02-13 03:54:25
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <cmath>
#include <map>
#include <set>
#include <iomanip>
#include <queue>
#include <algorithm>
#include <numeric>
#include <deque>
#include <complex>
#include <cassert>

using namespace std;
using ll = long long;

int main(){

    int X, Y;
    cin >> X >> Y;
    for (int Z=0; Z<=11; Z++){
        vector<int> a = {X, Y, Z};
        sort(a.begin(), a.end());
        if (min(12-abs(a[1]-a[0]), abs(a[1]-a[0])) != 4) continue;
        if (min(12-abs(a[2]-a[1]), abs(a[2]-a[1])) != 4) continue;
        if (min(12-abs(a[2]-a[0]), abs(a[2]-a[0])) != 4) continue;
        cout << Z << endl;
    }

    return 0;
}
0