답안 #72938

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
72938 2018-08-27T09:13:03 Z Navick 전선 연결 (IOI17_wiring) C++17
13 / 100
43 ms 2144 KB
#include <bits/stdc++.h>
#include "wiring.h"

#define F first
#define S second
#define pii pair <int, int>
#define pb push_back

using namespace std;

typedef long long ll;

const int maxN = 210;
const ll oo = 1e16;

ll dp[maxN][maxN];

long long min_total_length(std::vector<int> r, std::vector<int> b) {
	int n = r.size(), m = b.size();
	
	ll ans = 0;
	for (int i=0; i<m; i++) ans += b[i];
	for (int i=0; i<n; i++) ans -= r[i];

	if(n > m)
		ans += (ll)b[0] * (n - m);
	else ans -= (ll)r[n - 1] * (m - n);

	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 248 KB 3rd lines differ - on the 1st token, expected: '25859', found: '-4909'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 484 KB Output is correct
2 Correct 3 ms 492 KB Output is correct
3 Correct 33 ms 1540 KB Output is correct
4 Correct 35 ms 1636 KB Output is correct
5 Correct 30 ms 1636 KB Output is correct
6 Correct 39 ms 2100 KB Output is correct
7 Correct 43 ms 2100 KB Output is correct
8 Correct 36 ms 2144 KB Output is correct
9 Correct 39 ms 2144 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2144 KB Output is correct
2 Incorrect 2 ms 2144 KB 3rd lines differ - on the 1st token, expected: '17703', found: '-19052'
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 2144 KB 3rd lines differ - on the 1st token, expected: '27', found: '12'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 248 KB 3rd lines differ - on the 1st token, expected: '25859', found: '-4909'
2 Halted 0 ms 0 KB -