AtCoder Beginner Contest 004

Submission #3978079

Source codeソースコード

//program luogu.AT817
#include<iostream>
#include<cstdio>
using namespace std;
int a[7]={0,1,2,3,4,5,6},n,tmp;

int main(){
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		tmp=i%5+1;
		swap(a[tmp],a[tmp+1]);
	}
	for(int i=1;i<=6;i++)
		printf("%d ",a[i]);
	printf("\n");
	return 0;
}

Submission

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

Compiler messageコンパイルメッセージ

./Main.cpp: In function ‘int main()’:
./Main.cpp:8:16: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
^

Test case

Set

Set name Score得点 / Max score Cases
Subtask1 0 / 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 WA
SubTask1/00_sample_01.txt WA
SubTask1/00_sample_02.txt WA
SubTask1/rand_19.txt WA
SubTask1/rand_2.txt WA
SubTask1/rand_25.txt WA
SubTask1/rand_27.txt WA
SubTask1/rand_33.txt WA
SubTask1/rand_35.txt WA
SubTask1/rand_4.txt WA
SubTask1/rand_44.txt WA
SubTask1/rand_48.txt WA
SubTask1/rand_8.txt WA
SubTask2/00_sample_03.txt WA
SubTask2/max_case.txt TLE
SubTask2/rand_120009641.txt WA
SubTask2/rand_134230520.txt WA
SubTask2/rand_136939465.txt WA
SubTask2/rand_200732473.txt WA
SubTask2/rand_211796835.txt WA
SubTask2/rand_312330341.txt WA
SubTask2/rand_377341731.txt WA
SubTask2/rand_384611280.txt WA
SubTask2/rand_386098102.txt WA
SubTask2/rand_399010727.txt WA
SubTask2/rand_409627453.txt WA
SubTask2/rand_416537730.txt WA
SubTask2/rand_425486442.txt WA
SubTask2/rand_493135174.txt WA
SubTask2/rand_573105326.txt WA
SubTask2/rand_62794810.txt WA
SubTask2/rand_649471654.txt WA
SubTask2/rand_693017484.txt WA
SubTask2/rand_729197057.txt WA
SubTask2/rand_759630883.txt WA
SubTask2/rand_823752210.txt WA
SubTask2/rand_830399384.txt WA
SubTask2/rand_893242387.txt TLE
SubTask2/rand_935005824.txt TLE
SubTask2/rand_989703310.txt TLE