Cod sursa(job #3315604)
| Utilizator | Data | 15 octombrie 2025 11:46:12 | |
|---|---|---|---|
| Problema | Tije | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.41 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("tije.in");
ofstream fout("tije.out");
int main()
{
int n;
fin>>n;
for(int i=1;i<=n;i++)
{
for(int j=n;j>=1;j--)
{
for(int k=1;k<=(n-i);k++)
fout<<j<<" "<<j+1<<'\n';
}
for(int k=1;k<=(n-i);k++)
fout<<n+1<<" "<<1<<'\n';
}
return 0;
}
