UVA 12527 - Different Digits

Problem PDF

Solution:

#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define ll long long
#define sc scanf
#define pf printf
#define pi 2*acos(0.0)
using namespace std;
int f;
void digit(int n)
{
    int j=0,a[100];
    while(n)
    {
        a[j++]=n%10;
        n=n/10;
    }
    f=1;
    for(int i=0;i
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/12527/12527.cpp