CoolFace
Datasetpublic

FPEvalDataset/LeetCodeProblem

sourceHugging Faceupdated 8mo agoView on Hugging Face
0likes304downloads
1{2    "id": 2332,3    "name": "count_lattice_points_inside_a_circle",4    "difficulty": "Medium",5    "link": "https://leetcode.com/problems/count-lattice-points-inside-a-circle/",6    "date": "1650153600000",7    "task_description": "Given a 2D integer array `circles` where `circles[i] = [xi, yi, ri]` represents the center `(xi, yi)` and radius `ri` of the `ith` circle drawn on a grid, return _the **number of lattice points** __that are present inside **at least one** circle_. **Note:** A **lattice point** is a point with integer coordinates. Points that lie **on the circumference of a circle** are also considered to be inside it. **Example 1:** ``` **Input:** circles = [[2,2,1]] **Output:** 5 **Explanation:** The figure above shows the given circle. The lattice points present inside the circle are (1, 2), (2, 1), (2, 2), (2, 3), and (3, 2) and are shown in green. Other points such as (1, 1) and (1, 3), which are shown in red, are not considered inside the circle. Hence, the number of lattice points present inside at least one circle is 5. ``` **Example 2:** ``` **Input:** circles = [[2,2,2],[3,4,1]] **Output:** 16 **Explanation:** The figure above shows the given circles. There are exactly 16 lattice points which are present inside at least one circle. Some of them are (0, 2), (2, 0), (2, 4), (3, 2), and (4, 4). ``` **Constraints:** `1 <= circles.length <= 200` `circles[i].length == 3` `1 <= xi, yi <= 100` `1 <= ri <= min(xi, yi)`",8    "public_test_cases": [9        {10            "label": "Example 1",11            "input": "circles = [[2,2,1]]",12            "output": "5 "13        },14        {15            "label": "Example 2",16            "input": "circles = [[2,2,2],[3,4,1]]",17            "output": "16 "18        }19    ],20    "private_test_cases": [21        {22            "input": [23                [24                    49,25                    54,26                    2827                ],28                [29                    56,30                    46,31                    4432                ],33                [34                    29,35                    92,36                    2337                ],38                [39                    38,40                    75,41                    1142                ],43                [44                    54,45                    23,46                    2247                ],48                [49                    63,50                    53,51                    4052                ],53                [54                    74,55                    28,56                    1657                ],58                [59                    100,60                    99,61                    3462                ],63                [64                    62,65                    64,66                    2667                ],68                [69                    28,70                    80,71                    872                ],73                [74                    34,75                    90,76                    577                ],78                [79                    79,80                    54,81                    4082                ],83                [84                    24,85                    13,86                    587                ],88                [89                    68,90                    16,91                    1292                ],93                [94                    73,95                    65,96                    3897                ],98                [99                    23,100                    74,101                    12102                ],103                [104                    43,105                    93,106                    4107                ],108                [109                    71,110                    63,111                    62112                ],113                [114                    20,115                    10,116                    9117                ],118                [119                    19,120                    15,121                    12122                ],123                [124                    79,125                    38,126                    18127                ],128                [129                    32,130                    53,131                    31132                ],133                [134                    66,135                    42,136                    25137                ],138                [139                    52,140                    43,141                    4142                ],143                [144                    99,145                    51,146                    19147                ],148                [149                    23,150                    67,151                    7152                ]153            ],154            "output": 14313155        },156        {157            "input": [158                [159                    15,160                    84,161                    15162                ],163                [164                    8,165                    13,166                    7167                ],168                [169                    1,170                    50,171                    1172                ],173                [174                    15,175                    51,176                    6177                ],178                [179                    20,180                    72,181                    7182                ],183                [184                    55,185                    23,186                    2187                ],188                [189                    86,190                    28,191                    6192                ],193                [194                    49,195                    99,196                    31197                ],198                [199                    75,200                    54,201                    19202                ],203                [204                    91,205                    63,206                    56207                ],208                [209                    22,210                    56,211                    11212                ],213                [214                    100,215                    18,216                    8217                ],218                [219                    72,220                    27,221                    15222                ],223                [224                    44,225                    23,226                    20227                ],228                [229                    10,230                    50,231                    6232                ],233                [234                    33,235                    79,236                    25237                ],238                [239                    77,240                    16,241                    10242                ],243                [244                    76,245                    90,246                    73247                ],248                [249                    53,250                    20,251                    12252                ],253                [254                    50,255                    74,256                    10257                ],258                [259                    54,260                    32,261                    6262                ],263                [264                    96,265                    18,266                    3267                ],268                [269                    94,270                    1,271                    1272                ],273                [274                    94,275                    17,276                    3277                ],278                [279                    36,280                    89,281                    36282                ],283                [284                    53,285                    44,286                    34287                ],288                [289                    68,290                    76,291                    28292                ],293                [294                    50,295                    99,296                    15297                ],298                [299                    65,300                    85,301                    27302                ],303                [304                    63,305                    45,306                    35307                ],308                [309                    21,310                    3,311                    2312                ],313                [314                    14,315                    94,316                    1317                ],318                [319                    32,320                    69,321                    17322                ],323                [324                    3,325                    55,326                    3327                ],328                [329                    30,330                    72,331                    16332                ],333                [334                    4,335                    96,336                    2337                ],338                [339                    45,340                    79,341                    36342                ],343                [344                    65,345                    95,346                    24347                ],348                [349                    46,350                    65,351                    34352                ],353                [354                    79,355                    7,356                    5357                ],358                [359                    36,360                    11,361                    6362                ],363                [364                    96,365                    66,366                    45367                ],368                [369                    11,370                    27,371                    3372                ],373                [374                    46,375                    21,376                    21377                ],378                [379                    17,380                    80,381                    13382                ],383                [384                    23,385                    80,386                    10387                ],388                [389                    69,390                    67,391                    18392                ],393                [394                    64,395                    56,396                    3397                ],398                [399                    73,400                    81,401                    31402                ],403                [404                    68,405                    61,406                    44407                ],408                [409                    22,410                    37,411                    11412                ],413                [414                    81,415                    4,416                    1417                ],418                [419                    3,420                    28,421                    1422                ],423                [424                    21,425                    68,426                    16427                ],428                [429                    99,430                    22,431                    3432                ],433                [434                    64,435                    71,436                    16437                ],438                [439                    44,440                    97,441                    13442                ],443                [444                    12,445                    10,446                    4447                ],448                [449                    88,450                    38,451                    15452                ],453                [454                    14,455                    17,456                    8457                ],458                [459                    46,460                    82,461                    6462                ],463                [464                    51,465                    17,466                    2467                ],468                [469                    51,470                    90,471                    29472                ],473                [474                    60,475                    51,476                    29477                ],478                [479                    39,480                    95,481                    37482                ],483                [484                    58,485                    60,486                    50487                ],488                [489                    8,490                    33,491                    8492                ],493                [494                    78,495                    71,496                    33497                ],498                [499                    78,500                    18,501                    1502                ],503                [504                    84,505                    90,506                    6507                ],508                [509                    42,510                    45,511                    15512                ],513                [514                    2,515                    36,516                    1517                ],518                [519                    23,520                    69,521                    15522                ],523                [524                    45,525                    44,526                    39527                ],528                [529                    47,530                    99,531                    4532                ],533                [534                    86,535                    74,536                    35537                ],538                [539                    85,540                    36,541                    12542                ],543                [544                    33,545                    65,546                    33547                ],548                [549                    95,550                    49,551                    35552                ],553                [554                    17,555                    32,556                    10557                ],558                [559                    61,560                    4,561                    2562                ],563                [564                    40,565                    39,566                    14567                ],568                [569                    46,570                    27,571                    11572                ],573                [574                    51,575                    42,576                    29577                ],578                [579                    91,580                    99,581                    72582                ],583                [584                    71,585                    59,586                    12587                ],588                [589                    9,590                    93,591                    5592                ],593                [594                    57,595                    65,596                    51597                ],598                [599                    45,600                    71,601                    17602                ]603            ],604            "output": 22078605        },606        {607            "input": [608                [609                    42,610                    42,611                    32612                ],613                [614                    35,615                    14,616                    11617                ],618                [619                    55,620                    52,621                    33622                ],623                [624                    92,625                    19,626                    11627                ],628                [629                    62,630                    69,631                    38632                ],633                [634                    19,635                    16,636                    5637                ],638                [639                    23,640                    92,641                    1642                ],643                [644                    43,645                    83,646                    14647                ],648                [649                    80,650                    17,651                    5652                ],653                [654                    90,655                    63,656                    17657                ],658                [659                    81,660                    70,661                    50662                ],663                [664                    100,665                    67,666                    34667                ],668                [669                    9,670                    78,671                    4672                ],673                [674                    45,675                    24,676                    15677                ],678                [679                    48,680                    49,681                    9682                ]683            ],684            "output": 10368685        },686        {687            "input": [688                [689                    39,690                    60,691                    39692                ],693                [694                    94,695                    48,696                    22697                ],698                [699                    58,700                    95,701                    15702                ],703                [704                    9,705                    21,706                    1707                ],708                [709                    1,710                    58,711                    1712                ],713                [714                    35,715                    45,716                    15717                ],718                [719                    23,720                    3,721                    3722                ],723                [724                    53,725                    1,726                    1727                ],728                [729                    29,730                    21,731                    3732                ],733                [734                    5,735                    4,736                    3737                ],738                [739                    82,740                    10,741                    2742                ],743                [744                    12,745                    62,746                    6747                ],748                [749                    56,750                    6,751                    4752                ],753                [754                    62,755                    45,756                    28757                ],758                [759                    74,760                    75,761                    19762                ],763                [764                    48,765                    12,766                    9767                ],768                [769                    39,770                    65,771                    24772                ],773                [774                    17,775                    18,776                    14777                ]778            ],779            "output": 8348780        },781        {782            "input": [783                [784                    23,785                    7,786                    2787                ],788                [789                    24,790                    54,791                    11792                ],793                [794                    73,795                    47,796                    9797                ],798                [799                    1,800                    39,801                    1802                ],803                [804                    58,805                    26,806                    18807                ],808                [809                    27,810                    74,811                    18812                ],813                [814                    33,815                    30,816                    15817                ],818                [819                    97,820                    43,821                    16822                ],823                [824                    20,825                    88,826                    10827                ],828                [829                    16,830                    91,831                    13832                ],833                [834                    35,835                    59,836                    27837                ],838                [839                    91,840                    68,841                    12842                ],843                [844                    80,845                    37,846                    12847                ],848                [849                    2,850                    95,851                    2852                ],853                [854                    32,855                    91,856                    18857                ],858                [859                    52,860                    44,861                    30862                ],863                [864                    91,865                    82,866                    7867                ],868                [869                    76,870                    94,871                    63872                ],873                [874                    67,875                    34,876                    14877                ],878                [879                    27,880                    46,881                    20882                ],883                [884                    93,885                    49,886                    7887                ],888                [889                    11,890                    34,891                    10892                ],893                [894                    100,895                    45,896                    39897                ],898                [899                    76,900                    98,901                    46902                ],903                [904                    72,905                    29,906                    12907                ],908                [909                    78,910                    10,911                    8912                ],913                [914                    55,915                    28,916                    18917                ],918                [919                    59,920                    62,921                    35922                ],923                [924                    73,925                    88,926                    26927                ],928                [929                    29,930                    45,931                    22932                ],933                [934                    8,935                    73,936                    8937                ],938                [939                    36,940                    19,941                    2942                ],943                [944                    67,945                    93,946                    40947                ],948                [949                    46,950                    66,951                    6952                ],953                [954                    54,955                    100,956                    13957                ],958                [959                    44,960                    54,961                    23962                ],963                [964                    98,965                    90,966                    70967                ],968                [969                    73,970                    4,971                    3972                ],973                [974                    98,975                    74,976                    15977                ],978                [979                    22,980                    88,981                    18982                ],983                [984                    82,985                    29,986                    4987                ],988                [989                    14,990                    99,991                    1992                ],993                [994                    22,995                    78,996                    20997                ],998                [999                    47,1000                    29,1001                    141002                ],1003                [1004                    37,1005                    20,1006                    191007                ],1008                [1009                    60,1010                    22,1011                    111012                ],1013                [1014                    79,1015                    59,1016                    201017                ],1018                [1019                    81,1020                    45,1021                    291022                ],1023                [1024                    38,1025                    93,1026                    71027                ],1028                [1029                    84,1030                    56,1031                    431032                ],1033                [1034                    81,1035                    74,1036                    631037                ],1038                [1039                    7,1040                    82,1041                    71042                ],1043                [1044                    49,1045                    48,1046                    341047                ],1048                [1049                    52,1050                    31,1051                    171052                ],1053                [1054                    31,1055                    21,1056                    11057                ],1058                [1059                    100,1060                    23,1061                    201062                ],1063                [1064                    88,1065                    46,1066                    431067                ],1068                [1069                    27,1070                    99,1071                    211072                ],1073                [1074                    35,1075                    33,1076                    111077                ],1078                [1079                    10,1080                    61,1081                    71082                ],1083                [1084                    63,1085                    11,1086                    91087                ],1088                [1089                    39,1090                    63,1091                    121092                ],1093                [1094                    88,1095                    51,1096                    351097                ],1098                [1099                    15,1100                    34,1101                    121102                ],1103                [1104                    41,1105                    13,1106                    71107                ],1108                [1109                    84,1110                    37,1111                    91112                ],1113                [1114                    38,1115                    24,1116                    91117                ],1118                [1119                    5,1120                    21,1121                    21122                ],1123                [1124                    99,1125                    31,1126                    281127                ],1128                [1129                    55,1130                    61,1131                    81132                ],1133                [1134                    68,1135                    38,1136                    281137                ],1138                [1139                    70,1140                    74,1141                    681142                ],1143                [1144                    61,1145                    29,1146                    161147                ],1148                [1149                    87,1150                    15,1151                    61152                ],1153                [1154                    12,1155                    77,1156                    81157                ],1158                [1159                    67,1160                    11,1161                    51162                ],1163                [1164                    15,1165                    91,1166                    61167                ],1168                [1169                    69,1170                    82,1171                    681172                ],1173                [1174                    8,1175                    90,1176                    21177                ],1178                [1179                    90,1180                    78,1181                    781182                ],1183                [1184                    82,1185                    15,1186                    21187                ],1188                [1189                    18,1190                    34,1191                    121192                ],1193                [1194                    20,1195                    91,1196                    131197                ],1198                [1199                    1,1200                    98,

Showing the first 1,200 of 3807 lines. Download the file for the rest.