Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int t, strana;
- cin >> t >> strana;
- int s = 1, e = 4 * t;
- for(int i = 0; i < t; i++) {
- if(s == strana) {
- cout << s + 1 << " " << e - 1 << " " << e << endl;
- }
- else if(s + 1 == strana) {
- cout << s << " " << e - 1 << " " << e << endl;
- }
- else if(e - 1 == strana) {
- cout << s << " " << s + 1 << " " << e << endl;
- }
- else if(e == strana) {
- cout << s << " " << s + 1 << " " << e - 1 << endl;
- }
- s += 2;
- e -= 2;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement