/ Vijos /

记录详情

Compile Error

/in/foo.cc:13:1: error: expected ';' after struct definition
 }
 ^
/in/foo.cc: In function 'double distance(int, int)':
/in/foo.cc:15:15: error: 'xtr' was not declared in this scope
  return sqrt((xtr[s] - xtr[e])*(xtr[s] - xtr[e]) + (ytr[s] - ytr[e])*(ytr[s] - ytr[e]))*60/10000;
               ^~~
/in/foo.cc:15:53: error: 'ytr' was not declared in this scope
  return sqrt((xtr[s] - xtr[e])*(xtr[s] - xtr[e]) + (ytr[s] - ytr[e])*(ytr[s] - ytr[e]))*60/10000;
                                                     ^~~
/in/foo.cc: In function 'int dijkstra()':
/in/foo.cc:18:2: error: 'dist' was not declared in this scope
  dist[0] = 0.0;
  ^~~~
/in/foo.cc:20:16: error: 'sx' was not declared in this scope
  pq.push(state(sx, 0.0));
                ^~
/in/foo.cc:21:23: error: 'train' was not declared in this scope
  while(!pq.empty() && train--) { // stations[0] connects with 1 so we need to force it to go further
                       ^~~~~
/in/foo.cc:26:23: error: 'stations' was not declared in this scope
   for (int i = 0; i < stations[u].size(); i++) {
                       ^~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:40:9: error: 'test' was not declared in this scope
  cin >> test;
         ^~~~
/in/foo.cc:42:10: error: 'xtr' was not declared in this scope
   cin >> xtr[0] >> ytr[0] >> xtr[1] >> ytr[1];
          ^~~
/in/foo.cc:42:20: error: 'ytr' was not declared in this scope
   cin >> xtr[0] >> ytr[0] >> xtr[1] >> ytr[1];
                    ^~~
/in/foo.cc:44:3: error: 'stations' was not declared in this scope
   stations[0].pb(mp(1, d));
   ^~~~~~~~
/in/foo.cc:44:25: error: 'mp' was not declared in this scope
   stations[0].pb(mp(1, d));
                         ^
/in/foo.cc:46:3: error: 'train' was not declared in this scope
   train = 2;
   ^~~~~
/in/foo.cc:49:29: error: expected ',' or ';' before '{' token
    istringstream sin(lines) {
                             ^
/in/foo.cc:70:1: error: expected '}' at end of input
 }
 ^
/in/foo.cc:70:1: error: expected '}' at end of input
/in/foo.cc:70:1: error: expected '}' at end of input

信息

递交者
类型
自测
题目
P1000 A+B Problem
语言
C++
递交时间
2019-08-22 15:30:58
评测时间
2019-08-22 15:30:58
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes