제출 #754753

#제출 시각아이디문제언어결과실행 시간메모리
754753tolbi던전 (IOI21_dungeons)C++17
컴파일 에러
0 ms0 KiB
#pragma optimize("Bismillahirrahmanirrahim") //█▀█─█──█──█▀█─█─█ //█▄█─█──█──█▄█─█■█ //█─█─█▄─█▄─█─█─█─█ //Allahuekber //ahmet23 orz... //FatihSultanMehmedHan //YavuzSultanSelimHan //AbdulHamidHan //Sani buyuk Osman Pasa Plevneden cikmam diyor. #define author tolbi #include<bits/stdc++.h> using namespace std; template<typename T> vector<int32_t> normalize(vector<T> &rt){vector<int32_t> arr(rt.size());for (int i = 0; i < rt.size(); i++){arr[i]=rt[i];}return arr;} #define endl '\n' #define int long long #define vint(x) vector<int> x #define cinarr(x) for (auto &it : x) cin>>it; #define coutarr(x) for (auto &it : x) cout<<it<<" ";cout<<endl; #define sortarr(x) sort(x.begin(), x.end()) #define sortrarr(x) sort(x.rbegin(), x.rend()) #define rev(x) reverse(x.begin(), x.end()) #define deci(x) int x;cin>>x; #define decstr(x) string x;cin>>x; #define tol(bi) (1LL<<((int)(bi))) #define lsb(x) (x&-x) const int MOD = 1e9+7; const int64_t INF = LONG_LONG_MAX; mt19937 ayahya(chrono::high_resolution_clock().now().time_since_epoch().count()); #include "dungeons.h" vector<vector<int>> st; vector<vector<int>> stc; map<int,vector<vector<int>>> stm; map<int,vector<vector<int>>> stcm; vector<int32_t> s,p,w,l; int n, LOG; vector<pair<int,int>> par; void init(int32_t _n, vector<int32_t> _s, vector<int32_t> _p, vector<int32_t> _w, vector<int32_t> _l) { n=_n+1; s=_s,p=_p,w=_w,l=_l; par.resize(n); for (int i = 0; i < n; ++i) { par[i]={i,0}; } LOG=30; } pair<int,int> find(int node){ if (par[node].first==node) return {node,0}; pair<int,int> pr = find(par[node].first); return par[node]={pr.first,pr.second+par[node].second}; } int64_t simulate(int32_t x, int32_t z) { if (x==n-1) return z; if (find(x).first!=x){ z+=uzk[x]; x=find(x).first; } if (z>=s[x]){ z+=s[x]; par[x]={w[x],s[x]}; x=w[x]; } else { z+=p[x]; x=l[x]; } return simulate(x,z); }

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

dungeons.cpp:1: warning: ignoring '#pragma optimize ' [-Wunknown-pragmas]
    1 | #pragma optimize("Bismillahirrahmanirrahim")
      | 
dungeons.cpp: In function 'int64_t simulate(int32_t, int32_t)':
dungeons.cpp:56:6: error: 'uzk' was not declared in this scope
   56 |   z+=uzk[x];
      |      ^~~