Submission #68315826
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
// Typedef
typedef unsigned int uint;
typedef unsigned long long ull;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef map<int, int> mii;
typedef map<char, int> mci;
typedef map<ll, ll> mll;
typedef set<int> si;
// Macros
#define PB push_back
#define IN insert
#define all(x) x.begin(), x.end()
#define trav(i, a) for (auto &i : a)
#define GCD __gcd
#define MP make_pair
#define F first
#define S second
#define endl '\n'
#define sz(x) (ll)x.size()
#define LB lower_bound
#define UB upper_bound
#define DEBUG(i) cout << "DEBUG " << i << "\n";
#define CASE(i) cout << "Case " << i << ": ";
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define REP(i, a, b) for (int i = a; i <= b; i++)
#define REV(i, a, b) for (int i = a; i >= b; i--)
#define GT(x) greater<x>()
#define setpre(n) fixed << setprecision(n)
#define print(x) for(auto &i : x) cout << i << " " ; cout '\n'
#define SZ(x) x.size()
#define LEN(s) s.length()
#define MEM(arr, val) memset(arr, val, sizeof(arr));
// Functions
template <typename T>
void pv(vector<T> &a){
for (T u : a) cout << u << ' ';
cout << '\n';
}
template <typename T>
void pv2(vector<vector<T>> &a){
for (auto &aa : a) {
pv(aa);
}
}
// Constants
const ll MOD7 = 1e9 + 7;
const ll MOD9 = 998244353;
const int dx[4] = {-1, 1, 0, 0};
const int dy[4] = {0, 0, -1, 1};
// Custom Functions
void fast() {
ios::sync_with_stdio(false);
cin.tie(0);
}
ull LCM(ull a, ull b){
return (a * b) / GCD(a, b);
}
// Custom Comparator
bool cmp(const pair<char, pair<int, int>>& x, const pair<char, pair<int, int>>& y){
return x.F < y.F;
}
// Extra Info
// INT_MAX for max value... min_diff = INT_MAX
// INT_MIN for min value... max_sum = INT_MIN --> for Kadane's Algorithm
// Global Variables
// const int LMT = 1000 + 10;
// vector<vector<int>> adj(LMT);
// vector<bool> vis(LMT, 0);
// vi ans;
// bool isOk = 0;
void solve(ll tc){
int n;
cin >> n;
string s;
cin >> s;
if (n < 3){
cout << "No\n";
return;
}
if (s[n - 1] == 'a' && s[n - 2] == 'e' && s[n - 3] == 't'){
cout << "Yes\n";
return;
}
cout << "No\n";
}
int main(void){
fast();
// precal();
// freopen("fenceplan.in", "r", stdin);
// freopen("fenceplan.out", "w", stdout);
ll t = 1;
int i = 1;
// cin >> t;
// for (ll i = 1; i <= t; i++)
solve(i);
}
Submission Info
| Submission Time |
|
| Task |
A - I'm a teapot |
| User |
priashisg |
| Language |
C++ 17 (gcc 12.2) |
| Score |
100 |
| Code Size |
2839 Byte |
| Status |
AC |
| Exec Time |
1 ms |
| Memory |
3564 KiB |
Compile Error
Main.cpp: In function ‘void solve(ll)’:
Main.cpp:99:15: warning: unused parameter ‘tc’ [-Wunused-parameter]
99 | void solve(ll tc){
| ~~~^~
Main.cpp: In function ‘int main()’:
Main.cpp:135:8: warning: unused variable ‘t’ [-Wunused-variable]
135 | ll t = 1;
| ^
Judge Result
| Set Name |
Sample |
All |
| Score / Max Score |
0 / 0 |
100 / 100 |
| Status |
|
|
| Set Name |
Test Cases |
| Sample |
00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt |
| All |
00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 02_corner_00.txt, 02_corner_01.txt, 02_corner_02.txt, 02_corner_03.txt, 02_corner_04.txt, 02_corner_05.txt |
| Case Name |
Status |
Exec Time |
Memory |
| 00_sample_00.txt |
AC |
1 ms |
3424 KiB |
| 00_sample_01.txt |
AC |
1 ms |
3500 KiB |
| 00_sample_02.txt |
AC |
1 ms |
3420 KiB |
| 00_sample_03.txt |
AC |
1 ms |
3560 KiB |
| 01_random_00.txt |
AC |
1 ms |
3424 KiB |
| 01_random_01.txt |
AC |
1 ms |
3420 KiB |
| 01_random_02.txt |
AC |
1 ms |
3560 KiB |
| 01_random_03.txt |
AC |
1 ms |
3500 KiB |
| 01_random_04.txt |
AC |
1 ms |
3360 KiB |
| 01_random_05.txt |
AC |
1 ms |
3436 KiB |
| 02_corner_00.txt |
AC |
1 ms |
3416 KiB |
| 02_corner_01.txt |
AC |
1 ms |
3560 KiB |
| 02_corner_02.txt |
AC |
1 ms |
3564 KiB |
| 02_corner_03.txt |
AC |
1 ms |
3424 KiB |
| 02_corner_04.txt |
AC |
1 ms |
3476 KiB |
| 02_corner_05.txt |
AC |
1 ms |
3504 KiB |