結果

問題 No.3211 NAND Oracle
ユーザー asmin
提出日時 2025-07-25 21:53:26
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 730 bytes
コンパイル時間 8,922 ms
コンパイル使用メモリ 214,936 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-07-25 21:53:41
合計ジャッジ時間 12,016 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

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



void solve(){
    int Q, K; cin >> Q >> K;
    vector<pair<int, int>> op;
    int cnt = 3;
    for(int i = 0; i < Q; ++i){
        if(i & 1 && i >= 2) ++cnt;
        if(i < 2){
            op.emplace_back(1, 2);
        }else if(i & 1){
            op.emplace_back(1, 2);
        }else{
            op.emplace_back(3, 4);
        }
    }
    if(cnt <= K){
        cout << "Yes\n";
        for(auto [x, y]: op) cout << x << " " << y << "\n";
    }else{
        cout << "No\n";
    }
}


int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << setprecision(10) << fixed;


    int T;
    T = 1;
    //cin >> T;
    for(;T--;) solve();
}

0