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

×

Need help with Solution,of chefuba from long contest

http://ideone.com/3R8eHq i used deque to solve queries on array obtained after sum ,but its giving WA on most of test cases.plz help ,the code is self explanatory

This question is marked "community wiki".

asked 17 Jun '17, 11:33

ajaman13's gravatar image

3★ajaman13
1
accept rate: 0%

edited 17 Jun '17, 11:44

BTW, how were you able to ask Q?? Via 'ask a question' thing?

(17 Jun '17, 11:59) vijju123 ♦♦5★

Your code fails on this test case-

Input
6 2 8
0 0 1 1 0 1
!!!??!!?
Your Output
2
2
0
Expected Output
1
1
2

I think you should have a look at the part where you used "vihu" and deques.

link

answered 17 Jun '17, 11:59

vijju123's gravatar image

5★vijju123 ♦♦
15.4k12066
accept rate: 18%

toggle preview
Preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×2,351
×1,408
×832
×367
×176
×40
×16
×13

question asked: 17 Jun '17, 11:33

question was seen: 456 times

last updated: 17 Jun '17, 11:59