Submission #63002823
Source Code Expand
Copy
#include<bits/stdc++.h>using namespace std;#define ll long longint main(){int n;cin>>n;vector< pair<int,string> >s;for(int i=0;i<n;i++) {string s1;cin>>s1;s.push_back({s1.size(),s1});}sort(s.begin(),s.end());for(int i=0;i<n;i++){cout<<s[i].second;}return 0;}
#include<bits/stdc++.h> using namespace std; #define ll long long int main(){ int n; cin>>n; vector< pair<int,string> >s; for(int i=0;i<n;i++) { string s1; cin>>s1; s.push_back({s1.size(),s1}); } sort(s.begin(),s.end()); for(int i=0;i<n;i++){ cout<<s[i].second; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - cat |
User | zhepei |
Language | C++ 20 (gcc 12.2) |
Score | 200 |
Code Size | 310 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 3660 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
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 | 3368 KB |
sample01.txt | AC | 1 ms | 3560 KB |
testcase00.txt | AC | 1 ms | 3500 KB |
testcase01.txt | AC | 1 ms | 3368 KB |
testcase02.txt | AC | 1 ms | 3660 KB |
testcase03.txt | AC | 1 ms | 3524 KB |
testcase04.txt | AC | 1 ms | 3576 KB |
testcase05.txt | AC | 1 ms | 3488 KB |
testcase06.txt | AC | 1 ms | 3520 KB |
testcase07.txt | AC | 1 ms | 3540 KB |
testcase08.txt | AC | 1 ms | 3572 KB |
testcase09.txt | AC | 1 ms | 3492 KB |
testcase10.txt | AC | 1 ms | 3464 KB |
testcase11.txt | AC | 1 ms | 3652 KB |
testcase12.txt | AC | 1 ms | 3528 KB |