import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.io.FileInputStream;
import java.util.StringTokenizer;
import java.io.InputStream;
 
/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class green_petr {
    public static void main(String[] args) {
        InputStream inputStream;
        try {
            inputStream = new FileInputStream("green.in");
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        OutputStream outputStream;
        try {
            outputStream = new FileOutputStream("green.out");
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Green solver = new Green();
        solver.solve(1, in, out);
        out.close();
    }
}
 
class Green {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int m = in.nextInt();
        double alpha = in.nextInt() / 180.0 * Math.PI;
        double decrease = Math.tan(alpha);
        int[] h = new int[n];
        for (int i = 0; i < n; ++i) {
            h[i] = in.nextInt();
        }
        int[] x = new int[m];
        int[] y = new int[m];
        for (int i = 0; i < m; ++i) {
            x[i] = in.nextInt();
            y[i] = in.nextInt();
        }
        int j = 0;
        for (int k = 1; k < m; ++k)
            if (y[k] + decrease * (x[k] - x[0]) > y[j] + decrease * (x[j] - x[0]))
                j = k;
        m = j + 1;
        x = Arrays.copyOf(x, m);
        y = Arrays.copyOf(y, m);
        int[] order = new int[n];
        for (int i = 0; i < n; ++i) order[i] = i;
        for (int i = 0; i < n; ++i) if (h[order[i]] > h[order[n - 1]]) {
            int t = order[i];
            order[i] = order[n - 1];
            order[n - 1] = t;
        }
        double at = y[0];
        double atx = x[0];
        int ati = 0;
        double res = 0;
        double[] place = new double[n];
        for (int i = 0; i < n; ++i) {
            place[order[i]] = atx;
            at += h[order[i]];
            res = Math.max(res, at - y[0]);
            while (ati + 1 < m) {
                if (at - decrease * (x[ati + 1] - x[0]) >= y[ati + 1]) {
                    ++ati;
                    atx = x[ati];
                    continue;
                }
                double left = atx;
                double right = x[ati + 1];
                while (right - left > 1e-10) {
                    double middle = (left + right) / 2;
                    if (at - decrease * (middle - x[0]) >= ((middle - x[ati]) * y[ati + 1] + (x[ati + 1] - middle) * y[ati]) / (x[ati + 1] - x[ati]))
                        left = middle;
                    else
                        right = middle;
                }
                atx = right;
                break;
            }
            if (ati == m - 1)
                at = y[ati] + decrease * (atx - x[0]);
            else
                at = ((atx - x[ati]) * y[ati + 1] + (x[ati + 1] - atx) * y[ati]) / (x[ati + 1] - x[ati]) + decrease * (atx - x[0]);
        }
        out.println(res);
        for (double xx : place) out.println(xx);
    }
}
 
class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;
 
    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }
 
    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }
 
    public int nextInt() {
        return Integer.parseInt(next());
    }
 
    }