Cod sursa(job #1743993)
Utilizator | Constantin-Buliga Stefan fanache99 | Data | 19 august 2016 02:25:45 |
---|---|---|---|
Problema | Tije | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.46 kb |
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
int main() {
freopen("tije.in", "r", stdin);
freopen("tije.out", "w", stdout);
int n;
scanf("%d", &n);
for (int k = n - 1; k > 0; k--) {
for (int i = n; i > 0; i--)
for (int j = 0; j < k; j++)
printf("%d %d\n", i, i + 1);
for (int j = 0; j < k; j++)
printf("%d 1\n", n + 1);
}
return 0;
}