KarleFKremen

Untitled

Mar 3rd, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.96 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. /****************************************
  4.  *                                      *
  5.  *  Made by:    KarleFKremen            *
  6.  *  At:         5.2.16 00:41:50 ALMT    *
  7.  *  For:        <contest name>          *
  8.  *                                      *
  9.  ****************************************/
  10.  
  11. // settings
  12.     #define FILE "test"
  13.     #define USE_FREOPEN 0
  14.     #define USE_LONG 0
  15.     #define USE_IOSOPT 0
  16.     #define INTERACT 0
  17.  
  18. // system
  19.     #if USE_LONG
  20.         typedef long long ll;
  21.     #else
  22.         typedef int ll;
  23.     #endif
  24.     #if USE_LONG
  25.         typedef unsigned long long ull;
  26.     #else
  27.         typedef unsigned int ull;
  28.     #endif
  29.     typedef short sym;
  30.     #if INTERACT
  31.         #define eol endl
  32.     #else
  33.         #define eol '\n'
  34.     #endif
  35.     #define pb push_back
  36.     #define mp make_pair
  37.     #define p(a, b) pair < a, b >
  38.     #define sq(x) (x * x)
  39.     #define fi first
  40.     #define se second
  41.     #define rm erase
  42.     #define ins insert
  43.     #define rev(a) reverse(a.begin(), a.end())
  44.     #define rs resize
  45.     #define sz size
  46.     #define M3 (ll)1e3
  47.     #define M4 (ll)1e4
  48.     #define M5 (ll)1e5
  49.     #define M6 (ll)1e6
  50.     #define M7 (ll)1e7
  51.     #define M8 (ll)1e8
  52.     #define M9 (ll)1e9
  53.     #define stlprint(a) \
  54.         for(auto __LEVEL_1_STL_ITERATOR = a.begin(); __LEVEL_1_STL_ITERATOR != a.end(); __LEVEL_1_STL_ITERATOR++) \
  55.         { \
  56.             cout << (*__LEVEL_1_STL_ITERATOR) << ' '; \
  57.         }
  58.     #define stlfor(a) for(auto it = a.begin(); it != a.end(); it++)
  59.  
  60. using namespace std;
  61.  
  62. int main(int c, char *v[])
  63. {
  64.     // ios{
  65.         #if USE_IOSOPT
  66.             ios_base::sync_with_stdio(false);
  67.             cin.tie(0);
  68.         #endif
  69.         // #if USE_FREOPEN
  70.             // freopen(FILE".in", "r", stdin);
  71.             // freopen(FILE".out", "w", stdout);
  72.         // #endif
  73.     ll n, m;
  74.     n = atoi(v[1]);
  75.     m = atoi(v[2]);
  76.     if(v[1] == "keyboard")
  77.         cin >> n >> m;
  78.     vector < ll > a;
  79.     for(int i = 0; i < n; i++)
  80.         a.pb(i + 1);
  81.     next_permutation(a.begin(), a.end());
  82.     next_permutation(a.begin(), a.end());
  83.     next_permutation(a.begin(), a.end());
  84.     cout << n << ' ' << m << endl;
  85.     stlprint(a);
  86.     cout << endl;
  87.     for(int i = 0; i < m; i++)
  88.     {
  89.         cout << ((i % 2) + 1) << ' ' << (n--) << endl;
  90.     }
  91. }
Advertisement
Add Comment
Please, Sign In to add comment