AtCoder Beginner Contest 004

Submission #3977787

Source codeソースコード

import java.util.*;
import java.awt.*;
import static java.lang.System.*;
import static java.lang.Math.*;
public class Main {
    public static void main(String[] $) {
        Scanner sc = new Scanner(in);
        int N=sc.nextInt();
        int[] f={0,1,2,3,4,5,6};
        for(int i=0;i<N;i++){
            swap(f,i%5+1,i%5+2);
        }
        for(int k:f)if(k!=0)out.print(k);
        out.println();
    }
    static void swap(int[] a,int i,int j){
        int t=a[i];
        a[i]=a[j];
        a[j]=t;
    }
}

Submission

Task問題 C - 入れ替え
User nameユーザ名 NS601023
Created time投稿日時
Language言語 Java8 (OpenJDK 1.8.0)
Status状態 TLE
Score得点 30
Source lengthソースコード長 535 Byte
File nameファイル名
Exec time実行時間 ms
Memory usageメモリ使用量 -

Test case

Set

Set name Score得点 / Max score Cases
Subtask1 30 / 30 SubTask1/00_sample_00.txt,SubTask1/00_sample_01.txt,SubTask1/00_sample_02.txt,SubTask1/rand_19.txt,SubTask1/rand_2.txt,SubTask1/rand_25.txt,SubTask1/rand_27.txt,SubTask1/rand_33.txt,SubTask1/rand_35.txt,SubTask1/rand_4.txt,SubTask1/rand_44.txt,SubTask1/rand_48.txt,SubTask1/rand_8.txt
Subtask2 0 / 70 SubTask2/00_sample_03.txt,SubTask2/max_case.txt,SubTask2/rand_120009641.txt,SubTask2/rand_134230520.txt,SubTask2/rand_136939465.txt,SubTask2/rand_200732473.txt,SubTask2/rand_211796835.txt,SubTask2/rand_312330341.txt,SubTask2/rand_377341731.txt,SubTask2/rand_384611280.txt,SubTask2/rand_386098102.txt,SubTask2/rand_399010727.txt,SubTask2/rand_409627453.txt,SubTask2/rand_416537730.txt,SubTask2/rand_425486442.txt,SubTask2/rand_493135174.txt,SubTask2/rand_573105326.txt,SubTask2/rand_62794810.txt,SubTask2/rand_649471654.txt,SubTask2/rand_693017484.txt,SubTask2/rand_729197057.txt,SubTask2/rand_759630883.txt,SubTask2/rand_823752210.txt,SubTask2/rand_830399384.txt,SubTask2/rand_893242387.txt,SubTask2/rand_935005824.txt,SubTask2/rand_989703310.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
SubTask1/00_sample_00.txt AC 96 ms 20560 KB
SubTask1/00_sample_01.txt AC 96 ms 18772 KB
SubTask1/00_sample_02.txt AC 96 ms 18900 KB
SubTask1/rand_19.txt AC 95 ms 18772 KB
SubTask1/rand_2.txt AC 97 ms 21716 KB
SubTask1/rand_25.txt AC 95 ms 19284 KB
SubTask1/rand_27.txt AC 96 ms 21076 KB
SubTask1/rand_33.txt AC 95 ms 20948 KB
SubTask1/rand_35.txt AC 96 ms 18644 KB
SubTask1/rand_4.txt AC 98 ms 21460 KB
SubTask1/rand_44.txt AC 98 ms 21716 KB
SubTask1/rand_48.txt AC 95 ms 21716 KB
SubTask1/rand_8.txt AC 97 ms 21588 KB
SubTask2/00_sample_03.txt AC 353 ms 21204 KB
SubTask2/max_case.txt TLE
SubTask2/rand_120009641.txt AC 400 ms 18772 KB
SubTask2/rand_134230520.txt AC 438 ms 21204 KB
SubTask2/rand_136939465.txt AC 445 ms 19284 KB
SubTask2/rand_200732473.txt AC 605 ms 19412 KB
SubTask2/rand_211796835.txt AC 627 ms 18644 KB
SubTask2/rand_312330341.txt AC 875 ms 19028 KB
SubTask2/rand_377341731.txt AC 1049 ms 20688 KB
SubTask2/rand_384611280.txt AC 1085 ms 23252 KB
SubTask2/rand_386098102.txt AC 1089 ms 21844 KB
SubTask2/rand_399010727.txt AC 1140 ms 18768 KB
SubTask2/rand_409627453.txt AC 1209 ms 21844 KB
SubTask2/rand_416537730.txt AC 1231 ms 21332 KB
SubTask2/rand_425486442.txt AC 1271 ms 21972 KB
SubTask2/rand_493135174.txt AC 1558 ms 19796 KB
SubTask2/rand_573105326.txt AC 1913 ms 21972 KB
SubTask2/rand_62794810.txt AC 260 ms 21460 KB
SubTask2/rand_649471654.txt TLE
SubTask2/rand_693017484.txt TLE
SubTask2/rand_729197057.txt TLE
SubTask2/rand_759630883.txt TLE
SubTask2/rand_823752210.txt TLE
SubTask2/rand_830399384.txt TLE
SubTask2/rand_893242387.txt TLE
SubTask2/rand_935005824.txt TLE
SubTask2/rand_989703310.txt TLE