Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
cpp permutations
#include<cstdio> #include<algorithm> using namespace std; //ma, ch, en, pe, self, self, choose, choose int pm[]={1,2,3,4,5,6,7,8}; int main() { int r=0; int rr=0; do { if (pm[4]!=pm[5]-1)continue; if (pm[6]!=pm[7]-1)continue; if (pm[6]<5)continue; if (pm[0]==8)continue; if (pm[3]==1||pm[4]==1)continue; ++r; if (pm[4]==4)++rr; }while(next_permutation(pm, pm+8)); printf("%d %d\n", r,r-rr); }
run
|
edit
|
history
|
help
0
FloydTriangle
code
Smalllest subarray wiith sum greater than x
Precendence of Pointer Indirection Example
Matrix rotation
Guess Number
2015(M2)Mod.
runtime template mode processor
poprawione_i_podzielone_1
Dead_Lock