(int x, int y)
| 40 | } |
| 41 | |
| 42 | public static int max(int x, int y) { |
| 43 | int ans = 0; |
| 44 | for (int i = x; i > 0; i -= i & -i) { |
| 45 | for (int j = y; j > 0; j -= j & -j) { |
| 46 | ans = Math.max(ans, tree[i][j]); |
| 47 | } |
| 48 | } |
| 49 | return ans; |
| 50 | } |
| 51 | |
| 52 | public static void main(String[] args) throws IOException { |
| 53 | BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); |
no outgoing calls