結果
| 問題 |
No.1988 Divisor Tiling
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-24 21:39:29 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 516 bytes |
| コンパイル時間 | 2,002 ms |
| コンパイル使用メモリ | 193,360 KB |
| 最終ジャッジ日時 | 2025-01-30 00:13:31 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 6 WA * 26 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int n, h;
int main(int argc, char** argv) {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n >> h;
if (h == 1) {
for (int i = 1; i < n; i++)
if (n % i == 0)
for (int j = 1; j <= i; j++)
cout << i << ' ';
}
else if (h == 2) {
for (int i = 1; i <= n / 2; i++) cout << n / 2 << ' ';
cout << '\n';
for (int i = 1; i < n / 2; i++)
if (n % i == 0)
for (int j = 1; j <= i; j++)
cout << i << ' ';
}
else cout << -1;
}