Problem Description
Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO".
Input
each test case contains two numbers A and B.
Output
for each case, if A is equal to B, you should print "YES", or print "NO".
Sample Input
1 2 2 2 3 3 4 3
Sample Output
NO YES YES NO#include<iostream> #include<cstring> using namespace std; char a[100000],b[100000]; bool is(char*p) { for(;*p!='\0';p++) if(*p=='.') return 1; return 0; } void det(char *p) { for(;*p!='\0';p++) ; p--; for(;*p=='0';p--) *p ='\0'; if(*p=='.') *p='\0'; } int main() { while(scanf("%s%s",a,b)!=EOF) { if(is(a)) det(a); if(is(b)) det(b); if(strcmp(a,b)==0) printf("YES\n"); else printf("NO\n"); } return 0; }