Submission #214711


Source Code Expand

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

using namespace std;


int abs(int a){
	if(a<0)return -a;
	else return a;
}
int min(int a,int b){
	if(a>b) return b;
	else return a;

}

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

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 = a[i];
			}else if(a[i] == now){
				now = a[i]+1; 
			}
		}
		printf("%d\n",now);
	}





return 0;
}

Submission Info

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

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:29:28: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
./Main.cpp:31: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
RE × 4
AC × 4
WA × 14
AC × 4
WA × 14
AC × 1
WA × 21
RE × 7
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 263 ms 696 KB
01_random01.txt AC 20 ms 696 KB
01_random02.txt AC 19 ms 800 KB
01_random03.txt AC 20 ms 800 KB
01_random04.txt AC 66 ms 796 KB
01_random05.txt RE 266 ms 792 KB
01_random06.txt RE 252 ms 804 KB
01_random07.txt RE 257 ms 800 KB
02_i.txt AC 24 ms 796 KB
02_p.txt WA 20 ms 800 KB
02_random01.txt AC 21 ms 796 KB
02_random02.txt WA 19 ms 700 KB
02_random03.txt WA 26 ms 676 KB
02_random04.txt AC 20 ms 700 KB
02_random05.txt WA 52 ms 796 KB
02_random06.txt WA 26 ms 792 KB
02_random07.txt WA 27 ms 792 KB
02_random08.txt WA 25 ms 804 KB
02_rp01.txt WA 24 ms 800 KB
02_rp02.txt WA 24 ms 672 KB
02_rp03.txt WA 24 ms 800 KB
02_rp04.txt WA 23 ms 676 KB
02_rp05.txt WA 20 ms 800 KB
03_i.txt AC 19 ms 672 KB
03_random01.txt AC 21 ms 800 KB
03_random02.txt AC 23 ms 796 KB
03_random03.txt WA 22 ms 800 KB
03_random04.txt WA 24 ms 800 KB
03_random05.txt WA 23 ms 800 KB
03_random06.txt WA 23 ms 800 KB
03_random07.txt WA 23 ms 920 KB
03_random08.txt WA 20 ms 696 KB
03_random09.txt WA 23 ms 920 KB
03_random10.txt WA 23 ms 920 KB
03_random11.txt WA 23 ms 800 KB
03_random12.txt WA 23 ms 800 KB
03_random13.txt WA 25 ms 800 KB
03_random14.txt WA 25 ms 792 KB
03_random15.txt WA 21 ms 800 KB
04_i.txt RE 261 ms 800 KB
04_p1.txt WA 603 ms 808 KB
04_p2.txt WA 603 ms 800 KB
04_random01.txt WA 705 ms 1052 KB
04_random02.txt RE 264 ms 672 KB
04_random03.txt WA 159 ms 804 KB
04_random04.txt WA 107 ms 796 KB
04_random05.txt WA 193 ms 804 KB
04_random06.txt RE 268 ms 796 KB
04_random07.txt WA 1030 ms 932 KB
04_random08.txt RE 260 ms 796 KB
04_random09.txt WA 395 ms 800 KB
04_random10.txt WA 428 ms 1068 KB
04_random11.txt RE 265 ms 796 KB
04_random12.txt RE 258 ms 664 KB
04_random13.txt RE 262 ms 792 KB
04_rp01.txt WA 2883 ms 1308 KB
04_rp02.txt WA 2881 ms 1308 KB
04_rp03.txt WA 2887 ms 1312 KB
04_rp04.txt WA 2896 ms 1372 KB
04_rp05.txt WA 595 ms 800 KB
04_rp06.txt WA 596 ms 792 KB
04_rp07.txt WA 2881 ms 1320 KB
04_rp08.txt WA 2891 ms 1316 KB
04_rp09.txt WA 2890 ms 1320 KB
04_rp10.txt WA 2882 ms 1320 KB
sample_1.txt AC 19 ms 800 KB
sample_2.txt WA 21 ms 792 KB
sample_3.txt WA 21 ms 792 KB