제출 #570227

#제출 시각아이디문제언어결과실행 시간메모리
570227ChrisM2309도로 폐쇄 (APIO21_roads)C++14
컴파일 에러
0 ms0 KiB
#include "roads.h" #include <bits/stdc++.h> using namespace std; typedef pair<int,int> ii; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<vi> vvi; typedef vector<ii> vii; typedef vector<vii> wgraf; typedef pair<int,ii> edge; #define UNVISITED 0 #define VISITED 1 #define INF 1000000000 #define pb push_back #define F first #define S second #define all(x) (x).begin(), (x).end() std::vector<long long> minimum_closure_costs(int N, std::vector<int> U, std::vector<int> V, std::vector<int> W) { vector<ll> ans; sort(all(W)); ll sum = 0; for (auto i : W){ sum += i; ans.pb(sum) } reverse(all(ans)); `return ans; }

컴파일 시 표준 에러 (stderr) 메시지

roads.cpp:32:3: error: stray '`' in program
   32 |   `return ans;
      |   ^
roads.cpp: In function 'std::vector<long long int> minimum_closure_costs(int, std::vector<int>, std::vector<int>, std::vector<int>)':
roads.cpp:29:14: error: expected ';' before '}' token
   29 |   ans.pb(sum)
      |              ^
      |              ;
   30 |  }
      |  ~