Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define _test int _TEST; cin>>_TEST; while(_TEST--)
- int main()
- {
- _test
- {
- vector<string> s(8);
- for(auto &e: s) cin>>e;
- string ans = "";
- for(int i=0; i<8; i++)
- {
- for(int j=0; j<8; j++)
- {
- while(i<8 && s[i][j]!='.')
- ans += s[i++][j];
- if(ans != "") break;
- }
- if(ans != "");
- }
- cout<<ans<<"\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment