HDU6330-2018ACM暑假多校联合训练Problem L. Visual Cube
2024-08-27 09:07:24
就是画个图啦
分三个平面去画orz
#include <iostream>
#include <cmath>
#include <cstring>
#include <algorithm> using namespace std; int mp[][]; int main()
{
ios::sync_with_stdio(false);
int t;
cin >> t;
while (t--)
{
for (int i = ; i < ; i++)
for (int j = ; j < ; j++)
mp[i][j] = ;
int a, b, c;
cin >> a >> c >> b; for (int i = ; i <= b * ; i++)
{
for (int j = ; j <= a * ; j++)
{
if (i % == )
{
if (j % == )
mp[i][j] = ;
else
mp[i][j] = ;
}
else
{
if (j % == )
mp[i][j] = ;
}
}
}
int num = ;
for (int i = b * + ; i <= (b + c) * ; i++)
{
for (int j = num; j <= (a + c) * ; j++)
{ if (i % == )
{
if (j % == )
mp[i][j] = ; }
else
{
if (j % == )
mp[i][j] = ;
else
mp[i][j] = ;
}
if ((j - num) == (a * ))
break;
}
num++;
}
for (int i = ; i <= * b; i++)
{
int y = i;
for (int j = a * + ; j <= (a + c) * ; j++)
{
if (i % == )
{
if (j % == )
mp[y][j] = ;
else
mp[y][j] = ;
}
else
{
if (j % == )
mp[y][j] = ;
}
y++;
}
}
for (int i = (b + c) * ; i >= ; i--)
{
for (int j = ; j <= (a + c) * ; j++)
{
if (mp[i][j] == )
cout << ".";
else if (mp[i][j] == )
cout << "+";
else if (mp[i][j] == )
cout << "-";
else if (mp[i][j] == )
cout << "|";
else
cout << "/";
}
cout << endl;
}
}
return ;
}
最新文章
- 解决jQuery多个版本,与其他js库冲突方法
- 常用mysql语句
- Orcal函数
- 学习RxJS:Cycle.js
- POJ 2054 Color a Tree
- shell常用代码积累
- 启用PowerShell Web Access
- 1965: [Ahoi2005]SHUFFLE 洗牌
- android studio创建一个最简单的跳转activity
- saiku显示不出新的cube(加载的cube,saiku会保存到缓存中,不重新加载)
- C 一维数组 冒泡排序,查最大值
- PID 通俗解释
- MYSQL数据仓库infobright【备忘】
- Nginx HTTP 过滤addition模块(响应前后追加数据)
- MATLAB中批量导入.mat文件(每个文件多变量)
- QT开发之旅三串口设备调试工具
- cgroups简单使用
- 20145204《Java程序设计》第10周学习总结
- 黄聪:WIN7下回收站不小心删除的文件怎么恢复,免费数据恢复软件下载
- 解决64位debian下无法安装ia32库的问题