QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#607302#1266. Visual CubeliukejieRE 0ms0kbC++141.9kb2024-10-03 14:38:452024-10-03 14:38:46

Judging History

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

  • [2024-10-03 14:38:46]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2024-10-03 14:38:45]
  • 提交

answer

// liukejie
// 2024-10-03 08:49:01
#include <bits/stdc++.h>
using namespace std;
#define rep(i, l, r) for(int i = l; i <= r; ++ i)
#define per(i, r, l) for(int i = r; i >= l; -- i)
const int N = 1000;
int Q, a, b, c;
char s[N][N];
int t[N];
main()
{
	freopen("draw.in", "r", stdin);
	freopen("draw.out", "w", stdout);
	scanf("%d", &Q);
	for(; Q; -- Q)
	{
		scanf("%d%d%d", &a, &b, &c);
		memset(s, '0', sizeof s);
		rep(i, 1, b * 2)
		{
			rep(j, 1, b * 2 - i + 1) s[i][j] = '.';
			t[i] = b * 2 - i + 1;
			if(i & 1)
			{
				int id = 0;
				rep(j, t[i] + 1, t[i] + 2 * a + 1)
				{
					++ id;
					if(id & 1) s[i][j] = '+';
					else s[i][j] = '-';
				}
			}
			else
			{
				int id = 0;
				rep(j, t[i] + 1, t[i] + 2 * a + 1)
				{
					++ id;
					if(id & 1) s[i][j] = '/';
					else s[i][j] = '.';
				}
			}
			t[i] += 2 * a + 1;
		}
		int id = 0;
		rep(i, b * 2 + 1, b * 2 + 1 + 2 * c)
		{
			++ id;
			if(id & 1)
			{
				rep(j, 1, 2 * a + 1)
				{
					if(j & 1) s[i][j] = '+';
					else s[i][j] = '-';
				}
			}
			else
			{
				rep(j, 1, 2 * a + 1)
				{
					if(j & 1) s[i][j] = '|';
					else s[i][j] = '.';
				}
			}
			t[i] = 2 * a + 1;
		}
		rep(i, 1, b * 2 + 1 + 2 * c)
		{
			if(i & 1)
			{
				int id = 0;
				rep(j, t[i] + 1, b * 2 + 1 + 2 * a)
				{
					++ id;
					if(id & 1) s[i][j] = '.';
					else s[i][j] = '+';
				}
			}
			else
			{
				int id = 0;
				if(s[i][t[i]] == '|') ++ id;
				rep(j, t[i] + 1, b * 2 + 1 + 2 * a)
				{
					++ id;
					if(id & 1) s[i][j] = '|';
					else s[i][j] = '/';
				}
			}
			t[i] = b * 2 + 1 + 2 * a;
		}
		id = 2 * b;
		per(i, b * 2 + 1 + 2 * c, 2 * c + 1)
		{
			per(j, t[i], t[i] - id + 1) s[i][j] = '.';
			-- id;
		}
		rep(i, 1, b * 2 + 1 + 2 * c)
		{
			rep(j, 1, t[i]) printf("%c", s[i][j]);
			puts("");
		}
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Dangerous Syscalls

input:

2
1 1 1
6 2 4

output:


result: