Submission #18178


Source Code Expand

Copy
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Main {
	
	public static void main(String[] args) throws IOException {
		BufferedReader s = new BufferedReader(new InputStreamReader(System.in));
		int N = Integer.valueOf(s.readLine());
		
		List<String> revs = new ArrayList<String>();
		for (int i = 0 ; i < N ; i++) {
			String line = s.readLine();
			String rev = new StringBuffer(line).reverse().toString();
			revs.add(rev);
		}
		Collections.sort(revs);
		
		for (int i = 0 ; i < N ; i++) {
			String rev = revs.get(i);
			System.out.println(new StringBuffer(rev).reverse().toString());
		}
	}
}

Submission Info

Submission Time
Task B - さかさま辞書
User hamadu
Language Java (OpenJDK 1.7.0)
Score 100
Code Size 765 Byte
Status AC
Exec Time 428 ms
Memory 19580 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 407 ms 18544 KB
00_sample_02.txt AC 409 ms 18640 KB
01_rand_01.txt AC 364 ms 18612 KB
01_rand_02.txt AC 416 ms 18608 KB
01_rand_03.txt AC 367 ms 18612 KB
01_rand_04.txt AC 367 ms 18668 KB
01_rand_05.txt AC 370 ms 18616 KB
01_rand_06.txt AC 362 ms 18532 KB
01_rand_07.txt AC 372 ms 18660 KB
01_rand_08.txt AC 377 ms 18556 KB
01_rand_09.txt AC 373 ms 18628 KB
01_rand_10.txt AC 364 ms 18668 KB
02_long_01.txt AC 420 ms 18528 KB
02_long_02.txt AC 367 ms 18524 KB
02_long_03.txt AC 361 ms 18552 KB
03_short_01.txt AC 358 ms 18616 KB
03_short_02.txt AC 363 ms 18612 KB
03_short_03.txt AC 369 ms 18664 KB
04_max_01.txt AC 365 ms 18656 KB
04_max_02.txt AC 367 ms 18640 KB
04_max_03.txt AC 368 ms 18680 KB
04_max_04.txt AC 372 ms 18644 KB
04_max_05.txt AC 412 ms 18532 KB
05_samestring_01.txt AC 369 ms 18552 KB
05_samestring_02.txt AC 428 ms 19580 KB
05_samestring_03.txt AC 376 ms 19300 KB
05_samestring_04.txt AC 358 ms 18620 KB
05_samestring_05.txt AC 356 ms 18544 KB