#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "vec.h"



struct vec vec_new(void) {
    // TODO: implement this function
    struct vec v = {NULL, 0, 0};
    return v;
}

void vec_push(struct vec *v, double value) {
    // TODO: implement this function
    (void) v;
    (void) value;
}

double vec_remove_at(struct vec *v, int index) {
    // TODO: implement this function
    (void) v;
    (void) index;
    return 0;
}

void vec_free(struct vec *v) {
    // TODO: implement this function
    (void) v;
}


int main(void) {
    struct vec v = vec_new();
    char tok[50];
    while (scanf("%49s", tok) == 1) {
        if (strcmp(tok, "REMOVE") == 0) {
            int index;
            if (scanf("%d", &index) != 1) { break; }
            double removed = vec_remove_at(&v, index);
            printf("removed %g\n", removed);
            printf("vector is now:");
            for (int k = 0; k < v.count; k++) { printf(" %g", v.data[k]); }
            printf("\n");
            vec_free(&v);
            return 0;
        }
        vec_push(&v, atof(tok));
    }
    printf("count %d\n", v.count);
    vec_free(&v);
    return 0;
}
