Submission #1027800

# Submission time Handle Problem Language Result Execution time Memory
1027800 2024-07-19T10:06:32 Z edogawa_something Dungeons Game (IOI21_dungeons) C++17
11 / 100
7000 ms 35924 KB
#include "dungeons.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vii;
typedef pair<ll,ll> pii;
#define F first 
#define S second 
#define pb push_back
#define all(v) v.begin(),v.end()
const ll M=4e5+10;
const ll inf=2e18;
vector<pair<pii,int>>inc[M];
ll awin[M];
ll N;
vector<int>lose,hero,win,enemy;
void init(int n,vector<int>s,vector<int>p,vector<int>w,vector<int>l) {
	N=n;
	hero=s;
	enemy=p;
	win=w;
	lose=l;
}

long long simulate(int x, int z){
	while(x<N){
		if(z<hero[x])
		z+=enemy[x],x=lose[x];
		else
		z+=hero[x],x=win[x];
	}
	return z;
}

# Verdict Execution time Memory Grader output
1 Correct 5 ms 9820 KB Output is correct
2 Correct 4 ms 9820 KB Output is correct
3 Correct 5 ms 9820 KB Output is correct
4 Correct 22 ms 13072 KB Output is correct
5 Correct 5 ms 9820 KB Output is correct
6 Correct 17 ms 12924 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 9816 KB Output is correct
2 Execution timed out 7060 ms 35924 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 9820 KB Output is correct
2 Correct 32 ms 14484 KB Output is correct
3 Execution timed out 7044 ms 14424 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 9820 KB Output is correct
2 Correct 32 ms 14484 KB Output is correct
3 Execution timed out 7044 ms 14424 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 9820 KB Output is correct
2 Correct 32 ms 14484 KB Output is correct
3 Execution timed out 7044 ms 14424 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 9816 KB Output is correct
2 Execution timed out 7060 ms 35924 KB Time limit exceeded
3 Halted 0 ms 0 KB -