C++11 Full River Black Help!
查看原帖
C++11 Full River Black Help!
977778
__Harry_Haiyun__楼主2023/9/3 17:46
#include <bits/stdc++.h>
#define int long long
#define iostream() ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
using namespace std;
const int maxn = 1e6+7;
const int MAXN = maxn / 2;
signed main()
{
    iostream();
    int n;
    cin >> n;
    string temp;
    vector<string>v;
    while (cin >> temp) v.push_back(temp);
    while (v.size())
    {
    	if (count(v.begin(),v.end(),v.back()) == 1)
    	{
    		cout << v.back();
    		return 0;
		}
	}
 	return 0;
}
2023/9/3 17:46
加载中...