제출 #536056

#제출 시각아이디문제언어결과실행 시간메모리
536056browntoadOlympic Bus (JOI20_ho_t4)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #pragma GCC optimize ("Ofast", "unroll-loops") using namespace std; #define ll long long #define int ll #define FOR(i,a,b) for (int i = (a); i<(b); i++) #define REP(i,n) FOR(i,0,n) #define REP1(i,n) FOR(i,1,n+1) #define RREP(i,n) for (int i=(n)-1; i>=0; i--) #define RREP1(i,n) for (int i=(n); i>=1; i--) #define f first #define s second #define pb push_back #define ALL(x) x.begin(),x.end() #define SZ(x) (int)(x.size()) #define SQ(x) (x)*(x) #define pii pair<int, int> #define pdd pair<double ,double> #define pcc pair<char, char> #define endl '\n' //#define TOAD #ifdef TOAD #define bug(x) cerr<<__LINE__<<": "<<#x<<" is "<<x<<endl #define IOS() #else #define bug(...) #define IOS() ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) #endif const ll inf = 1ll<<60; const int iinf=2147483647; const ll mod = 1e9+7; const ll maxn=1005; const double PI=acos(-1); ll pw(ll x, ll p, ll m=mod){ ll ret=1; while (p>0){ if (p&1){ ret*=x; ret%=m; } x*=x; x%=m; p>>=1; } return ret; } ll inv(ll a, ll m=mod){ return pw(a,m-2); } //======================================================================================= struct edge{ int u, v; int c, d; }; vector<edge> graph[maxn]; vector<edge> e(maxn); vector<bool> seen(maxn); int dijsktra(int st, int en, int ban){ // ban is banned id; priority_queue<pii> } signed main (){ IOS(); int n,m; cin>>n>>m; REP(i, m){ cin>>e[i].u>>e[i].v>>e[i].c>>e[i].d; e[i].id=i; graph[e[i].u].pb({e[i].v, e[i].u, e[i].c, e[i].d}); graph[e[i].v].pb(e[i]); } REP(i, m){ } }

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

ho_t4.cpp: In function 'long long int dijsktra(long long int, long long int, long long int)':
ho_t4.cpp:65:1: error: expected unqualified-id before '}' token
   65 | }
      | ^
ho_t4.cpp:65:1: warning: no return statement in function returning non-void [-Wreturn-type]
ho_t4.cpp: In function 'int main()':
ho_t4.cpp:71:14: error: '__gnu_cxx::__alloc_traits<std::allocator<edge>, edge>::value_type' {aka 'struct edge'} has no member named 'id'; did you mean 'd'?
   71 |         e[i].id=i;
      |              ^~
      |              d