0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-10-18 17:08:47 +00:00
OI-codes/S2OJ/1959/data/chk.cpp

19 lines
524 B (Stored with Git LFS)
C++

#include<bits/stdc++.h>
#include"testlib.h"
using namespace std;
typedef long long LL;
int main(int argc, char **argv){
registerTestlibCmd(argc, argv);
int T = inf.readInt();
while(T --){
int n = inf.readInt();
if(ans.readLine() == "impossible")
ouf.readToken("impossible");
else {
int x = ouf.readInt(1, 1000000), y = ouf.readInt(1, 1000000);
if((LL)x * x * x + (LL)y * y * y != (LL)n * n) quitf(_wa, "/fn");
}
}
quitf(_ok, "/bx");
}