From 7eb94ca7d1a7891d75918030cc47c88852ed5920 Mon Sep 17 00:00:00 2001 From: AnuragBarfa Date: Mon, 30 Oct 2017 22:00:49 +0530 Subject: [PATCH] created solution for the question solved the problem and written the code --- .../The Last Word\r\n/solutions/solution1" | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 "GoogleCodeJam/2016/Round 1 A/The Last Word\r\n/solutions/solution1" diff --git "a/GoogleCodeJam/2016/Round 1 A/The Last Word\r\n/solutions/solution1" "b/GoogleCodeJam/2016/Round 1 A/The Last Word\r\n/solutions/solution1" new file mode 100644 index 0000000..3c944f3 --- /dev/null +++ "b/GoogleCodeJam/2016/Round 1 A/The Last Word\r\n/solutions/solution1" @@ -0,0 +1,45 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +using namespace std; +typedef long long ll; +typedef pair pii; +#define SZ(x) (int)(x.size()) +#define F0(i,n) for(int i=0;i> tn; + + F1(tt,tn) { + //cerr << tt << endl; + string s; cin >> s; + string q; F0(i, SZ(s)) q = max(s[i] + q, q + s[i]); + printf("Case #%d: ", tt); + cout << q << endl; + } + return 0; +}