#include <vector>
#include <iostream>
#include <iterator>
#include <algorithm>
using namespace std;
int main() {
vector<char> v = vector<char>(istream_iterator<char>(cin),istream_iterator<char>());
if(!v.empty()) {
sort(begin(v), end(v));
cout << "{";
copy(begin(v), end(v) - 1, ostream_iterator<char>(cout, ", "));
cout << v.back();
cout << "}";
}
}
The missing punctuation thread
What about:
I give you my reply, in Whitespace:
Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]
What about:
#include <vector>
#include <iostream>
#include <iterator>
#include <algorithm>
using namespace std;
int main() {
vector<char> v = vector<char>(istream_iterator<char>(cin),istream_iterator<char>());
if(!v.empty()) {
sort(begin(v), end(v));
cout << "{";
copy(begin(v), end(v) - 1, ostream_iterator<char>(cout, ", "));
cout << v.back();
cout << "}";
}
}
WINNAR.
/thread
[quote name='rip-off' timestamp='1321560527' post='4885081']
What about:
#include <vector>
#include <iostream>
#include <iterator>
#include <algorithm>
using namespace std;
int main() {
vector<char> v = vector<char>(istream_iterator<char>(cin),istream_iterator<char>());
if(!v.empty()) {
sort(begin(v), end(v));
cout << "{";
copy(begin(v), end(v) - 1, ostream_iterator<char>(cout, ", "));
cout << v.back();
cout << "}";
}
}
WINNAR.
/thread
[/quote]
Not yet, that's only half the game (and dang impressive for that matter)! The other half is solving the rest of your post...
::quits::
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]
The other half is solving the rest of your post...
Challenge accepted!
<thread>
Does someone keep posting to this thread and then quickly delete their posts? It keeps floating up to the top and when I check it there's nothing new. Right now Active Content says the last post was made "Today, 02:29 PM" by fastcall22. Hist post was made yesterday at 2:10pm though...
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement