Questions
1. What will print? int[][] numbers = { { 1, 2, 3, 4 },{ 5, 6,...

1. What will print?
int[][] numbers = { { 1, 2, 3, 4 },{ 5, 6, 7, 8 },{ 9, 10, 11, 12 } };
System.out.println(numbers[1][3]);

a) 13

b) 4

c) 8

d) 12

2. With what value does currYear = yearsArr[2] assign currYear?
int[ ] yearsArr = new int[4];
yearsArr[0] = 1999;
yearsArr[1] = 2012;
yearsArr[2] = 2025;         

a) 4

b) 1999

c) 2012

d) 2025

3. What will print?
String [][] names = { { "Elliot", "Darlene", "Angela", "Tyrell" },
{ "Joanna", "Phillip", "Tomero", "Trenton" },
{ "Mobley", "Whiterose", "Cisco", "Leon", "Mr. Robot" } };
System.out.println(names[2][4]);

a) Elliot

b) Angela

c) Joanna

d) Mr. Robot

4. What will print?
int[][] myNumbers = { {1, 2, 3, 4}, {5, 6, 7, 8}, {1, 2, 3, 4} };
int x = myNumbers[2][2];
System.out.println(x);

a) 5

b) 3

c) 7

d) 8

5. What will print?
int[][] myNumbers = { {1, 2, 3, 4}, {5, 6, 7, 8} };
int x = myNumbers[1][2];
System.out.println(x);

a) 5

b) 3

c) 7

d) 8

In: Computer Science

Consider two sets of integers represented in arrays, X = [x1, x2, . . . ,...

Consider two sets of integers represented in arrays, X = [x1, x2, . . . , xn] and Y =
[y1, y2, . . . , yn]. Write two versions of a FindSetUnion(X, Y ) algorithm to find the union of X
and Y as an array. An element is in the union of X and Y if it appears in at least one of X and Y .
You may make use any algorithm introduced in the lectures to help you develop your solution. That
is, you do not have to write the ‘standard’ algorithms – just use them. Therefore, you should be able
to write each algorithm in about 10 lines of code. You must include appropriate comments
in your pseudocode.

question:

(a) [2 Marks] Write a pre-sorting based algorithm of FindSetUnion(X, Y ). Your algorithm
should strictly run in O(n log n).
(b) [2 Marks] Write a Hashing based algorithm of FindSetUnion(X, Y ). Your algorithm should
run in O(n).

In: Computer Science

Devos Inc. is building a hotel. It will have 4 kinds of rooms: suites where customers...

Devos Inc. is building a hotel. It will have 4 kinds of rooms: suites where customers can smoke, suites that are non-smoking, budget rooms where the customers can smoke, and budget rooms that are non-smoking. When we build the hotel, we need to plan for how many rooms of each type we should have. The following are requirements for the hotel:

  1. We want to figure out how many rooms of each type to build based on maximizing revenue if we fill up the hotel. We expect to charge $190 for a suite that is non-smoking and $140 for a budget room that is non-smoking. Smoking room customers for both suites and budget rooms will have to pay an additional $20 per night.
  2. We can spend up to $7,500,000 on construction of our hotel. The cost to build a non-smoking budget room is $12,000. The cost to build a non-smoking suite is $15,000. It is $3,000 additional for a smoking room of either type for smoke detectors and sprinklers.
  3. We require that the number of budget rooms be at least 1.5 times the number of suites, but no more than 3 the number of suites.
  4. There needs to be at least 80 suites, but no more than 200.
  5. Industry trends recommend that smoking rooms should be less than 50% of the non-smoking room and in addition, we require our builder gives us at least 4 smoking rooms.

In: Operations Management

Discuss the meaning of 'COMPLETE INFORMATION' in the context of the 'Prisoner's Dilemma'.

Discuss the meaning of 'COMPLETE INFORMATION' in the context of the 'Prisoner's Dilemma'.

In: Economics

Discuss the decision making steps that management must take when deciding to sell or process further.

  • Discuss the decision making steps that management must take when deciding to sell or process further.

In: Operations Management

Lisa bodell; What holds us back from better embracing change might not be what you think.and...

Lisa bodell;

What holds us back from better embracing change might not be what you think.and I think its two things: the first thing is mindset. And what we always find with leaders is we can’ tell them that they’re the ones that are holding us back from change, we have to show them. And the reason why I think mindset is what holds us back is we don’t realize how much we resist change on a regular basis.in fact one of things I talk about a lot with people is that I don’t think we’re grooming leaders right now; I think that we are grooming professional skeptics. A lot of people are becoming risk averse because so much is on the line. They are skeptical because the unknown is obviously more frightening than the known. And you can ask people, wen you give them new ideas, what they think about that idea. And most times, nine times out of ten, people’s reaction will be able to tell you what they don’t like about the idea first before they can tell you what they like. So shifting the mindset to seeing possibilities, what could happen versus whats wrong with something, keeps an idea alive. And thats very important in terms of getting people in the mindset for change. Don’t shut something down before you give it a fair chance. The second thing that I think holds us back is our assumptions. And I talk a lot about this in my book kill the company is that we have a lot of assumptions. Around how things should work, have always worked, need to work, we’ve already tried things that way and I think one of the problem is our assumptions hold us back from actually attacking problems. And what I mean by this is often we look at problem as very big, very large, and thats because we have a lot of assumptions about the problem. And we teach people how to break down a problem into truths or many assumptions and attacks those individual assumption and turn them on their head.if you can actually take our assumptions and change then you can start to see again more possibilities for change. We Did a case study with several companies but one primarily down in Wall Street. And what was interesting about it is we worked together to come up with a new ways to instill change in an organization. Most companies when they her about a change program now they just want to hear to turn off. Everyone has change fatigue. And the reason for that is most change initiatives simply don’t work. And we wanted to go about in a new way.so we tested all kinds of things from tools that were amazing to techniques that were horrible and failed, but what came out of the research that we did with several companies over any years, but one intently over eight weeks was this: change cannot be put on people. The best way to instill change is to do it with them.create it with them. The second thing is that change of course has to be supported from the top down. It must be supported from the top down. But where change happens is from the middle out.so the people that are sitting in what you do every day, which is meetings and emails, the people that are doing those things every day, more than they’d like, those are the ones that are going to be creating the change; they’re the ones that have to be in power to do it. The third thing is that I don’t think it should be a 12-step program. People are beyond tired of 12-step programs. They need a toolkit; an on-demand toolkit of tools that they can use when they’re stressed out, when something happens suddenly, when they just don’t know what else to do.the final thing is change can’t be complex. We have to work on simplifying, so from my perspective

And at my company if theres a tool that we have that take us more than an hour to teach you, we should be fired. We should only give you simple tools that every layer of the organization can use and get on the same page with change.

Question: In the article above, Lisa Bodell addresses resisting change. What insights have you gained from her presentation?

In: Operations Management

write a 3 pages paper about corona virus and its impact on the world economy.

write a 3 pages paper about corona virus and its impact on the world economy.

In: Operations Management

Python language!!!!! №1 The translation from the Berland language into the Birland language is not an...

Python language!!!!!

№1

The translation from the Berland language into the Birland language is not an easy task. Those languages are very similar: a berlandish word differs from a birlandish word with the same meaning a little: it is spelled (and pronounced) reversely. For example, a Berlandish word code corresponds to a Birlandish word edoc. However, it's easy to make a mistake during the «translation». Vasya translated word s from Berlandish into Birlandish as t. Help him: find out if he translated the word correctly.

Input

The first line contains word s, the second line contains word t. The words consist of lowercase Latin letters. The input data do not consist unnecessary spaces. The words are not empty and their lengths do not exceed 100 symbols.

Output

If the word t is a word s, written reversely, print YES, otherwise print NO.

Examples

input

code
edoc

output

YES

№2

Anton likes to play chess, and so does his friend Danik.

Once they have played n games in a row. For each game it's known who was the winner — Anton or Danik. None of the games ended with a tie.

Now Anton wonders, who won more games, he or Danik? Help him determine this.

Input

The first line of the input contains a single integer n (1 ≤ n ≤ 100 000) — the number of games played.

The second line contains a string s, consisting of n uppercase English letters 'A' and 'D' — the outcome of each of the games. The i-th character of the string is equal to 'A' if the Anton won the i-th game and 'D' if Danik won the i-th game.

Output

If Anton won more games than Danik, print "Anton" (without quotes) in the only line of the output.

If Danik won more games than Anton, print "Danik" (without quotes) in the only line of the output.

If Anton and Danik won the same number of games, print "Friendship" (without quotes).

Examples

input

6
ADAAAA

output

Anton

№3

You can not just take the file and send it. When Polycarp trying to send a file in the social network "Codehorses", he encountered an unexpected problem. If the name of the file contains three or more "x" (lowercase Latin letters "x") in a row, the system considers that the file content does not correspond to the social network topic. In this case, the file is not sent and an error message is displayed.

Determine the minimum number of characters to remove from the file name so after that the name does not contain "xxx" as a substring. Print 0 if the file name does not initially contain a forbidden substring "xxx".

You can delete characters in arbitrary positions (not necessarily consecutive). If you delete a character, then the length of a string is reduced by 11. For example, if you delete the character in the position 22 from the string "exxxii", then the resulting string is "exxii".

Input

The first line contains integer nn (3≤n≤100)(3≤n≤100) — the length of the file name.

The second line contains a string of length nn consisting of lowercase Latin letters only — the file name.

Output

Print the minimum number of characters to remove from the file name so after that the name does not contain "xxx" as a substring. If initially the file name dost not contain a forbidden substring "xxx", print 0.

Examples

input

6
xxxiii

output

1

In: Computer Science

write a persuasive essay of 250 words about the use of technology .

write a persuasive essay of 250 words about the use of technology .

In: Computer Science

How do we develop the RIGHT culture in project management so that the influence is positive?...

How do we develop the RIGHT culture in project management so that the influence is positive? any ideas from the MIS perspective?

In: Operations Management

Many "course and instructor evaluation" systems consist of inappropriate or ineffective measurements. Discuss how the principles...

Many "course and instructor evaluation" systems consist of inappropriate or ineffective measurements. Discuss how the principles in this chapter can be used to develop an effective measurement system for instructor performance.

In: Operations Management

Brexit: What were the better circumstances for the U.K. to leave the from E.U.? Explain on...

Brexit: What were the better circumstances for the U.K. to leave the from E.U.? Explain on 2 paragraphs-Provide 1 reference.

In: Operations Management

Implement a dictionary application using C++ with the following features: Load a dictionary file. Given a...

Implement a dictionary application using C++ with the following features:

  • Load a dictionary file.

  • Given a prefix string that the user specifies, print the first word or all words in the dictionary with that string as their prefix.

  • Given two strings A and B that the user specifies, replace all occurrences of A in the dictionary file with B.

  • Spawning a new editor (e.g., vim) to allow the user to modify the dictionary file. Save the dictionary file afterwards.

You must use either C or C++ to implement your dictionary application. All your source code must be put within one (1) file. You will only submit that one file.

Your program should not have any extra library dependencies.

Please provide the coding in C++.

In: Computer Science

PLEASE SHOW ALL YOUR CALCULATIONS 10. You are the veterinarian at a zoo that has 21...

PLEASE SHOW ALL YOUR CALCULATIONS

10. You are the veterinarian at a zoo that has 21 zebras. Each zebra needs to get four
intravenous shots (over the course of a month) of a vaccination against Zebra Zombie Disease.
Each injection contains 750 mg of the active vaccination agent. How many grams of the active
vaccination agent should you order for the month?

12. A municipal transit system has 85 diesel buses that travel an average of 47,000 miles per
year each. Because of the start and stop nature of a bus route, they only get an average of 5
MPG. If diesel costs $2.75 per gallon, how much is the annual fuel bill?
13. A block of metal is 5 cm by 7 cm by 9 cm and has a mass of 854 grams. Calculate the density
of the block and give your best guess of what it is made of. Express the density in both g/cm3
and kg/m3.
14. You have a 100-watt light bulb on your front porch that is turned on 10 hours every night. If
the cost of electricity is 12 cents per KWHR (kilowatt hour), how much does that bulb add to
your monthly electric bill?
15. The parking lot of a college campus has 200 lamp posts. Each lamp post has two 1200-watt
light bulbs. The lights are on an average of 10 hours per night year-round. Calculate the annual
electric cost for the lights if the college pays 8.5 cents per KWHR.

In: Physics

Required information [The following information applies to the questions displayed below.] The following events occur for...

Required information

[The following information applies to the questions displayed below.]

The following events occur for The Underwood Corporation during 2021 and 2022, its first two years of operations.

June 12, 2021 Provide services to customers on account for $33,800.
September 17, 2021 Receive $19,000 from customers on account.
December 31, 2021 Estimate that 40% of accounts receivable at the end of the year will not be received.
March 4, 2022 Provide services to customers on account for $48,800.
May 20, 2022 Receive $10,000 from customers for services provided in 2021.
July 2, 2022 Write off the remaining amounts owed from services provided in 2021.
October 19, 2022 Receive $39,000 from customers for services provided in 2022.
December 31, 2022 Estimate that 40% of accounts receivable at the end of the year will not be received.

Required:

1. Record transactions for each date. (If no entry is required for a particular transaction/event, select "No Journal Entry Required" in the first account field.)

2. Post transactions to the following accounts: Cash, Accounts Receivable, and Allowance for Uncollectible Accounts.

3. Calculate net accounts receivable at the end of 2021 and 2022.

In: Accounting