QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#819920#4413. Cyber LanguageKevin5307AC ✓0ms3608kbC++23977b2024-12-18 18:20:382024-12-18 18:20:39

Judging History

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

  • [2024-12-18 18:20:39]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3608kb
  • [2024-12-18 18:20:38]
  • 提交

answer

//Author: Kevin
#include<bits/stdc++.h>
//#pragma GCC optimize("O2")
using namespace std;
#define ll long long
#define ull unsigned ll
#define pb emplace_back
#define mp make_pair
#define ALL(x) (x).begin(),(x).end()
#define rALL(x) (x).rbegin(),(x).rend()
#define srt(x) sort(ALL(x))
#define rev(x) reverse(ALL(x))
#define rsrt(x) sort(rALL(x))
#define sz(x) (int)(x.size())
#define inf 0x3f3f3f3f
#define pii pair<int,int>
#define lb(v,x) (int)(lower_bound(ALL(v),x)-v.begin())
#define ub(v,x) (int)(upper_bound(ALL(v),x)-v.begin())
#define uni(v) v.resize(unique(ALL(v))-v.begin())
#define longer __int128_t
void die(string S){puts(S.c_str());exit(0);}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int t;
	cin>>t;
	string tmp;
	getline(cin,tmp);
	while(t--)
	{
		string s;
		getline(cin,s);
		for(int i=0;i<sz(s);i++)
			if(!i||s[i-1]==' ')
				cout<<(char)(toupper(s[i]));
		cout<<'\n';
	}
	return 0;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3608kb

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