Submission #1052102

# Submission time Handle Problem Language Result Execution time Memory
1052102 2024-08-10T11:49:56 Z Szymon_Pilipczuk Rainforest Jumps (APIO21_jumps) C++17
4 / 100
561 ms 1880 KB
#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

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 time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 86 ms 1568 KB Output is correct
4 Correct 560 ms 1880 KB Output is correct
5 Correct 502 ms 1112 KB Output is correct
6 Correct 561 ms 1880 KB Output is correct
7 Correct 410 ms 1368 KB Output is correct
8 Correct 533 ms 1880 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 344 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 344 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 86 ms 1568 KB Output is correct
4 Correct 560 ms 1880 KB Output is correct
5 Correct 502 ms 1112 KB Output is correct
6 Correct 561 ms 1880 KB Output is correct
7 Correct 410 ms 1368 KB Output is correct
8 Correct 533 ms 1880 KB Output is correct
9 Incorrect 1 ms 344 KB Output isn't correct
10 Halted 0 ms 0 KB -