my-algorithm's People
my-algorithm's Issues
初期化リストの初期化順序
merge segtreeですが、AOJ2426Treasure Huntで以下のコードを提出するとRuntime errorで落ちます。
https://ideone.com/9TtdY3
手元ではgcc8では動きますがclangでは動きません(warningもでます)。
初期化リストの部分をsorted((int)cand.size())とするか、int szを他の変数より前に持ってくる必要があるそうです。
参考:https://qiita.com/tyanmahou/items/c8f69a1a23d2f7669cfc
tetrationのa=0の場合にバグがある
BIT_two_dimensional.hpp
二次元BITの添字アクセスがおかしい気がした
こんな感じになってたけど
void add(const int x,const int y,V val){
int i = x+1, j = y+1;
while(i < n){
while(j < m){
bit[i][j] += val;
j += j & -j;
}
i += i & -i;
}
}
こうな気がする
void add(const int x,const int y,V val){
int i = x+1;
while(i < n){
int j = y+1;
while(j < m){
bit[i][j] += val;
j += j & -j;
}
i += i & -i;
}
}
(for文で書いたほうが良さそう)
tetration のバグ報告
2^^3 = 16 ですが、tetration(2, 3, 32)
が 0
を返してしまいます
C4 Find Algorithm O(msqrt(m))
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.