QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#125171#4966. Decimal XORAmys4nWA 1ms3444kbC++14865b2023-07-16 04:04:022023-07-16 04:04:03

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-16 04:04:03]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3444kb
  • [2023-07-16 04:04:02]
  • 提交

answer

#include <bits/stdc++.h>
//ac
using namespace std;

int main() {
    string s;

    cin >> s;

    if(s.size()==1){
        cout << 1 << endl;
    } else {
        for(int i=0; i<s.size()-1; i++){
            if(s[i]=='a' or s[i]=='e' or s[i]=='i' or s[i]=='o' or s[i]=='u'){
                if(s[i+1]!='a' and s[i+1]!='e' and s[i+1]!='i' and s[i+1]!='o' and s[i+1]!='u'){
                    continue;
                } else{
                    cout << 0  << endl;
                    return 0;
                }
            } else {
                if(s[i+1]=='a' or s[i+1]=='e' or s[i+1]=='i' or s[i+1]=='o' or s[i+1]=='u'){
                    continue;
                } else{
                    cout << 0 << endl;
                    return 0;
                }
            }
        }
            cout << 1 << endl;

    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3444kb

input:

22776
15954

output:

0

result:

wrong answer 1st lines differ - expected: '09099', found: '0'