{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are not higher and not to the right of the given star. Astronomers want to know the distribution of the levels of the stars. \n \u003cbr\u003e\n \u003ccenter\u003e\n \u003cimg SRC\u003d\"CDN_BASE_URL/fd47938575a43734c7155490c64a749e?v\u003d1562949314\"\u003e\n \u003c/center\u003e \n \u003cbr\u003eFor example, look at the map shown on the figure above. Level of the star number 5 is equal to 3 (it\u0027s formed by three stars with a numbers 1, 2 and 4). And the levels of the stars numbered by 2 and 4 are 1. At this map there are only one star of the level 0, two stars of the level 1, one star of the level 2, and one star of the level 3. \n \u003cbr\u003e \n \u003cbr\u003eYou are to write a program that will count the amounts of the stars of each level on a given map.\n \u003c/div\u003e\n\u003chr/\u003e\n\u003cp\u003e天文学家经常研究星图,星图上的星星由平面上的点表示,每颗星星都有笛卡尔坐标。一颗星星的等级是指该星星左下方的星星的数量。\u003c/p\u003e\n\u003cp\u003e例如,查看上图所示的地图,5 号星的等级为3(左下方有 1、2、4 号星),2 号星和 4 号星的等级为 1。在这张地图上有一颗 0 级的星星,两颗 1 级的星星,一颗 2 级的星星,和一颗 3 级的星星。\n你需要写一个程序来计算给定星图上每个等级的星星数量。\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n The first line of the input file contains a number of stars N (1\u0026lt;\u003dN\u0026lt;\u003d15000). The following N lines describe coordinates of stars (two integers X and Y per line separated by a space, 0\u0026lt;\u003dX,Y\u0026lt;\u003d32000). There can be only one star at one point of the plane. Stars are listed in ascending order of Y coordinate. Stars with equal Y coordinates are listed in ascending order of X coordinate. \n \u003cbr\u003e\n \u003c/div\u003e\n\u003chr/\u003e\n\u003cp\u003e输入的第一行包括了星星的数量 $N\\ (1\\le N\\le 15000)$,下面 $N$ 行描述了每颗星星的坐标,每一行由一个空格分隔两个整数 $X$ 和 $Y$ 组成 $(0\\le X,Y\\le 32000)$。\u003c/p\u003e\n\u003cp\u003e数据保证每一个点只会存在一颗星星。星星以 Y 坐标的升序排列,Y 坐标相等的星星按 X 坐标的升序排列。\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n The output should contain N lines, one number per line. The first line contains amount of stars of the level 0, the second does amount of stars of the level 1 and so on, the last line contains amount of stars of the level N-1.\n \u003c/div\u003e\n\u003chr/\u003e\n\u003cp\u003e输出 N 行,每行一个数字。第一行为等级是 0 级的星星数量,第二行为等级是 1 级的星星数量,以此类推,最后一行为等级是 N-1 级的星星数量。\u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e5\n1 1\n5 1\n7 1\n3 3\n5 5\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e1\n2\n1\n1\n0\u003c/pre\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n This problem has huge input data,use scanf() instead of cin to read data to avoid time limit exceed.\n \u003c/div\u003e"}},{"title":"","value":{"format":"HTML","content":""}}]}