結果

問題 No.2819 Binary Binary-Operator
ユーザー れもん丸
提出日時 2024-07-26 22:22:49
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 894 bytes
コンパイル時間 1,787 ms
コンパイル使用メモリ 165,352 KB
実行使用メモリ 25,452 KB
平均クエリ数 3.00
最終ジャッジ日時 2024-07-26 22:22:56
合計ジャッジ時間 6,315 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 64
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (long long i = 0; i < n; ++i)
using ll = long long;
constexpr ll INF = 1ll<<30;
constexpr ll longINF = 1ll<<60;
constexpr ll MOD = 998244353;
constexpr bool debug = false;
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
//---------------------------------//

int main(){
    int X, Y;
    cin >> X >> Y;

    cout << "4" << endl << X << " " << Y << " " << Y << " " << Y << endl;
    int rhs;
    cin >> rhs;

    if (X == Y){
        if (rhs == X) cout << X << endl;
        else cout << (1 - X) << endl;
    } else {
        if (rhs == X) cout << X << endl;
        else cout << (1 - X) << endl;
    }

    return 0;
}
0