You are not logged in. Please login at to post your questions!


chef and strange addition

problem-link text

logic- I converted A and B in binary form and stored it in array A[] and B[] respectively.

-> traverse array A[] for every A[i] is set and B[i] is reset mark pos as i do following step

  • loop starting index to pos if A[j] is 0 && B[j] is 1


display count.

What im doing is increasing the value of A by factor x, and if its possible to decrease B by same factor- overall sum is not going to change.

Why im getting WA what im missing.


asked 21 Oct '18, 15:36

code_man's gravatar image

accept rate: 8%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 21 Oct '18, 15:36

question was seen: 147 times

last updated: 21 Oct '18, 15:36