UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#212056#3817. 写字chenchenCompile Error//C++475b2024-10-13 10:42:542024-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;
}

详细

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
             ^