View Code of Problem 444

#include<iostream>
#include<cmath>
#include<cstring>
#include<algorithm>
using namespace std;
int main(){
	int y1,m1,d1,y2,m2,d2,t;
	while(scanf("%d",&t)!=EOF){
		scanf("%d %d %d %d %d %d",&y1,&m1,&d1,&y2,&m2,&d2);
		if(y1==y2&&m1==m2&&d1==d2)
			printf("same\n");
		else {
			int a=y1*1000+m1*10+d1;
			int b=y2*1000+m2*10+d2;
			if(a<b)
				printf("javaman\n");
			else printf("cpcs\n");
		}
	} 
	return 0;
}

Double click to view unformatted code.


Back to problem 444