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

Автор ssavi, 8 лет назад, По-английски

Hello People !!!

I am trying to solve the following problem . But every time I am getting Wrong Answer ( 100 % ).

Problem Link : https://www.urionlinejudge.com.br/judge/en/problems/view/2087

Code: http://ideone.com/JhgbXI

I have tried some random Input Output cases compared to the following Accepted Solution ( This is not my solution ). Those cases I have tried all are given the same output as the following code given .

AC Solution: http://ideone.com/RoiU3k

But don't know why I am getting Wrong Answer every time.

Algorithm: Trie

At first I am taking the strings into a Map and Check whether a string comes more then once. If it is then I print Conjunto Ruim . If it is not then,

I tried to find whether there is a prefix of the string I am currently checking is available in any other string except itself using Trie. If it is the I print Conjunto Ruim else I print Conjunto Bom .

Please someone help me why I am getting Wrong Answer? It would be a great favor . I stucked for hours.

Thanks in Advance .

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

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

Автор ssavi, история, 8 лет назад, По-английски

UPD: SOLVED

Hello .

Problem: https://uva.onlinejudge.org/external/6/p624.pdf

I am trying to solve this Problem from today morning . I got WA for several times. I am trying to solve it using 0-1 Knapsack Technique .

In this problem I need to print the items those I have entered into the Sack. But I have no idea how to do it. To solve this problem I wrote a function named path_print to print the Items. I know the error is in that function . That's why I am getting Wrong Answer .

My Code: http://pastebin.ubuntu.com/22295411/

Now can someone please help me to give an idea about How to print the KnapSack Items according to My code.

It'll be a great favor .

Thanks in Advance .

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

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

Автор ssavi, история, 9 лет назад, По-английски

Hello All.

Please watch this Data Structure :

order_of_key

Today I found this STL from this solution ( 15th Line from the Last Line ) : http://codeforces.me/contest/658/submission/16995396
of Problem B [ VK CUP DIV2 ] .

Later when I have goggled about it I found a Blog written by adamant about this Topic . Here is the Link : http://codeforces.me/blog/entry/11080

But I am failed to understand the actual Purpose & the vast application of this STL . Undoubtedly its a Great Blog & Technique . And with due respect I Thank him .

Now here is My Queries :

What STLs are used ? Why they are used ? How they should be used ? In which Problems I can use this DS ? Are there any special requirments to implement those ?

Thanks in Advance . It would be great help .

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

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

Автор ssavi, история, 9 лет назад, По-английски

HI Great Helpers of CF!!!

I am getting WA for Several Times to solve this problem . Please help me out.

Problem Link : http://www.spoj.com/problems/HAMSTER1/en/

This is Ternary Search Problem . I got the Sample Test Correct . But I am failed to find out the Error . May be It could be a Error of my TS process .

Here is My Code : http://pastebin.ubuntu.com/15525055/

I got my Ternary Search Idea from this Blog : http://codeforces.me/blog/entry/11497

And I modified a little to get the answers for Floating point Values . It would be a great Help if someone help me out .

Thanks in Advance .

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

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

Автор ssavi, история, 9 лет назад, По-английски

Hi Experts .

With due respect I would like to Get some help From you about solving Below's interesting problem .

Link : LightOJ — 1095 — Arrange the Numbers

I confess that I did not try this type of problem before . I know the problem can be solved by Combination & DP or Similar other approach . I understand the Problem well . But I want to solve this and I am not getting How to solve it ?? Your Kind help may be very Valuable for me in solving this types of problem.

I Just want some Tutorial about How to solve this problem / this type of Problems .... Any English / Bangla ( Bangladeshi Language) Tutorials are very helpful in that case .

Thanks in Advance .

P.S : It would be better if you provide some tutorials related to this Types of Problems not just for this Problem.

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

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

Автор ssavi, история, 9 лет назад, По-английски

Hi Experts of CF .

I am in a Fix. Hope someone of You can help me out . Here is my Problem :

Sometimes we can see there are several Problems whose Input Data co-ordinated with a Test Case & Several Tests under it. But It does not mention How many Data we have to take as input for a several Test Case . It just mentioned there that There would be a Blank line between Two Consecutive Test Cases . Even if There will be a Blank line between The input Number of Test Case & the First Test Case .As well as there will be a Blank Line between the Last & Second Last Case .But there is No Terminating Empty line after the Last test Case . For Example

3

1
2
3

1
2
3

1
2
3

Now My Question How Can I take this Type of Inputs maintaining The Case Blocks .

Related Problem : https://uva.onlinejudge.org/external/4/497.pdf

Thanks in Advance . Sorry For My Bad English .

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

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

Автор ssavi, история, 9 лет назад, По-английски

[ UPD : Solved . The process what i am thinking worked . Just left the point of removing edges. just take the cost of Airports if any edges cost is equal / greater than "Cost of Airport " ]

Can someone please Give some Idea about How can I solve this Problem ?? Please help .

Link :http://www.lightoj.com/volume_showproblem.php?problem=1059

I know that's a MST problem . And I found some point of Placing Airports . My idea is :

  1. I will run a MST .
  2. If the MST is able to connect all the Nodes then I Place just One Airport initially. And Then if the Cost of an Edge is Greater than or equal to the " Cost of Making an Airport " then I will place another Airport there & then Remove the Edge's Cost.
  3. If the is not able to connect all the Nodes then I Place an Air Port where the Parent of a Node is Equal to the Node itself including if the Cost of an Edge is Greater than or equal to the " Cost of Making an Airport " then I will place another Airport there & then Remove the Edge's Cost.

Am I Correct ?

If I am not Correct then Please give some Idea where am I doing Mistakes ???

If Correct Then Please Give some suggestion about How Can I do this regarding the Following Points :

i) Do I have to Check all Edges ( If there is Repetition of an Edge Multiple times with Several Cost ) or i just Have to Check (n-1) edges ??

ii) How can I place The Airports if the Cost of an Edge is Greater than or equal to the " Cost of Making an Airport " & Remove the edges Adjacent to it with Same/ Greater Cost .

Please help..

[ My English is Bad. Sorry for that ]

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

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

Автор ssavi, история, 9 лет назад, По-английски

Hi CF Authority . I want to know about Cheat Detection . I know I'll get some Negative Vote for this Entry .

At today's Contest . I have solved two Problems in time ... My Codes are identical to another user's Code . Because that user collect the Code from me ( And why do I care what if he/she has done with my Solution .CZ I have solved myself. ).. .. And submit & Also that user solved one Extra Problem .... Unfortunately I will not be able to Do this . CF authority can check my Submission time & my identical's submission ( CF authority I won't reveal this name because you know about my Identical ") .

I just want to know why my submissions skipped ??? Why I would get a Penalty of Ratings .

Everyone do contest here to learn, train & grow up their Ratings .

What was my mistake ?

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

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

Автор ssavi, история, 9 лет назад, По-английски

Hi Experts . I have about to Solve this Simple Floyd Warshall problem . I wrote the Code & Test the Random Inputs & Outputs of uDebug . They are okey for my Code . But I don't know Why I am getting Wrong Answer ??? What is the Critical Points I am missing ?? Please help me in finding out the Critical Points of the Problems ...

=> Problem Link :https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=24&problem=1734&mosmsg=Submission+received+with+ID+16457817

=> My Code : http://ideone.com/ZRGBBr

[ Some Critical Tests and Points are Appreciable ]

Thanks in Advance . Thanks in Advance .

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

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

Автор ssavi, история, 9 лет назад, По-английски

Today I have Faced an Unusual problem ..... I have Submitted 2 Solution in Today's Contest DIV — 2. While contest is Running It shows Those twos are AC . But After a while I have seen that My Submission are Skipped ? ? And It shows I didn't register myself into the Contest .. Then How can I submitted those code at Contest Time ?

My Submission : ( Problem B ) http://codeforces.me/contest/579/submission/13042381

( Problem A ) http://codeforces.me/contest/579/submission/13038018

Why I have faced this Problem ??

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

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

Автор ssavi, 10 лет назад, По-английски

Attention to the Code Forces Authority . How to Hack a Solution ?? How Can I lock a code to get prevent from Hacking ?? I am newbie . I have solved a problem at today's Contest . And my code has been Hacked . Can anyone please help ??

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

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