답안 #81186

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
81186 2018-10-24T03:59:31 Z GoodTrung 전선 연결 (IOI17_wiring) C++14
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#define fi first
#define se second
#define NAME "wiring"
using namespace std;
typedef long long LL;
typedef pair <int, int> pii;
typedef double DB;
typedef pair <LL, LL> pLL;
const int NMAX = 1e6+7;

int n, m;

LL min_total_length(vector <int> r, vector <int> b) {
    LL res = 0;
    n = r.size();
    m = b.size();
    if(r[n-1] < b[0]) {
        for(int i = 0; i < n; ++i)
            res -= r[i];
        for(int i = 0; i < m; ++i)
            res += b[i];
        res += LL(max(n - m, 0)) * b[0];
        res -= Ll(max(m - n, 0)) * r[n-1];
        return res;
    }
    return -1;
}

Compilation message

wiring.cpp: In function 'LL min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:24:16: error: 'Ll' was not declared in this scope
         res -= Ll(max(m - n, 0)) * r[n-1];
                ^~
wiring.cpp:24:16: note: suggested alternative: 'LL'
         res -= Ll(max(m - n, 0)) * r[n-1];
                ^~
                LL