/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 30ms 932.0 KiB
#3 Wrong Answer 35ms 1.551 MiB

Code

#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define str string
#define ull unsigned long long
#define fi first
#define se second
#define pll pair<ll, ll>
#define pii pair<int, int>
#define pb push_back
#define in insert
#define be begin
#define en end
#define fr front
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define mp(x, y) make_pair(x, y)
#define file(s) do { \
    FILE *f = fopen(s".in", "r"); \
    if (f) { \
        fclose(f); \
        freopen(s".in", "r", stdin); \
        freopen(s".out", "w", stdout); \
    } \
} while (0)

const int N = 3e5 + 5, MOD = 1e9+7;
const int INF = 1e9;
const ll MINF = -1e18;
vector <ll> tree;

void upd(int i, int u, int x, int l, int r){
    if(l + 1 == r) {
        tree[x] += u;
        return;
    }
    int m = (l + r) / 2;
    if(i < m) upd(i, u, x * 2 + 1, l, m);
    else upd(i, u, x * 2 + 2, m, r);
    tree[x] = max(tree[x * 2 + 1], tree[x * 2 + 2]);
}

ll get(int fnd, int x, int l, int r){
    if(l + 1 == r) {
        return l;
    }
    int m = (l + r) / 2;
    if(tree[x * 2 + 1] >= fnd) return get(fnd, x * 2 + 1, l, m);
    else return get(fnd, x * 2 + 2, m, r);
}

void solve(){
    int a, b, c;
    cin >> a >> b >> c;
    cout << ((a | 1) ^ 1) + ((b | 1) ^ 1) + ((c | 1) ^ 1) + ((a & 1) | (b & 1) | (c & 1)) << '\n';
}


int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    
//	file();
	
    int t;
    t = 1;
    cin >> t;
    for(int i = 1; i <= t; i ++) {
//      cout << "Case " << i << ":\n";
        solve();
    }
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1195 B. Palindrome
Language
C++17 (G++ 13.2.0)
Submit At
2025-06-14 10:48:58
Judged At
2025-06-14 10:48:58
Judged By
Score
50
Total Time
35ms
Peak Memory
1.551 MiB