# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1171172 | mousebeaver | Vlak (COCI20_vlak) | C++20 | 19 ms | 22512 KiB |
#define ll long long
#define subINF numeric_limits<ll>::min()/2
#define pll pair<ll, ll>
#define ppl pair<pll, ll>
#define BITS 32
#include <bits/stdc++.h>
using namespace std;
//Does the moving player (bool nina) win?
bool dfs(vector<vector<ll>>& trie, vector<bool>& nina, vector<bool>& emilija, ll node, bool ninaMoves)
{
if(ninaMoves && !nina[node])
return false;
if(!ninaMoves && !emilija[node])
return false;
bool output = false;
for(ll i = 0; i < 26; i++)
{
if(trie[node][i] != -1 && ((ninaMoves && nina[trie[node][i]]) || (!ninaMoves && emilija[trie[node][i]])))
output |= !dfs(trie, nina, emilija, trie[node][i], !ninaMoves);
}
return output;
}
int main()
{
ios::sync_with_stdio(false);
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |