0_0_21888835_20572.cpp: In function 'int main()': 0_0_21888835_20572.cpp:21:4: error: 'ans' was not declared in this scope ans += qs[i].r - qs[i].l; ^