Maximum integral co | C ++ program to find maximum integral points such that distances between any two is not integer . ; Making set of coordinates such that any two points are non - integral distance apart ; used to avoid duplicates in result ; Driver function
#include <bits/stdc++.h> NEW_LINE using namespace std ; void printSet ( int x , int y ) { set < pair < int , int > > arr ; for ( int i = 0 ; i <= min ( x , y ) ; i ++ ) { pair < int , int > pq ; pq = make_pair ( i , min ( x , y ) - i ) ; arr . insert ( pq ) ; } for ( auto it = arr . begin ( ) ; it != arr . end ( ) ; it ++ ) cout << ( * it ) . first << " ▁ " << ( * it ) . second << endl ; } int main ( ) { int x = 4 , y = 4 ; printSet ( x , y ) ; return 0 ; }