1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nadya68 [22]
2 years ago
12

Write a function solution that given an array a of n integers (between -100 and 100), returns the sign (-1,0,1) of product of al

l the numbers in the array multiplied
Computers and Technology
1 answer:
JulijaS [17]2 years ago
4 0

left[0]=a[0];

for(int i=1;i<=n-1;i++)

   left[i]=(left[i-1]*a[i])%M;

right[n-1]=a[n-1];

for(int i=n-2;i>=0;i--)

   right[i]=(right[i-1]*a[i])%M;

for query q

   if(q==0)

       return right[1]%M;

   if(q==n-1)

       return left[n-2]%M;

   return (left[q-1]*right[q+1])%M;

You might be interested in
What does a pencil icon in the row selector area indicate?
Veronika [31]

Answer:

c

Explanation:

8 0
3 years ago
Yeoo check dis out!!!!!! wait my full vid dont show hol on
kifflom [539]

Answer:

das fire

Explanation:

5 0
3 years ago
Read 2 more answers
Where in the Formula tab on the ribbon would you find the Use in Formula function?
Leviafan [203]

Answer:

In Function library you would find the use in Formula function

5 0
3 years ago
Read 2 more answers
Using Gen/Spec, classes can be organized by using a peer-to-peer inheritanc True/false
Fiesta28 [93]

Answer: True

Explanation: Gen/Spec is the known as the general specification standard for the classes.This standard helps in bringing out the peer-to-peer relations of class.

Gen/Spec is used in class diagram because it helps in the display of the access sharing and class specification in the general form for the required instances.Thus, this standard helps in the enhancement of the class diagram and its inheritance. So, the statement given in the question is true.

5 0
3 years ago
How do I fix this on my HiSense Roku tv this is on Xfinity Stream Beta the error number is -500
yawa3891 [41]

Answer:

it is something that you have to call your nearest xfinity store

i had the same problem but got it fixed

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • Elvis has asked Bonnie out on a date to a baseball game. Elvis is a friend of Bonnie's classmate Ginger and she has met him a fe
    5·2 answers
  • In this question, we give two implementations for the function: def intersection_list(lst1, lst2) This function is given two lis
    15·1 answer
  • Which ofthe following sentence beginnings would be best to use in apersuasive request?
    8·1 answer
  • Assume that the variables v, w, x, y, and z are stored in memory locations 200, 201, 202, 203, and 204, respectively.
    6·1 answer
  • In the context of intentional computer and network threats a ____ is a programming routine built into a system by its designer
    14·2 answers
  • Which sentence is an example of an I-statement?
    6·1 answer
  • the tool that is used on the form to display text that the user cannot change is a. textbox b. label c. button​
    9·1 answer
  • Select the correct answer.
    10·1 answer
  • Which of the following is ture?
    11·1 answer
  • Which backup requires a small amount of space and is considered to have an involved restoration process?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!