UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#214452#2386. 回忆zhengpie2020ms1972kbC++757b2024-11-18 22:06:432024-11-19 08:37:47

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define ioimprove(); ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define FILE(x); freopen(x".in","r",stdin); freopen(x".out","w",stdout);
int n,a[305][305],f[305];
signed main()
{
	ioimprove();
	cin>>n;
	for(int i = 1;i <= n;i++)
		for(int j = i + 1;j <= n;j++) cin>>a[i][j];
	if(n == 1)
	{
		cout<<114514;
		return 0;
	}
	if(n == 2)
	{
		cout<<1<<" "<<a[1][2] - 1;
		return 0;
	}
	int tmp = (a[1][2] + a[1][3] + a[2][3]) / 2;
	f[1] = tmp - a[2][3],f[2] = tmp - a[1][3],f[3] = tmp - a[1][2];
	for(int i = 4;i <= n;i++)
	{
		tmp = (a[1][2] + a[1][i] + a[2][i]) / 2;
		f[i] = tmp - f[1] - f[2];
	}
	for(int i = 1;i <= n;i++) cout<<f[i]<<" ";
	
	return 0;
}

详细

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

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 1260kb

input:

5
4 5 9 9 10 13 14 14 15 19

output:

-1 4 5 10 10 

result:

wrong answer Your answer is incorrect.

Test #2:

score: 10
Accepted
time: 0ms
memory: 1260kb

input:

5
5 9 9 10 12 12 13 16 17 17

output:

1 4 8 8 9 

result:

ok Your answer is correct.

Test #3:

score: 10
Accepted
time: 0ms
memory: 1260kb

input:

5
10 11 12 13 13 14 15 15 16 17

output:

4 6 7 8 9 

result:

ok Your answer is correct.

Test #4:

score: 0
Wrong Answer
time: 0ms
memory: 1372kb

input:

50
9 13 15 20 20 20 21 22 22 26 26 26 27 27 27 28 29 31 31 32 32 33 33 33 33 33 34 34 34 35 35 36 37...

output:

-10 19 23 24 27 27 27 28 28 28 31 31 31 31 31 31 32 32 34 34 34 34 35 35 35 35 36 36 36 37 37 37 38 ...

result:

wrong answer Your answer is incorrect.

Test #5:

score: 0
Wrong Answer
time: 0ms
memory: 1376kb

input:

50
9 11 14 14 16 16 16 18 19 19 21 21 21 21 22 22 23 23 23 23 24 25 25 26 26 26 26 26 26 26 27 27 27...

output:

-6 15 17 18 18 19 19 19 21 21 21 22 22 23 23 23 23 24 24 24 24 25 25 26 26 26 26 26 26 26 26 27 27 2...

result:

wrong answer Your answer is incorrect.

Test #6:

score: 0
Wrong Answer
time: 0ms
memory: 1372kb

input:

50
7 9 12 16 19 21 26 27 29 29 31 33 33 33 34 35 36 36 36 36 37 38 38 38 38 39 39 40 40 40 41 41 42 ...

output:

-17 23 25 28 30 32 33 36 36 38 38 39 40 40 41 41 42 43 43 43 43 43 44 44 44 44 45 45 46 46 46 47 47 ...

result:

wrong answer Your answer is incorrect.

Test #7:

score: 0
Wrong Answer
time: 6ms
memory: 1972kb

input:

300
660422 717145 1052261 1191442 1526558 1583281 1636913 1972029 2028752 2207583 2247577 2427928 25...

output:

-6212023 6872445 6929168 7100467 7173300 7352732 7394443 7424952 7595234 7638324 7730797 7760183 785...

result:

wrong answer Your answer is incorrect.

Test #8:

score: 0
Wrong Answer
time: 5ms
memory: 1968kb

input:

300
1719032 1728175 1968715 2265775 2506315 2515458 2534303 2752316 3002166 3035709 3071903 3081046 ...

output:

-4611366 6330397 6339540 6473792 6624127 6755393 6764536 6776945 6893997 7037973 7068527 7089613 710...

result:

wrong answer Your answer is incorrect.

Test #9:

score: 0
Wrong Answer
time: 2ms
memory: 1968kb

input:

300
725653 809390 819383 974701 984694 1058923 1068431 1068916 1152653 1317964 1422171 1432164 15159...

output:

-4602328 5327981 5411718 5418729 5504441 5511986 5562907 5577340 5598486 5647695 5744877 5817225 582...

result:

wrong answer Your answer is incorrect.

Test #10:

score: 0
Wrong Answer
time: 7ms
memory: 1972kb

input:

300
2355315 3132486 3240117 3325566 3662015 3854305 3961936 4047385 4053636 4142315 4383834 4725290 ...

output:

-4474917 6830232 7607403 7669003 7728269 7903672 8003325 8057628 8105141 8114096 8173918 8301133 847...

result:

wrong answer Your answer is incorrect.