結果
| 問題 | 
                            No.3211 NAND Oracle
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2025-07-25 22:43:46 | 
| 言語 | C++23  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 693 bytes | 
| コンパイル時間 | 3,072 ms | 
| コンパイル使用メモリ | 274,804 KB | 
| 実行使用メモリ | 7,716 KB | 
| 最終ジャッジ日時 | 2025-07-25 22:43:54 | 
| 合計ジャッジ時間 | 7,258 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 RE * 2 | 
| other | AC * 10 WA * 8 RE * 10 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
	int q, k;
	cin >> q >> k;
	if(q < 3 || k < 3 || k > q){
	  cout << "No" << endl;
	  return 0;
	}
	if(k == 4 || k == 3){
	  if(q == 5 && k == 4){
	    cout << "Yes" << endl;
	    cout << "1 2" << endl;
	    cout << "1 3" << endl;
	    cout << "2 4" << endl;
	    cout << "1 3" << endl;
	    cout << "4 6" << endl;
	    return 0;
	  }
	  if(q != k){
	    cout << "No" << endl;
	    return 0;
	  }
	}
	assert(false);
	cout << "Yes" << endl;
	cout << "1 2" << endl;
	cout << "1 3" << endl;
	cout << "2 4" << endl; // 0:2 1:3
	for(int i=0; i<k-3; i++){
	  cout << "2 5" << endl;
	}
	for(int i=0; i<q-k; i++){
	  cout << "6 7" << endl;
	}
}