in Pairwise AND sum problem from school catagory there are sub tasks like Subtask 1 (13 points): N <= 1000, Ai <= 1. Subtask 2 (39 points): N <= 1000, Ai <= 109. Subtask 3 (21 points): N <= 105, Ai <= 1. Subtask 4 (27 points): N <= 105, Ai <= 106. my code is include <stdio.h>int main() { long long int n,i,m,x,j; scanf("%lld", &n); long long int ara[n+1];
} it shows i've only done sub task 2 .. others are not done ... i don't understand why.can anyone plz tell me about this.i am new. asked 23 Jul '14, 17:17

Here your logic is O(n^2) and for n<=10^5 it is definately going to give time limit exceeded. so your 3 and 4 subtasks are TLE'd. So try to optimize your solution. http://www.codechef.com/viewsolution/4369768 here you can see summary of your submission. answered 23 Jul '14, 18:06
