結果

問題 No.780 オフ会
ユーザー @abcde
提出日時 2019-02-03 01:02:21
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 396 bytes
コンパイル時間 1,266 ms
コンパイル使用メモリ 159,036 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-30 05:17:13
合計ジャッジ時間 2,111 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    
    // 1. 入力情報取得.
    int A, B;
    cin >> A >> B;
    
    // 2. ヤスオくんが女の子とペアになって遊べるか?
    bool ok = true;
    int ans = 0;
    if(A + 1 > B) ok = false, ans = A + 1 - B;

    // 3. 出力.
    cout << (ok ? "YES" : "NO") << endl;
    cout << ans << endl;
    return 0;
    
}
0