UVA 10098 - Generating Fast

UVA Aug 31, 2020

Problem PDF

Solution:

#include
#include
#include
using namespace std;
int main()
{
    char a[20];
	int n,t,k;
	scanf ("%d", &t);
	while (t--)
	{
	    scanf("%s",a);
	    n=strlen(a);
	    if(n>10)
	    break;
	    sort(a,a+n);
	    puts(a);
        while(next_permutation (a,a+n))
        puts(a);
        printf("\n");
	}
    return 0;
}
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/10098/10098.cpp

Tags

Shipu Ahamed

CSPO® | Partly Product, Project Manager and Partly Software Engineer.

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.