http://www.codechef.com/problems/VOTERS
Here is my solution
Dont know y i m getting Runtime error..plz check..
#includecstdio
#includealgorithm
using namespace std;
int main()
{
int a,b,c,x[50001],i;
int s[11],count;
s[11]=0;
count=0;
how to solve these type of problems http://www.spoj.pl/problems/GNY07H/
means how to approach this problem by dp.
--
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT ALLAHABAD*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
#includecstdio
using namespace std;
int a,b,c,x[51],i;
int s[101],count;
int main()
{
scanf(%d%d%d,a,b,c);
for(i=0;ia;i++)
{
scanf(%d,x[i]);
s[x[i]]++;
}
for(i=0;ib;i++)
{
scanf(%d,x[i]);
s[x[i]]++;
}
You have not taken care of the test case where the number is repeated more
than once in a single list and is not there in other lists.
Problem desc - the final list including only those ID numbers that
appeared in at least 2 out of the 3 lists
so it should not display the numbers which appear
@wladimir
can u upsate the site in English???
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
anyone ?
On Fri, Apr 13, 2012 at 12:09 PM, UTKARSH SRIVASTAV usrivastav...@gmail.com
wrote:
how to solve these type of problems http://www.spoj.pl/problems/GNY07H/
means how to approach this problem by dp.
--
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT ALLAHABAD*
@ raminder.. its clear that number cannot be specified in same list
twice..even asked in a comment from admin.
On 4/13/12, Ramindar Singh ramin...@gmail.com wrote:
You have not taken care of the test case where the number is repeated more
than once in a single list and is not there in other
@ kuldeep thanks...that wrked..bt still cud nt understand that what
difference making that global made..
On 4/13/12, Rishabh Jain rishabh@gmail.com wrote:
@ raminder.. its clear that number cannot be specified in same list
twice..even asked in a comment from admin.
On 4/13/12, Ramindar
hi , thanks for pointing that out. I corrected the code but still
getting a WA. Any possible reasons?
code: http://ideone.com/bnz52
On Apr 13, 8:13 am, Tushar tushicom...@gmail.com wrote:
2
3
1 1 1
5
1 2 3 1 2
O/P should be:
0
6
Your O/P is
3
9
--
You received this message because