---
# System prepended metadata

title: 13606 - Sprinklers
tags: [array]

---

# 13606 - Sprinklers
>author: Utin
###### tags: `array`

---

## Brief
See the code below

## Solution 0

```c=
#include <stdio.h>

int main() {
    int n, arr[3001][4], ans[3001];
    scanf("%d", &n);
    for(int i=0; i<n; i++) {
        for(int j=0; j<3; j++) {
            scanf("%d", &arr[i][j]);
        }
    }
    for(int i=0; i<n; i++) {
        for(int j=0; j<n; j++) {
            if(j == i) continue;
            if((arr[i][0]-arr[j][0])*(arr[i][0]-arr[j][0])+(arr[i][1]-arr[j][1])*(arr[i][1]-arr[j][1]) < (arr[i][2]+arr[j][2])*(arr[i][2]+arr[j][2])) {
                ans[i] = 1;
                break;
            }
        }
    }
    for(int i=0; i<n; i++) {
        printf("%d", ans[i]);
        if(i != n-1) printf(" ");
        else printf("\n");
    }
}
// By Utin
```

## Reference