Submission #981622

#TimeUsernameProblemLanguageResultExecution timeMemory
981622MuhammadSaramRoad Closures (APIO21_roads)C++17
Compilation error
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; }

Compilation message (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