Skip to content

Instantly share code, notes, and snippets.

@berkus
Last active December 25, 2015 00:09
Show Gist options
  • Save berkus/6885757 to your computer and use it in GitHub Desktop.
Save berkus/6885757 to your computer and use it in GitHub Desktop.
#include <algorithm>
#include <locale>
#include <iostream>
using namespace std;
int main()
{
int i = 0;
string s;
while (i++ < 4 and getline(cin, s)) {
if (equal(s.begin(), s.begin() + s.size()/2, s.rbegin())) {
cout << s << endl;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment