結果
問題 | No.1643 Not Substring |
ユーザー |
|
提出日時 | 2021-08-13 21:25:35 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 3,002 bytes |
コンパイル時間 | 1,668 ms |
コンパイル使用メモリ | 167,476 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-03 21:18:51 |
合計ジャッジ時間 | 2,622 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 26 |
ソースコード
#include <bits/stdc++.h>using namespace std;// clang-format off//#include <atcoder/all>//using namespace atcoder;using ll = long long;using ld = long double;using pii = pair<int, int>;using pll = pair<ll, ll>;using pdd = pair<ld, ld>;using vii = vector<int>;using vll = vector<ll>;using vdd = vector<ld>;using vvii = vector<vector<int>>;using vvll = vector<vector<ll>>;using vvdd = vector<vector<ld>>;using vvvii = vector<vector<vector<int>>>;using vvvll = vector<vector<vector<ll>>>;using vvvdd = vector<vector<vector<ld>>>;template<class T, class U> using P = pair<T, U>;template<class T> using V = vector<T>;template<class T> using V2 = vector<vector<T>>;template<class T> using V3 = vector<vector<vector<T>>>;template<class T> using pque = priority_queue<T, vector<T>, greater<T>>;#define _overload3(_1, _2, _3, name, ...) name#define rep1(n) for (ll i = 0; i < (n); i++)#define rep2(i, n) for (ll i = 0; i < (n); i++)#define rep3(i, a, b) for (ll i = (a); i < (b); i++)#define rep(...) _overload3(__VA_ARGS__, rep3, rep2, rep1)(__VA_ARGS__)#define rrep1(n) for (ll i = (n) - 1; i >= 0; i--)#define rrep2(i, n) for (ll i = (n) - 1; i >= 0; i--)#define rrep3(i, a, b) for (ll i = (b) - 1; i >= (a); i--)#define rrep(...) _overload3(__VA_ARGS__, rrep3, rrep2, rrep1)(__VA_ARGS__)#define all(x) (x).begin(), (x).end()#define sz(x) ((int)(x).size())#define fi first#define se second#define pb push_back#define endl '\n'#define popcnt(x) __builtin_popcountll(x)#define uniq(x) (x).erase(unique((x).begin(), (x).end()), (x).end());#define IOS ios::sync_with_stdio(false); cin.tie(nullptr);const int inf = 1 << 30;const ll INF = 1ll << 60;const ld DINF = numeric_limits<ld>::infinity();const ll mod = 1000000007;const ll modd = 998244353;const ld EPS = 1e-9;const ld PI = 3.1415926535897932;const ll dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};const ll dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }template<typename T> T min(const vector<T> &x) { return *min_element(all(x)); }template<typename T> T max(const vector<T> &x) { return *max_element(all(x)); }template<class T, class U> ostream &operator<<(ostream &os, const pair<T, U> &p) { return os << "(" << p.fi << ", " << p.se << ")"; }template<class T> ostream &operator<<(ostream &os, const vector<T> &v) { os << "[ "; for (auto &z : v) os << z << " "; os << "]"; return os; }#define show(x) cout << #x << " = " << x << endlll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }ll rem(ll a, ll b) { return (a % b + b) % b; }// clang-format on// using mint = modint998244353;int main() {IOS;string s;cin >> s;int n = sz(s);int cnt = 0;rep(n) {if (s[i] == 'a') cnt++;}rep(cnt + 1) cout << 'a';cout << endl;return 0;}