update codingame challenges

Adding python challenges and sorting the challenges
This commit is contained in:
Arkagedon
2022-03-13 18:15:15 +01:00
parent a7a32adf99
commit d894ebe609
15 changed files with 80 additions and 1 deletions

View File

@ -0,0 +1,20 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
int main()
{
int n, v, max = 0, max_lost =0, curr_lost = 0;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%d", &v);
curr_lost = v-max;
if (curr_lost < max_lost) max_lost = curr_lost;
if (v>max) max = v;
}
printf("%d\n",max_lost);
return 0;
}