Beecrowd 2168 - Twilight at Portland
kaziamir
c_cpp
2 years ago
604 B
12
Indexable
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define yes cout<<"yes"<<endl
#define no cout<<"no"<<endl
#define YES cout<<"YES"<<endl
#define NO cout<<"NO"<<endl
void solution(){
int N;
cin>>N;
N += 1;
int city[N][N];
for(int i=0;i<N;i++){
for(int j=0;j<N;j++){
cin>>city[i][j];
}
}
int x = 0;
for(int i=0;i<(N-1);i++){
for(int j=1;j<(N-0);j++){
int ct = 0;
if(city[i][j] + city[i][j-1] + city[i+1][j] + city[i+1][j-1] < 2){
cout<<"U";
}
else{
cout<<"S";
}
}
cout<<endl;
}
}
int main(){
solution();
return 0;
}Editor is loading...