## 12255 - Underwater Snipers

All about problems in Volume 122. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

### 12255 - Underwater Snipers

Use this thread to discuss this problem.
Check input and AC output for thousands of problems on uDebug!

metaphysis
Experienced poster
Posts: 139
Joined: Wed May 18, 2011 3:04 pm

### Re: 12255 - Underwater Snipers

Test data generator.

Code: Select all

``````#include <bits/stdc++.h>

using namespace std;

int main(int argc, char *argv[])
{
srand(time(NULL));

int T = 100;
cout << T << "\n\n";
for (int cs = 1; cs <= T; cs++)
{
long long k, N, S, D, x, y;
k = rand() % 100000000;
if (rand() % 100 > 70) k *= -1;
N = rand() % 1000 + 1;
S = rand() % 1000 + 1;
D = rand() % 1000000000 + 1;
cout << k << ' ' << N << ' ' << S << ' ' << D << '\n';
for (int i = 0; i < N; i++)
{
x = rand() % 100000000;
if (rand() % 100 > 70) x *= -1;
y = k + rand() % (100000000LL - k);
cout << x << ' ' << y << '\n';
}
cout << '\n';
}

return 0;
}
``````