Submission #63010811


Source Code Expand

Copy
#include<bits/stdc++.h>
using namespace std;
using pii=pair<int,string>;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
vector<pii> a;
int n;
cin>>n;
for(int i=0;i<n;i++)
{
string s;
cin>>s;
int x;
x=s.size();
a.push_back({x,s});
}
sort(a.begin(),a.end());
for(int i=0;i<n;i++)
cout<<a[i].second;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include<bits/stdc++.h>
using namespace std;
using pii=pair<int,string>;
int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	vector<pii> a;
	int n;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		string s;
		cin>>s;
		int x;
		x=s.size();
		a.push_back({x,s});
	}
	sort(a.begin(),a.end());
	for(int i=0;i<n;i++)
		cout<<a[i].second;
	cout<<endl;
	return 0;
}

Submission Info

Submission Time
Task B - cat
User qq3579982470
Language C++ 20 (gcc 12.2)
Score 200
Code Size 370 Byte
Status AC
Exec Time 1 ms
Memory 3620 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 15
Set Name Test Cases
Sample sample00.txt, sample01.txt
All sample00.txt, sample01.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt, testcase06.txt, testcase07.txt, testcase08.txt, testcase09.txt, testcase10.txt, testcase11.txt, testcase12.txt
Case Name Status Exec Time Memory
sample00.txt AC 1 ms 3428 KB
sample01.txt AC 1 ms 3612 KB
testcase00.txt AC 1 ms 3548 KB
testcase01.txt AC 1 ms 3492 KB
testcase02.txt AC 1 ms 3412 KB
testcase03.txt AC 1 ms 3592 KB
testcase04.txt AC 1 ms 3548 KB
testcase05.txt AC 1 ms 3460 KB
testcase06.txt AC 1 ms 3444 KB
testcase07.txt AC 1 ms 3420 KB
testcase08.txt AC 1 ms 3416 KB
testcase09.txt AC 1 ms 3616 KB
testcase10.txt AC 1 ms 3620 KB
testcase11.txt AC 1 ms 3524 KB
testcase12.txt AC 1 ms 3412 KB


2025-04-05 (Sat)
17:23:40 +00:00