This file contains 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
# @author godmar | |
from math import sqrt, ceil | |
n = int(raw_input()) | |
a = map(int, raw_input().split()) | |
sn = int(ceil(sqrt(n))) | |
buckets = [set(a[sn*i:sn*(i+1)]) for i in range(n/sn)] | |
q = int(raw_input()) |
This file contains 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
""" | |
From: http://www.xs4all.nl/~rjoris/maximummatching.html | |
""" | |
"""Weighted maximum matching in general graphs. | |
The algorithm is taken from "Efficient Algorithms for Finding Maximum | |
Matching in Graphs" by Zvi Galil, ACM Computing Surveys, 1986. | |
It is based on the "blossom" method for finding augmenting paths and | |
the "primal-dual" method for finding a matching of maximum weight, both |
This file contains 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
diff --git a/src/app/app.js b/src/app/app.js | |
index 160ad4a..62e6e13 100644 | |
--- a/src/app/app.js | |
+++ b/src/app/app.js | |
@@ -359,25 +359,29 @@ import login_template from '../templates/login.html'; | |
}); | |
} | |
- config.nav_targets.topbar.forEach(function (item) { | |
- // add the routes from config. |
This file contains 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
diff --git a/src-solution/socket.c b/src-solution/socket.c | |
index 112e12b..6f0c402 100644 | |
--- a/src-solution/socket.c | |
+++ b/src-solution/socket.c | |
@@ -13,6 +13,7 @@ | |
#include <sys/sendfile.h> | |
#include <netdb.h> | |
#include <netinet/in.h> | |
+#include <netinet/tcp.h> | |
#include <errno.h> |
This file contains 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
Petronila Pando | |
Jeramy Jarrett | |
Mitsue Mandel | |
Alfonso Able | |
Rae Rubalcava | |
Ezra Edison | |
Dierdre Demeo | |
Marnie Mendes | |
Velda Vogel | |
Eve Eller |
This file contains 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
Below is a backtrace of the threadpool-related deadlock that occurs in eosio.cdt 1.6.1 while linking with parallel linking enabled. | |
I've also included the relevant code sections in LLVM and the fix. | |
(gdb) attach 28855 | |
Attaching to program: /usr/opt/eosio.cdt/1.6.1/bin/wasm-ld, process 28855 | |
[New LWP 28856] | |
[New LWP 28857] | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". |
This file contains 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 <bits/stdc++.h> | |
using namespace std; | |
namespace std { | |
template<typename S1, typename S2> struct hash<pair<S1, S2>> | |
{ | |
size_t operator()(pair<S1, S2> const& p) const noexcept | |
{ | |
size_t const h1 ( std::hash<S1>{}(p.first) ); | |
size_t const h2 ( std::hash<S2>{}(p.second) ); |
This file contains 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
#!/usr/bin/python | |
# n-m nim | |
if True: | |
M, N = 3, 10 | |
else: | |
M, N = 2, 2 | |
def mex(S): | |
i = 0 |
This file contains 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
import 'package:objd/core.dart'; | |
class SummonOnlyOnce extends Widget { | |
Condition preCondition; | |
Summon summon; | |
String randomtag; | |
SummonOnlyOnce(Condition this.preCondition, Summon this.summon) { | |
this.randomtag = 'F3AAEC1'; // XXX: find out how to make random tag in dart | |
} |
This file contains 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
countries = [ | |
{ country: "US", rank: 3 }, | |
{ country: "US", rank: 4 }, | |
{ country: "UK", rank: 3 }, | |
{ country: "UK", rank: 3 }, | |
{ country: "Germany", rank: 7 }, | |
]; | |
let o1 = Object.fromEntries(countries.map(c => [c.country, 1])); |