【CF Manthan, Codefest 17 A】Tom Riddle's Diary

【链接】h在这里写链接


【题意】


在这里写题意

【题解】


/*
Be careful.
二重循环枚举
*/


【错的次数】


0

【反思】


在这了写反思

【代码】

#include <bits/stdc++.h>
using namespace std;

int n;
string s[110];

int main()
{
	//freopen("F:\rush.txt", "r", stdin);
	scanf("%d", &n);
	for (int i = 1; i <= n; i++)
		cin >> s[i];
	for (int i = 1; i <= n; i++) {
		bool ok = false;
		for (int j = 1; j < i; j++)
			if (s[j] == s[i])
				ok = true;
		if (ok)
			puts("YES");
		else
			puts("NO");
	}
	return 0;
}


原文地址:https://www.cnblogs.com/AWCXV/p/7625988.html