QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#91923#4413. Cyber LanguageWTR2007AC ✓2ms3632kbC++20846b2023-03-29 22:07:472023-03-29 22:07:51

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-29 22:07:51]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3632kb
  • [2023-03-29 22:07:47]
  • 提交

answer

#include<bits/stdc++.h>
#define MULT_TEST 1
using namespace std;
typedef unsigned long long ull;
const int INF = 0x3f3f3f3f;
const int MOD = 998244353;
const int N = 55;
char s[N];
inline int read() {
    int w = 0, f = 1;
    char ch = getchar();
    while (ch < '0' || ch > '9') {
        if(ch == '-') f = -1;
        ch = getchar();
    }
    while (ch >= '0' && ch <= '9') {
        w = (w << 1) + (w << 3) + ch - 48;
        ch = getchar();
    }
    return w * f;
}
inline void Solve() {
    cin.getline(s, 50);
    for (int i = 0; i < 50; i++) 
        if (i == 0 || (s[i - 1] == ' ' && s[i] != ' ')) printf("%c", s[i] - 'a' + 'A');
    for (int i = 0; i < 50; i++) s[i] = ' ';
    puts("");
}
signed main() {
    int T = 1;
#if MULT_TEST
    T = read();
#endif 
    while (T--) Solve();
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3632kb

input:

10
qing lian xi wo
bao gao
wo dai ni men da
da shi suo qu
bao dao
yong yuan de shen
xiao si wo le
shi zhen de
ni shuo de dou dui
yin yang guai qi

output:

QLXW
BG
WDNMD
DSSQ
BD
YYDS
XSWL
SZD
NSDDD
YYGQ

result:

ok 10 lines