結果
| 問題 |
No.1643 Not Substring
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-08-13 21:56:08 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 834 bytes |
| コンパイル時間 | 1,671 ms |
| コンパイル使用メモリ | 167,904 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-03 21:47:46 |
| 合計ジャッジ時間 | 2,092 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 26 |
ソースコード
//code of JUYU ^ ^ never doubt youself !
#include <bits/stdc++.h>
#define For(i,a,b) for(int i=a;i<=b;i++)
#define Rep(i,b,a) for(int i=a;i>=b;--i)
#define ms(a,b) memset(a,b,sizeof a)
#define fir first
#define sec second
#define eb emplace_back
#define pb push_back
#define mk make_pair
using namespace std;
typedef long long ll;
typedef pair<int,int> PII;
const int MOD = 1e9 + 7;
const int N = 1e5 + 10;
int ans; //exactly you can get the answer
int main()
{
string s; cin >> s;
int len = s.size();
For(i,0,len-1) if (s[i] == 'a') ans ++;
cout << 'a';
For(i,1,ans) cout << 'a';
cout << endl;
return 0;
}
/* stuff you should look for
* int overflow, array bounds
* special cases (n=1?)
* do smth instead of nothing and stay organized
* WRITE STUFF DOWN
* DON'T GET STUCK ON ONE APPROACH
-- Benq
*/