Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
sd2
#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,pll>,ll> M; loop(i,0,4) { loop(j,0,4) { loop(k,0,4) { loop(l,0,4) {ll A[4]={1,2,3,4}; swap(A[0],A[i]); swap(A[1],A[j]); swap(A[2],A[k]); swap(A[3],A[l]); M[mkp(mkp(A[0],A[1]),mkp(A[2],A[3]))]++; //\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.fir<<it.fir.sec.sec<<" "<<it.sec<<endl; }
run
|
edit
|
history
|
help
0
Christopher-Stellar
funpointer
SegTree
Programa 3 (corregido)
CPP - Arrays - Ex.3
Menu Combination Sum
TupleCPP
LRUCache
Cpp update 1
diamond