ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#212058 | #3817. 写字 | chenchen | 0 | 13ms | 1244kb | C++11 | 475b | 2024-10-13 10:43:11 | 2024-10-13 12:18:18 |
answer
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int S, T;
string s, t;
int a[26], b[26];
int main()
{
scanf("%d%d", &S, &T);
cin >> s >> t;
for (int i = 0; i < S; i ++ )
{
a[s[i] - 'a'] ++ ;
}
for (int i = 0; i < T; i ++ )
{
b[t[i] - 'a'] ++ ;
}
for (int i = 0; i < 26; i ++ )
{
if (b[i] > a[i])
{
puts("-1");
return 0;
}
}
for (int i = 0; i < 26; i ++ )
{
}
return 0;
}
详细
小提示:点击横条可展开更详细的信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 1220kb
input:
1 1 v v
output:
result:
wrong answer Answer contains longer sequence [length = 1], but output contains 0 elements
Subtask #2:
score: 0
Wrong Answer
Test #3:
score: 0
Wrong Answer
time: 1ms
memory: 1244kb
input:
26 300 ywzhvjnpdfqtukimsrbxageloc brsmsrbxbxbxbxagagagegelococololegaxagaxaxbxbrbxbrsrsmikimikikimim...
output:
-1
result:
wrong answer 1st numbers differ - expected: '299', found: '-1'
Subtask #3:
score: 0
Wrong Answer
Test #6:
score: 0
Wrong Answer
time: 12ms
memory: 1244kb
input:
300 300 hgbfdbgcghedefchdabhgdddahcdedebceffegfbceehceeheggffhhddbecbfdhceeedcaeeebdaddfgccggfdcachg...
output:
-1
result:
wrong answer 1st numbers differ - expected: '3643', found: '-1'