Saratov State University :: Online Contester


::Go
- home
- news
- register
- update personal info
- problemset archive
- submit
- status online
- standing
- contests
- virtual contests
- forum
- statistic
- FAQ
- links
- projects

::Poll
Are you registered on Codeforces?
Yes
No
What is it???

[results]

::webboard

wrong answer on test 12
Author: Seyed Taba
ID: 066668
Problem: 316
Contest: 0
Date: 2015-11-13 14:24:00

why?
my code is:

int hit[7];
long long point[7];
int main()
{
int n,m,p,k;
cin>>n>>m;
for(int i=1;i<=n;i++)
hit[i]=100;
for(int i=0;i<m;i++)
{
cin>>p>>k;
if(hit[p]>0)
{
if(hit[k]>0)
point[p]+=3;
if(hit[k]>8)
hit[k]-=8;
else
hit[k]=0;
}

}
for(int i=1;i<=n;i++)
{
point[i]+=(hit[i])/2;
cout<<hit[i]<<" "<<point[i]<<endl;
}
return 0;
}


see sub-tree reply to that message


::Login
Forgot password?

::News
22.10.12 - The problems from the Southern Subregional Programming Contest 2012 added to the problemset archive (542 - 553).
22.10.12 - After the start of the contest the statements in PDF will be available by the link.
23.10.11 - The problems from the Southern Subregional Programming Contest 2011 added to the problemset archive (530 - 541).

::Counter

Server time: 2017-11-23 04:30:59Online Contester Team © 2002 - 2016. All rights reserved.