-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path1.cpp
More file actions
35 lines (25 loc) · 644 Bytes
/
1.cpp
File metadata and controls
35 lines (25 loc) · 644 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <iostream>
#include <vector>
using namespace std;
int main() {
short int t ;
cin >> t ;
while ( t-- ) {
int n ;
cin >> n ;
vector< int > a(n), b(n) ;
for ( auto i = 0 ; i < n ; ++i )
cin >> a[i] ;
for ( auto i = 0 ; i < n ; ++i )
cin >> b[i] ;
int ans = 0 ;
//cout << '\n' ;
for ( auto i = 0 ; i < n ; ++i ) {
int res = a[i]*20 - b[i]*10 ;
//cout << res << '\n' ;
ans = max(res,ans) ;
}
cout << ans << '\n' ;
}
return 0;
}