Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
148874 冰块ee 词组缩写 C++ Compile Error 0 MS 0 KB 964 2026-03-01 19:47:48

Tests(0/0):


Code:

[老师] 19:33:41 #include<bits/stdc++.h> using namespace std; int main() { int t; cin >> t; cin.get(); for (int i = 0; i < t; ++i) { string s; getline(cin, s); string n; bool f = true; for (char c : s) { if (c == ' ') { f = true; } else if (f) { n += toupper(c); f = false; } } cout << n << endl; } return 0; } [老师] 19:47:32 #include <iostream> #include <string> using namespace std; int main() { int n; cin >> n; cin.get(); for (int i = 0; i < n; ++i) { string s1, s2; getline(cin, s1); getline(cin, s2); int mid = s1.length() / 2; // string ss = s1.substr(0, mid) + s2 + s1.substr(mid); string ss= s1.insert(mid,s2); cout << ss << endl; } return 0; }


Run Info:

Main.cc:1:1: error: stray '\350' in program
 [老师] 19:33:41
 ^
Main.cc:1:1: error: stray '\200' in program
Main.cc:1:1: error: stray '\201' in program
Main.cc:1:1: error: stray '\345' in program
Main.cc:1:1: error: stray '\270' in program
Main.cc:1:1: error: stray '\210' in program
Main.cc:27:1: error: stray '\350' in program
 [老师] 19:47:32
 ^
Main.cc:27:1: error: stray '\200' in program
Main.cc:27:1: error: stray '\201' in program
Main.cc:27:1: error: stray '\345' in program
Main.cc:27:1: error: stray '\270' in program
Main.cc:27:1: error: stray '\210' in program
Main.cc:1:1: error: expected unqualified-id before '[' token
 [老师] 19:33:41
 ^
Main.cc:27:1: error: expected unqualified-id before '[' token
 [老师] 19:47:32
 ^
Main.cc: In function 'int main()':
Main.cc:32:5: error: redefinition of 'int main()'
 int main() {
     ^
Main.cc:5:5: note: 'int main()' previously defined here
 int main() {
     ^