#include "validate.h" using namespace std; void get_int(istream &sol, feedback_function feedback, long long &n) { if(!(sol >> n)) feedback("Invalid or missing integer."); } int main(int argc, char **argv) { init_io(argc, argv); long long x, y, z, w, r; get_int(judge_in, judge_error, r); get_int(judge_ans, judge_error, x); get_int(judge_ans, judge_error, y); get_int(author_out, wrong_answer, z); get_int(author_out, wrong_answer, w); if (abs(z) > 2e9 || abs(w) > 2e9) wrong_answer("Answer is suboptimal.\n"); // avoid overflow, just in case. if (z*z + w*w <= r*r) wrong_answer("Point is in the circle.\n"); if (z*z + w*w != x*x + y*y) wrong_answer("Answer is suboptimal.\n"); string trash; if(author_out >> trash) wrong_answer("Trailing output"); accept(); }