zoukankan      html  css  js  c++  java
  • 【水一发next_permutation】poj 1146——ID Codesm

    来源:点击打开链接

    求字典序下一位,没有直接输出没有。全排列函数秒水过。

    #include <iostream>
    #include <algorithm>
    #include <cstring>
    #include <string>
    using namespace std;
    
    int main()
    {
    	int testcase;
    	string tar;
    	while(cin>>tar && tar!="#")
    	{
    		if(next_permutation(tar.begin(),tar.end()))
    		{
    			cout<<tar<<endl;
    		}
    		else
    		{
    			cout<<"No Successor"<<endl;
    		}
    		
    	}
    }


  • 相关阅读:
    border-radius
    border-style
    border-width
    border
    max-width
    min-width
    clip 语法
    left
    z-index
    position
  • 原文地址:https://www.cnblogs.com/riskyer/p/3258080.html
Copyright © 2011-2022 走看看