Submission #1083480

#TimeUsernameProblemLanguageResultExecution timeMemory
1083480SamueleVidBeech Tree (IOI23_beechtree)C++17
5 / 100
44 ms6996 KiB
#include <bits/stdc++.h> using namespace std; constexpr int MAXN = 2e5 + 5; constexpr int MAXM = 2e5 + 5; bool sol[MAXN]; vector<int> beechtree(int N, int M, vector<int> P, vector<int> C) { fill(sol, sol + N, 0); vector<int> res(N); int last_used = C[N - 1]; int stronzo = 1e9; bool funzia = 1; for (int i = N - 1; i >= 0; i --) { res[i] = funzia; if (last_used != C[i]) { funzia = 0; } } return res; }

Compilation message (stderr)

beechtree.cpp: In function 'std::vector<int> beechtree(int, int, std::vector<int>, std::vector<int>)':
beechtree.cpp:16:9: warning: unused variable 'stronzo' [-Wunused-variable]
   16 |     int stronzo = 1e9;
      |         ^~~~~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...