编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#1490 #996. 相似字符串 Runtime Error 0 84 ms 504 K C++ 17 / 657 B s230026047 2023-10-15 16:23:51
显示原始代码
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
    int n;
    vector<char> s(n);
    vector<char> t(n);
    int same, l1, o0;

    // input
    cin >> n;
    for (int i = 0; i < n; n++) {
        cin >> s[i];
    }
    for (int i = 0; i < n; n++) {
        cin >> t[i];
    }

    // cout << s << t << endl;

    // check
    for (int i = 0; i < n; i++) {
        if (s[i] == t[i]) {
            same++;
        } else if (s[i] == 'l' && t[i] == '1' || s[i] == '1' && t[i] == 'l') {
            l1++;
        } else if (s[i] == '0' && t[i] == 'o' || s[i] == 'o' && t[i] == '0') {
            o0++;
        }
    }
    if (same >= 1 && (l1 >= 1 || o0 >= 1)) {
        cout << "Yes" << endl;
        return 0;
    }
    cout << "No" << endl;
    // test
    return 0;
}
子任务 #1
Runtime Error
得分:0
测试点 #1
Runtime Error
得分:0
用时:3 ms
内存:356 KiB

输入文件(00_sample_01.in

3
l0w
1ow

答案文件(00_sample_01.out

Yes

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #2
Runtime Error
得分:0
用时:4 ms
内存:372 KiB

输入文件(00_sample_02.in

3
abc
arc

答案文件(00_sample_02.out

No

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #3
Runtime Error
得分:0
用时:3 ms
内存:404 KiB

输入文件(00_sample_03.in

4
nok0
n0ko

答案文件(00_sample_03.out

Yes

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #4
Runtime Error
得分:0
用时:6 ms
内存:412 KiB

输入文件(01_test_01.in

1
i
l

答案文件(01_test_01.out

No

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #5
Runtime Error
得分:0
用时:5 ms
内存:396 KiB

输入文件(01_test_02.in

1
o
0

答案文件(01_test_02.out

Yes

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #6
Runtime Error
得分:0
用时:6 ms
内存:356 KiB

输入文件(01_test_03.in

100
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
<106 bytes omitted>

答案文件(01_test_03.out

Yes

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #7
Runtime Error
得分:0
用时:5 ms
内存:336 KiB

输入文件(01_test_04.in

100
llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
<106 bytes omitted>

答案文件(01_test_04.out

Yes

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #8
Runtime Error
得分:0
用时:4 ms
内存:492 KiB

输入文件(01_test_05.in

100
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
<106 bytes omitted>

答案文件(01_test_05.out

Yes

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #9
Runtime Error
得分:0
用时:6 ms
内存:468 KiB

输入文件(01_test_06.in

100
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<106 bytes omitted>

答案文件(01_test_06.out

Yes

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #10
Runtime Error
得分:0
用时:3 ms
内存:504 KiB

输入文件(01_test_07.in

100
0otv00hllo11olloo8d00l1olw901l0ol09looxel220lldq87l0ou1dwo00lm10t0oeoll3zom01y0llw0jg1l1pu8lopeq
<106 bytes omitted>

答案文件(01_test_07.out

No

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #11
Runtime Error
得分:0
用时:4 ms
内存:380 KiB

输入文件(01_test_08.in

100
0e51o1101lloko11oaoo1jhqllocl8t1odlst1001001900s5klolllc200ng7601u9a0gy1lib8nloslns000hzol1vljvk
<106 bytes omitted>

答案文件(01_test_08.out

Yes

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #12
Runtime Error
得分:0
用时:9 ms
内存:356 KiB

输入文件(01_test_09.in

100
0lll0g11l1hg6lkil0o1l09lo8w301k0obxlzlo1730l118ll0pb1llr2a0jlqkjll0qps1l0001o11lo16010010l01masi
<106 bytes omitted>

答案文件(01_test_09.out

No

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #13
Runtime Error
得分:0
用时:3 ms
内存:352 KiB

输入文件(01_test_10.in

100
loo0jl1la3llo010molkplool60xnf113100l11tkln110goll0z11o004ulow0mz0looolunooob31l0l060n1ol1g00y51
<106 bytes omitted>

答案文件(01_test_10.out

Yes

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #14
Runtime Error
得分:0
用时:3 ms
内存:344 KiB

输入文件(01_test_11.in

100
l9omf1o6ho11lbool0ll0o01ccl011000oc1go1llx10t07tooogo1lrt1100ok0l1oa1000jlloei1oh1lliaoollw1000o
<106 bytes omitted>

答案文件(01_test_11.out

No

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #15
Runtime Error
得分:0
用时:4 ms
内存:372 KiB

输入文件(01_test_12.in

100
co11ool1zlnr1o0ofiob1030y0ogtoa10oill0lt000o15lof19l0111o6djl01z1l8oo00do12o0lo000h01ll0h00oo01l
<106 bytes omitted>

答案文件(01_test_12.out

Yes

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #16
Runtime Error
得分:0
用时:6 ms
内存:352 KiB

输入文件(01_test_13.in

100
89l01o181o06011o1lhk1l111m07cghl0f118l0ohll0ll01lll11lp001iohoolo10b8o6kho10loqs0lo14dot0lks81fv
<106 bytes omitted>

答案文件(01_test_13.out

No

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #17
Runtime Error
得分:0
用时:3 ms
内存:404 KiB

输入文件(01_test_14.in

100
ilo6o1i0ola00so1l0tl0llo1u1h0p101lol11woou9l0l1o1t41o11oo0m01k1y10o1hlll1l1i8oo0ol1l0p1s0r50xtoq
<106 bytes omitted>

答案文件(01_test_14.out

Yes

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #18
Runtime Error
得分:0
用时:4 ms
内存:412 KiB

输入文件(02_corner_01.in

100
k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2k2
<106 bytes omitted>

答案文件(02_corner_01.out

No

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault
测试点 #19
Runtime Error
得分:0
用时:3 ms
内存:384 KiB

输入文件(02_corner_02.in

100
1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n1n
<106 bytes omitted>

答案文件(02_corner_02.out

No

标准错误流

terminate called after throwing an instance of 'std::length_error'
  what():  cannot create std::vector larger than max_size()

系统信息

Killed: Segmentation fault