Hi.
I am getting WA for the first test case, however the solution matches for the second case. Can anybody help me out?
Here is my C++ code:
#include <stdio.h>#include <iostream>using namespace std;int main(){long long int N, H;scanf ("%d %d", &N, &H);long long int arr[N];for (int i = 0; i < N; i++)scanf ("%d", &arr[i]);int x = 1;while (x){int mov, check = 0, isP = 0;scanf ("%d", &mov);
Read more… (28 words)