Submission #577794

# Submission time Handle Problem Language Result Execution time Memory
577794 2022-06-15T09:10:58 Z dozer Colouring a rectangle (eJOI19_colouring) C++14
10 / 100
124 ms 13696 KB
#include <bits/stdc++.h>
using namespace std;
#define sp " "
#define endl "\n"
#define pb push_back
#define pii pair<int, int>
#define st first
#define nd second
#define fileio() freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout)
#define fastio() cin.tie(0), ios_base::sync_with_stdio(0)
#define N 200005
#define int long long


int arr[3][N];

int32_t main()
{
	fastio();


	int n, m;
	cin>>n>>m;
	for (int j = 0; j < 2; j++)
		for (int i = 1; i <= n + m - 1; i++) cin>>arr[j][i];

	int ans = 0;
	for (int i = 1; i <= n + m - 1; i++)
	{
		//cout<<arr[0][i]<<sp<<arr[1][n + m - i]<<endl;
		ans += min(arr[0][i], arr[1][n + m - i]);
	}
	cout<<ans<<endl;

	cerr<<"time taken: "<<(float)clock() / CLOCKS_PER_SEC<<" seconds\n";
	return 0; 
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 52 ms 7256 KB Output is correct
2 Correct 51 ms 7316 KB Output is correct
3 Correct 46 ms 7200 KB Output is correct
4 Correct 62 ms 7500 KB Output is correct
5 Correct 61 ms 7700 KB Output is correct
6 Correct 41 ms 6644 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 124 ms 13696 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -