?? 2582.txt
字號:
Problem Id:2582 User Id:fzk
Memory:32K Time:0MS
Language:C++ Result:Accepted
Source
#include"iostream.h"
#include"math.h"
struct point
{
int x,y,z;
}b[20],f[20];
inline int sq_dis( point a, point b )
{
return (a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y) + (a.z-b.z)*(a.z-b.z);
}
int main()
{
int l,w,d,n,m,ans,i,j;
char t[100],c;
cin>>t;
while( cin>>l>>w>>d )
{
m = 0;
while( 1 )
{
cin>>b[m].x>>c>>b[m].y>>c>>b[m].z;
if( b[m].z > d ) b[m].z = d;
m++;
if( cin.peek() == '\n' ) break;
}
n = 0;
while( 1 )
{
cin>>f[n].x>>c>>f[n].y>>c>>f[n].z;
n++;
if( cin.peek() == '\n' ) break;
}
ans = 0;
for( i=0; i<n; i++ )
for( j=0; j<m; j++ )
if( sq_dis( f[i], b[j] ) <=1 )
{
ans++;
break;
}
if( ans != 0 ) cout<<"AIEE, I got "<<ans<<" fish, me!\n";
else cout<<"None of dem fish blowed up!\n";
cin>>t>>t;
}
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -