提出 #461677
ソースコード 拡げる
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
#define FOR(i, n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
#define first F
#define second S
const int INF = 1 << 29;
const double EPS = 1e-9;
template<class T> ostream& operator<<(ostream &os, const vector<T> &v){ FOR(i, v.size()) { if(v[i] == INF) os << "INF"; else os << v[i]; if(i != v.size() - 1) os << ' '; } return os; }
const int MAX = INF;
int main() {
std::ios_base::sync_with_stdio(0);
int n;
string s[1024];
cin >> n;
for(int i = 0; i < n; i++) {
cin >> s[i];
}
map<char, bool> ok;
string k = "monica";
for(int i = 0; i < k.size(); i++) {
ok[k[i]] = true;
}
string ans = "";
for(int i = 0; i < n; i++) {
for(int j = 0; j < n; j++) {
if(ok[s[i][j]]) {
ans += s[i+1][j];
}
}
}
cout << ans << endl;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | I - 姫への愛情と朽ちた兜 |
| ユーザ | rif_rif |
| 言語 | C++ (GCC 4.9.2) |
| 得点 | 100 |
| コード長 | 1049 Byte |
| 結果 | AC |
| 実行時間 | 30 ms |
| メモリ | 928 KiB |
ジャッジ結果
| セット名 | All | ||
|---|---|---|---|
| 得点 / 配点 | 100 / 100 | ||
| 結果 |
|
| セット名 | テストケース |
|---|---|
| All | 00_sample_00.txt, 00_sample_01.txt, 10_min_00.txt, 10_min_01.txt, 10_min_02.txt, 20_max_00.txt, 20_max_01.txt, 20_max_02.txt, 90_random_00.txt, 90_random_01.txt, 90_random_02.txt, 90_random_03.txt, 90_random_04.txt, 90_random_05.txt, 90_random_06.txt, 90_random_07.txt, 90_random_08.txt, 90_random_09.txt, 99_final_00.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 00_sample_00.txt | AC | 25 ms | 920 KiB |
| 00_sample_01.txt | AC | 26 ms | 804 KiB |
| 10_min_00.txt | AC | 26 ms | 924 KiB |
| 10_min_01.txt | AC | 24 ms | 928 KiB |
| 10_min_02.txt | AC | 23 ms | 924 KiB |
| 20_max_00.txt | AC | 23 ms | 928 KiB |
| 20_max_01.txt | AC | 28 ms | 928 KiB |
| 20_max_02.txt | AC | 26 ms | 796 KiB |
| 90_random_00.txt | AC | 27 ms | 808 KiB |
| 90_random_01.txt | AC | 30 ms | 772 KiB |
| 90_random_02.txt | AC | 25 ms | 804 KiB |
| 90_random_03.txt | AC | 26 ms | 796 KiB |
| 90_random_04.txt | AC | 23 ms | 924 KiB |
| 90_random_05.txt | AC | 24 ms | 804 KiB |
| 90_random_06.txt | AC | 25 ms | 924 KiB |
| 90_random_07.txt | AC | 26 ms | 788 KiB |
| 90_random_08.txt | AC | 26 ms | 800 KiB |
| 90_random_09.txt | AC | 26 ms | 924 KiB |
| 99_final_00.txt | AC | 27 ms | 924 KiB |