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:
Data is encrypted on SSH
Explanation:
Telnet and SSH both are the networking protocols. These protocol are used for the security of data. In telnet data is sent over the link without any encryption. That is the reason, in telnet protocol data is less secure.
In SSH (Security Shell) protocol data has been encrypted before transmission. The encryption of data make it more secure between transmitter and receiver.
So the true statement is that, SSH has data encryption.
Direct Current Power regulates current/voltage flow, similar function as unregulated or regulated, but is smaller, cheaper, and more reliable.
<h3>What is Direct Current Power?</h3>
- In contrast to the flow of a river, direct current is a technique in which electricity constantly flows in the same direction. It speaks about the flow of electricity produced by batteries, solar cells, and other sources.
- Alternating current (AC), on the other hand, is a technique in which the positive and negative sides are consistently swapped at regular intervals, changing the direction of the electricity flow in accordance.
- This is the electricity that comes from a generator or a plug-in.
- Alternating current is used to transmit both the electricity generated at power plants and the electricity delivered to houses.
To learn more about Direct Current Power, refer:
brainly.com/question/1402412
#SPJ4
In Parallel option A is true
Because In parallel circuit, the voltage across each components is same and the total current is sum of the currents through each component.
Answer:
Aggregate Function
.
Explanation:
The aggregate function returns the single value of the entire column of the database management system. The Aggregate Function is used in the SELECT statement and the GROUP BY clause.
The sum(),avg(), etc are some examples of Aggregate Function in the database with the help of aggregate function bobby gains the access to information above the usual clearance point. and summarizes the data.