結果
| 問題 | No.3850 作門ハッカソン |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-12-04 22:43:55 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 473 ms / 2,000 ms |
| + 892µs | |
| コード長 | 868 bytes |
| 記録 | |
| コンパイル時間 | 2,616 ms |
| コンパイル使用メモリ | 337,860 KB |
| 実行使用メモリ | 9,908 KB |
| 最終ジャッジ日時 | 2026-12-04 22:44:25 |
| 合計ジャッジ時間 | 6,435 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 29 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(void){
int t;
cin>>t;
while(t--){
int h,w;
cin>>h>>w;
vector<string>s(h);
for(int i=0;i<h;i++)cin>>s[i];
int ans=0;
for(int i=0;i<h-1;i++){
int cond=0;
for(int j=0;j<w;j++){
if((s[i][j]=='#'||s[i][j]=='?')&&s[i+1][j]=='?')cond++;
else if((s[i][j]=='#'||s[i][j]=='?')&&s[i+1][j]=='#'){
if(cond==2)cond=3;
else cond=1;
}else if((s[i][j]=='#'||s[i][j]=='?')&&s[i+1][j]=='.'){
if(cond==1||cond==2)cond=2;
else cond=0;
}else{
cond=0;
}
if(cond==3)ans=1;
}
}
cout<<(ans?"Yes":"No")<<endl;
}
return 0;
}