正文
增加 7 行删除 7 行
52 行未改动5354555657585960612 行未改动646566676869707172737475767778798029 行未改动11011111211311411511611711811912012112212312412512612712812913013113213313413513613739 行未改动52 行未改动using namespace std;const int N = 5005;int n, x;int a[N], s[N];signed main() {qwq;2 行未改动cin >> a[i];a[i] -= x;s[i] = s[i-1] + a[i];}// 枚举区间 i,jint maxx = 0;for (int i=1; i<=n; i++) {for (int j=i; j<=n; j++) {int sum = s[j] - s[i-1];maxx = max(maxx, sum);}}cout << maxx;return 0;}```29 行未改动for (int i=1; i<=6; i++) {cin >> x;cnt[x]++;}int f = 0;for (int i=1; i<=9; i++) {if (cnt[i] >= 4) {f = 1;cnt[i] -= 4;}}if (f == 0) {cout << "Alien";return 0;}for (int i=1; i<=9; i++) {if (cnt[i] == 2) {f = 2;}}if (f == 2) cout << "Elephant";else cout << "Bear";return 0;}39 行未改动52 行未改动5354555657585960612 行未改动646566676869707172737475767778798029 行未改动11011111211311411511611711811912012112212312412512612712812913013113213313413513613739 行未改动52 行未改动using namespace std;const int N = 5005;int n, x;int a[N], s[N];signed main() {qwq;2 行未改动cin >> a[i];a[i] -= x;s[i] = s[i-1] + a[i];}// 枚举区间 i,jint maxx = 0;for (int i=1; i<=n; i++) {for (int j=i; j<=n; j++) {int sum = s[j] - s[i-1];maxx = max(maxx, sum);}}cout << maxx;return 0;}```29 行未改动for (int i=1; i<=6; i++) {cin >> x;cnt[x]++;}int f = 0;for (int i=1; i<=9; i++) {if (cnt[i] >= 4) {f = 1;cnt[i] -= 4;}}if (f == 0) {cout << "Alien";return 0;}for (int i=1; i<=9; i++) {if (cnt[i] == 2) {f = 2;}}if (f == 2) cout << "Elephant";else cout << "Bear";return 0;}39 行未改动