답안 #1049559

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1049559 2024-08-08T22:56:32 Z vjudge1 던전 (IOI21_dungeons) C++17
11 / 100
7000 ms 35868 KB
#include "dungeons.h"
#include <vector>
int L[50100],W[50100],N,S[50100],P[50100];
void init(int n, std::vector<int> s, std::vector<int> p, std::vector<int> w, std::vector<int> l) {
	N=n;
	for(int i=0;i<n;i++)
		L[i]=l[i],W[i]=w[i],S[i]=s[i],P[i]=p[i];
}

long long simulate(int x, int z) {
	while(x<N)
		if(z<S[x])
			z+=P[x],x=L[x];
		else z+=S[x],x=W[x];
	return z;
}

# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 10 ms 3676 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 10 ms 3640 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Runtime error 90 ms 35868 KB Execution killed with signal 11
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 25 ms 5180 KB Output is correct
3 Execution timed out 7064 ms 4956 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 25 ms 5180 KB Output is correct
3 Execution timed out 7064 ms 4956 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 25 ms 5180 KB Output is correct
3 Execution timed out 7064 ms 4956 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Runtime error 90 ms 35868 KB Execution killed with signal 11
3 Halted 0 ms 0 KB -