Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <vector>
- #include <queue>
- #include <algorithm>
- #include <string>
- #include <stack>
- #include <set>
- #include <map>
- #define pii pair <int,int>
- using namespace std;
- using ll = long long;
- using ld = long double;
- void cv(vector <int> &v){
- for (auto x: v) cout<<x<<' ';
- cout<<"\n";
- }
- void cvv(vector <vector <int> > &v){
- for (auto x: v) cv(x);
- cout<<"\n";
- }
- int n, mn, mx;
- vector <vector <int> > G;
- vector <pii> Edge;
- void cG(){
- for (int i = 0; i < n;++i){
- cout<<"("<<i<<"): ";
- cv(G[i]);
- }
- }
- void cEdge(){
- cout<<Edge.size()<<"\n";
- for (auto x: Edge){
- cout<<x.first+1<<' '<<x.second+1<<"\n";
- }
- }
- bool cmp()
- int main()
- {
- /*ios::sync_with_stdio(0);
- cin.tie(0);
- cout.tie(0);*/
- cin>>n>>mx>>mn;
- G.resize(n);
- for (int i = 0; i < n; ++i){
- if (G[i].size() == mn) continue;
- for (int j = 0; j < n && j != i; ++j){
- if (G[j].size() >= mn) continue;
- if (find(G[i].begin(), G[i].end(), j) == G[i].end() ){
- G[i].push_back(j);
- G[j].push_back(i);
- Edge.push_back({min(i, j), max(i, j)});
- }
- if (G[i].size() == mn){
- break;
- }
- }
- }
- //while ()
- cG();
- //cEdge();
- }
- /*
- 15 4 3
- 17 7 5
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement