/ SB域 /

记录详情

Accepted


  
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 1ms 384.0 KiB
#2 Accepted 2ms 352.0 KiB
#3 Accepted 1ms 384.0 KiB
#4 Accepted 1ms 384.0 KiB
#5 Accepted 1ms 384.0 KiB
#6 Accepted 1ms 384.0 KiB
#7 Accepted 1ms 384.0 KiB
#8 Accepted 1ms 384.0 KiB
#9 Accepted 2ms 384.0 KiB
#10 Accepted 1ms 384.0 KiB
#11 Accepted 2ms 384.0 KiB
#12 Accepted 1ms 384.0 KiB
#13 Accepted 1ms 384.0 KiB
#14 Accepted 1ms 384.0 KiB
#15 Accepted 1ms 384.0 KiB
#16 Accepted 2ms 384.0 KiB
#17 Accepted 1ms 384.0 KiB
#18 Accepted 1ms 384.0 KiB
#19 Accepted 2ms 384.0 KiB
#20 Accepted 1ms 384.0 KiB

代码

#include<iostream>
using namespace std;

int main() {
	int a,b,c,A,B,C,res;
	cin >> a >> b >> c;
	A = 1; B = 1; C = 1; res = 1; //定义初始状态:只有1个方块时,边长都为1,1,1 
	// A --> a, B = C = 1, 	A++ --> res += (B+C-1)
	res += (a-A) * (B+C-1);
	A = a;
	res += (b-B) * (A+C-1);
	B = b;
	res += (c-C) * (A+B-1);
	cout << res << endl;
	
	return 0;
}

信息

递交者
类型
递交
题目
六边形问题
题目数据
下载
语言
C++
递交时间
2021-09-28 17:38:15
评测时间
2021-09-28 17:38:15
评测机
分数
100
总耗时
38ms
峰值内存
384.0 KiB