제출 #722428

#제출 시각아이디문제언어결과실행 시간메모리
722428grossly_overconfident도로 폐쇄 (APIO21_roads)C++17
0 / 100
34 ms3284 KiB
#include <bits/stdc++.h> using namespace std; #define endl '\n' //#define int long long //#define INT_MAX LONG_LONG_MAX vector<long long> minimum_closure_costs(int n, vector<int> u, vector<int> v, vector<int> w){ int op1 = 0, op2 = 0, total = 0; for (int i = 0; i < n; i += 2){ op1 += w[i]; } for (int i = 1; i < n; i += 2){ op2 += w[i]; } for (int i = 0; i < n; ++i){ total += w[i]; } vector<long long> out(n); out[0] = total; out[1] = min(op1, op2); return out; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...