×

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 '17, 03:23 38●4 accept rate: 12%

 1 input: 4 + google + googld - goog - googles output: -1 answered 19 May '17, 10:47 5★hikarico 1.8k●5●15 accept rate: 28% I misunderstood the question. Thanks! (19 May '17, 15:46)
 0 input: 1 + google output: 0 answered 19 May '17, 10:39 5★hikarico 1.8k●5●15 accept rate: 28%
 0 https://www.codechef.com/viewsolution/13633491 i am getting WA in two test case ...plz help me .. answered 19 May '17, 11:37 3★sidd845 25●4 accept rate: 0% input 3 + google + googld - googles  output should be 1 googles  but you're outputing 1 google  (19 May '17, 21:31) hikarico5★
 0 @hikarico Why isnt the answer for the above test case "googles"? answered 19 May '17, 16:40 1 accept rate: 0% If you write just googles then goog will be missing. (19 May '17, 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 '17, 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 '17, 21:26) hikarico5★ @mayank_code you need to answer prefixes that block all '-' but are not prefixes of any '+' or unblocked sites. (20 May '17, 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 '17, 22:53 1●1 accept rate: 0% add spaces in the testcase then it gives right answer. 4 + a + ab + abc - acde (20 May '17, 12:22) Noted, thanks for indicating that. Will come up with fresh test case soon :) (20 May '17, 12:44)
 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 '17, 01:28 0 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 '17, 10:17 3★dnmehta 1 accept rate: 0%
 0 Hi I have tried a lot ... but 2 TCs area failing... https://www.codechef.com/viewsolution/14405914 I checked all the below TCs all are passing . Could somebody please help me in this...... //If all positive strings Output should be : 0 4 + youtube + abcd + abcdchef + zzyy Output 0  //// all negative 5 - abcdchef - youtube - youtubeisbest - google - googled Output : 3 a g y /// show strings in sorted order 6 + google + googld - googles - googlea - googlds - googldr OUTPUT : 4 googldr googlds googlea googles //////Any mathched -ve string shorter then positive 4 + google + googld - goog - googles OUTPUT : -1 ////Any mathched +ve string Longer then negative 3 - goog - googles + google OUTPUT : -1  //same string 2 - abc + abc OUTPUT -1  answered 04 Jul '17, 15:27 2★xamitksx 1●1 accept rate: 0%
 toggle preview community wiki:
Preview

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

Question tags:

×960
×18

question asked: 19 May '17, 03:23

question was seen: 637 times

last updated: 04 Jul '17, 15:27