• [C] Birdlike Angry Pig

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • There's no end to revenge.
    Pigs like to eat birds' eggs, so birds decide to revenge.
    For this, pigs decide to revenge as well.
    Pigs give a task to a birdlike pig. They let he sneak into the birds group so that they can destroy the birds group.

    Every bird has a ID number (It may not be unique). To let pigs know, the birdlike pig makes the "AND operation" amount all the birds' ID number and sign himself to the answer.

    For example:
    Birds are signed as 5, 3, 4. So the birdlike pig signs himself as (5 & 3 & 4 = 0).

    One day, a group birds pass by pigs' home. So the angry pig want to know whether the birdlike pig is in.
  • 输入
  • This problem has several cases. The first line of each case is an integer N (2 <= N <= 100 000).
    Then follows a line with N integers, indicates the ID of each bird/birdlike pig.
  • 输出
  • For each case, if you can find the birdlike pig then output the ID of birdlike pig. Or output 'CAUTION: NO BIRDLIKE'.
  • 样例输入
  • 5
    4 0 3 4 5
    
  • 样例输出
  • 0
    
  • 提示
  • 来源
  • XadillaX
  • 操作

显示春菜