이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |