Cod sursa(job #170835)

Utilizator ErgoVicol Sergiu Constantin Ergo Data 3 aprilie 2008 12:30:25
Problema Lacate Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.32 kb
//Lacate PreOni 2004

#include <fstream>
using namespace std;
ifstream fin("lacate.in");
ofstream fout("lacate.out");

int main(){
      int n,i,x;
	fin>>n;
      	fout<<n<<' '<<2;
      for (i=1;i<=n;i++){
         	x=i+1;
            if (x==n+1) x=1;
      	fout<<i<<' '<<x<<'\n';
      }
	fout.close();
      return 0;

}