Submission #18377


Source Code Expand

Copy
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int num = s.nextInt();
		s.nextLine();
		String[] texts = new String[num];
		for (int i = 0; i < num; i++) {
			String text = s.nextLine();
			texts[i] = "";
			int length = text.length();
			for (int j = 0; j < length; j++) {
				texts[i] += text.charAt(length - j - 1);
			}
		}
		Arrays.sort(texts);
		for (int i = 0; i < num; i++) {
			String res = "";
			int length = texts[i].length();
			for (int j = 0; j < length; j++) {
				res += texts[i].charAt(length - j - 1);
			}
			System.out.println(res);
		}
	}
}

Submission Info

Submission Time
Task B - さかさま辞書
User saharan
Language Java (OpenJDK 1.7.0)
Score 100
Code Size 666 Byte
Status AC
Exec Time 512 ms
Memory 22544 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 421 ms 20488 KB
00_sample_02.txt AC 434 ms 20444 KB
01_rand_01.txt AC 405 ms 20484 KB
01_rand_02.txt AC 410 ms 20628 KB
01_rand_03.txt AC 428 ms 21012 KB
01_rand_04.txt AC 414 ms 20748 KB
01_rand_05.txt AC 424 ms 20888 KB
01_rand_06.txt AC 411 ms 20436 KB
01_rand_07.txt AC 450 ms 20620 KB
01_rand_08.txt AC 412 ms 20464 KB
01_rand_09.txt AC 436 ms 20488 KB
01_rand_10.txt AC 422 ms 21000 KB
02_long_01.txt AC 417 ms 20560 KB
02_long_02.txt AC 420 ms 20744 KB
02_long_03.txt AC 452 ms 20476 KB
03_short_01.txt AC 423 ms 20356 KB
03_short_02.txt AC 469 ms 20476 KB
03_short_03.txt AC 450 ms 20356 KB
04_max_01.txt AC 448 ms 21900 KB
04_max_02.txt AC 447 ms 22020 KB
04_max_03.txt AC 511 ms 21648 KB
04_max_04.txt AC 475 ms 22096 KB
04_max_05.txt AC 511 ms 21920 KB
05_samestring_01.txt AC 451 ms 22424 KB
05_samestring_02.txt AC 512 ms 22508 KB
05_samestring_03.txt AC 446 ms 22544 KB
05_samestring_04.txt AC 444 ms 22536 KB
05_samestring_05.txt AC 468 ms 22536 KB