The simulation, player 2 will always play according to the same strategy.
Method getPlayer2Move below is completed by assigning the correct value to result to be returned.
Explanation:
- You will write method getPlayer2Move, which returns the number of coins that player 2 will spend in a given round of the game. In the first round of the game, the parameter round has the value 1, in the second round of the game, it has the value 2, and so on.
#include <bits/stdc++.h>
using namespace std;
bool getplayer2move(int x, int y, int n)
{
int dp[n + 1];
dp[0] = false;
dp[1] = true;
for (int i = 2; i <= n; i++) {
if (i - 1 >= 0 and !dp[i - 1])
dp[i] = true;
else if (i - x >= 0 and !dp[i - x])
dp[i] = true;
else if (i - y >= 0 and !dp[i - y])
dp[i] = true;
else
dp[i] = false;
}
return dp[n];
}
int main()
{
int x = 3, y = 4, n = 5;
if (findWinner(x, y, n))
cout << 'A';
else
cout << 'B';
return 0;
}
Answer:
spacebar and number i think
Explanation:
The type of software which is offered in trial form or for a limited period of time is called shareware.
Software which are offered for free in trial form or for a limited time period are called shareware. They operate on the principle that once the user understands what the software can offer they will pay to use it later.
Most shareware software has built in countdowns which start as soon as you start the trial and at the end of which access is automatically revoked. They require the user to form a simple account. These versions generally provide a very basic selection of functions and are used to rake in more paying users.
Types of shareware include:
- Adware: It stands for advertising-supported software where the advertisements generate revenues.
- Demoware: This is a trial version of the original software including all features.
- Crippleware: This software is free but provides limited features till it is purchased.
- Trialware
This provides the user with full feature access for a time limit and then requires purchase.
You can learn more about shareware software at
brainly.com/question/4593389
#SPJ4
The main drawback of multiuser processing of a database is:
<h3>What is lost-update problem?</h3>
In the area of lost update problem, an update that has been carried on to a data item by a transaction is said to be lost as it is known to be overwritten by the update that has been carried on by another transaction.
Therefore, The main drawback of multiuser processing of a database is:
Learn more about database from
brainly.com/question/26096799
#SPJ12
Answer:
information system, data analysis in medicine , medical laboratory computing , computer assisted medical decision making