Guest User

Untitled

a guest
Apr 11th, 2017
155
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #define _CRT_SECURE_NO_WARNINGS
  3. #pragma comment(linker, "/stack:16777216")
  4. #include <string>
  5. #include <vector>
  6. #include <map>
  7. #include <list>
  8. #include <iterator>
  9. #include <cassert>
  10. #include <set>
  11. #include <queue>
  12. #include <iostream>
  13. #include <sstream>
  14. #include <stack>
  15. #include <deque>
  16. #include <cmath>
  17. #include <memory.h>
  18. #include <cstdlib>
  19. #include <cstdio>
  20. #include <cctype>
  21. #include <algorithm>
  22. #include <utility>
  23. #include <time.h>
  24. using namespace std;
  25.  
  26. #define FOR(i, a, b) for(int i=(a);i<(b);i++)
  27. #define RFOR(i, b, a) for(int i=(b)-1;i>=(a);--i)
  28. #define FILL(A,value) memset(A,value,sizeof(A))
  29.  
  30. #define ALL(V) V.begin(), V.end()
  31. #define SZ(V) (int)V.size()
  32. #define PB push_back
  33. #define MP make_pair
  34. #define Pi 3.14159265358979
  35. #define x0 ikjnrmthklmnt
  36. #define y0 lkrjhkltr
  37. #define y1 ewrgrg
  38.  
  39. typedef long long Int;
  40. typedef unsigned long long UInt;
  41. typedef vector<int> VI;
  42. typedef pair<int, int> PII;
  43. typedef pair<Int, Int> PLL;
  44. typedef pair<double, double> PDD;
  45.  
  46. const int INF = 1000000000;
  47. const int BASE = 1000000007;
  48. const int MAX = 10000;
  49. const int MAX2 = 10007;
  50. const int MAXE = 100000;
  51. const int ADD = 1000000;
  52. const int MOD = 1000000007;
  53. const int CNT = 0;
  54.  
  55. int getRand()
  56. {
  57. int x = 0;
  58. FOR (i,0,9)
  59. x = x * 10 + (rand() % 10);
  60. return x;
  61. }
  62.  
  63. int main(int argc, char* argv[])
  64. {
  65. int test, n, k, w, b;
  66. sscanf(argv[1], "%d", &test);
  67. sscanf(argv[2], "%d", &n);
  68. sscanf(argv[3], "%d", &k);
  69. sscanf(argv[4], "%d", &w);
  70. sscanf(argv[5], "%d", &b);
  71. srand(test+n+k+w+b);
  72.  
  73. cout << n << ' ' << k << endl;
  74. VI A;
  75. if (b == 1)
  76. {
  77. int x = getRand() % w + 1;
  78. FOR (i,0,k)
  79. A.PB(x);
  80. }
  81.  
  82. while (SZ(A) < n)
  83. A.PB(getRand() % w + 1);
  84.  
  85. FOR (i,0,SZ(A))
  86. printf("%d%c", A[i], i+1 == n ? '\n' : ' ');
  87.  
  88.  
  89.  
  90.  
  91.  
  92. return 0;
  93. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×