func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long int M = 1e18 + 7;   const long long int mod = 1e9 + 7;   const long long int infi = LLONG_MAX;   long long int i, j, ans, k, n, x, y, m, mymax = LLONG_MIN, mymin = LLONG_MAX, b,                                           c, z, sum;   int main() {     long long int x1, x2, s, p, t1, t2, d;     scanf( %lld %lld %lld , &s, &x1, &x2);     scanf( %lld %lld , &t1, &t2);     scanf( %lld %lld , &p, &d);     if (x2 < x1) {       ans = (x1 - x2) * t2;       if (d == 1) {         if (p <= x2) {           ans = min(ans, (2 * s - x2 - p) * t1);         } else if (p > x2 && p <= x1) {           ans = min(ans, (2 * s - x2 - p) * t1);         } else {           ans = min(ans, (2 * s - p - x2) * t1);         }       } else {         if (p < x2) {           ans = min(ans, (2 * s - x2 + p) * t1);         } else if (p >= x2 && p < x1) {           ans = min(ans, (2 * s - x2 + p) * t1);         } else {           ans = min(ans, (p - x2) * t1);         }       }       printf( %lld n , ans);       return 0;     }     ans = (x2 - x1) * t2;     if (d == 1) {       if (p <= x1) {         ans = min(ans, (x2 - p) * t1);       } else if (p > x1 && p <= x2) {         ans = min(ans, (2 * s + x2 - p) * t1);       } else {         ans = min(ans, (2 * s - p + x2) * t1);       }     } else {       if (p < min(x1, x2)) {         ans = min(ans, (x2 + p) * t1);       } else if (p >= x1 && p <= x2) {         ans = min(ans, (p + x2) * t1);       } else {         ans = min(ans, (p + x2) * t1);       }     }     printf( %lld n , ans);     return 0;   }   