QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#338460#5158. Interview QuestionabdelaleemWA 0ms3584kbC++14669b2024-02-25 22:14:172024-02-25 22:14:19

Judging History

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

  • [2024-02-25 22:14:19]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3584kb
  • [2024-02-25 22:14:17]
  • 提交

answer

#include <bits/stdc++.h>

#define nl '\n'
#define ll long long
#define loop(n) for(int i = n ; i < n; i++)

using namespace std;

void solve() {
  int s, e;
  cin >> s >> e;
  int a = 0, b = 0;
  for (int i = s; i <= e; ++i) {
    string ss;
    cin >> ss;
    if (isdigit(ss[0])) continue;
    ss[0] = toupper(ss[0]);
    if (ss[0] == 'F')
      a = i - a;
    if (ss[0] == 'B' || ss.size() == 8)
      b = i - b;
  }
  if (!a) a = e + 1;
  if (!b) b = e + 1;
  cout << a << ' ' << b;
}


int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int t = 1;
//  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}

詳細信息

Test #1:

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

input:

7 11
7 8 Fizz Buzz 11

output:

9 10

result:

ok 

Test #2:

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

input:

49999 50002
49999 FizzBuzz 50001 Fizz

output:

2 50000

result:

ok 

Test #3:

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

input:

8 11
Buzz Buzz FizzBuzz Buzz

output:

10 2

result:

FAIL Mismatch at position 9: expected Buzz, got 9