Search found 30 matches

by ram
Wed Mar 19, 2003 9:20 am
Forum: Volume 101 (10100-10199)
Topic: 10199 - Tourist Guide
Replies: 57
Views: 40707

I am getting WA!

I think I considered disconnected graph also, but still getting WA! Can anybody help. Here is the code

:cry:


[cpp]
#include <iostream>
#include <string>
#include <algorithm>
#include <iomanip>
#include <math.h>
#include <map>
#include <iomanip>
#include <vector>
#include <fstream>

using ...
by ram
Mon Feb 03, 2003 1:05 am
Forum: Volume 102 (10200-10299)
Topic: 10299 - Relatives
Replies: 57
Views: 20723

ur code

Hi,

If I am correct, u are doing a brute force here which would obviously lead to a TLE. U should use totient function.

Search for totient function at:

http://mathworld.wolfram.com

This is the best place for any math or number thoery problems.

good luck,
ram.
by ram
Sun Feb 02, 2003 11:26 pm
Forum: Volume 102 (10200-10299)
Topic: 10226 - Hardwood Species
Replies: 121
Views: 56001

But it doesnt have anything to do with TLE

hi gvcormac:

But that doesnt have anything to do with TLE. if he is not "emptying" the map table then I think it should give a WA but not a TLE. I have actually modified the posted code into this:
[cpp]
#pragma warning(disable : 4786)
#include <iostream>
#include <string>
#include <map ...
by ram
Fri Jan 31, 2003 7:33 am
Forum: Volume 102 (10200-10299)
Topic: 10226 - Hardwood Species
Replies: 121
Views: 56001

Same is the case with me

I also used STL for solving this problem. But getting a TLE. Is anything wrong with the input or our algo?

Can anybody help....
by ram
Tue Jan 07, 2003 3:59 am
Forum: Volume 100 (10000-10099)
Topic: 10053 - Envelopes
Replies: 12
Views: 5074

10053

I dont think I understood the problem correctly. Can anybody help me???

For this input:

2 4
105 9
99 149
110 10 10
100 50 5
150 100 7
90 140 15

How can the output be:
2
3

How can greeting with dimensions 105 9 fit into the envelope with dimensions 100 50. Does this make sense?????

And are there ...
by ram
Tue Jun 18, 2002 6:01 am
Forum: Other words
Topic: Number of submissions doubled ?!?!
Replies: 8
Views: 3948

yah, could be because of the breakdown. But the list of the problems is the same. :wink:
by ram
Thu May 23, 2002 10:52 pm
Forum: Volume 4 (400-499)
Topic: 474 - Heads / Tails Probability
Replies: 50
Views: 18427

474 problem

My code works fine with all the test cases I tested. but I am getting a WA.
Can anybody help me out??? :(

Here is the code
[cpp]
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <math.h>
#include <iomanip>


using namespace std;


int main(){
string x ...
by ram
Wed Apr 03, 2002 10:08 am
Forum: Volume 6 (600-699)
Topic: 696 - How Many Knights
Replies: 29
Views: 16535

696 - How Many Knights

I am getting WA. the only special cases I see are when row or col = 1 or 2
Are there any other special cases???????

Here is the output from my program.
6 3
9 knights
2 2
4 knights
1 10
10 knights
2 3
4 knights
2 4
4 knights

Are there any other special test cases????
by ram
Wed Apr 03, 2002 8:54 am
Forum: Volume 102 (10200-10299)
Topic: 10252 - Common Permutation
Replies: 150
Views: 73282

I used cin>>"string variable" and cin.getline("array variable",1003,'n')

But why should it make a difference??? Any idea???

<font size=-1>[ This Message was edited by: ram on 2002-04-03 08:54 ]</font>
by ram
Tue Apr 02, 2002 10:54 pm
Forum: Volume 101 (10100-10199)
Topic: 10101 - Bangla Numbers
Replies: 122
Views: 45430

what should be the output for 000, 00 and 0?
Can any body help me??????

<font size=-1>[ This Message was edited by: ram on 2002-04-02 22:54 ]</font>
by ram
Tue Apr 02, 2002 10:17 pm
Forum: Volume 102 (10200-10299)
Topic: 10252 - Common Permutation
Replies: 150
Views: 73282

I got "WA" when I used "string". But got acc when i used char array. does any body know the reason??????

<font size=-1>[ This Message was edited by: ram on 2002-04-02 22:17 ]</font>
by ram
Mon Apr 01, 2002 8:52 am
Forum: Volume 6 (600-699)
Topic: 616 - Coconuts, Revisited
Replies: 37
Views: 18069

"long int" is not sufficient for longer values.

Try using "long double" instead of "long int" and "fmod" instead of "%".
by ram
Thu Mar 28, 2002 5:44 am
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 54926

Stefan,

It just got accepted. thanx a lot. I usually use my university's mail program and it never gave me trouble, thats the reason I didnt even suspect this. hmmm, I guess I would go UNIX now. :smile:
by ram
Thu Mar 28, 2002 12:09 am
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 54926

Here is my latest code. And it works absolutely OK on all test cases. But I am getting wrong answer.


#include <iostream>
#include <math.h>
#include <iomanip>

using namespace std;

double round(double num)
{
if(ceil(num)-num<num-floor(num))
return ceil(num);
else
return floor(num);
}

int ...
by ram
Wed Mar 27, 2002 9:25 pm
Forum: Volume 4 (400-499)
Topic: 412 - Pi
Replies: 104
Views: 30241

I fixed it. But still getting WA

Go to advanced search