ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#212056 | #3817. 写字 | chenchen | Compile Error | / | / | C++ | 475b | 2024-10-13 10:42:54 | 2024-10-13 12:18:05 |
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;
}
Details
answer.code: In function 'int main()': answer.code:13:22: error: 'scanf' was not declared in this scope scanf("%d%d", &S, &T);\x0d ^ answer.code:27:13: error: 'puts' was not declared in this scope puts("-1");\x0d ^