problem :https://www.spoj.com/submit/SUBSUMS/
Spoj giving wrong answer…what can be the problem ,i have checked my code many times but didnt find any. What is wrong with the code ?
Spoj not accepting
its your solution and its working now.
i just added 0 to both the v1 and v2 vectors as mentioned in the question.
ios_base:: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #ifndef ONLINE_JUDGE freopen(“input.txt”, “r”, stdin); freopen(“output.txt”, “w”, stdout); #endif
whhat does the above line of code does
ios base includes your speed.
#ifndef ONLINE_JUDGE freopen(“input.txt”, “r”, stdin); freopen(“output.txt”, “w”, stdout); #endif
this actually takes input from input .txt file and writes output to output.txt file.
it desnt do anything to logic , ignore it.