Submission #8839

#TimeUsernameProblemLanguageResultExecution timeMemory
8839gs13068N-orthotope (kriii2_N)C++98
4 / 4
0 ms1088 KiB
#include<cstdio> int s[2][11]; int e[2][11]; int main() { int i,j,n,t=0; scanf("%d",&n); for(i=0;i<2;i++)for(j=0;j<n;j++)scanf("%d%d",&s[i][j],&e[i][j]); for(j=0;j<n;j++) { if(s[0][j]<s[1][j])s[0][j]=s[1][j]; if(e[0][j]>e[1][j])e[0][j]=e[1][j]; if(s[0][j]>e[0][j]) { puts("-1"); return 0; } t+=s[0][j]<e[0][j]; } printf("%d",t); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...