为何此代码会RE乎?
查看原帖
为何此代码会RE乎?
256340
Miller2019楼主2020/4/30 16:44
#include<iostream>
#include<algorithm>
using namespace std;
bool cmp(const string m,const string n)
{
	return m>n;
}
int n,t;string str[100005];
int main()
{
	ios::sync_with_stdio(0);
	cin>>n;
	for(;t<n;t++)
	{
		cin>>str[t];
	}
	if(!is_sorted(str,str+n,cmp))	sort(str,str+n,cmp);
	cout<<unique(str,str+n)-str<<'\n';
	return 0;
}
2020/4/30 16:44
加载中...