×

# WA in WSITES01(Blocked Sites)

 0 I solved the question using trie and set, however got WA on two cases in subtask 2. Here is the solution. If someone could point out the error or provide certain test case(s), it would be great help. Thanks in advance. This question is marked "community wiki". asked 19 May, 03:23 38●4 accept rate: 14%

 1 input: 4 + google + googld - goog - googles output: -1 answered 19 May, 10:47 5★hikarico 241●3 accept rate: 28% I misunderstood the question. Thanks! (19 May, 15:46)
 0 https://www.codechef.com/viewsolution/13633491 i am getting WA in two test case ...plz help me .. answered 19 May, 11:37 2★sidd845 1 accept rate: 0% input 3 + google + googld - googles  output should be 1 googles  but you're outputing 1 google  (19 May, 21:31) hikarico5★
 0 @hikarico Why isnt the answer for the above test case "googles"? answered 19 May, 16:40 1 accept rate: 0% If you write just googles then goog will be missing. (19 May, 16:44) shraeyas3★ @devilhector can you explain me if you understood the above test case. Even I have those 2 test cases wrong. (19 May, 20:42) You need to block all minuses. Answer is -1 because there's no way to block goog without blocking google and googld (19 May, 21:26) hikarico5★ @mayank_code you need to answer prefixes that block all '-' but are not prefixes of any '+' or unblocked sites. (20 May, 03:31)
 0 I am getting WA.Can anyone post what is wrong in my solution.Here is my solution.If someone could point out the error or provide certain test case(s), it would be great help. Thanks in advance. answered 19 May, 22:53 1●1 accept rate: 0% add spaces in the testcase then it gives right answer. 4 + a + ab + abc - acde (20 May, 12:22) Noted, thanks for indicating that. Will come up with fresh test case soon :) (20 May, 12:44) vijju1233★
 0 can you please check mine .. its passing all the above test cases .. please let me know where it went wrong. i made two seperate arrays for blocked and unblocked and then solved this one.. solution answered 20 May, 01:28 1 accept rate: 0%
 0 My code passes all cases except 2. Can someone please explain what i have done wrong. I used a very naive approach of sorting the strings and applying binary search to find the closest +ve string ... my_solution: https://www.codechef.com/viewsolution/13495612 answered 20 May, 10:17 4★dnmehta 1 accept rate: 0%
 toggle preview community wiki

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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

Tags:

×667
×18