Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教下[1020. 飞地的数量]这道题的空间占用问题 #542

Open
SaraadKun opened this issue Jun 3, 2022 · 2 comments
Open

请教下[1020. 飞地的数量]这道题的空间占用问题 #542

SaraadKun opened this issue Jun 3, 2022 · 2 comments

Comments

@SaraadKun
Copy link

SaraadKun commented Jun 3, 2022

1020. 飞地的数量题目的并查集题解中, 有下面这段代码

    int N = 550;
    int[] p = new int[N * N];

而题目限定的m,n范围是1 <= m, n <= 500,我测试下来,当N的取值范围在[540, 580]时,使用Java提交后占用空间较少,超出这个范围,空间占用都会上升,想请教下三叶姐这是什么原因呢?

@ncghost1
Copy link
Contributor

ncghost1 commented Jun 7, 2022

其实三叶姐很少看github......小建议:最好还是在题解评论提问

@SaraadKun
Copy link
Author

其实三叶姐很少看github......小建议:最好还是在题解评论提问

好的,谢谢QAQ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants