Submission #18585


Source Code Expand

Copy
# -*- coding: utf-8 -*-

# AtCoder 3rd

N = int(raw_input('').strip())
words = []
for i in xrange(N):
	words.append(raw_input('').strip())

# reverse string
def revstr(s):
	l = list(s)
	l.reverse()
	return ''.join(l)

words.sort(lambda x,y: cmp(revstr(x), revstr(y)))

for w in words:
	print w

Submission Info

Submission Time
Task B - さかさま辞書
User hiiragi
Language Python (2.7.3)
Score 100
Code Size 313 Byte
Status AC
Exec Time 56 ms
Memory 3392 KB

Judge Result

Set Name all
Score / Max Score 100 / 100
Status
AC × 28
Set Name Test Cases
all 00_sample_01.txt, 00_sample_02.txt, 01_rand_01.txt, 01_rand_02.txt, 01_rand_03.txt, 01_rand_04.txt, 01_rand_05.txt, 01_rand_06.txt, 01_rand_07.txt, 01_rand_08.txt, 01_rand_09.txt, 01_rand_10.txt, 02_long_01.txt, 02_long_02.txt, 02_long_03.txt, 03_short_01.txt, 03_short_02.txt, 03_short_03.txt, 04_max_01.txt, 04_max_02.txt, 04_max_03.txt, 04_max_04.txt, 04_max_05.txt, 05_samestring_01.txt, 05_samestring_02.txt, 05_samestring_03.txt, 05_samestring_04.txt, 05_samestring_05.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 51 ms 3224 KB
00_sample_02.txt AC 56 ms 3324 KB
01_rand_01.txt AC 49 ms 3328 KB
01_rand_02.txt AC 53 ms 3220 KB
01_rand_03.txt AC 49 ms 3216 KB
01_rand_04.txt AC 49 ms 3288 KB
01_rand_05.txt AC 49 ms 3224 KB
01_rand_06.txt AC 56 ms 3220 KB
01_rand_07.txt AC 48 ms 3228 KB
01_rand_08.txt AC 48 ms 3220 KB
01_rand_09.txt AC 48 ms 3332 KB
01_rand_10.txt AC 53 ms 3228 KB
02_long_01.txt AC 51 ms 3324 KB
02_long_02.txt AC 49 ms 3220 KB
02_long_03.txt AC 48 ms 3336 KB
03_short_01.txt AC 47 ms 3220 KB
03_short_02.txt AC 49 ms 3340 KB
03_short_03.txt AC 49 ms 3392 KB
04_max_01.txt AC 50 ms 3220 KB
04_max_02.txt AC 50 ms 3324 KB
04_max_03.txt AC 51 ms 3228 KB
04_max_04.txt AC 53 ms 3212 KB
04_max_05.txt AC 50 ms 3228 KB
05_samestring_01.txt AC 50 ms 3220 KB
05_samestring_02.txt AC 52 ms 3292 KB
05_samestring_03.txt AC 51 ms 3332 KB
05_samestring_04.txt AC 50 ms 3332 KB
05_samestring_05.txt AC 50 ms 3324 KB