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--)
- #define ff first
- #define ss second
- #define pb push_back
- #define ppb pop_back
- int main()
- {
- ios_base::sync_with_stdio(false);
- cin.tie(NULL);
- cout.tie(NULL);
- _test
- {
- int n;
- cin>>n;
- vector<int> a(n), b(n);
- for(auto &e: a) cin>>e;
- for(auto &e: b) cin>>e;
- int x=0, y=0;
- int c = 0;
- for(auto e: a)
- {
- if(e > 0) c++;
- else c = 0;
- x = max(x, c);
- }
- c = 0;
- for(auto e: b)
- {
- if(e > 0) c++;
- else c = 0;
- y = max(y, c);
- }
- if(x > y) cout<<"Om\n";
- else if(x == y) cout<<"Draw\n";
- else cout<<"Addy\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment