Submission

Status:

Compilation Error

Subtask/Task Score:

Score: 0

User: un8qe_x3

Problemset: Tired To Walk

Language: cpp

Time: 0.000 second

Submitted On: 2025-10-20 21:44:27

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double

int main() {
    ld scale, speed;
    cin >> scale >> speed;

    ll y1, x1, y2, x2;
    cin >> y1 >> x1 >> y2 >> x2;

    // Distance using the given formula (sum of coordinates, not difference)
    ld dist = sqrtl((x1 + x2) * (x1 + x2) + (y1 + y2) * (y1 + y2)) * scale; // in meters

    // Time in seconds = distance / speed (m/s)
    ld total_seconds = dist / speed;

    // Convert to minutes properly
    ll total_minutes = ll(round(total_seconds / 60.0));

    ll hr = total_minutes / 60;
    ll min = total_minutes % 60;

    cout << hr << " hr " << min << " min";
    return 0;
}