1 条题解

  • 3
    @ 2026-5-28 22:35:05

    #include <bits/stdc++.h> using namespace std; int main(){ int a, b, c, d; cin >> a >> b >> c >> d; int cnt0 = (a == 0) + (b == 0) + (c == 0) + (d == 0); int cnt1 = 4 - cnt0; if (cnt0 == 4 || cnt1 == 4) { cout << 0 << endl; } else if (cnt0 == 1 || cnt0 == 3) { cout << 1 << endl; } else { cout << 2 ; } return 0; } 求点赞

    • 1

    信息

    ID
    30936
    时间
    1000ms
    内存
    256MiB
    难度
    5
    标签
    (无)
    递交数
    43
    已通过
    18
    上传者