Submission #934000

#TimeUsernameProblemLanguageResultExecution timeMemory
934000Nika533Dungeons Game (IOI21_dungeons)C++17
11 / 100
7024 ms26540 KiB
#pragma GCC diagnostic warning "-std=c++11" #include <bits/stdc++.h> #include "dungeons.h" #define pb push_back #define f first #define s second #define MOD 1000000007 #define flush fflush(stdout) #define all(x) (x).begin(),(x).end() #define allr(x) (x).rbegin(), (x).rend() #define pii pair<int,int> using namespace std; const int NN=4e5+5,QQ=5e4+5; int N,S[NN],P[NN],W[NN],L[NN]; 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++) { S[i]=s[i]; P[i]=p[i]; W[i]=w[i]; L[i]=l[i]; } } long long simulate(int x, int Z) { long long z=Z; while (x!=N) { if (z>=S[x]) { z+=S[x]; x=W[x]; } else { z+=P[x]; x=L[x]; } } return z; }

Compilation message (stderr)

dungeons.cpp:1:32: warning: '-std=c++11' is not an option that controls warnings [-Wpragmas]
    1 | #pragma GCC diagnostic warning "-std=c++11"
      |                                ^~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...