Submission #1894

# Submission time Handle Problem Language Result Execution time Memory
1894 2013-07-19T08:38:54 Z alephnull 공주님의 정원 (KOI11_flower) C++
0 / 18
99 ms 2380 KB
#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++;
		int tmpx=p[x][y].first;
		int tmpy=p[x][y].second;
		x=tmpx,y=tmpy;
		printf("%d %d\n",x,y);
	}
	printf("%d",ans);
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 884 KB Output isn't correct
2 Incorrect 0 ms 884 KB Output isn't correct
3 Incorrect 0 ms 884 KB Output isn't correct
4 Incorrect 0 ms 884 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 884 KB Output isn't correct
2 Incorrect 0 ms 884 KB Output isn't correct
3 Incorrect 0 ms 884 KB Output isn't correct
4 Incorrect 0 ms 884 KB Output isn't correct
5 Incorrect 5 ms 892 KB Output isn't correct
6 Incorrect 10 ms 968 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 14 ms 1048 KB Output isn't correct
2 Incorrect 19 ms 1124 KB Output isn't correct
3 Incorrect 30 ms 1280 KB Output isn't correct
4 Incorrect 37 ms 1440 KB Output isn't correct
5 Incorrect 52 ms 1592 KB Output isn't correct
6 Incorrect 59 ms 1752 KB Output isn't correct
7 Incorrect 70 ms 1912 KB Output isn't correct
8 Incorrect 99 ms 2372 KB Output isn't correct
9 Incorrect 98 ms 2372 KB Output isn't correct
10 Incorrect 98 ms 2380 KB Output isn't correct