20153:补足程序3(next_permutation)
来源:互联网 发布:淘宝怎么出售禁售商品 编辑:程序博客网 时间:2024/05/22 00:29
20153:补足程序3
- 查看
- 提交
- 统计
- 提问
- 总时间限制:
- 1000ms
- 内存限制:
- 65536kB
- 描述
补足下面的程序,使之输出结果是:
213
231
312
321
#include <iostream>#include <algorithm>#include <string> using namespace std;int main(){string s = "132";while (
// 在此处补充你的代码
(s.begin(),s.end())) {cout << s << endl; }return 0;}
- 输入
- 无
- 输出
- 213
231
312
321 - 样例输入
无
- 样例输出
213231312321
- 提示
只填写一个函数名。
注:next_permutation(first,last)
原型:
template <class InIt>
next_permutation(InIt first,InIt last);
求区间内的下一个序列;
所以只需填入此函数名即可;
#include <iostream>#include <algorithm>#include <string> using namespace std;int main(){string s = "132";while (
// 在此处补充你的代码 next_permutation
(s.begin(),s.end())) {cout << s << endl; }return 0;}
#include <iostream>#include <algorithm>#include <string> using namespace std;int main(){string s = "132";while (
// 在此处补充你的代码
(s.begin(),s.end())) {cout << s << endl; }return 0;}
0 0
- 20153:补足程序3(next_permutation)
- 20151:补足程序1
- 20157:补足程序7
- 网络知识补足3
- 20154:补足程序4(虚析构函数)
- 20156:补足程序6(priority_queue)
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- next_permutation
- 修改UITextField placeholder字体颜色
- ubuntu中找jdk的目录方法
- win7/win8通过媒体流(DLNA技术)共享音乐照片和视频
- 问题:encodeURIComponent()
- 灰度变换函数
- 20153:补足程序3(next_permutation)
- Hdu 5446 Unknown Treasure(Lucas+中国剩余定理)
- HDU-1596-find the safest road
- 分布式memcache实现web集群session同步
- HDU 1102 Constructing Roads【简单最小生成树,Prime算法+Kruskal算法】
- eclipse中的.project 和 .classpath文件的具体作用
- C++: 运算符重载(一)、友元函数、链式编程支持
- KMP字符串模式匹配详解
- Ubuntu系统(bluez)蓝牙调试