UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#213121#2348. Lifequliannanyishou0653ms2428kbC++11587b2024-11-09 20:31:182024-11-09 23:15:27

answer

#include <bits/stdc++.h>
using namespace std;
long long l,q,x,c[2020];
bool flag;
struct hh
{
	int a;
	int b;
};
map <long long,hh> m; 
int main()
{
	cin>>l>>q;
	for(int i=-l;i<=l;++i)
	{
		c[i+l]=i*i*i;
		for(int j=i;j>=-l;j--)
		{
			m[c[i+l]+c[j+l]].a=i;
			m[c[i+l]+c[j+l]].b=j;
		}
	}
	while(q--)
	{
		cin>>x;
		flag=0;
		for(int i=-l;i<=l;++i)
		{
			if(m.find(x-c[i+l])!=m.end())
			{
				printf("%ld %ld %ld\n",m[x-c[i+l]].a,m[x-c[i+l]].b,i);
				flag=1;
				break;
			}
		}
		if(!flag)
		{
			printf("%ld %ld% ld\n",l+1,l+1,l+1);
		}
	}
}

详细

小提示:点击横条可展开更详细的信息

Test #1:

score: 0
Wrong Answer
time: 8ms
memory: 2404kb

input:

98 10
5487
1899
3043
5373
2368
3993
723
9567
6812
901

output:

47 4294967286 4294967250
72 44 4294967219
42 4294967267 4294967260
66 45 4294967224
16 0 4294967284
...

result:

wrong output format Expected int32, but "4294967286" found

Test #2:

score: 0
Wrong Answer
time: 11ms
memory: 2428kb

input:

99 10
6139
3749
7532
3544
3976
345
522
8442
6400
7965

output:

100 100 100
100 100 100
21 4294967295 4294967284
57 4294967256 4294967247
50 42 4294967238
7 1 1
12 ...

result:

wrong output format Expected int32, but "4294967295" found

Test #3:

score: 0
Wrong Answer
time: 9ms
memory: 2408kb

input:

98 10
5078
9597
9394
9368
8777
6955
8020
5115
398
3771

output:

99 99 99
99 99 99
21 5 2
44 4294967284 4294967254
46 4294967281 4294967252
59 26 4294967236
21 42949...

result:

wrong output format Expected int32, but "4294967284" found

Test #4:

score: 0
Wrong Answer
time: 244ms
memory: 2248kb

input:

91 10000
163
6364
2583
7101
5320
483
6442
1028
1209
1710
5617
296
7228
1593
4580
5559
9699
2015
6397...

output:

91 4294967228 4294967220
43 4294967272 4294967257
13 9 4294967289
30 4294967290 4294967269
82 36 429...

result:

wrong output format Expected int32, but "4294967228" found

Test #5:

score: 0
Wrong Answer
time: 218ms
memory: 2248kb

input:

91 10000
6480
8776
1711
1745
4845
3338
343
3167
8450
2756
2252
4375
4912
9822
8053
1533
1216
4161
61...

output:

87 4294967257 4294967212
62 61 4294967219
58 4294967263 4294967242
23 21 4294967269
22 13 4294967276...

result:

wrong output format Expected int32, but "4294967257" found

Test #6:

score: 0
Wrong Answer
time: 163ms
memory: 2340kb

input:

95 10000
91
6885
8279
384
5310
2877
4483
2176
267
393
5446
7415
3853
4223
8480
3368
6752
9898
5779
7...

output:

6 0 4294967291
69 68 4294967210
63 4294967260 4294967238
62 4294967250 4294967244
17 12 4294967285
1...

result:

wrong output format Expected int32, but "4294967291" found

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:

82 80 4294967194
633 347 4294966630
667 4294966939 4294966665
802 4294966836 4294966548
28 11 429496...

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:

252 226 4294966994
173 119 4294967106
909 4294966859 4294966422
903 4294966815 4294966441
501 429496...

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:

13 0 4294967294
301 4294967232 4294966996
96 32 4294967199
29 23 4294967265
712 671 4294966424
642 4...

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...

output:

28 4294967276 4294967273
184 121 4294967096
517 4294966919 4294966857
823 274 4294966463
180 122 429...

result: