結果
| 問題 | No.1981 [Cherry 4th Tune N] アルゴリズムが破滅する例 |
| コンテスト | |
| ユーザー |
umezo
|
| 提出日時 | 2022-06-17 23:17:07 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 484 bytes |
| 記録 | |
| コンパイル時間 | 1,373 ms |
| コンパイル使用メモリ | 209,336 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-26 10:37:39 |
| 合計ジャッジ時間 | 6,209 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 WA * 28 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int n,k;
cin>>n>>k;
int a=(n+1)/2;
if(k<a){
cout<<-1<<endl;
return 0;
}
for(int i=1;i<=a;i++){
cout<<i<<" "<<i<<endl;
for(int j=i+1;j<=n;j++){
cout<<i<<" "<<j<<endl;
cout<<j<<" "<<i<<endl;
}
}
return 0;
}
umezo