Even tuples Solution Codechef

You are given an array AA consisting of NN integers and QQ queries. Each query is described by two integers LL and RR. For each query, output the number of tuples (i,j,k)(i,j,k) such that Li<j<kRL≤i<j<k≤R and Ai+Aj+AkAi+Aj+Ak is an even number.

For each query, output the number of tuples possible as mentioned in the problem statement.

5★soumyadeep_21

6-07-2021

1 secs

50000 Bytes

CPP14, C, JAVA, PYTH 3.6, CPP17, PYTH, PYP3, CS2, ADA, PYPY, TEXT, PAS fpc, NODEJS, RUBY, PHP, GO, HASK, TCL, PERL, SCALA, LUA, kotlin, BASH, JS, LISP sbcl, rust, PAS gpc, BF, CLOJ, R, D, CAML, FORT, ASM, swift, FS, WSPC, LISP clisp, SQL, SCM guile, PERL6, ERL, CLPS, ICK, NICE, PRLG, ICON, COB, SCM chicken, PIKE, SCM qobi, ST, SQLQ, NEM

 

Also read : Coding Solution
Also read : Even tuples Solution Codechef

Leave a Comment