pku acm 2304 囧死了

Written by mc on March 5, 2009 Categories: 小心有电 Tags: 

请各位解题同仁牢牢记住这只锁,丫是里面不转外面转的。这个就是pku 2304的全部难点!

附上脑残代码
[sourcecode='cpp']

#include
using namespace std;
int main()
{
int init,n1,n2,n3,deg;
while (cin>>init>>n1>>n2>>n3)
{
if (((n1==n2) && (n2==n3)) && (n1==0)) {break;}
//first
deg=720;
if (n1>init) deg=deg+360-(n1-init)*9;
else deg=deg+(init-n1)*9;
//cout< //second
deg=deg+360;
if (n2>n1) deg=deg+(n2-n1)*9;
else deg=deg+360-(n1-n2)*9;
//cout< //third
if (n3>n2) deg=deg+360-(n3-n2)*9;
else deg=deg+(n2-n3)*9;
cout< //cout<

}
return 0;
}
[/sourcecode]

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>