Unfortunately we were unable to fully decode your file, as it is not encoded in UTF-8. You can try to decode it yourself by downloading it here.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//Lustra[B], PA 2014, runda 1
//Wiktoria Ko�ny
#include<cstdio>

const int MN=100005, MX=1000000009;
int iprzyp, n, dane[MN][4], min[4];

int main(){
	int i, j, suma;
	scanf("%d", &iprzyp);
	for(int d=0; d<iprzyp; d++){
		for(j=0; j<4; j++)
			min[j]=MX;
		scanf("%d", &n);
		for(i=0; i<n; i++)
			for(j=0; j<4; j++){
				scanf("%d", &dane[i][j]);
				if(j==1 || j==3)
					dane[i][j]=-dane[i][j];
				if(dane[i][j]<min[j])
					min[j]=dane[i][j];
			}
		for(i=0; i<n; i++){
			suma=0;
			for(j=0; j<4; j++)
				if(dane[i][j]==min[j])
					suma++;
			if(suma==4){
				printf("TAK\n");
				break;
			}
		}
		if(suma!=4)
			printf("NIE\n");
	
	}


	return 0;
}