結果
問題 | No.536 人工知能 |
ユーザー | Shopetan |
提出日時 | 2017-06-30 22:29:16 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 1,309 bytes |
コンパイル時間 | 1,151 ms |
コンパイル使用メモリ | 145,064 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-07-27 19:27:52 |
合計ジャッジ時間 | 1,833 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,376 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,376 KB |
testcase_03 | AC | 1 ms
4,380 KB |
testcase_04 | AC | 1 ms
4,376 KB |
testcase_05 | AC | 2 ms
4,380 KB |
testcase_06 | AC | 2 ms
4,380 KB |
testcase_07 | AC | 2 ms
4,376 KB |
testcase_08 | AC | 1 ms
4,376 KB |
testcase_09 | AC | 1 ms
4,380 KB |
testcase_10 | AC | 1 ms
4,376 KB |
ソースコード
# include <bits/stdc++.h> # define FOR(i,a,b) for (int i=(a);i<(b);i++) # define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) # define REP(i, n) for (int i = 0; i < (int)(n); i++) # define RREP(i,n) for (int i=(n)-1;i>=0;i--) # define int(x) int x; scanf("%d",&x); # define vint(v,n) vector<int> v(n); REP(i,n) scanf("%d", &v[i]); # define string(x) string x; cin >> x; using namespace std; namespace utils{ template <typename T> void print(vector<vector<T>> mat) { REP (i, mat.size()) { REP (j, mat[0].size()) cout << mat[i][j] << ' '; cout << endl; } } template <typename T> void print(vector<T> v) { REP (i, v.size()) if (i >= v.size()-1) cout << v[i]; else cout << v[i] << ' '; cout << endl; } template <typename T> pair<T, T> shape(vector<vector<T>> mat) { int d1, d2; d1 = mat.size(); if (d1 > 0) d2 = mat[0].size(); else int d2 = 0; cout << "(" << d1 << ", " << d2 << ")" << endl; return make_pair(0, 0); } template <typename T> vector<vector<T>> empty(int n, int m) { vector<vector<T>> mat(n, vector<T>(m)); return mat; } } int main() { string(s); if(s[s.size()-2] == 'a' && s[s.size()-1] == 'i'){ s.replace(s.size()-2,2,"AI"); }else{ s = s + "-AI"; } cout << s << endl; }