답안 #870009

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
870009 2023-11-06T15:04:20 Z melody_rules Rabbit Carrot (LMIO19_triusis) C++17
0 / 100
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  long long int n=0;
  long long int m=0;
  long long int a=0;
  long long int i=0;
   long long int tot=0;
  
  cin>>n>>m;
  long long int arr[n];
  
  for(i=0;i<n;i++) {
    cin>>a;
    arr[i]=a;
  }
  
  a=0;
  for(i=0;i<n;i++) {
    if((m+a) < arr[i]) {
      a=arr[i];
      tot++;
    }
    
    a=arr[i];
  }
  
  cout<<tot<<endl;
  
  return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Incorrect 0 ms 348 KB Output isn't correct
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Incorrect 0 ms 348 KB Output isn't correct
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Incorrect 0 ms 348 KB Output isn't correct
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Incorrect 0 ms 348 KB Output isn't correct
8 Halted 0 ms 0 KB -