# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
140580 | khrbuddy03 | 공주님의 정원 (KOI11_flower) | C++14 | 56 ms | 3440 KiB |
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;
typedef pair<int, int> day;
typedef pair<day, day> flower;
bool in(const flower& f, const day& d) {
if (f.first <= d && d <= f.second) return true;
return false;
}
int p = 0, ans = 0, month[] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int main() {
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
vector<flower> flowers;
int n; cin >> n;
for (int i = 0; i < n; i++) {
int a, b, c, d; cin >> a >> b >> c >> d;
flowers.emplace_back(day(a, b), day(c, d));
}
day end(3, 0);
sort(flowers.begin(), flowers.end());
for (int i = 3; i < 12; i++) {
for (int j = 1; j < month[i] + 1; j++) {
day today(i, j);
if (end <= today) {
bool ok = false;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |