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 is not true of efs
Lemur [1.5K]

Answer:

EFS cannot store files encrypted.

Explanation:

EFS) is a feature introduced in version 3.0 of NTFS that provides filesystem-level encryption. EFS is useful for mobile computer users, whose computer are subject to physical theft, and for storing highly sensitive data. Encryption itself is the method where the information is converted into secret code that hides the information's true meaning. (EFS) is used to encrypt files and folders. EFS is easy to use, with nothing more than a check box in a file’s properties. It is not fully supported on Windows 7 Starter, Windows 7 Home Basic, and Windows 7 Home Premium!

3 0
3 years ago
5. ADD A STATEMENT OR STATEMENTS to the program on the following page (including constant and/or variable declarations if you wa
kvasek [131]

Answer:

C code is explained below

Explanation:

#include <stdio.h>

int main() { /* main */

/*

      **********************************************************

      * Declaration Section

      **********************************************************

      *

      * Named Constants

      */

  const int bits_per_byte = 8;

  const int attention_span_in_seconds = 3;

  /*

  * You can insert stuff after this comment.

*/

/*

* Local variables

*/

  int modem_send_speed_in_bits_per_second = 56000;

  int script_file_length_in_bytes = 28000;

  int seconds_to_send_script_file;

  /*

  * You can insert stuff after this comment.

*/

/*

      **********************************************************

      * Execution Section

      **********************************************************

      *

      * You can insert stuff after this comment.

*/

  seconds_to_send_script_file =

      (script_file_length_in_bytes * bits_per_byte) /

      modem_send_speed_in_bits_per_second;

  if (attention_span_in_seconds < seconds_to_send_script_file)

      printf("1\n");

  else printf("0\n");

} /* main */

4 0
3 years ago
Biography of bill gates
Juliette [100K]

Answer:

Bill Gates is a technologist, business pioneer, and altruist. He experienced childhood in Seattle, Washington, with a stunning and steady family who empowered his enthusiasm for PCs at an early age. He dropped out of school to begin Microsoft with his beloved companion Paul Allen. He wedded Melinda French in 1994 and they have three kids. Today, Bill and Melinda Gates co-seat the beneficent establishment bearing their names and are cooperating to give their riches back to society.  

Bill experienced childhood in Seattle with his two sisters. His father, William H. Doors II, is a Seattle lawyer and one of the co-seats of the Bill and Melinda Gates Foundation. His late mother, Mary Gates, was a teacher, University of Washington official, and executive of United Way International.

Explanation:

This is just a short biography and not a full one.

5 0
3 years ago
Read 2 more answers
While there are a some exceptions such as an if-statement, Scheme has one primary syntax () a) True b) False
aivan3 [116]

Answer:

Hence the answer is False.

Explanation:

While there are some exceptions such as an if-statement, the scheme has one primary syntax (<thing I want to do> <things I want to do it to>).

The given statement is False.

4 0
2 years ago
Ima go to sleep but I ask a favor can u guys go on eBay Amazon and find the cheapest pre bilt that is actually good
katrin2010 [14]

Explanation:

what do specifically want to buy??

8 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following will most likely result in a decrease in population?
    11·2 answers
  • Jason works as an accountant in a department store. He needs to keep a daily record of all the invoices issued by the store. Whi
    13·2 answers
  • Each row in a database is a set of unique information called a(n) (A.)table,(B.)record,(C.)object,(D.)field
    12·2 answers
  • Haley is helping to choose members for a customer satisfaction team. Which
    6·1 answer
  • Given a int variable named callsReceived and another int variable named operatorsOnCall write the necessary code to read values
    13·1 answer
  • Why are free web based providers so popular?
    12·1 answer
  • _____the measuring instrument is not necssery​
    10·1 answer
  • if you were determining what was expected of you simply by looking at media, what messages would you take away?
    8·2 answers
  • Three reasons Why we connect speakers to computers
    15·2 answers
  • The rectangular symbol in flowchart<br> is used to denote dash
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!