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

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

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

    #include <bits/stdc++.h> using namespace std; using ll = long long; bool check(ll u, ll v, ll w, ll x) { if (u * x + v == w) return true; if (u * x + w == v) return true; if (v * x + u == w) return true; if (v * x + w == u) return true; if (w * x + u == v) return true; if (w * x + v == u) return true; return false; } vector<ll> get_candidates(ll u, ll v, ll w) { vector<ll> res; if ((w - v) % u == 0) { ll x = (w - v) / u; if (x >= 0) res.push_back(x); } if ((v - w) % u == 0) { ll x = (v - w) / u; if (x >= 0) res.push_back(x); } if ((w - u) % v == 0) { ll x = (w - u) / v; if (x >= 0) res.push_back(x); } if ((u - w) % v == 0) { ll x = (u - w) / v; if (x >= 0) res.push_back(x); } if ((v - u) % w == 0) { ll x = (v - u) / w; if (x >= 0) res.push_back(x); } if ((u - v) % w == 0) { ll x = (u - v) / w; if (x >= 0) res.push_back(x); } sort(res.begin(), res.end()); res.erase(unique(res.begin(), res.end()), res.end()); return res; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); }

    userId_undefined
    ༺ཌༀ༒剑起风止༒ༀ༻
    循环·循环打卡人俄罗斯套娃大师倔强青铜数组·数组操作员分支·分支解题者
    0阅读
    0回复
    0点赞
暂无数据

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

首页