Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- public class L_1429_W {
- static StreamTokenizer in;
- static PrintWriter out;
- static int nextInt() throws IOException {
- in.nextToken();
- return (int) in.nval;
- }
- public static void main(String[] args) throws IOException {
- in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
- out = new PrintWriter(System.out);
- int L;
- int N;
- int M;
- L = nextInt();
- N = nextInt();
- M = nextInt();
- int[] arr = new int[L + 1];
- int[] big = new int[N];
- int[] fin = new int[N];
- for (int v = 0; v < N; v++) {
- big[v] = nextInt();
- fin[v] = nextInt();
- for (int j = big[v]; j <= fin[v]; j++) {
- arr[j]++;
- }
- }
- int[] point = new int[M];
- for (int g = 0; g < M; g++) {
- point[g] = nextInt();
- }
- for (int g = 0; g < M; g++) {
- out.println(arr[point[g]] + " ");
- }
- }
- }
Add Comment
Please, Sign In to add comment