Cod sursa(job #963550)
Utilizator | Data | 17 iunie 2013 18:57:58 | |
---|---|---|---|
Problema | Tije | Scor | 90 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.42 kb |
#include <fstream>
using namespace std;
int main()
{
ifstream cin("tije.in");
ofstream cout("tije.out");
int n;
cin >> n;
for(int i = 1 ; i < n ; ++ i)
{
for(int j = n ; j ; -- j)
for(int k = 1; k <= i ; ++ k)
cout << j << " " << j+1 << "\n";
for(int k = 1 ; k <= i ; ++ k)
cout << n+1 << " " << 1 << "\n";
}
return 0;
}