ch
Feedback
Songs - Ed Sheeren - Taylor Swift - Justin Bieber - Sabrina Carpenter - The Weeknd - Billie Eilish - Eminem - BTS - Music

Songs - Ed Sheeren - Taylor Swift - Justin Bieber - Sabrina Carpenter - The Weeknd - Billie Eilish - Eminem - BTS - Music

前往频道在 Telegram

🚩 Channel was restricted by Telegram

显示更多
未指定国家音乐45 197
782
订阅者
无数据24 小时
-127 天
-3030 天
帖子存档
This message couldn't be displayed on your device due to copyright infringement.

#include <iostream> using namespace std; int subsum(int arr[], int n) { int res = arr[0]; int maxending = arr[0]; for (int i = 1, i < n, i++) { maxending = max(maxending + arr[i],arr[i]; res = max(res,maxending); } return res; } int main() { int n; int arr[]; cout << "Enter Your Array" << endl; for(int i = 0, i < n, i++) { cin >> arr[i]; } n = sizeof(arr)/sizeof(int); int res = subsum(arr[n] ,n); cout << res << endl; return 0; }