0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-27 14:56:27 +00:00
Baoshuo Ren 2021-10-09 19:11:39 +08:00 committed by Baoshuo Ren
parent 9975626619
commit 88e120aec4
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

23
AcWing/3994/3994.cpp Normal file
View File

@ -0,0 +1,23 @@
#include <bits/stdc++.h>
using namespace std;
int t, a, b, c, d, k, x, y;
int main() {
cin >> t;
while (t--) {
cin >> a >> b >> c >> d >> k;
try {
x = ceil(1.0 * a / c);
y = ceil(1.0 * b / d);
if (x + y > k) {
throw "No answer";
}
cout << x << ' ' << y << endl;
} catch (...) {
cout << -1 << endl;
}
}
return 0;
}