Submission #63273619


Source Code Expand

Copy
#include<bits/stdc++.h>
#define inf long long
#define pii pair<int,int>
#define p1 first
#define p2 second
using namespace std;
const int maxn=50+5;
int n;
char a[maxn][maxn];
int main()
{
//freopen("c.in","r",stdin);
//freopen("c.out","w",stdout);
cin>>n;
for(int i=1;i<=n;i++)
{
int j=n+1-i;
if(i<=j)
{
for(int x=i;x<=j;x++)
{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include<bits/stdc++.h>
#define inf long long
#define pii pair<int,int>
#define p1 first
#define p2 second
using namespace std;
const int maxn=50+5;
int n;
char a[maxn][maxn];
int main()
{
	//freopen("c.in","r",stdin);
	//freopen("c.out","w",stdout);
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		int j=n+1-i;
		if(i<=j)
		{
			for(int x=i;x<=j;x++)
			{
				for(int y=i;y<=j;y++)
				{
					a[x][y]=(i%2)?'#':'.';
				}
			}
		}
	}
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=n;j++)
		{
			cout<<a[i][j];
		}
		cout<<'\n';
	}
	return 0;
}

Submission Info

Submission Time
Task B - Make Target
User sjc2
Language C++ 17 (Clang 16.0.6)
Score 200
Code Size 568 Byte
Status AC
Exec Time 1 ms
Memory 3636 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 4
AC × 20
Set Name Test Cases
Sample 00-sample-001.txt, 00-sample-002.txt, 00-sample-003.txt, 00-sample-004.txt
All 00-sample-001.txt, 00-sample-002.txt, 00-sample-003.txt, 00-sample-004.txt, 01-random-001.txt, 01-random-002.txt, 01-random-003.txt, 01-random-004.txt, 01-random-005.txt, 01-random-006.txt, 01-random-007.txt, 01-random-008.txt, 01-random-009.txt, 01-random-010.txt, 01-random-011.txt, 01-random-012.txt, 01-random-013.txt, 01-random-014.txt, 01-random-015.txt, 01-random-016.txt
Case Name Status Exec Time Memory
00-sample-001.txt AC 1 ms 3516 KB
00-sample-002.txt AC 1 ms 3500 KB
00-sample-003.txt AC 1 ms 3508 KB
00-sample-004.txt AC 1 ms 3400 KB
01-random-001.txt AC 1 ms 3400 KB
01-random-002.txt AC 1 ms 3432 KB
01-random-003.txt AC 1 ms 3636 KB
01-random-004.txt AC 1 ms 3368 KB
01-random-005.txt AC 1 ms 3572 KB
01-random-006.txt AC 1 ms 3508 KB
01-random-007.txt AC 1 ms 3512 KB
01-random-008.txt AC 1 ms 3408 KB
01-random-009.txt AC 1 ms 3440 KB
01-random-010.txt AC 1 ms 3568 KB
01-random-011.txt AC 1 ms 3504 KB
01-random-012.txt AC 1 ms 3512 KB
01-random-013.txt AC 1 ms 3372 KB
01-random-014.txt AC 1 ms 3480 KB
01-random-015.txt AC 1 ms 3436 KB
01-random-016.txt AC 1 ms 3488 KB


2025-04-05 (Sat)
20:30:39 +00:00