0_0_17899685_673.cpp: In function 'int main()': 0_0_17899685_673.cpp:81:56: error: 'i' was not declared in this scope int k = lower_bound( b + 1, b + 1 + tmp, a[i] ) - b; ^