提出 #56535539
ソースコード 拡げる
// I AM A MUSLIM
#include "bits/stdc++.h"
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#define fastIO std::ios::sync_with_stdio(0);std::cin.tie(0)
#define ll long long int
#define flush fflush(stdout)
#define bl printf("\n")
#define yn(a, b) printf("%s\n", a >= b ? "Yes":"No")
// #define int ll
using pii = std::pair<int,int>;
const int MOD = 1000000007;
// const int MOD = 998244353;
const int mxN = 100100;
signed main() {
// fastIO;
int testCases=1;
// scanf("%d",&testCases);
// std::cin >> testCases;
for (int TC = 1; TC <= testCases; TC++) {
int N;
scanf("%d",&N);
std::vector<std::string> a(N);
for (int i = 0; i < N; i++) {
std::string s;
std::cin >> s;
a[i] = s;
}
for (int col = 0; col < 100; col++) {
std::string ans;
for (int i = N-1; i >= 0; i--) {
if (col < (int)a[i].size()) {
ans += a[i][col];
} else {
ans += '*';
}
}
while ((int)ans.size() && ans.back() == '*') ans.pop_back();
if (ans != "") printf("%s\n",ans.c_str());
}
}
return 0;
}
/*
*/
提出情報
| 提出日時 | |
|---|---|
| 問題 | B - Vertical Writing |
| ユーザ | MArhamAA1422 |
| 言語 | C++ 20 (Clang 16.0.6) |
| 得点 | 200 |
| コード長 | 1326 Byte |
| 結果 | AC |
| 実行時間 | 1 ms |
| メモリ | 3868 KiB |
コンパイルエラー
./Main.cpp:5:13: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma GCC optimize("O3,unroll-loops")
^
./Main.cpp:6:13: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
^
./Main.cpp:17:11: warning: unused variable 'MOD' [-Wunused-const-variable]
const int MOD = 1000000007;
^
./Main.cpp:19:11: warning: unused variable 'mxN' [-Wunused-const-variable]
const int mxN = 100100;
^
4 warnings generated.
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 200 / 200 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| 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, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 02_handmade_01.txt, 02_handmade_02.txt, 02_handmade_03.txt, 02_handmade_04.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 00_sample_01.txt | AC | 1 ms | 3500 KiB |
| 00_sample_02.txt | AC | 1 ms | 3604 KiB |
| 01_random_01.txt | AC | 1 ms | 3792 KiB |
| 01_random_02.txt | AC | 1 ms | 3740 KiB |
| 01_random_03.txt | AC | 1 ms | 3592 KiB |
| 01_random_04.txt | AC | 1 ms | 3608 KiB |
| 01_random_05.txt | AC | 1 ms | 3596 KiB |
| 01_random_06.txt | AC | 1 ms | 3868 KiB |
| 01_random_07.txt | AC | 1 ms | 3744 KiB |
| 01_random_08.txt | AC | 1 ms | 3640 KiB |
| 01_random_09.txt | AC | 1 ms | 3864 KiB |
| 01_random_10.txt | AC | 1 ms | 3712 KiB |
| 01_random_11.txt | AC | 1 ms | 3620 KiB |
| 01_random_12.txt | AC | 1 ms | 3776 KiB |
| 01_random_13.txt | AC | 1 ms | 3508 KiB |
| 01_random_14.txt | AC | 1 ms | 3604 KiB |
| 01_random_15.txt | AC | 1 ms | 3612 KiB |
| 02_handmade_01.txt | AC | 1 ms | 3796 KiB |
| 02_handmade_02.txt | AC | 1 ms | 3792 KiB |
| 02_handmade_03.txt | AC | 1 ms | 3688 KiB |
| 02_handmade_04.txt | AC | 1 ms | 3636 KiB |