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

你好,发现一个Bug,7-1 Maximum Subsequence Sum #6

Open
ruolilhl opened this issue Mar 2, 2020 · 1 comment
Open

你好,发现一个Bug,7-1 Maximum Subsequence Sum #6

ruolilhl opened this issue Mar 2, 2020 · 1 comment

Comments

@ruolilhl
Copy link

ruolilhl commented Mar 2, 2020

7-1 Maximum Subsequence Sum这道题的代码在OJ有一组数据过不了,题目要求的是如果全为负数,则输出0,你的代码是只要最大和小于0则输出0。
还有就算我有个疑问,当最大和前面有一串0的时候,我感觉你这个程序也会出错,但是OJ在判这组数据的时候你的代码是对的,而我选择条件是<=时清零,但在这组数据却会出错。我不太理解,倘若你有时间可否交流一下这个问题

@ascendho
Copy link

大佬这题解出来了吗 确实通过不了 部分正确

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