Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
88754 | 王馨桐 | 字符串相等判断 | C++ | Accepted | 1 MS | 280 KB | 318 | 2024-08-21 10:54:50 |
#include<bits/stdc++.h> using namespace std; char s1[1001]; char s2[1001]; int main(){ cin >>s1 >>s2; int n=strlen(s1); int m=strlen(s2); if(n!=m){ cout <<"no"; }else{ for(int i=0; i<=n-1; i++){ if(s1[i]!=s2[i]){ cout <<"no"; return 0; } } cout <<"yes"; } return 0; }