今天可以说是非常的棒了,第五个了。
万恶的坏习惯。
代码如下:
#include<cstdio>
#include<iostream>
#include<map>
#include<string>
using namespace std;
int n;
int main() {
map<int, string>ss;
cin >> n;
if (n % 2 == 0) {
int i = 0;
while (i++ < n) {
cin >> ss[i];
}
int count = 0;
map<int, string>::iterator it = ss.begin(), itt = (++it)--;
while (i-- > 0) {
if (*it == *itt++) {
count++;
}
}
if (count == n / 2) {
cout << "Can" << endl;
return 0;
}
}
else
cout << "Cannot" << endl;
return 0;
}