結果
問題 |
No.3211 NAND Oracle
|
ユーザー |
![]() |
提出日時 | 2025-07-25 21:49:46 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 932 bytes |
コンパイル時間 | 3,193 ms |
コンパイル使用メモリ | 281,596 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-07-25 21:50:23 |
合計ジャッジ時間 | 6,106 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 9 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; void solve(){ int Q, K; cin >> Q >> K; vector<pair<int, int>> op; if(Q == 1){ if(K < 3){ cout << "No/n"; }else{ cout << "Yes\n"; cout << 1 << " " << 2 << "\n"; } return; } int cnt = 1; for(int i = 0; i < Q; ++i){ if(i < 2) ++cnt; else if(i & 1) ++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(); }