Search found 3 matches

by TurtleShip
Mon Sep 21, 2015 8:30 am
Forum: Volume 5 (500-599)
Topic: 558 - Wormholes
Replies: 30
Views: 15065

Re: 558 - Wormholes

You need to reset your adj list after each input. So after cin >> V >> edge , write the below code for(int i=0; i < V; i++) AdjList[i].clear(); and your code will get AC. Also, you probably need your import statement from #include<bits/stdc++.h> to #include <utility> #include <algorithm> #include <v...
by TurtleShip
Mon Apr 07, 2014 9:45 am
Forum: Volume 10 (1000-1099)
Topic: 1061 - Consanguine Calculations
Replies: 10
Views: 3995

Re: 1061 - Consanguine Calculations

Thank you so much lbv!

I made a careless mistake where blood "B" can come from either "AB" or "O". The correct logic should be "B" can come from either "AB" or "B"

Your input/output helped a lot!

Thanks!! :-)
by TurtleShip
Sun Apr 06, 2014 7:27 pm
Forum: Volume 10 (1000-1099)
Topic: 1061 - Consanguine Calculations
Replies: 10
Views: 3995

1061 - Consanguine Calculations

Hi, I keep getting a WA for this problem. My approach is essentially a brute force. Given either ( a parent and a child ) or ( two parents ), I try all possible combinations and check if it is valid. Below is my code. I named my variables/method names and added comments so that it is easy to see wha...

Go to advanced search