Cod sursa(job #2327560)

Utilizator MAXIMILLIANMUSOHYEAHYEAH MAXIMILLIANMUS Data 24 ianuarie 2019 19:26:38
Problema Lacate Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.33 kb
#include<fstream.h>
int x[257][256], n, i, j, c;
int main()
{ifstream q("lacate.in");
ofstream w("lacate.out");
q>>n;
w<<n*(n-1)/2<<" "<<n-1<<"\n";
for(i=1;i<=n;++i,w<<"\n")
  {for(j=1;j<i;++j)
     {x[i][j]=x[j][i-1];
     w<<x[i][j]<<" ";}
 for(j=i;j<=n-1;++j)
   {c++;
   x[i][j]=c;
   w<<x[i][j];
   w<<" ";}}
return 0;}