Actually do the problem
I completely forgot to commit this one...
This commit is contained in:
parent
92daea9371
commit
e6bcb6f654
@ -87,7 +87,7 @@ int main()
|
||||
}
|
||||
|
||||
vi cards;
|
||||
ll total = 0;
|
||||
int total = 0;
|
||||
|
||||
while (n--) {
|
||||
string a;
|
||||
@ -96,23 +96,10 @@ int main()
|
||||
total += cards.back();
|
||||
}
|
||||
|
||||
size_t i = 0;
|
||||
size_t j = 0;
|
||||
int cmax = 0;
|
||||
int now = 0;
|
||||
while (j < cards.size()) {
|
||||
if (total - now < now) {
|
||||
now -= cards[i];
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
now += cards[j];
|
||||
j++;
|
||||
rmax(cmax, now);
|
||||
}
|
||||
int cmax = max(cards[0], total / p);
|
||||
|
||||
int amax = 0;
|
||||
now = 0;
|
||||
int now = 0;
|
||||
int num = 0;
|
||||
for (auto i : cards) {
|
||||
if (now + i > cmax) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user