結果
| 問題 |
No.2678 Minmax Independent Set (Hack)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-08 21:15:12 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,069 bytes |
| コンパイル時間 | 588 ms |
| コンパイル使用メモリ | 73,720 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-09-29 23:05:08 |
| 合計ジャッジ時間 | 1,626 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 1 |
ソースコード
#include<iostream>
#include<vector>
using namespace std;
// discord の図参照
int main(){
// パス上の頂点に m-2 個の子をつけて、その先に m 個の子をつけて、さらにその先に 2 つ子を作る
const int m = 7;
const int p = 1800;//パスの長さ
const int root = 1;
int target = root;
vector<pair<int,int>> edges;
for(int x = root + 1 ; x <=root + p ; x++){
edges.emplace_back(target,x);
target = x;
}
const int r = target;// パスの右端
for(int x = root ; x <= r ; x++){
for(int c = 1 ; c<= m-2 ;c++){
edges.emplace_back(x,target+1);
target++;
for(int d = 1 ; d <= m ; d++){
edges.emplace_back(target,target+1);
edges.emplace_back(target+1,target+2);
edges.emplace_back(target+1,target+3);
target+=3;
}
}
}
cout << (edges.size())+1 << endl;
for(pair<int,int> e :edges)cout << e.first << " " << e.second << endl;
return 0;
}