Submission #73294542
Source Code Expand
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using ull=unsigned long long;
const int INF = 1e9;
const long long INFLL = (long long)1e18;
const double PI = acos(-1);
//cout << fixed << setprecision(15) << ans << '\n';
int main()
{
int n,m=-1;cin>>n;
vector<string>s(n);
for(int i=0;i<n;i++)
{
cin>>s[i];
m=max(m,(int)s[i].size());
}
for(int i=0;i<n;i++)
{
int k=m-s[i].size();k/=2;
for(int j=0;j<k;j++)cout<<'.';
cout<<s[i];
for(int j=0;j<k;j++)cout<<'.';
cout<<"\n";
}
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Center Alignment |
| User | maou1 |
| Language | C++23 (GCC 15.2.0) |
| Score | 200 |
| Code Size | 603 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3612 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_01.txt, 00_sample_02.txt |
| All | 00_sample_01.txt, 00_sample_02.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 02_min_01.txt, 03_max_01.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_01.txt | AC | 1 ms | 3496 KiB |
| 00_sample_02.txt | AC | 1 ms | 3612 KiB |
| 01_random_01.txt | AC | 1 ms | 3452 KiB |
| 01_random_02.txt | AC | 1 ms | 3452 KiB |
| 01_random_03.txt | AC | 1 ms | 3456 KiB |
| 01_random_04.txt | AC | 1 ms | 3548 KiB |
| 01_random_05.txt | AC | 1 ms | 3456 KiB |
| 01_random_06.txt | AC | 1 ms | 3584 KiB |
| 02_min_01.txt | AC | 1 ms | 3612 KiB |
| 03_max_01.txt | AC | 1 ms | 3568 KiB |