Блог пользователя reaper28

Автор reaper28, история, 7 месяцев назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • -19
  • Проголосовать: не нравится

Автор reaper28, история, 4 года назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор reaper28, история, 4 года назад, По-английски
  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор reaper28, история, 4 года назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор reaper28, история, 4 года назад, По-английски
  • Проголосовать: нравится
  • -2
  • Проголосовать: не нравится