# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
912395 | 2024-01-19T11:50:01 Z | vjudge1 | Rabbit Carrot (LMIO19_triusis) | C++17 | 1 ms | 600 KB |
#include <bits/stdc++.h> using namespace std; #define int long long #define x first #define y second void solve(){ int last = 0; int n, x; cin>>n>>x; int a[n]; int ans = 0; for(int i = 0; i < n; i++){ cin>>a[i]; if(a[i] - last <= x){ last = a[i]; } else{ last = last + x; ans++; } } cout<<ans<<'\n'; } main(){ int t = 1; //cin>>t; while(t--){ solve(); } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 1 ms | 344 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 1 ms | 348 KB | Output is correct |
9 | Correct | 1 ms | 600 KB | Output is correct |
10 | Correct | 0 ms | 600 KB | Output is correct |
11 | Correct | 1 ms | 348 KB | Output is correct |
12 | Incorrect | 0 ms | 344 KB | Output isn't correct |
13 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 1 ms | 344 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 1 ms | 348 KB | Output is correct |
9 | Correct | 1 ms | 600 KB | Output is correct |
10 | Correct | 0 ms | 600 KB | Output is correct |
11 | Correct | 1 ms | 348 KB | Output is correct |
12 | Incorrect | 0 ms | 344 KB | Output isn't correct |
13 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 1 ms | 344 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 1 ms | 348 KB | Output is correct |
9 | Correct | 1 ms | 600 KB | Output is correct |
10 | Correct | 0 ms | 600 KB | Output is correct |
11 | Correct | 1 ms | 348 KB | Output is correct |
12 | Incorrect | 0 ms | 344 KB | Output isn't correct |
13 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 1 ms | 344 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 1 ms | 348 KB | Output is correct |
9 | Correct | 1 ms | 600 KB | Output is correct |
10 | Correct | 0 ms | 600 KB | Output is correct |
11 | Correct | 1 ms | 348 KB | Output is correct |
12 | Incorrect | 0 ms | 344 KB | Output isn't correct |
13 | Halted | 0 ms | 0 KB | - |