Submission #576226

# Submission time Handle Problem Language Result Execution time Memory
576226 2022-06-12T16:17:56 Z piOOE Star Trek (CEOI20_startrek) C++17
0 / 100
1 ms 328 KB
#include <bits/stdc++.h>

using namespace std;

//#include <ext/pb_ds/assoc_container.hpp>
//
//using namespace __gnu_pbds;
//
//template <typename T>
//using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;


template<typename T>
bool ckmx(T &a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

template<typename T>
bool ckmn(T &a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}

#define sz(x) ((int)size(x))
#define all(x) begin(x), end(x)
#define trace(x) cout << #x << ": " << (x) << endl;
#define mp(x, y) make_pair(x, y)

typedef long long ll;

mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());

int rand(int l, int r) { return (int) ((ll) rnd() % (r - l + 1)) + l; }

const int N = 11, mod = 1e9 + 7;

int mul(int a, int b) {
    return a * (ll)b % mod;
}

int add(int a, int b) {
    return a + b >= mod ? a + b - mod : a + b;
}

int fastp(int a, ll p) {
    int ans = 1;
    for (; p > 0; a = mul(a, a), p >>= 1) {
        if (p & 1) {
            ans = mul(ans, a);
        }
    }
    return ans;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n;
    ll d;
    cin >> n >> d;
    cout << mul(3, fastp(4, d - 1));
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 324 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 328 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 328 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 328 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 328 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 328 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 328 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 324 KB Output isn't correct
2 Halted 0 ms 0 KB -