This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
seq = list(map(int, input().replace(',', ' ').split())) | |
n = len(seq) | |
# Parameters | |
r = 13 | |
d = 2 | |
u = n - r | |
mat = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned bexgcd(unsigned x, unsigned y, int *a, int *b){ | |
int bx = __builtin_ctz(x); | |
int by = __builtin_ctz(y); | |
int u, v, w, z; | |
int t = 0; | |
int k; | |
unsigned xx = x >> bx; | |
unsigned yy = y >> by; | |
u = 1; v = 0; w = 0; z = 1; | |
if(bx >= by){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <algorithm> | |
int n, m; | |
int A[25]; | |
int dp[1<<25]; | |
int feedback_arc_set(int a, int v){ | |
return __builtin_popcount(A[v] & a); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <cstring> | |
#include <cmath> | |
#include <random> | |
#include <algorithm> | |
const double beta_f = 0.000001; | |
const double beta_l = 0.010000; | |
//const int iter = 20000000; |