Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int i,j,k,t,c=0,ch3[1000];
- char ch1,ch2;
- scanf("%d",&t);
- for(i=0;i<t;i++)
- {
- scanf(" %c",&ch1);
- if(ch1=='S')
- {
- for(j=0;j<901;j++)
- {
- scanf(" %c",&ch2);
- if(ch2=='E')break;
- else
- {
- if(ch2=='-'){
- ch3[j]=1;
- }
- else if(ch2=='|'){
- ch3[j]=2;
- }
- c++;
- }
- }
- }
- for(k=0;k<c;k++)
- {
- if(ch3[k]==1)
- printf("R");
- if(ch3[k]==2)
- printf("D");
- }
- c=0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement