View Code of Problem 444

#include<bits/stdc++.h>
using namespace std;
void p(char c){
	if(c=='j')
	cout<<"javaman";
	else if(c=='c')
	cout<<"cpcs";
	else
	cout<<"same";
	cout<<endl;
}
int main(){
	int t;
	cin>>t;
	while(t--){
		int a1,a2,a3,b1,b2,b3;
		cin>>a1>>a2>>a3>>b1>>b2>>b3;
		if(a1>b1)
			p('c');
		else if(a1<b1)
		p('j');
		else{
			if(a2>b2)
				p('c');
			else if(a2<b2)
			p('j');
			else{
				if(a3>b3)
					p('c');
				else if(a3<b3)
				p('j');
				else
				p('s');
			}
		}
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 444