結果
問題 |
No.2609 Decreasing GCDs
|
ユーザー |
![]() |
提出日時 | 2024-01-20 02:56:45 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 527 bytes |
コンパイル時間 | 497 ms |
コンパイル使用メモリ | 41,416 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-28 05:23:06 |
合計ジャッジ時間 | 1,408 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 22 |
ソースコード
/* -*- coding: utf-8 -*- * * 2609.cc: No.2609 Decreasing GCDs - yukicoder */ #include<cstdio> #include<algorithm> using namespace std; /* constant */ const int MAX_N = 100; /* typedef */ /* global variables */ int as[MAX_N]; /* subroutines */ /* main */ int main() { int n; scanf("%d", &n); int msk = (1 << n) - 1; for (int i = n - 1, bi = 1; i >= 0; i--, bi <<= 1) { as[i] = msk; msk ^= bi; } for (int i = 0; i < n; i++) printf("%d%c", as[i], (i + 1 < n) ? ' ' : '\n'); return 0; }