F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_38286169_11582.cpp:5:20: error: 'vector' does not name a type
 int solution(const vector<int> &A, const vector<int> &B, const vector<int> &C, const vector<int> &D) {
                    ^
0_0_38286169_11582.cpp:5:26: error: expected ',' or '...' before '<' token
 int solution(const vector<int> &A, const vector<int> &B, const vector<int> &C, const vector<int> &D) {
                          ^
0_0_38286169_11582.cpp: In function 'int solution(int)':
0_0_38286169_11582.cpp:7:13: error: 'A' was not declared in this scope
     int N = A.size();
             ^
0_0_38286169_11582.cpp:8:13: error: 'D' was not declared in this scope
     int M = D.size();
             ^
0_0_38286169_11582.cpp:9:5: error: 'vector' was not declared in this scope
     vector<vector<int> > graph;
     ^
0_0_38286169_11582.cpp:9:5: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/queue:61,
                 from 0_0_38286169_11582.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:214:11: note:   'std::vector'
     class vector : protected _Vector_base<_Tp, _Alloc>
           ^
0_0_38286169_11582.cpp:9:19: error: expected primary-expression before 'int'
     vector<vector<int> > graph;
                   ^
0_0_38286169_11582.cpp:10:5: error: 'graph' was not declared in this scope
     graph.resize(M);
     ^
0_0_38286169_11582.cpp:15:21: error: 'B' was not declared in this scope
         graph[A[i]][B[i]] = (graph[A[i]][B[i]] == -1 ? C[i] : min(graph[A[i]][B[i]], C[i]));
                     ^
0_0_38286169_11582.cpp:15:56: error: 'C' was not declared in this scope
         graph[A[i]][B[i]] = (graph[A[i]][B[i]] == -1 ? C[i] : min(graph[A[i]][B[i]], C[i]));
                                                        ^
0_0_38286169_11582.cpp:15:90: error: 'min' was not declared in this scope
         graph[A[i]][B[i]] = (graph[A[i]][B[i]] == -1 ? C[i] : min(graph[A[i]][B[i]], C[i]));
                                                                                          ^
0_0_38286169_11582.cpp:15:90: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/deque:60:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/queue:60,
                 from 0_0_38286169_11582.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:240:5: note:   'std::min'
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
0_0_38286169_11582.cpp:19:12: error: expected primary-expression before 'int'
     vector<int> dist(M, -1);
            ^
0_0_38286169_11582.cpp:20:5: error: 'priority_queue' was not declared in this scope
     priority_queue<pp, vector<pp>, greater<pp> > que;
     ^
0_0_38286169_11582.cpp:20:5: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/queue:64:0,
                 from 0_0_38286169_11582.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:370:11: note:   'std::priority_queue'
     class priority_queue
           ^
0_0_38286169_11582.cpp:4:12: error: 'pair' was not declared in this scope
 #define pp pair<int,int>
            ^
0_0_38286169_11582.cpp:20:20: note: in expansion of macro 'pp'
     priority_queue<pp, vector<pp>, greater<pp> > que;
                    ^
0_0_38286169_11582.cpp:4:12: note: suggested alternative:
 #define pp pair<int,int>
            ^
0_0_38286169_11582.cpp:20:20: note: in expansion of macro 'pp'
     priority_queue<pp, vector<pp>, greater<pp> > que;
                    ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/deque:60,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/queue:60,
                 from 0_0_38286169_11582.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:96:12: note:   'std::pair'
     struct pair
            ^
0_0_38286169_11582.cpp:4:17: error: expected primary-expression before 'int'
 #define pp pair<int,int>
                 ^
0_0_38286169_11582.cpp:20:20: note: in expansion of macro 'pp'
     priority_queue<pp, vector<pp>, greater<pp> > que;
                    ^
0_0_38286169_11582.cpp:21:5: error: 'que' was not declared in this scope
     que.push(make_pair(0, 0));
     ^
0_0_38286169_11582.cpp:21:28: error: 'make_pair' was not declared in this scope
     que.push(make_pair(0, 0));
                            ^
0_0_38286169_11582.cpp:21:28: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/deque:60,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/queue:60,
                 from 0_0_38286169_11582.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:276:5: note:   'std::make_pair'
     make_pair(_T1&& __x, _T2&& __y)
     ^
0_0_38286169_11582.cpp:4:17: error: expected primary-expression before 'int'
 #define pp pair<int,int>
                 ^
0_0_38286169_11582.cpp:23:9: note: in expansion of macro 'pp'
         pp p = que.top();
         ^
0_0_38286169_11582.cpp:25:13: error: 'dist' was not declared in this scope
         if (dist[p.second] == -1) {
             ^
0_0_38286169_11582.cpp:25:18: error: 'p' was not declared in this scope
         if (dist[p.second] == -1) {
                  ^
0_0_38286169_11582.cpp:31:13: error: 'p' was not declared in this scope
         if (p.first <= D[p.second]) return p.first;
             ^
0_0_38286169_11582.cpp:32:35: error: 'p' was not declared in this scope
         for (int i = 0; i < graph[p.second].size(); i++) {
                                   ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-27 00:40:01, Gzip enabled