Cod sursa(job #2070884)

Utilizator stefan_creastaStefan Creasta stefan_creasta Data 19 noiembrie 2017 23:46:47
Problema Tije Scor 5
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.38 kb
#include <cstdio>
using namespace std;

int main() {
  int n;
  freopen("tije.in", "r", stdin);
  freopen("tije.out", "w", stdout);
  scanf("%d", &n);
  for(int i = 1; i <= n; ++i) {
    for(int j = 1; j <= n; ++j) {
      printf("%d %d\n", i, n + 1);
    }
  }
  for(int i = 1; i <= n; ++i) {
    for(int j = 1; j <= n; ++j) {
      printf("%d %d\n", n + 1, j);
    }
  }
  return 0;
}