Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #pragma comment(linker, "/stack:16777216")
- #include <string>
- #include <vector>
- #include <map>
- #include <list>
- #include <iterator>
- #include <cassert>
- #include <set>
- #include <queue>
- #include <iostream>
- #include <sstream>
- #include <stack>
- #include <deque>
- #include <cmath>
- #include <memory.h>
- #include <cstdlib>
- #include <cstdio>
- #include <cctype>
- #include <algorithm>
- #include <utility>
- #include <time.h>
- using namespace std;
- #define FOR(i, a, b) for(int i=(a);i<(b);i++)
- #define RFOR(i, b, a) for(int i=(b)-1;i>=(a);--i)
- #define FILL(A,value) memset(A,value,sizeof(A))
- #define ALL(V) V.begin(), V.end()
- #define SZ(V) (int)V.size()
- #define PB push_back
- #define MP make_pair
- #define Pi 3.14159265358979
- #define x0 ikjnrmthklmnt
- #define y0 lkrjhkltr
- #define y1 ewrgrg
- typedef long long Int;
- typedef unsigned long long UInt;
- typedef vector<int> VI;
- typedef pair<int, int> PII;
- typedef pair<Int, Int> PLL;
- typedef pair<double, double> PDD;
- const int INF = 1000000000;
- const int BASE = 1000000007;
- const int MAX = 10000;
- const int MAX2 = 10007;
- const int MAXE = 100000;
- const int ADD = 1000000;
- const int MOD = 1000000007;
- const int CNT = 0;
- int getRand()
- {
- int x = 0;
- FOR (i,0,9)
- x = x * 10 + (rand() % 10);
- return x;
- }
- int main(int argc, char* argv[])
- {
- int test, n, k, w, b;
- sscanf(argv[1], "%d", &test);
- sscanf(argv[2], "%d", &n);
- sscanf(argv[3], "%d", &k);
- sscanf(argv[4], "%d", &w);
- sscanf(argv[5], "%d", &b);
- srand(test+n+k+w+b);
- cout << n << ' ' << k << endl;
- VI A;
- if (b == 1)
- {
- int x = getRand() % w + 1;
- FOR (i,0,k)
- A.PB(x);
- }
- while (SZ(A) < n)
- A.PB(getRand() % w + 1);
- FOR (i,0,SZ(A))
- printf("%d%c", A[i], i+1 == n ? '\n' : ' ');
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement