From 3b85de2ea776a695de6662d0801708682d29039d Mon Sep 17 00:00:00 2001 From: ShazidMahsrafi Date: Thu, 27 Jul 2023 03:23:03 +0600 Subject: [PATCH] initial commit --- 1850C Word on the Paper/1850C.cpp | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 1850C Word on the Paper/1850C.cpp diff --git a/1850C Word on the Paper/1850C.cpp b/1850C Word on the Paper/1850C.cpp new file mode 100644 index 0000000..fffa47f --- /dev/null +++ b/1850C Word on the Paper/1850C.cpp @@ -0,0 +1,36 @@ +#include +using namespace std; +using ll = long long; + +void solve() +{ + vector v; + for (int i = 0; i < 8; ++i) + { + string s; + cin >> s; + v.push_back(s); + } + string s; + for (int i = 0; i < 8; ++i) + { + for (int j = 0; j < 8; ++j) + { + if(v[i][j]!='.') + s+=v[i][j]; + } + } + cout << s << endl; +} + +int main() +{ + ios_base::sync_with_stdio(false); + cin.tie(nullptr); + + int TC = 1; + cin >> TC; + cin.ignore(); + while (TC--) + solve(); +} \ No newline at end of file