#include<bits/stdc++.h>
using namespace std;
#define lalala ios_base::sync_with_stdio(false);cin.tie(NULL);
#define endl "\n"
#define ll long long
#define pb push_back
int main(){
int n,m;
cin>>n>>m;
ll int bir[n+m-1],iki[n+m-1];
ll int cev=0;
for(int i=0;i<m+n-1;i++){
cin>>bir[i];
}
for(int i=0;i<n+m-1;i++){
cin>>iki[i];
}
for(int i=0;i<n+m-1;i++){
cev+=min(bir[i],iki[n+m-2-i]);
}
cout<<cev<<endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
106 ms |
3412 KB |
Output is correct |
2 |
Correct |
109 ms |
7240 KB |
Output is correct |
3 |
Correct |
109 ms |
7232 KB |
Output is correct |
4 |
Correct |
145 ms |
7484 KB |
Output is correct |
5 |
Correct |
116 ms |
7616 KB |
Output is correct |
6 |
Correct |
97 ms |
6604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
235 ms |
6532 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |