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 main(void){
- srand(time(0));
- int tt=1;
- printf("%d\n",tt);
- F(tt){
- // int N=r%20+2,M=r%min(50,N*(N-1)/2)+1,K=r%10+1;
- int N=r%5+2,M=r%min(50,N*(N-1)/2)+1,K=r%3+1;
- printf("%d %d %d\n",N,M,K);
- set<ii> T;
- while(T.size()^M){ GR T.insert(minmax(a+1,b+1));}
- for(auto&h:T)printf("%d %d %d\n",h.aa,h.bb,r%1000000+1);
- GR printf("%d %d\n",a+1,b+1);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement