結果
| 問題 |
No.688 E869120 and Constructing Array 2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-19 01:17:32 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 342 bytes |
| コンパイル時間 | 538 ms |
| コンパイル使用メモリ | 66,872 KB |
| 最終ジャッジ日時 | 2025-01-05 10:41:10 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 10 |
ソースコード
#include <iostream>
using namespace std;
int main()
{
int K;cin>>K;
int i, j;
for(i = 1; i <= 30; i++){
for(j= 0; j <= i; j++){
if(K == j*(j-1)/2*(1<<(i-j))){break;}
}
}
cout << i << endl;
for(int k = 0; k < j; k++){
cout << "1 ";
}
for(int k = j; k < i; k++){
cout << "0 ";
}
cout << endl;
return 0;
}