#include <iostream>
#include <vector>
using namespace std;
int main()
{
int nbLignes, nbColonnes;
cin >> nbLignes >> nbColonnes;
vector<int> grille(nbColonnes + 1, 0);
for (int i = nbColonnes - 1; i >= 0; i --)
{
cin >> grille[i];
}
for (int i = 0; i < nbColonnes; i ++)
{
int a; cin >> a;
grille[i] = min(grille[i], a);
}
long long total = 0;
for (int i = 0; i < nbColonnes; i ++)
{
total += grille[i];
}
cout << total;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
192 ms |
3628 KB |
Output is correct |
2 |
Correct |
184 ms |
3680 KB |
Output is correct |
3 |
Correct |
186 ms |
3616 KB |
Output is correct |
4 |
Correct |
202 ms |
3736 KB |
Output is correct |
5 |
Correct |
235 ms |
3680 KB |
Output is correct |
6 |
Correct |
162 ms |
3652 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
197 ms |
3576 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |