#include <bits/stdc++.h>   using namespace std;   int n;   double ans[1024 * 1024], l, r, x[20], y[20], a[20], cosA[20], sinA[20], maxi;   int main() {     scanf( %d %lf %lf , &n, &l, &r);     maxi = l;     for (int i = 0; i < n; i++) {       scanf( %lf %lf %lf , &x[i], &y[i], &a[i]);       cosA[i] = cos(a[i] * 3.14159265359 / 180);       sinA[i] = sin(a[i] * 3.14159265359 / 180);     }     int maxiMask = 1 << n;     for (int i = 0; i < maxiMask; i++) ans[i] = l;     for (int i = 0; i < maxiMask; i++) {       double curAns = ans[i];       for (int j = 0; j < n; j++) {         int newPotPos = 1 << j;         if (!(newPotPos & i)) {           double vx = curAns - x[j];           double vy = -y[j];           double nvx = vx * cosA[j] - vy * sinA[j];           double nvy = vx * sinA[j] + vy * cosA[j];           double pAns = x[j] - y[j] * nvx / nvy;           int newPos = newPotPos ^ i;           if (nvy >= 0.0) {             ans[newPos] = r;             maxi = r;           } else {             ans[newPos] = max(ans[newPos], pAns);             maxi = max(maxi, ans[newPos]);           }         }       }     }     maxi = min(maxi, r);     printf( %.11lf , maxi - l);     return 0;   }   