結果

問題 No.688 E869120 and Constructing Array 2
ユーザー aaaaaaiu
提出日時 2019-08-20 19:21:01
言語 C++17
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -fplugin=/usr/lib/yukicoder/noavx512-gcc15.so -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 389 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,291 ms
コンパイル使用メモリ 213,216 KB
実行使用メモリ 9,908 KB
最終ジャッジ日時 2026-10-24 00:38:39
合計ジャッジ時間 4,436 ms
ジャッジサーバーID
(参考情報)
judge5_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 1 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
    int k;
    cin>>k;
    for (int i=1;i<=30;i++)
        for (int j=0;j+i<=30;j++)
            if (i*(i-1)/2<<j==k) {
                for (int k=0;k<i;k++) cout<<1<<' ';
                for (int k=0;k<j;k++) cout<<0<<' ';
                cout<<endl;
                return 0;
            }
    return 0;
}
0