QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#691771#9296. Golden SpiritBlizzardWA 3ms3704kbC++23455b2024-10-31 12:57:172024-10-31 12:57:17

Judging History

你现在查看的是最新测评结果

  • [2024-10-31 12:57:17]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:3704kb
  • [2024-10-31 12:57:17]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

int main()
{
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	int t;
	cin >> t;
	while(t--)
	{
		int n , x , m;
		cin >> n >> x >> m;
		int nowt = 2 * n * m;
		int t1 , t2;
		if(x <= (nowt - m))
		{
			cout << 2 * nowt << '\n';
		}
		else	
		{
			t1 = x - nowt + m + nowt * 2;
			t2 = max(0 , x - nowt -  m) + nowt * 2;
			cout << min(t1 , t2) << '\n';
		}
	}
	
	return 0;
} 

 

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3704kb

input:

3
2 2 2
3 1 10
11 45 14

output:

16
120
616

result:

ok 3 lines

Test #2:

score: -100
Wrong Answer
time: 3ms
memory: 3648kb

input:

10000
3050395 689380 200550
5885929 822329 269033
6682339 28476 346976
9571342 934182 89292
9928491 668975 401621
6524373 173981 202472
5331629 482403 456644
9661686 231207 298636
5454412 961564 632648
5186684 9125 590489
8036028 738212 913802
1211903 553317 790831
6044436 222947 254859
2202128 6558...

output:

-551756030
-1040214972
-1342484452
-107599190
-773033496
1201626144
-1180101753
-1781592661
-566429804
1472665712
-2111410998
-1763949756
-1362411664
-296635404
-2028574860
-626161180
2136220744
-807648048
-1530319949
74466060
801811348
157894424
-1802708872
-1510465807
-2136827600
-47449200
-186815...

result:

wrong answer 1st lines differ - expected: '2447026869000', found: '-551756030'