Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main()
{
long int N,K,arr[100000],i,j,ctr=0;
scanf("%d%d",&N,&K);