結果
問題 |
No.689 E869120 and Constructing Array 3
|
ユーザー |
|
提出日時 | 2018-05-18 23:08:45 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 413 bytes |
コンパイル時間 | 3,119 ms |
コンパイル使用メモリ | 166,396 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-28 13:59:03 |
合計ジャッジ時間 | 5,453 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 7 RE * 6 |
ソースコード
#include <bits/stdc++.h> using std::cout; using std::endl; using std::cin; int main(){ int n; cin >> n; for(int i = 1; i <= 250; i++){ int A = i * (i - 1) / 2; int X = n - A; if(X % i) continue; int Z = X / i; if(i + Z > 250) continue; for(int j = 0; j < i; j++) cout << 1 << " "; for(int j = 0; j < Z; j++) cout << 2 << " "; cout << endl; return 0; } assert(false); return 0; }