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
4cd9b7c0-796d-4426-9075-1d01427de28f
blender/blender
intern/cycles/scene/hair.cpp
/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation * * SPDX-License-Identifier: Apache-2.0 */ #include <algorithm> #include "bvh/bvh.h" #include "scene/curves.h" #include "scene/hair.h" #include "scene/object.h" #include "scene/scene.h" #include "integrator/shader_eval.h" #include "util/progress.h" #include...
ALGO
0.902904
6.504279
{ "github_metadata": { "branch": "main", "commit_count": 152123, "repo_created_at": "2019-10-09T12:47:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 15670, "forks": 2395, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b...
e8442d1c-034e-4e30-9f02-e34baeceec9f
memcpy0/Code-World
Mix_Works/Code-Library/AlgoTPE/树/【模板】树上公共祖先(各种解法).cpp
#include <bits/stdc++.h> using namespace std; /* 约束RMQ: O(N) O(1)查询 树链剖分求LCA ST算法LCA ST算法时间复杂度是O(n+q+nlogn) ST(Sparse Table)算法是一个非常有名的在线处理RMQ问题的算法,它可以在O(nlogn)时间内进行预处理,然后在O(1)时间内回答每个查询。 Tarjan离线法 Tarjan(离线)算法时间复杂度是O(n+q)。 */ 1483. 树节点的第 K 个祖先 给你一棵树,树上有 n 个节点,按从 0 到 n-1 编号。树以父节点数组的形式给出, 其中 parent[i] 是节点 i 的父节点。树的根...
ALGO
0.999849
4.13573
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2024-06-29T15:08:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50ab55dada0...
b944da31-1d81-48dc-b01a-b775a7035c33
DuduAlmeida/EstruturaDeDados1
Aula 7/Lista_Ligada_Linear_v2.cpp
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <conio.h> struct no { int info; struct no *prox; }; no *novo_no(int i); void inicializar_lista(no *l); no *insere_no(no *p,int i,char param); void remove_no(no **l, no *p,char param); no *busca_antecessor(no *l,no *p); int main() { no *...
ALGO
0.99917
3.40249
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2020-09-15T01:36:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "36502de3f...
54162fa8-8114-40de-a757-38f902abb111
chiranjib22/DSA_Abdul_Bari_Udemy_Course
Recursion/taylorSeries.cpp
#include <bits/stdc++.h> using namespace std; // recursive // double e(int x, int n) // { // static double p = 1, f = 1; // double r; // if (n == 0) // return 1; // else // { // r = e(x, n - 1); // p *= x; // f *= n; // return r + p / f; // } // } // iterative double e(int x, int...
ALGO
0.999708
4.556212
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-12T21:20:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae0d95cd82e0...
b643a887-8dbc-4f3c-a61d-0f5c290d4571
Ujala-2110/DSA_Cpp
DP/2D_prefix_sum_codechef.cpp
// link -> https://www.codechef.com/problems/TRPTSTIC #include <bits/stdc++.h> using namespace std; #define ll long long int bool check(int mid,vector<vector<ll>>&dp, vector<vector<int>>&arr,int n, int m, int k) { for(int i=0;i<n;i++) { for(int j=0;j<m;j++) { if(arr[i][j] == 0)continue; int ...
ALGO
0.999915
4.547764
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-07-14T13:16:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "61bff12a4f27...
912b0cbb-20d8-4c79-aaca-065eb7f53f3d
yashkhandelwal123/LeetCode-Solution
49-group-anagrams/49-group-anagrams.cpp
class Solution { public: #include<unordered_map> vector<vector<string>> groupAnagrams(vector<string>& strs) { // map<map<char,int> , vector<string>> m; // for(int i = 0; i<strs.size(); i++){ // map<char,int> m1; // for(int j = 0; j<strs[i].size(); j++){ // ...
ALGO
0.999993
6.21211
{ "github_metadata": { "branch": "main", "commit_count": 410, "repo_created_at": "2022-10-09T10:34:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f96294a2e6...
2bf5cd79-2202-468d-ad5c-5777cb6ad5c7
ChromiumWebApps/chromium
net/server/http_server.cc
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "net/server/http_server.h" #include "base/compiler_specific.h" #include "base/logging.h" #include "base/stl_util.h" #include "base/strings/s...
WEB
0.917521
7.573155
{ "github_metadata": { "branch": "master", "commit_count": 260366, "repo_created_at": "2014-02-21T14:19:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 231, "forks": 307, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "89...
d4f035c5-d551-4fa6-bb16-ba44935a64c2
52North/IlwisCore
core/geos/src/algorithm/BoundaryNodeRule.cpp
/********************************************************************** * * GEOS - Geometry Engine Open Source * http://geos.osgeo.org * * Copyright (C) 2009 <NAME> <<EMAIL>> * * This is free software; you can redistribute and/or modify it under * the terms of the GNU Lesser General Public Licence as publi...
ALGO
0.992242
6.525398
{ "github_metadata": { "branch": "master", "commit_count": 6882, "repo_created_at": "2013-05-15T13:19:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 36, "forks": 13, "issues": 26, "pull_requests": 0 }, "file_meta": { "content_id": "f5ffd...
d7b28d95-153e-42f5-9085-edbaa03d1887
ParticularJ/interview
leetcode79.cpp
/* 搜索问题,dfs 用数组flag表示是否遍历过 */ class Solution { public: int row, col; bool res; vector<vector<char> > b; int flag[1000][1000]; void dfs(int x, int y, int index, string& word) { if (index == word.size()) { res = 1; return; } if (res)return; int dx[] = { 0, 1, 0 , -1 }; int dy[] = { 1, 0, -1, 0 }; ...
ALGO
0.999922
5.68451
{ "github_metadata": { "branch": "master", "commit_count": 317, "repo_created_at": "2018-03-09T13:59:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "920b5bf1...
19416546-35b3-4645-9c63-9222941c67e4
menpo/menpo
menpo/transform/piecewiseaffine/fastpwa/pwa.cpp
#include "pwa.h" #include <stdio.h> #include <stdlib.h> #include "uthash.h" // // ----- POINT ----- // Point initPoint(double *points) { Point p = {*points, *(points + 1)}; return p; } void pointPrint(Point p) { printf("x=%.2f, y=%.2f", p.x, p.y); } Point pointAdd(Point p1, Point p2) { Point p3 = {p1.x + p2...
ALGO
0.992975
3.187329
{ "github_metadata": { "branch": "master", "commit_count": 4114, "repo_created_at": "2013-04-28T14:52:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 327, "forks": 84, "issues": 30, "pull_requests": 12 }, "file_meta": { "content_id": "5c6...
bae1e794-a36f-446b-8b61-5ff55cf1465c
mkaouer/Code-Smells-Detection-in-JavaScript
JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/362764/shogun-3.2.0/shogun-3.2.0/src/shogun/mathematics/ajd/JADiag.h
/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * Written (W) 2013 <NAME> * * Thanks to <NAME> and <NAME> ...
ALGO
0.998676
4.478305
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2016-11-16T11:47:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 4, "issues": 0, "pull_requests": 18 }, "file_meta": { "content_id": "8e002bb5...
47df4512-f28d-4bb1-98fb-083ea5e7fd82
awanzia/USTC_Reexamination
2006/第四题_求无向图邻接矩阵的连通分量/test.cpp
/* *2006年第四题:求由邻接矩阵存储的无向图的连通分量 *邻接矩阵储存在abc.in文件中 *abc.in内容如下: *ABCDEFGH *0 1 0 0 0 0 1 1 *1 0 0 0 0 0 0 1 *0 0 0 0 0 0 0 0 *0 0 0 0 1 1 0 0 *0 0 0 1 0 1 0 0 *0 0 0 1 1 0 0 0 *1 0 0 0 0 0 0 1 *1 1 0 0 0 0 1 0 * *在xyz.out文件中保存每个连通分量 */ #include<stdio.h> #include<stdlib.h> #include<string.h> #define MAXNUM...
ALGO
0.999659
3.354447
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-03-15T05:45:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8fbec0961...
0ba93a3c-633c-4152-9c07-5a76a0ebcd1a
AmarKumar-AK/College-Courses
design-and-analysis-of-algorithm/lab1.cpp
#include <bits/stdc++.h> #define NUMBERS 100; using namespace std; class sorting { private: int array[20]; public: void bubbleSort(); void insertionSort(); void selectionSort(); }; void sorting::bubbleSort() { int sum = 0; for (int k = 0; k < 20; k++) { //generating random num...
ALGO
0.990936
4.49957
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2020-10-22T18:33:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab7b781675c...
aeb35c88-cc8b-4fd1-9d06-f838ae65a163
sampadatalwar/Problem-Solving
101-symmetric-tree/101-symmetric-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999969
6.440166
{ "github_metadata": { "branch": "master", "commit_count": 207, "repo_created_at": "2020-07-01T08:34:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a6fad1bb...
9543cdd0-c8e9-4f1b-aef9-4c3c619cbac5
raincross7/code-similarity
codes/train_code/problem183/problem183_123.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define F first #define S second #define pb push_back #define mp make_pair #define mod 1000000007 #define vlli vector<ll> #define vi vector<int> #define vs vector<string> #define vplli vector< pair< ll,ll> > #define plli pair< ll,ll > #define vps vector<...
ALGO
0.999992
3.863704
{ "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": "1c9a7dbbc644...
a90b3b7e-7117-4396-82d4-b530cc026c50
nhh-7/hot100
7.二叉树/101. 对称二叉树.cpp
// Definition for a binary tree node. struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) ...
ALGO
0.999992
5.929192
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-06-15T14:34: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": "b766dec676...
468c1006-4be1-49d0-a142-4a4928ab577a
ji-junhyuk/junto_tech
ps/recur/2630.cpp
#include <iostream> using namespace std; int cnt[2]; int grid[128][128]; int check_same_color(int N, int y, int x) { int temp = grid[y][x]; for (int i = y; i < N + y; ++i) { for (int j = x; j < N + x; ++j) { if (grid[i][j] != temp) return (0); } } return (1); } void recur(int N, int y, int x) { ...
ALGO
0.99961
4.03612
{ "github_metadata": { "branch": "main", "commit_count": 159, "repo_created_at": "2022-05-28T03:44:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "99ed5362fe...
4fccda2e-4b98-47b6-9b0f-28a88bb76f45
saitoperf/atcoder
abc258/b.cpp
#include <bits/stdc++.h> using namespace std; using ll=long long; int main(){ ll n; cin >> n; vector<vector<ll>> a(n, vector<ll>(n*3, 0)); for(ll i = 0; i < n; i++){ string tmp; cin >> tmp; tmp = tmp+tmp+tmp; for(ll j = 0; j < n*3; j++){ char t = tmp[j]; a[i][j] = atoi(&t); ...
ALGO
0.999696
3.725286
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-09-05T04:02:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f46ea2ab280b...
9d5c7d89-7e0d-4214-b1fb-2ba61ad6b968
imulan/procon
aoj/vol5/0541.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define each(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); ++itr) #define all(x) (x).begin(),(x).end() #define pb push_back #define fi first #define se second typedef pair<int,int> pi; ...
ALGO
0.999979
3.154088
{ "github_metadata": { "branch": "master", "commit_count": 2571, "repo_created_at": "2015-11-25T03:18:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 27, "pull_requests": 0 }, "file_meta": { "content_id": "f64508...
9ce69e3c-86c6-461d-954f-1eb0c61b21ad
rodyherrera/LeetCode
constructBinaryTreeFormInorderAndPostorderTraversal.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.99997
6.361646
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2024-05-21T20:17: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": "49a33dff848...
f0b52a37-8eed-4189-9d75-d286d7cbd4e1
aryan04-t/DSA-Notes
02_Playing with Patterns/29_Fancy Pattern-1/02_Fancy_Pattern_1.cpp
// Fancy Pattern-1 #include<iostream> using namespace std; int main(){ cout << endl; cout << "\"To Print Fancy Pattern-1\"" << endl; cout << endl; int height; cout << "Enter the height of \"Fancy Pattern-1\": "; cin >> height; cout << endl; if(height > 9){ cout << "Hei...
ALGO
0.985901
3.991161
{ "github_metadata": { "branch": "master", "commit_count": 112, "repo_created_at": "2023-10-15T15:18: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": "fd2f71ca...
e17b879a-5452-43d5-b209-d2babaaefa90
Prince-rj/Count-Triangles-Makefile-proj
libTestCases.cpp
#include "library.cpp" #include <iostream> #include <cmath> using namespace std; void run_tests() { // Testcases for distance calculation cout << "the check for the function of distance between two points:" << endl; cout << compute_dist({0, 0}, {3, 4}) << " == 5" << endl; cout << compute_dist({1, 1}, {...
TEST
0.946579
4.890744
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-02-07T19:42: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": "aee3594d4887...
7e448ec9-a933-447e-9a50-79984497b854
xela6134/leetcode
443/string_compression.cpp
#include <vector> #include <string> #include <iostream> int compress(std::vector<char>& chars) { int index = 0; // Pseudocode // // When iterating: // - Keep track of curr_character, and start_index of that character // // - If char_count == 1, don't do anything // - If char_count >=...
ALGO
0.999939
5.705081
{ "github_metadata": { "branch": "main", "commit_count": 260, "repo_created_at": "2023-08-27T12:04: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": "500175c5fc...
ec06e909-5be6-43ac-a8c2-ccdad4a3e2c8
Ashutosh-777/DSA
Strings/RegexsplitStringUsingMultipleDelimitters.cpp
#include <iostream> #include <regex> #include <string> #include <vector> using namespace std; vector<string> split(const string& s, const string& delimiters) { regex re("[" + delimiters + "]+"); // Create a regex that matches one or more delimiters sregex_token_iterator it(s.begin(), s.end(), re, -1); // -1 t...
TOOL
0.994433
5.189188
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-07-31T06:26: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": "46059cfedef...
0907fe55-2128-46cd-a87e-1354a037e533
LINGUTLASAICHARAN/DSA
CPP Practice/c++ placement course/BinaryTree/lowestCommonAncestor.cpp
#include <bits/stdc++.h> using namespace std; struct Node { Node *left; Node *right; int val; Node(int x) { val = x; left = right = NULL; } }; Node *makeTree() { Node *root = new Node(1); root->left = new Node(2); root->right = new Node(3); root->left->left = ...
ALGO
0.999995
4.134208
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-02-06T13:11:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62da68905da...
ced9e82f-4c71-4b8d-80de-976d5cc61a63
edgar-323/leetcode
AllPossibleFullBinaryTrees.cpp
/* A full binary tree is a binary tree where each node has exactly 0 or 2 children. Return a list of all possible full binary trees with N nodes. Each element of the answer is the root node of one possible tree. Each node of each tree in the answer must have node.val = 0. You may return the final list of trees in any o...
ALGO
0.999847
6.291199
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-08-31T19:27: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": "b9eca2f396...
01321bfb-d16c-4411-bc1f-c90efa885c0d
7ANJ0I2407/Competitive-Coding-Codeforces
B_Buying_Lemonade.cpp
#include<iostream> #include<vector> #include<map> #include<unordered_map> #include<set> #include<unordered_set> #include <deque> #include <bits/stdc++.h> using namespace std; #define pb push_back #define pp pop_back #define ll long long #define ld long double #define int long long #define pair pair<int,int> typedef vec...
ALGO
0.999967
4.60717
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2024-01-21T08:03: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": "4409ab186...
a65537c1-b158-4227-8d60-95fa784054b7
henryiii/python-compiled-minicourse
05-pybind/minuit2/src/mnvert.cxx
// @(#)root/minuit2:$Id$ // Authors: <NAME>, <NAME>, <NAME>, <NAME> 2003-2005 /********************************************************************** * * * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT * * ...
ALGO
0.996794
4.668258
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2020-05-06T03:22:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "076a44f7...
d3dfd65e-75e1-4b7e-9df5-b31eec722171
galpwrapper/interpolator
Interp2D/Interp2D.cc
#include<iostream> #include<cstring> #include<cstdlib> #include<cmath> #include<set> #include"Interp2D.h" using std::function; using std::cout; using std::endl; using std::vector; using std::string; using std::log; #define logwb(expr) log(fmax(expr, 1e-300)) class LnWrapper { private: std::function<double(double,do...
ALGO
0.949845
4.31542
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2016-05-08T13:24:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f7ddd8619...
7aadaa59-11a8-4615-ad33-bd8e7a475584
zhangh-t/leetcode
30. Substring with Concatenation of All Words/code.cpp
class Solution { public: vector<int> findSubstring(string s, vector<string>& words) { vector<int> ret; if(s.empty() || words.empty()) return ret; else { multiset<int> wordshashs; int nWordCount = 0; for(auto iter = words.begin() ; iter != words.end...
ALGO
0.999947
6.002314
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2016-04-25T07:27: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": "7de5e20044...
d805f297-f19a-4e1b-ad06-df0a41b4828e
LorinczAdrien/CacheOrNoCash
splay_fa.h
#ifndef SPLAY_TREE #define SPLAY_TREE #include <iostream> #include <vector> using namespace std; template <class T> struct Node { T adat; Node<T>* bal, * jobb; Node<T>* parent; Node(T ertek); }; template <class T> Node<T>::Node(T ertek) { this->adat = ertek; this->bal = this->jobb = this->parent = NULL; } t...
ALGO
0.99907
4.399596
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2023-02-13T16:23:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b84b6dfcb1...
fdc8d83e-2bff-4fdc-9977-aa43913fe02c
IDNINOR/Estruturas_Datos
EXAMEN FINAL 1.cpp
//Arboles// #include<iostream> #include<stdlib.h> #include<conio.h> using namespace std; struct Nodo{ int dato; Nodo *der; Nodo *izq; }; void menu(); Nodo *crearNodo(int n); void insertarNodo(Nodo *&arbol, int n); void mostrarArbol(Nodo *arbol, int contador); bool busquedad(Nodo *arbol, int n); void preOrden(Nodo...
ALGO
0.999777
4.12985
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-10-07T16:58: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": "9b1fb3bc7ba9...
5852adbc-2b4c-4af5-8ad3-1e7053cdd276
aleksandardjukic70/cpp-mini-projects
03-conditionals-and-logic/07_SORTING_HAT/sortinghat.cpp
#include <iostream> int main () { // Magija pocinje ovde int gryffindor = 0, hufflepuff = 0, ravenclaw = 0, slytherin = 0; int answer1 = 0, answer2 = 0, answer3 = 0, answer4 = 0; std::cout << "The Sorting Hat Quiz!\n"; // <NAME> std::cout << "When I'm dead, I want people to remember me as:\n"; std:...
TOOL
0.954008
3.34782
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-12-25T13:40: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": "9e60289fefbc...
7dffd5f1-f98b-492c-a5d6-ff43a645a7fb
kh0ii/icpc-notebook
Geometry/MinkowskiSum.cpp
// a and b are strictly convex polygons of DISTINCT points // returns a convex hull of their minkowski sum with distinct points vector<PT> minkowski_sum(vector<PT> &a, vector<PT> &b) { int n = (int)a.size(), m = (int)b.size(); int i = 0, j = 0; //assuming a[i] and b[j] both are (left, bottom)-most points ve...
ALGO
0.999862
4.367534
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2024-10-29T12:28:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c38dc1747ba...
1ffeb226-8749-407f-aee8-76256c1b5515
gomezenrique93/ControlStructuresThroughObjects
Chapter11/Challenge3/main.cpp
/*3. * Corporate Sales Data Write a program that uses a structure to store the following data on a company division: Division Name (such as East, West, North, or South) First-Quarter Sales Second-Quarter Sales Third-Quarter Sales Fourth-Quarter Sales Total Annual Sales Average Quarterly Sales The program should use ...
ALGO
0.931136
3.595249
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2021-05-15T05:02:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc363a234a9...
4f8719ad-9efc-4506-925b-59234619a7aa
duckdb/duckdb
extension/icu/third_party/icu/i18n/string_segment.h
// © 2018 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html #include "unicode/utypes.h" #if !UCONFIG_NO_FORMATTING #ifndef __NUMPARSE_STRINGSEGMENT_H__ #define __NUMPARSE_STRINGSEGMENT_H__ #include "unicode/unistr.h" #include "unicode/uniset.h" U_NAMESPACE_BEGIN ...
TOOL
0.94487
7.310024
{ "github_metadata": { "branch": "main", "commit_count": 59407, "repo_created_at": "2018-06-26T15:04:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 31074, "forks": 2450, "issues": 412, "pull_requests": 112 }, "file_meta": { "content_id":...
0c5d5364-79b0-44e8-8bc1-9fdc9451a6e2
axwlac/Competitive
4._Graph/Single-Source_Shortest_Paths(SSSP)/On_Weighted_Graph_Dijkstra's,_Easier/10986_Sending_email.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ii> vii; const int INF = 1e9; int main(){ ios::sync_with_stdio(0); cin.tie(0); int N,n,m,s,t; cin >> N; for (int i=0; i < N; ++i){ cout << "Case #" << i+1 << ": "; cin >...
ALGO
0.999905
4.495943
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-01-07T22:48: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": "7501ae4c252...
38f459ab-4e44-44d6-8579-261ebf756947
neamul-haq/Codeforces-Problems-Solutions
B_Different_String.cpp
/* Problem_Link: AUTHOR: Neyamul_Haq CREATED: 11-05-2024 08:58:00 */ #include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_orde...
ALGO
0.99999
4.999675
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-01-01T05:23: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": "c5c595c855e...
de657846-e903-459f-9cd7-f06ef6a06e02
kngott/amrex-tests
Graphs/LB/SFC.H
#include <AMReX_BoxArray.H> #include <AMReX_INT.H> #include <AMReX_Extension.H> #include <AMReX_Array.H> #include <AMReX_Vector.H> struct SFCToken { class Compare { public: AMREX_FORCE_INLINE bool operator () (const SFCToken& lhs, const SFCToken& rhs) const; };...
ALGO
0.995461
5.281563
{ "github_metadata": { "branch": "main", "commit_count": 79, "repo_created_at": "2021-05-28T00:04:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7eacff6825b...
cceed1ed-1105-4a5e-8fed-fdb16cb0124d
S-John-S/Computer_Networks_Lab
IP_header_checksum.cpp
//Input IP header //Calc checksum (endian machine independent) //Display result of each step and final result. /* Psuedo Code The IP checksum is the 16 bit one's complement of the one's complement sum of all 16 bit words in the header. The reason of using 1's complement on 2's complement machines is that it is...
ALGO
0.994558
4.614251
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-07-28T07:24:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3ece39cd6e...
e26e77e7-6c5e-4053-ad15-32539d1d5e64
knightzf/review
leetcode/scoreAfterFlippingMatrix/timeoutSol.cpp
#include "header.h" class Solution { public: int matrixScore(vector<vector<int>>& A) { int m = A.size(); int n = A[0].size(); set<vector<vector<int>>> stateMap; int res = 0; dfs(A, m, n, res, stateMap); return res; } void dfs(vector<vector<int>>& A, int m, ...
ALGO
0.99998
5.477214
{ "github_metadata": { "branch": "master", "commit_count": 846, "repo_created_at": "2013-05-15T02:50: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": "85dca401...
486bdb60-7808-4a1c-b3de-076356773e9f
Teja2302/192110191-DSA0181-C-
Character Checker.cpp
#include <iostream> using namespace std; int main() { char ch; cout << "Enter a character: "; cin >> ch; if (ch >= 'a' && ch <= 'z' || ch >= 'A' && ch <= 'Z') { if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' || ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || c...
ALGO
0.99626
4.073273
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-12-24T03:41: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": "13600acc514...
8f8f6728-f34d-4aef-b196-aa302c1d01f1
ehnryx/acm
neerc-2012-moscow-cf100685/g.cpp
//#pragma GCC optimize("O3") //#pragma GCC target("sse4,avx2,abm,fma,tune=native") #include <bits/stdc++.h> using namespace std; #define _USE_MATH_DEFINES //#define FILENAME sadcactus #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <typename T> using ...
ALGO
0.999977
5.053436
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2018-05-03T04:18:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "84a8989d7...
a2e8bb45-3687-4e21-92ed-07bcd16ae9b8
raincross7/code-similarity
codes/train_code/problem360/problem360_288.cpp
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; int main() { int N, x, y; cin >> N; vector<pair<int, int>> R(N), B(N); for (int i = 0; i < N; i++) { cin >> x >> y; R[i] = make_pair(x, y); } for (int i = 0; i < N; i++) { cin >> x >> y; B[i] = ...
ALGO
0.999512
3.828477
{ "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": "3e47019d5744...
bf0d79ce-518d-4f40-874e-b0b7da8d4249
naman-ptdr/A2Z_DSA
04_BinarySearch/lec1 BS On 1D Arrays/06_FirstLastOccurence.cpp
// Last occurrence in a sorted array // Given a sorted array of N integers, write a program to find the index of the last occurrence of the target key. If the target is not found then return -1. // Note: Consider 0 based indexing #include<bits/stdc++.h> using namespace std; int solve(int n, int key, vector < int ...
ALGO
0.999933
5.46098
{ "github_metadata": { "branch": "main", "commit_count": 313, "repo_created_at": "2024-07-20T18:02:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "408ae1fbaa...
13ea930f-7dcb-4817-b09c-5fe9e8adc2a8
khanhvu207/competitiveprogramming
old_files/Olympiad/CST 2019/Thầy Minh/26-10-2018/numtab(old).cpp
#include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cstring> using namespace std; long long n, m, a[1005][1005], q, h[1005], l[1005], r[1005], dp[1005][1005]; int main() { freopen("numtab.inp", "r", stdin); freopen("numtab.out", "w", stdout); scanf("%d%d", &n, &m); for ...
ALGO
0.999636
3.330971
{ "github_metadata": { "branch": "master", "commit_count": 147, "repo_created_at": "2018-11-20T08:25:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cb3447a...
30bb5280-2535-4b60-a8fc-5c28e8b19a37
Kakuoo/Learn-Algorithm
liuyubobo/UnionFind/UnionFind4.h
/** * Quick Union 基于层数rank的改进 * * 建议: * 相比于基于size的改进,建议使用基于层数rank的改进 * * 可以在合并操作时,考虑基于并查集的层数进行判断 * 永远将rank小的集合合并至rank大的根节点上 * */ #ifndef UNIONFIND_UNIONFIND4_H #define UNIONFIND_UNIONFIND4_H #include <cassert> using namespace std; namespace UF4 { class UnionFind4 { private: int *pare...
ALGO
0.999664
5.100539
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-04-01T04:19: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": "cf9a14d4d62c...
c520937e-5c9f-46ec-bb23-1c1eb3391e87
Jay100202/DSA_solution
81-search-in-rotated-sorted-array-ii/search-in-rotated-sorted-array-ii.cpp
class Solution { public: bool search(vector<int>& nums, int target) { int low = 0,high = nums.size() - 1; while(low <= high){ int mid = (low + high)/2; if(nums[mid] == target){ return true; } // here we are trimming down t...
ALGO
0.999987
5.931584
{ "github_metadata": { "branch": "main", "commit_count": 165, "repo_created_at": "2023-07-22T12:35:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "64dab7eda1...
701268b6-b739-4636-8a90-b52b3df04712
cnyali-czy/code
others/zhengrui/20SQ/day7/C/C.cpp
/* Problem: C.cpp Time: 2020-09-19 22:21 Author: CraZYali E-Mail: <EMAIL> */ #define REP(i, s, e) for (register int i(s), end_##i(e); i <= end_##i; i++) #define DEP(i, s, e) for (register int i(s), end_##i(e); i >= end_##i; i--) #define DEBUG fprintf(stderr, "Passing [%s] in Line %d\n", __FUNCTION__, __LINE__)...
ALGO
0.999866
4.046144
{ "github_metadata": { "branch": "master", "commit_count": 1593, "repo_created_at": "2018-02-24T06:16: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": "ebdcefa...
9f0fc15e-e317-49e0-b2ac-8c00a946195f
mzry1992/workspace
contest/2012summer/2012 Multi-University Training Contest 5/1001_2.cpp
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; struct edge { int to,next; }edge[99*2]; long long dp[100][2][100]; long long mins[100][2]; bool son[100][100]; int a[100],b[100]; int head[100]; int n,L; void init(int n) { memset(head,-1,4*n); L=0; } void add_edge(int u,int v) { ...
ALGO
0.999945
3.473234
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2012-11-03T05:40:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7bd48a6c...
ee352078-a1e9-41eb-afcc-9169f6865936
DevBaweja/Competitive-Coding
Leetcode/85. Maximal Rectangle.cpp
#include <bits/stdc++.h> using namespace std; vector<int> getSmallestLeft(vector<int> arr, int n) { vector<int> v(n, 0); stack<int> s; for (int i = 0; i < n; i++) { while (!s.empty() && arr[i] <= arr[s.top()]) s.pop(); v[i] = !s.empty() ? s.top() : -1; s.push(i); ...
ALGO
0.999683
5.045533
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2020-10-25T07:57:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a06c6866d...
9b1d99ed-38a1-412f-a666-054333396c03
debugster/MyLecture
CPP/STL-Vector/08-InsertAndErase.cpp
/*************************** * Author : <NAME> * * <EMAIL> * ***************************/ #include <iostream> #include <vector> #include <cstdlib> #include <ctime> using namespace std; int main() { srand(time(NULL)); vector<int>intV; // Initializes an empty vector for (int i = 1; i <= 5; i++...
ALGO
0.979508
3.908946
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2018-08-19T17:30:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f1bec8a11...
e29fcd3c-9e75-4589-9303-bf308f7f27da
ishandutta2007/codeforces-k
ko_osaga/normal/1017/F.cpp
#include <bits/stdc++.h> using namespace std; using lint = long long; using pi = pair<int, int>; char che[12500005]; // (1, 5, 7, 11) .. (i / 6 + (i % 6 == 5)) int main(){ int n; unsigned a, b, c, d; cin >> n >> a >> b >> c >> d; int FUCK1 = 1; for(int i=5; i<=n && i<=20000; i+=2){ if(i % 6 == 3) continue; if...
ALGO
0.999555
3.925181
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5dba9bcc3c8f...
07a7e3ef-c59d-42fc-be67-377873773e81
luyaor/OI-ACM-Codes
ZJOI/13/[Zjoi2013]防守战线.cpp
/* Problem: Algorithm: Note: */ #include<cstdio> #include<cstring> #include<algorithm> #include<set> #include<vector> #include<map> #include<string> #include<iomanip> #include<iostream> #include<cmath> #include<queue> using namespace std; #define rep(i,x,y) for(i=x;i<=y;i++) #define _rep(i,x,y) for(i=x;i>=...
ALGO
0.999977
3.326207
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-02-24T08:46: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": "b6c0769d9f...
73727406-0990-4f5d-ac08-24c3b957a7f4
Nitin-Pilkhwal/Leetcode_Problems
Hard Problems/164. Maximum Gap.cpp
#include <iostream> #include <unordered_map> #include <map> #include <cmath> #include <vector> #include <string> #include <algorithm> #include <limits.h> using namespace std; class Solution { public: int minimum(int a,int b){ if(a<=b) return a; return b; } int maximum(int a,int b){ ...
ALGO
0.999846
4.721035
{ "github_metadata": { "branch": "main", "commit_count": 329, "repo_created_at": "2023-01-22T03:58:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa3e96f7af...
7364377c-06e7-48dc-bf06-12a282c891bc
leonardochang36/TC1031-202013-DSA
week04/sorter.h
#ifndef sorter_h #define sorter_h #include <iostream> #include <vector> template <typename T> class Sorter { public: Sorter() {}; ~Sorter() {}; void swap(int i, int j, std::vector<T> &arr) { T aux = arr[i]; arr[i] = arr[j]; arr[j] = aux; }; virtual void sort(std::...
ALGO
0.993344
5.144458
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2020-08-11T04:13:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8ba7b9365...
11d48f56-ab18-4c47-8bbb-3eb9d38e554b
ishandutta2007/codeforces-n
nealchen/normal/1548/C.cpp
#include <bits/stdc++.h> #define meow(args...) fprintf(stderr, args) typedef unsigned u32; typedef long long s64; typedef unsigned long long u64; template<class T1, class T2> inline bool cmin(T1 &a, const T2 &b) {return b<a?(a=b, true):false;} template<class T1, class T2> inline bool cmax(T1 &a, const T2 &b) {return a<...
ALGO
0.999695
3.335166
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:35:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "206fbaf14b03...
a12ba28b-0726-4cbe-9eb8-3c0b99e4cb12
nicomarmorini/inetmanet
src/linklayer/mf80211/phyLayer/decider/SnrDecider.cc
/* -*- mode:c++ -*- ******************************************************** * file: SnrDecider.cc * * author: <NAME>, <NAME> * * copyright: (C) 2004 Telecommunication Networks Group (TKN) at * Technische Universitaet Berlin, Germany. * * This program is free software; yo...
TOOL
0.920528
5.843834
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2010-05-09T08:44:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae53e4cfe...
d52ee9ec-7936-4583-8777-107a8a98f0bf
lanlei/PD-IPC-ArmadilloDemo
Bow/Geometry/IpcTookit/PointEdgeCcd.cpp
#include "PointEdgeCcd.h" namespace Bow::Geometry::IPC { namespace internal { template <class T, int dim> bool check_overlap( const Vector<T, dim>& x0, const Vector<T, dim>& x1, const Vector<T, dim>& x2, const Vector<T, dim>& d0, const Vector<T, dim>& d1, const Vector<T, dim>& d2, T root) ...
ALGO
0.985821
7.042392
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-06-27T03:39:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7fd6227d96...
ef8dc9f2-4bee-49b1-b150-35f220098b82
minhnguyeenx/HAUI_UDTT
OnKiemTra2/ONTAP2/Bai4.cpp
#include <bits/stdc++.h> using namespace std; struct DienThoai{ string nhanHieu; int kichThuoc; double giaBan; }; void CaiTui(DienThoai *a, int **f, int n, int m){ for(int i = 0; i <= m; i++){ f[0][i] = 0; } for(int i = 1; i <= n; i++){ for(int j = 0; j <= m; j++){ f[i][j] = f[i-1][j]; int tmp = f[i-...
ALGO
0.999103
4.132037
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-06-22T16:51:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3c23cd278777...
efbc5a4e-af83-43aa-b946-abd824b24e44
nehasane/problems
ioi16p1io.cpp
/* first look and i thought it was knapsack, but the constraints don't support a knapsack solution. sort the molecules based on their weight. all we have to do now is find a subarray where the sum of the weights falls within the given range. A 2P range can do this. */ #include <bits/stdc++.h> us...
ALGO
0.999993
3.776225
{ "github_metadata": { "branch": "main", "commit_count": 85, "repo_created_at": "2022-03-02T00:17: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": "38ad7c3216b...
b5ec07d0-eee9-4a23-8e2c-8b3fd28f85fb
Evene174/HeavenlySword
code/physics/LookAtConstraint.h
//-------------------------------------------------- //! //! \file LookAtConstraint.h //! This is a dummy holding a few doxygen comments. //! //-------------------------------------------------- #ifndef _LookAtConstraint_H_ #define _LookAtConstraint_H_ #include "physics/havokincludes.h" #include "anim/characterboneid...
TOOL
0.926806
3.018474
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-10-30T19:15:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 16, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "02d8b138f...
e6beb9dc-3815-4870-817f-e332e3923a3e
MOLAorg/mp2p_icp
apps/sm-cli/sm-cli-level.cpp
/*+-------------------------------------------------------------------------+ | MultiVehicle simulator (libmvsim) | | | | Copyright (C) 2014-2023 <NAME> | | Copyright (C) 2017 <N...
TOOL
0.964425
6.0174
{ "github_metadata": { "branch": "develop", "commit_count": 667, "repo_created_at": "2019-06-07T07:57:39.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 182, "forks": 25, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ba6f...
0011401f-4079-4da8-8882-c5450c3fe7e6
mroy8202/DSA
Dynamic Programming/1D-DP/0_Introduction to dp.cpp
/* TRICK TO SOLVE A RECURSION PROBLEM 1. Try to represent the problem in terms of indexes. 2. Try all possible choices / ways at every index according to the problem statement. 3. If the question states - * Count all the ways - return sum of all choices / ways. * Find maximum / minimum - re...
ALGO
0.999988
6.166745
{ "github_metadata": { "branch": "main", "commit_count": 72, "repo_created_at": "2023-09-03T09:04: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": "666983962ef...
55b4e6fa-693d-4e1b-b996-65fb3ef16778
JuanFPR-UPM/Interactive_structure_learning_DAG_space
pybnesian/kernels/kernel.cpp
#ifndef KERNEL_CPP #define KERNEL_CPP #include <kernels/kernel.hpp> #include <iostream> #include <omp.h> template <class T> Kernel<T>::Kernel(){ } template <class T> void Kernel<T>::max1d(const T* input, uint input_length, T* localMaxs, T* output, ...
ALGO
0.994832
5.780766
{ "github_metadata": { "branch": "ISL_prod", "commit_count": 429, "repo_created_at": "2025-01-28T22:44:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f5f1bb...
2a84f3ab-77bd-4ec5-a1bb-ab92117f379b
rimurey/cp-tutorials
VinhPhuc_10_2017-2018/Code/bnxtbig.cpp
#include <bits/stdc++.h> using namespace std; #define taskname "bnxtbig" int main() { if (fopen (taskname".inp", "r")) { freopen (taskname".inp", "r", stdin); freopen (taskname".out", "w", stdout); } ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; ...
ALGO
0.999996
3.999358
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-01-12T13:48:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "931fa7b94bb2...
28eb7bf8-c9f5-4364-9d17-f5e8faf1797e
Ashutosh-777/DSA
Dp/_AdityVerma/KnapSack/rodCutting.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution{ public: int cutRod(int price[], int n) { int ans[n+1][n+1]; int wt[n]; for(int i=0;i<=n;i++){ for(int j=0...
ALGO
0.999841
4.734202
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-07-31T06:26: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": "40a80beb668...
19ccf223-5b12-4618-a08a-6dcb1c491962
VictorRamirez26/ArquitecturasDistribuidas
TP1/ej4.cpp
#include <iostream> #include <vector> #include <thread> #include <mutex> #include <chrono> std::mutex mtx; struct ResultadoPrimos { int cantidad; std::vector<int> listaPrimos; }; // Criba de Eratóstenes ResultadoPrimos contarPrimos(int n) { if (n < 2) return {0, {}}; std::vector<bool> esPrimo(n + 1,...
ALGO
0.999931
5.660296
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-09-01T15:10: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": "1891582324dd...
d4a35631-31fa-493c-9371-3edda23a37c0
Cube219/PS
BOJ/23000~24000/23334 - Olympic Ranking.cpp
#define _CRT_SECURE_NO_WARNINGS 1 #define _CRT_DECLARE_NONSTDC_NAMES 0 // for using y1 as variable name #include <iostream> #include <cstdio> #include <utility> #include <algorithm> #include <numeric> #include <string> #include <vector> using namespace std; using ll = long long int; constexpr int INF = 0x3f3f3f3f; co...
ALGO
0.999124
3.444587
{ "github_metadata": { "branch": "main", "commit_count": 1172, "repo_created_at": "2021-01-20T03:42: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": "201d765b4...
b3a41022-61cd-4642-9527-efd7555aa519
ishandutta2007/codeforces-h
halyavin/normal/8/C.cpp
#include <iostream> #include <vector> #include <array> #include <algorithm> size_t n; std::vector<std::vector<int>> matrix; std::vector<int> dyn; std::vector<std::pair<int8_t, int8_t>> prev; int opt(int start, size_t mask) { if (dyn[mask] != -1) { return dyn[mask]; } size_t orig_mask = mask; while ((mask...
ALGO
0.999991
4.932585
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1a7c2e7ab85b...
9aedd70b-3aed-47ed-af56-764684426b74
iumar28/cp_codes
Dynamic Programming/CoinChane_variationOfUnboundedKnapsack.cpp
// Link: https://leetcode.com/problems/coin-change/ #include <bits/stdc++.h> using namespace std; int helper(vector<vector<int>> dp, vector<int> &coins, int amount, int index) { if (amount == 0 || index == 0) { return 0; } if (amount < 0) { return -1; } if (dp[index][amount]...
ALGO
0.999989
5.795509
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-04-17T08:10: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": "1505be000e41...
fac2c6bb-dbff-4519-a1bb-9f4aaa06f0b3
AniruddhSharma23/LeetCode-Solutions
Number of Provinces.cpp
class Solution { public: void dfs(vector<int> adj[], stack<int> &st, vector<bool> &vis, int u) { vis[u] = true; for (auto x : adj[u]) if (vis[x] == false) dfs(adj, st, vis, x); st.push(u); } void dfs2(vector<int> revadj[], vector<bool> &vis, int u) ...
ALGO
0.999993
5.765027
{ "github_metadata": { "branch": "main", "commit_count": 85, "repo_created_at": "2022-03-26T08:50:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e8c43d31958...
1fc01b25-f7a0-437d-8559-1c26efd1286f
weichow23/zju_course
高级数据结构与算法分析/project/Project6/code/StripPack.cpp
#include "StripPack.h" long long FFDH(int width, std::vector<Rect> rect_list){ // First-Fit Decreasing Height long long current_height = 0; // the whole height of the sum of the height each level int j; if (rect_list.empty()) return 0; std::sort(rect_list.begin(), rect_list.end(), HeightDescSort); /...
ALGO
0.999594
5.057401
{ "github_metadata": { "branch": "zju_course", "commit_count": 223, "repo_created_at": "2023-01-13T14:38:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 29, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb0...
d42c01ab-35d5-4604-b2a6-b281aad97e2a
ishandutta2007/codeforces-a
alishahali1382/normal/568/E.cpp
#include <bits/stdc++.h> #pragma GCC optimize ("O2,unroll-loops") //#pragma GCC optimize("no-stack-protector,fast-math") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef pair<pii, int> ...
ALGO
0.99998
3.283948
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0fae9e057752...
ae20e068-35e6-4c1e-b201-e96e2b53a6ee
sunwchoi/BJ
프로그래머스/0/120861. 캐릭터의 좌표/캐릭터의 좌표.cpp
#include <string> #include <vector> #include <unordered_map> using namespace std; vector<int> solution(vector<string> keyinput, vector<int> board) { vector<int> answer = {0, 0}; unordered_map<string, vector<int>> mp; mp["up"] = {0, 1}; mp["down"] = {0, -1}; mp["left"] = {-1, 0}; mp["right...
ALGO
0.999845
5.519252
{ "github_metadata": { "branch": "main", "commit_count": 244, "repo_created_at": "2023-10-11T06:23:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a13feff0d6...
aee6effb-7f91-4a1e-be44-0f152a69357c
zorro2017zdc/cvCode
homography/Source2.cpp
# include "opencv2/core/core.hpp" # include "opencv2/features2d/features2d.hpp" # include "opencv2/highgui/highgui.hpp" # include "opencv2/nonfree/features2d.hpp" #include"opencv2/imgproc/imgproc.hpp" #include"opencv2/calib3d/calib3d.hpp" #include<iostream> using namespace cv; using namespace std; /** * @function main...
ALGO
0.997601
5.096346
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2017-05-23T02:56:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a608fc701...
39ac2ed5-69e3-4c7b-8e7e-7ea45c738130
song1248/Algorithm_C
week_5/Maximum Contiguous Subsequence Sum (Kadane's Algorithm) .cpp
#include <stdio.h> #include <iostream> using namespace std; int kadane(int arr[], int len_arr); int main(){ int tc, len_arr; cin >> tc; while(tc--) { cin >> len_arr; int *arr = new int[len_arr]; for(int i = 0; i < len_arr; i++) { int num; cin >> num; arr[i] = num; } kadane(arr, len_ar...
ALGO
0.999707
3.664525
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2022-09-09T08:19: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": "d78de478f4a...
16241c3b-004d-4b1c-b154-2f484456d739
HarshPanchal18/DataStructure
Linked List/C-C++/ReverseList.cpp
#include <iostream> using namespace std; /* * Reverse Linked List Input: head = [1,2,3,4,5] Output: [5,4,3,2,1] Input: head = [1,2] Output: [2,1] Input: head = [] Output: [] */ // Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} List...
ALGO
0.999913
5.715733
{ "github_metadata": { "branch": "main", "commit_count": 486, "repo_created_at": "2022-01-21T06:27:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "20bc1c687c...
11a90ea3-de84-41df-802a-1f7208c7e567
andrewzolotukhin/leetcode
P01146BinarySearch/solution.cpp
class SnapshotArray { private: vector<vector<pair<int, int>>> _vals; int _snapId; public: SnapshotArray(int length) { _vals = vector<vector<pair<int, int>>>(length, vector<pair<int, int>>()); _snapId = 0; } void set(int index, int val) { auto &a = _vals[index]; if (a.empty() || a.back().firs...
ALGO
0.998271
6.145046
{ "github_metadata": { "branch": "main", "commit_count": 636, "repo_created_at": "2024-10-29T13:43: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": "d570a36038...
e3d3aa31-4fea-40af-8729-7a34bf5059f0
joaomarcosth9/competitive-programming
codeforces/codeton-round7-div2/D.cpp
#include "bits/stdc++.h" using namespace std; #ifdef LOCAL_DEBUG #include "debug.h" #else #define debug(...) #define cerr if (false) cerr #endif #define endl '\n' #define eb emplace_back #define all(x) begin(x), end(x) #define rall(x) rbegin(x), rend(x) #define L1(res...) [&](const auto& x){ return res; } #define L2(r...
ALGO
0.999735
5.03843
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2022-07-20T11:23: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": "550d3e25108...
8ee838be-4294-46ee-bbe5-082315f30523
mikehung/competitive-programming
codeforces/1405/D/sol.cc
#include <bits/stdc++.h> using namespace std; using ll = long long; int n, a, b, da, db; map<int, vector<int>> g; int distance(int u, int v) { vector<int> d(n, -1); queue<int> qu; qu.push(u); d[u] = 0; while (qu.size()) { u = qu.front(); qu.pop(); if (u == v) return d[u]; ...
ALGO
0.999949
3.98836
{ "github_metadata": { "branch": "master", "commit_count": 182, "repo_created_at": "2018-10-18T09:10: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": "d9f55e53...
a3865785-77fd-4c73-8099-5f33ab7e8cab
winersch/Algorithm
백준/Platinum/2568. 전깃줄 - 2/전깃줄 - 2.cc
#include <iostream> #include <vector> #include <algorithm> #include <cstring> #include <queue> #include <cmath> #include <iomanip> #define inf 0x3f3f3f; using namespace std; int n; vector<pair<int, int>> v; vector<int> ans, idx; int binarySearch(int idx) { int mid; int left = 0, right = ans.size() - 1; w...
ALGO
0.999995
3.67198
{ "github_metadata": { "branch": "main", "commit_count": 768, "repo_created_at": "2023-08-07T05:08: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": "e0ef6adcd1...
6464615f-d7b1-466c-92af-7a56aea3e18f
shobhitr97/Codes
UVa1240_ICPCTeamStrategy.cpp
#include<iostream> #include<vector> #include<algorithm> #include<utility> #include<stdio.h> #include<set> #include<map> #include<cmath> #include<queue> #include<stack> using namespace std; typedef long long int ll; typedef vector<int> vi; typedef vector<ll> vll; typedef pair<int, int> ii; typedef vector<ii> vii; type...
ALGO
0.999784
3.409912
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2016-05-07T09:50: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": "c8f8999ac...
96298b34-e6f6-4399-bdca-b2f1d74476e1
wandukong/Algorithm
백준/주사위윷놀이_17825.cpp
#include <iostream> #include <algorithm> using namespace std; int dice[10], ans; int mal[4]; int arr[35]; int score[35]; int turn[35]; bool check[35]; void dfs(int cnt, int sum) { if (cnt == 10) { ans = max(ans, sum); return; } for (int i = 0; i < 4; i++) { int pre = mal[i...
ALGO
0.999882
3.771399
{ "github_metadata": { "branch": "master", "commit_count": 464, "repo_created_at": "2020-04-25T13:05:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb962943...
8d0addb1-4770-4db2-9cfb-c0c5226b2f6d
crishoj/OpenPNL
c_pgmtk/tests/src/ACondSoftMaxAndSoftMax.cpp
///////////////////////////////////////////////////////////////////////////// // // // INTEL CORPORATION PROPRIETARY INFORMATION // // This software is supplied under the terms of a license agreement or // // nond...
ALGO
0.974586
6.835185
{ "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": "2bbb8...
7576a7f6-48cb-4432-a632-78230c5b5978
Cuong312004/C-Game
totalfunction.cpp
#include<iostream> #include "totalfunction.h" bool SDLCommonFunc::CheckCollision(const SDL_Rect& object1, const SDL_Rect& object2) { int left_a = object1.x + 20 ; int right_a = object1.x + object1.w - 20; int top_a = object1.y; int bottom_a = object1.y + object1.h; int left_b =...
ALGO
0.931112
4.15155
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-07-05T14:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "488aed71006a...
a9305a19-e0a5-4b34-a33e-eb1bdf38f8a1
hhes0225/baekjoon
백준/Gold/2536. 버스 갈아타기/버스 갈아타기.cc
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> PII; struct Bus{ int num; bool isHorizontal; pair<int, int> startPos, endPos; }; int m, n; int k; vector<Bus> buses; vector<vector<int>> adjList; /* 수평-수평 교차 : 두 버스가 같은 x좌표, 두 버스의 y구간이 겹치면 교차 수직-수직 교차 : 두 버스가 같은 y좌표, 두 ...
ALGO
0.99993
4.556123
{ "github_metadata": { "branch": "main", "commit_count": 1019, "repo_created_at": "2021-03-30T19:11: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": "b4b4f5873...
81a76ab0-e36a-4c5d-9028-6943b6974156
AI-MANIAC007/Data-Structures
Lab 7/D_main.cpp
#include <iostream> #include <string.h> #include "hemshead.h" using namespace std; //This program is to remove the character left to a '+' using stack ADT string pop_plus(string); int main() { string input; cout << "Enter input string : "; cin >> input; cout << pop_plus(input); } string pop_plus(stri...
ALGO
0.999617
4.05093
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2025-04-27T14:46:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c9adf328e2...
fea2690f-63d8-4462-a69f-91f589d4d4fb
pranavpata/Leetcode
794-valid-tic-tac-toe-state/794-valid-tic-tac-toe-state.cpp
class Solution { public: bool validTicTacToe(vector<string>& board) { //X is 1, O is -1, empty space is 0 int newB[3][3] = {}; int total = 0; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { if (board[i][j] == 'X') { newB[i][...
ALGO
0.999924
5.787024
{ "github_metadata": { "branch": "main", "commit_count": 504, "repo_created_at": "2021-12-28T02:06: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": "8d8f25dd52...
037119d5-43e6-465a-8b9e-35d19b6befdf
2013612/CP-algorithm
codejam/codejamG(A).cpp
#include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int T, N, a[10005], ans; int main(){ freopen("A-large.in", "r", stdin); freopen("A-large.out", "w", stdout); scanf("%d", &T); for (int i = 1; i <= T; i++) { ans = 0; scanf("%d", &N); for (int j = 0; j < N; j++) { ...
ALGO
0.999736
3.474522
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2025-04-09T18:47: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": "d1c63f83813...
05023ce8-e912-4b5e-bf72-3fe9c4070b12
vigente/gerardus
cpp/src/third-party/scipoptsuite-3.0.2/soplex-1.7.2/src/spxsteeppr.cpp
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the class library */ /* SoPlex --- the Sequential object-oriented simPlex. */ ...
ALGO
0.995984
3.998328
{ "github_metadata": { "branch": "master", "commit_count": 3429, "repo_created_at": "2015-04-07T14:27:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 223, "forks": 74, "issues": 5, "pull_requests": 1 }, "file_meta": { "content_id": "153f2...
7371945e-7f83-492e-80a4-bd81b2492b63
Demoren1/Algorithms
first_contest_cpp/task_l/task_l.cpp
#include <iostream> #include <cstring> int Solution(); int** Ctor2DArray(int n); void Dtor2DArray(int** arr, int n); void FormAnswer(int** arr, int* ans, int n); void ShowAns(int* ans, int n); bool CheckSol(int** arr, int* ans, int n); #define MAX_NUM 9999 int main() { Solution(); return 0; } int Solution() {...
ALGO
0.999924
3.872342
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2023-09-09T14:24: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": "a9baaf37e...
eb8d45ec-2387-49df-96ed-d5bf2b27ce95
daisuke834/exercise_algorithm_cpp
test/AOJ/textbook/11/test_4_ALDS1_10_B_matrix_chain_multiplication.cc
/** * @copyright (c) 2020 <NAME> * @brief Part11-4. 動的計画法(Dynamic Programming, DP)、連鎖行列積問題(Matrix-Chain Multiplication problem)。 * 「アルゴリズムとデータ構造」(渡部有隆(著))のアルゴリズムのスクラッチ実装。 */ #include <gtest/gtest.h> #include <gtest/internal/gtest-port.h> #include <ctime> #include <iostream> #include <sstream> #include "src/AOJ/t...
TEST
0.994818
4.823513
{ "github_metadata": { "branch": "master", "commit_count": 162, "repo_created_at": "2020-04-22T05:51:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b86083db...
8571323b-9f41-4155-a3fb-ae97c4ccbad3
Gauravkr0220/DataStructure
Phase 4/sum.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int n, q; vector<int> vec; // Segment tree node definition with a set of sums struct node { set<int> sums; node() {} node(int s) { sums.insert(s); } }; // Segment tree array to store the nodes node t[800400]; // Merging two ...
ALGO
0.999942
4.924094
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-11-26T10:16: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": "dedb6528b3a...
15b2579f-cc70-4de5-a5e3-ee5e1fbcc261
ngophuc/CurveDecomposition
ImaGene/src/digitalnD/CentroidEmbedder.cxx
/////////////////////////////////////////////////////////////////////////////// // // // File name : CentroidEmbedder.cxx // // Creation : 2004/02/04 // // Version : 2004/02/04 // // Author : <NAME> // // email : <EMAIL> // // Purpose : ?? // // ...
ALGO
0.984802
6.612401
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2016-10-05T12:03:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "5c1ed128f...
433f4a4f-c0ca-4e1d-b399-7b48416b4e1b
Yusuf-Manjra/athena
Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/VKalVrtFitFastSvc.cxx
/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // Header include #include "TrkVKalVrtFitter/TrkVKalVrtFitter.h" #include "TrkVKalVrtFitter/VKalVrtAtlas.h" //------------------------------------------------- // #include "TrkTrack/TrackInfo.h" #include <vector> #include <algorithm> //for...
ALGO
0.998804
6.153811
{ "github_metadata": { "branch": "master", "commit_count": 115883, "repo_created_at": "2023-03-17T15:12:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4df27...
28e5fe61-d055-49da-aa46-02181e1bb565
ccyrene/solo-leveling-dsa1
10-queue/linear-queue/main.cpp
#include<iostream> using namespace std; #define SIZE 5 class Queue { int items[SIZE], front, rear; public: Queue() { this->front=-1; this->rear=-1; } bool isFull() { return rear == SIZE - 1; } bool isEmpty() { return front == -1; } void enqueue(int ...
ALGO
0.996667
4.979
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2025-01-23T07:27:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2602a217af5...
7ad5f76c-f6e5-4a4b-927f-26e24ee57503
olligobber/souffle
src/profile/StringUtils.h
/* * Souffle - A Datalog Compiler * Copyright (c) 2016, The Souffle Developers. All rights reserved * Licensed under the Universal Permissive License v 1.0 as shown at: * - https://opensource.org/licenses/UPL * - <souffle root>/licenses/SOUFFLE-UPL.txt */ #pragma once #include "CellInterface.h" #include "Row.h"...
TOOL
0.903213
6.957291
{ "github_metadata": { "branch": "master", "commit_count": 3707, "repo_created_at": "2018-11-30T04:04:09.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "souffle-lang/souffle", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "cont...
7b74225c-0a99-497b-a1b2-0ada4008dcd2
coding-blocks-archives/Launchpad18Winter
18_trees/tree.h
#include <iostream> #include <queue> using namespace std; #ifndef TREE_H_ #define TREE_H_ class TreeNode { public: int data; TreeNode *left, *right, *next; TreeNode(int x) { data = x; left = NULL; right = NULL; next = NULL; } }; TreeNode* createTree() { int x; ...
ALGO
0.999752
4.203818
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2018-01-28T07:50:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7174f510e1...
dca6b902-654e-446a-a6b8-1aa86b1514b3
jhu-cisst/cisst
cisstRobot/applications/cisstRobotSensorCalibration/RobotSensorCalibration.cpp
#include <cisstNumerical/nmrSymmetricEigenProblem.h> #include <cisstNumerical/nmrLSMinNorm.h> #include <cisstNumerical/nmrInverse.h> #include <cisstVector/vctFrame4x4.h> #include <cisstVector/vctMatrixRotation3.h> #include <cisstCommon/cmnRandomSequence.h> /** Solves AX = XB. Algorithm based on least-squares sol...
ALGO
0.999653
4.57155
{ "github_metadata": { "branch": "main", "commit_count": 4711, "repo_created_at": "2014-03-12T21:45:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 69, "forks": 45, "issues": 22, "pull_requests": 1 }, "file_meta": { "content_id": "aae2641...