結果
問題 |
No.3035 文字列のみの反転
|
ユーザー |
![]() |
提出日時 | 2025-03-01 07:33:58 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 895 bytes |
コンパイル時間 | 6,290 ms |
コンパイル使用メモリ | 333,024 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-03-01 07:34:05 |
合計ジャッジ時間 | 7,002 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
ソースコード
#ifdef YONIHA #include <yoniha/all.h> #else #include <bits/stdc++.h> #include <atcoder/all> #endif using namespace std; using namespace atcoder; #define int long long #define all(x) (x).begin(), (x).end() #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(i, n) for(int i = (int)(n - 1); i >= 0; i--) template <typename T> bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;} template <typename T> bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;} using vi = vector<int>; using vvi = vector<vector<int>>; using vb = vector<bool>; using vvb = vector<vector<bool>>; using vs = vector<string>; using pii = pair<int, int>; /* using mint = modint; using vm = vector<mint>; using vvm = vector<vector<mint>>; */ signed main(){ string s; cin >> s; int i = 0; while(isalpha(s.at(i))) i++; reverse(s.begin(), s.begin() + i); cout << s << endl; }