QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#186729#5158. Interview QuestionForever_Young#WA 0ms3812kbC++23795b2023-09-24 10:46:402023-09-24 10:46:42

Judging History

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

  • [2023-09-24 10:46:42]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3812kb
  • [2023-09-24 10:46:40]
  • 提交

answer

#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native")
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=1;i<=n;++i)
#define per(i,n) for(int i=n;i>=1;--i)
#define pb push_back
#define mp make_pair
int c,d;
vector<int> buzz,fizz;
int main()
{
	cin>>c>>d;
	rep(i,d-c+1)
	{
		char s[100];
		scanf("%s",s);
		if (s[0]=='F')fizz.pb(c+i-1);
		if (s[0]=='B'||s[4]=='B')buzz.pb(c+i-1);
	}
	if (fizz.size()==0)cout<<d+1;
	else if (fizz.size()==1)cout<<fizz[0];
	else if (fizz.size()>1)cout<<fizz[1]-fizz[0];
	putchar(' ');
	if (buzz.size()==0)cout<<d+2;
	else if (buzz.size()==1)cout<<buzz[0];
	else if (buzz.size()>1)cout<<buzz[1]-buzz[0];
	puts("");
	return 0;
}

詳細信息

Test #1:

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

input:

7 11
7 8 Fizz Buzz 11

output:

9 10

result:

ok 

Test #2:

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

input:

49999 50002
49999 FizzBuzz 50001 Fizz

output:

2 50000

result:

ok 

Test #3:

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

input:

8 11
Buzz Buzz FizzBuzz Buzz

output:

10 1

result:

ok 

Test #4:

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

input:

10 15
10 11 12 13 14 15

output:

16 17

result:

ok 

Test #5:

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

input:

17 17
17

output:

18 19

result:

ok 

Test #6:

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

input:

13 13
Fizz

output:

13 15

result:

ok 

Test #7:

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

input:

20 20
Buzz

output:

21 20

result:

ok 

Test #8:

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

input:

30 30
FizzBuzz

output:

30 30

result:

ok 

Test #9:

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

input:

9 10
Buzz FizzBuzz

output:

10 1

result:

ok 

Test #10:

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

input:

2 6
2 3 4 5 FizzBuzz

output:

6 6

result:

ok 

Test #11:

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

input:

6 7
Fizz 7

output:

6 9

result:

ok 

Test #12:

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

input:

7 8
Buzz Buzz

output:

9 1

result:

ok 

Test #13:

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

input:

4 8
4 5 Buzz 7 8

output:

9 6

result:

ok 

Test #14:

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

input:

33 50
Buzz 34 35 FizzBuzz 37 38 Buzz 40 41 FizzBuzz 43 44 Buzz 46 47 FizzBuzz 49 50

output:

6 3

result:

ok 

Test #15:

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

input:

32 47
32 33 34 35 FizzBuzz 37 38 39 40 41 FizzBuzz 43 44 45 46 47

output:

6 1

result:

FAIL Mismatch at position 32: expected 32, got Buzz