Submission #465264

# Submission time Handle Problem Language Result Execution time Memory
465264 2021-08-15T12:37:43 Z Elias Colouring a rectangle (eJOI19_colouring) C++17
0 / 100
64 ms 3404 KB
#include <bits/stdc++.h>

using namespace std;

#define int long long

signed main()
{
	cin.tie(0);
	ios_base::sync_with_stdio(false);

	int n, m;
	cin >> n >> m;

	vector<int> RD = vector<int>(n);
	vector<int> RU = vector<int>(n);

	for (int &x : RD)
		cin >> x;

	for (int &x : RU)
		cin >> x;

	reverse(RU.begin(), RU.end());

	int sol = 0;

	for (int i = 0; i < RD.size(); i++)
		sol += min(RD[i], RU[i]);

	cout << sol;
}

Compilation message

colouring.cpp: In function 'int main()':
colouring.cpp:28:20: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   28 |  for (int i = 0; i < RD.size(); i++)
      |                  ~~^~~~~~~~~~~
# 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 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 64 ms 3404 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 -