Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- #include <cstring>
- using namespace std;
- char s[5001];
- int t;
- int main() {
- freopen("data.in", "r", stdin);
- freopen("data.out", "w", stdout);
- cin >> t;
- cin.get();
- for (int i = 0; i < t; i++) {
- cin.getline(s, 5001);
- if (!strchr(s, '#')) {
- cout << "Draw" << endl;
- } else {
- char *p;
- p = strrchr(s, '.');
- char *c;
- c = strtok(p+1, " ");
- c = strtok(NULL, " ");
- if (c) cout << "Second" << endl;
- else cout << "First" << endl;
- }
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment