Cod sursa(job #2001957)
| Utilizator | Data | 18 iulie 2017 11:16:46 | |
|---|---|---|---|
| Problema | Tije | Scor | 70 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.48 kb |
#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;
}
