Submission #9425

# Submission time Handle Problem Language Result Execution time Memory
9425 2014-09-28T06:19:01 Z roott76 N-orthotope (kriii2_N) C++
0 / 4
0 ms 1672 KB
#include <iostream>
using namespace std;
int main()
{
	int N;
	cin >> N;

	int A[24], B[24];
	for(int i=0; i<N*2; i++) cin >> A[i];
	for(int i=0; i<N*2; i++) cin >> B[i];

	int Cnt = 0;
	for(int i=0; i<N*2; i+=2)
	{
		if((A[i]<B[i] && B[i]<A[i+1]) || (A[i]<B[i+1] && B[i+1]<A[i+1])) Cnt++;
	}
	if(Cnt == 0) cout << "-1";
	else cout << Cnt;
	cout << endl;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1672 KB Output is correct
2 Correct 0 ms 1672 KB Output is correct
3 Correct 0 ms 1672 KB Output is correct
4 Incorrect 0 ms 1672 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -