結果
問題 |
No.883 ぬりえ
|
ユーザー |
![]() |
提出日時 | 2019-09-13 21:24:28 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 498 bytes |
コンパイル時間 | 1,551 ms |
コンパイル使用メモリ | 168,876 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-04 03:56:10 |
合計ジャッジ時間 | 5,001 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 19 |
ソースコード
#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 = (m + k - 1) / k; 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] = '#'; } } } for (const auto& e : res) cout << e << '\n'; }