Submission #214777


Source Code Expand

Copy
#include "stdio.h"
#include "stdlib.h"
#include "algorithm"
#include "utility"
#include "queue"
#include "stack"

using namespace std;


int n,m,d;
int a[200000];

int now = -1;

int main(){


	scanf("%d %d %d",&n,&m,&d);
	for(int i=0;i<m;i++){
		scanf("%d",&a[i]);
	}
	for(int k=1;k<=n;k++){
		now = k;
		for(int i=0;i<m;i++){
			if(a[i] == now-1){
				now--;
			}else if(a[i] == now){
				now++; 
			}
		}
		printf("%d\n",now);
	}

	




return 0;
}

Submission Info

Submission Time
Task D - 阿弥陀
User YAZAWA
Language C++ (G++ 4.6.4)
Score 0
Code Size 493 Byte
Status WA
Exec Time 4032 ms
Memory 1696 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:19:28: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
./Main.cpp:21:20: 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
AC × 5
TLE × 4
AC × 4
WA × 14
AC × 9
WA × 9
AC × 1
WA × 6
TLE × 22
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 TLE 4029 ms 1628 KB
01_random01.txt AC 21 ms 700 KB
01_random02.txt AC 20 ms 792 KB
01_random03.txt AC 19 ms 796 KB
01_random04.txt AC 63 ms 668 KB
01_random05.txt TLE 4032 ms 1396 KB
01_random06.txt TLE 4029 ms 1452 KB
01_random07.txt TLE 4030 ms 1576 KB
02_i.txt AC 24 ms 696 KB
02_p.txt WA 21 ms 796 KB
02_random01.txt AC 18 ms 796 KB
02_random02.txt WA 20 ms 804 KB
02_random03.txt WA 24 ms 792 KB
02_random04.txt AC 20 ms 700 KB
02_random05.txt WA 53 ms 808 KB
02_random06.txt WA 180 ms 1052 KB
02_random07.txt WA 339 ms 1444 KB
02_random08.txt WA 345 ms 1448 KB
02_rp01.txt WA 23 ms 704 KB
02_rp02.txt WA 151 ms 604 KB
02_rp03.txt WA 25 ms 796 KB
02_rp04.txt WA 23 ms 792 KB
02_rp05.txt WA 26 ms 768 KB
03_i.txt AC 22 ms 800 KB
03_random01.txt AC 25 ms 800 KB
03_random02.txt AC 51 ms 1452 KB
03_random03.txt AC 44 ms 1304 KB
03_random04.txt AC 44 ms 1308 KB
03_random05.txt AC 25 ms 732 KB
03_random06.txt WA 24 ms 924 KB
03_random07.txt AC 28 ms 928 KB
03_random08.txt WA 20 ms 728 KB
03_random09.txt WA 27 ms 940 KB
03_random10.txt WA 36 ms 1056 KB
03_random11.txt WA 49 ms 1320 KB
03_random12.txt WA 50 ms 1444 KB
03_random13.txt AC 43 ms 1188 KB
03_random14.txt WA 38 ms 1048 KB
03_random15.txt WA 27 ms 868 KB
04_i.txt TLE 4028 ms 1568 KB
04_p1.txt TLE 4029 ms 1308 KB
04_p2.txt TLE 4029 ms 1312 KB
04_random01.txt TLE 4029 ms 1320 KB
04_random02.txt WA 2909 ms 1132 KB
04_random03.txt WA 1593 ms 1156 KB
04_random04.txt WA 2317 ms 1444 KB
04_random05.txt WA 3013 ms 1320 KB
04_random06.txt TLE 4028 ms 1268 KB
04_random07.txt TLE 4029 ms 1576 KB
04_random08.txt TLE 4030 ms 1576 KB
04_random09.txt TLE 4030 ms 1580 KB
04_random10.txt TLE 4029 ms 1324 KB
04_random11.txt TLE 4028 ms 1576 KB
04_random12.txt TLE 4029 ms 1696 KB
04_random13.txt TLE 4030 ms 1576 KB
04_rp01.txt TLE 4028 ms 1304 KB
04_rp02.txt TLE 4029 ms 1372 KB
04_rp03.txt TLE 4030 ms 1324 KB
04_rp04.txt TLE 4029 ms 1316 KB
04_rp05.txt TLE 4028 ms 1312 KB
04_rp06.txt TLE 4030 ms 1360 KB
04_rp07.txt TLE 4029 ms 1312 KB
04_rp08.txt TLE 4029 ms 1376 KB
04_rp09.txt TLE 4028 ms 1316 KB
04_rp10.txt TLE 4029 ms 1376 KB
sample_1.txt AC 19 ms 700 KB
sample_2.txt WA 20 ms 804 KB
sample_3.txt WA 20 ms 800 KB