Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Online C++ Compiler.
- Code, Compile, Run and Debug C++ program online.
- Write your code in this editor and press "Run" button to compile and execute it.
- *******************************************************************************/
- #include <iostream>
- #include <bits/stdc++.h>
- using namespace std;
- void cs(set <int> v){
- for (int x: v){
- cout<<x<<' ';
- }cout<<"\n";
- }
- void cv(vector <int> v){
- for (int x: v){
- cout<<x<<' ';
- }cout<<"\n";
- }
- int main()
- {
- vector <set <int> > v;
- vector <vector <int> > al;
- for (int i = 0; i < 72; ++i){
- set <int> a;
- vector <int> now;
- int id = i;
- bool was=0;
- for (auto s: v){
- if (s.find(i) != s.end()){
- was=1;
- break;
- }
- }
- if (was) continue;
- while (a.find(id) == a.end()){
- // cout<<"go\n";
- a.insert(id);
- now.push_back(id);
- //cout<<id<<"\n";
- id += 32;
- id %= 72;
- if (a.find(id) != a.end()){
- //cout<<id<<"\n";
- }
- }
- //cout<<"a\n";
- //cs(a);
- al.push_back(now);
- v.push_back(a);
- }
- cout<<"множеств = "<<al.size()<<"\n";
- for (auto d: al) cv(d);
- }
Add Comment
Please, Sign In to add comment