fork(4) download
  1. /* paiza POH! vol.2
  2.  *
  3.  *
  4.  * author: Leonardone @ NEETSDKASU
  5.  */
  6. import java.util.*;
  7. import java.lang.*;
  8. import java.io.*;
  9.  
  10. class Main
  11. {
  12. public static void main (String[] args) throws java.lang.Exception
  13. {
  14.  
  15. String[] hw = in.readLine().split(" ");
  16. int H = Integer.parseInt(hw[0]); // ホーム画面縦の区画数
  17. int W = Integer.parseInt(hw[1]); // ホーム画面横の区画数
  18.  
  19. int[][] home = new int[H][W];
  20.  
  21. for (int y = 0; y < H; y++)
  22. {
  23. String line = in.readLine();
  24. for (int x = 0; x < W; x++)
  25. {
  26. home[y][x] = (int)(line.charAt(x) - '0');
  27. }
  28. }
  29.  
  30. int N = Integer.parseInt(in.readLine()); // ウィジェット数
  31.  
  32. for (int i = 0; i < N; i++)
  33. {
  34. String[] st = in.readLine().split(" ");
  35. int s = Integer.parseInt(st[0]); // ウィジェットの縦サイズ
  36. int t = Integer.parseInt(st[1]); // ウィジェットの横サイズ
  37.  
  38. int count = 0;
  39.  
  40. /* POH!Vol.2用テンプレ */
  41.  
  42. System.out.println(count);
  43. }
  44.  
  45. } // end of main(String[])
  46. }
  47.  
Success #stdin #stdout 0.08s 380224KB
stdin
5 5
00000
00100
00010
10001
10000
7
2 2
1 1
3 2
3 2
2 3
3 1
1 3
stdout
0
0
0
0
0
0
0