結果
| 問題 |
No.688 E869120 and Constructing Array 2
|
| ユーザー |
Kutimoti_T
|
| 提出日時 | 2018-05-18 22:26:58 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 480 bytes |
| コンパイル時間 | 1,858 ms |
| コンパイル使用メモリ | 59,620 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-07 06:47:11 |
| 合計ジャッジ時間 | 1,289 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 1 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <set>
using i64 = long long;
using namespace std;
int main(){
i64 K;
cin >> K;
for(i64 a = 2;a <= 30;a++){
for(i64 b = 0;30 - b >= 0;b++){
i64 A = (a - 1) * a / 2;
i64 B = (1LL << b);
if(A * B == K){
cout << a + b << endl;
for(int i = 0;i < a;i++) cout << 1 << " ";
for(int i = 0;i < b;i++) cout << 0 << " \n"[i + 1 == b];
return 0;
}
}
}
}
Kutimoti_T