题解:P13103 [GCJ 2019 Qualification] You Can Go Your Own Way
_fallen_leaves_ · · 题解
P13103 [GCJ 2019 Qualification] You Can Go Your Own Way
题意
有一个人走迷宫,走出了一种方式,题目要求我们找到一条没有与这种方式重叠的路径。
思路
题目中说会有
#include<bits/stdc++.h>
#define int long long
using namespace std;
int step=0;
signed main()
{
int t;
cin>>t;
while(t--)
{
int n;
string s;
cin>>n>>s;
step++;
cout<<"Case #"<<step<<": ";
for(int i=0;i<s.size();i++)
if(s[i]=='E') cout<<"S";
else cout<<"E";
cout<<"\n";
}
return 0;
}