75092024-01-09 11:48:50MagyarKendeSZLGTom és Jerry 1 (80)cpp17Wrong answer 0/8048ms11256 KiB

#include <bits/stdc++.h>

#pragma region Utility

#define speed cin.tie(0); ios::sync_with_stdio(0)
#define cinv(v) for (auto& e : v) cin >> e;

#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define size(v) (int)v.size()
#define has(s, e) s.count(e)

#define max_index(v) max_element(all(v)) - v.begin()
#define min_index(v) min_element(all(v)) - v.begin()
#define smax(x, y) x = max(x, y)
#define smin(x, y) x = min(x, y)

#define sum(v) accumulate(all(v), 0)
#define product(v, T) accumulate(all(v), 1, multiplies<T>())

using namespace std;
using ll = long long;
using point = array<int, 2>;

int max(point p) { return max(p[0], p[1]); }
int min(point p) { return min(p[0], p[1]); }

template <typename T>
vector<T> prefix_sum(const vector<T>& v) {
    vector<T> result(size(v));
    partial_sum(all(v), result.begin());
    return result;
}

#pragma endregion

int N, M, T, P, E;
vector<vector<point>> g;

int main() {
    speed;

    cin >> N >> M >> T >> P >> E;

    g.resize(N + 1);

    while (M--) {
        int A, B, S;
        cin >> A >> B >> S;
    
        g[A].push_back({B, S});
        g[B].push_back({A, S});
    }

    vector<vector<int>> tom_distS, jerry_distS;
    /// TODO: solve

    while (P--) {
        int K;
        cin >> K;
        cout << (K & 1 ? "IGEN" : "NEM") << '\n';
    }
}
SubtaskSumTestVerdictTimeMemory
base0/80
1Accepted0/03ms1828 KiB
2Wrong answer0/03ms2280 KiB
3Wrong answer0/43ms2268 KiB
4Wrong answer0/43ms2736 KiB
5Wrong answer0/43ms2812 KiB
6Wrong answer0/43ms2824 KiB
7Wrong answer0/43ms2840 KiB
8Wrong answer0/43ms3020 KiB
9Wrong answer0/44ms3316 KiB
10Wrong answer0/44ms3376 KiB
11Wrong answer0/47ms4236 KiB
12Wrong answer0/47ms4640 KiB
13Wrong answer0/410ms5128 KiB
14Wrong answer0/420ms6752 KiB
15Wrong answer0/428ms7792 KiB
16Wrong answer0/429ms9736 KiB
17Wrong answer0/443ms10468 KiB
18Wrong answer0/428ms8988 KiB
19Wrong answer0/427ms9200 KiB
20Wrong answer0/428ms9332 KiB
21Wrong answer0/426ms8656 KiB
22Wrong answer0/448ms11256 KiB