Skip to content

Commit 5e7aaf2

Browse files
committed
Added 1567A - Domino Disaster.cpp
1 parent 3c5eb1a commit 5e7aaf2

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

1567A - Domino Disaster.cpp

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// ॐ नमः शिवाय
2+
#include<bits/stdc++.h>
3+
using namespace std;
4+
5+
#define ll long long
6+
#define pb push_back
7+
#define ff first
8+
#define ss second
9+
#define mp make_pair
10+
11+
// Code Written By: Vikash Patel
12+
// Codeforces Profile: https://codeforces.com/profile/vikashpatel
13+
14+
int main()
15+
{
16+
ios_base::sync_with_stdio(0);
17+
cin.tie(0);
18+
cout.tie(0);
19+
20+
// #ifndef ONLINE_JUDGE
21+
// freopen("input.txt", "r", stdin);
22+
// freopen("/Users/vikash/Desktop/output.txt", "w", stdout);
23+
// #endif
24+
25+
int t;
26+
cin>>t;
27+
while(t--)
28+
{
29+
ll n;
30+
cin>>n;
31+
char s[n+1];
32+
string d;
33+
for(ll i=0;i<n;i++)
34+
{
35+
cin>>s[i];
36+
if(s[i]=='L')
37+
d+='L';
38+
if(s[i]=='R')
39+
d+='R';
40+
if(s[i]=='U')
41+
d+='D';
42+
if(s[i]=='D')
43+
d+='U';
44+
}
45+
cout<<d<<endl;
46+
}
47+
return 0;
48+
}

0 commit comments

Comments
 (0)