编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#1322 #998. 救救小关 Time Limit Exceeded 65 3157 ms 2816 K C++ 17 / 753 B hymonade 2023-10-15 16:07:55
显示原始代码
#include <bits/stdc++.h>
using namespace std;
const int maxnn = 4 * 1e5 + 1;
const int maxn = 2 * 1e5 + 1;
int mx[maxnn];
int my[maxnn];
int m[3][maxn];
char c[maxn];
int main() {
    int N, M, H, K, x = 0, y = 0;
    cin >> N >> M >> H >> K;
    scanf("%s", c);
    for (int i = 1; i <= M; i++) {
        cin >> m[1][i];
        mx[m[1][i]] = 1;
        cin >> m[2][i];
        my[m[2][i]] = 1;
    }
    for (int i = 0; i < N; i++) {
        H--;
        if (H < 0) {
            cout << "No";
            return 0;
        }
        if (c[i] == 'R')
            x++;
        if (c[i] == 'L')
            x--;
        if (c[i] == 'U')
            y++;
        if (c[i] == 'D')
            y--;
        if (mx[x] == 1 and my[y] == 1) {
            for (int i = 1; i <= N; i++) {
                if (m[1][i] == x and m[2][i] == y) {
                    if (H < K)
                        H = K;
                    break;
                }
            }
        }
    }
    cout << "Yes";
    return 0;
}
子任务 #1
Time Limit Exceeded
得分:65
测试点 #1
Accepted
得分:100
用时:5 ms
内存:300 KiB

输入文件(00_sample_01.in

4 2 3 1
RUDL
-1 -1
1 0

答案文件(00_sample_01.out

Yes

用户输出

Yes

系统信息

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

输入文件(00_sample_02.in

5 2 1 5
LDRLD
0 0
-1 -1

答案文件(00_sample_02.out

No

用户输出

No

系统信息

Exited with return code 0
测试点 #3
Time Limit Exceeded
得分:0
用时:1002 ms
内存:2816 KiB

输入文件(01_test_01.in

200000 200000 1 1
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
<1888814 bytes omitted>

答案文件(01_test_01.out

Yes
测试点 #4
Time Limit Exceeded
得分:0
用时:1003 ms
内存:2096 KiB

输入文件(01_test_02.in

200000 100000 2 2
DLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDL
<1577709 bytes omitted>

答案文件(01_test_02.out

Yes
测试点 #5
Time Limit Exceeded
得分:0
用时:1007 ms
内存:2048 KiB

输入文件(01_test_03.in

200000 99998 2 2
DLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLD
<1577678 bytes omitted>

答案文件(01_test_03.out

No
测试点 #6
Accepted
得分:100
用时:6 ms
内存:500 KiB

输入文件(01_test_04.in

200000 1 199999 100000
DLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLD
<199930 bytes omitted>

答案文件(01_test_04.out

No

用户输出

No

系统信息

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

输入文件(01_test_05.in

199800 333 500 600
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
<202329 bytes omitted>

答案文件(01_test_05.out

Yes

用户输出

Yes

系统信息

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

输入文件(01_test_06.in

200000 332 500 600
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
<202521 bytes omitted>

答案文件(01_test_06.out

No

用户输出

No

系统信息

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

输入文件(01_test_07.in

200000 399 105 500
ULURRRDLDRRRRURRRRDDRURURURUUURRUUUUUURDRRULUURRRUUUUURURRRURRUURURRRURURRRDDRDLU
<204579 bytes omitted>

答案文件(01_test_07.out

No

用户输出

No

系统信息

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

输入文件(01_test_08.in

200000 241 287 832
UUURURUURUUUUUURRRRURRURDRURUUUURUURURDRRUULURULLURUULURULLURRRUULDLLULLURRURUURU
<202736 bytes omitted>

答案文件(01_test_08.out

Yes

用户输出

Yes

系统信息

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

输入文件(01_test_09.in

200000 264 736 756
UURDRRUURULUUUURUURURUUULDDLUUURURRRRRURUUUURRRUURRUURURUUUUULUURDRRRRRULUURRULUL
<203008 bytes omitted>

答案文件(01_test_09.out

Yes

用户输出

Yes

系统信息

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

输入文件(01_test_10.in

200000 672 937 296
UURUURRUURURUUUUURRRRRRURULUURUURRURURUUUUURRURRURDRUURULLUURRURUULLUUUURUULLUURR
<207787 bytes omitted>

答案文件(01_test_10.out

No

用户输出

No

系统信息

Exited with return code 0
测试点 #13
Wrong Answer
得分:0
用时:12 ms
内存:1124 KiB

输入文件(01_test_11.in

200000 399 991 499
URRRUUURUURRRURRURRRRULURUUUUUUUUUURRUURDRRRURULURRRURURDRURRURRRUULURULULURURRRU
<204590 bytes omitted>

答案文件(01_test_11.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #14
Wrong Answer
得分:0
用时:11 ms
内存:1052 KiB

输入文件(01_test_12.in

200000 457 419 437
URUUURURRDRRURURDRRRUURUURRRRUULULUULURRRRRRDDRRURRULUULURURURURUUUURUUUURRURURUL
<205265 bytes omitted>

答案文件(01_test_12.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(01_test_13.in

200000 204 734 976
URUUUUUUUURURRUUURRDRUUUURRURRRUUUUUULUUUUUUURURURURURURULUURUUURDRUUURURUUURRUUU
<202304 bytes omitted>

答案文件(01_test_13.out

No

用户输出

No

系统信息

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

输入文件(01_test_14.in

200000 2 95635 67064
LULDLDRRDRDLLULDLDRRDDRURDRRRDRRRDLLDDDLULDLDLLDDDLDDLLURULURRULULLDRLLDLULDDLL
<199938 bytes omitted>

答案文件(01_test_14.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(01_test_15.in

200000 3 51656 52962
DRRRUULUURURDDRDLDDDRDRURRRURUUURRUUURUUULULDDRDLDDLLDDDDLLLDRRRLLDDDRRULLURLLD
<199956 bytes omitted>

答案文件(01_test_15.out

Yes

用户输出

Yes

系统信息

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

输入文件(01_test_16.in

200000 2 38895 65741
LULULLURULULDDLUUUUULDDLULUURRURRRRULLULURRDRURUUULDDLULDLLUULDDLLDDLDRRDLLLDDL
<199944 bytes omitted>

答案文件(01_test_16.out

No

用户输出

No

系统信息

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

输入文件(01_test_17.in

200000 9 58420 15766
RRURDDLLDRRRRULURRULUURDRDDDDLUDDDRURRRDDRRRRDLLLLLLDRDDRDDLLLUURDRLUULUUURURDD
<199998 bytes omitted>

答案文件(01_test_17.out

Yes

用户输出

Yes

系统信息

Exited with return code 0
测试点 #20
Wrong Answer
得分:0
用时:9 ms
内存:648 KiB

输入文件(01_test_18.in

200000 10 25519 19224
URDRURDDDLDLUULDDDLLUURUULULDDDLLULLDRDLDRRDLDDRURURUULLURUULLULLDDDLDDLLUURDR
<200006 bytes omitted>

答案文件(01_test_18.out

No

用户输出

Yes

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0