# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1895 | alephnull | 공주님의 정원 (KOI11_flower) | C++98 | 105 ms | 2380 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <cstdio>
#include <utility>
using namespace std;
int main() {
int m[13] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
int n;
scanf("%d", &n);
pair<int, int> p[13][32];
for(int i=1;i<=12;i++)
for(int j=1;j<=31;j++)
p[i][j]=make_pair(1,1);
int a[n], b[n], c[n], d[n];
for (int i = 0; i < n; i++)
scanf("%d %d %d %d", a + i, b + i, c + i, d + i);
for(int i=0;i<n;i++){
for(int j=1;j<=12;j++){
for(int k=1;k<=m[j];k++){
if(j<a[i])break;
if(j==a[i]&&k<b[i])continue;
pair<int, int> tmp=make_pair(c[i],d[i]);
if(p[j][k]<tmp)p[j][k]=tmp;
}
}
}
int ans=0;
int x=3,y=1;
//printf("%d %d\n",x,y);
while(make_pair(x,y)<make_pair(11,31)){
if(ans>365){ans=0;break;}
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... |