Cod sursa(job #1748840)
Utilizator | Data | 26 august 2016 23:08:36 | |
---|---|---|---|
Problema | Tije | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.41 kb |
#include <fstream>
using namespace std;
ifstream fin("tije.in");
ofstream fout("tije.out");
int N, i;
int j, cnt;
int main()
{
fin >> N;
for (i=N-1; i>=1; i--)
{
for (j=N; j>=1; j--)
for (cnt=1; cnt<=i; cnt++)
fout << j << " " << j+1 << '\n';
for (j=1; j<=i; j++)
fout << N+1 << " " << 1 << '\n';
}
fin.close();
fout.close();
return 0;
}