ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#213110 | #2348. Life | X_X | 0 | 10852ms | 1336kb | C++ | 4.3kb | 2024-11-09 20:12:36 | 2024-11-09 23:12:34 |
answer
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N=1e4+3;
int x,L;
int biao[N]={0,1,1,1,1001,1001,2,2,2,2,2,3,11,1001,1001,2,2,2,3,3,3,16,1001,1001,2,3,3,3,3,3,1001,1001,1001,1001,3,3,3,4,4,1001,1001,1001,1001,3,8,4,3,8,4,1001,1001,796,1001,3,3,3,4,4,1001,1001,5,5,3,4,4,4,4,1001,1001,5,21,4,4,4,1001,1001,1001,1001,55,35,4,3,14,4,1001,1001,1001,1001,5,7,4,4,4,7,1001,1001,22,5,5,4,7,4,239,1001,1001,8,5,51,1001,5,1001,892,1001,1001,1001,11,5,5,4,7,4,1001,1001,5,5,5,5,4,4,4,1001,1001,5,5,5,7,4,13,103,1001,1001,5,8,1001,5,10,10,67,1001,1001,367,5,5,5,7,4,1001,1001,1001,130,5,8,5,30,58,1001,1001,1001,8,8,8,8,1001,1001,8,1001,1001,8,15,5,1001,5,14,17,1001,1001,5,58,5,5,5,7,1001,1001,1001,1001,8,5,49,24,6,182,1001,1001,14,21,11,6,6,6,7,1001,1001,1001,6,6,5,6,6,7,1001,1001,37,5,6,6,7,1001,1001,1001,1001,1001,6,8,143,6,565,1001,1001,1001,29,10,5,6,6,7,26,1001,1001,5,5,5,7,6,42,442,1001,1001,5,11,13,9,8,10,1001,1001,1001,11,1001,8,6,7,6,1001,1001,1001,1001,5,7,6,6,6,7,1001,1001,1001,493,7,6,7,1001,1001,1001,1001,8,8,8,8,10,336,59,1001,1001,49,8,1001,7,6,7,37,1001,1001,1001,41,5,7,7,7,1001,1001,1001,1001,9,8,7,65,24,7,1001,1001,11,11,11,6,7,7,7,1001,1001,11,6,6,6,7,7,7,1001,1001,1001,6,7,7,7,499,13,1001,1001,1001,11,7,8,78,7,10,1001,1001,1001,1001,6,7,7,7,47,1001,1001,5,16,26,7,8,7,59,1001,1001,62,8,8,8,8,12,1001,1001,1001,97,9,8,10,7,11,7,1001,1001,1001,164,7,6,7,7,7,1001,1001,46,18,9,8,7,487,506,1001,1001,1001,8,14,26,6,33,97,1001,1001,307,31,6,6,6,7,1001,1001,1001,131,1001,6,7,13,78,1001,1001,1001,8,8,8,9,8,1001,14,1001,1001,8,72,8,6,7,10,1001,1001,1001,13,6,7,7,7,7,1001,1001,1001,17,8,7,8,1001,9,10,1001,1001,14,8,8,8,10,10,10,1001,1001,50,8,489,7,6,29,1001,1001,1001,1001,185,8,8,8,15,1001,1001,1001,8,8,8,8,8,10,1001,1001,1001,8,8,8,12,13,23,35,1001,1001,8,20,1001,8,7,13,1001,1001,1001,28,8,8,8,28,1001,223,1001,1001,14,8,14,8,15,7,52,1001,1001,14,1001,6,7,7,7,7,1001,1001,1001,21,8,7,8,79,551,1001,1001,8,14,8,8,8,219,1001,1001,1001,74,1001,8,40,7,20,1001,1001,1001,260,186,7,11,39,9,1001,1001,1001,1001,11,9,8,9,9,1001,1001,1001,1001,8,14,9,10,10,19,1001,1001,1001,33,26,528,7,7,110,1001,1001,1001,1001,8,10,9,15,1001,1001,1001,8,8,8,8,16,1001,1001,1001,1001,8,218,15,6,10,13,142,1001,1001,92,47,10,9,10,7,1001,1001,1001,1001,8,9,9,21,9,11,1001,1001,14,9,11,9,201,957,7,1001,1001,8,1001,27,7,7,7,7,1001,1001,164,637,9,56,7,15,1001,1001,1001,62,15,8,9,9,10,1001,1001,1001,1001,23,9,36,14,7,25,1001,1001,116,1001,104,8,9,9,77,1001,1001,1001,8,8,8,8,9,1001,1001,1001,1001,8,9,9,13,12,13,1001,1001,14,9,23,339,9,21,7,1001,1001,1001,1001,8,9,9,1001,83,1001,1001,8,14,9,1001,9,1001,44,1001,1001,59,11,94,64,7,10,1001,1001,1001,32,957,10,9,10,9,1001,1001,1001,1001,9,8,8,9,9,1001,1001,1001,19,601,14,9,13,94,1001,1001,1001,98,8,17,22,7,13,1001,1001,1001,17,17,11,11,9,908,22,1001,1001,17,1001,9,8,429,1001,10,1001,1001,1001,15,706,20,17,13,16,1001,1001,11,17,16,9,8,10,70,1001,1001,175,8,8,8,8,64,13,1001,1001,1001,9,8,138,13,13,10,1001,1001,1001,559,38,10,10,10,10,1001,1001,395,1001,9,8,10,1001,1001,1001,1001,53,288,14,14,18,13,1001,1001,1001,1001,9,8,33,14,7,1001,1001,1001,1001,88,1001,10,35,17,1001,1001,1001,1001,37,35,9,8,18,1001,1001,1001,11,20,385,18,10,56,13,1001,1001,1001,12,10,10,9,28,10,1001,1001,17,25,8,9,9,9,1001,1001,1001,26,14,9,41,1001,13,922,1001,1001,184,11,15,10,1001,10,1001,1001,1001,1001,45,1001,9,10,10,1001,1001,1001,1001,9,8,10,1001,18,10,1001,1001,11,11,11,11,10,10,10,1001,1001,11,8,10,10,10};
int Main()
{
scanf("%d",&x);
if(biao[x]>L) return printf("%d %d %d\n",L+1,L+1,L+1),0;
for(int i=-L;i<=L;i++){
int j=biao[x];
int p=x-j*j*j-i*i*i;
double l=pow(abs(p),1.0/3);
if(p<0) l=-l;
int o=l;
if(o*o*o==p){
return printf("%d %d %d\n",i,j,o),0;
}
o=l+1;
if(o*o*o==p){
return printf("%d %d %d\n",i,j,o),0;
}
o=l-1;
if(o*o*o==p){
return printf("%d %d %d\n",i,j,o),0;
}
j=-biao[x];
p=x-j*j*j-i*i*i;
l=pow(abs(p),1.0/3);
if(p<0) l=-l;
o=l;
if(o*o*o==p){
return printf("%d %d %d\n",i,j,o),0;
}
o=l+1;
if(o*o*o==p){
return printf("%d %d %d\n",i,j,o),0;
}
o=l-1;
if(o*o*o==p){
return printf("%d %d %d\n",i,j,o),0;
}
}
puts("写挂了");
return 0;
}
int main()
{
int Case=1;
scanf("%d%d",&L,&Case);
while(Case--) Main();
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:
写挂了 16 0 -13 写挂了 写挂了 16 0 -12 写挂了 58 -77 64 写挂了 写挂了 -8 14 -11
result:
wrong output format Expected integer, but "写挂了" found
Test #2:
score: 0
Wrong Answer
time: 0ms
memory: 1264kb
input:
99 10 6139 3749 7532 3544 3976 345 522 8442 6400 7965
output:
写挂了 写挂了 写挂了 写挂了 写挂了 1 7 1 -11 12 5 写挂了 写挂了 写挂了
result:
wrong output format Expected integer, but "写挂了" found
Test #3:
score: 0
Wrong Answer
time: 0ms
memory: 1268kb
input:
98 10 5078 9597 9394 9368 8777 6955 8020 5115 398 3771
output:
写挂了 写挂了 写挂了 写挂了 写挂了 写挂了 写挂了 写挂了 1 -11 12 写挂了
result:
wrong output format Expected integer, but "写挂了" found
Test #4:
score: 0
Wrong Answer
time: 222ms
memory: 1332kb
input:
91 10000 163 6364 2583 7101 5320 483 6442 1028 1209 1710 5617 296 7228 1593 4580 5559 9699 2015 6397...
output:
-26 30 -21 -21 0 25 写挂了 写挂了 -8 0 18 -4 14 -13 写挂了 写挂了 写挂了 写挂了 \xe5\x86...
result:
wrong output format Expected integer, but "写挂了" found
Test #5:
score: 0
Wrong Answer
time: 223ms
memory: 1336kb
input:
91 10000 6480 8776 1711 1745 4845 3338 343 3167 8450 2756 2252 4375 4912 9822 8053 1533 1216 4161 61...
output:
写挂了 写挂了 写挂了 写挂了 写挂了 写挂了 -91 7 91 写挂了 写挂了 写挂了 \xe5...
result:
wrong output format Expected integer, but "写挂了" found
Test #6:
score: 0
Wrong Answer
time: 267ms
memory: 1332kb
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 4 3 写挂了 写挂了 -52 62 -46 写挂了 写挂了 写挂了 写挂了 -4 11 -10 96 96 96 写\xe6...
result:
wrong output format Expected integer, but "写挂了" found
Test #7:
score: 0
Wrong Answer
time: 2599ms
memory: 1336kb
input:
952 10000 2160 9764 2079 4616 9459 4653 4400 6373 2089 7189 4202 4497 6684 119 1191 2206 9287 5365 1...
output:
写挂了 写挂了 写挂了 写挂了 写挂了 写挂了 写挂了 写挂了 写挂了 写挂了 ...
result:
wrong output format Expected integer, but "写挂了" found
Test #8:
score: 0
Wrong Answer
time: 2694ms
memory: 1332kb
input:
992 10000 2576 3876 8352 3311 9101 5255 5420 145 7396 6040 8529 9794 5164 4302 7147 3683 152 1136 79...
output:
写挂了 写挂了 写挂了 -4 0 15 写挂了 写挂了 写挂了 -8 10 -7 写挂了 写挂了 写...
result:
wrong output format Expected integer, but "写挂了" found
Test #9:
score: 0
Wrong Answer
time: 2386ms
memory: 1332kb
input:
996 10000 2189 8757 4831 6765 991 2216 9313 7968 7020 9945 988 9422 7315 2132 2333 5962 1798 8184 22...
output:
-2 0 13 写挂了 写挂了 写挂了 -2 10 -1 写挂了 写挂了 写挂了 写挂了 写挂了 -7 ...
result:
wrong output format Expected integer, but "写挂了" found
Test #10:
score: 0
Wrong Answer
time: 2461ms
memory: 1336kb
input:
988 10000 1785 1065 1261 3054 2475 693 9109 9404 1153 4364 1847 8539 4364 9471 6183 6855 303 306 635...
output:
写挂了 写挂了 -20 0 21 写挂了 写挂了 44 -56 45 写挂了 写挂了 写挂了 写挂了 \xe5...
result:
wrong output format Expected integer, but "写挂了" found