no, i am getting wrong answer again with this logic..
it is my code::
int main()
{
register int test,i,j,winner=0,g1,g2;
string s1,s2;
string
team[16]={"ARG","BEL","BRZ","CAM","COL","CRC","CZE","ENG","GER","IRE","ITA","NET","ROM","SPA","URU","YUG"};
cin >>test;
while(test--)
{
int point[16]={0};
for(j=0;j<16;j++)
{
cin>>s1>>s2>>g1>>g2;
if(g1>g2)
{
for(i=0;i<16;i++)
{
if(s1==team[i])
{point[i]++;break;}
}
}
else
{
for(i=0;i<16;i++)
{
if(s2==team[i])
{point[i]++;break;}
}
}
}
int big=0;
for(i=0;i<16;i++)
{ cout<<"team "<<team[i]<<"::"<<point[i]<<endl;
if(point[i]==4){cout<<team[i]<<endl;break;}}
}
return 0;
}
On Mon, Jun 6, 2011 at 1:49 PM, nicks <[email protected]> wrote:
> @parmendra..yeah u r right what's ur problem u r not able to implement it r
> what....only winner will win 4 matches runner and 3rd posn will win 3 match
> each...
>
>
> On Mon, Jun 6, 2011 at 12:47 AM, arun kumar <[email protected]> wrote:
>
>> any team which has nt lost a match will win
>>
>> On Mon, Jun 6, 2011 at 1:12 PM, PRAMENDRA RATHi rathi
>> <[email protected]> wrote:
>> > i am thinking that the team with win point 4 will be the winner ..
>> > is this wrong?
>> >
>> > https://www.spoj.pl/problems/SBETS/
>> >
>> >
>> > because there are only 16 match 8+4+2+1(final) +1(for runner up)
>> > so any team can play at max 4 match.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "Algorithm Geeks" group.
>> > To post to this group, send email to [email protected].
>> > To unsubscribe from this group, send email to
>> > [email protected].
>> > For more options, visit this group at
>> > http://groups.google.com/group/algogeeks?hl=en.
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.