Submission #9174

# Submission time Handle Problem Language Result Execution time Memory
9174 2014-09-28T04:21:09 Z dominyellow N-orthotope (kriii2_N) C++
0 / 4
0 ms 1204 KB
#include <stdio.h>
#include <set>
#include <vector>

using namespace std;

int main(void){
	int N;
	scanf("%d", &N);

	int tmpa, tmpb;
	
	vector<pair<int, int> > pair_vec;
	for(int i=0; i<N; i++){
		scanf("%d%d", &tmpa, &tmpb);
		pair_vec.push_back(make_pair(tmpa, tmpb));
	}

	int on_line_count=0;

	for(int i=0; i<N; i++){
		scanf("%d%d", &tmpa, &tmpb);
		if(tmpa > pair_vec[i].second){
			printf("-1\n");
			return 0;
		}
		else if(tmpa == pair_vec[i].second){
			on_line_count += 1;
		}
		else{
			continue;
		}
	}
	printf("%d\n", N-on_line_count);
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1204 KB Output is correct
2 Correct 0 ms 1204 KB Output is correct
3 Correct 0 ms 1204 KB Output is correct
4 Correct 0 ms 1204 KB Output is correct
5 Incorrect 0 ms 1204 KB Output isn't correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -