fork download
  1. #include <bits/stdc++.h>
  2.  
  3. #define oo 1000000007
  4. #define maxN 100005
  5. #define debug(a) cout << #a << " = " << a << endl
  6. #define fdebug(a, x, y) { cout << #a << " : "; fto(_, x, y) cout << a[_] << ' '; cout << endl; }
  7. #define fto(i, x, y) for(int i = (x); i != (y) + (((x) < (y) ? 1 : -1)); i += ((x) < (y)) ? 1 : -1)
  8. #define ftoa(i, x, y, a) for(int i = (x); i != (((x) < (y)) ? (((y)-(x))/a+1)*a+(x) : (x)-(((x)-(y))/a+1)*a); i += ((x) < (y)) ? (a) : -(a))
  9. #define mp make_pair
  10. #define pb push_back
  11. #define pf push_front
  12. #define ll long long
  13. #define lb lower_bound
  14. #define ub upper_bound
  15. #define ull unsigned long long
  16. #define ii pair<int, int>
  17. #define vi vector<int>
  18. #define vii vector<ii>
  19. #define FF first
  20. #define SS second
  21. #define mt make_tuple
  22. #define eb emplace_back
  23.  
  24. using namespace std;
  25.  
  26. int main() {
  27. #ifndef ONLINE_JUDGE
  28. freopen("template.inp", "r", stdin);
  29. freopen("template.out", "w", stdout);
  30. #endif // ONLINE_JUDGE
  31.  
  32. int n, m, k;
  33. scanf("%d%d%d", &n, &m, &k);
  34.  
  35. ftoa (i, n, m, k) cout << i << " ";
  36. puts("");
  37. ftoa (i, m, n, k) cout << i << " ";
  38.  
  39. #ifndef ONLINE_JUDGE
  40. cout << endl;
  41. cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
  42. #endif
  43.  
  44. return 0;
  45. }
  46.  
  47.  
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
1433601664 1299086814 1164571964 1030057114 895542264 761027414 626512564 491997714 357482864 222968014 
134519604 269034454 403549304 538064154 672579004 807093854 941608704 1076123554 1210638404 1345153254