Search found 1 match

by Zvid
Sat Jul 26, 2008 1:37 pm
Forum: Volume 100 (10000-10099)
Topic: 10098 - Generating Fast
Replies: 62
Views: 21663

Re: 10098 - Generating Fast, Sorted Permutation

I'm getting TLE in this problem. Can anyone help me?

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

int main () {
int t;
cin >> t;
for (int i = 0; i < t; ++i) {
string s;
cin >> s;
sort(s.begin(),s.end());
do {
cout << s << endl;
} while (next_permutation ...

Go to advanced search