結果
| 問題 |
No.3211 NAND Oracle
|
| コンテスト | |
| ユーザー |
よには
|
| 提出日時 | 2025-07-25 22:29:51 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,613 bytes |
| コンパイル時間 | 5,848 ms |
| コンパイル使用メモリ | 335,080 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-07-25 22:30:03 |
| 合計ジャッジ時間 | 9,216 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 RE * 2 |
| other | AC * 15 WA * 1 RE * 12 |
ソースコード
#if __has_include(<yoniha/all.h>)
#include <yoniha/all.h>
using namespace atcoder;
#else
#include <bits/stdc++.h>
#if __has_include(<atcoder/all>)
#include <atcoder/all>
using namespace atcoder;
#endif
#endif
using namespace std;
#define int long long
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for(int i = (int)((n) - 1); i >= 0; i--)
template <typename T> bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;}
template <typename T> bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;}
// using mint = modint;
signed main(){
int q, k; cin >> q >> k;
assert(q >= 5);
if(q == 1){
cout << "Yes" << '\n';
cout << "1 2" << '\n';
return 0;
}
if(q == 2){
if(k == 2) cout << "No" << '\n';
else{
cout << "Yes" << '\n';
cout << "1 2" << '\n';
cout << "1 2" << '\n';
}
return 0;
}
if(q == 3){
if(k == 2) cout << "No" << '\n';
else{
cout << "Yes" << '\n';
cout << "1 2" << '\n';
cout << "1 2" << '\n';
cout << "3 4" << '\n';
}
return 0;
}
if(q == 4){
if(k <= 3) cout << "No" << '\n';
else{
cout << "Yes" << '\n';
cout << "1 2" << '\n';
cout << "1 2" << '\n';
cout << "3 4" << '\n';
cout << "4 5" << '\n';
}
return 0;
}
// これ以降に問題あり
if(k <= 4) cout << "No" << '\n';
else{
cout << "Yes" << '\n';
cout << "1 2" << '\n';
cout << "1 2" << '\n';
cout << "3 4" << '\n';
cout << "4 5" << '\n';
cout << "4 5" << '\n';
rep(i, q - 5) cout << "6 7" << '\n';
}
}
よには