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 ...
Search found 30 matches
- Wed Mar 19, 2003 9:20 am
- Forum: Volume 101 (10100-10199)
- Topic: 10199 - Tourist Guide
- Replies: 57
- Views: 40707
- 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.
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.
- 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 ...
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 ...
- 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....
Can anybody help....
- 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 ...
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 ...
- Tue Jun 18, 2002 6:01 am
- Forum: Other words
- Topic: Number of submissions doubled ?!?!
- Replies: 8
- Views: 3948
- 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 ...
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 ...
- 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????
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????
- Wed Apr 03, 2002 8:54 am
- Forum: Volume 102 (10200-10299)
- Topic: 10252 - Common Permutation
- Replies: 150
- Views: 73282
- Tue Apr 02, 2002 10:54 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10101 - Bangla Numbers
- Replies: 122
- Views: 45430
- Tue Apr 02, 2002 10:17 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10252 - Common Permutation
- Replies: 150
- Views: 73282
- Mon Apr 01, 2002 8:52 am
- Forum: Volume 6 (600-699)
- Topic: 616 - Coconuts, Revisited
- Replies: 37
- Views: 18069
- Thu Mar 28, 2002 5:44 am
- Forum: Volume 1 (100-199)
- Topic: 107 - The Cat in the Hat
- Replies: 278
- Views: 54926
- Thu Mar 28, 2002 12:09 am
- Forum: Volume 1 (100-199)
- Topic: 107 - The Cat in the Hat
- Replies: 278
- Views: 54926
- Wed Mar 27, 2002 9:25 pm
- Forum: Volume 4 (400-499)
- Topic: 412 - Pi
- Replies: 104
- Views: 30241