Problem:
Score: 100 points

Problem Statement

A triple of numbers is said to be poor when two of those numbers are equal but the other number is different from those two numbers.

You will be given three integers A, B, and C. If this triple is poor, print Yes; otherwise, print No.

Constraints

A, B, and C are all integers between 1 and 9 (inclusive).

Input

Input is given from Standard Input in the following format:

A B C

Output

If the given triple is poor, print Yes; otherwise, print No.

Sample Input 1

5 7 5

Sample Output 1

Yes

A and C are equal, but B is different from those two numbers, so this triple is poor.

Sample Input 2

4 4 4

Sample Output 2

No

A, B, and C are all equal, so this triple is not poor.

Sample Input 3

4 9 6

Sample Output 3

No

Sample Input 4

3 3 4

Sample Output 4

Yes

Solution in C (GCC 5.4.1) (judge verdict: Wrong Answer)

#include <stdio.h>

int compa(const void *a,const void *b)
{
  return *(int *)a - *(int*)b;
}

int compb(const void *a,const void *b)
{
  return strcmp(a,b);
}

int main(void)
{
 int N,N1,N2;
 char A[200000][10];
 char B[200000][10];
 int  C[200000];
 char maxChar[10];
 int i,j;
 int xx = 0;
 int Res;
 int max=0;

 scanf("%d\n",&N);
  N1 = N;
  N2 = N;
 for(i=0;i<N;i++)
 {
  scanf("%s\n",A[i]);
  C[i] = 0;
 }
  qsort(A,N1,10,compb);

 //printf("debug11 %s %s\n",A[2],A[3]);

  for(i=0;i<N;i++)
  {
//  printf("debug22 %s %s\n",A[2],A[3]);
    for(j=i+1;j<=N;j++)
    {
       if(compb(A[i],A[j]) != 0) 
       {
         if(j-i>=max) 
         {

           C[xx] =j-i;
           strcpy(B[xx], A[i]);
           xx++;
         }
  //       printf("%s %d\n",A[i],j-i);
         goto L_Break1;
       }            
    }
    L_Break1:
    i=j-1;
//    printf("debug11 %d\n",i);
  }
/*
  printf("%d\n",N2);
  for(i=0;i<N;i++)
 {
  printf("%s\n",A[i]);
 }
*/
  max=0;
  for(i=0;i<N;i++)
  {
   if (max <= C[i]) max =C[i];
  }
  
  for(i=0;i<N;i++)
  {
   if (max == C[i]) printf("%s\n",A[i]);
  }
  
 // printf("%s\n",B[3]);
return 0;
}