Wrong Answer
Code
#include<bits/stdc++.h>
using namespace std;
#define ll long long
string samp;
void solve(){
int n;
cin>>n;
//string samp;
cin>>samp;
int siz = samp.length();
int flag = 0;
int m = 0;
for(int i =0; i<siz; i++)
{
for(m = i+1; m<siz; m++)
{
if(samp[i] == 'S' && samp[m] == 'e')
{
flag = 1;
break;
}
else
{
flag = 0;
}
}
if(flag == 1)
{
break;
}
}
if(flag == 1)
{
cout<<"YES"<<endl;
}
else
{
cout<<"NO"<<endl;
}
}
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int t; cin >> t;
while(t--){
solve();
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1147 SeriousOJ Challenge
- Contest
- LU IUJPC : Sylhet Division 2024
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-12-09 06:29:01
- Judged At
- 2024-12-09 06:29:01
- Judged By
- Score
- 10
- Total Time
- 4ms
- Peak Memory
- 584.0 KiB