hiho week 30 register

Ended

Participants:387

Verdict:Accepted
Score:100 / 100
Submitted:2015-01-24 22:10:39

Lang:GCC

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <stdio.h>
#include <malloc.h>
int main()
{
    int times, N;
    int i, j, k, m;
    int* NArray = NULL;
    int* result1 = NULL;
    int* result2 = NULL;
    int* final = NULL;
    int res1, res2;
    scanf("%d", &times);
    for (i = 0; i < times; i++)
    {
        scanf("%d", &N);
        if (NArray != NULL)
        {
            free(NArray);
        }
        if (result1 != NULL)
        {
            free(result1);
        }
        if (result2 != NULL)
        {
            free(result2);
        }
        if (final != NULL)
        {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX