bridge.cpp:2:9: error: #include expects "FILENAME" or <FILENAME>
#include#inclu <bits/stdc++.h>
^
bridge.cpp: In function 'void solve1()':
bridge.cpp:9:2: error: 'vector' was not declared in this scope
vector<int> L;
^~~~~~
bridge.cpp:9:9: error: expected primary-expression before 'int'
vector<int> L;
^~~
bridge.cpp:13:3: error: 'scanf' was not declared in this scope
scanf("%c %d %c %d\n", &x, &u, &y, &v);
^~~~~
bridge.cpp:14:22: error: 'abs' was not declared in this scope
if (x == y) ans += abs(u-v);
^~~
bridge.cpp:14:22: note: suggested alternative: 'ans'
if (x == y) ans += abs(u-v);
^~~
ans
bridge.cpp:16:4: error: 'L' was not declared in this scope
L.push_back(u);
^
bridge.cpp:20:7: error: 'L' was not declared in this scope
sort(L.begin(), L.end());
^
bridge.cpp:20:2: error: 'sort' was not declared in this scope
sort(L.begin(), L.end());
^~~~
bridge.cpp:20:2: note: suggested alternative: 'short'
sort(L.begin(), L.end());
^~~~
short
bridge.cpp:23:3: error: 'printf' was not declared in this scope
printf("%lld\n", ans);
^~~~~~
bridge.cpp:23:3: note: suggested alternative: 'int'
printf("%lld\n", ans);
^~~~~~
int
bridge.cpp:27:33: error: 'abs' was not declared in this scope
for (int i=0; i<M; i++) ans += abs(L[i] - mid);
^~~
bridge.cpp:27:33: note: suggested alternative: 'ans'
for (int i=0; i<M; i++) ans += abs(L[i] - mid);
^~~
ans
bridge.cpp:29:2: error: 'printf' was not declared in this scope
printf("%lld\n", ans);
^~~~~~
bridge.cpp:29:2: note: suggested alternative: 'int'
printf("%lld\n", ans);
^~~~~~
int
bridge.cpp: In function 'void solve2()':
bridge.cpp:36:2: error: 'vector' was not declared in this scope
vector<int> L;
^~~~~~
bridge.cpp:36:9: error: expected primary-expression before 'int'
vector<int> L;
^~~
bridge.cpp:37:9: error: expected primary-expression before 'int'
vector<int> X;
^~~
bridge.cpp:38:9: error: expected primary-expression before 'int'
vector<int> Y;
^~~
bridge.cpp:42:3: error: 'scanf' was not declared in this scope
scanf("%c %d %c %d\n", &x, &u, &y, &v);
^~~~~
bridge.cpp:43:22: error: 'abs' was not declared in this scope
if (x == y) ans += abs(u-v);
^~~
bridge.cpp:43:22: note: suggested alternative: 'ans'
if (x == y) ans += abs(u-v);
^~~
ans
bridge.cpp:45:4: error: 'L' was not declared in this scope
L.push_back(u);
^
bridge.cpp:47:4: error: 'X' was not declared in this scope
X.push_back(u);
^
bridge.cpp:48:4: error: 'Y' was not declared in this scope
Y.push_back(v);
^
bridge.cpp:51:10: error: 'X' was not declared in this scope
int M = X.size();
^
bridge.cpp:53:3: error: 'printf' was not declared in this scope
printf("%lld\n", ans);
^~~~~~
bridge.cpp:53:3: note: suggested alternative: 'int'
printf("%lld\n", ans);
^~~~~~
int
bridge.cpp:60:19: error: 'L' was not declared in this scope
long long b1 = L[i];
^
bridge.cpp:64:17: error: 'abs' was not declared in this scope
temp += min(abs(X[k]-b1) + abs(Y[k]-b1), abs(X[k]-b2) + abs(Y[k]-b2));
^~~
bridge.cpp:64:17: note: suggested alternative: 'ans'
temp += min(abs(X[k]-b1) + abs(Y[k]-b1), abs(X[k]-b2) + abs(Y[k]-b2));
^~~
ans
bridge.cpp:64:36: error: 'Y' was not declared in this scope
temp += min(abs(X[k]-b1) + abs(Y[k]-b1), abs(X[k]-b2) + abs(Y[k]-b2));
^
bridge.cpp:64:13: error: 'min' was not declared in this scope
temp += min(abs(X[k]-b1) + abs(Y[k]-b1), abs(X[k]-b2) + abs(Y[k]-b2));
^~~
bridge.cpp:66:12: error: 'min' was not declared in this scope
cross = min(cross, temp);
^~~
bridge.cpp:70:2: error: 'Y' was not declared in this scope
Y.clear();
^
bridge.cpp:71:2: error: 'L' was not declared in this scope
L.clear();
^
bridge.cpp:74:2: error: 'printf' was not declared in this scope
printf("%lld\n", ans);
^~~~~~
bridge.cpp:74:2: note: suggested alternative: 'int'
printf("%lld\n", ans);
^~~~~~
int
bridge.cpp: In function 'int main()':
bridge.cpp:78:2: error: 'scanf' was not declared in this scope
scanf("%d%d\n", &K, &N);
^~~~~