結果
問題 | No.2678 Minmax Independent Set (Hack) |
ユーザー | 沙耶花 |
提出日時 | 2024-03-15 22:16:47 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 272 ms / 2,000 ms |
コード長 | 690 bytes |
コンパイル時間 | 4,472 ms |
コンパイル使用メモリ | 263,068 KB |
実行使用メモリ | 6,676 KB |
最終ジャッジ日時 | 2024-03-15 22:16:53 |
合計ジャッジ時間 | 5,771 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
ソースコード
#include <stdio.h> #include <bits/stdc++.h> #include <atcoder/all> using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 1000000000000000001 int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int n = 200000; cout<<n<<endl; vector<int> a,b; a.push_back(0); b.push_back(1); a.push_back(1); b.push_back(2); for(int i=4;i<=199998;i+=2){ a.push_back(i-3); b.push_back(i-1); a.push_back(i-1); b.push_back(i); } a.push_back(199997); b.push_back(199999); assert((int)a.size()==n-1); rep(i,a.size()){ cout<<a[i]+1<<' '<<b[i]+1<<endl; } return 0; }