acgo题库
  • 首页
  • 题库
  • 学习
  • 天梯
  • 备赛

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
  • 资讯
  • 竞赛
  • 讨论
  • 团队
  • 商城
登录
注册
题目详情提交记录(0)
  • 题解

    userId_undefined
    云间序
    小有名气题解仙人勇敢小狗荣耀黄金快乐小狗GESP5级
    67阅读
    2回复
    5点赞
  • c++

    #include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(9); int c,T; cin >> c >> T; while(T--){ int n; long long x,y,v0; cin >> n >> x >> y >> v0; double a; if(x == y){ a = 0; }else if(v0 == 0){ a = 1e18; }else{ a = (double)(y - x) / v0; } for(int i = 0;i < n;i++){ long long t,v; cin >> t >> v; double b = (double)t + (double)y / v; if(b < a){ a = b; } } cout << fixed << setprecision(9) << a << '\n'; } return 0; }

    userId_undefined
    牛牛哦
    时间刺客倔强青铜字符串·魔法使模拟·模拟练习生枚举·枚举小能手
    11阅读
    0回复
    0点赞
暂无数据

提交答案之后,这里将显示提交结果~

首页