#include #include #include #include using namespace std; // Return a random number for this problem. int nextInt() { return rand() % 20001 - 10000; } int main() { // Generate sequences that could be different every time. srand( time( 0 ) ); // Make sure the program works on the sample input. cout << "7 2" << endl; cout << "3 10" << endl; // Generate some special, hard-coded test cases. cout << "1 0" << endl; cout << "0 1" << endl; cout << "-1 0" << endl; cout << "0 -1" << endl; cout << "-1 1" << endl; cout << "1 -1" << endl; // Generate a bunch of random test cases. for ( int i = 0; i < 200; i++ ) { // Make a couple of random numbers. int a, b; do { a = nextInt(); b = nextInt(); // Keep guessing until we get different numbers. } while ( a == b ); cout << a << " " << b << endl; } int c = nextInt(); cout << c << " " << c << endl; }