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
Mashcka [7]
2 years ago
5

WHICH OF THIS PLS FAST!!!

Engineering
1 answer:
Effectus [21]2 years ago
4 0

Answer:

A

Explanation:

You might be interested in
Your program should read from an input file, which will contain one or more test cases. Each test case consists of one line cont
Aliun [14]

Answer:

#include <bits/stdc++.h>

using namespace std;

struct cell

{

int x, y;

int dis;

cell() {}

cell(int x, int y, int dis) : x(x), y(y), dis(dis) {}

};

bool isInside(int x, int y, int N)

{

if (x >= 1 && x <= N && y >= 1 && y <= N)

return true;

return false;

}

int minStepToReachTarget(int knightPos[], int targetPos[],

int N)

{

int dx[] = {-2, -1, 1, 2, -2, -1, 1, 2};

int dy[] = {-1, -2, -2, -1, 1, 2, 2, 1};

queue<cell> q;

q.push(cell(knightPos[0], knightPos[1], 0));

cell t;

int x, y;

bool visit[N + 1][N + 1];

for (int i = 1; i <= N; i++)

for (int j = 1; j <= N; j++)

visit[i][j] = false;

visit[knightPos[0]][knightPos[1]] = true;

while (!q.empty())

{

t = q.front();

q.pop();

visit[t.x][t.y] = true;

if (t.x == targetPos[0] && t.y == targetPos[1])

return t.dis;

for (int i = 0; i < 8; i++)

{

x = t.x + dx[i];

y = t.y + dy[i];

if (isInside(x, y, N) && !visit[x][y])

q.push(cell(x, y, t.dis + 1));

}

}

}

int main(){

ifstream obj("input.txt");

string line;

int x1,y1,x2,y2;

while(getline(obj,line)){

//cout<<line<<endl;

x1=line[0]-'a'+1;

y1=line[1]-'0';

x2=line[3]-'a'+1;

y2=line[4]-'0';

int N = 8;

int knightPos[] = {x1,y1};

int targetPos[] = {x2,y2};

cout <<"To get from "<<line[0]<<line[1]<<" to "<<line[3]<<line[4]<<" takes "<< minStepToReachTarget(knightPos, targetPos, N)<<" Knight Moves."<<endl;

}

return 0;

}

3 0
3 years ago
6.03 Discussion: Then &amp; Now - Safety
34kurt

Answer:

Information technology is important in our lives because it helps to deal with every day's dynamic things. Technology offers various tools to boost development and to exchange information. Both these things are the objective of IT to make tasks easier and to solve many problems.

6 0
3 years ago
Let A→=(150iˆ+270jˆ) mm , B→=(300iˆ−450jˆ) mm , and C→=(−100iˆ−250jˆ) mm . Find scalars r and s, if possible, such that R→=rA→+s
ioda

Answer: r = 0.8081; s = -0.07071

Explanation:

A = (150i + 270j) mm

B = (300i - 450j) mm

C = (-100i - 250j) mm

R = rA + sB + C = 0i + 0j

R = r(150i + 270j) + s(300i - 450j) + (-100i - 250j) = 0i + 0j

R = (150r + 300s - 100)i + (270r - 450s - 250)j = 0i + 0j

Equating the i and j components;

150r + 300s - 100 = 0

270r - 450s - 250 = 0

150r + 300s = 100

270r - 450s = 250

solving simultaneously,

r = 0.8081 and s = -0.07071

QED!

5 0
3 years ago
Which type of modeling can create virtual designs that can save clients thousands of dollars?
swat32

Answer:

VR Prototyping

VR Prototyping Can Save you Thousands of Dollars.

Explanation:

there you go lad

8 0
3 years ago
Which traditional subject is part of construction management or construction science syllabi?
N76 [4]

Answer:mathematics

Explanation:

4 0
3 years ago
Other questions:
  • Your class has designed a self-cleaning reptile tank. What kind of patent would you apply for? A. a plant patent B. a design pat
    14·2 answers
  • 5.5 A scraper with a 275 hp diesel engine will be used to excavate and haul earth for a highway project. An evaluation of the jo
    10·1 answer
  • A banked highway is designed for traffic moving at v = 88 km/h. The radius of the curve r = 314 m. show answer No Attempt 50% Pa
    5·2 answers
  • An automobile engine consumes fuel at a rate of 22 L/h and delivers 85 kW of power to the wheels. If the fuel has a heating valu
    8·2 answers
  • Please what is dif<br>ference between building technology and building engineering.​
    14·2 answers
  • Why charles babbage is known as father of computer explain <br>​
    12·1 answer
  • Which of the following relationship types most closely resembles the relationship between the national importance of residential
    15·1 answer
  • Determine the resistance of 100m of copper cable whose cross-sectional area is 1.5mm2​
    6·1 answer
  • Using your knowledge of how an ATM is used, develop a set of use cases that could serve as a basis for understanding the require
    15·1 answer
  • If a bearing needs 4. 0 s to solidify enough for impact, how high must the tower be?.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!