Submission #158612


Source Code Expand

Copy
#include<vector>
#include<cmath>
#include<map>
#include<cstdlib>
#include<iostream>
#include<sstream>
#include<fstream>
#include<string>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<set>
#include<stack>
#include<bitset>
#include<functional>
#include<ctime>
#include<queue>
#include<deque>
#include<complex>
using namespace std;
#define pb push_back
#define pf push_front
typedef long long lint;
typedef complex<double> P;
#define mp make_pair
#define fi first
#define se second
typedef pair<int,int> pint;
#define All(s) s.begin(),s.end()
#define rAll(s) s.rbegin(),s.rend()
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
int dx[4]={1,-1,0,0},dy[4]={0,0,1,-1};
int a[5][5];
int main()
{
	rep(i,4) rep(j,4) cin>>a[i][j];
	int f=0;
	rep(i,4) rep(j,4) rep(k,4){
		int x=i+dx[k],y=j+dy[k];
		if(x<0 || y<0 || x>3 || y>3) continue;
		if(a[i][j]==a[x][y]) f=1;
	}
	if(f==0) cout<<"GAMEOVER"<<endl;
	else cout<<"CONTINUE"<<endl;
}

Submission Info

Submission Time
Task A - DEAD END
User sky58
Language C++ (G++ 4.6.4)
Score 100
Code Size 1010 Byte
Status
Exec Time 36 ms
Memory 1272 KB

Test Cases

Set Name Score / Max Score Test Cases
All 100 / 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 31 ms 1148 KB
hand_2.txt 32 ms 1092 KB
random_1.txt 30 ms 1144 KB
random_10.txt 31 ms 1152 KB
random_11.txt 31 ms 1272 KB
random_12.txt 31 ms 1148 KB
random_13.txt 30 ms 1148 KB
random_14.txt 31 ms 1152 KB
random_15.txt 31 ms 1152 KB
random_16.txt 31 ms 1152 KB
random_17.txt 30 ms 1152 KB
random_18.txt 30 ms 1264 KB
random_19.txt 31 ms 1152 KB
random_2.txt 31 ms 1144 KB
random_20.txt 33 ms 1144 KB
random_21.txt 31 ms 1144 KB
random_22.txt 31 ms 1144 KB
random_23.txt 31 ms 1148 KB
random_24.txt 36 ms 1144 KB
random_25.txt 31 ms 1152 KB
random_26.txt 31 ms 1152 KB
random_27.txt 33 ms 1148 KB
random_28.txt 32 ms 1076 KB
random_29.txt 32 ms 1144 KB
random_3.txt 30 ms 1144 KB
random_30.txt 34 ms 1152 KB
random_4.txt 32 ms 1232 KB
random_5.txt 30 ms 1148 KB
random_6.txt 30 ms 1148 KB
random_7.txt 31 ms 1152 KB
random_8.txt 31 ms 1264 KB
random_9.txt 30 ms 1144 KB
sample_1.txt 32 ms 1164 KB
sample_2.txt 30 ms 1148 KB
sample_3.txt 31 ms 1080 KB