rail.cpp:103:1: warning: "/*" within comment [-Wcomment]
103 | /**/
|
rail.cpp:268:1: warning: "/*" within comment [-Wcomment]
268 | /*
|
rail.cpp: In function 'void findLocation(int, int, int*, int*)':
rail.cpp:127:5: error: 'class std::vector<std::pair<int, int> >' has no member named 'pb'
127 | z.pb(mp(dist[0][i], i));
| ^~
rail.cpp:127:8: error: 'mp' was not declared in this scope
127 | z.pb(mp(dist[0][i], i));
| ^~
rail.cpp:130:2: error: 'll' was not declared in this scope; did you mean 'le'?
130 | ll L = first, Lid = 0;
| ^~
| le
rail.cpp:131:4: error: expected ';' before 'R'
131 | ll R = first + z[0].f, Rid = z[0].s;
| ^~
| ;
rail.cpp:132:11: error: 'Rid' was not declared in this scope
132 | location[Rid] = R;
| ^~~
rail.cpp:132:18: error: 'R' was not declared in this scope
132 | location[Rid] = R;
| ^
rail.cpp:135:4: error: 'class std::vector<int>' has no member named 'pb'
135 | C.pb(Lid);
| ^~
rail.cpp:135:7: error: 'Lid' was not declared in this scope
135 | C.pb(Lid);
| ^~~
rail.cpp:136:4: error: 'class std::vector<int>' has no member named 'pb'
136 | D.pb(Rid);
| ^~
rail.cpp:139:6: error: expected ';' before 'a'
139 | ll a = z[j].f;
| ^~
| ;
rail.cpp:140:6: error: expected ';' before 'b'
140 | ll b = get(Rid, z[j].s);
| ^~
| ;
rail.cpp:141:6: error: expected ';' before 'pos'
141 | ll pos = R - b;
| ^~~~
| ;
rail.cpp:142:6: error: expected ';' before 'pos1'
142 | ll pos1 = R - b;// type C
| ^~~~~
| ;
rail.cpp:143:6: error: expected ';' before 'pos2'
143 | ll pos2 = L + a;// type D
| ^~~~~
| ;
rail.cpp:144:6: error: expected ';' before 'ind'
144 | ll ind = -1, bliz = 1e9;
| ^~~~
| ;
rail.cpp:145:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
145 | for(int j = 0; j < D.size(); j++) {
| ~~^~~~~~~~~~
rail.cpp:146:25: error: 'pos1' was not declared in this scope
146 | if(location[D[j]] > pos1) {
| ^~~~
rail.cpp:147:9: error: 'bliz' was not declared in this scope
147 | if(bliz > location[D[j]]) {
| ^~~~
rail.cpp:149:7: error: 'ind' was not declared in this scope; did you mean 'int'?
149 | ind = j;
| ^~~
| int
rail.cpp:153:7: error: 'ind' was not declared in this scope; did you mean 'int'?
153 | if(ind == Rid) {
| ^~~
| int
rail.cpp:154:13: error: 'L' was not declared in this scope
154 | if((R - L) + b == a) {
| ^
rail.cpp:154:18: error: 'b' was not declared in this scope
154 | if((R - L) + b == a) {
| ^
rail.cpp:154:23: error: 'a' was not declared in this scope
154 | if((R - L) + b == a) {
| ^
rail.cpp:155:20: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
155 | location[z[j].s] = pos1;
| ^
rail.cpp:155:25: error: 'pos1' was not declared in this scope
155 | location[z[j].s] = pos1;
| ^~~~
rail.cpp:156:17: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
156 | stype[z[j].s] = 1;
| ^
rail.cpp:157:8: error: 'class std::vector<int>' has no member named 'pb'
157 | C.pb(z[j].s);
| ^~
rail.cpp:157:16: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
157 | C.pb(z[j].s);
| ^
rail.cpp:159:28: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
159 | L = pos1, Lid = z[j].s;
| ^
rail.cpp:161:20: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
161 | location[z[j].s] = pos2;
| ^
rail.cpp:161:25: error: 'pos2' was not declared in this scope
161 | location[z[j].s] = pos2;
| ^~~~
rail.cpp:162:17: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
162 | stype[z[j].s] = 2;
| ^
rail.cpp:163:8: error: 'class std::vector<int>' has no member named 'pb'
163 | D.pb(z[j].s);
| ^~
rail.cpp:163:16: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
163 | D.pb(z[j].s);
| ^
rail.cpp:165:28: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
165 | R = pos2, Rid = z[j].s;
| ^
rail.cpp:170:7: error: expected ';' before 'di'
170 | ll di = get(ind, z[j].s);
| ^~~
| ;
rail.cpp:171:8: error: 'di' was not declared in this scope; did you mean 'div'?
171 | if(di + dist[0][ind] == dist[0][z[j].s]) {
| ^~
| div
rail.cpp:171:42: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
171 | if(di + dist[0][ind] == dist[0][z[j].s]) {
| ^
rail.cpp:172:20: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
172 | location[z[j].s] = pos1;
| ^
rail.cpp:172:25: error: 'pos1' was not declared in this scope
172 | location[z[j].s] = pos1;
| ^~~~
rail.cpp:173:17: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
173 | stype[z[j].s] = 1;
| ^
rail.cpp:174:8: error: 'class std::vector<int>' has no member named 'pb'
174 | C.pb(z[j].s);
| ^~
rail.cpp:174:16: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
174 | C.pb(z[j].s);
| ^
rail.cpp:175:16: error: 'L' was not declared in this scope
175 | if(pos1 < L)
| ^
rail.cpp:176:28: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
176 | L = pos1, Lid = z[j].s;
| ^
rail.cpp:178:20: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
178 | location[z[j].s] = pos2;
| ^
rail.cpp:178:25: error: 'pos2' was not declared in this scope
178 | location[z[j].s] = pos2;
| ^~~~
rail.cpp:179:17: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
179 | stype[z[j].s] = 2;
| ^
rail.cpp:180:8: error: 'class std::vector<int>' has no member named 'pb'
180 | D.pb(z[j].s);
| ^~
rail.cpp:180:16: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
180 | D.pb(z[j].s);
| ^
rail.cpp:182:28: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
182 | R = pos2, Rid = z[j].s;
| ^
rail.cpp:186:6: error: expected ';' before 'd1'
186 | ll d1 = get(Lid, z[j].s);
| ^~~
| ;
rail.cpp:187:6: error: expected ';' before 'd2'
187 | ll d2 = get(Rid, z[j].s);
| ^~~
| ;
rail.cpp:188:6: error: expected ';' before 'pos1'
188 | ll pos1 = L + d1;// type D
| ^~~~~
| ;
rail.cpp:189:6: error: expected ';' before 'pos2'
189 | ll pos2 = R - d2;// type C
| ^~~~~
| ;
rail.cpp:191:7: error: 'pos1' was not declared in this scope
191 | if(pos1 < R) {
| ^~~~
rail.cpp:193:75: error: 'd2' was not declared in this scope
193 | if(location[u] < pos1 && (pos1 - location[u]) + (R - location[u]) == d2)
| ^~
rail.cpp:197:20: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
197 | location[z[j].s] = pos1;
| ^
rail.cpp:198:17: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
198 | stype[z[j].s] = 2;
| ^
rail.cpp:199:8: error: 'class std::vector<int>' has no member named 'pb'
199 | D.pb(z[j].s);
| ^~
rail.cpp:199:16: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
199 | D.pb(z[j].s);
| ^
rail.cpp:202:21: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
202 | location[z[j].s] = pos2;
| ^
rail.cpp:202:26: error: 'pos2' was not declared in this scope
202 | location[z[j].s] = pos2;
| ^~~~
rail.cpp:203:18: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
203 | stype[z[j].s] = 1;
| ^
rail.cpp:204:9: error: 'class std::vector<int>' has no member named 'pb'
204 | C.pb(z[j].s);
| ^~
rail.cpp:204:17: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
204 | C.pb(z[j].s);
| ^
rail.cpp:208:7: error: 'pos2' was not declared in this scope
208 | if(pos2 > L) {
| ^~~~
rail.cpp:208:14: error: 'L' was not declared in this scope
208 | if(pos2 > L) {
| ^
rail.cpp:210:75: error: 'd1' was not declared in this scope; did you mean 'y1'?
210 | if(location[u] > pos2 && (location[u] - pos2) + (location[u] - L) == d1)
| ^~
| y1
rail.cpp:214:21: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
214 | location[z[j].s] = pos2;
| ^
rail.cpp:215:18: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
215 | stype[z[j].s] = 1;
| ^
rail.cpp:216:9: error: 'class std::vector<int>' has no member named 'pb'
216 | C.pb(z[j].s);
| ^~
rail.cpp:216:17: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
216 | C.pb(z[j].s);
| ^
rail.cpp:219:20: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
219 | location[z[j].s] = pos1;
| ^
rail.cpp:219:25: error: 'pos1' was not declared in this scope
219 | location[z[j].s] = pos1;
| ^~~~
rail.cpp:220:17: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
220 | stype[z[j].s] = 2;
| ^
rail.cpp:221:8: error: 'class std::vector<int>' has no member named 'pb'
221 | D.pb(z[j].s);
| ^~
rail.cpp:221:16: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
221 | D.pb(z[j].s);
| ^
rail.cpp:225:21: error: 'L' was not declared in this scope
225 | if(location[0] - L + dist[0][z[j].s] == d1) {
| ^
rail.cpp:225:38: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
225 | if(location[0] - L + dist[0][z[j].s] == d1) {
| ^
rail.cpp:225:44: error: 'd1' was not declared in this scope; did you mean 'y1'?
225 | if(location[0] - L + dist[0][z[j].s] == d1) {
| ^~
| y1
rail.cpp:226:28: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
226 | if(d1 - (location[z[0].s] - L) + (R - location[z[0].s]) == d2) {
| ^
rail.cpp:226:57: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
226 | if(d1 - (location[z[0].s] - L) + (R - location[z[0].s]) == d2) {
| ^
rail.cpp:226:64: error: 'd2' was not declared in this scope
226 | if(d1 - (location[z[0].s] - L) + (R - location[z[0].s]) == d2) {
| ^~
rail.cpp:227:20: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
227 | location[z[j].s] = pos1;
| ^
rail.cpp:227:25: error: 'pos1' was not declared in this scope
227 | location[z[j].s] = pos1;
| ^~~~
rail.cpp:228:17: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
228 | stype[z[j].s] = 2;
| ^
rail.cpp:229:8: error: 'class std::vector<int>' has no member named 'pb'
229 | D.pb(z[j].s);
| ^~
rail.cpp:229:16: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
229 | D.pb(z[j].s);
| ^
rail.cpp:231:20: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
231 | location[z[j].s] = pos2;
| ^
rail.cpp:231:25: error: 'pos2' was not declared in this scope
231 | location[z[j].s] = pos2;
| ^~~~
rail.cpp:232:17: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 's'
232 | stype[z[j].s] = 1;
| ^
rail.cpp: