Submission #9174

#TimeUsernameProblemLanguageResultExecution timeMemory
9174dominyellowN-orthotope (kriii2_N)C++98
0 / 4
0 ms1204 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...