Submission #159163


Source Code Expand

Copy
#include <iostream>
#include <cstdio>
using namespace std;

int main() {
	int board[5][5];
	int i,j;
	int a = 0;

	for(i=2;i<=5;i++){
		for(j=2;j<=5;j++){
		    scanf("%d",board[j][i]);
		}
	}

	for(i=2;i<=4;i++){
		for(j=2;j<=5;j++){
			if(board[j][i] == board[j+1][i] || board[j][i] == board[j][i+1]){
				a = a+1;}
		}
	}

	if(a != 0){printf("CONTINUE\n");}
	else{printf("DEADEND\n");}
	return 0;
}

Submission Info

Submission Time
Task A - DEAD END
User earlgray877
Language C++ (G++ 4.6.4)
Score 0
Code Size 426 Byte
Status
Exec Time 333 ms
Memory 1168 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:12:29: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘int’ [-Wformat]
./Main.cpp:12:30: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]

Test Cases

Set Name Score / Max Score Test Cases
All 0 / 100 hand_1.txt, hand_2.txt, random_1.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_2.txt, random_20.txt, random_21.txt, random_22.txt, random_23.txt, random_24.txt, random_25.txt, random_26.txt, random_27.txt, random_28.txt, random_29.txt, random_3.txt, random_30.txt, random_4.txt, random_5.txt, random_6.txt, random_7.txt, random_8.txt, random_9.txt
Case Name Status Exec Time Memory
hand_1.txt 333 ms 1168 KB
hand_2.txt 244 ms 1044 KB
random_1.txt 242 ms 1104 KB
random_10.txt 245 ms 1100 KB
random_11.txt 257 ms 1068 KB
random_12.txt 256 ms 1080 KB
random_13.txt 261 ms 1108 KB
random_14.txt 251 ms 980 KB
random_15.txt 262 ms 1096 KB
random_16.txt 256 ms 1144 KB
random_17.txt 242 ms 1144 KB
random_18.txt 255 ms 1096 KB
random_19.txt 252 ms 1160 KB
random_2.txt 241 ms 1104 KB
random_20.txt 248 ms 1160 KB
random_21.txt 247 ms 1128 KB
random_22.txt 267 ms 1148 KB
random_23.txt 252 ms 1040 KB
random_24.txt 259 ms 1044 KB
random_25.txt 250 ms 1112 KB
random_26.txt 247 ms 1112 KB
random_27.txt 248 ms 980 KB
random_28.txt 252 ms 1132 KB
random_29.txt 257 ms 1108 KB
random_3.txt 262 ms 1156 KB
random_30.txt 256 ms 1104 KB
random_4.txt 245 ms 1108 KB
random_5.txt 252 ms 1132 KB
random_6.txt 249 ms 1100 KB
random_7.txt 240 ms 1164 KB
random_8.txt 240 ms 1140 KB
random_9.txt 243 ms 1104 KB
sample_1.txt 251 ms 1080 KB
sample_2.txt 245 ms 1104 KB
sample_3.txt 240 ms 1064 KB