Submission #73293318


Source Code Expand

#include <algorithm>
//#include <atcoder/all>
//#include <array>
//#include <bitset>
//#include <cmath>
//#include <deque>
#include <iostream>
#include <map>
//#include <numeric>
#include <queue>
//#include <ranges>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define pb push_back
#define fr first
#define sc second
#define sor(v) sort(v.begin(), v.end())
#define rev(v) reverse(v.begin(), v.end())
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
using pint = pair<int,int>;
//using pll = pair<ll,ll>;
//using pqdec = priority_queue<int,vector<int>,greater<int>>;
//using pqdecl = priority_queue<ll,vector<ll>,greater<ll>>;
template <typename T>
using graph = vector<vector<T>>;
const ll LLMAX = 9223372*1e10;
const int IMAX = 214*1e7;
/*--------考察--------------------
----------CODING----------------*/
int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int n; cin >> n;
    vector<string> v(n);
    rep(i,n) cin >> v[i];
    int ms = 0;
    rep(i,n) ms = max(ms,(int)ssize(v[i]));
    rep(i,n){
        int ss = ssize(v[i]);
        string out = "";
        rep(j,(ms-ss)/2) out += '.';
        out += v[i];
        rep(j,(ms-ss)/2) out += '.';
        cout << out << '\n';
    }
}

Submission Info

Submission Time
Task B - Center Alignment
User scotch_at
Language C++23 (GCC 15.2.0)
Score 200
Code Size 1343 Byte
Status AC
Exec Time 1 ms
Memory 3760 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 10
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 3592 KiB
00_sample_02.txt AC 1 ms 3592 KiB
01_random_01.txt AC 1 ms 3632 KiB
01_random_02.txt AC 1 ms 3596 KiB
01_random_03.txt AC 1 ms 3644 KiB
01_random_04.txt AC 1 ms 3624 KiB
01_random_05.txt AC 1 ms 3760 KiB
01_random_06.txt AC 1 ms 3548 KiB
02_min_01.txt AC 1 ms 3476 KiB
03_max_01.txt AC 1 ms 3760 KiB