답안 #1052102

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1052102 2024-08-10T11:49:56 Z Szymon_Pilipczuk 밀림 점프 (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)
      |         ~~~^~~
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -