acgo题库
  • 首页
  • 题库
  • 题单
  • 竞赛
  • 讨论
  • 排行
  • 团队
  • 备赛专区

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
登录
注册
题目详情题解(0)讨论(0)提交记录(0)
  • 不会的看我!!!

    userId_undefined

    yy

    倔强青铜
    35阅读
    2回复
    0点赞
  • 题解·2

    题解: #include<bits/stdc++.h> using namespace std; typedef double tnt; int n; tnt x[10001],y[10001]; tnt calc_dis(tnt x1,tnt y1,tnt x2,tnt y2) { return sqrt((x1-x2)(x1-x2) + (y1-y2)(y1-y2)); } int main() { cin>>n; for(int i=1;i<=n;i++) { cin>>x[i]>>y[i]; } //枚举 for(int i=1;i<=n;i++) { for(int j=1;j<=n;j++) { cout<<fixed<<setprecision(2)<<calc_dis(x[i],y[i],x[j],y[j])<<" "; } cout<<'\n'; } return 0; } /* */

    userId_undefined

    星舰♈

    倔强青铜
    18阅读
    0回复
    1点赞
  • 题解

    userId_undefined

    嘉陵江的晚风.

    倔强青铜
    13阅读
    0回复
    1点赞
  • TIJIE

    userId_undefined

    陈炜涵

    倔强青铜
    8阅读
    0回复
    1点赞
  • tj

    userId_undefined

    有事找大号

    秩序白银
    6阅读
    0回复
    0点赞
首页