# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
532548 | rk42745417 | Snake Escaping (JOI18_snake_escaping) | C++17 | 395 ms | 32708 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define EmiliaMyWife ios::sync_with_stdio(0); cin.tie(0);
using ll = int64_t;
using uint = uint32_t;
using ull = uint64_t;
using ld = long double;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const double EPS = 1e-8;
const ll LINF = ll(4e18) + ll(2e15);
static int LamyIsCute = []() {
EmiliaMyWife
return 48763;
}();
signed main() {
int n, q;
cin >> n >> q;
vector<int> mpow(n + 1, 1);
for(int i = 1; i <= n; i++)
mpow[i] = mpow[i - 1] * 3;
vector<int> dp(mpow[n]), prv(mpow[n]);
{
string s;
cin >> s;
for(int i = 0; i < s.size(); i++) {
int r = 0;
for(int j = 0; j < n; j++)
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |