/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:5:25: warning: format '%f' expects argument of type 'float*', but argument 2 has type 'double*' [-Wformat=]
  scanf("%f%f%f",&n,&m,&r);
                         ^
/in/foo.cc:5:25: warning: format '%f' expects argument of type 'float*', but argument 3 has type 'double*' [-Wformat=]
/in/foo.cc:5:25: warning: format '%f' expects argument of type 'float*', but argument 4 has type 'double*' [-Wformat=]
/in/foo.cc:6:5: error: expected '(' before 'm'
  if m>n printf("%.3f",sqrt((m-n)*(m-n)+r*r));
     ^
/in/foo.cc:7:2: error: 'else' without a previous 'if'
  else printf("%.3f",r);
  ^~~~

信息

递交者
类型
递交
题目
P1393 盗窃-大海的奇迹
语言
C++
递交时间
2017-07-20 13:05:58
评测时间
2017-07-20 13:05:58
评测机
分数
0
总耗时
55ms
峰值内存
5.82 MiB