Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define PB push_back
- #define ZERO (1e-10)
- #define INF (1<<30)
- #define CL(A,I) (memset(A,I,sizeof(A)))
- #define DEB printf("DEB!\n");
- #define D(X) cout<<" "<<#X": "<<X<<endl;
- #define EQ(A,B) (A+ZERO>B&&A-ZERO<B)
- typedef long long ll;
- typedef long double ld;
- typedef pair<ll,ll> pll;
- typedef vector<int> vi;
- typedef pair<int,int> ii;
- typedef vector<ii> vii;
- #define IN(n) int n;scanf("%d",&n);
- #define FOR(i, m, n) for (int i(m); i < n; i++)
- #define REP(i, n) FOR(i, 0, n)
- #define F(n) REP(i, n)
- #define FF(n) REP(j, n)
- #define FT(m, n) FOR(k, m, n)
- #define aa first
- #define bb second
- void ga(int N,int *A){F(N)scanf("%d",A+i);}
- #define pc(C) (putchar_unlocked(C))
- ll R(int b=62){ll r(0);F(b)r<<=1,r|=rand()&1;return r;}
- #define r rand()
- #define GR int a,b;a=b=r%N;while(a==b)a=r%N;
- int A[666];
- int main(void){
- srand(time(0));
- int tt(100);//Number of test-cases
- printf("%d\n",tt);
- F(tt){
- pc(10);//blank
- int N=rand()%26+1;//# of nodes
- F(N){
- printf("%c %d",i+65,1+rand()%10);//print node+time
- if(i){
- pc(32);
- set<char> S;//we don't want duplicities
- int H=rand()%i+1;//number of PARENTS
- while(S.size()^H)S.insert(rand()%i);//generate parents until size
- for(auto&h:S)pc(h+65);//print all parents
- }
- pc(10);//End of line
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement