QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#229937#1442. Even More Exciting GameckisekiWA 1ms3832kbC++141.3kb2023-10-28 17:16:542023-10-28 17:16:55

Judging History

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

  • [2023-10-28 17:16:55]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3832kb
  • [2023-10-28 17:16:54]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
void Lose() {
  cout << "Lose" << endl;
  exit(0);
}
void Win() {
  cout << "Win" << endl;
  exit(0);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  string s, t;
  cin >> s >> t;
  int cnt = 0;
  vector<int> key;
  for(int i = 0; i < t.length(); i++) {
    int k = 'z'+1-t[i];
    if(k == 1) cnt++;
    else {
      key.push_back(k);
      if(key.size() > 2) {
        Lose();
      }
    }
  }
  if(s == "Petro") {
    if(key.size() == 0) {
      if(cnt%3 == 0) Lose();
      else Win();
    }
    if(key.size() == 1) {
      if(cnt%3) Win();
      if(key[0] == 3) Lose();
      else Win();
    }
    if(key.size() == 2) {
      if(cnt%3 == 0) Lose();
      if(cnt%3 == 1) {
        if((key[0] == 2 && key[1] != 3) || (key[1] == 2 && key[0] != 3)) Win();
        else Lose();
      }
      if(cnt%3 == 2) {
        if(key[0] == 3 && key[1] == 3) Lose();
        else Win();
      }
      
    }
  }
  else {
    if(key.size() > 1) {
      Lose();
    }
    if(key.size() == 0) {
      if(cnt%3 == 2) Lose();
      else Win();
    }
    if(key.size() == 1) {
      if(cnt%3!=2) Lose();
      if(key[0] == 3) Lose();
      else Win();
    }
  }
  return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

1 Petro
a

output:

Win

result:

ok "Win"

Test #2:

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

input:

17 Oleg-Andriy
olegandriywillwin

output:

Lose

result:

ok "Lose"

Test #3:

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

input:

3 Oleg-Andriy
zzz

output:

Win

result:

ok "Win"

Test #4:

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

input:

5 Petro
zzzzz

output:

Win

result:

ok "Win"

Test #5:

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

input:

9 Oleg-Andriy
bfslyychn

output:

Lose

result:

ok "Lose"

Test #6:

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

input:

8 Petro
yzdtaows

output:

Lose

result:

ok "Lose"

Test #7:

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

input:

7 Oleg-Andriy
wsnbbfp

output:

Lose

result:

ok "Lose"

Test #8:

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

input:

8 Oleg-Andriy
tmwjdxhn

output:

Lose

result:

ok "Lose"

Test #9:

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

input:

7 Petro
rghrdob

output:

Lose

result:

ok "Lose"

Test #10:

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

input:

3495 Oleg-Andriy
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...

output:

Win

result:

ok "Win"

Test #11:

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

input:

2563 Oleg-Andriy
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzyzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...

output:

Lose

result:

ok "Lose"

Test #12:

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

input:

8195 Oleg-Andriy
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...

output:

Lose

result:

ok "Lose"

Test #13:

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

input:

7257 Oleg-Andriy
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...

output:

Win

result:

ok "Win"

Test #14:

score: 0
Accepted
time: 1ms
memory: 3540kb

input:

6325 Oleg-Andriy
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...

output:

Win

result:

ok "Win"

Test #15:

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

input:

11957 Oleg-Andriy
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...

output:

Lose

result:

ok "Lose"

Test #16:

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

input:

11019 Oleg-Andriy
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...

output:

Win

result:

ok "Win"

Test #17:

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

input:

4 Oleg-Andriy
zzzy

output:

Lose

result:

ok "Lose"

Test #18:

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

input:

4 Oleg-Andriy
zzzz

output:

Win

result:

ok "Win"

Test #19:

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

input:

3 Oleg-Andriy
zzy

output:

Win

result:

ok "Win"

Test #20:

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

input:

9 Oleg-Andriy
zzzzzzzzz

output:

Win

result:

ok "Win"

Test #21:

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

input:

6 Oleg-Andriy
zzzzzz

output:

Win

result:

ok "Win"

Test #22:

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

input:

9 Oleg-Andriy
zzzzzzzzy

output:

Win

result:

ok "Win"

Test #23:

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

input:

3 Oleg-Andriy
zzz

output:

Win

result:

ok "Win"

Test #24:

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

input:

6 Oleg-Andriy
zzzzzy

output:

Win

result:

ok "Win"

Test #25:

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

input:

7 Oleg-Andriy
zzzzzzz

output:

Win

result:

ok "Win"

Test #26:

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

input:

6 Petro
yyzzzz

output:

Win

result:

ok "Win"

Test #27:

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

input:

10 Petro
yyzzzyzzzz

output:

Lose

result:

ok "Lose"

Test #28:

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

input:

3 Petro
zyz

output:

Win

result:

ok "Win"

Test #29:

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

input:

6 Petro
ybyzzz

output:

Lose

result:

ok "Lose"

Test #30:

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

input:

7 Petro
zyzzyxz

output:

Lose

result:

ok "Lose"

Test #31:

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

input:

5 Petro
xzzyz

output:

Lose

result:

ok "Lose"

Test #32:

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

input:

5 Petro
yzzyz

output:

Lose

result:

ok "Lose"

Test #33:

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

input:

7 Petro
zzzyzzz

output:

Win

result:

ok "Win"

Test #34:

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

input:

4 Petro
zzzz

output:

Win

result:

ok "Win"

Test #35:

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

input:

1 Petro
z

output:

Win

result:

ok "Win"

Test #36:

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

input:

2 Petro
xx

output:

Lose

result:

ok "Lose"

Test #37:

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

input:

10 Petro
zzzzzyzzzz

output:

Win

result:

ok "Win"

Test #38:

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

input:

5 Petro
xzzyy

output:

Lose

result:

ok "Lose"

Test #39:

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

input:

7 Petro
zxzzyxz

output:

Lose

result:

ok "Lose"

Test #40:

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

input:

6 Petro
zxzzzz

output:

Win

result:

ok "Win"

Test #41:

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

input:

5 Petro
tzzzy

output:

Lose

result:

ok "Lose"

Test #42:

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

input:

2 Petro
uy

output:

Lose

result:

ok "Lose"

Test #43:

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

input:

3 Petro
yoy

output:

Lose

result:

ok "Lose"

Test #44:

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

input:

6 Petro
yoyyzz

output:

Lose

result:

ok "Lose"

Test #45:

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

input:

5 Petro
xzzzy

output:

Lose

result:

ok "Lose"

Test #46:

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

input:

7 Petro
zxzzyyz

output:

Lose

result:

ok "Lose"

Test #47:

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

input:

7 Petro
zxzzzyz

output:

Win

result:

ok "Win"

Test #48:

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

input:

7 Petro
zyzzzxz

output:

Win

result:

ok "Win"

Test #49:

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

input:

4 Petro
zxxz

output:

Lose

result:

ok "Lose"

Test #50:

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

input:

7 Petro
zzzzzbz

output:

Win

result:

ok "Win"

Test #51:

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

input:

7 Petro
zzzzzyz

output:

Win

result:

ok "Win"

Test #52:

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

input:

4 Petro
zzyz

output:

Win

result:

ok "Win"

Test #53:

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

input:

6 Petro
yyzyzz

output:

Lose

result:

ok "Lose"

Test #54:

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

input:

4 Petro
zxyz

output:

Win

result:

ok "Win"

Test #55:

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

input:

9 Petro
yyzyzzzzz

output:

Lose

result:

ok "Lose"

Test #56:

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

input:

7 Petro
zzzzzzz

output:

Win

result:

ok "Win"

Test #57:

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

input:

7 Petro
zxzyyxz

output:

Lose

result:

ok "Lose"

Test #58:

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

input:

9 Petro
zzzzzzzzz

output:

Lose

result:

ok "Lose"

Test #59:

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

input:

4 Petro
zzzy

output:

Win

result:

ok "Win"

Test #60:

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

input:

4 Petro
zzyy

output:

Win

result:

ok "Win"

Test #61:

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

input:

8 Petro
yzzyzzzz

output:

Lose

result:

ok "Lose"

Test #62:

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

input:

6 Petro
yozyzz

output:

Lose

result:

ok "Lose"

Test #63:

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

input:

6 Petro
ybzzzz

output:

Win

result:

ok "Win"

Test #64:

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

input:

6 Petro
yyyyzz

output:

Lose

result:

ok "Lose"

Test #65:

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

input:

1 Petro
y

output:

Win

result:

ok "Win"

Test #66:

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

input:

10 Petro
zxzzzxzzzz

output:

Lose

result:

ok "Lose"

Test #67:

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

input:

7 Petro
zyzzzyz

output:

Win

result:

ok "Win"

Test #68:

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

input:

5 Petro
yzzzy

output:

Lose

result:

ok "Lose"

Test #69:

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

input:

2 Petro
yz

output:

Win

result:

ok "Win"

Test #70:

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

input:

5 Petro
xzzxz

output:

Lose

result:

ok "Lose"

Test #71:

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

input:

6 Petro
zxyzzz

output:

Lose

result:

ok "Lose"

Test #72:

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

input:

4 Petro
zzbz

output:

Win

result:

ok "Win"

Test #73:

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

input:

4 Petro
zzzw

output:

Win

result:

ok "Win"

Test #74:

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

input:

4 Petro
zyxz

output:

Win

result:

ok "Win"

Test #75:

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

input:

4 Petro
zzyw

output:

Win

result:

ok "Win"

Test #76:

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

input:

3 Petro
yyz

output:

Win

result:

ok "Win"

Test #77:

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

input:

5 Petro
zzzzz

output:

Win

result:

ok "Win"

Test #78:

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

input:

8 Petro
xzzyzzzz

output:

Lose

result:

ok "Lose"

Test #79:

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

input:

10 Petro
zzzzzbzzzz

output:

Win

result:

ok "Win"

Test #80:

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

input:

4 Petro
zyyz

output:

Win

result:

ok "Win"

Test #81:

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

input:

2 Petro
xz

output:

Win

result:

ok "Win"

Test #82:

score: -100
Wrong Answer
time: 0ms
memory: 3816kb

input:

6 Petro
zhzzzz

output:

Win

result:

wrong answer 1st words differ - expected: 'Lose', found: 'Win'