HDU6330-2018ACM暑假多校联合训练Problem L. Visual Cube

时间:2023-03-09 18:20:04
HDU6330-2018ACM暑假多校联合训练Problem L. Visual Cube

就是画个图啦

分三个平面去画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 ;
}