QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#666570#6607. Rise of Shadowslonelywolf#WA 0ms3784kbC++20455b2024-10-22 19:05:562024-10-22 19:06:04

Judging History

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

  • [2024-10-22 19:06:04]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3784kb
  • [2024-10-22 19:05:56]
  • 提交

answer

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

#define int long long  

signed main() {  
    ios::sync_with_stdio(false);
    cin.tie(nullptr);  

	int H, M, A;
	cin >> H >> M >> A;

	int ans = 0;
	for (int k = 0; k < H; k++) {
		int l = ceil(1.0 * (k * M - A) / (H - 1));
		int r = floor(1.0 * (k * M + A) / (H - 1));
		l = max(l, 0LL), r = min(r, M - 1);		
		ans += r - l + 1;
	}

	cout << ans << "\n";

    return 0;
}  
  

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

5 5 4

output:

9

result:

ok 1 number(s): "9"

Test #2:

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

input:

3 5 1

output:

3

result:

ok 1 number(s): "3"

Test #3:

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

input:

5 5 0

output:

1

result:

ok 1 number(s): "1"

Test #4:

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

input:

5 5 1

output:

3

result:

ok 1 number(s): "3"

Test #5:

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

input:

5 5 2

output:

5

result:

ok 1 number(s): "5"

Test #6:

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

input:

5 5 3

output:

7

result:

ok 1 number(s): "7"

Test #7:

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

input:

5 5 5

output:

10

result:

wrong answer 1st numbers differ - expected: '11', found: '10'