编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#5310 #1051. 相思树 Wrong Answer 60 25 ms 388 K C++ 17 / 998 B t330026189 2024-04-27 14:29:09
显示原始代码
//
//  main.cpp
//  dance
//
//  Created by Yg on 2024/4/26.
//
#include <iostream>
//#include <stdio.h>
#include <math.h>
#include <cmath>
#include <string.h>
#include <algorithm>
#include <queue>
#include <vector>
#include <stack>
#include <fstream>
#include <string>
#include <map>
#include <unordered_map>
using namespace std;
#define int long long

#define il inline

#define rd read()

const int L = 2e5 + 10;
const int INF = 1e9 + 7;

il int read() {
    int res = 0, f = 1;
    char c = getchar();
    while (c < '0' || c > '9') {
        if (c == '-')
            f = -1;
        c = getchar();
    }
    while (c >= '0' && c <= '9') {
        res = res * 10 + c - '0';
        c = getchar();
    }
    return res * f;
}
signed main() {
    int a, k, l, r;
    cin >> a >> k >> l >> r;
    int x1, x2;
    x1 = ceil((l - a) / k);
    x2 = floor((r - a) / k);
    if (x1 <= x2)
        printf("%lld\n", x2 - x1 + 1);
    else
        printf("0\n");
    return 0;
}
子任务 #1
Wrong Answer
得分:60
测试点 #1
Wrong Answer
得分:0
用时:3 ms
内存:304 KiB

输入文件(1.in

-2 2 1 1

答案文件(1.out

0

用户输出

1

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #2
Accepted
得分:100
用时:3 ms
内存:276 KiB

输入文件(2.in

-1000000 1 -1000000 1000000

答案文件(2.out

2000001

用户输出

2000001

系统信息

Exited with return code 0
测试点 #3
Accepted
得分:100
用时:3 ms
内存:388 KiB

输入文件(3.in

-999999 33 -999999 666666

答案文件(3.out

50506

用户输出

50506

系统信息

Exited with return code 0
测试点 #4
Accepted
得分:100
用时:2 ms
内存:356 KiB

输入文件(4.in

64552 8 -914835 382070

答案文件(4.out

162113

用户输出

162113

系统信息

Exited with return code 0
测试点 #5
Wrong Answer
得分:0
用时:2 ms
内存:384 KiB

输入文件(5.in

449771 10 -994736 308943

答案文件(5.out

130368

用户输出

130369

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #6
Accepted
得分:100
用时:3 ms
内存:356 KiB

输入文件(6.in

518796 6 -235474 891919

答案文件(6.out

187899

用户输出

187899

系统信息

Exited with return code 0
测试点 #7
Wrong Answer
得分:0
用时:2 ms
内存:308 KiB

输入文件(7.in

0 1000000000 -999999999 -999999999

答案文件(7.out

0

用户输出

1

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #8
Accepted
得分:100
用时:3 ms
内存:380 KiB

输入文件(8.in

1000000000000000000 1 -1000000000000000000 1000000000000000000

答案文件(8.out

2000000000000000001

用户输出

2000000000000000001

系统信息

Exited with return code 0
测试点 #9
Accepted
得分:100
用时:2 ms
内存:380 KiB

输入文件(9.in

1000000000000000000 1000000000 -1000000000000000000 1000000000000000000

答案文件(9.out

2000000001

用户输出

2000000001

系统信息

Exited with return code 0
测试点 #10
Wrong Answer
得分:0
用时:2 ms
内存:284 KiB

输入文件(10.in

-553548222810233536 554374432 -249328436662217663 672836766307973152

答案文件(10.out

1663433863

用户输出

1663433864

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0