Cod sursa(job #51104)

Utilizator cos_minBondane Cosmin cos_min Data 9 aprilie 2007 22:21:15
Problema Oite Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.55 kb
#include <stdio.h>
#include <fstream>
#include <algorithm>
using namespace std;

#define in "oite.in"
#define out "oite.out"
#define dim 1025

int P[1048577];
int C[dim], Size[dim];
int N, L, t;

int main()
{
    freopen(in,"r",stdin);
    freopen(out,"w",stdout);
    
    scanf("%d%d", &N, &L);
    for ( int i = 1; i <= N; i++ )
        scanf("%d", &C[i]);
    
    t = 0;
    
    for ( int i = 1; i < N; i++ )
         for ( int j = 1; j <= N; j++ ) 
             t += 1, P[t] = C[i] + C[j];
             
    printf("%d", t);
}