이 문제도 간단했다
처음에 문제를 착각해서 문자열 중에 anj라는 단어가 있으면 뭐야;를 출력하는 줄 알았다.
알고보니 문자열 자체가 anj면 출력하는 거였음
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <functional>
#include <string>
#include <queue>
#include <stack>
#include <set>
#include <map>
#define xx first
#define yy second
#define all(x) (x).begin(), (x).end()
#pragma warning(disable:4996)
using namespace std;
using i64 = long long;
using ii = pair<int, int>;
using ii64 = pair<i64, i64>;
int main() {
int n;
scanf("%d", &n);
for (int i = 0; i < n; i++)
{
string str;
cin >> str;
if (str == "anj")
{
printf("뭐야;");
return 0;
}
}
printf("뭐야?");
return 0;
}
'prompt' 카테고리의 다른 글
[토요라운드] D. 문자열 집합 (14425) (0) | 2020.09.05 |
---|---|
[토요라운드] C. 카약과 강풍 (2891) (0) | 2020.09.05 |
[토요라운드] A. 운동장 한 바퀴(16486) (0) | 2020.09.05 |
[토요라운드] 20/09/05 후기 (0) | 2020.09.05 |
[Special Round 2] C. 작업 일지 (0) | 2020.07.18 |