# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
140580 | khrbuddy03 | 공주님의 정원 (KOI11_flower) | C++14 | 56 ms | 3440 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |