Submission #822916

# Submission time Handle Problem Language Result Execution time Memory
822916 2023-08-12T05:04:49 Z Minindu206 Wiring (IOI17_wiring) C++14
0 / 100
1 ms 212 KB
#include "wiring.h"
#include <bits/stdc++.h>
#define ll long long
using namespace std;
long long min_total_length(std::vector<int> r, std::vector<int> b) {
	int n = r.size(), m = b.size();
	ll rmx = r[n - 1];
	ll ans = 0;
	for(int i=0;i<m;i++)
		ans += b[i] - rmx;
	for(int i=0;i<n-1;i++)
		ans += rmx - r[i];
	return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB 3rd lines differ - on the 1st token, expected: '25859', found: '445'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB 3rd lines differ - on the 1st token, expected: '904', found: '889'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 0 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 0 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: '445'
2 Halted 0 ms 0 KB -