Submission #214707


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);
	}

	int x;
	scanf("%d",&x);





return 0;
}

Submission Info

Submission Time
Task D - 阿弥陀
User YAZAWA
Language C++ (G++ 4.6.4)
Score 0
Code Size 654 Byte
Status WA
Exec Time 2893 ms
Memory 1336 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]
./Main.cpp:46:16: 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 241 ms 732 KB
01_random01.txt AC 19 ms 700 KB
01_random02.txt AC 20 ms 696 KB
01_random03.txt AC 19 ms 704 KB
01_random04.txt AC 64 ms 800 KB
01_random05.txt RE 250 ms 804 KB
01_random06.txt RE 241 ms 796 KB
01_random07.txt RE 257 ms 788 KB
02_i.txt AC 23 ms 672 KB
02_p.txt WA 21 ms 796 KB
02_random01.txt AC 18 ms 696 KB
02_random02.txt WA 19 ms 796 KB
02_random03.txt WA 24 ms 800 KB
02_random04.txt AC 19 ms 800 KB
02_random05.txt WA 50 ms 804 KB
02_random06.txt WA 22 ms 800 KB
02_random07.txt WA 25 ms 792 KB
02_random08.txt WA 23 ms 800 KB
02_rp01.txt WA 21 ms 796 KB
02_rp02.txt WA 22 ms 800 KB
02_rp03.txt WA 22 ms 796 KB
02_rp04.txt WA 20 ms 800 KB
02_rp05.txt WA 21 ms 796 KB
03_i.txt AC 22 ms 768 KB
03_random01.txt AC 22 ms 796 KB
03_random02.txt AC 22 ms 800 KB
03_random03.txt WA 21 ms 800 KB
03_random04.txt WA 20 ms 792 KB
03_random05.txt WA 21 ms 924 KB
03_random06.txt WA 21 ms 800 KB
03_random07.txt WA 22 ms 736 KB
03_random08.txt WA 21 ms 700 KB
03_random09.txt WA 22 ms 920 KB
03_random10.txt WA 22 ms 804 KB
03_random11.txt WA 22 ms 920 KB
03_random12.txt WA 21 ms 792 KB
03_random13.txt WA 22 ms 796 KB
03_random14.txt WA 21 ms 672 KB
03_random15.txt WA 22 ms 672 KB
04_i.txt RE 243 ms 732 KB
04_p1.txt WA 596 ms 804 KB
04_p2.txt WA 597 ms 812 KB
04_random01.txt WA 695 ms 1056 KB
04_random02.txt RE 246 ms 804 KB
04_random03.txt WA 155 ms 808 KB
04_random04.txt WA 106 ms 808 KB
04_random05.txt WA 189 ms 860 KB
04_random06.txt RE 250 ms 676 KB
04_random07.txt WA 1022 ms 932 KB
04_random08.txt RE 256 ms 800 KB
04_random09.txt WA 391 ms 808 KB
04_random10.txt WA 426 ms 1124 KB
04_random11.txt RE 248 ms 800 KB
04_random12.txt RE 240 ms 668 KB
04_random13.txt RE 244 ms 668 KB
04_rp01.txt WA 2891 ms 1312 KB
04_rp02.txt WA 2893 ms 1304 KB
04_rp03.txt WA 2887 ms 1316 KB
04_rp04.txt WA 2891 ms 1336 KB
04_rp05.txt WA 599 ms 792 KB
04_rp06.txt WA 601 ms 804 KB
04_rp07.txt WA 2876 ms 1272 KB
04_rp08.txt WA 2877 ms 1324 KB
04_rp09.txt WA 2887 ms 1316 KB
04_rp10.txt WA 2875 ms 1248 KB
sample_1.txt AC 20 ms 704 KB
sample_2.txt WA 20 ms 800 KB
sample_3.txt WA 20 ms 704 KB