This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
pair<int, int> ar[100001];
int main()
{
cin.tie(0); cout.tie(0);
ios_base::sync_with_stdio(false);
int n; cin >> n;
for(int i = 0; i < n; i++)
{
int a, b, c, d; cin >> a >> b >> c >> d;
ar[i] = {100 * a + b, 100*c + d};
}
int ans = 0;
int now = 301;
while(1)
{
if(now > 1130)
break;
int k = 0;
for(int i = 0; i < n; i++)
{
if(ar[i].first <= now && now < ar[i].second)
k = max(k, ar[i].second);
}
if(now >= k)
{
cout << 0;
return 0;
}
now = k;
ans++;
}
cout << ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |