## Search found 36 matches

Wed May 16, 2012 1:07 pm
Forum: Volume 8 (800-899)
Topic: 875 - Monopoly
Replies: 3
Views: 3581

### Re: 875 - Monopoly

Can anyone who solved this problem explain the sample I/O given ? I was able to figure out that CE > A is redundant. But no clue abt the other 2.
Wed May 16, 2012 7:26 am
Forum: Volume 6 (600-699)
Topic: 649 - You Who?
Replies: 4
Views: 2880

### Re: 649 - You Who?

Can you give your output for the following input 6 1 3 4 5 6 2 3 4 5 6 3 3 4 5 6 4 3 1 2 3 5 3 1 2 3 6 3 1 2 3 1 1 0 2 1 1 2 2 1 1 7 1 2 3 4 2 2 5 6 3 2 1 7 4 2 1 5 5 2 2 4 6 1 2 7 1 3 My code gives the below output. But I am getting WA. 1 3 3 5 6 3 1 2 4 0 0 1 1 0 1 2 1 1 2 4 2 3 6 7 3 1 4 5
Tue May 15, 2012 7:24 pm
Forum: Volume 6 (600-699)
Topic: 649 - You Who?
Replies: 4
Views: 2880

### Re: 649 - You Who?

Can anyone who solved this problem help me out ?

1) What should the output be when N = 1 ?
2) What does maximal number per person mean? Is it
(I1+I2) /N
or
max (I1/N1 , I2/N2) N1 + N2 = N, I1 = introductions in Set 1 and I2 = Introductions in Set 2

Any help is appreciated.
Mon May 14, 2012 8:43 pm
Forum: Volume 6 (600-699)
Topic: 612 - DNA Sorting
Replies: 122
Views: 18580

### Re: 612 - DNA Sorting

I checked my code with sample I/O and the inputs posted previously. Can someone pls tell me why I m getting WA ? #include<vector> #include<iostream> #include<math.h> #include<string> #include<algorithm> #include<stdio.h> using namespace std; class node { public: string a; int inver; node(string,int)...
Fri May 11, 2012 7:25 pm
Forum: Volume 124 (12400-12499)
Topic: 12442 - Forwarding Emails
Replies: 31
Views: 15070

### Re: 12442 - Forwarding Emails

I got AC in 0.416 sec, but I m interested to know how i can improve my algo. Is there any particular technique to be used ? I read about centrality in social networks. It sounded quite similar to this problem.
Thu May 10, 2012 10:25 am
Forum: Volume 110 (11000-11099)
Topic: 11059 - Maximum Product
Replies: 96
Views: 38997

### Re: 11059 - Maximum Product

Thanks you ! I realised my mistake, I was resetting the sum to zero after a negative number. Got AC.
Thu May 10, 2012 10:23 am
Forum: Volume 4 (400-499)
Topic: 445 - Marvelous Mazes
Replies: 93
Views: 12096

### Re: 445 Marvelous mazes WA

Thanks I got AC. The newline was the issue.
Tue May 08, 2012 2:03 pm
Forum: Volume 110 (11000-11099)
Topic: 11059 - Maximum Product
Replies: 96
Views: 38997

### Re: 11059 - Maximum Product

I ve got WA on this nearly 10 times ! I tried previous test inputs and they work fine. Can someone tell me what's wrong with this code ? #include<iostream> #include<string> using namespace std; int main() { int n,count = 1; string empty; while(cin>>n) { long long ans = 1; long long cur; long long re...
Tue May 08, 2012 8:31 am
Forum: Volume 124 (12400-12499)
Topic: 12442 - Forwarding Emails
Replies: 31
Views: 15070

### Re: 12442 - Forwarding Emails

Ok. I have made modifications, i checked my output with sample I/O and the input given by u. Is there any tricky input? I m still getting TLE. #include<iostream> #include<vector> #include <time.h> using namespace std; int main() { int t; cin >> t; int j = 1; while(j<=t) { int n; cin >> n; int forwar...
Mon May 07, 2012 6:21 pm
Forum: Volume 124 (12400-12499)
Topic: 12442 - Forwarding Emails
Replies: 31
Views: 15070

### Re: 12442 - Forwarding Emails

My code produces the same output as above, but I m getting TLE. Any suggestions ? #include<iostream> using namespace std; int main() { int t; cin >> t; int j = 1; while(j<=t) { int n; cin >> n; int forward[50001]; int a; for(int i=1;i<=n;i++) { cin >> a; cin >> forward[a]; } int len[50001] = {0}; in...
Mon May 07, 2012 9:25 am
Forum: Volume 102 (10200-10299)
Topic: 10226 - Hardwood Species
Replies: 121
Views: 40817

### Re: 10226 - Hardwood Species

I m getting WA using STL. I wont be surprised if i got TLE, but what's wrong with this code? #include<map> #include<iostream> #include<string> #include<iomanip> using namespace std; int main() { int t; cin>> t; string tree,empty; getline(cin,empty); while(t) { map<string,double> trees; getline(cin,e...
Tue May 01, 2012 6:13 pm
Forum: Volume 4 (400-499)
Topic: 445 - Marvelous Mazes
Replies: 93
Views: 12096

### 445 Marvelous mazes WA

I have tried with previous inputs, and the outputs match. But still getting WA. Can anyone who got AC pls help me out ?

Code: Select all

``````Code removed after AC
``````
Sun Apr 29, 2012 11:13 am
Forum: Volume 4 (400-499)
Topic: 454 - Anagrams
Replies: 97
Views: 22885

### Re: 454 Anagrams WA

Damn ! I am really stupid. Thanks a ton Brian !
Sat Apr 28, 2012 10:03 pm
Forum: Volume 12 (1200-1299)
Topic: 1261 - String Popping
Replies: 3
Views: 3403

### Re: 1261 string popping WA

Never mind. The problem was with a newline character. I dint insert a newline at the end.
Sat Apr 28, 2012 3:50 pm
Forum: Volume 12 (1200-1299)
Topic: 1261 - String Popping
Replies: 3
Views: 3403

### 1261 - String Popping

Can someone who got AC pls give me input to test. I tried with different inputs and my program works. But i got WA.

Code: Select all

``  Code deleted after AC ``