#include <bits/stdc++.h>
using namespace std;
long mini(long a, long b) {
if (a<b)return a; else return b;
}
int main() {
int nbLigs, nbCols;
cin >> nbLigs >> nbCols;
long grille[nbCols+1];
for (int iCol = nbCols-1;iCol >= 0; iCol --){
cin >> grille[iCol];
}
for (int iCol = 0; iCol < nbCols; iCol ++){
int a; cin >> a;
grille[iCol] = mini(grille[iCol], a);
}
long somme = 0;
for (int iCol = 0; iCol < nbCols; iCol ++){
somme += grille[iCol];
}
printf("%ld\n",somme);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
181 ms |
5664 KB |
Output is correct |
2 |
Correct |
180 ms |
5656 KB |
Output is correct |
3 |
Correct |
180 ms |
5656 KB |
Output is correct |
4 |
Correct |
182 ms |
5828 KB |
Output is correct |
5 |
Correct |
226 ms |
6036 KB |
Output is correct |
6 |
Correct |
156 ms |
5060 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
189 ms |
6340 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |