Pagini recente » Borderou de evaluare (job #2097178) | Borderou de evaluare (job #2797612) | Borderou de evaluare (job #2902148) | Cod sursa (job #2001957)
#include <bits/stdc++.h>
using namespace std;
ifstream in("tije.in");
ofstream out("tije.out");
string ans;
inline void MOVE( const int &a, const int &b ) {
ans += std::to_string(a) + " " + std::to_string(b) + "\n";
}
int main(){
int N;
in >> N;
for( int i = N - 1; i; --i ) {
for( int j = N; j; -- j )
for( int k = i; k; -- k) MOVE(j,j+1);
for( int j = i; j; --j ) MOVE(N+1,1);
}
out << ans;
return 0;
}