제출 #981622

#제출 시각아이디문제언어결과실행 시간메모리
981622MuhammadSaram도로 폐쇄 (APIO21_roads)C++17
컴파일 에러
0 ms0 KiB
/********************* بسم الله الرحمن الرحيم ***********************/ /******************** ٱلْحَمْدُ لِلَّٰهِ رَبِّ ٱلْعَالَمِينَ *************************/ /******************* Prophet Muhammad صلى الله عليه وسلم ************/ /*********************** وَقُل رَّبِّ زِدْنِي عِلْمًا **************************/ #ifdef ONLINE_JUDGE #pragma GCC optimize("Ofast") #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #else #endif #include <bits/stdc++.h> #include "roads.h" using namespace std; // #define int long long #define endl '\n' #define in binary_search #define ll long long #define ld long double #define Hey ios::sync_with_stdio(false); #define Welcome cin.tie(NULL), cout.tie(NULL); #define all(v) v.begin(),v.end() vector<ll> minimum_closure_costs(int n,vector<int> u,vector<int> v,vector<int> w) { ll su=0; for (int i=0;i<n-1;i++) su+=w[i]; sort(rall(w)); vector<ll> ans; ans.push_back(su); for (int i=0;i<n-1;su-=w[i],i++) ans.push_back(su); return ans; }

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

roads.cpp: In function 'std::vector<long long int> minimum_closure_costs(int, std::vector<int>, std::vector<int>, std::vector<int>)':
roads.cpp:33:7: error: 'rall' was not declared in this scope; did you mean 'all'?
   33 |  sort(rall(w));
      |       ^~~~
      |       all