View Code of Problem 444

#include <iostream>
#include <cstdio>
using namespace std;
int main(){
    int t,y1,y2,m1,m2,d1,d2;
    cin>>t;
    while(t--){
        cin>>y1>>m1>>d1>>y2>>m2>>d2;
        if(y1<y2){
            cout<<"javaman"<<endl;
        }
        else if(y1==y2){
            if(m1<m2)
                cout<<"javaman"<<endl;
            else if(m1==m2){
                if(d1<d2)
                    cout<<"javaman"<<endl;
                else if(d1==d2)
                    cout<<"same"<<endl;
                else
                    cout<<"cpcs"<<endl;
            }
            else
                cout<<"cpcs"<<endl;
        }
        else{
            cout<<"cpcs"<<endl;
        }
    }
    return 0;
}

Double click to view unformatted code.


Back to problem 444