What is the significance of the line which pops the last number from the vector v ?

Active In

Competitive Programming

Web Development

Featured Contributions

reply in this discussion

Sir but since there will be two different trees according to f(b) and f(c) which will further branch inteo two and keeps on repeating the same until the string of n length is achieved. So, for that there will be 1*2^1+2*2^2+3*2^3+4*2^4+......n^2*n of size...

Please Sir tell me where I am wrong ?

Read more… (52 words)

reply in this discussion

Sir I don't know but why this question is giving me WA on codechef.com

#include <bits/stdc++.h>using namespace std;int main(){int n;scanf("%d\n",&n);int max=0,m=0,s1=0,s2=0;for(int i=0;i<n;i++){int a,b;cin>>a>>b;s1+=a;s2+=b;if(abs(s1-s2)>max){max=abs(a-b);

Read more… (14 words)

reply in this discussion

Sir how can be there 6 or 7 operations in given matrix multiplication question, I think that there are only 4 operations inside the third nested loop which will the most significant. Hence it will be 4*10000 operations and the question should take around 11 hrs to complete.

Please correct me on this thing.

Read more… (54 words)