結果
| 問題 |
No.1402 ビル街
|
| コンテスト | |
| ユーザー |
emthrm
|
| 提出日時 | 2021-02-19 23:23:56 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 3,153 ms |
| コード長 | 2,275 bytes |
| コンパイル時間 | 1,881 ms |
| コンパイル使用メモリ | 191,548 KB |
| 最終ジャッジ日時 | 2025-01-19 01:48:16 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 |
ソースコード
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,m,n) for(int i=(m);i<(n);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
using ll = long long;
constexpr int INF = 0x3f3f3f3f;
constexpr long long LINF = 0x3f3f3f3f3f3f3f3fLL;
constexpr double EPS = 1e-8;
constexpr int MOD = 1000000007;
// constexpr int MOD = 998244353;
constexpr int dy[] = {1, 0, -1, 0}, dx[] = {0, -1, 0, 1};
constexpr int dy8[] = {1, 1, 0, -1, -1, -1, 0, 1}, dx8[] = {0, -1, -1, -1, 0, 1, 1, 1};
template <typename T, typename U> inline bool chmax(T &a, U b) { return a < b ? (a = b, true) : false; }
template <typename T, typename U> inline bool chmin(T &a, U b) { return a > b ? (a = b, true) : false; }
struct IOSetup {
IOSetup() {
std::cin.tie(nullptr);
std::ios_base::sync_with_stdio(false);
std::cout << fixed << setprecision(20);
}
} iosetup;
int main() {
constexpr int M = 2000000000;
int n; cin >> n;
if (n == 1) {
cout << M << ' ' << 2 << ' ' << M << '\n';
} else {
cout << M << ' ' << n << ' ';
REP(i, n - 2) cout << 2 + i << ' ';
cout << n + 1 << ' ' << M << '\n';
}
return 0;
// vector<int> ord(n);
// iota(ALL(ord), 0);
// int mn = INF;
// do {
// vector<int> a(n + 2, n);
// REP(i, n) a[i + 1] = ord[i];
// vector<vector<int>> graph(n + 2);
// FOR(i, 1, n + 1) {
// int l = i - 1;
// while (a[l] < a[i]) --l;
// graph[i].emplace_back(l);
// graph[l].emplace_back(i);
// int r = i + 1;
// while (a[r] < a[i]) ++r;
// graph[i].emplace_back(r);
// graph[r].emplace_back(i);
// }
// int d = 0;
// FOR(i, 1, n + 1) {
// vector<int> dist(n + 2, -1);
// dist[i] = 0;
// queue<int> que({i});
// while (!que.empty()) {
// int v = que.front(); que.pop();
// for (int e : graph[v]) {
// if (dist[e] == -1) {
// dist[e] = dist[v] + 1;
// que.emplace(e);
// }
// }
// }
// FOR(j, 1, n + 1) d += dist[j];
// }
// chmin(mn, d);
// cout << '{';
// REP(i, n) cout << ord[i] << ",}"[i + 1 == n];
// cout << " " << d << '\n';
// } while (next_permutation(ALL(ord)));
// cout << mn << '\n';
}
emthrm