Submission #63001553


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
#define rep(i,l,r) for (int i = (l); i <= (r); i++)
#define per(i,r,l) for (int i = (r); i >= (l); i--)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define maxn(a, b) a = max(a, b)
#define minn(a, b) a = min(a, b)
typedef vector<int> VI;
typedef long long ll;
typedef pair<int,int> PII;
typedef double db;
const ll mod = 998244353;
mt19937 gen(random_device{}());
ll rp(ll a,ll b) {ll res=1%mod;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}

const int N = 52;
int n;
pair<int, string> s[N];

int main() {
	scanf("%d", &n);
	rep(i,1,n) {
		cin >>s[i].se;
		s[i].fi=SZ(s[i].se);
	}
	sort(s +1,s+1+n);
	string ans;
	rep(i,1,n) ans+=s[i].se;
	cout<<ans<<endl;
	return 0;
}

Submission Info

Submission Time
Task B - cat
User actor
Language C++ 20 (gcc 12.2)
Score 200
Code Size 956 Byte
Status AC
Exec Time 1 ms
Memory 3884 KiB

Compile Error

Main.cpp: In function ‘int main()’:
Main.cpp:28:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   28 |         scanf("%d", &n);
      |         ~~~~~^~~~~~~~~~

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 3584 KiB
sample01.txt AC 1 ms 3884 KiB
testcase00.txt AC 1 ms 3676 KiB
testcase01.txt AC 1 ms 3680 KiB
testcase02.txt AC 1 ms 3588 KiB
testcase03.txt AC 1 ms 3776 KiB
testcase04.txt AC 1 ms 3636 KiB
testcase05.txt AC 1 ms 3696 KiB
testcase06.txt AC 1 ms 3700 KiB
testcase07.txt AC 1 ms 3592 KiB
testcase08.txt AC 1 ms 3580 KiB
testcase09.txt AC 1 ms 3884 KiB
testcase10.txt AC 1 ms 3512 KiB
testcase11.txt AC 1 ms 3764 KiB
testcase12.txt AC 1 ms 3512 KiB