Submission #63249291
Source Code Expand
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <cstring>
using namespace std;
int a[55][55];
int main()
{
memset(a,-1,sizeof a);
int n;
cin >> n;
for(int i = 1;i <= n;i++)
{
int j = n + 1 - i;
if(i <= j)
{
for(int aa = i;aa <= j;aa++)
{
for(int b = i;b <= j;b++)
{
a[aa][b] = i % 2;
}
}
}
}
for(int i = 1;i <= n;i++)
{
for(int j = 1;j <= n;j++)
{
cout << (a[i][j] == 0 ? '.' : '#');
}
cout << endl;
}
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Make Target |
| User | Ekin123 |
| Language | C++ 20 (gcc 12.2) |
| Score | 200 |
| Code Size | 546 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3580 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| 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 | 3476 KiB |
| 00-sample-002.txt | AC | 1 ms | 3500 KiB |
| 00-sample-003.txt | AC | 1 ms | 3476 KiB |
| 00-sample-004.txt | AC | 1 ms | 3472 KiB |
| 01-random-001.txt | AC | 1 ms | 3452 KiB |
| 01-random-002.txt | AC | 1 ms | 3452 KiB |
| 01-random-003.txt | AC | 1 ms | 3440 KiB |
| 01-random-004.txt | AC | 1 ms | 3448 KiB |
| 01-random-005.txt | AC | 1 ms | 3504 KiB |
| 01-random-006.txt | AC | 1 ms | 3476 KiB |
| 01-random-007.txt | AC | 1 ms | 3564 KiB |
| 01-random-008.txt | AC | 1 ms | 3500 KiB |
| 01-random-009.txt | AC | 1 ms | 3504 KiB |
| 01-random-010.txt | AC | 1 ms | 3568 KiB |
| 01-random-011.txt | AC | 1 ms | 3444 KiB |
| 01-random-012.txt | AC | 1 ms | 3568 KiB |
| 01-random-013.txt | AC | 1 ms | 3516 KiB |
| 01-random-014.txt | AC | 1 ms | 3580 KiB |
| 01-random-015.txt | AC | 1 ms | 3568 KiB |
| 01-random-016.txt | AC | 1 ms | 3444 KiB |