#include<cstdio>
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
char str1[7],str2[7];
void f(int a,int b)
{
if(a<b) printf("<");
else if(a>b) printf(">");
else printf("=");
}
void g(char a,char b)
{
if(a<b) printf("<");
else if(a>b) printf(">");
else printf("=");
}
int main()
{
int t,kcase=1;
scanf("%d",&t);
while(t--)
{
scanf("%s%s",str1,str2);
printf("Case %d: ",kcase++);
if(str1[0]<str2[0]){printf("< ");}
else if(str1[0]>str2[0]){printf("> ");}
else {printf("= ");}
int s1=(str1[3]-'0')*10+(str2[4]-'0'),s2=(str2[3]-'0')*10+(str2[4]-'0');
if(str1[1]!=str2[1])
{
if(str1[2]<str2[2]){printf("<");}
else if(str1[2]==str2[2]){f(s1,s2);}
else {printf(">");}
}
else
{
if(str1[2]<str2[2]){printf("<");}
else if(str1[2]==str2[2])
{
if(s1==s2) g(str1[5],str2[5]);
else f(s1,s2);
}
else {printf(">");}
}
printf("\n");
}
return 0;
}
hdu_5099 理解题意要求即可
最新推荐文章于 2019-11-21 23:39:28 发布