A - First Grid Editorial by en_translator
If you are new to learning programming and do not know where to start, please try Problem A “Welcome to AtCoder” from practice contest. There you can find a sample code for each language.
Also, if you are not familiar to problems in programming contests, we recommend you to try some problems in “AtCoder Beginners Selection” (https://atcoder.jp/contests/abs).
Actually, the answer is No
for only two cases below:
.# #.
#. .#
Therefore, receive two strings and implement conditional branches with if statement using string comparison, you will be accepted for this problem.
Sample code (C++)
#include<bits/stdc++.h>
using namespace std;
int main(){
string s1,s2;
cin >> s1 >> s2;
if(s1=="#." && s2==".#"){cout << "No\n";}
else if(s1==".#" && s2=="#."){cout << "No\n";}
else{cout << "Yes\n";}
return 0;
}
posted:
last update: