結果
| 問題 | No.883 ぬりえ |
| コンテスト | |
| ユーザー |
risujiroh
|
| 提出日時 | 2019-09-13 21:30:03 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 549 bytes |
| 記録 | |
| コンパイル時間 | 1,484 ms |
| コンパイル使用メモリ | 170,144 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-04 03:58:50 |
| 合計ジャッジ時間 | 2,826 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 WA * 4 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using lint = long long;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;
int main() {
cin.tie(nullptr); ios::sync_with_stdio(false);
int m, k; cin >> m >> k;
int n = 1;
while (n * min(n, k) < m) ++n;
V<string> res(n, string(n, '.'));
for (int i = 0; i < n; ++i) {
for (int j = 0; j < k; ++j) {
if (m) {
res[i][(i + j) % n] = '#';
--m;
}
}
}
cout << n << '\n';
for (const auto& e : res) cout << e << '\n';
}
risujiroh