| //https://www.acmicpc.net/problem/2857 #include <iostream> |
| #include <string> |
| using namespace std; |
| int main() |
| { |
| int cnt=0; |
| for(int i=1; i<=5; i++) |
| { |
| string s; |
| cin>> s; |
| int l=s.size(); |
| for(int j=0; j<l-2; j++) |
| if(s[j]=='F' && s[j+1]=='B' && s[j+2]=='I') |
| { |
| cnt++; |
| cout << i <<" "; |
| break; |
| } |
| } |
| if(!cnt) cout << "HE GOT AWAY!"; |
| } |
'알고리즘 문제 풀이 > 1DP_과제(~180615)' 카테고리의 다른 글
| 171220_3986_좋은 단어 (0) | 2017.12.20 |
|---|---|
| 171219_5585_거스름돈 (0) | 2017.12.19 |
| 171217_3046_R2 (0) | 2017.12.17 |
| 171216_10988_펠린드롬인지 확인하기 (0) | 2017.12.16 |
| 171215_1919_애너그램 만들기 (0) | 2017.12.15 |