| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 78219 | sh25_wanghy | 字符串判等 | C++ | 通过 | 0 MS | 240 KB | 627 | 2025-12-26 15:29:12 |
#include <iostream> #include <string> #include <algorithm> using namespace std; bool areEqual(const string& s1, const string& s2) { string filtered1, filtered2; for (char c : s1) { if (c != ' ') { filtered1 += tolower(c); } } for (char c : s2) { if (c != ' ') { filtered2 += tolower(c); } } return filtered1 == filtered2; } int main() { string str1, str2; getline(cin, str1); getline(cin, str2); if (areEqual(str1, str2)) { cout << "YES"; } else { cout << "NO"; } return 0; }