結果

問題 No.2678 Minmax Independent Set (Hack)
ユーザー 沙耶花
提出日時 2024-03-15 22:16:47
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 269 ms / 2,000 ms
コード長 690 bytes
コンパイル時間 4,238 ms
コンパイル使用メモリ 250,764 KB
最終ジャッジ日時 2025-02-20 05:21:55
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0