QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#93894#4413. Cyber Languagekatoli#AC ✓2ms3348kbC++14492b2023-04-03 18:40:492023-04-03 18:40:52

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-04-03 18:40:52]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3348kb
  • [2023-04-03 18:40:49]
  • 提交

answer

#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
using ll=long long;

signed main() {
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	int T;cin>>T;
	string s;getline(cin,s);
	for(;T;T--){
		getline(cin,s);
		cout<<char(toupper(s[0]));
		for(int i=0;i<s.size();++i){
			if(s[i]==' ')cout<<char(toupper(s[i+1]));
		}
		cout<<endl;
	}
	return 0;
}
// init?
// var->0?
// infinite dfs?
// out of bound?
// max_element / min_element?

详细

Test #1:

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

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