Submission #837208

# Submission time Handle Problem Language Result Execution time Memory
837208 2023-08-25T08:07:55 Z Johann Wiring (IOI17_wiring) C++14
0 / 100
14 ms 3020 KB
#include "wiring.h"
#include "bits/stdc++.h"
using namespace std;

typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()

long long min_total_length(std::vector<int> R, std::vector<int> B)
{
	ll ans = 0;
	for (int i = 0; i < sz(R); ++i)
		ans += B.front() - R[i];
	for (int i = 0; i < sz(B); ++i)
		ans += B[i] - R.back();
	ans -= (B.front() - R.back()) * min(sz(R), sz(B));
	return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB 3rd lines differ - on the 1st token, expected: '25859', found: '-4909'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 14 ms 2892 KB Output is correct
4 Incorrect 14 ms 3020 KB 3rd lines differ - on the 1st token, expected: '41599604178272', found: '41603899145568'
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB 3rd lines differ - on the 1st token, expected: '17703', found: '-19052'
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB 3rd lines differ - on the 1st token, expected: '27', found: '12'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB 3rd lines differ - on the 1st token, expected: '25859', found: '-4909'
2 Halted 0 ms 0 KB -