Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- *
- * problem link: https://onlinejudge.org/index.php?option=onlinejudge&Itemid=8&page=show_problem&problem=3922
- *
- * input:
- RAKIBUL
- ANINDYA
- MOSHIUR
- SHIPLU
- KABIR
- SUNNY
- OBAIDA
- WASI
- OBIDAIBKR
- RKAULHISP
- SADIYANNO
- HEISAWHIA
- IRAKIBULS
- MFBINTRNO
- UTOYZIFAH
- LEBSYNUNE
- EMOTIONAL
- * */
- #include <bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define endl '\n'
- #define sz(x) int(x.size())
- #define all(x) x.begin(), x.end()
- int main() {
- ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
- //int n = 8;
- //vector<string> s(n);
- //vector<string> grid(9);
- //
- //for (int i = 0; i < n; i++) {
- // cin >> s[i];
- //}
- //map<string, int> freq;
- //for (int i = 0; i < 9; i++) {
- // cin >> grid[i];
- // for (int j = 0; j < 9; j++) {
- // string sub;
- // for (int k = j; k < 9; k++) {
- // sub += grid[i][k];
- // string tmp = sub;
- // sort(all(tmp));
- // freq[tmp]++;
- // }
- // }
- //}
- //for (int i = 0; i < 9; i++) {
- // for (int j = 0; j < 9; j++) {
- // string sub;
- // for (int k = 0; k < 9; k++) {
- // sub += grid[k][i];
- // string tmp = sub;
- // sort(all(tmp));
- // freq[tmp]++;
- // }
- // }
- //}
- //
- //for (int i = 0; i < n; i++) {
- // string tmp = s[i];
- // sort(all(tmp));
- // if (freq[tmp] == 2) cout << s[i] << endl;
- //}
- printf("KABIR\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement