12255 - Underwater Snipers
Moderator: Board moderators
-
- 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!
-
- 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;
}
metaphysis: http://uhunt.onlinejudge.org/id/95895
My solutions for UVa problems: https://github.com/metaphysis/Code.
My solutions for UVa problems: https://github.com/metaphysis/Code.