QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#833005#9893. AbbreviationTJUHuangTaoAC ✓0ms3620kbC++23885b2024-12-26 11:54:502024-12-26 11:54:51

Judging History

This is the latest submission verdict.

  • [2024-12-26 11:54:51]
  • Judged
  • Verdict: AC
  • Time: 0ms
  • Memory: 3620kb
  • [2024-12-26 11:54:50]
  • Submitted

answer

#include <bits/stdc++.h>
// #define int long long
#define inf 0x3f3f3f3f
#define ll long long
#define pii pair<int, int>
#define tii tuple<int, int, int>
#define db double
#define all(a) a.begin(), a.end()
using namespace std;
const int maxn = 1e5 + 10;
const int mod = 998244353;
int arr[maxn], premx[maxn];
int pd(char ch) {
    for (auto it : {'a', 'e', 'i', 'o', 'u', 'y'})
        if (ch == it) return 1;
    return 0;
}
void solve() {
    string str; cin >> str;
    string ans;
    ans.push_back(str[0]);
    for (int i = 1; i < str.length(); i++)
        if (!pd(str[i])) ans.push_back(str[i]);
    cout << ans << "\n";
}
signed main() {
    // freopen("1.in", "r", stdin);
    // freopen("1.out", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);
    int t = 1;
    cin >> t;
    while (t--) solve();
    return 0;
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3620kb

input:

5
subconscious
oipotato
word
symbol
apple

output:

sbcnscs
optt
wrd
smbl
appl

result:

ok 5 lines

Test #2:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

100
evuvtgnuocmizhaoodsougfqlayicuyuqhseebmwwqrqyyjuybmrotygzgayhmqafzetjryeendzbiinuangouayqzaupoei
gyaeiiqipawkxulaeiloaluymziyvyoiuylaabaxufvndcflemuvataksquannevbyt
rbzhdyotmofsouzbealekdlxuqybykg
ovqdaavnljzasyoyiaryxliyudylstknljrydaoouanuloeylurroeeuarkyaavtidtihunrngaeiiapai
fxmxuxzbqjoemumu...

output:

evvtgncmzhdsgfqlcqhsbmwwqrqjbmrtgzghmqfztjrndzbnngqzp
gqpwkxlllmzvlbxfvndcflmvtksqnnvbt
rbzhdtmfszblkdlxqbkg
ovqdvnljzsrxldlstknljrdnllrrrkvtdthnrngp
fxmxxzbqjmmdhkxnmkmpbjzbtbqrjtqxjcbzcdltkdhmrttbsjsdgrmrbjzfrsn
yctqtjqgvwbfgmn
hfjgcrfnndjpjlqmvkbqrzphklngsrfwwvxfqfbdgflfnkwncqxx
unzngvfrpmbxzdmqz...

result:

ok 100 lines

Extra Test:

score: 0
Extra Test Passed