Submission #1210143

#TimeUsernameProblemLanguageResultExecution timeMemory
1210143FatonimMensza (COI22_mensza)C++20
100 / 100
28 ms2436 KiB
#include <bits/stdc++.h>
using namespace std;

#ifdef ONPC
#include "debug.h"
#else
#define dbg(...)
#endif

#define ll long long
#define int long long
#define ld long double
#define pi pair<int, int>
#define sz(a) ((int)(a.size()))
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define sqr(n) ((n) * (n))
#define divup(a, b) (((a) + (b)-1) / (b))
#define popcount(n) __builtin_popcountll(n)
#define clz(n) __builtin_clzll(n)
#define Fixed(a) cout << fixed << setprecision(12) << a;

template <class T> bool chmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template <class T> bool chmax(T& a, const T& b) { return b > a ? a = b, 1 : 0; }

const int mod = 998244353; // 998244353 1e9 + 7
const ll inf = (ll)(1e18) + 7;
const ld eps = 1e-9;

const int B = 10;
const int N = 1000 + 3;
const int logn = 20;
const int maxn = 2e5 + 7;
/////////////////////////solve/////////////////////////

void decode_a() {
    int a;
    cin >> a;
    vector<int> res;
    for (int i = 0; i < 2 * a; ++i) {
        res.push_back(1);
    }
    cout << sz(res) << " ";
    for (auto x : res) cout << x << ' ';
    cout << endl;
}

void decode_b() {
    int b;
    cin >> b;
    vector<int> res;
    for (int i = 0; i < 2 * b - 1; ++i) {
        res.push_back(2);
    }
    cout << sz(res) << " ";
    for (auto x : res) cout << x << ' ';
    cout << endl;
}

void encode() {
    int n;
    cin >> n;
    vector<int> c(n);
    for (int i = 0; i < n; ++i) {
        cin >> c[i];
    }

    int a = 0, b = 0;
    if (c[0] % 2 != 0) swap(c[0], c[1]);
    a = c[0] / 2;
    b = (c[1] + 1) / 2;
    cout << (a < b ? "A" : "B") << endl;
}

void solve() {
    int l, t;
    cin >> l >> t;

    vector<int> res1, res2;
    while (t--) {
        string cur;
        cin >> cur;
        if (cur == "alojzije") cout << "0\n";
        else if (cur == "benjamin") cout << "0\n";
        else {
            int n;
            cin >> n;
            cout << "A\n";
        }
    }
}

signed main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

#ifdef ONPC
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    freopen("error.txt", "w", stderr);
#endif

    solve();
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...