Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
158478 格林老师 词组缩写 C++ Wrong Answer 2 MS 276 KB 532 2026-08-22 10:51:34

Tests(0/1):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int T; cin>>T; cin.ignore(); while(T--){ string s; getline(cin,s); bool first=true; string new_s; for (int i=0;i<s.size();i++){ if (s[i]==' '){ first=true; } else{ if (first==true){ new_s+=s[i]; first=false; } } } cout<<new_s<<"\n"; } }


Run Info:

------Input------
10 asdfghjklp bnmlkjhgfd cvbnmlkjhg dfghjklpoi ertyuioplk fghjklpoiu ghjklpoiuy hytgbvfred iuytrewqas jklpoiuytr a B C d e qwertyuioplkjhgfd Qweer psdafdsf SFGCHV qwertyuhbgfd bvcvgtrdfg Q E R F D CD Rttt aa bb cc dd ee Aa Bb Cc Dd Ee plokijuhyg QWERTYUIO Qpojh jhuQWEE QWERTYUJMNBVCDFGH
------Answer-----
ABCDEFGHIJ ABCDE Q QPS QB QERFDCR ABCDE ABCDE PQQJ Q
------Your output-----
abcdefghij aBCde q QpS qb QERFDCR abcde ABCDE pQQj Q