My issue
My code
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int n;
std::cin >> n;
int temp[n];
for(int i=0;i<n;i++)
{
int n,m;
cin>>n>>m;
temp[i]=n-m;
}
sort(temp, temp+n);
if(abs(temp[0])>temp[n-1])std::cout << " "<< 2 <<abs(temp[0]) <<std::endl;
else std::cout << 1 <<" "<< temp[n-1]<< std::endl;
}
Problem Link: TLG Problem - CodeChef