编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#3686 #1008. 出行请佩戴好字符串 Wrong Answer 63 559 ms 1856 K C++ 17 / 1.6 K hhg 2023-11-25 16:20:47
显示原始代码
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 3e5 + 5;
int a[N];

void solve() {
    int n;
    cin >> n;
    string s, t;
    cin >> s;
    int slen = s.size();
    vector<int> cnt;
    int l1 = 0, l2 = 0, sum = 0;
    for (int i = 1; i <= n; i++) {
        cin >> t;
        int tlen = t.size();
        if (abs(slen - tlen) > 1)
            continue;
        l1 = 0, l2 = 0;
        sum = 0;
        while (l1 < slen && l2 < tlen && sum <= 1) {
            if (s[l1] != t[l2])
                sum++;
            l1++, l2++;
        }
        if (sum <= 1 && l1 == slen && l2 == tlen) {
            cnt.push_back(i);
            continue;
        }
        l1 = 0, l2 = 0;
        sum = 0;
        while (l1 < slen && l2 < tlen && sum <= 1) {
            if (s[l1] != t[l2])
                sum++, l2++;
            l1++, l2++;
        }
        if (sum <= 1 && l1 == slen && l2 == tlen) {
            cnt.push_back(i);
            continue;
        }
        l1 = 0, l2 = 0;
        sum = 0;
        while (l1 < slen && l2 < tlen && sum <= 1) {
            if (s[l1] != t[l2])
                sum++, l1++;
            l1++, l2++;
        }
        if (sum <= 1 && l1 == slen && l2 == tlen)
            cnt.push_back(i);
    }
    int len = cnt.size();
    cout << len << "\n";
    if (len > 0) {
        for (auto x : cnt) cout << x << " ";
        cout << "\n";
    }
}

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr), std::cout.tie(nullptr);

    int T;
    T = 1;
    while (T--) {
        solve();
    }

    return 0;
}
子任务 #1
Wrong Answer
得分:62
测试点 #1
Wrong Answer
得分:0
用时:6 ms
内存:272 KiB

输入文件(000.in

999 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
<500903 bytes omitted>

答案文件(000.out

3
152 259 931

用户输出

1
931 

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(example0.in

5 ababc
ababc
babc
abacbc
abdbc
abbac

答案文件(example0.out

4
1 2 3 4

用户输出

4
1 2 3 4 

系统信息

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

输入文件(001.in

1 mbhuxcdepwkaftcdhyipsdkwablxttzfhsqgtecualksypdgrjmjfgszytpzppbxzocujrkdpxbsnemoorbjelvnsmfjjtllys
<999904 bytes omitted>

答案文件(001.out

1
1

用户输出

1
1 

系统信息

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

输入文件(example1.in

1 aoki
takahashi

答案文件(example1.out

0

用户输出

0

系统信息

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

输入文件(002.in

1 ogpocwbvxzqpbdppvaycxpmzmvvbiorpmvxqmdreqzxxqjqtggbnowbxdjzneocbrlwlxyjigcukvdzjkshzqbsdxekswgmpst
<999903 bytes omitted>

答案文件(002.out

1
1

用户输出

1
1 

系统信息

Exited with return code 0
测试点 #6
Wrong Answer
得分:0
用时:3 ms
内存:296 KiB

输入文件(example2.in

9 atcoder
atoder
atcode
athqcoder
atcoder
tacoder
jttcoder
atoder
atceoder
atcoer

答案文件(example2.out

6
1 2 4 7 8 9

用户输出

6
1 4 6 7 8 9 

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(003.in

1 zpjmedcpyuutbkwiqaeovrtgakiquxefttozstlcblrxpyosznyrodfcmawcrjfjdgblazxklrghrvqbsrelttcfnfxsqqgvnf
<999903 bytes omitted>

答案文件(003.out

1
1

用户输出

1
1 

系统信息

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

输入文件(004.in

1 evtrywpdwormsstvkuaglehyynvqylbipogzoayqdwcqksnuxsqchomtrbdasfneodymigrycbmiysylkwpfszqggeohtasyhk
<999904 bytes omitted>

答案文件(004.out

1
1

用户输出

1
1 

系统信息

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

输入文件(005.in

1 kcjtarqleglkiipsmmrfxlhsdxvkrjoyibltxtzluqkuudmswflsbygdhufvvvxnzhorlhulxysdfhrfkbkvmhlmyxmfeutlfo
<999904 bytes omitted>

答案文件(005.out

0

用户输出

0

系统信息

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

输入文件(006.in

381924 i
x
i
w
d
npi
g
qix
j
z
v
xn
i
v
i
g
i
n
r
i
i
c
d
i
b
bv
i
s
ti
g
i
i
oi
i
i
jf
v
ci
oig
r
n
<881832 bytes omitted>

答案文件(006.out

360288
1 2 3 4 6 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 26 27 28 29 30 31 32 33 34 36 37 39 4
<2417236 bytes omitted>

用户输出

327361
1 2 3 4 6 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 39 40 42 43 44 45 46 47
<2196204 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(007.in

245778 uc
cu
ua
hn
q
uc
uc
ac
c
yc
my
ys
wm
cp
uc
cu
uqc
cu
uc
u
cu
c
lc
qc
udx
urc
uci
u
u
c
uuc
uc
<745688 bytes omitted>

答案文件(007.out

156795
2 5 6 7 8 9 14 16 18 19 21 22 23 25 26 27 28 29 30 31 34 36 37 39 41 42 43 44 45 46 47 48 49 
<1026705 bytes omitted>

用户输出

134491
2 4 5 6 7 8 9 14 16 18 21 22 23 24 25 29 30 31 34 36 37 39 41 44 45 46 48 50 51 53 57 61 62 66 68 69 71 72 73 74 75 76 85
<880529 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(008.in

124964 ldkd
lddk
ldmkd
omof
dkd
ldky
rdkp
dkd
lddk
czmi
dlkd
lkdd
ldkd
ld
lkdd
dkd
lddk
lliw
ldk
rlv
<624875 bytes omitted>

答案文件(008.out

74750
2 4 5 7 12 15 18 21 22 23 27 29 30 31 34 37 38 39 42 44 45 46 49 51 54 55 56 57 58 59 61 62 63
<456602 bytes omitted>

用户输出

69282
2 4 5 7 12 15 21 22 27 30 31 34 37 38 42 44 45 46 51 55 56 57 58 59 61 62 63 64 66 68 69 70 72 74 79 80 81 82 83 84 85 87 
<423220 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(009.in

62521 jnjmxqrm
jnjmxqwrm
jnmjxqrm
jnjmqrm
jnjmxrm
wofaxwbj
dnimxqrm
jnjxmqrm
jnmjxqrm
jnjmxrrm
jnjmx
<562428 bytes omitted>

答案文件(009.out

36723
1 3 4 9 10 12 13 14 15 17 19 22 24 25 27 29 30 33 35 39 40 42 45 46 47 48 50 51 52 55 56 57 58
<213687 bytes omitted>

用户输出

35398
1 3 4 9 10 12 13 14 15 17 19 22 24 25 27 29 30 33 35 39 40 42 45 46 47 48 50 51 52 55 56 57 58 59 60 62 63 64 65 66 67 69 
<205970 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(010.in

31260 kfcpfvpxblqgttgd
fksfizpwvnxetpdg
kfcpfvpxblqgttgd
akthmangyuribkzx
kfcpfvpxblqttgd
kfcpfvptbl
<531174 bytes omitted>

答案文件(010.out

18469
2 4 8 10 12 15 16 17 18 19 20 21 22 25 27 29 37 41 42 43 44 45 47 48 49 50 51 53 54 56 57 59 6
<104101 bytes omitted>

用户输出

18147
2 4 8 10 12 15 16 17 18 19 20 21 22 25 27 29 30 37 41 42 43 44 45 47 48 49 50 51 53 54 56 57 60 61 62 63 64 71 72 73 75 78
<102273 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(011.in

15626 hlltjnywprychhrcujoecqqcvykrwqnf
hdlltjnywprychhrcujoecqqcvykrwqnf
hlltjnywprychhrcujoecqqcvyk
<515557 bytes omitted>

答案文件(011.out

9265
1 2 3 4 10 11 12 13 15 16 17 18 20 21 22 23 26 27 29 32 33 34 36 38 43 44 45 46 48 49 52 54 57 
<48877 bytes omitted>

用户输出

9194
1 2 3 4 10 11 12 13 15 16 17 18 20 21 22 23 26 27 29 32 33 34 36 38 43 44 45 46 48 49 52 54 57 58 59 60 63 64 66 67 68 71 7
<48468 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(012.in

7811 uuqmpxxcnfloudpdrpzeinsocwzgmqeikecqtvlqcirdjfojtwflqxxnlsjygsll
uuqmpxxcnfloudpdrpzeifnsocwzgm
<507731 bytes omitted>

答案文件(012.out

4532
1 2 4 6 7 8 9 10 11 12 13 14 17 19 20 23 30 32 34 35 36 39 40 42 44 45 46 48 49 50 53 55 57 59 
<21936 bytes omitted>

用户输出

4488
1 2 4 6 7 8 9 10 11 12 13 14 17 19 20 23 30 32 34 35 36 39 40 42 44 45 46 48 49 50 53 55 57 59 61 64 66 70 72 76 78 80 81 8
<21691 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(013.in

3906 zxywqocvdsicapsstokwbujxdknqibjmwnrjjqdtvaowpsohgwxfpvpbcqowwcpdnrpmnjiipmkvoiyfreysarudzurqoze
<503878 bytes omitted>

答案文件(013.out

2290
5 6 10 12 13 14 19 20 22 25 27 30 31 32 33 34 36 37 39 40 41 42 43 44 46 47 50 51 52 54 56 57 5
<10712 bytes omitted>

用户输出

2281
5 6 10 12 13 14 19 20 22 25 27 30 31 32 33 34 36 37 39 40 41 42 43 44 46 47 50 51 52 54 56 57 59 61 63 65 66 69 70 72 73 74
<10640 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #18
Wrong Answer
得分:0
用时:8 ms
内存:412 KiB

输入文件(014.in

1952 lrewfmsffbccvmhgoiexaeypaayqbltootnxqycuuexjdpcytwrqporkyzjcrlacvewiwgrruygnucvetosgxamvqqrkoua
<501897 bytes omitted>

答案文件(014.out

1134
4 5 6 8 10 11 12 13 14 15 17 18 21 22 32 33 34 35 39 40 41 43 44 45 49 50 51 55 58 60 61 63 64 
<4957 bytes omitted>

用户输出

1135
4 5 6 8 10 11 12 13 14 15 17 18 21 22 32 33 34 35 39 40 41 43 44 45 49 50 51 55 58 60 61 63 64 66 67 68 69 70 71 72 73 74 7
<4934 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(015.in

976 qsqhdkhwodqbytmkamxerpaegpkxtkgncmdgzwscbirygvaqxfxvivckcqhxgymzfssczzqusjrlfdrcittybebnuyjuoxuf
<501088 bytes omitted>

答案文件(015.out

578
1 2 3 4 5 6 7 8 9 10 11 12 15 16 17 18 19 20 21 23 24 25 26 28 29 33 34 35 36 38 39 41 42 43 48 
<2141 bytes omitted>

用户输出

579
1 2 3 4 5 6 7 8 9 10 11 12 15 16 17 18 19 20 21 23 24 25 26 28 29 33 34 35 36 38 39 41 42 43 48 49 50 51 54 55 57 59 60 63 6
<2118 bytes omitted>

Special Judge 信息

Files user_out and answer differ

系统信息

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

输入文件(016.in

488 nptqnkekjuwzlkctxybtcxwekcvsivdglxciijzzksjuxpdziuevtsukqjuafjzlxgubzkgpbawhvnceyahhpzcnsrpvjiyz
<501140 bytes omitted>

答案文件(016.out

270
1 3 8 11 12 13 15 16 17 19 20 21 23 24 27 30 33 34 35 38 39 41 42 44 46 52 54 58 59 61 63 64 66 
<928 bytes omitted>

用户输出

270
1 3 8 11 12 13 15 16 17 19 20 21 23 24 27 30 33 34 35 38 39 41 42 44 46 52 54 58 59 61 63 64 66 67 68 69 70 71 73 74 75 76 7
<901 bytes omitted>

系统信息

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

输入文件(017.in

244 ljtqeqhnnvsujbdearxohprqfmvywzbtgrvvukubhmiavwtauvswecmkaxpulkquhxofiiuteldmstfvfjuqzhsdpgrgjtgo
<501911 bytes omitted>

答案文件(017.out

138
3 4 5 6 7 8 9 10 14 15 19 21 23 26 27 29 30 31 33 35 36 39 41 42 43 44 46 47 48 49 53 55 56 57 5
<392 bytes omitted>

用户输出

138
3 4 5 6 7 8 9 10 14 15 19 21 23 26 27 29 30 31 33 35 36 39 41 42 43 44 46 47 48 49 53 55 56 57 58 59 60 65 66 67 69 72 75 76
<365 bytes omitted>

系统信息

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

输入文件(018.in

122 lkhzhsujlylkdspcidfwbritxebzkuudldsafsruuwbnmrvgazodkqhuwgttfwqfspvlgycrfggyzzocdmejdqrihbmwpalp
<503821 bytes omitted>

答案文件(018.out

70
1 2 4 6 11 16 17 19 20 21 22 23 28 29 30 31 36 37 40 43 44 45 49 51 52 54 55 59 61 62 65 66 67 68
<123 bytes omitted>

用户输出

70
1 2 4 6 11 16 17 19 20 21 22 23 28 29 30 31 36 37 40 43 44 45 49 51 52 54 55 59 61 62 65 66 67 68 69 70 71 73 76 77 78 80 81 
<96 bytes omitted>

系统信息

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

输入文件(019.in

61 pbaocfeluarvooutyktwsxphluuchedknfrmsfeuoxeguebwgsyoutkqizewwonzqsqenuiwmgrwuwywzuqanevtvjaytlcgg
<507875 bytes omitted>

答案文件(019.out

31
4 5 6 8 9 12 13 15 16 17 18 21 22 25 27 28 33 36 40 41 42 45 46 47 49 50 51 52 54 57 59

用户输出

31
4 5 6 8 9 12 13 15 16 17 18 21 22 25 27 28 33 36 40 41 42 45 46 47 49 50 51 52 54 57 59 

系统信息

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

输入文件(020.in

30 nxaplgkirlciydgnsgfjnkgbpjusacbpwzizhilsubwxytkracosrlmmusnegdyoqexwhuwavmrithhguelotmxrhragmuikf
<507832 bytes omitted>

答案文件(020.out

13
2 3 5 6 11 14 15 16 17 18 22 23 26

用户输出

13
2 3 5 6 11 14 15 16 17 18 22 23 26 

系统信息

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

输入文件(021.in

15 wunmsejnfnwnvlpigzbhvubgvedxigolyigdvciyaranlroazvsqrzbnuhlatppgfblfwpvvkupsnflrratcaezfdujbvtwdl
<524205 bytes omitted>

答案文件(021.out

6
2 3 5 6 7 12

用户输出

6
2 3 5 6 7 12 

系统信息

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

输入文件(022.in

7 myoknemnaqepwayqjmyaxxgnoimqcjqnxlimszumcebicvtksyqdhxlmianfpdhktievvpbmoowaqxkxpjhsmjpifbaenkjvwp
<524201 bytes omitted>

答案文件(022.out

5
2 3 4 5 6

用户输出

5
2 3 4 5 6 

系统信息

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

输入文件(023.in

3 ulknrvqsydewoinmqhbokcmhxtvieyrfvrnituqfvznwakqkwnidnllqcvpixnqkdglrobisqkagtyqflolxxqiaicqvwinlez
<524195 bytes omitted>

答案文件(023.out

2
1 2

用户输出

2
1 2 

系统信息

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

输入文件(024.in

1 hoinpkocudfjfkiqptttzkjkivllrqqommshezldniebrcxnumzgpzodwgkimujmglfsnzhaeocqylsaxlelzhdaxrzrcgmyeo
<524192 bytes omitted>

答案文件(024.out

1
1

用户输出

1
1 

系统信息

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

输入文件(025.in

1 uixrhdqemnxxzroxcejljfycugqmhwfdrjmevtanfoqxazjmzayqswqhwwzlktlrgeysmylmstdwtjzjafzxrmeqemulczzsjl
<999904 bytes omitted>

答案文件(025.out

1
1

用户输出

1
1 

系统信息

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

输入文件(026.in

500000 blmqqpeagrrsjkpetpdgwewjwgcnyuhwesdrxbtyvritxjduuqznagfzgiwtseqtmamvemtmristsbuxzgumefkgryyqu
<1499908 bytes omitted>

答案文件(026.out

0

用户输出

0

系统信息

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

输入文件(027.in

500000 yeeuvuwvleorkkhwunbwgfxoafcumwzfeizpemxoaxewpoalterimttspcrfaxqxjgtwgnyvpoeebfzvcqfhkbbeahnkg
<1499908 bytes omitted>

答案文件(027.out

0

用户输出

0

系统信息

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

输入文件(028.in

500000 nfirnhxclymdagojqbkxhrhjxtpisnvhkkdmghniuwuuumiksrpcwyqmampqgpceeesvzveoihiofiosqifzawtecokrd
<1499908 bytes omitted>

答案文件(028.out

0

用户输出

0

系统信息

Exited with return code 0