import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;

public class Waste {
    static Scanner scanner = new Scanner(System.in);
    static int n,m;
    static float r;
    static ArrayList<Integer> list = new ArrayList<>(m);
    static HashMap<Integer,Integer> map = new HashMap<>(n,0.8f);
   static  float f(int day){
        if(day == 0){
            return 0;
        }
        else{
        if(map.containsKey(day)) {
            return f(day - 1) * (1 - r) + map.get(day) * r;
        }
        else{
            return f(day - 1) * (1 - r);
        }
    }}

    static public void setList() {
        while(m > 0){
            m--;
            int d = scanner.nextInt();
            list.add(d);
        }
    }

    static void setMap(){
        while(n > 0) {
            n--;
            int d = scanner.nextInt();
            int w = scanner.nextInt();
            map.put(d, w);
        }
    }
    static void setN(){
        n = scanner.nextInt();
    }
   static   void setM(){
        m = scanner.nextInt();
    }
  static   void setR(){
        r = scanner.nextFloat();
    }
    public static void main(String[] args) {
        setN();
        setM();
        setR();
        setMap();
        setList();
        for(int i : list){
            System.out.print(f(i) + " ");
        }
    }
}
