# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
401322 |
2021-05-09T20:45:05 Z |
hgmhc |
공주님의 정원 (KOI11_flower) |
C++14 |
|
88 ms |
1992 KB |
#include <iostream>
#include <functional>
#include <algorithm>
#include <utility>
using namespace std;
using pi = pair<int,int>;
#define S first
#define F second
int main() {
int s = 301, e = 1130;
int n; cin >> n;
pi flowers[n];
for (auto& s : flowers) {
int a, b, c, d;
cin >> a >> b >> c >> d;
s = {100*c+d, 100*a+b};
}
sort(flowers, flowers+n, greater<pi>());
int cnt = 0; bool chk = false;
for (int i = s; i <= e; chk = false) {
for (auto& f : flowers) {
if (f.F <= i) {
i = f.S;
chk = true;
f = {1232, 1232};
break;
}
}
if (!chk) {cout << 0; return 0;}
++cnt;
}
cout << cnt;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
296 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
284 KB |
Output is correct |
4 |
Correct |
2 ms |
304 KB |
Output is correct |
5 |
Correct |
5 ms |
332 KB |
Output is correct |
6 |
Correct |
9 ms |
472 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
520 KB |
Output is correct |
2 |
Correct |
17 ms |
644 KB |
Output is correct |
3 |
Correct |
26 ms |
756 KB |
Output is correct |
4 |
Correct |
33 ms |
968 KB |
Output is correct |
5 |
Correct |
41 ms |
1044 KB |
Output is correct |
6 |
Correct |
48 ms |
1220 KB |
Output is correct |
7 |
Correct |
58 ms |
1440 KB |
Output is correct |
8 |
Correct |
81 ms |
1964 KB |
Output is correct |
9 |
Correct |
88 ms |
1988 KB |
Output is correct |
10 |
Correct |
80 ms |
1992 KB |
Output is correct |