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

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
  • 竞赛
  • 讨论
  • 团队
登录
注册
题目详情提交记录(0)
  • !!!神秘题解!!!3

    ”神秘题解“就在《!!神秘题解!!3》 。 。 。 。 。 。 。 。 #include <bits/stdc++.h> using namespace std; int a[100010], number; vector<int> v[100010]; inline int dfs(int x, int fa, int cnt) { int res = cnt + a[x]; if (res == number) { return -1; } int m = 0; for (auto u : v[x]) { if (u ^ fa) { int t = dfs(u, x, res); if (t == -1) { return -1; } m += (t == 1 ? 1 : 0); if (m > 1 || t == 99999) { return 99999; } } } return m + a[x] > 0; } signed main() { iossync_with_stdio(false); ios_basesync_with_stdio(false); cin.tie(0), cout.tie(0); int t; cin >> t; while (t--) { number = 0; bool flag = false; }

    userId_undefined

    俞**

    4阅读
    0回复
    0点赞
  • !!神秘题解!!2

    ”神秘题解“在《!!神秘题解!!3》

    userId_undefined

    俞**

    4阅读
    0回复
    0点赞
  • !神秘题解!1

    ”神秘题解“在《!神秘题解!2》

    userId_undefined

    俞**

    4阅读
    0回复
    0点赞
暂无数据

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

首页