# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
896228 | 2024-01-01T03:36:15 Z | Muhammad_Aneeq | 던전 (IOI21_dungeons) | C++17 | 7000 ms | 26928 KB |
#include <vector> #include "dungeons.h" using namespace std; int const N=4e5+10; int wi[N],lo[N],po[N],st[N]; int nn; void init(int n, vector<int> s, vector<int> p, vector<int> w, vector<int> l) { nn=n; for (int i=0;i<n;i++) { wi[i]=w[i]; lo[i]=l[i]; st[i]=s[i]; po[i]=p[i]; } } long long simulate(int i, int z) { long long ans=z; bool w=0; while (i!=nn) { if (z>=st[i]) { z+=st[i]; i=wi[i]; } else { z+=po[i]; i=lo[i]; } } return z; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 4444 KB | Output is correct |
2 | Correct | 1 ms | 4444 KB | Output is correct |
3 | Correct | 1 ms | 4444 KB | Output is correct |
4 | Correct | 17 ms | 7260 KB | Output is correct |
5 | Correct | 1 ms | 4444 KB | Output is correct |
6 | Correct | 16 ms | 7004 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 4444 KB | Output is correct |
2 | Execution timed out | 7048 ms | 26928 KB | Time limit exceeded |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 4440 KB | Output is correct |
2 | Correct | 29 ms | 8632 KB | Output is correct |
3 | Execution timed out | 7097 ms | 8536 KB | Time limit exceeded |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 4440 KB | Output is correct |
2 | Correct | 29 ms | 8632 KB | Output is correct |
3 | Execution timed out | 7097 ms | 8536 KB | Time limit exceeded |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 4440 KB | Output is correct |
2 | Correct | 29 ms | 8632 KB | Output is correct |
3 | Execution timed out | 7097 ms | 8536 KB | Time limit exceeded |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 4444 KB | Output is correct |
2 | Execution timed out | 7048 ms | 26928 KB | Time limit exceeded |
3 | Halted | 0 ms | 0 KB | - |