how to read the output in c++

how to read the output in c++

I am solving a codechef problem. I have to ask Q queries (which I would have to print) and for every query computer would give me an output which I would have to save to use for another query. The problem statement states:

I am solving a codechef problem. I have to ask Q queries (which I would have to print) and for every query computer would give me an output which I would have to save to use for another query. The problem statement states:

For each test case, you may ask queries. To ask a query, print a line >containing the character 'Q', a space and two space-separated integers >x0 and y0 (0≤x0,y0≤109). Then, you should read a line containing a >single integer. If this integer is non-negative, it denotes the answer >to your query. Otherwise, it means that you exceeded the limit on the >number of queries, the coordinates you printed are invalid or some >other error occured. When you have found the secret rectangle, you should print a line >containing the character 'A', a space and four space-separated integers >xl, yl, xu and yu. Then, you should read a single line containing one >integer, which is 1 if your answer was correct or negative if it was wrong.

How do I save output given from one query as input for another?

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

C/C++ vs. Rust: A developer’s perspective

In this post, you'll see the difference between Rust and C/C++ in a developer’s perspective

Variable Introduction in C#[Bangla]

LIKE | COMMENT | SHARE | SUBSCRIBE A variable is nothing but a name given to a storage area that our programs can manipulate. Each variable in C# has a speci...