結果
問題 |
No.455 冬の大三角
|
ユーザー |
![]() |
提出日時 | 2016-12-07 00:16:08 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 403 bytes |
コンパイル時間 | 732 ms |
コンパイル使用メモリ | 85,092 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-29 21:16:16 |
合計ジャッジ時間 | 2,681 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 52 WA * 2 |
ソースコード
#include <iostream> #include <random> #include <algorithm> using namespace std; int main(){ int h, w; cin >> h >> w; string s[h]; for(int i = 0; i < h; i++) cin >> s[i]; random_device rnd; int a = rnd() % h, b = rnd() % w; while(s[a][b] == '*' || count(s[a].begin(), s[a].end(), '*') >= 2){ a = rnd() % h; b = rnd() % w; } s[a][b] = '*'; for(int i = 0; i < h; i++) cout << s[i] << endl; }