Jojo is given N integers, A 1, A 2, ..., A N by his teacher. His teacher also give him an integer K and 2 M integers, L 1, L 2, ..., L M and R 1, R 2, ..., R M. For each i from 1 to M , his teacher asked him to calculate the sum of multiple of K index numbers from index L i to R i . For example if L i = 3 and R i = 10 and K = 3, then he has to calculate the value of ( A 3 + A 6 + A9). Help him by making the program to calculate it quickly!
Format Input:
The first line consist of three integers, N , M, and K. The second line consist of N integers, A 1, A 2, ..., A N . The next M lines consist of two integers, L i and R i.
Format Output:
Output M lines, the answer for L i and R i , where i is an integer from 1 to M.
Constraints
• 1 ≤ N, M ≤ 105
• 1 ≤ A i ≤ 102 • 1 ≤ K ≤ 10
• 1 ≤ L i ≤ R i ≤ N
Sample Input 1 (standard input):
5 3 2
100 3 1 87 6
1 1
1 5
3 4
Sample Output 1 (standard output):
0
90
87
Note: Use C language, don’t use function./recursive/void.
The input is N,M,K not only N &M.
In: Computer Science
Two cars start from rest at a red stop light. When the light turns green, both cars accelerate forward. The blue car accelerates uniformly at a rate of 3.6 m/s2 for 4.4 seconds. It then continues at a constant speed for 8.2 seconds, before applying the brakes such that the car
In: Physics
What are the principles of management? Include the name, explanation, and reasoning for each of the critical dimensions in your response. Provide examples to convey understanding.
In: Operations Management
Problem 10-01
NPV
A project has an initial cost of $74,950, expected net cash inflows of $14,000 per year for 12 years, and a cost of capital of 11%. What is the project's NPV? (Hint: Begin by constructing a time line.) Do not round your intermediate calculations. Round your answer to the nearest cent.
In: Finance
I have added the MyList.java all the way on the bottom.
Thats all the detail I have for this and what kind of more detail information you need.
Plz Write the program in Java. And Plz post the running program with main and test.Thanks.
Implementing Lists:
Start by carefully reading Listing 24.5: MyLinkedList.java (on page 938 of the 11th Edition of the text). Note that the listing is incomplete. Your assignment is to implement a revised MyLinkedList class after you have included all the code needed to fill in and complete all the methods that were omitted. Next, write a (main) driver program that initializes a linked list with 10 names (your choice), and then completely tests every one of its methods of ensure that the class meets all its requirements.
Listing 24.5
MyLinkedList.java
1 public class MyLinkedList implements MyList {
2 private Node head, tail;
3 private int size = 0; // Number of elements in the list
4
5 /** Create an empty list */
6 public MyLinkedList() {
7 }
8
9 /** Create a list from an array of objects */
10 public MyLinkedList(E[] objects) {
11 for (int i = 0; i < objects.length; i++)
12 add(objects[i]);
13 }
14
15 /** Return the head element in the list */
16 public E getFirst() {
17 if (size == 0) {
18 return null;
19 }
20 else {
21 return head.element;
22 }
23 }
24
25 /** Return the last element in the list */
26 public E getLast() {
27 if (size == 0) {
28 return null;
29 }
30 else {
31 return tail.element;
32 }
33 }
34
35 /** Add an element to the beginning of the list */
36 public void addFirst(E e) {
37 // Implemented in Section 24.4.3.1, so omitted here
38 }
39
40 /** Add an element to the end of the list */
41 public void addLast(E e) {
42 // Implemented in Section 24.4.3.2, so omitted here
43 }
44
45 @Override /** Add a new element at the specified index
46 * in this list. The index of the head element is 0 */
47 public void add(int index, E e) {
48 // Implemented in Section 24.4.3.3, so omitted here
49 }
50
51 /** Remove the head node and
52 * return the object that is contained in the removed node.
*/
53 public E removeFirst() {
54 // Implemented in Section 24.4.3.4, so omitted here
55 }
56
57 /** Remove the last node and
58 * return the object that is contained in the removed node.
*/
59 public E removeLast() {
60 // Implemented in Section 24.4.3.5, so omitted here
61 }
62
63 @Override /** Remove the element at the specified position in
this
64 * list. Return the element that was removed from the list.
*/
65 public E remove(int index) {
66 // Implemented earlier in Section 24.4.3.6, so omitted
67 }
68
69 @Override /** Override toString() to return elements in the list
*/
70 public String toString() {
71 StringBuilder result = new StringBuilder("[");
72
73 Node current = head;
74 for (int i = 0; i < size; i++) {
75 result.append(current.element);
76 current = current.next;
77 if (current != null) {
78 result.append(", "); // Separate two elements with a comma
79 }
80 else {
81 result.append("]"); // Insert the closing ] in the string
82 }
83 }
84
85 return result.toString();
86 }
87
88 @Override /** Clear the list */
89 public void clear() {
90 size = 0;
91 head = tail = null;
92 }
93
94 @Override /** Return true if this list contains the element e
*/
95 public boolean contains(Object e) {
96 // Left as an exercise
97 return true;
98 }
99
100 @Override /** Return the element at the specified index
*/
101 public E get(int index) {
102 // Left as an exercise
103 return null;
104 }
105
106 @Override /** Return the index of the head matching element
in
107 * this list. Return −1 if no match. */
108 public int indexOf(Object e) {
109 // Left as an exercise
110 return 0;
111 }
112
113 @Override /** Return the index of the last matching element
in
114 * this list. Return −1 if no match. */
115 public int lastIndexOf(E e) {
116 // Left as an exercise
117 return 0;
118 }
119
120 @Override /** Replace the element at the specified
position
121 * in this list with the specified element. */
122 public E set(int index, E e) {
123 // Left as an exercise
124 return null;
125 }
126
127 @Override /** Override iterator() defined in Iterable */
128 public java.util.Iterator iterator() {
129 return new LinkedListIterator();
130 }
131
132 private class LinkedListIterator
133 implements java.util.Iterator {
134 private Node current = head; // Current index
135
136 @Override
137 public boolean hasNext() {
138 return (current != null);
139 }
140
141 @Override
142 public E next() {
143 E e = current.element;
144 current = current.next;
145 return e;
146 }
147
148 @Override
149 public void remove() {
150 // Left as an exercise
151 }
152 }
153
154 private static class Node {
155 E element;
156 Node next;
157
158 public Node(E element) {
159 this.element = element;
160 }
161 }
162 }
MyList.java public interface MyList extends java.lang.Iterable { //Add a new element at the end of this list public void add(E e); //Add a new element at the specified index in this list public void add(int index, E e); //Clear the list public void clear(); //Return true if this list contains the element public boolean contains(E e); //Return the element from this list at the specified index public E get(int index); //Return the index of the first matching element in this list. //Return -1 if no match. public int indexOf(E e); /** Return true if this list contains no elements */ public boolean isEmpty(); /** Return the index of the last matching element in this list * Return -1 if no match. */ public int lastIndexOf(E e); /** Remove the first occurrence of the element o from this list. * Shift any subsequent elements to the left. * Return true if the element is removed. */ public boolean remove(E e); /** Remove the element at the specified position in this list * Shift any subsequent elements to the left. * Return the element that was removed from the list. */ public E remove(int index); /** Replace the element at the specified position in this list * with the specified element and returns the new set. * */ public Object set(int index, E e); /** Return the number of elements in this list */ public int size(); }
In: Computer Science
ABC Corporation has 90-day receivables of Euro 500,000. The following information is available
Spot rate of the Euro: $ 1.20 per Euro
90-day Forward Rate: $ $1.15 per Euro
90-day Interest rates are as follows:
US Euro
90-day deposit rate 2.0 % 2.0 %
90-day borrowing rate 3.0 % 3.0 %
A call option on Euro that expires in 90-days has an exercise price of $1.20 and has a premium of $ 0.03. A put option on Euro that expires in 90-days has an exercise price of $1.20 and has a premium of $0.02
The Euro spot rate in 90-days is forecasted to be:
Possible Rate Probability
$1.15 30 %
$1.10 70 %
ABC Corporation is considering:
a) A forward hedge
b) A money market hedge
c) An option hedge and
d) Remaining un-hedged
You have been hired as a consultant to decide on the best possible hedge. Which one of the alternatives you will recommend, and why?
In: Finance
what are some different types of media as well as their goals and typical media behavioral patterns during emergencies or disasters
In: Operations Management
just gave you the initial headlines. I'm looking here at the statement from the bank itself, talking about the investigations that the FCA and the PRA have opened up into Jes Staley and some actions at Barclays. The FCA and the PRA are saying that Jes Staley, they're looking into his personal, individual conduct, and senior management responsibilities relating to a Barclays whistleblowing program. An attempt by Mr. Staley to identify the author of a letter that was treated by Barclays as a whistleblower. The board says that Jes Staley explained his mistake here, they believe it was an honest mistake, that Staley thought he was able to look into the identity of the letter author and try to find out who it was. The board is saying that they are going to reprimand, or have reprimanded, Jes Staley formally with a written reprimand and also that they are going to very significantly adjust his compensation. But the board is saying now that Barclays is fully cooperating with the FCA and PRA investigations, which are ongoing. And that they-that Jes Staley has the full support of the board after that written reprimand and very significant pay adjustment. So we'll continue to follow this developing story, but very interesting stuff coming across from Barclays on an investigation that is now open and ongoing into their search for the writer of a whistleblower letter.
>> Yeah Matt, just looking through that statement as well. John McFarlane, who is the chairman over at Barclays saying that he's personally very disappointed and apologetic that this situation has occurred. Referring of course to-well Matt, you were just saying that, is that Jes Staley went-it's alleged that he tried to identify who the whistleblower was. In a situation, McFarlane saying, "I'm personally very disappointed and apologetic that this situation has occurred, particularly as we strive to operate to the highest possible ethical standards." The board takes at Barclay's culture and integrity of its controls extremely seriously. "We've investigated the matter fully at using external law firm, and we will be commissioning an independent review of Barclays processes and controls to determine what improvements can be made." So of course, the reprimand being made, it might work, some would say it hurts immediately, and that is in your pay packet. Matt.
>> For sure, and I think it's interesting, you know, Staley at the end of the statement,
he's quoted as well saying, "our whistleblowing process is one of the most important means by which we protect our culture and values at Barclays, and I certainly want to ensure that all colleagues and others who may utilize it understand the criticality," I didn't even know that was a word, criticality, "which I attached to it." So basically saying,
he shouldn't have looked for the author of that letter and going forward, they won't try and identify whistleblowers who wish to remain anonymous.
1. The video title refers to a pay cut for the CEO. What prompted the board of directors to take this action?
a.Unethical actions in regard to a whistleblower's identity
b.Ongoing investigation by the UK Financial Conduct Authority (FCA)
c.Unhappy customers
d.Concerns about falling stock prices
2. CEO Staley remained in the position after this scandal was revealed. Who is ultimately responsible for Staley's past and future behaviors in his role as CEO?
a.Staley's fellow executives
b.The whistleblower
c.The board of directors
d.CEO Staley
3. The whistle-blowing program at Barclays is part of the corporation's governance mechanisms. Which of the following categories of corporate governance would it fall within?
a.Ethics
b.Customer
c.Financial
d.Innovation
4. Which of the following statements best characterizes the behavior of the board of directors after learning of the FCA and PRA investigations?
a.The board is committed to cooperating with ongoing investigations by the FCA and PRA.
b.The board is committed to drafting a code of ethics.
c.The board is committed to defending Staley's actions.
d.The board has resisted any attempts to allow outsiders to conduct investigations into the matter.
5. The board directors reprimanded Staley but did not dismiss him from his position as CEO. This action appears to stem from belief in Staley's profession of innocence about the wrongdoing and his willingness to take responsibility. The two sides—fire him for an unethical action or keep him because he took responsibility—create which of the following situations for the board of directors?
a.Complex strategy
b.Ethical dilemma
c.Opportunistic exploitation
d.Code of ethics
6. Although the video does not provide the content of the whistleblower's letter, which of the following unethical behaviors best describes Staley's actions in trying to find out the whistleblower's identity?
a.Opportunistic exploitation
b.Information manipulation
c.Self-dealing
d.Corruption
In: Operations Management
The assets of Dallas & Associates consist entirely of current assets and net plant and equipment, and the firm has no excess cash. The firm has total assets of $2.7 million and net plant and equipment equals $2.3 million. It has notes payable of $160,000, long-term debt of $746,000, and total common equity of $1.45 million. The firm does have accounts payable and accruals on its balance sheet. The firm only finances with debt and common equity, so it has no preferred stock on its balance sheet.
Write out your answers completely. For example, 25 million should be entered as 25,000,000. Negative values, if any, should be indicated by a minus sign. Round your answers to the nearest dollar, if necessary.
What is the company's total debt?
$
What is the amount of total liabilities and equity that appears on the firm's balance sheet?
$
What is the balance of current assets on the firm's balance sheet?
$
What is the balance of current liabilities on the firm's balance sheet?
$
What is the amount of accounts payable and accruals on its balance sheet? (Hint: Consider this as a single line item on the firm's balance sheet.)
$
What is the firm's net working capital? If your answer is zero, enter "0".
$
What is the firm's net operating working capital?
$
What is the monetary difference between your answers to part f and g?
$
What does this difference indicate?
In: Finance
Identify and research a topic in adult development (e.g., memory, muscle strength, etc.) that you wish to examine across various age groups. Develop an outline for either a cross-sectional or longitudinal research design. Write a paper consisting of the following information:
An introduction to the topic you selected, including a summary of at least one peer-reviewed journal article describing recent research (post 2005) on the topic;
A description of how you will measure the topic of study (e.g., the dependent variable).
A description of which type of design will be used and why that would be most appropriate. Also identify what age groups will be studied.
On the basis of your readings and research, provide a prediction of what you expect to find upon completion of your study.
In: Psychology
Question-----Which carmakers are most likely to benefit from the elimination of the North American Free Trade Agreement? Which will be most negatively impacted? Please help me answer question-+- Read article "It’s Not Just Ford: Trump’s Trade Barbs Threaten VW, Toyota Too" Ford Motor Co. was a favorite target of Donald Trump, who lambasted the company for producing cars south of the border throughout his campaign. Toyota Motor Corp., Volkswagen AG and other U.S. carmakers are just as exposed. Toyota and Nissan Motor Co., Japan’s largest automakers, were spared from Trump’s critique by name on the campaign trail. Yet, along with General Motors Co. and VW, they all rely on Mexican plants for millions of vehicles and a high volume of parts. That puts them at risk if the president-elect makes good on his threat to levy hefty taxes on cars assembled across the Rio Grande. “Trump could, or will, try to set up trade barriers,” said Ferdinand Dudenhoeffer, director of the Center for Automotive Research at the University of Duisburg-Essen in Germany. “Automakers with U.S. factories will therefore be on the winning side. Mexico, the new El Dorado of the auto industry, could suffer.” Since 2010, nine global automakers, including GM, Ford and Fiat Chrysler Automobiles NV, have announced more than $24 billion in Mexican investments. VW’s Audi, BMW AG and Daimler AG each build or plan to assemble luxury vehicles, engines or heavy trucks in the low-cost country, which Trump says has benefited at the expense of the American voters who propelled him to victory. Output in Mexico may more than double this decade, from 2 million to 5 million vehicles, according to the Center for Automotive Research in Ann Arbor, Michigan. The Republican candidate and real-estate developer grabbed headlines during his campaign by threatening to slap a 35 percent tariff on any cars Ford builds in Mexico and ships back to the U.S. He called Ford’s plans for a new plant in Mexico “an absolute disgrace.” A levy would lead to higher prices and hurt demand, said Joe Spak, an analyst at RBC Capital Markets. Trump would “start a worldwide trade war” if he decides to end trade pacts and uses anti-dumping provisions to impose widespread tariffs on other countries, said Donald Grimes, an economist at the Institute for Research on Labor, Employment and the Economy at the University of Michigan. The North American Free Trade Agreement, for example, requires only six months’ notice of termination to Canada and Mexico and doesn’t specify that the president would need congressional approval, he said. Read more: Gadfly looks at which carmakers build the most vehicles in Mexico “These other countries would retaliate. Prices consumers would pay would increase sharply. The Federal Reserve would then increase interest rates. It would be ugly,” Grimes said. Despite that threat, U.S. automakers and the United Auto Workers union extended an olive branch to the president-elect. “We agree with Mr. Trump that it is really important to unite the country -- and we look forward to working together to support economic growth and jobs,” Ford said in a statement. The company’s plan to shift small-car production from a factory in Michigan to Mexico was attacked by Trump during his first answer of the initial debate with Democratic candidate Hillary Clinton in September. GM and Fiat Chrysler said in separate statements they would work with Trump and the new Congress on policies that support U.S. manufacturing. UAW President Dennis Williams, whose union endorsed Clinton, told reporters at a roundtable Thursday that “I’m prepared to sit down and talk to him on trade. NAFTA is a huge problem to the American people.” German executives attending an industry conference in Munich on Wednesday also expressed concerns about Trump’s views. BMW is building a new car plant in Mexico’s San Luis Potosi that’s due to start production in 2019, while Audi started assembling autos in San Jose Chiapa in September. “We need open trade,” said BMW CEO Harald Krueger. The luxury automaker ships many of the SUVs assembled at its South Carolina factory to markets around the world and in turn exports sedans and Mini cars to the U.S. from Europe. “We live off exports and imports. The U.S. market is fundamental for us.” NAFTA has created a “highly integrated” auto market in North America that is critical to the fortunes of all global carmakers operating in it, said Sean McAlinden, an automotive economist based in Ann Arbor. “To interrupt the flow of trade across either border, Canadian or Mexican, would really throw more than a monkey wrench into the machine,” McAlinden said. “It would create a very, very noncompetitive North American auto industry.” Conciliation Hopes Daimler CEO Dieter Zetsche and James Verrier, who heads supplier BorgWarner Inc., are among executives who held out hope that much of Trump’s trade talk was campaign rhetoric and would soften with the practicalities needed to govern. “Many things get said during the heat of an election campaign,” Zetsche said. “I hope and believe this is also the case here.” For Bob Lutz, the retired vice chairman of GM, Trump’s victory could ultimately help the auto industry if his advisers and Congress keep him from pushing his protectionist agenda too far. “He’s not a dictator,” Lutz said in an interview. “No one can go in and abrogate trade deals. There are some aspects of NAFTA that will probably be re-negotiated, but he will probably be talked out of his crazier ideas.” Rather than threaten Japan auto imports with tariffs, Trump has pointed to wealth generated from the cars being sold in the U.S. to bolster his argument for America to pay a smaller share of the costs related to stationing troops in its biggest Asian ally’s territory. “Japan is ripping us off with the cars,” Trump said at an Oct. 12 campaign event in Florida. In remarks to Ohio volunteers in July, he spoke of “massive ships” delivering vehicles to the U.S. from Japan, which he told Americans was “rich because of us.” Representatives for Toyota, Nissan and Honda Motor Co. declined to comment. Japan’s automakers have combined capacity to build about 1.36 million vehicles annually in Mexico and have announced plans for new plants capable of assembling another 430,000 vehicles a year. Models built or planned for Mexican production and sale in the U.S. include the Toyota Corolla, the Nissan Versa and Sentra, and the Honda Fit and HR-V. “If NAFTA is going to be up for discussion somewhere down the line, that would affect Japanese companies very much, especially auto-related investments in Mexico,” said Bob Takai, president and CEO of Sumitomo Global Research Co. “If the trading and investing is going to be very difficult because of the new presidency, we may go somewhere else.”
In: Operations Management
The Neal Company wants to estimate next year's return on equity (ROE) under different financial leverage ratios. Neal's total capital is $17 million, it currently uses only common equity, it has no future plans to use preferred stock in its capital structure, and its federal-plus-state tax rate is 40%. The CFO has estimated next year's EBIT for three possible states of the world: $4.9 million with a 0.2 probability, $3.2 million with a 0.5 probability, and $0.5 million with a 0.3 probability. Calculate Neal's expected ROE, standard deviation, and coefficient of variation for each of the following debt-to-capital ratios. Do not round intermediate calculations. Round your answers to two decimal places at the end of the calculations.
Debt/Capital ratio is 0.
RÔE = | % |
σ = | % |
CV = |
Debt/Capital ratio is 10%, interest rate is 9%.
RÔE = | % |
σ = | % |
CV = |
Debt/Capital ratio is 50%, interest rate is 11%.
RÔE = | % |
σ = | % |
CV = |
Debt/Capital ratio is 60%, interest rate is 14%.
RÔE = | % |
σ = | % |
CV = |
In: Finance
In: Accounting
What are the three major activities that must occur to ensure that goals of the end business, consumers and analytics professionals align? Which activity do you think is the most difficult and why?
In: Operations Management
Find the electric field at the location of qa in the figure below, given that qb = qc = qd = +1.85 nC, q = ?1.00 nC, and the square is 11.5 cm on a side. (The +x axis is directed to the right.)
magnitude |
N/C |
direction |
In: Physics