uuid
stringlengths
36
36
repo_name
stringlengths
5
133
relative_path
stringlengths
3
3.76k
content
stringlengths
282
4.03M
category
stringclasses
6 values
algo_rel_score
float32
0.9
1
quality_score
float32
3
8.13
source_meta
dict
f78a53f2-8357-4a0c-82b7-e52b0eb14465
google-gazzza/algorithm
leetcode/medium/40_combination_sum_II/kdd.hpp
// https://leetcode.com/problems/combination-sum-ii/ // Runtime: 8 ms, faster than 83.92% of C++ online submissions for Combination Sum II. // Memory Usage: 9 MB, less than 92.11% of C++ online submissions for Combination Sum II. class Solution { private: template <class Results, class Comb, class Candidates> ...
ALGO
0.999984
6.646262
{ "github_metadata": { "branch": "master", "commit_count": 3291, "repo_created_at": "2019-11-25T12:43:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13, "forks": 49, "issues": 0, "pull_requests": 3748 }, "file_meta": { "content_id": "3af...
8e36fd17-0418-4265-a4af-09aea732aea8
Leezed525/learning-algorithm
test/vjudge/hdu/1711.cpp
#include<cstdio> #include<cstring> #include<algorithm> #include<iostream> #include<string> #include<vector> #include<stack> #include<bitset> #include<cstdlib> #include<cmath> #include<set> #include<list> #include<deque> #include<map> #include<queue> #include<sstream> using namespace std; //*(int(*)[10])arr_name typedef...
ALGO
0.999736
3.695879
{ "github_metadata": { "branch": "master", "commit_count": 185, "repo_created_at": "2022-04-07T03:12:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a6d6c67c...
4fa55346-c714-4235-9e19-d3d0d5efea5f
ruphy/AnalysisPackage_qqHWWlnulnu
test/Susy12/weight_electron.cxx
double weight_electron(double pT1, double eta1, int flavour1, double pT2, double eta2, int flavour2){ double weight = 1; double weight1 = 1; double weight2 = 1; if (flavour1 == 11) { if (pT1>=10 && pT1<15 && fabs(eta1)>=0 && fabs(eta1)<1) weight1 = 0.910407; if (pT1>=15 && pT1<20 && fabs(eta1)>=0 && fabs(eta...
DATA
0.915691
5.76706
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2012-09-17T18:20:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "66f181ff3e...
8682fb57-6413-411e-80a9-58190c9e6224
gtkn/atcoder
ABC_381_E.cpp
//title #include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; #define rep(i,n) for (ll i = 0; i < (n); ++i) #define rep1(i,n) for (ll i = 1; i <= (n); ++i) #define repr(i,n) for (ll i = (n)-1; i >= 0; --i) #define rep1r(i,n) for (ll i = (n); i > 0; --i) #define bit(n,k) ((n>>k)&1...
ALGO
0.999737
4.189794
{ "github_metadata": { "branch": "main", "commit_count": 421, "repo_created_at": "2022-03-15T05:19:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7252c3b7a...
fb435977-d70c-4315-9555-dc5583abba30
rlawdgus/TIL
c/assingment/algorithm/algorithm/coin.cpp
#include <fstream> #define MAX 101 using namespace std; bool board[MAX][MAX][MAX]; void coin_game() { for (int i = 2, j = 1; i < MAX; i++, j++) { if (j != 4) { board[0][0][i] = true; board[0][i][0] = true; board[i][0][0] = true; } else j = 0; } for (int i = 0; i < MAX; i++) { for (int j = 0; j < ...
ALGO
0.99891
3.979036
{ "github_metadata": { "branch": "master", "commit_count": 171, "repo_created_at": "2021-04-01T10:20:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a3e7966...
714ac8bf-f9da-4a69-8921-a57eaec9c8e1
vss021/365-Day-Coding-Challenge
Day-46/problem1.cpp
#include <iostream> #include <unordered_map> using namespace std; class Solution { public: int firstUniqChar(string s) { unordered_map<char, int> mp; for (int i = 0; i < s.length(); i++) { mp[s[i]]++; } for (int i = 0; i < s.length(); i++) { if (mp[s[i]] ==...
ALGO
0.99927
6.17619
{ "github_metadata": { "branch": "main", "commit_count": 209, "repo_created_at": "2023-12-22T05:19:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "95ac78e4f1...
2612011d-09e5-40f0-bb31-728856434e19
gtkn/atcoder
ABC_368_F.cpp
//title #include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; #define rep(i,n) for (ll i = 0; i < (n); ++i) #define rep1(i,n) for (ll i = 1; i <= (n); ++i) #define repr(i,n) for (ll i = (n)-1; i >= 0; --i) #define rep1r(i,n) for (ll i = (n); i > 0; --i) #define bit(n,k) ((n>>k)&1...
ALGO
0.999929
4.451529
{ "github_metadata": { "branch": "main", "commit_count": 421, "repo_created_at": "2022-03-15T05:19:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "58859c4332...
800aa317-3637-446b-9606-57df31f99dd0
Aman-Nehra/Project_Verification
plagiarism Detector/phase 1/match_submissions.hpp
#include <array> #include <iostream> #include <vector> #include <unordered_map> #include <cmath> // Function to check if the two sequences match approximately bool is_fuzzy_match(const std::vector<int>& seq1, const std::vector<int>& seq2, size_t len1, size_t len2) { size_t match_count = 0; size_t max_mismatche...
ALGO
0.997143
5.510075
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2024-09-30T11:02:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8077a1da46a...
b7c0c042-be13-4e58-8792-b3b827f29e4f
projectchrono/chrono
src/demos/mbs/demo_MBS_custom_contact.cpp
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of t...
ALGO
0.992502
6.525405
{ "github_metadata": { "branch": "main", "commit_count": 18253, "repo_created_at": "2013-09-03T15:34:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2460, "forks": 515, "issues": 101, "pull_requests": 4 }, "file_meta": { "content_id": "1d...
3665143d-ce8e-4094-bbaf-1f6749b0466a
BKM8383/Recursion-tree-visualizer
recurtion.cpp
#include <iostream> #include <vector> #include <queue> #include <complex> using namespace std; // each iteration argument array vector<int> argument_array; void display_argument_array() { for (int i = 0; i < argument_array.size(); i++) { cout << argument_array[i] << ","; } } //class for binary tree ...
ALGO
0.999571
5.393239
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-27T10:46:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d633cf69b8ff...
ad4dbeb3-ee46-4e71-b200-84620be3b26a
bak3839/baekjoon_cpp
백준/Silver/1251. 단어 나누기/단어 나누기.cc
#include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; string word; vector<string> reverse_word; string SwapWord(int idx1, int idx2, string tmp) { for (int i = 0; i < tmp.size() / 2; i++) { char ch = tmp[i]; tmp[i] = tmp[tmp.size() - i - 1]; tmp...
ALGO
0.999997
4.459624
{ "github_metadata": { "branch": "master", "commit_count": 1166, "repo_created_at": "2022-08-20T05:06:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c75f79...
45b3b597-bd9a-44e3-933c-1afce32e2caa
Fabio-A-Sa/Y3S2-ComputacaoParalelaDistribuida
Exercises/Parallel/pipeline2.cpp
#include <omp.h> #include <iostream> #include <unistd.h> #include <time.h> /* time_t, struct tm, difftime, time, mktime */ using namespace std; // this program reads 4 files to process. Each file is processed in "10" chuncks int main (int argc, char *argv[]) { int i, j, k=0; int ProcessingNum=10; time_t time...
DATA
0.993499
3.676728
{ "github_metadata": { "branch": "main", "commit_count": 188, "repo_created_at": "2023-02-05T17:48:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "af5f631c6a...
0499f4a6-54e5-486d-9e44-3323602f8503
Sumanth-NR/CompetitiveProgramming
Platforms/CSES/TreeAlgorithms/Subordinates.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; vector<int> p; vector<int> w; vector<vector<int>> e; void dfs(int u) { for (auto &v: e[u]) { dfs(v); w[u] += w[v]; } } void solve() { int n; cin >> n; p.resize(n+1); w.resize(n+1, 1); e.resize(n+1); fo...
ALGO
0.999835
3.68184
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2022-04-18T13:29:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e640bd0...
a3e7549e-0335-4e95-9010-ee9fb95ea0ed
lds217/lds
CLAOJ/pagoda.cpp
// Template // #include <bits/stdc++.h> #define FOR(i, a, b) for(ll i=a, _b=b; i<=_b; i++) #define FORD(i, a, b) for(ll i=a, _b=b; i>=_b; i--) #define pb push_back #define ALL(a) a.begin(), a.end() #define mp make_pair #define fi first #define se second #define mset(a, b) memset(a, b, sizeof(a)) #define MASK(i) (1LL<<(...
ALGO
0.999938
3.247377
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2023-04-05T19:12:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e82bf03660...
342526a2-fffa-47b9-9b92-1477c8d13342
bvquoc/CP-Trainning-2021
0 - Contest 2020/Ninh Binh PreVNOI 2017/PREVNOIB/Contestants/Ti127/teaworld.cpp
#include <bits/stdc++.h> using namespace std; const int N = 20, M = 2005; const double pi = acos(-1), eps = 1e-9; struct Data { double x, y, z, r; }; int n, m, k; double xs, ys, zs; vector<int> era[1 << N]; Data cir[M], point[N]; bool check[M]; int main() { ios::sync_with_stdio(false); cin.tie(0); freopen("teawo...
ALGO
0.99965
3.791323
{ "github_metadata": { "branch": "master", "commit_count": 611, "repo_created_at": "2020-06-03T07:47:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "962dbd40...
217b1759-6eec-4c77-99a7-e4ec850111ca
rashid5925/Connect-3-Game
main.cpp
//CONNECT 3 GAME #include <iostream> #include <graphics.h> using namespace std; class Connect3 { public: int board[5][5]={{0,0,0,0,0}, {0,0,0,0,0}, {0,0,0,0,0}, {0,0,0,0,0}, {0,0,0,0,0}}; int column1=4,column2=4,column3=4,column4=4,column5=4; int player=1; //switching be...
ALGO
0.996232
3.724042
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-04-28T11:57:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f9a58723c...
820303e3-2140-45f5-b360-91ae789f9457
AbdelrahmanElsheikh965/The-C-plus-plus
Problem-Solving/Online Problems/Buy 2 Chocolates/main.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: vector<int> numbers; int vSize; void calc(int x) { numbers.push_back(x); } int getMin() { int vMin = numbers[0]; for (int i = 0; i < numbers.size(); i++) { if (numbers[i] < vMi...
ALGO
0.999975
4.605917
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2023-11-07T18:23:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4a53941e...
528494fd-7cde-46d2-94f2-d3c3dd3db818
JianYang-Lab/MeDuSAJ
src/REML.cpp
#include "INV.hpp" #include "MLM.h" //[[Rcpp::export]] Eigen::MatrixXd ecor(Eigen::MatrixXd mat) { Eigen::MatrixXd centered = mat.rowwise() - mat.colwise().mean(); Eigen::MatrixXd cov = (centered.adjoint() * centered) / double(mat.rows() - 1); return (cov); } //[[Rcpp::export]] std::vector<Eigen::MatrixXd> reml...
ALGO
0.999758
3.305388
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2021-09-23T04:41:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e05a6686e722...
912f76c4-ab26-4756-8352-17d709d703b7
MouseSun846/EffectiveCpp
src/main.cpp
#include <iostream> #include <string> #include "Widget/Widget.h" vector<vector<string>> mostPopularCreator(vector<string>& creators, vector<string>& ids, vector<int>& views) { vector<vector<string>> res; map<string,long long> grid; map<string,string> gridId; map<string,long long> viewMp; long long m...
TOOL
0.993477
5.028749
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-10-23T11:13:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4be5b33201...
e7b65042-423f-4110-8b5f-081a80e32f8e
pedrofariasantos/ponderada_DHT
main.cpp
#include <iostream> #include <list> #include <string> const int MAX_ITEMS = 100; class Produto { public: int codigo; std::string descricao; float preco; Produto() : codigo(-1), descricao(""), preco(0.0) {} Produto(int cod, std::string desc, float pre) : codigo(cod), descricao(desc), preco(pre) {}...
TEST
0.960899
6.171812
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-02-25T22:44:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c959e9a6d2e...
d966b591-c6f3-45cb-aa3a-d377df119d36
burakbayramli/books
Nodal_Discontinuous_Galerkin_Methods_Hesthaven/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CurvedCNS2D_Run.cpp
// CurvedCNS2D.m // function Q = CurvedCNS2D(Q, FinalTime, ExactSolution, ExactSolutionBC) // 2007/07/12 //--------------------------------------------------------- #include "NDGLib_headers.h" #include "CurvedCNS2D.h" //--------------------------------------------------------- void CurvedCNS2D::Run() //--------------...
ALGO
0.999594
4.010121
{ "github_metadata": { "branch": "master", "commit_count": 652, "repo_created_at": "2016-10-31T17:24:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 325, "forks": 201, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c68...
49fff33b-0db0-4ff2-ba54-4a595e760204
ishandutta2007/codeforces-nonalphabetic
300iq/normal/1184/B3.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #ifdef iq mt19937 rnd(228); #else mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count()); #endif const int N = (int) (1e5) + 7; vector <int> gr[N]; vector <int> ingr[N]; vector <pair <int, int> > guys[N]; vector <int> pr...
ALGO
0.999633
3.730924
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:49:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "862697ba7b5e...
ae966141-e2c6-4a34-a072-8b4999d26409
raincross7/code-similarity
codes/train_code/problem360/problem360_102.cpp
#include<iostream> #include<string> #include<cstdio> #include<vector> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<queue> #include<ciso646> #include<random> #include<map> #include<set> #include<complex> #include<bitset> #include<stack> #include<unordered_map> #include<utility> #in...
ALGO
0.999499
3.888598
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "756716a03c40...
11f952f3-e49d-4784-bf01-b605cb7bdd6e
blue-jam/blue-jam.github.io
icpclib/Source/poj3268.cpp
#include <string> #include <algorithm> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <memory> #include <queue> #include <set> #include <sstream> #include <...
ALGO
0.999928
4.667063
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2015-09-12T01:27:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "f22f37ef4...
d872694b-20aa-4b4c-87cc-c43144932853
gupta-parth/competitive-programming
solutions/codeforces/st1/p2b.cpp
// Author: <NAME> // Created: 16 December 2022 (Friday) #include <algorithm> #include <iostream> #include <vector> #include <cassert> #include <climits> using namespace std; template <typename T> class SegmentTree { private: int size; vector<T> tree; const T identity = 0; T func(T a, T b) { return a + b; } T ...
ALGO
0.999979
5.463155
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2022-12-30T04:11:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a0a5a09a...
08642700-7ee4-4b73-b08f-7ba1b2b67819
ITCoders/Human-detection-and-Tracking
tracking.cpp
#include <opencv2/core/utility.hpp> #include <opencv2/tracking.hpp> #include <opencv2/videoio.hpp> #include <opencv2/highgui.hpp> #include <iostream> using namespace std; using namespace cv; int main( int argc, char** argv ){ //help if(argc<2){ cout <<"Your command must contain the arguments mentioned below:" ...
TOOL
0.951695
5.18784
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2016-05-05T17:56:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 866, "forks": 306, "issues": 4, "pull_requests": 3 }, "file_meta": { "content_id": "31e1b5...
c7f289d6-e5c6-47af-89f8-2308c5ec6303
Tutu852/dsa
Queue/dqueue.cpp
#include<iostream> #include<deque> using namespace std; //this is a right code but this is not a good code to write class Deque{ public: int *arr; int size; int front; int rear; Deque(int size){ arr = new int[size]; this->size = size; front = -1; rear = -1;...
ALGO
0.998548
4.291747
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-11-24T05:44:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a27bb76f78d...
eda36b2d-f1e8-4faa-a584-60ef7bd78a54
Junwon/JyakuhaiEngine
Code/Engine/Math/MathUtils.cpp
#include "Engine/Math/MathUtils.hpp" #include <stdlib.h> #include "Engine/Math/AABB2D.hpp" #include "Engine/Math/Disc2D.hpp" #include "Engine/Math/Vector2.hpp" #include "Engine/Math/Vector3.hpp" #include "Engine/Math/Vector4.hpp" #include "Engine/Math/Quaternion.hpp" #include "Engine/Core/ErrorWarningAssert.hpp" #inc...
TOOL
0.934572
6.522643
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-01-26T03:59:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "948e03f8f4...
ad2e9055-891a-4867-b233-fb40a26c83bd
ishabhray/Competitive-Programming
codechef/EURON.cpp
#include <bits/stdc++.h> using namespace std; #define PI 3.141592653589 #define ll long long int #define ld long double #define vi vector<int> #define vl vector<ll> #define ii pair<int,int> #define pb push_back #define mp make_pair #define ff first #define ss second #define pll pair<ll,ll> #define vv vector int MOD=1e...
ALGO
0.999959
4.272667
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2021-04-25T07:45:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b9249bfdd5...
3ac81948-2f86-44e6-838e-23b6d76be30d
mit-gfx/diff_pd_public
cpp/core/src/fem/deformable_semi_implicit.cpp
#include "fem/deformable.h" #include "common/common.h" template<int vertex_dim, int element_dim> void Deformable<vertex_dim, element_dim>::ForwardSemiImplicit(const VectorXr& q, const VectorXr& v, const VectorXr& a, const VectorXr& f_ext, const real dt, const std::map<std::string, real>& options, VectorXr& q_next,...
ALGO
0.999871
6.163964
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-03-11T15:48:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 126, "forks": 14, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ecfc5624...
fc8c75b4-4ce0-497c-8a6e-4a6b32338441
jeru/kotlin-practices
codeforces/p2045h.cc
// Copyright 2024 <NAME> // SPDX-License-Identifier: Apache-2.0 // // Problem: H. Missing Separators // https://codeforces.com/problemset/problem/2045/H // // SEMI-LITERALLY translated from kotlin for performance comparison. #include <cstdio> #include <cassert> #include <algorithm> #include <iostream> #include <strin...
ALGO
0.999515
3.85208
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-12-06T22:30:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e036f6aa64...
c28018be-bc8a-4a47-ade3-68335006c231
YashKumar-17/GFG-160-Days
Add Binary Strings.cpp
### Approach and Intuition for `addBinary` The function `addBinary` performs binary addition on two binary strings (`s1` and `s2`). Here’s the breakdown of the approach and intuition: --- #### **1. Equalizing String Lengths** - **Intuition**: Binary addition operates from the least significant bit (rightmost bit) to...
ALGO
0.999993
7.364055
{ "github_metadata": { "branch": "main", "commit_count": 131, "repo_created_at": "2024-11-16T10:40:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "533035aea2...
419f6e79-da0b-4aea-b99d-4651901fae45
chaitanyakrishna-r/DSA
Arrays/MOREQUESTIONs/MoveZeros.cpp
#include<iostream> using namespace std; void PrintArr(int arr[],int n){ for(int i=0; i<n; i++){ cout<<arr[i]<<" "; } cout<<endl; } // void moveZeros(int arr[], int n){ // for(int i=0 ;i<n; i++){ // if(arr[i] == 0){ // int j=i+1; // for(; j<n; j++){ // ...
ALGO
0.99995
5.086374
{ "github_metadata": { "branch": "main", "commit_count": 214, "repo_created_at": "2024-03-15T16:35:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d9fbd8329f...
e4f90202-d0f1-4328-b393-af65b426aa2c
open-gunz/ogz-source
src/CSCommon/Source/MQuestFormula.cpp
#include "stdafx.h" #include "MQuestFormula.h" #include "MMath.h" bool MQuestFormula::Create(void) { return true; } int MQuestFormula::CalcQL(int nMinPlayerLevel) { if ((1 <= nMinPlayerLevel) && (nMinPlayerLevel <= 4)) return 0; else if ((5 <= nMinPlayerLevel) && (nMinPlayerLevel <= 12)) return 1; else if ((13 <...
ALGO
0.966678
4.141966
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2020-03-08T12:37:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 129, "forks": 50, "issues": 58, "pull_requests": 4 }, "file_meta": { "content_id": "662f35...
bc6fbf13-b1c3-43cc-9ac8-d055bf47ddfe
Summerimm/Algorithm
백준/Gold/17387. 선분 교차 2/선분 교차 2.cc
#define _CRT_SECURE_NO_WARNINGS #include <iostream> using namespace std; struct Coor { long long x, y; }; bool isLined(Coor A, Coor B, Coor C) { if (A.x < B.x) return B.x < C.x; else if (B.x < A.x) return C.x < B.x; else if (A.y < B.y) return B.y < C.y; else if (B.y < A.y) return C.y < B.y; } int CCW(Coor A...
ALGO
0.999986
4.22061
{ "github_metadata": { "branch": "main", "commit_count": 458, "repo_created_at": "2023-01-13T08:42:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1c3e06d815...
5db0219a-4f9f-46ab-86fb-ebfe3cf87ca5
jq-1886/Genetic-Algorithm
tests/test2.cpp
#include <cmath> #include <iostream> #include "CUnit.h" #include "CCircuit.h" #include "Genetic_Algorithm.h" // Testing the mass balance void test_evalute_circuit() { Genetic_Algorithm ga = Genetic_Algorithm(100, 0.9, 0.01, 10, 243, 243, 200, 1.0e-8, 10); std::cout << "Test 1: -----------------------------...
ALGO
0.914834
4.693627
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-01-07T11:11:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "807e50e6956b...
1fde406e-3f24-4601-9bbe-33faf18860d1
zswimau/PyFluxPro
solo/seqsolo/cntProLSClass.cc
// ********************************************* // CLASS: CounterPropagation LEAST SQUARE Networks // <NAME> // Aug. 15, 1995 // ********************************************* # include "cntProLSClass.h" // ********************************************************* void cntProLSClass:: cnt_init (int node, int vars, ...
ALGO
0.99987
5.24894
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-06-09T03:04:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4185d36b9...
1609f184-b537-4b9f-9d47-7cb7b03520bc
keshav2603/dsa-notes
recursionDSA/practiceRecurtion.cpp
#include <iostream> #include <vector> using namespace std; int sum(int n) // sum of n number by recurtion { if (n > 0) { return sum(n - 1) + n; } } int sum1(int n) // sum of n number by formula { return n * (n + 1) / 2; } int sum2(int n) // sum of n number by loop { int total = 0; while...
ALGO
0.999871
4.377715
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-03-29T11:08:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8228202fe510...
7c631f5f-b9e9-4b38-9f68-afb19e75d8b4
Novapool/CPSC231
Projects/Program06/Node.cpp
/*********************************** * Node.cpp * Binary Search Tree Node Class Implementation * Written by <NAME> ***********************************/ #include "Node.h" #include <iostream> #include <string> using namespace std; /*********************************** * Constructor * Create a new node with...
ALGO
0.998834
5.829176
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2025-03-28T19:34:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "957e4b132b1...
eff87fba-b903-414a-913a-7b86325ec212
sarvex/leetcode-cpp-23
union-find/2492.minimum-score-of-a-path-between-two-cities.cpp
#include <algorithm> #include <vector> class Solution { int Father[100005]; int FindFather(int x) { if (Father[x] != x) Father[x] = FindFather(Father[x]); return Father[x]; } void Union(int x, int y) { x = Father[x]; y = Father[y]; if (x < y) Father[y] = x; else Father[x] =...
ALGO
0.999065
4.837528
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2023-07-17T13:35:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "38a44a0e572...
6dfd79ea-f653-4503-930a-db0ab4cbef2b
wonderIand/psyduck
2017-08-24/D.cpp
// #include {{{ #include <iostream> #include <cassert> #include <cstring> #include <cstdlib> #include <cstdio> #include <cctype> #include <cmath> #include <ctime> #include <queue> #include <set> #include <map> #include <stack> #include <string> #include <bitset> #include <vector> #include <complex> #include <algorithm>...
ALGO
0.999649
4.210325
{ "github_metadata": { "branch": "master", "commit_count": 122, "repo_created_at": "2017-08-02T14:50:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c1a3d5291...
dbcb3764-788c-4205-8b6f-a5821409685f
thevirinchi/segment-tree
LabAss1.cpp
#include <bits/stdc++.h> #include <windows.h> using namespace std; int main(); /*--- Answer One ---*/ struct node{ int data; struct node* left; struct node* right; }; struct node* newNode(int key){ struct node* temp = new node; temp->data = key; temp->left = NULL; temp->right = NULL; return temp; } ...
ALGO
0.999935
5.117243
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-01-15T04:31:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11bced0fff...
604a277d-b495-42b6-a24e-609f8c19c3e7
TJD2004/Coding-in-CPP
DSA/Stack/BasicStack.cpp
#include<iostream> using namespace std; class Stack { public: int *arr; int top; int size; Stack(int size) { this -> size = size; arr = new int[size]; top = -1; } void push(int element) { if(size - top >= 0) { top++; arr[top] = ele...
ALGO
0.997002
4.552865
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2024-11-18T13:54:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1c1220b5bd...
3afe0f4e-66b5-483b-b1b9-27252d854798
dillongoostudios/goo-engine
source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cc
/* SPDX-FileCopyrightText: 2011 Blender Authors * * SPDX-License-Identifier: GPL-2.0-or-later */ #include "COM_ConvolutionEdgeFilterOperation.h" namespace blender::compositor { void ConvolutionEdgeFilterOperation::execute_pixel(float output[4], int x, int y, void * /*data*/) { float in1[4], in2[4], res1[4] = {0....
ALGO
0.98206
6.915745
{ "github_metadata": { "branch": "goo-engine-main", "commit_count": 132039, "repo_created_at": "2021-05-08T09:53:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1109, "forks": 148, "issues": 44, "pull_requests": 6 }, "file_meta": { "conte...
30298b43-e6af-4001-a4b8-eb2aa37c15de
donkeywx/dataStructure
kmp.cpp
#include <iostream> #include <vector> #include <string> using namespace std; vector<int> getNext(string str) { int length = str.length(); vector<int> next(length + 1); next[0] = -1; int i = 0; int j = -1; while (i < length) { if (-1 == j || str[i] == str[j]) { ...
ALGO
0.999535
4.358533
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2018-11-06T07:21:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e578d9124...
f5869b4b-c1aa-43f2-8ab5-f192bcc9d309
SRimmele/DataStructures
Project2/PriorityQueue.cpp
#include <iostream> #include <vector> #include <time.h> #include <algorithm> #include <iomanip> #include <queue> #include "Complexity_Timer.hpp" #include "PriorityQueue.hpp" const int operations = 4; const char* priorityQueueHeadings[operations] = { "| Insert ", "| Delete ", "| Max Se...
ALGO
0.960635
5.18745
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2021-02-12T02:49:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "32329464947...
8ae0199f-9079-407b-8cf2-36e9d3dbc1a3
stefan-kurtz/gttl
tools/swalign/sw_all_against_all.cpp
/* Copyright (c) 2022 <NAME> <<EMAIL>> Copyright (c) 2022 Center for Bioinformatics, University of Hamburg Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all cop...
ALGO
0.978207
6.024385
{ "github_metadata": { "branch": "main", "commit_count": 919, "repo_created_at": "2021-05-04T10:50:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90b72a0c3b...
84de7fc7-a17c-4e02-9940-0364dffe2446
metaphysis/Code
UVa Online Judge/volume125/12543 Longest Word/program.cpp
// Longest Word // UVa ID: 12543 // Verdict: Accepted // Submission Date: 2018-03-22 // UVa Run Time: 0.000s // // 版权所有(C)2018,邱秋。metaphysis # yeah dot net #include <bits/stdc++.h> using namespace std; int main(int argc, char *argv[]) { cin.tie(0), cout.tie(0), ios::sync_with_stdio(false); string line, all;...
ALGO
0.999653
3.586027
{ "github_metadata": { "branch": "master", "commit_count": 1710, "repo_created_at": "2016-03-07T13:28:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 229, "forks": 50, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d1e...
e04588a3-0e43-43d1-8d5b-701fff27a4a7
crishoj/OpenPNL
c_pgmtk/include/pnlMNet.hpp
///////////////////////////////////////////////////////////////////////////// // // // INTEL CORPORATION PROPRIETARY INFORMATION // // This software is supplied under the terms of a license agreement or // // nond...
TOOL
0.904109
6.218591
{ "github_metadata": { "branch": "master", "commit_count": 1090, "repo_created_at": "2011-01-10T16:48:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 11, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "292b5...
3442757b-60f6-43c2-b355-777758097b38
Gu-nuu/Algorithm
Baekjoon/Implementation/BOJ 2563.cpp
#include <iostream> #include <string.h> using namespace std; int main() { ios::ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int paper[100][100]; memset(paper, 0, sizeof(paper)); // 가로, 세로의 길이가 100인 도화지를 2차원 배열로 구현 후 모든 값을 0으로 초기화 한다. int N; int area = 0; // 영역의 넓이를 저장할 변수 ...
ALGO
0.996639
4.020119
{ "github_metadata": { "branch": "main", "commit_count": 319, "repo_created_at": "2021-01-05T12:41:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "64fb47745d...
026355e8-32c7-4f89-99dd-46c8b2c378a0
MahendraSaiKuramdasu/leetcode_practice
1129-longest-string-chain/longest-string-chain.cpp
bool customSort(string& a, string& b){ return (a.length() < b.length()); } class Solution { public: // int dp[1002][1001]; // int TD(int p, int i, int n, vector<string>& words){ // if(i == n) return 0; // if(dp[p+1][i] != -1){ // return dp[p+1][i]; // } ...
ALGO
0.999991
5.330828
{ "github_metadata": { "branch": "main", "commit_count": 208, "repo_created_at": "2025-02-20T18:12:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4af0fed4e3...
ea247d03-817a-46e8-a693-9fa3c21395d9
Asik8/My-Codeforces
Old Codes/C_Cut_em_all.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define pbs insert #define pi pair<ll,ll> #define py cout<<"YES\n"; #define pys cout<<"Yes\n"; #define pn cout<<"NO\n"; #define pns cout<<"No\n"; #define co(x1) cout<<x1<<"\n"; #define ct(x1) cout<<x1<<" "; #define elc cout<<"\n"; #...
ALGO
0.999217
4.186247
{ "github_metadata": { "branch": "main", "commit_count": 983, "repo_created_at": "2024-04-04T06:52:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7852c4c999...
4b718165-973d-4620-8dda-eec92c2160f8
wolflion/GitHubCode
C&CPP/CPP/Reference/reference.cpp
#include <iostream> using namespace std; void testReference() { int n = 100; int &rn = n; n++; cout << "n=" << n << endl; // 101 cout << "rn=" << rn << endl; // 101 rn++; cout << "n=" << n << endl; // 102 cout << "rn=" << rn << endl; // 102 cout << endl; } void testPointerReference() { int n =10,*pn = ...
ALGO
0.906489
3.891668
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2016-04-13T04:46:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb274e68d...
b944b133-86ac-4e66-88c5-21ee45458dd6
geodaai/geodalib
cpp/src/mapping/equal-interval-breaks.cpp
// SPDX-License-Identifier: MIT // Copyright contributors to the geodalib project #include <algorithm> #include <limits> #include <vector> #include "mapping/mapping.h" /** * @brief Calculates break points using the equal interval classification method * * This function divides the range of values into k equal-siz...
ALGO
0.948173
4.935124
{ "github_metadata": { "branch": "main", "commit_count": 116, "repo_created_at": "2024-01-10T21:34:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "22ac988008f...
5a552517-3da8-4527-afc9-b5853c2f8363
anshulg954/ModernDataStructures
52mergesort.cpp
// #include <iostream> // using namespace std; // int merge(int arr[], int s, int e) // { // int mid = s + (e - s) / 2; // int len1 = mid - s + 1; // int len2 = e - mid; // int *arr1 = new int[len1]; // int *arr2 = new int[len2]; // // copy values // int mainArrayIndex = s; // for (int...
ALGO
0.999987
5.346939
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-10-08T16:18:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4bb08728bc5...
027ead96-8a1c-494a-8e9f-6ef0fd153f78
jeevankhetwani/Coding-Practice
104NoSize.cpp
//// //// Created by jeevan on 1/4/17. //// //#include<iostream> //#include<ctime> // //using namespace std; //class listy { // int n, *ptr; // //public: // listy(int n) { // this->n = n; // ptr = new int[n]; // } // // void init(int *a, int n) { // for (int i = 0; i < n; i++) // ...
ALGO
0.999579
4.06482
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-07-28T13:26:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e8f7a3f8bb...
702241ab-b431-4b4c-9ce5-5bfb990639f8
ajinathkumbhar/c_cpp_shell_script_python
inter/stack/stack.cpp
#include <iostream> #include <iomanip> #include <limits.h> #include <time.h> #include <stdlib.h> #define DEF_SIZE 100 #define LOG(msg) cout << __func__ \ << ": " << __LINE__ << ": " \ << msg << '\n' #define TRUE 1 #define FALSE 0 using namespace std; class S...
ALGO
0.994096
4.409813
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2018-04-28T11:29:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9fd111b32...
c7bc8741-254a-45a5-b3ad-a0b8ae7d8033
Sudhanva-Nadiger/DSA
2466-count-ways-to-build-good-strings/2466-count-ways-to-build-good-strings.cpp
class Solution { public: int mod = 1e9+7; int dp[(int)1e5+1]; int f(int l,int h, int z, int o, int len) { if(len > h) { return 0; } if(dp[len] != -1) { return dp[len]; } long long int uppendO = f(l, h, z, o, len + o); ...
ALGO
0.99965
5.178223
{ "github_metadata": { "branch": "main", "commit_count": 1923, "repo_created_at": "2023-05-12T05:37:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6056c68bb...
ee427d02-043d-4b57-879d-e27daf26da6a
Silverlan/pragma
core/shared/include/pragma/lua/classes/lvector.h
// SPDX-FileCopyrightText: (c) 2019 Silverlan <<EMAIL>> // SPDX-License-Identifier: MIT #ifndef __LVECTOR_H__ #define __LVECTOR_H__ #include "pragma/networkdefinitions.h" #include <pragma/lua/luaapi.h> #include <mathutil/glmutil.h> #include <pragma/math/angle/wvangle.h> #include <pragma/math/angle/wvquaternion.h> na...
TOOL
0.972893
5.748451
{ "github_metadata": { "branch": "main", "commit_count": 4072, "repo_created_at": "2019-02-13T11:30:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 197, "forks": 20, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "3bcada...
dddc2943-f8cc-4909-937a-485d44ab1297
Senpat/Competitive-Programming
TJ/ICT2/Db.cpp
#include <bits/stdc++.h> using namespace std; #define MAXN 100005 int bits1[MAXN]; int bits2[MAXN]; int n; void update1(int i, int x){ for(; i <= n; i += i&-i){ bits1[i] += x; } } int psum1(int i){ int sum = 0; for(; i > 0; i -= i&-i){ sum += bits1[i]; } return sum; } void update2(int...
ALGO
0.999853
3.501383
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2018-08-28T22:26:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2fb12438b...
e342b63d-758f-42a8-83f5-fe04955c702a
paras02kad/TLE
Classes/Week - 1, Recursion/solution_6.cpp
#include<bits/stdc++.h> using namespace std; #define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define MOD 1000000007 #define MOD1 998244353 #define INF 1e18 #define nline "\n" #define pb push_back #define ppb pop_back #define mp make_pair #define ff first #define ss second #define...
ALGO
0.999998
3.819834
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-08-18T11:48:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db283cb7191b...
e4e02fc3-5928-4152-b6de-bacb36231258
mrizaln/aoc-2024-cpp
source/aoc/day/12.hpp
#pragma once #include "aliases.hpp" #include "common.hpp" #include "util.hpp" #include <deque> #include <unordered_set> #include <vector> namespace aoc::day { namespace al = aoc::aliases; namespace sv = aoc::common::sv; namespace day12 { using Coord = util::Coordinate<al::usize>; st...
ALGO
0.999541
6.278017
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2024-12-13T20:29:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90f27cd42eb...
9820c2df-8d86-40be-9b51-4f966818919d
SuyashNShinde/suyashnshinde
ADSL_1.cpp
#include<iostream> using namespace std; #define MAX 20 struct TreeNode { TreeNode *Leftchild; char data; TreeNode *Rightchild; }; int Isoperand(char ch) { if((ch>='A' && ch <='Z')||(ch>='a' && ch <='z')||(ch>='0' && ch <='9')) return 1; else return 0; } int Isoperator(char ch) { ...
ALGO
0.999894
3.756477
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2023-04-29T07:46:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a10430b0bad...
723d8965-f0ed-4c7b-b141-e1db21dc7fbc
deepti-iiitr/CodeForces-Practice
B_Make_It_Increasing.cpp
#include <bits/stdc++.h> #define endl ("\n") using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> p32; typedef pair<ll,ll> p64; typedef pair<double,double> pdd; typedef vector<ll> v64; typedef vector<int> v32; typedef vector<vector<int> > vv32; typedef vector<vector<ll> > vv64; ty...
ALGO
0.999345
4.007627
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2021-11-12T07:05:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d63fee77...
ff7d308f-57b7-4054-b967-1cd688844196
XR-stb/BigInteger
BigInteger.hpp
#pragma once #include <iostream> #include <string> #include <algorithm> #include <cassert> #include <random> using namespace std; class BigInteger { private: string value; bool isNegative; public: BigInteger() : value("0"), isNegative(false) {} BigInteger(bool isNeg, string &&val) : value(val), isN...
ALGO
0.990073
4.497682
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-06-05T07:58:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a63d134add...
1cfb75ba-cbb7-4c3e-a519-91c5d793da8a
Braulee7/A-Star-Algorithm
src/Astar.cpp
#include <headers/Astar.h> #include <math.h> #include <iostream> #include <headers/Application.h> Astar::Astar(Node* start, Node* end) { start->setState(1); OpenSet.Add(start, 1); while (OpenSet.size != 0) { Node* current = OpenSet.Poll(); if (current == end) { e...
ALGO
0.994334
3.549618
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-07-28T19:54:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "906f2633e8a...
c5e785fe-9807-45d6-8203-b56a0700d7a6
DavidMSCode/APC
include/Ephemeris.hpp
/* * AUTHORS: <NAME> (<EMAIL>), <NAME> (<EMAIL>) * DATE WRITTEN: Dec 2020 * LAST MODIFIED: Feb 2021 * AFFILIATION: University of Illinois at Urbana-Champaign (UIUC) * DESCRIPTION: Ephemeris computation using Chebyshev polynomials */ #ifndef _EPHEM_H_ #define _EPHEM_H_ #include <vector> ...
ALGO
0.981481
5.457277
{ "github_metadata": { "branch": "main", "commit_count": 165, "repo_created_at": "2022-03-07T22:04:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "a52e615a8b...
1fa30fbe-4ec3-434f-a7b0-a30f3ed493e2
glc12125/Algo
lintcode/Regular Expression Matching.cpp
class Solution { private: struct PairHash{ size_t operator()(const std::pair<int, int>& p) const { auto hFirst = std::hash<int>()(p.first); auto hSecond = std::hash<int>()(p.second); return hFirst ^ hSecond; } }; bool match(const std::string& s, int sInde...
ALGO
0.999892
5.71146
{ "github_metadata": { "branch": "master", "commit_count": 736, "repo_created_at": "2016-11-13T14:28:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "782e4c60...
1e235f8e-3fd4-4db0-aaf9-f4c70823043a
GRTLCollaboration/Chombo
lib/src/AMRTools/QuadCFInterp.H
#ifdef CH_LANG_CC /* * _______ __ * / ___/ / ___ __ _ / / ___ * / /__/ _ \/ _ \/ V \/ _ \/ _ \ * \___/_//_/\___/_/_/_/_.__/\___/ * Please refer to Copyright.txt, in Chombo's root directory. */ #endif #ifndef _QUADCFINTERP_H_ #define _QUADCFINTERP_H_ #include <iostream> #inclu...
ALGO
0.928347
5.933539
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2018-01-30T14:07:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 16, "forks": 12, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "af7f652994...
16719d42-08b7-4e24-875a-23bde163e4a8
Ahnaf-41M/Codeforces_AtCoder
codeforces/1324/D.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> #define pb push_back #define int long long #define endl "\n" #define MX 100005 #define all(v) v.begin(),v.end() #define gcd(a,b) __gcd(a,b) #define lcm(a,b) ...
ALGO
0.999944
3.60667
{ "github_metadata": { "branch": "master", "commit_count": 952, "repo_created_at": "2021-06-30T02:51:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad5e1551...
c637f4f8-8f02-474e-9532-bb8c123eed3f
dqian96/coding-practice
twitter_longest_phrases_in_a_tweet.cpp
#include <map> #include <set> #include <list> #include <cmath> #include <ctime> #include <deque> #include <queue> #include <stack> #include <string> #include <bitset> #include <cstdio> #include <limits> #include <vector> #include <climits> #include <cstring> #include <cstdlib> #include <fstream> #include <numeric> #inc...
ALGO
0.999804
4.175916
{ "github_metadata": { "branch": "master", "commit_count": 123, "repo_created_at": "2016-03-24T21:19:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "571eea29...
daa79905-41b2-4c79-ac41-af8a025cd7c3
Honeta/Parallel-BFS
bag.hh
#ifndef _BAG_HH #define _BAG_HH #include <vector> using namespace std; class pennant { public: pennant(): _root(nullptr), _size(0){} pennant(int val): _root(new node{val, nullptr, nullptr}), _size(1){} operator bool() const { return _size > 0; } unsigned size() const { return _size; } pennant uni...
ALGO
0.996753
5.070961
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-04-16T14:05:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "54cf17961302...
0939b290-4985-4f45-b618-e2b4cb501c41
bobweein/C-AND-CPLUS-PLUS-LEARNING
WEEK02/ch02/二分法.cpp
#include <iostream> #include<cmath> #include<iomanip> using namespace std; int half_num(double a,double b,double e)//根据精度函数求解分半次数 { int k=0; k = (int)(log(b - a) - log(e)) / log(2)+1; return k; } double f( double x)//需要求零点的函数 { if (x < 1 && x>2) { cout << "不在定义域内!\n"; return 0; } return (x - pow(2, -x)); }...
ALGO
0.999933
3.968228
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2021-11-21T15:16:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d4a02f7c47...
580542ba-4eb4-422d-b11d-01b0dd9665c6
kkh0920/study-algorithm
백준/Silver/1260. DFS와 BFS/DFS와 BFS.cc
#include <iostream> #include <algorithm> #include <vector> #include <stack> #include <queue> using namespace std; vector<int> graph[1001]; bool visited[1001] = { false }; int N, M, V, s, e; void dfs(){ stack<int> st; cout << V << ' '; st.push(V); visited[V] = true; while(!st.empty()){ int ...
ALGO
0.999988
4.751259
{ "github_metadata": { "branch": "main", "commit_count": 505, "repo_created_at": "2023-03-31T01:04:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3965af4a37...
0de82336-106f-4591-9a20-2713d7c5d1a6
AdityaPatil-AP/LeetCode-Questions-TopicWise
Leet_Code_Solutions/Priority_Queue/1921.eliminate-maximum-number-of-monsters.cpp
class Solution { public: int eliminateMaximum(vector<int>& dist, vector<int>& speed) { vector<double> arrival; int n = dist.size(); for(int i = 0;i < n;i++){ arrival.push_back((float) dist[i]/speed[i]); } sort(arrival.begin(), arrival.end()); int ans = ...
ALGO
0.999928
5.700508
{ "github_metadata": { "branch": "main", "commit_count": 286, "repo_created_at": "2022-07-24T12:59:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a9bbdc7beb...
c7e6d60a-d69d-41cb-be37-d4501a0ee67f
NCKempke/PIPS-IPMpp
PIPS-IPM/Core/Preprocessing/StochPresolver.h
/* * StochPresolver.h * * Created on: 26.01.2018 * Author: bzfrehfe */ #ifndef PIPS_IPM_CORE_QPPREPROCESS_STOCHPRESOLVER_H_ #define PIPS_IPM_CORE_QPPREPROCESS_STOCHPRESOLVER_H_ #include "Presolver.hpp" #include "PresolveData.h" #include <vector> #include <memory> class DistributedTree; class StochPresolv...
ALGO
0.99355
6.263684
{ "github_metadata": { "branch": "pipsipm", "commit_count": 3701, "repo_created_at": "2021-07-30T08:48:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "afbaa...
7b9824b7-4b32-46a5-b68b-c87a1333965d
PegasusEngine/Pegasus
Source/Pegasus/Math/Matrix.cpp
/****************************************************************************************/ /* */ /* Pegasus */ /* ...
TOOL
0.993366
5.450072
{ "github_metadata": { "branch": "master", "commit_count": 462, "repo_created_at": "2017-02-27T04:00:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 59, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f39da799...
b188f3ce-efef-4ff7-a87e-f682e9aff35b
jypjypjypjyp/lvio_fusion
src/lvio_fusion/include/lvio_fusion/lidar/projection.h
#include "lvio_fusion/common.h" namespace lvio_fusion { class SegmentedInfo { public: SegmentedInfo(double num_scans, double horizon_scan) { start_ring_index.assign(num_scans, 0); end_ring_index.assign(num_scans, 0); ground_flag.assign(num_scans * horizon_scan, false); col_ind....
ALGO
0.933113
5.807084
{ "github_metadata": { "branch": "main", "commit_count": 331, "repo_created_at": "2020-10-05T02:11:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 267, "forks": 57, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "59016dd...
a19e9852-21d3-407f-9ab7-1dc669eddfc7
SoumyadeepB2001/Programs
C++ Programs/Matrix/5.cpp
#include <iostream> using namespace std; class cl { private: int a[20][20], r,c; public: cl() { r=3,c=3; } cl(int x, int y) { r=y, c=x; } void input() { cout<<"Enter the elements of the array"<<endl; for(int i=0; i<r; i++) { ...
ALGO
0.99867
3.807997
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2021-08-18T17:30:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "24b956732a1...
b4101e57-04db-44de-8f06-ffc9954c508e
mar-ina-17/UP
task9.1.cpp
#include "iostream" const int N=6; void inputArray(int array[N][N]){ for(int i = 0; i < N; i++) { for(int j = 0; j < N; j++) { std::cin>>array[i][j]; } } } int printArray(int array[N][N]) { int sum = 0; for(int i = 0; i < N; i++) { su...
ALGO
0.999617
4.158916
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-02-26T15:13:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "073a469d75...
c86bd937-255e-4a15-a830-e46b9b1d0c54
ngthanhvinh/competitive-programming
spoj/VMYT/gen.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ff(i, a, b) for(int i = a; i <= b; i++) #define fo(i, a, b) for(int i = a; i < b; i++) #define fod(i, a, b) for(int i = a; i >= b; i--) #define pb push_back #define mp make_pair #define fi first #define se second const int INF = 1e9, N = 1000...
TOOL
0.901262
3.103121
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-03-17T15:19:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5df565135...
2410d19d-b1ef-4d47-b5be-a9a72613fe52
hossamasaad/Problem-Solving
UVA/11953 - Battleships.cpp
/* * Author : <NAME> */ #include <bits/stdc++.h> #include <iostream> #include <algorithm> #include <string> #include <math.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #define ll long long #define DEBUG(x) cout << '>' << #x << ':' << x << endl; #define REP(i,n) for(int i=1;i<(n);i++) #define FOR(i,a...
ALGO
0.999607
4.402212
{ "github_metadata": { "branch": "master", "commit_count": 264, "repo_created_at": "2019-02-21T18:12:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1581dd6...
618ae4fe-02dd-4969-b4b9-3ea13d2397b2
bawa-hub/programming
_11_backtracking/_1_basics/_2_binarySearch.cpp
#include <iostream> using namespace std; int binarySearch(int array[], int x, int low, int high) { // Repeat until the pointers low and high meet each other while (low <= high) { int mid = low + (high - low) / 2; if (array[mid] == x) return mid; if (array[mid] < x) ...
ALGO
0.999867
5.550566
{ "github_metadata": { "branch": "master", "commit_count": 622, "repo_created_at": "2022-03-08T15:14:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa2451b2...
0aba48dd-1689-4c3c-91c0-7360c12bd6a8
MihMihai13/ArhivaProiecteFacultate
Licenta an 1 semestrul I/C++/lab 4/Problema_1.cpp
#include<iostream> using namespace std; int main () { int l; cout << "Dati lungimea sirului: "; cin >> l; //citesc lungimea sirului char s[l+1]; //citesc componenta sirului cout << "Dati sirul: "; cin.ignore(); cin.getline (s, l+1); //secventa transforma litere mari/mici in litere mici/mari for (int i = 0; i...
ALGO
0.994668
3.300049
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T12:55:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "147b8985bae1...
95c6c380-14ad-4fc7-9c61-3b555e1e1fe7
contramundum53/ecos-cpp
include/ecos_cpp.hpp
#pragma once #include <Eigen/Core> #include <Eigen/SparseCore> #include <cassert> #include <ecos.h> #include <iostream> #include <numeric> #include <vector> namespace ecos { struct ConeDescription { idxint dim_Rplus; std::vector<idxint> dim_quadratic_cones; idxint dim_exponential_cones; idxint dimensi...
ALGO
0.990789
6.536805
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-02-29T07:46:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b119a56b7e...
b9f83fa6-4643-4a69-8f0b-850289b9135b
SophiaSoka/1300_hw_2
HW2/snowfall.cpp
// CSCI 1300 Fall 2022 // Author: <NAME> // Recitation: 306 – <NAME> // Homework 2 - Problem # 4 #include <iostream> using namespace std; int main (){ int days; //asks user for number of days cout << "How many days in the future would you like a prediction for?" << endl; cin >> days; int b = 25; ...
ALGO
0.965212
3.835295
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-09-08T06:37:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a88d62474431...
01f0b384-5370-4a4c-9647-c5c98c3ac41a
funshowme07/-
j125. 4. 蓋步道.cpp
#include <bits/stdc++.h> #define f first #define s second using namespace std; //dir int dir[4][2]={{1,0},{0,1},{-1,0},{0,-1}}; // int main() { int n; cin>>n; vector<vector<int>> vc(n,vector<int>(n)); int min_v = 9999999; int max_v = -111111111; for(int i=0;i<n;i++){ for(int j=0;j<n;j++)...
ALGO
0.999979
3.723658
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2025-02-14T13:25:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f3ec4fee8d0...
97545777-1b84-4cdd-8abc-73a8dc01210e
gemastik/pemrograman-2016
final/pohon/solution_ashar.cpp
#include <bits/stdc++.h> using namespace std; const int MAX = 50005; int T; int N; list<int> G[MAX]; int dp[MAX][2][3]; int DP(int u, int par, int a, int b) { if (dp[u][a][b] != -1) { return dp[u][a][b]; } int& res = dp[u][a][b]; int all_opposites = 0; for (int v : G[u]) if (v != par) { all_opposites += DP...
ALGO
0.999806
4.514522
{ "github_metadata": { "branch": "master", "commit_count": 122, "repo_created_at": "2018-08-20T15:15:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1e27e97c5...
27b019c1-fd1d-4bd6-82c3-6c742cbcc999
jaisat/CP_Codes
Stacks/friend_.cpp
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; #define ff first #define ss second #define int long long #define pb push_back #define mp make_pair #define pii pair<int,int> #de...
ALGO
0.999723
3.029861
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-08-31T07:40:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "323d746d811c...
d683603f-8427-49c2-a542-28aac497359f
krishukr/cpp-code
src/LG/lg-B3611.cpp
#include <bitset> #include <cstdio> #include <iostream> constexpr int MAX_N = 105; std::bitset<MAX_N> f[MAX_N]; template <typename T> T read(); template <typename T> void read(T& t); template <typename T, typename... Args> void read(T& t, Args&... rest); int main() { std::ios::sync_with_stdio(false); int...
ALGO
0.999985
4.867632
{ "github_metadata": { "branch": "master", "commit_count": 193, "repo_created_at": "2021-01-19T08:15:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb5fe239...
6c7a5a0b-e0a1-4ca2-bd7c-d104010a648c
dsthakur10/Coding
DSA Topic wise/8. Graphs/MakingALargeIsland.cpp
/* You are given an n x n binary matrix grid. You are allowed to change at most one 0 to be 1. Return the size of the largest island in grid after applying this operation. An island is a 4-directionally connected group of 1s. Example 1: Input: grid = [[1,0],[0,1]] Output: 3 Explanation: Change one 0 to 1 and connec...
ALGO
0.999952
6.419459
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2022-06-29T13:54:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "299567d44...
4b9d8f56-590e-4666-a618-b6c243ea817a
DhruvPasricha/LeetCode
402-remove-k-digits/402-remove-k-digits.cpp
class Solution { vector<int> getNextSmallerRight(string &A) { int n = A.size(); vector<int> Ans(n, n); stack<int> st; for(int i = n - 1; i >= 0;i--) { while(st.size() and A[st.top()] >= A[i]) st.pop(); ...
ALGO
0.999999
5.910337
{ "github_metadata": { "branch": "main", "commit_count": 1085, "repo_created_at": "2021-12-10T18:48:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cad9a56a7...
68cb96cc-3860-46f1-8b5d-53624252f5fb
mirror/vbox
src/VBox/Runtime/common/string/strncmp.cpp
/* $Id$ */ /** @file * IPRT - CRT Strings, strncmp(). */ /* * Copyright (C) 2006-2024 Oracle and/or its affiliates. * * This file is part of VirtualBox base platform packages, as * available from https://www.virtualbox.org. * * This program is free software; you can redistribute it and/or * modify it under th...
TOOL
0.994862
5.862386
{ "github_metadata": { "branch": "master", "commit_count": 106059, "repo_created_at": "2013-12-20T23:33:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 240, "forks": 81, "issues": 8, "pull_requests": 1 }, "file_meta": { "content_id": "538...
becca32b-dc24-42ff-8372-192b65427835
ScottMcMichael/lronacPipeline
lronacSolverModelDouble.h
// __BEGIN_LICENSE__ // Copyright (c) 2009-2013, United States Government as represented by the // Administrator of the National Aeronautics and Space Administration. All // rights reserved. // // The NGT platform is licensed under the Apache License, Version 2.0 (the // "License"); you may not use this file excep...
ALGO
0.97422
6.97634
{ "github_metadata": { "branch": "master", "commit_count": 197, "repo_created_at": "2013-08-13T00:29:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a4375e5...
0968a862-38cd-4e50-8f4a-163bd6f3c0f2
chenshihelio/solarwind_alfvenwave_1D_FD
timeadvance.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "macros.h" #include "support.h" #include <omp.h> #define CC10 8.0/15.0 #define CC20 5.0/12.0 #define CC30 0.75 #define DD20 -17./60. #define DD30 -5./12. real cc1[3], dd1[3]; void rkInit(real *cc, real *dd, real dt, real *arrRK,...
ALGO
0.999997
4.381261
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-01-06T08:35:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ae797d4aba6...
df0216c4-59d8-4a07-b41b-649489da6c7d
alexliniger/MPCC
C++/MPC/mpc.h
// Copyright 2019 <NAME> // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, so...
TOOL
0.991034
6.061782
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2018-10-01T08:46:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1547, "forks": 390, "issues": 3, "pull_requests": 4 }, "file_meta": { "content_id": "3cc6...
6c68bff7-91c2-4940-83f2-4e5c76d9c2aa
antiphon/Kdirectional
src/pairwise_angle_dist_subset.cpp
#include <Rcpp.h> #include <vector> #include "helpers.h" using namespace Rcpp; // [[Rcpp::export]] NumericMatrix c_pairwise_dist_angle_subset(NumericMatrix x, IntegerVector from, IntegerVector to) { int i, j, ind, l, t, f; double dx, dy, dz; int dim = x.ncol(); double d, ang; int nfrom = from.length(); in...
ALGO
0.999047
6.181918
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2015-06-10T07:59:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76b343df0...
e933acc7-394d-48a3-8ea5-dba0ee689ea3
killzdesu/cpp-archive
GSS1.cpp
#define fi first #define se second #define REP(_x, _y) for(_x=0;_x<_y;_x++) #define REPI(_x, _y) for(_x=1;_x<=_y;_x++) #define pb push_back #define mp make_pair #define pii pair<int, int> #define ll long long #define EL printf("\n"); #include<bits/stdc++.h> #define IT iterator #define all(x) x.begin(),x.end() #define f...
ALGO
0.99995
3.839047
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-04-20T06:17:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "391065a2c7...
a8323d85-b370-4224-9fff-d4dd239dd5b1
Rafaherrero/AED
Practica 2/sparse_vector_t.cpp
//Practica 2 AED //Vector disperso //<NAME> //sparse_vector_t.cpp #include "sparse_vector_t.hpp" #include <cmath> #include <iostream> #include <iomanip> using namespace std; sparse_vector_t::sparse_vector_t (const vector_t& v, double eps): inx_ (NULL), val_ (NULL), nz_ (0), n_ (v.get_n()) { for (int i=0; i <...
ALGO
0.954434
4.022913
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-02-24T12:19:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bf3c748535...
0d282b38-508b-452f-a855-27a90b9bc636
goodstudyqaq/leetcode
problems-cpp/special-binary-string/solution.h
/* Code generated by https://github.com/goodstudyqaq/leetcode-local-tester */ #if __has_include("../utils/cpp/help.hpp") #include "../utils/cpp/help.hpp" #elif __has_include("../../utils/cpp/help.hpp") #include "../../utils/cpp/help.hpp" #else #define debug(...) 42 #endif class Solution { public: string makeLar...
ALGO
0.999982
4.965717
{ "github_metadata": { "branch": "main", "commit_count": 303, "repo_created_at": "2023-07-19T15:39:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b4679a788...