UVA 146 - ID Codes

UVA Sep 1, 2020

Problem PDF

Solution:

#include
#include
#include
#include
using namespace std;
int main()
{
    char s[100];
    while(gets(s))
    {
        if(s[0]=='#')
        break;
        int l=strlen(s);
        if(next_permutation(s,s+l))
        puts(s);
        else
        printf("No Successor\n");

    }
    return 0;
}
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/146/146.cpp

Tags

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.