ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#213196 | #2348. Life | bwahoji | 0 | 3126ms | 1276kb | C++11 | 581b | 2024-11-09 22:54:45 | 2024-11-09 23:30:46 |
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int l, q;
cin >> l >> q;
while (q--) {
int x;
cin >> x;
for (int i = 0; i <= l; i++) {
for (int j = 0; j <= l; j++) {
if (abs(x - i * i * i - j * j * j) <= l * l * l) {
int ii = cbrt(x - i * i * i - j * j * j);
if (ii * ii * ii == (x - i * i * i - j * j * j)) {
cout << i << " " << j << " " << ii << "\n";
goto fin;
}
}
}
}
fin:;
}
return 0;
}
详细
小提示:点击横条可展开更详细的信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 1264kb
input:
98 10 5487 1899 3043 5373 2368 3993 723 9567 6812 901
output:
14 14 -1 0 16 -13 13 24 -22 0 16 -12 11 11 11 58 64 -77 12 31 -28 16 17 -13
result:
wrong answer a^3 + b^3 + c^3 != x
Test #2:
score: 0
Wrong Answer
time: 0ms
memory: 1264kb
input:
99 10 6139 3749 7532 3544 3976 345 522 8442 6400 7965
output:
14 17 -5 8 15 -7 42 50 -58 1 1 7 5 12 -11 8 21 -11 2 52 -51
result:
wrong answer No solution, but you output a solution!
Test #3:
score: 0
Wrong Answer
time: 2ms
memory: 1264kb
input:
98 10 5078 9597 9394 9368 8777 6955 8020 5115 398 3771
output:
2 5 21 15 31 -29 3 26 -22 10 19 -14 1 12 -11 3 10 14
result:
wrong answer No solution, but you output a solution!
Test #4:
score: 0
Wrong Answer
time: 1077ms
memory: 1272kb
input:
91 10000 163 6364 2583 7101 5320 483 6442 1028 1209 1710 5617 296 7228 1593 4580 5559 9699 2015 6397...
output:
0 25 -21 7 8 12 0 18 -8 1 3 10 7 13 -11 1 18 -6 0 8 -6 38 61 -65 5 13 -9 21 39 -40 0 14 -9 5 20 -12 ...
result:
wrong answer a^3 + b^3 + c^3 != x
Test #5:
score: 0
Wrong Answer
time: 993ms
memory: 1276kb
input:
91 10000 6480 8776 1711 1745 4845 3338 343 3167 8450 2756 2252 4375 4912 9822 8053 1533 1216 4161 61...
output:
26 42 -44 3 21 -8 4 15 -12 1 14 -10 13 22 -20 3 15 -4 0 0 7 2 15 -6 6 7 13 0 15 10 0 17 -1 13 25 -20...
result:
wrong answer a^3 + b^3 + c^3 != x
Test #6:
score: 0
Wrong Answer
time: 1054ms
memory: 1268kb
input:
95 10000 91 6885 8279 384 5310 2877 4483 2176 267 393 5446 7415 3853 4223 8480 3368 6752 9898 5779 7...
output:
0 3 4 3 19 -1 7 20 -4 12 17 -11 2 5 14 8 16 -5 2 20 -18 3 43 -42 4 50 -49 4 22 -19 7 16 -6 18 22 -20...
result:
wrong answer a^3 + b^3 + c^3 != x
Test #7:
score: 0
Time Limit Exceeded
input:
952 10000 2160 9764 2079 4616 9459 4653 4400 6373 2089 7189 4202 4497 6684 119 1191 2206 9287 5365 1...
output:
result:
Test #8:
score: 0
Time Limit Exceeded
input:
992 10000 2576 3876 8352 3311 9101 5255 5420 145 7396 6040 8529 9794 5164 4302 7147 3683 152 1136 79...
output:
result:
Test #9:
score: 0
Time Limit Exceeded
input:
996 10000 2189 8757 4831 6765 991 2216 9313 7968 7020 9945 988 9422 7315 2132 2333 5962 1798 8184 22...
output:
result:
Test #10:
score: 0
Time Limit Exceeded
input:
988 10000 1785 1065 1261 3054 2475 693 9109 9404 1153 4364 1847 8539 4364 9471 6183 6855 303 306 635...