답안 #9327

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
9327 2014-09-28T05:36:36 Z yukariko N-orthotope (kriii2_N) C
0 / 4
0 ms 1088 KB
#include <stdio.h>
#include <string.h>

int main(){
	int i,n,lines=0,dots=0,ps[2][16][2];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d",&ps[0][i][0],&ps[0][i][1]);
	}
	for(i=0;i<n;i++){
		scanf("%d %d",&ps[1][i][0],&ps[1][i][1]);
	}
	for(i=0;i<n;i++){
		if(	ps[0][i][1] == ps[1][i][0] ||
			ps[0][i][0] == ps[1][i][1])
			dots += 1;
		else if(ps[0][i][0] <= ps[1][i][0]){
			if(ps[0][i][1] > ps[1][i][0]) lines+=1;
		}
		else{
			if(ps[1][i][1] > ps[0][i][0]) lines+=1;
		}
	}
	if(lines>0) printf("%d\n",lines);
	else if(dots>0) printf("%d\n",0);
	else printf("%d\n",-1);
	
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1088 KB Output is correct
2 Correct 0 ms 1088 KB Output is correct
3 Correct 0 ms 1088 KB Output is correct
4 Correct 0 ms 1088 KB Output is correct
5 Correct 0 ms 1088 KB Output is correct
6 Correct 0 ms 1088 KB Output is correct
7 Incorrect 0 ms 1088 KB Output isn't correct
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Halted 0 ms 0 KB -