Submission #63000024


Source Code Expand

#include <bits/stdc++.h>
#define _F(x,y,z) for(int x=y;x<=z;x++)
#define F_(x,z,y) for(int x=z;x>=y;x--)
#define TF(x,y,z) for(int x=head[y],z;x;x=nex[x])

using namespace std;

typedef long long ll;
typedef double dou;
typedef const int ci;
typedef pair<int,int> pii;

ci maxn=2e6+10;

int n;
string s[maxn];
bool cmp(string a,string b)
{
	return a.length()<b.length();
}
int main()
{
	scanf("%d",&n);
	_F(i,1,n)
	{
		cin>>s[i];
	}
	sort(s+1,s+1+n,cmp);
	_F(i,1,n)
	{
		cout<<s[i];
	}
	return 0;
}

Submission Info

Submission Time
Task B - cat
User adolphshi
Language C++ 20 (gcc 12.2)
Score 200
Code Size 531 Byte
Status AC
Exec Time 31 ms
Memory 66352 KiB

Compile Error

Main.cpp: In function ‘int main()’:
Main.cpp:23:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   23 |         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 29 ms 66176 KiB
sample01.txt AC 29 ms 66116 KiB
testcase00.txt AC 31 ms 66028 KiB
testcase01.txt AC 29 ms 66204 KiB
testcase02.txt AC 30 ms 66208 KiB
testcase03.txt AC 29 ms 66260 KiB
testcase04.txt AC 29 ms 66264 KiB
testcase05.txt AC 29 ms 66352 KiB
testcase06.txt AC 29 ms 66056 KiB
testcase07.txt AC 29 ms 66156 KiB
testcase08.txt AC 29 ms 66096 KiB
testcase09.txt AC 29 ms 66096 KiB
testcase10.txt AC 30 ms 66196 KiB
testcase11.txt AC 29 ms 66180 KiB
testcase12.txt AC 29 ms 66176 KiB