結果
問題 |
No.1981 [Cherry 4th Tune N] アルゴリズムが破滅する例
|
ユーザー |
![]() |
提出日時 | 2022-06-17 21:58:04 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 421 bytes |
コンパイル時間 | 4,386 ms |
コンパイル使用メモリ | 261,680 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-09 07:49:30 |
合計ジャッジ時間 | 8,330 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 WA * 42 |
ソースコード
#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std; #define int long long signed main(){ int N,K; cin>>N>>K; if(K == 0){ cout<<-1<<endl; return 0; } cout<<N+N-K<<endl; for(int i=1;i<=K;i++) cout<<i<<' '<<i<<endl; for(int i=K+1;i<=N;i++) cout<<i<<' '<<1<<endl; for(int i=K+1;i<=N;i++) cout<<1<<' '<<i<<endl; }