結果
| 問題 | 
                            No.3211 NAND Oracle
                             | 
                    
| コンテスト | |
| ユーザー | 
                             kokosei
                         | 
                    
| 提出日時 | 2025-07-25 22:27:45 | 
| 言語 | C++23  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 662 bytes | 
| コンパイル時間 | 816 ms | 
| コンパイル使用メモリ | 87,600 KB | 
| 実行使用メモリ | 7,720 KB | 
| 最終ジャッジ日時 | 2025-07-25 22:27:54 | 
| 合計ジャッジ時間 | 3,851 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 14 WA * 14 | 
ソースコード
#include <iostream>
#include <vector>
using namespace std;
using ll = long long;
int Q, K;
int main(void){
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cin >> Q >> K;
	// [0, 0, 1, 1, 1]
	// [0, 1, 1, 1, 0]
	// [1, 0, 1, 0, 1]
	// [1, 1, 0, 1, 0]
	// 2, 2, 3, 4, 4, 5, 5 .. 
	if(Q <= 2 && K > 2){
		cout << "No\n";
		return 0;
	}
	if(Q > 2 && K < Q / 2 + 2){
		cout << "No\n";
		return 0;
	}
	cout << "Yes\n";
	vector<pair<int, int>> ans;
	ans.push_back({0, 1});
	if(Q > 1)ans.push_back({0, 2});
	for(int i = 0;i < Q - 2;i++){
		ans.push_back({i % 2 + 1, i % 2 + 3});
	}
	for(auto [a, b] : ans){
		cout << a + 1 << " " << b + 1 << "\n";
	}
	return 0;
}
            
            
            
        
            
kokosei