Submission #19038


Source Code Expand

Copy
import java.util.Arrays;
import java.util.Scanner;

    public class Main {
            public static void main(String args[]){
            	Scanner input = new Scanner(System.in);
                   	int num = input.nextInt();
                   	String[] s = new String[num];
                   	for(int i = 0 ; i < num ; i++){
                   		s[i] = input.next();
                   	}
                    maximum(num,s);
            }
            
          public static void maximum(int num,String[] s){
        	  for(int i = 0 ; i < s.length ; i++){
            	  StringBuilder sb = new StringBuilder();
        		  s[i] = sb.append(s[i]).reverse().toString();
        	  }
        	  Arrays.sort(s);
        	  for(int i = 0 ; i < s.length ; i++){
            	  StringBuilder sb = new StringBuilder();
        		  s[i] = sb.append(s[i]).reverse().toString();
        		  System.out.println(s[i]);
        	  }
          }

    }

Submission Info

Submission Time
Task B - さかさま辞書
User spinical
Language Java (OpenJDK 1.7.0)
Score 100
Code Size 971 Byte
Status AC
Exec Time 546 ms
Memory 20912 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 457 ms 20220 KB
00_sample_02.txt AC 435 ms 20212 KB
01_rand_01.txt AC 491 ms 20344 KB
01_rand_02.txt AC 452 ms 20320 KB
01_rand_03.txt AC 457 ms 20384 KB
01_rand_04.txt AC 469 ms 20344 KB
01_rand_05.txt AC 461 ms 20336 KB
01_rand_06.txt AC 468 ms 20292 KB
01_rand_07.txt AC 467 ms 20200 KB
01_rand_08.txt AC 436 ms 20292 KB
01_rand_09.txt AC 440 ms 20264 KB
01_rand_10.txt AC 446 ms 20344 KB
02_long_01.txt AC 446 ms 20340 KB
02_long_02.txt AC 454 ms 20320 KB
02_long_03.txt AC 447 ms 20356 KB
03_short_01.txt AC 440 ms 20328 KB
03_short_02.txt AC 457 ms 20340 KB
03_short_03.txt AC 451 ms 20348 KB
04_max_01.txt AC 458 ms 20460 KB
04_max_02.txt AC 451 ms 20336 KB
04_max_03.txt AC 454 ms 20340 KB
04_max_04.txt AC 464 ms 20460 KB
04_max_05.txt AC 451 ms 20344 KB
05_samestring_01.txt AC 468 ms 20848 KB
05_samestring_02.txt AC 546 ms 20788 KB
05_samestring_03.txt AC 462 ms 20856 KB
05_samestring_04.txt AC 470 ms 20912 KB
05_samestring_05.txt AC 469 ms 20852 KB