Advertisement
Morass

Quantum Stones

Nov 4th, 2018
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.27 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define PB push_back
  4. #define ZERO (1e-10)
  5. #define INF (1<<30)
  6. #define CL(A,I) (memset(A,I,sizeof(A)))
  7. #define DEB printf("DEB!\n");
  8. #define D(X) cout<<"  "<<#X": "<<X<<endl;
  9. #define EQ(A,B) (A+ZERO>B&&A-ZERO<B)
  10. typedef long long ll;
  11. typedef long double ld;
  12. typedef pair<ll,ll> pll;
  13. typedef vector<int> vi;
  14. typedef pair<int,int> ii;
  15. typedef vector<ii> vii;
  16. #define IN(n) int n;scanf("%d",&n);
  17. #define FOR(i, m, n) for (int i(m); i < n; i++)
  18. #define REP(i, n) FOR(i, 0, n)
  19. #define F(n) REP(i, n)
  20. #define FF(n) REP(j, n)
  21. #define FT(m, n) FOR(k, m, n)
  22. #define aa first
  23. #define bb second
  24. void ga(int N,int *A){F(N)scanf("%d",A+i);}
  25. #define pc(C) (putchar_unlocked(C))
  26. ll R(int b=62){ll r(0);F(b)r<<=1,r|=rand()&1;return r;}
  27. #define r rand()
  28. #define GR int a,b;a=b=R()%N;while(a==b)a=R()%N;
  29. int main(void){
  30.     srand(time(0));
  31.     int tt=1;
  32.     printf("%d\n",tt);
  33.     F(tt){
  34. //        int N=r%20+2,M=r%min(50,N*(N-1)/2)+1,K=r%10+1;
  35.         int N=r%5+2,M=r%min(50,N*(N-1)/2)+1,K=r%3+1;
  36.         printf("%d %d %d\n",N,M,K);
  37.         set<ii> T;
  38.         while(T.size()^M){ GR T.insert(minmax(a+1,b+1));}
  39.         for(auto&h:T)printf("%d %d %d\n",h.aa,h.bb,r%1000000+1);
  40.         GR printf("%d %d\n",a+1,b+1);
  41.     }
  42.     return 0;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement