数据太弱……
查看原帖
数据太弱……
577955
Poitry楼主2022/10/19 20:46

以下错误代码能过

#include<bits/stdc++.h>
using namespace std;
#define int long long
string s[10010];
int n, vis[10010], ans;
signed main() {
	cin >> n;
	for(int i = 1; i <= n; i ++) {
		cin >> s[i];
		for(int j = 1; j < i; j ++) {
			if(s[i] == s[j]) {
				vis[i] = 1;
				break;
			}
		}
	}
	for(int i = 1; i <= n; i ++) {
		ans += !vis[i];
	}
	cout << ans;
	return 0;
}

请求加强数据

2022/10/19 20:46
加载中...