0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-26 19:52:03 +00:00
OI-codes/Hydro/system_test/5/data/interactor.cc
2022-09-17 16:23:49 +08:00

23 lines
500 B (Stored with Git LFS)
C++

#include <iostream>
#include "testlib.h"
using namespace std;
int main(int argc, char* argv[]) {
setName("Interactor A+B");
registerInteraction(argc, argv);
// reads number of queries from test (input) file
int a = inf.readInt();
int b = inf.readInt();
// writes query to the solution, endl makes flush
cout << a << " " << b << endl;
int ans;
cin >> ans;
if (a + b == ans)
quitf(_ok, "!");
else
quitf(_wa, "?");
}