B - Treasure Chest Editorial
by
TKTY1
find,rfind関数を用いることもできます.
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
string s;
cin>>s;
if(s.find('|')<s.find('*')&&s.find('*')<s.rfind('|'))cout<<"in"<<endl;
else cout<<"out"<<endl;
}
posted:
last update:
