Last active
December 25, 2015 00:09
-
-
Save berkus/6885757 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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