reaper28's blog

By reaper28, history, 6 months ago, In English

Given an array A of N positive numbers and an integer P. Let NumPairs, be the number of pairs of elements of array A, such that their bitwise xor equal to X. You need to find the largest X, such that NumPairsx is greater or equal to P. If no such X exists print -1. Constraints:

N <=10 pow 4 P <=10 pow 9 Ai <=10 pow 9

Example:

A [1,12,13,14], P=1

QUESTION IS FROM PREVIOUS YEAR COMPANY QUESTIONS NOT FROM ANY ONGOING CONTEST

Full text and comments »

  • Vote: I like it
  • -19
  • Vote: I do not like it

By reaper28, history, 4 years ago, In English

question link : https://codeforces.com/problemset/problem/1196/D1 solution link : https://ideone.com/IfLK0U My Logic : if k<=2 checked directly else made all the three possible strings and used brute force to check all three and took minimum of them as the ans. please help

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By reaper28, history, 4 years ago, In English
  • Vote: I like it
  • 0
  • Vote: I do not like it

By reaper28, history, 4 years ago, In English

question : https://codingcompetitions.withgoogle.com/kickstart/round/000000000019ff43/00000000003379bb solution : https://ideone.com/u8gzBD Why is it giving WA please help anyone... I have maintained which character comes under which in an array neeche[26] . i have made the graph using that array and done bfs for output.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By reaper28, history, 4 years ago, In English

question link : https://codeforces.com/problemset/problem/1256/B solution link : https://ideone.com/JInG1y What is the problem in this anyone?

Full text and comments »

  • Vote: I like it
  • -2
  • Vote: I do not like it