Submission #215008


Source Code Expand

#include<stdio.h>
 
#pragma warning(disable : 4996)
int main(){
 
	int N, M, D;
	int A[200000000000];
	int ansk[100000001];
	int ans[10000000000001];
	int i, j, k, l, m, n;
 
	scanf("%d", &N);
	scanf("%d", &M);
	scanf("%d", &D);
 
	for (i = 0; i < M; i++){
		scanf("%d", &A[i]);
	}
 
	for (j = 1; j < N + 1; j++){
		int Nn = j;
		for (k = 0; k < M; k++){
			if (Nn == A[k]) Nn += 1;
			else if (A[k] == Nn - 1) Nn -= 1;
		}
		ansk[j] = Nn;
	}
	
	for (l = 1; l < N + 1; l++){
		ans[1] = l;
		for (m = 2; m < D + 2; m++){
			ans[m] = ansk[ans[m - 1]];
		}
		printf("%d\n", ans[D + 1]);
	}
	
	return 0;
}

Submission Info

Submission Time
Task D - 阿弥陀
User TumoiYorozu
Language C++ (G++ 4.6.4)
Score 0
Code Size 638 Byte
Status RE
Exec Time 296 ms
Memory 804 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:12:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
./Main.cpp:13:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
./Main.cpp:14:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
./Main.cpp:17:21: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]

Judge Result

Set Name Subtask1 Subtask2 Subtask3 Subtask4
Score / Max Score 0 / 10 0 / 20 0 / 20 0 / 50
Status
RE × 9
RE × 18
RE × 18
RE × 29
Set Name Test Cases
Subtask1 sample_1.txt, 01_i.txt, 01_random01.txt, 01_random02.txt, 01_random03.txt, 01_random04.txt, 01_random05.txt, 01_random06.txt, 01_random07.txt
Subtask2 sample_1.txt, sample_2.txt, sample_3.txt, 02_i.txt, 02_p.txt, 02_random01.txt, 02_random02.txt, 02_random03.txt, 02_random04.txt, 02_random05.txt, 02_random06.txt, 02_random07.txt, 02_random08.txt, 02_rp01.txt, 02_rp02.txt, 02_rp03.txt, 02_rp04.txt, 02_rp05.txt
Subtask3 sample_1.txt, sample_2.txt, 03_i.txt, 03_random01.txt, 03_random02.txt, 03_random03.txt, 03_random04.txt, 03_random05.txt, 03_random06.txt, 03_random07.txt, 03_random08.txt, 03_random09.txt, 03_random10.txt, 03_random11.txt, 03_random12.txt, 03_random13.txt, 03_random14.txt, 03_random15.txt
Subtask4 sample_1.txt, sample_2.txt, sample_3.txt, 04_i.txt, 04_p1.txt, 04_p2.txt, 04_random01.txt, 04_random02.txt, 04_random03.txt, 04_random04.txt, 04_random05.txt, 04_random06.txt, 04_random07.txt, 04_random08.txt, 04_random09.txt, 04_random10.txt, 04_random11.txt, 04_random12.txt, 04_random13.txt, 04_rp01.txt, 04_rp02.txt, 04_rp03.txt, 04_rp04.txt, 04_rp05.txt, 04_rp06.txt, 04_rp07.txt, 04_rp08.txt, 04_rp09.txt, 04_rp10.txt
Case Name Status Exec Time Memory
01_i.txt RE 251 ms 796 KB
01_random01.txt RE 258 ms 796 KB
01_random02.txt RE 256 ms 652 KB
01_random03.txt RE 253 ms 796 KB
01_random04.txt RE 260 ms 760 KB
01_random05.txt RE 253 ms 780 KB
01_random06.txt RE 262 ms 800 KB
01_random07.txt RE 272 ms 660 KB
02_i.txt RE 283 ms 676 KB
02_p.txt RE 272 ms 672 KB
02_random01.txt RE 250 ms 796 KB
02_random02.txt RE 254 ms 804 KB
02_random03.txt RE 257 ms 800 KB
02_random04.txt RE 248 ms 800 KB
02_random05.txt RE 259 ms 668 KB
02_random06.txt RE 253 ms 672 KB
02_random07.txt RE 254 ms 800 KB
02_random08.txt RE 260 ms 700 KB
02_rp01.txt RE 262 ms 788 KB
02_rp02.txt RE 256 ms 800 KB
02_rp03.txt RE 257 ms 804 KB
02_rp04.txt RE 259 ms 676 KB
02_rp05.txt RE 258 ms 800 KB
03_i.txt RE 259 ms 800 KB
03_random01.txt RE 263 ms 800 KB
03_random02.txt RE 257 ms 796 KB
03_random03.txt RE 257 ms 792 KB
03_random04.txt RE 259 ms 636 KB
03_random05.txt RE 254 ms 676 KB
03_random06.txt RE 252 ms 792 KB
03_random07.txt RE 252 ms 664 KB
03_random08.txt RE 260 ms 800 KB
03_random09.txt RE 266 ms 800 KB
03_random10.txt RE 296 ms 664 KB
03_random11.txt RE 251 ms 796 KB
03_random12.txt RE 257 ms 672 KB
03_random13.txt RE 259 ms 796 KB
03_random14.txt RE 258 ms 672 KB
03_random15.txt RE 265 ms 800 KB
04_i.txt RE 254 ms 804 KB
04_p1.txt RE 262 ms 804 KB
04_p2.txt RE 258 ms 804 KB
04_random01.txt RE 253 ms 652 KB
04_random02.txt RE 252 ms 656 KB
04_random03.txt RE 256 ms 700 KB
04_random04.txt RE 249 ms 800 KB
04_random05.txt RE 261 ms 744 KB
04_random06.txt RE 257 ms 648 KB
04_random07.txt RE 286 ms 796 KB
04_random08.txt RE 274 ms 696 KB
04_random09.txt RE 265 ms 672 KB
04_random10.txt RE 267 ms 804 KB
04_random11.txt RE 261 ms 796 KB
04_random12.txt RE 262 ms 800 KB
04_random13.txt RE 259 ms 792 KB
04_rp01.txt RE 259 ms 800 KB
04_rp02.txt RE 268 ms 800 KB
04_rp03.txt RE 264 ms 672 KB
04_rp04.txt RE 264 ms 672 KB
04_rp05.txt RE 247 ms 800 KB
04_rp06.txt RE 250 ms 796 KB
04_rp07.txt RE 256 ms 748 KB
04_rp08.txt RE 246 ms 792 KB
04_rp09.txt RE 258 ms 804 KB
04_rp10.txt RE 253 ms 800 KB
sample_1.txt RE 262 ms 800 KB
sample_2.txt RE 263 ms 780 KB
sample_3.txt RE 263 ms 792 KB