제출 #1052102

#제출 시각아이디문제언어결과실행 시간메모리
1052102Szymon_Pilipczuk밀림 점프 (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; }

컴파일 시 표준 에러 (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...