#include using namespace std; int main() { string s1, s2; getline(cin, s1); getline(cin, s2); //字符串转大写. // Q1:为什么用 ::tolower 呢? // https://www.cnblogs.com/blink-cz/p/12374069.html transform(s1.begin(), s1.end(), s1.begin(), ::toupper); transform(s2.begin(), s2.end(), s2.begin(), ::toupper); if (s1 == s2) { cout << "YES"; } else { cout << "NO"; } return 0; }