Search found 16 matches

by mhsn06
Fri Nov 28, 2014 11:53 pm
Forum: Volume 4 (400-499)
Topic: 469 - Wetlands of Florida
Replies: 63
Views: 20806

Re: 469 - Wetlands of Florida

Got AC:D
Changed the way.

Thanks to lighted
by mhsn06
Sun Nov 23, 2014 8:10 pm
Forum: Volume 4 (400-499)
Topic: 429 - Word Transformation
Replies: 82
Views: 16625

Re: 429 - Word Transformation

Just for future newbie:
You can handle the last part input like below in c or c++ only

Code: Select all


  char s[40], *s1, *s2;
  while(gets(s) && strlen(s)){
        s1 = strtok(s, " ");
        s2 = strtok(NULL, " ");
      // do whatever need to do
   }
:)
by mhsn06
Tue Sep 30, 2014 10:10 am
Forum: Volume 3 (300-399)
Topic: 382 - Perfection
Replies: 95
Views: 18519

Re: 382 - Perfection

1 < N < 100
So input 1 is invalid. Moreover, how can 1 be deficient?
1 = 1*1 *1 *1 *1......
1> summation of it product
:D
by mhsn06
Fri Sep 19, 2014 10:41 pm
Forum: Volume 2 (200-299)
Topic: 280 - Vertex
Replies: 95
Views: 21477

Re: 280 - Vertex

brianfry713 wrote:Don't read from a file.
thanks for your reply.

I got the problem. I tried to clear a two dimensional vector with clear(). That's the problem. I used a loop and it's ok now.
by mhsn06
Fri Sep 19, 2014 5:53 pm
Forum: Volume 125 (12500-12599)
Topic: 12502 - Three Families
Replies: 23
Views: 9779

Re: 12502 - Three Families

Thanks lighted for your explanation.
by mhsn06
Fri Sep 19, 2014 2:07 pm
Forum: Volume 2 (200-299)
Topic: 280 - Vertex
Replies: 95
Views: 21477

Re: 280 - Vertex

Hi, I have been trying to find a bug for four/ five hours but failed. :cry: My code outputs 0 0 for input 1 1 1 0 0 1 1 1 0 1 1 0 I can't figure it out why it's showing 0 for second case. It works when the case is the only case in input file. vector<vector <int > > graph(105); graph.clear(); // this...
by mhsn06
Fri Sep 19, 2014 11:39 am
Forum: Volume 125 (12500-12599)
Topic: 12502 - Three Families
Replies: 23
Views: 9779

Re: 12502 - Three Families

Yes, I got AC with that. But how can A get bigger amount than input. Didn't I get the problem correctly?
If family A and B spent x and y hours respectively, and family C paid $z, how much should family A get?
by mhsn06
Fri Sep 19, 2014 11:07 am
Forum: Volume 125 (12500-12599)
Topic: 12502 - Three Families
Replies: 23
Views: 9779

Re: 12502 - Three Families

what will be the output for this?

Code: Select all

1
6 2 500
by mhsn06
Tue Sep 09, 2014 9:40 pm
Forum: Volume 6 (600-699)
Topic: 624 - CD
Replies: 77
Views: 32933

Re: 624 - CD

At first I thought the number of tracks must be maximum but it's ok with multiple solution. For Example: for this last sample input 45 8 4 10 44 43 12 9 8 2 the sample output is 4 10 12 9 8 2 sum:45 but my AC code output the minimum number of tracks 43 2 sum:45 though it is ok but how can I find the...
by mhsn06
Sun Aug 31, 2014 10:25 pm
Forum: Volume 115 (11500-11599)
Topic: 11572 - Unique Snowflakes
Replies: 36
Views: 12178

Re: 11572 - Unique Snowflakes

Thanks all. I got AC. But all the test cases help me greatly.
by mhsn06
Fri Aug 29, 2014 7:03 am
Forum: Volume 123 (12300-12399)
Topic: 12356 - Army Buddies
Replies: 21
Views: 5241

Re: 12356 - Army Buddies

1 <= L <=R <= N
what is the meaning of L>R input?
3 2
They are already killed. how it could be?
2 3
by mhsn06
Wed Aug 20, 2014 5:47 pm
Forum: Volume 117 (11700-11799)
Topic: 11734 - Big Number of Teams will Solve This
Replies: 26
Views: 7335

Re: WA 11734 - Big Number of Teams will Solve This

Finally got AC.
Check for the AC input. For future :D

Code: Select all

3
mmmmmmm
mmmmmmmmm
m m m
mmm
m                 m
m                 m

Code: Select all

Case 1: Wrong Answer
Case 2: Output Format Error
Case 3: Yes

There MUST be a newline after the last line.
8)
by mhsn06
Mon Aug 18, 2014 3:53 pm
Forum: Volume 117 (11700-11799)
Topic: 11734 - Big Number of Teams will Solve This
Replies: 26
Views: 7335

WA 11734 - Big Number of Teams will Solve This

Getting WA!! Can't find bug. help please

Code: Select all

 Code Removed after got AC  :D 
by mhsn06
Mon Aug 18, 2014 11:15 am
Forum: Volume 5 (500-599)
Topic: 537 - Artificial Intelligence?
Replies: 76
Views: 10370

Re: WA verdict 537 - Artificial Intelligence?

I'm getting the same result with no error.
Will you please tell me the error description?
by mhsn06
Mon Aug 18, 2014 12:05 am
Forum: Volume 5 (500-599)
Topic: 537 - Artificial Intelligence?
Replies: 76
Views: 10370

WA verdict 537 - Artificial Intelligence?

Hello everyone,
I'm getting WA verdict but can't find the bug. Please help me to find the bug.

Got AC.

Code: Select all


the following line was the culprit

  for(i; c[i]; i++)
 

Go to advanced search