結果
問題 |
No.455 冬の大三角
|
ユーザー |
![]() |
提出日時 | 2017-05-18 08:14:41 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 620 bytes |
コンパイル時間 | 925 ms |
コンパイル使用メモリ | 111,884 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-18 18:37:12 |
合計ジャッジ時間 | 2,418 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 52 WA * 2 |
ソースコード
#include <cstdio> #include <cstring> #include <random> #include <vector> #include <algorithm> #include <array> #include <functional> #include <utility> #include <regex> using namespace std; int main(){ int h,w; -scanf("%d%d",&h,&w); vector<string> s(h); for(int i=0;i<h;i++){ char t[128]; -scanf("%s",t); s[i]=t; } for(int y=0;y<h;y++){ for(int x=0;x<w;x++){ if(s[y][x]=='-'){ if(count(s[y].begin(),s[y].end(),'*')<2&&count_if(s.begin(),s.end(),[x](string t){return t[x]=='*';})<2){ s[y][x]='*'; for(auto a:s){ puts(a.c_str()); } return 0; } } } } return 0; }