Submission #18841


Source Code Expand

Copy
import java.util.*;

public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();

		scanner.nextLine();

		String[] d = new String[N];

		for(int i=0; i<N; i++)
		{
			String w = scanner.nextLine();
			w = Reverse(w);
			d[i] = w;
		}
		Arrays.sort(d);
		for(String s : d)
		{
			System.out.println(Reverse(s));
		}
	}

	public static String Reverse(String s)
	{
		StringBuilder sb = new StringBuilder(s);
		sb.reverse();
		return sb.toString();
	}
}

Submission Info

Submission Time
Task B - さかさま辞書
User nankotsu230
Language Java (OpenJDK 1.7.0)
Score 100
Code Size 560 Byte
Status AC
Exec Time 652 ms
Memory 21420 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 397 ms 20464 KB
00_sample_02.txt AC 399 ms 20472 KB
01_rand_01.txt AC 396 ms 20472 KB
01_rand_02.txt AC 394 ms 20544 KB
01_rand_03.txt AC 395 ms 20712 KB
01_rand_04.txt AC 390 ms 20528 KB
01_rand_05.txt AC 393 ms 20720 KB
01_rand_06.txt AC 395 ms 20472 KB
01_rand_07.txt AC 403 ms 20452 KB
01_rand_08.txt AC 432 ms 20468 KB
01_rand_09.txt AC 387 ms 20524 KB
01_rand_10.txt AC 401 ms 20712 KB
02_long_01.txt AC 399 ms 20568 KB
02_long_02.txt AC 422 ms 20532 KB
02_long_03.txt AC 393 ms 20488 KB
03_short_01.txt AC 390 ms 20404 KB
03_short_02.txt AC 396 ms 20460 KB
03_short_03.txt AC 386 ms 20460 KB
04_max_01.txt AC 460 ms 20724 KB
04_max_02.txt AC 398 ms 20716 KB
04_max_03.txt AC 652 ms 20836 KB
04_max_04.txt AC 401 ms 20704 KB
04_max_05.txt AC 395 ms 20736 KB
05_samestring_01.txt AC 404 ms 21228 KB
05_samestring_02.txt AC 398 ms 21176 KB
05_samestring_03.txt AC 415 ms 21420 KB
05_samestring_04.txt AC 407 ms 21224 KB
05_samestring_05.txt AC 411 ms 21208 KB