Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
146177 刘梓含 字符串长度判断 C++ Compile Error 0 MS 0 KB 280 2026-01-27 13:58:17

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main (){ string a[152] s[152]; int n=0,d=0; cin >> a >> s; while(a[n] != '\0') { n++; } while(a[d] != '\0') { d++; } if(n==d) { cout <<"yes"; } else { cout << "no"; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:16: error: expected initializer before 's'
  string a[152] s[152];
                ^
Main.cc:8:9: error: 'a' was not declared in this scope
  cin >> a >> s;
         ^
Main.cc:8:14: error: 's' was not declared in this scope
  cin >> a >> s;
              ^