Submission #1052102

#TimeUsernameProblemLanguageResultExecution timeMemory
1052102Szymon_PilipczukRainforest Jumps (APIO21_jumps)C++17
4 / 100
561 ms1880 KiB
#include "jumps.h" #include <algorithm> #include <vector> using namespace std; int a[200000]; int t1 = 1; void init(int N, std::vector<int> H) { for(int i = 0;i<N;i++) { if (i+1 != H[i]) { t1 = 0; } } } int minimum_jumps(int A, int B, int C, int D) { if (t1 = 1) { return C-B; } return 0; }

Compilation message (stderr)

jumps.cpp: In function 'int minimum_jumps(int, int, int, int)':
jumps.cpp:20:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   20 |     if (t1 = 1)
      |         ~~~^~~
#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...