Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
sd
#include<bits/stdc++.h> using namespace std; /* #include<boost/multiprecision/cpp_int.hpp> namespace mp=boost::multiprecision; using namespace mp;*/ //cpp_int #define mem(A) memset(A,0,sizeof(A)) #define loop(i,a,n) for(long long i=a;i<n;i++) #define pb push_back #define mkp make_pair #define prq priority_queue #define fir first #define sec second #define all(A) A.begin(),A.end() #define mod 1000000007 #define take(t) ll t;cin>>t;while(t--) #define en "\n" typedef long long ll; typedef pair<ll,ll> pll; int main() { //freopen("input.txt", "r", stdin); ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); map<pair<pll,ll>,ll> M; loop(i,0,3) { loop(j,0,3) { loop(k,0,3) { ll A[3]={1,2,3}; swap(A[0],A[i]); swap(A[1],A[j]); swap(A[2],A[k]); M[mkp(mkp(A[0],A[1]),A[2])]++; //\cout<<A[0]<<" "<<A[1]<<" "<<A[2]<<" "<<i<<j<<k<<en; } } } for(auto it:M) cout<<it.fir.fir.fir<<it.fir.fir.sec<<it.fir.sec<<" "<<it.sec<<endl; }
run
|
edit
|
history
|
help
0
triplets from vector
semiprog.cpp
Graph DFS
MovConstrAssign4
Days in month database using unordered_map
Ploshtina na krug
Flowchart segitiga
Let's Go!
MovConstrAssign2
const test