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
aa369651-b9a6-43b8-b545-00513ab4babb
nettee/leetcode
solutions/0232.implement-queue-using-stacks/0232.implement-queue-using-stacks.1548158477.cpp
class MyQueue { public: /** Initialize your data structure here. */ MyQueue() { } /** Push element x to the back of queue. */ void push(int x) { sa.push_back(x); } /** Removes the element from in front of queue and returns that element. */ int pop() { i...
ALGO
0.99861
5.718968
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-12-19T05:04:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8dfcc3a8a...
4c66917b-fcb1-45ef-bb9a-b7db9291f5db
dharmendranamdev/Data-Structure-and-Algorithms
Array/MOAlgo/main.cpp
/* Input: arr[] = {1, 1, 2, 1, 3, 4, 5, 2, 8}; query[] = [0, 4], [1, 3] [2, 4] Output: Sum of arr[] elements in range [0, 4] is 8 Sum of arr[] elements in range [1, 3] is 4 Sum of arr[] elements in range [2, 4] is 6 */ #include <iostream> using namespace std; struct AddOfRange{ int l,r;...
ALGO
0.999723
5.820874
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-06-25T07:32:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c42073dfd...
6e8f4d30-f432-4904-91ec-829c8eccbb3b
VarunCypherV/LeetCode
backtracking/NQueens.cpp
class Solution { public: vector<vector<string>> solveNQueens(int n) { vector<vector<string>> result; vector<string> board(n, string(n, '.')); backtrack(result, board, 0); return result; } void backtrack(vector<vector<string>>& result, vector<string>& board, int row) { ...
ALGO
0.999749
6.421231
{ "github_metadata": { "branch": "main", "commit_count": 144, "repo_created_at": "2023-04-02T13:00:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "caf47ae9f8...
44cc0713-b9d6-41aa-b073-1e77d84fd27f
ilya-kan07/parallel_computing
parallel_haar_cascades/main.cpp
#include <opencv2/opencv.hpp> #include <opencv2/highgui.hpp> #include <iostream> #include <omp.h> #include <chrono> #include <vector> int main() { cv::VideoCapture cap("../../res/video.mp4"); if (!cap.isOpened()) { std::cerr << "Ошибка: Не удалось открыть видеофайл!" << std::endl; return -1; ...
ALGO
0.990874
6.322073
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2025-02-05T08:15: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": "fc412e37f55...
34dc81d3-c4e3-4d57-b063-aeadd83d6a7b
JeffersonCarvalh0/codeforces-problems
451B/main.cpp
# include <iostream> # include <algorithm> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, a[100000], l = -1, r = -1; cin >> n; for (int i = 0; i < n; ++i) cin >> a[i]; for (int i = 1; i < n; ++i) { if (l == -1 && a[i - 1] > a[i]) l = i - 1; if ...
ALGO
0.999995
4.098104
{ "github_metadata": { "branch": "master", "commit_count": 87, "repo_created_at": "2018-04-20T20:44:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "64552e175...
8e920dd4-5e8b-4a43-a29b-8a4da70f9832
hellowworld-ctrl/John-McAfrees-Wild-Ride-Third-Week-Anniversary-Edition-Collectors-Edition
Map stuff/MapBeach.h
#pragma once #include <curses.h> #include <vector> #include <string> #include <iostream> #include <random> #include <ncurses.h> #include <Color.h> using namespace std; class MapBeach { default_random_engine gen; public: vector<vector<char>> map; static const char MCAFREE = '@'; static const char VIRUS = 'V'; ...
TOOL
0.918596
3.60776
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2024-04-26T19:44: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": "ac7610fcc4...
7a03bd97-939c-4d39-ab7e-afc047376bb7
hjk0761/Almumol
hyxrxn/c++/baekjoon/02630.cpp
#include <iostream> using namespace std; int blue = 0; int white = 0; int n; int arr[128][128]; void check(int x, int y, int size) { if (size == 0) return; bool bf = true; bool wf = true; for (int i = x; i < x + size; i++) { for (int j = y; j < y + size; j++) { if (arr[i][j] == 1...
ALGO
0.999711
4.79
{ "github_metadata": { "branch": "main", "commit_count": 1488, "repo_created_at": "2024-12-13T06:19:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "478a3435...
e326e19b-b566-4e4f-b102-8ed25df57cd1
WHO-A-U/BOJ_algorithm
21609.cpp
#include <bits/stdc++.h> #define INF 0x3f3f3f3f #define ft first #define sd second #define all(x) (x).begin(), (x).end() using namespace std; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; using vi = vector<int>; using vb = vector<bool>; using vs = vector<string>; using vd = vector<double>;...
ALGO
0.999943
4.085047
{ "github_metadata": { "branch": "master", "commit_count": 235, "repo_created_at": "2020-07-29T03:50: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": "d5b6d236...
91667018-4d01-4a80-99c1-b2b47f73e4d7
Lang-Dat/dev
Dt/past/14/CATTHEP.cpp
/** * author: <NAME> * create: 05-12-2022 13:55:19 **/ #include <iostream> #include <algorithm> #include <vector> using namespace std; static const int LIM = 5*1e5 + 5; int nums[LIM]; int n, k; int check(int length) { // TC: O(n) int count = 0; for (int i = 0; nums[i] >= length && count < k; i++) ...
ALGO
0.999959
4.479509
{ "github_metadata": { "branch": "main", "commit_count": 259, "repo_created_at": "2022-09-03T14:10:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6d5de1451...
a206ead5-a7aa-4154-94eb-bf712294dab2
NaCl-1374/perceptive_legged_control
OCS2_ws/src/hpp-fcl/src/traits_traversal.h
/* * Software License Agreement (BSD License) * * Copyright (c) 2019, CNRS-LAAS * All rights reserved. */ /** \author <NAME>, <NAME> */ #include <hpp/fcl/collision_func_matrix.h> #include <hpp/fcl/narrowphase/narrowphase.h> #include <../src/collision_node.h> #include <hpp/fcl/internal/traversal_node_setup.h> #...
ALGO
0.996657
5.66293
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2024-10-13T10:56:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "fcb1869a8...
f209176b-0620-4850-b8a6-6785a01eb0f9
TaoSama/ICPC-Code-Library
Book - 挑战程序设计竞赛(第2版)/2.5 Graph Theory/10POJ 2377 Bad Cowtractors.cpp
// // POJ 2377 Bad Cowtractors // // Created by TaoSama on 2015-03-21 // Copyright (c) 2015 TaoSama. All rights reserved. // #include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include ...
ALGO
0.999972
4.050127
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2016-03-24T05:56: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": "ed970fbd...
3aa79d88-1a2c-4161-abea-5e84f5a65886
diasurgical/DevilutionX
Source/help.cpp
/** * @file help.cpp * * Implementation of the in-game help text. */ #include <string> #include <string_view> #include <vector> #include "DiabloUI/ui_flags.hpp" #include "engine/render/clx_render.hpp" #include "engine/render/text_render.hpp" #include "game_mode.hpp" #include "minitext.h" #include "qol/chatlog.h" #...
TOOL
0.952542
6.355085
{ "github_metadata": { "branch": "master", "commit_count": 11694, "repo_created_at": "2018-08-02T17:19:01.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8781, "forks": 879, "issues": 272, "pull_requests": 136 }, "file_meta": { "content_id":...
820de9fe-9be6-44e7-9fbd-026ed991c535
ZhenyingZhu/ClassicAlgorithms
src/CPP/src/pratice/DoubleLinkedBST.cpp
#include <iostream> using namespace std; // [Source]: http://www.1point3acres.com/bbs/thread-214001-1-1.html struct Node { int val; Node *left, *right; Node *prev, *next; Node(int x): val(x), left(NULL), right(NULL), prev(NULL), next(NULL) { } }; class Solution { public: // link the BST nodes wit...
ALGO
0.999984
5.277396
{ "github_metadata": { "branch": "master", "commit_count": 484, "repo_created_at": "2014-09-14T08:09:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3928a401...
546085cf-4579-44d0-99e0-91fa5c8d69b1
kingang1986/shapematching
cppcode/swBMRM/bmrm-2.1/solver/bmrminnersolver/l2n2_prloqo.cpp
/* * Purpose : solves quadratic programming problem * * Note : adapted from pr_loqo */ #ifndef _L2N2_PRLOQO_CPP #define _L2N2_PRLOQO_CPP #include <cmath> #include <cassert> #include "l2n2_prloqo.hpp" #include "configuration.hpp" CL2N2_prLOQO::CL2N2_prLOQO(double lambda) : CL2N2_BMRMDualInnerS...
ALGO
0.999823
4.854435
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2015-04-19T15:35:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "10bee9a23...
a54b84f9-29b6-4938-a7e0-d167f3e2bc97
joachimverleysen/Graphics-Engine
src/Transformations.h
// // Created by joachimverleysen on 8/14/24. // #ifndef MYENGINE_TRANSFORMATIONS_H #define MYENGINE_TRANSFORMATIONS_H #include "Drawing3D.h" struct polars { double r; double theta; double phi; polars(double r, double theta, double phi) : r(r), theta(theta), phi(phi) {}; }; class Transformations { ...
ALGO
0.928506
5.811553
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2024-03-23T16:22:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "cc6633760...
e77ca7c6-265e-4a44-8f30-584f1fad35b5
Rutika-B/Recursion
R5_combinations.cpp
#include <bits/stdc++.h> using namespace std; void combination(int ind, int target, vector<int> &ds, vector<vector<int>> &ans, vector<int> &arr) { if (ind==arr.size()) { return; } if (target == 0) { ans.push_back(ds); // for (auto &t:ds) // { // cout<<t<<"...
ALGO
0.999965
5.558552
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-07-01T08:48: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": "bc475a603a20...
5ffe874d-09ff-4db5-9e37-d7f90afd6aea
r556a812/eecs268
Lab09/MazeWalker.cpp
/** * @file : MazeWalker.hpp * @author : <NAME> * @date : 2015.11.12 * Purpose: */ #include "MazeWalker.h" #include <stack> #include <queue> MazeWalker::MazeWalker(const char * const *mazePtr, int startRow, int startCol, int rows, int cols, Search searchChoice):m_startPos(startRow, startCol) { m_maze = mazePtr;...
ALGO
0.994977
5.208607
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-05-03T22:12: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": "e2cffec567...
cb56c02f-ccb4-4517-98b7-18e504086120
ishandutta2007/codeforces-i
i_love_dasha_karpenko/normal/1243/B2.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll> pp; #define forn(i,n) for(ll i = 1;i<=n;i++) #define fi first #define sc second #define pb push_back #define endl '\n' #define x1 dsfdsfdsfewewer #define y1 fdgretdfdsfgddsf const ll DIM = 2*(10e4)+7; const ll INF = 10e16; const ll...
ALGO
0.999932
3.66164
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:39: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": "532c1d0405ae...
75db9d11-5267-4c57-ab78-5dd058e94bdf
bapadapa/TIL
Algorithm/BaekJoon/Algo_CPP/unclassified/constantNum_2908.cpp
/* 문제 상근이의 동생 상수는 수학을 정말 못한다. 상수는 숫자를 읽는데 문제가 있다. 이렇게 수학을 못하는 상수를 위해서 상근이는 수의 크기를 비교하는 문제를 내주었다. 상근이는 세 자리 수 두 개를 칠판에 써주었다. 그 다음에 크기가 큰 수를 말해보라고 했다. 상수는 수를 다른 사람과 다르게 거꾸로 읽는다. 예를 들어, 734와 893을 칠판에 적었다면, 상수는 이 수를 437과 398로 읽는다. 따라서, 상수는 두 수중 큰 수인 437을 큰 수라고 말할 것이다. 두 수가 주어졌을 때, 상수의 대답을 출력하는 프로그램을 작성하시오. 입력 첫째 줄에 상근이가...
ALGO
0.999944
3.869201
{ "github_metadata": { "branch": "master", "commit_count": 153, "repo_created_at": "2021-05-24T06:11:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9399077...
68b52e70-995f-4002-b4a1-19479a7e259f
kingkong2004/LEDUCMANH_MONC
Chuong 3/Challege_3.2.cpp
#include <iostream> #include <iomanip> // Needed for formatting output using namespace std; int main() { // Constants for ticket prices const double CLASS_A_PRICE = 15.0; const double CLASS_B_PRICE = 12.0; const double CLASS_C_PRICE = 9.0; // Variables to store the number of tickets sold for each ...
ALGO
0.996821
5.412916
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2023-09-26T00:57: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": "cade950a3d...
7b059ec6-af61-4d9f-a8e1-0b68605ffb94
woow0n/algorithm
algorithm/SWEA/SWEA2477.cpp
#include <iostream> #include <vector> #include <queue> #include <cstring> using namespace std; int T, N, M, K, A, B; struct user { int name, time; }; int deskTm[11], repairTm[11]; user deskUsers[11], repairUsers[11]; int checkDATA[1010], checkDATB[1010]; queue<user> deskLine; // 줄서는 건 두개지 queue<user> re...
ALGO
0.999692
3.586283
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2023-03-01T09:15: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": "076d8b238cc...
1cff9421-c5dd-4a97-9be7-74c4aa131006
Eider1998/Graph-theory
驴友计划/main.cpp
#include<bits/stdc++.h> using namespace std; #define INF 0x3f3f3f //无穷大 struct node { int L; int W; }Map[3001][3001];//邻接矩阵 int path[3001][3001]; //记录各点的前驱顶点是什么 int D[3001][3001]; //记录各点之间最短路径长度 int weight[3001][3001]; //记录各点之间最少收费 void floyed(int n, int s, int d) { int i, j, k; for(i = 0; i < n; ...
ALGO
0.999927
3.918843
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-11-22T08:11:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad0dac81e...
7888ea4e-8718-4bd4-894f-6c6755dceb86
solve-boj/weekly-challenges
2021W33/HunRotation/boj_11054.cpp
/* 가장 긴 바이토닉 부분 수열 https://www.acmicpc.net/problem/11054 */ #include <cstdio> #include <algorithm> #include <vector> using namespace std; int N; vector<int> arr; int dp[1000]; int dp2[1000]; int f(int pos) { //printf("%d\n", pos); int res = 1; if (pos == 0) return dp[pos] = 1; if (dp[pos]) r...
ALGO
0.999984
4.329365
{ "github_metadata": { "branch": "master", "commit_count": 525, "repo_created_at": "2021-01-23T13:12:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "63641b858...
aa68620a-d6ad-433f-8ee8-3eaf6b6b00d5
ojaswiat/cf-ladder
800/1901A.cpp
#include <iostream> #include <algorithm> using namespace std; int find_max_distance(int a[], int n) { int max_distance = 0; for (int i = 0; i < n - 1; i++) { if (a[i + 1] - a[i] > max_distance) { max_distance = a[i + 1] - a[i]; } } return max_distance; } int m...
ALGO
0.999682
4.511099
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-05-02T06:07:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "24472d71e2f...
8b75d408-5e27-476f-a8b2-464d523afabd
ryoo0424/algorithm
practice/[BOJ] 16985_Maaaaaaaaaze.cpp
#include <cstdio> #include <cstring> #include <queue> #include <algorithm> using namespace std; typedef struct coord { int x, y, z; coord(int x, int y, int z) : x(x), y(y), z(z) {} } coord; int row[] = {0, 0, -1, 1}; int col[] = {1, -1, 0, 0}; int maze[5][5][5]; int check[5][5][5]; int tmp[5][5][5]; int ans = 98765...
ALGO
0.999938
3.81364
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2018-08-03T04:28: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": "04f9eff84...
fe8fa6ee-252c-40a5-a409-9d3bb852d031
zachmitch/foldArray
foldArray.cpp
#include <vector> #include <iostream> #include <string> class Fold { //Parameters: //array: original vector full of ints //runs: Number of times to fold array public: std::vector<int> foldArray(const std::vector<int> array, int runs) { //Copy of original array std::vector<int> normalArray; ...
ALGO
0.997743
4.451838
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-05-21T00:37: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": "68ff404d4c...
46e536cc-aaf6-4524-923e-ed3568e06f89
mit-han-lab/litepose
nano_demo/fast_utils/parse/find_peaks.cpp
#include "find_peaks.hpp" #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ? (a) : (b)) namespace trt_pose { namespace parse { void find_peaks_out_hw(int *count, // 1 float *val, // M float *tag, // M in...
ALGO
0.999132
6.20239
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-03-28T17:08:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 318, "forks": 40, "issues": 19, "pull_requests": 1 }, "file_meta": { "content_id": "c4c10934...
b20da280-dd3e-414b-a731-8128328910d7
LevinJ/Pedestrian-Detection-Project
libs/CImg/examples/edge_explorer.cpp
/* # # File : edge_explorer.cpp # ( C++ source file ) # # Description : Real time edge detection while moving a ROI # (rectangle of interest) over the original image. # This file is a part of the CImg Library project. # ( http://cimg.sourcefor...
ALGO
0.993541
6.79964
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2015-01-10T23:27:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 21, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "8a6ffcf...
a5457a92-5022-4c29-b683-60a1988eacbc
TISparta/online-judge-solutions
Codeforces/Round-440-Div2/D.cpp
// Constructive, Brute Force // 5 // 19-11-2020 #include <bits/stdc++.h> #define all(A) begin(A), end(A) #define rall(A) rbegin(A), rend(A) #define sz(A) int(A.size()) #define pb push_back #define mp make_pair using namespace std; typedef long long ll; typedef pair <int, int> pii; typedef pair <ll, l...
ALGO
0.999977
3.281173
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2017-09-10T04:52:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0fb4e7d...
8afae19d-44c0-42fe-9990-9058a86a62ec
alexcres/algorithms
src/tree/BTree.hpp
#pragma once // it's a type of self-balanced tree: all leaves appear in the same level // b <= number of children < 2b // b-1 <= number of keys < 2b-1 #include <vector> /* invariant: * every node has at most n children * a non-leaf node with k children contains k-1 keys * the root has at least two children if it...
ALGO
0.941328
3.616357
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-04-10T07:44: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": "26b3df18fb...
3309b1a4-29a6-47ea-8916-16a2e99bb84b
mertensblackfyre/solutions
Leet-Code/Backtracking/beautiful_subsets.cc
#include <iostream> #include <ostream> #include <vector> class Solution { public: int final = 0; bool print(std::vector<int> &perms, int k) { for (int i = 0; i < perms.size(); ++i) { for (int j = i + 1; j < perms.size(); j++) { if (abs(perms[i] - perms[j]) == k) return false; };...
ALGO
0.999752
5.118362
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2021-12-06T10:43: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": "949d4b6c...
4f2c41f2-90d4-41a6-b4f9-5534e1fc74c0
Vhvo-2004/TDA
20230708parte2/Exercicio1/mainHASH.cpp
#include <stdio.h> #include <stdlib.h> #include "hash.h" #include <string.h> int main() { TB_HASH tabela; PACIENTE p, *pr,p1; inicializahash(tabela); p1.cod = 1987; p1.nome = strdup("Soteldo"); p1.cpf = strdup("0000004"); p1.idade = 34; p.cod = 1291; p.nome = strdup("Aguinaldo"...
ALGO
0.987143
3.598601
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2023-05-14T15:22: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": "cb7d2732d70...
a5efa463-3b54-41e3-a58f-9fdeafadc0a5
rlaskarb09/AlgorithmProblemSolvingStrategies
PACKING/packing.cpp
#include <bits/stdc++.h> using namespace std; const int MAX_N = 1000; void setInsert(vector<int> &a, int idx) { int n = idx / 32; int m = idx % 32; a[n] |= (1 << m); } void setRemove(vector<int> &a, int idx) { int n = idx / 32; int m = idx % 32; a[n] &= ~(1 << m); } void setCopy(vector<int...
ALGO
0.999831
4.155853
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2020-10-16T05:57:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d365e15d04b...
c44f96ae-f185-4e63-a869-8e8be97349db
LevinJ/Pedestrian-Detection-Project
src/stereo_matching/ground_plane/BaseGroundPlaneEstimator.hpp
#ifndef BASEGROUNDPLANEESTIMATOR_HPP #define BASEGROUNDPLANEESTIMATOR_HPP #include "AbstractGroundPlaneEstimator.hpp" #include <boost/program_options.hpp> #include <boost/shared_ptr.hpp> namespace doppia { // forward declarations class DisparityCostVolume; class StereoCameraCalibration; class GroundPlaneMovingAvera...
ALGO
0.923472
7.093174
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2015-01-10T23:27:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 21, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "96011cb...
32a8e4dd-9273-4f64-890f-c19980e24439
sanonesan/computational_methods_labs
sem6/lab_5/src/include/Fred/Fred_schemes.hpp
#pragma once #include <cmath> #include <fstream> #include <iomanip> #include <iostream> #include <vector> #include "../../../../../sem5/SLE_methods/src/include/Solver_SLE.hpp" #include "../../../../../structures/linalg/Matrix_n_Vector.hpp" #include "../Class_Fred.hpp" template <typename T> void Fred_non_inv_quadratu...
ALGO
0.999904
4.336212
{ "github_metadata": { "branch": "master", "commit_count": 139, "repo_created_at": "2022-10-03T19:05: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": "bb7d7a47...
5efd24fe-6576-4c54-a7bd-bcfebba8b8c6
wliusjtu/Robust-Color-Guided-Depth-Map-Restoration
Code_RGDR/mexGetRelSmooth.cpp
#include<mex.h> #include<math.h> ///////////////////////////////////////////////////////////////////////// void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { double *Depth, *MinCoorX, *MinCoorY, *MaxCoorX, *MaxCoorY, *RS; double tempMin, tempMax, RelSmooth; ...
ALGO
0.999263
5.054822
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2017-07-03T05:01:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 54, "forks": 12, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "de0c2453...
e21be3ed-fe20-45d7-a842-ebb151f67406
lrvc3/LearnProgramming
OnlineJudges/Codechef/easy/The_Minimum_Number_Of_Moves.cpp
#include <bits/stdc++.h> using namespace std; // TLE // W1 = 0 W3 = 1000 W4=1000 // First main is my solution // Firstly whatever the problem statement suggests isnt necessarily the way to go ahead and solve, first check what should be the outcome. // Accordingly then try to formulate the solution. // Looking at my s...
ALGO
0.99996
4.673205
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2021-09-08T14:44: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": "a9fbd2d9ffd...
0d6cf418-bc76-4430-bded-ebb1d85af1a1
malavikarajeshvikraman/DS-basics
Trees/Problems/Sumatkthlevel.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.999835
5.150849
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2021-05-15T05:49: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": "d080e9b9273...
66f11282-ed3b-4d29-b140-a1cccc43909f
bvquoc/CP-Trainning-2021
0 - Contest 2020/VNOI Online 2021/z-Contestants/AG-11 Cao Thanh Hau/dhaka.cpp
#include<bits/stdc++.h> #define fi first #define se second using namespace std; const int N=2*1e5+5; const long long oo=1e18; typedef pair<long long, int> ii; int n, m, k, l, typ[N]; long long f[N][100]; vector<ii> ke[N]; void dij() { for (int i=1;i<=n;i++) { for (int j=0;j<(1<<k);j++) f[i][j]=+oo...
ALGO
0.999854
4.0012
{ "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": "01e75970...
c1669100-7cab-4664-9a6b-1f326c5e88a7
Mthrun/ScatterDensity
src/smooth1D_parallel.cpp
#include <RcppArmadillo.h> #include <RcppParallel.h> // [[Rcpp::depends(RcppArmadillo, RcppParallel)]] using namespace Rcpp; using namespace RcppParallel; // Parallel worker for row-wise or column-wise smoothing struct Smooth2DWorker : public Worker { const arma::mat& G; arma::mat& Z; const arma::mat& P_inv; ...
ALGO
0.998005
7.065883
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-05-23T11:56: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": "2330b80b230...
d133a8ab-ba16-44ea-93d8-053ccd9b80da
shreyamahajanind-25/SAREGAMA-CARVAAN-
Source.cpp
#include<iostream> #include<fstream> #include"Header3.h" #include"Header1.h" #include"Header2.h" #include"Header.h" #include"Header4.h" #include<stdlib.h> #include<windows.h> using namespace std; unsigned char ld = 222; void PrintLoading() { system("COLOR FC"); cout << "\n\n\n\n\n\n\n\n\n\t\t\t\tLoading Music Play...
TOOL
0.907825
3.075562
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-07-19T07:58: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": "c9857b30ba21...
3c0fc94b-e115-4b8a-b273-67b63c297425
MrGxsheng/MyProblem
河北ccpc省赛7-10.cpp
#include <bits/stdc++.h> #define debug puts("-----") #define eps (1e-8) #define inf (1<<30) #define fi first #define se second using namespace std; typedef long long LL; typedef pair<int,int> PII; const int N = 1000010; int n,m; void solve(){ string s; cin >> s; if(s == "gold") cout << "Au" << endl; else i...
ALGO
0.964503
3.424037
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2023-02-17T14:30: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": "9fa6f189cc3...
a74491a1-7b2f-46d1-8195-7379d1a2bda7
prabhjotschugh/DSA-Solutions
1367-linked-list-in-binary-tree/1367-linked-list-in-binary-tree.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ /** * Definition for a binary tree node. * struc...
ALGO
0.999959
5.690145
{ "github_metadata": { "branch": "main", "commit_count": 2956, "repo_created_at": "2022-11-28T11:40:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "85791231...
2b24af39-247c-4a65-9dfa-e8447c3fbe82
chrisidefix/nurbs
nurbs/tri_spline.cpp
/*===================================================================== File: tri_spline.cpp Purpose: Revision: $Id: tri_spline.cpp,v 1.3 2002/05/17 18:24:21 philosophil Exp $ Author: <NAME> (3 Oct, 1996) Modified by: Copyright notice: Copyright (C) 1996-1997 <NAME> ...
ALGO
0.921074
4.538073
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2013-07-15T11:03:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ea4fa51a...
1e0ffc83-e9a1-45b2-a4fb-0398a374a28f
hiding-name/ICS3U-2-04-CPP
pizzaCalculator.cpp
// Copyright (c) 2019 myself All rights reserved. // // Created by: <NAME> // Created on: Sept 2019 // This is program calculates price of pizza #include <iostream> int main() { // This will calculate price pizza const float MATERIALS = 0.5; const float RENT = 1; const float LABOUR = 0.75; const f...
TOOL
0.949693
4.474961
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-09-25T21:46: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": "e5695a2e42...
0a3e7c5a-f022-48ca-a9af-5076043cca4e
livecode/livecode
engine/src/md5.cpp
/* Copyright (C) 2003-2015 LiveCode Ltd. This file is part of LiveCode. LiveCode is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v3 as published by the Free Software Foundation. LiveCode is distributed in the hope that it will be useful, but WITHOUT ANY WA...
ALGO
0.993687
6.746789
{ "github_metadata": { "branch": "develop", "commit_count": 29436, "repo_created_at": "2013-04-10T00:15:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 505, "forks": 222, "issues": 0, "pull_requests": 189 }, "file_meta": { "content_id": "...
f9142af7-a4cc-46cb-b5c9-f4381c6e6c5f
Q-KWAK/UE5-Cplus-2
highlowgame/highlowgame.cpp
#include <stdio.h> #include <string> #include <iostream> #include <fstream> #include <vector> #include <sstream> #include "card.h" #include <random> /* * 1. 52개의 카드로 진행, 52개의 카드는 무작위로 셔플 * 2. 게임이 시작되면 카드 하나를 오픈합니다 * 3. 플레이어는 다음 카드가 오픈된 카드보다 높은 카드인지 낮은 카드인지에 대해 배팅 * 4. 다음 카드를 올픈하고 높은지 낮은지에 대한 선택이 맞으면 승리 틀리면 패배 * 5. 카드는...
TOOL
0.997007
3.94524
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2023-09-21T06:38: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": "6ba7d8f6331...
bbb71ed2-1b63-481d-8d6b-0210d6af26d5
minje46/Problem_Solving
Baekjoon/Exhaustive Search/1707_bipartite_graph.cpp
#include<iostream> #include<algorithm> #include<vector> #include<memory.h> #define MAX 20001 using namespace std; int V, E; // V = The number of vertex. E = The number of edges. vector<int> graph[MAX]; // The memory of graph. int visit[MAX]; // The memory of whether visited or not. bool Bipartite() // To fig...
ALGO
0.999967
5.56096
{ "github_metadata": { "branch": "master", "commit_count": 292, "repo_created_at": "2019-07-22T14:01:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aaa4dd66...
a4f203f1-c88e-48be-b9d2-180aa0ee1df8
brandoz2255/DevOps-algo
homework1/magic.cpp
#include "magic.h" #include <iostream> #include <cstdlib> #include <iomanip> #include <vector> #include <stdexcept> void magic_square(int size) { if (size <= 0 || size % 2 == 0) { throw std::invalid_argument("Size must be a positive odd number!!"); } std::vector<std::vector<int>> dynamicGenerate...
ALGO
0.997086
6.089234
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2024-09-07T02:34:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "27c153e67de...
c0f23815-5cbf-48a8-8e79-faffb144a211
saran1522/DSA
92-reverse-linked-list-ii/92-reverse-linked-list-ii.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* reverseBetw...
ALGO
1
5.601593
{ "github_metadata": { "branch": "main", "commit_count": 1004, "repo_created_at": "2022-04-01T17:02: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": "c7eade085...
4d57f488-e496-435f-81f3-8b027a6dcd64
stanfordhpccenter/HTR-solver
src/Utils/PointDomain_helper.hpp
// Copyright (c) "2019, by Stanford University // Developer: <NAME> // Affiliation: Center for Turbulence Research, Stanford University // URL: https://ctr.stanford.edu // Citation: <NAME>., <NAME>., and <NAME>. (2020). // HTR solver: An op...
TOOL
0.924542
6.616778
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-03-24T10:35:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 77, "forks": 24, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "ac07597bd...
a72e7791-faa3-43dc-8664-c54a4258632f
zhangjunxiongjie/sundry
VS-project/Arithmetic1/BinarySearch/binary.cpp
//这个项目用于建立一个应用二分查找的项目。 //程序建立有序序列,因为是有序的那么无可避免的使用二分查找就是一个不二的选择 //程序持续建立有序数组,在加入新数值时使用二分查找(这里实现多种查找算法)查找插入位置。 //输入任意个数的任意数字然后以多余空格或者换行结束输入。 //实现了多种数值查找算法(顺序查找,级数查找,二分查找)。 //始终都存在输入几个数之后就不能再输入的问题???为什么怎么回事??? //问题出在二分查找返回插入索引那!!! //问题已解决是二分查找那可能的情况比较多有几种情况没有想到! //实现上有三个调用函数,一个用于查找插入位置,另一个用于将后续数值整个后移,一个用于输出整个序列。 //加了一...
ALGO
0.999914
3.629495
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2020-06-23T09:12:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1577b224e...
85a455e6-24b2-47fa-aca6-ea036d6ba1a2
plenilune3/problem_solving_cpp
beakjoon/삼성 SW 역량 테스트 기출 문제/3190_뱀.cpp
#include <iostream> #include <queue> using namespace std; const int MAX = 102; const int dx[] = { 0, 1, 0, -1 }; const int dy[] = { 1, 0, -1, 0 }; int N, K, L; bool board[MAX][MAX]; bool visited[MAX][MAX]; queue< pair<int, int > > q; queue< pair<int, char> > d; int main(int argc, char const *argv[]) { ios_base:...
ALGO
0.999849
3.882888
{ "github_metadata": { "branch": "master", "commit_count": 710, "repo_created_at": "2020-04-06T05:39: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": "a250df9f...
500c1374-4788-43c9-9dab-fed3877a8f86
ph4nt0mgui1d/Learning-DSA
Hashing/Unordered_map.cpp
// #include <bits/stdc++.h> // using namespace std; // int main(){ // unordered_map <string,int> m; // m["gfg"]=20; // m["ide"]=30; // m.insert({"courses",15}); // if(m.find("ide")!=m.end()) // cout<<"Found"; // else // cout<<"Not Found "; // cout<<endl; ...
ALGO
0.991565
4.605357
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2022-10-05T16:19: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": "43b5eeb6b...
91272423-a1e3-4d8c-9d9f-ade0724a3299
RobotLocomotion/drake
multibody/plant/compliant_contact_manager.h
#pragma once #include <memory> #include <type_traits> #include <utility> #include <vector> #include "drake/common/default_scalars.h" #include "drake/common/drake_copyable.h" #include "drake/common/eigen_types.h" #include "drake/geometry/scene_graph_inspector.h" #include "drake/multibody/plant/deformable_driver.h" #in...
ALGO
0.905476
7.629188
{ "github_metadata": { "branch": "master", "commit_count": 33726, "repo_created_at": "2014-01-26T16:11:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3630, "forks": 1305, "issues": 690, "pull_requests": 46 }, "file_meta": { "content_id":...
f77eb69a-6a57-47a0-a155-feba52053f21
Michicosun/Algorithms
cartesian_tree.cpp
mt19937 mt_rand(42); struct node{ int data, y, size; bool reversed; int summ; node * left; node * right; node(int data = 0){ this->data = data; this->summ = data; this->y = mt_rand(); this->size = 1; this->reversed = false; this->left = nullptr; ...
ALGO
0.999969
4.228215
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2021-02-13T15:35: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": "1e4169a262...
3af0fce7-da84-4002-a4d0-0e1acbcd2cad
mateusza-szkolenia/2020-08-alx-cpp
szablony/nauka1.cpp
#include <iostream> class Czlowiek { public: std::string imie; double wzrost; Czlowiek( std::string i, double w ): imie(i), wzrost(w) { } bool operator < ( Czlowiek & c ){ if ( this->wzrost < c.wzrost ){ return tru...
ALGO
0.99827
4.774093
{ "github_metadata": { "branch": "master", "commit_count": 144, "repo_created_at": "2020-08-22T09:42:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "46502a00c...
f863a748-76c5-4e20-b445-fd1f6db74b38
for-l00p/Competitive-Programming-1
solutions/cses_solutions/introductory problem/two_sets.cpp
// Problem statement @: https://cses.fi/problemset/task/1092/ #include <bits/stdc++.h> using namespace std; # define ll long long int # define ld long double #define fin0(i,a,b,c) for(int i=a;i<b;i+=c) #define fin1(i,a,b,c) for(int i=a;i<=b;i+=c) #define fde0(i,a,b,c) for(int i=a;i>b;i-=c) #define fde1(i,a,b,c) for(...
ALGO
0.999922
3.451379
{ "github_metadata": { "branch": "master", "commit_count": 62, "repo_created_at": "2020-08-04T18:10:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ffc3d6c8c...
d2409b8d-6ec5-4c8c-9436-60775f783d6f
Clqsin45/acmrec
图论/图论疯狂500题/最小生成树/HDU 1102 Constructing Roads.cpp
#include <cstdio> #include <cstring> #include <algorithm> #include <iostream> using namespace std; #define N 102 #define M #define LL __int64 #define INF 0x3f7f7f7f int d[N], f[N][N], n, ans; bool vis[N]; void prim(){ int i, j, now, loc; memset(vis, false, sizeof(vis)); //printf("!!%d\n",f[1][3]); f...
ALGO
0.999928
3.292586
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-11-28T03:37: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": "8690081952...
d48bc379-6664-4b22-8196-af8fe33a57d9
mrf2/uvaCode
C++/Accepted/10141_RequestForProposal.cpp
#include <iostream> #include <string> #include <algorithm> struct PName { int requirement; double price; std::string name; }; std::string arr[1010]; PName pArr[1010]; int R, P, best; bool cmp(const PName &x, PName &y) { if (x.requirement == y.requirement) return x.price < y.price; return x.requirement > y.re...
TOOL
0.979245
3.612597
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-07-07T15:42:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a99ee5855f...
935f3c6e-f081-48ac-9e04-32e95ce6109d
me-aashish/Garbage_Cpp_Repo_Can-be-useful-
binarySearch.cpp
#include<bits/stdc++.h> using namespace std; #define loop(i,a,b) for( int i = (a); i<=(b); i++) int binarySearch( int *arr, int n, int target){ int lo = 0, hi = n-1; while( lo <= hi ){ int mid = lo+((hi-lo)/2); if( arr[mid] == target ) return mid; else if( arr[mid] > target ) { hi = mid - 1; } ...
ALGO
0.999986
3.846527
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-07-18T06:47: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": "fea18e12f2...
ee47a977-f376-448e-be65-9208be449c67
casper-auto/CasperAuto
src/planning/autoware_op_planner/op_planner/src/BehaviorStateMachine.cpp
/// \file BehaviorStateMachine.cpp /// \author <NAME> /// \brief OpenPlanner's state machine implementation for different driving behaviors /// \date Jun 19, 2016 #include "op_planner/BehaviorStateMachine.h" #include "op_utility/UtilityH.h" #include <iostream> using namespace UtilityHNS; namespace PlannerHNS { Be...
ALGO
0.991897
4.002911
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2021-09-25T19:00:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 70, "forks": 23, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb2d43f00c...
60a69375-1b59-4362-bc57-9e52358bced8
hallamlab/LAST-Plus
src/AlignmentPot.hh
// Copyright 2008 <NAME> // This struct holds alignments, and includes a procedure to // non-redundantize alignments that share endpoints. #ifndef ALIGNMENTPOT_HH #define ALIGNMENTPOT_HH #include "Alignment.hh" #include <algorithm> // sort #include <vector> namespace cbrc{ struct AlignmentPot{ typedef std::vecto...
ALGO
0.998315
5.919789
{ "github_metadata": { "branch": "master", "commit_count": 157, "repo_created_at": "2015-06-25T01:01:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 19, "forks": 3, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "827ebb0c...
b65e12ab-74db-47d9-8f12-d750876aa05b
dgossow/daft
eval/descdist.cxx
#include <mex.h> #include <math.h> // This mex function implements the equivalent of: // // function y = example_mat(x) // y = 2 * x + 1; // return // [y, z] = foo(a, b, c) // // nrhs = 3 // a : prhs[0] // b : prhs[1] // c : prhs[2] // // nlhs = 2 // y : plhs[0] // z : plhs[1] void mexFunction(int nlhs,...
ALGO
0.999053
4.640071
{ "github_metadata": { "branch": "master", "commit_count": 221, "repo_created_at": "2012-07-02T14:40:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 2, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "064d1bf...
06c94b1f-d4d0-484c-ace0-deb88d1c8d51
tinkalkumar007/DSA
binary_tree_from_string.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: int val; Node* left; Node* right; Node(int data){ val=data; left=NULL; right=NULL; } }; int partition(string s){ int n=s.length(); int count=0; for(int i=0;i<n;i++){ if(s[i]=='('){ ...
ALGO
0.999924
4.079383
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-09-24T05:21: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": "675d1fcf0c...
90c04605-6f33-4b35-9064-aad5ec0ebe80
jdvillamin/TAMa-2024
I/I4.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 998244353; ll power(ll b, ll e) { b %= MOD; ll result = 1; while (e > 0) { if (e & 1) result = result * b % MOD; b = b * b % MOD; e >>= 1; } return result; } ll inv(ll a) { return a <= 1 ? a : MOD - (MOD / a) * inv(MO...
ALGO
0.99997
5.547398
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-11-05T03:22: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": "76ecf66d5b1a...
7777bf53-bcc3-4960-a227-3bf8e2a293c3
riccardovalencia/MyTensorNetworkLib
spin_boson/TEBD_testing.cc
#include "TEBD_testing.h" #include <itensor/all.h> #include <iostream> #include <math.h> #include <complex> using namespace std; using namespace itensor; // Rydberg Hamiltonian - we keep up to nearest neighbor interactions vector<MyBondGate> gates_rydberg_up_to_VNN_testing(const SiteSet sites , const vector<do...
ALGO
0.998739
3.499575
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-10-30T20:37: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": "b6056864b9a6...
5f4a042f-f6d0-4b7c-971b-12ccf8083378
DonghyungKo/cpp_study
inflearn/inflearn/ex29_배열과_포인터_종합문제_01.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <stdio.h> int main(void) { /* 100개 이하의 정수를 입력받아 첫 줄에 짝수 번째 숫자들을 순서대로 출력하고, 다음 줄에 홀수 번째 숫자들을 순서대로 출력하는 프로그램을 만들어 보세요. */ int arr[100]; int length = 0; // 사용자에게 숫자를 입력받음 for (int i = 0; i < 100; i++) { std::cout << "숫자를 입력하세요. 그만하시려면 0을 입력하세요 : ";...
ALGO
0.998924
4.250192
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-02-15T11:23: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": "46f4c4cfc...
330c47d0-1683-4846-aa8f-e0a5cce48788
UAT-MS549/MS549-Assignment-3.1
main.cpp
#include <iostream> #include <string> #include <chrono> #include <vector> #include "functions.h" /* * <NAME> * MS549 * Estimated time:Should be less than an hour, since most of it bulds on previous work. * Actual time: */ using namespace std; int main() { auto startHigh = std::chrono::high_resolution_clock::now(); ...
ALGO
0.999073
5.45704
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-12-01T21:27:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4732296916...
a5539265-d210-4e0e-ade7-121255d21a83
vidish4/cp
Search/Medium/Search in Rotated Sorted Array II (nicee solution).cpp
There is an integer array nums sorted in non-decreasing order (not necessarily with distinct values). Before being passed to your function, nums is rotated at an unknown pivot index k (0 <= k < nums.length) such that the resulting array is [nums[k], nums[k+1], ..., nums[n-1], nums[0], nums[1], ..., nums[k-1]] (0-index...
ALGO
0.999994
6.200162
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2022-07-29T19:50:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12ee6149cf1...
1054a488-20d5-4cd2-8866-b8de3ff1b8af
asiopueo/SFND_Lidar_Obstacle_Detection
src/quiz/cluster/kdtree.h
/* \author <NAME> */ // Quiz on implementing kd tree #include "../../render/render.h" inline float euclDist(std::vector<float> X, std::vector<float> Y) { return sqrt(pow((X[0]-Y[0]),2) + pow((X[1]-Y[1]),2)); } // Structure to represent node of kd tree struct Node { std::vector<float> point; int id; Node* left;...
ALGO
0.997884
4.883609
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2020-03-10T11:30:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "961e19cd1...
e2984677-a4e7-42ad-a403-71c88337463e
hkcs1206/OACP-Assignment
Assignment 7/15 Brief Words/BriefWords.cpp
/* Problem Name: Brief Words Author: <NAME> */ #include <bits/stdc++.h> using namespace std; #define int long long #define MOD 1000000007 #define vll vector<int> // Comment the following function if all short forms for a word are not required to be generated. vector<string> generateShortForms(const string& word) { ...
ALGO
0.999958
4.76691
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-03-12T11:53: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": "35af2ba1f26b...
a3db0879-3036-42ff-9ea0-7bea3e191ebc
UREKA-Algorithm-Study/ParkYeJin
Programmers/해시/42579 베스트앨범.cpp
#include <string> #include <vector> #include <map> #include <iostream> #include <algorithm> using namespace std; // 고유번호, 재생 bool cmp(pair <int, int> &p1, pair <int, int> &p2) { if (p1.second == p2.second) return p1.first < p2.first; return p1.second > p2.second; } vector<int> solution(vector<string> genres, ...
ALGO
0.999936
5.067755
{ "github_metadata": { "branch": "main", "commit_count": 146, "repo_created_at": "2024-06-13T12:18:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e767468297e...
3431194f-6792-4ea4-8266-323f4e51583a
ndthanh2605/LeetcodeCpp
BinarySearch/300. Longest Increasing Subsequence - LIS/300. Longest Increasing Subsequence - LIS.cpp
#include <iostream> #include <vector> #include <queue> #include <stack> #include <unordered_map> #include <functional> #include <numeric> using namespace std; class Solution { public: int lengthOfLIS(vector<int>& nums) { int n = nums.size(); if (n == 1) return 1; vector<int> ...
ALGO
0.99997
5.591036
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2024-09-28T15:50: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": "4347671ee30...
9f1d5b5e-a935-4f36-b042-22ff7320c774
kennyalive/ai
ai4/main.cpp
#include <iomanip> #include <iostream> #include <random> #include <vector> const int input_dim = 1; const int hidden_size = 10; const int output_dim = 1; const int num_epochs = 1000; const int num_samples = 500; const float learning_rate = 0.001f; // 0.001 is good for Adam, 0.1 is better for SGD float tanh_derivative...
ALGO
0.992378
6.014003
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2024-12-08T17:09: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": "f70d8ea427...
87238f38-2ef5-4752-8f43-3aed4ff5652c
SourDumplings/CodeSolutions
OJ practices/LeetCode题目集/532. K-diff Pairs in an Array(easy).cpp
/* * @Author: SourDumplings * @Date: 2019-10-02 08:46:04 * @Link: https://github.com/SourDumplings/ * @Email: <EMAIL> * @Description: https://leetcode.com/problems/k-diff-pairs-in-an-array/ */ class Solution { public: int findPairs(vector<int> &nums, int k) { int res = 0; if (k == 0) ...
ALGO
0.999877
6.143885
{ "github_metadata": { "branch": "master", "commit_count": 548, "repo_created_at": "2017-11-11T08:59:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 5, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "6e92effa...
66b89aa4-1966-4544-ae31-a5e8860be69c
BackupTheBerlios/utgs-svn
version1/Useless/Util/Storage/SortedVector.h
#ifndef __INCLUDED_USELESS_SORTED_VECTOR_H__ #define __INCLUDED_USELESS_SORTED_VECTOR_H__ #include "Useless/Util/Storage/StupidVector.h" #include <algorithm> namespace Useless{ /*! \ingroup gStorage * It's vector that is suposed to be allways sorted. * \warning Insertion time is complete-linear */ template< clas...
ALGO
0.994603
6.055317
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2015-08-16T14:36:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2db5138c...
2fd1be5a-36d1-4b81-af15-f25689245f7e
sladewinter/CompetitveProgramming
Ch 3 Paradigms/Dynamic Programming/Top Down/uva-10496-TravellingSalesman.cpp
#include <iostream> #include <cstring> using namespace std; int memo[11][2048]; int beepers[11][2]; int dist[11][11]; int beep; int tsp( int pos, int mask ) { int &ans{ memo[pos][mask] }; if( ans != -1 ) return ans; if( mask == 0 ) ans = dist[pos][0]; else { a...
ALGO
0.999314
3.671417
{ "github_metadata": { "branch": "master", "commit_count": 159, "repo_created_at": "2020-04-12T13: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": "b834164d...
1693d0a8-2df6-4bf5-b7ce-32f15883cd1f
gbfllp/hospitavl
index.cpp
#include <iostream> #include <string> using namespace std; // Estrutura para armazenar os dados do paciente struct Patient { int id; int priority; string name; string phone; string history; }; // Nó da árvore AVL struct AVLNode { Patient patient; AVLNode *left; AVLNode *right; int ...
ALGO
0.999156
6.081289
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-02-15T16:20: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": "32423565a2eb...
9b8cc6e5-743b-4c68-b108-663d949e5410
devLupin/algorithm
백준/Gold/20183. 골목 대장 호석 - 효율성 2/골목 대장 호석 - 효율성 2.cc
#include <bits/stdc++.h> using namespace std; using ll = long long; using pli = pair<ll, int>; const ll INF = 0x7f7f7f7f7f7f7f; int N, M, A, B; ll C, Cost[100'002], C_route[100'002]; vector<pli> adj[100'002]; int main() { ios::sync_with_stdio(0); cin.tie(0); cin >> N >> M >> A >> B >> C; fill(Cost+1, Cost+N+1,...
ALGO
0.999989
3.91249
{ "github_metadata": { "branch": "main", "commit_count": 761, "repo_created_at": "2023-02-10T10:50:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 51, "pull_requests": 0 }, "file_meta": { "content_id": "16c544b5a...
5fcf9743-2443-4b42-9fd2-42d6eadb6283
JimmieKJ/unrealTournament
Engine/Plugins/Experimental/Phya/Source/Phya/Private/PhyaLib/src/Contact/paGridFun.cpp
// // paGridFun.cpp // // Grid like excitation. // - It repeats consistently when r reverses. // - The discontinuities remain hard even at low rates. // This is an approximation to resampling a very high initial bandwidth, // And can generate more realistic surface excitations than linear resampling. #include "CoreMin...
ALGO
0.973862
4.766406
{ "github_metadata": { "branch": "clean-master", "commit_count": 20204, "repo_created_at": "2016-12-26T05:55:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 147, "forks": 91, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id"...
e5555821-9601-40d7-92a9-efc6143f3c2e
ganeshkumarka/Design-Analysis-of-Algorithms
DAA/CoinProblem/CoinCollectingProblem.cpp
#include <iostream> using namespace std; const int MAX_ROWS=10; const int MAX_COLS=10; int maxCoinsCollected(int C[MAX_ROWS][MAX_COLS], int rows, int cols) { int F[MAX_ROWS][MAX_COLS]; F[0][0] = C[0][0]; for (int i = 1; i < rows; i++) { F[i][0] = F[i - 1][0] + C[i][0]; } for (i...
ALGO
0.999837
5.717475
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-09-20T09:21:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "884d82320414...
61525487-88a1-40fe-8f3c-e15c0575c8f8
zhangxu128/Cplusplus
运算符重载和虚函数的小应用/运算符重载和虚函数的小应用/运算符重载和虚函数的小应用.cpp
#include<iostream> using namespace std; //运算符重载和虚函数 //内容提要 //使用虚函数编写程序求球体和圆柱体的体积及表面积。由于球体和圆柱体都可以看作由圆继承而来, //所以可以定义圆类Circle作为基类。在Circle类中定义一个数据成员radius和两个虚函数area()和volume()。 //由Circle类派生Sphere类和Column类。在派生类中对虚函数area()和volume()重新定义 //分别求球体和圆柱体的体积及表面积。 //基本要求 //重载相应的运算符并编写程序,能运用虚函数编写程序测试并提交程序。 const double PI = 3.14; ...
TOOL
0.976188
4.647958
{ "github_metadata": { "branch": "master", "commit_count": 395, "repo_created_at": "2018-12-03T14:35: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": "afc41617...
0b65b167-82bd-4e2a-84c4-8b61d637e675
LeeKwang-min/Baekjoon-Algorithm
문제 풀이/BFS/5014.cpp
/* 작성자 : 이상수 일시 : 2021.03.29 제목 : 스타트링크 - 5014 풀이 : BFS탐색 문제이다. 1차원 공간에서의 BFS탐색 문제여서 매우 간단한 문제이다. 하지만, 기존의 BFS 코드 작성 방식이 이 문제에서는 올바르게 작동하지 않는다. 평소 작성 방식은 코드가 만족하지 않으면 continue를 통해 반복문을 진행하는 방식이였다. 이 방식은 상, 하, 좌, 우 4가지 방향에 대해서 하나의 반복문을 통해 진행하며 이 반복문 안에서 continue를 진행하기 때문에 문제가 되지 않았지만 이 문제의 ...
ALGO
0.999767
3.959736
{ "github_metadata": { "branch": "main", "commit_count": 294, "repo_created_at": "2021-01-27T12:52: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": "2b08dfb3a2...
958b7732-0533-4d92-9fbe-d4df28965024
Allyday/T2005E_LBEP
lesson-6/homework/lesson-6_1.cpp
#include <stdio.h> int main() { int n; printf("Chương trình nhập vào mảng n số nguyên, tìm số lẻ cuối cùng của mảng \n"); printf("Nhập n: "); scanf("%d", &n); int nums[n]; int lastOdd; for (int i = 0; i < n; i++) { printf("Nhập số thứ %d: ", i + 1); scanf("%d", &nums[i]); } for (int i = ...
ALGO
0.999103
3.529311
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2020-06-03T11:06: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": "1367f4afb...
fb2ac4d1-ae63-43d2-bc29-e12efb7a9964
BIJOY-SUST/Competitive-Programming
Competitive Programing Problem Solutions/Graph Theory/Articulation Points and Bridges/315 - Network-uva (1).cpp
#include<bits/stdc++.h> #define mx 110 //#define mod 1000000007 //#define pi 2*acos(0.0) //#define pp pair<int,int> //#define ll long long int #define me printf("BIJOY\n"); //#define one(n) __builtin_popcount(n) //#define ull unsi...
ALGO
0.999665
4.049947
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2019-08-02T06:56:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e113cec95...
b5dedbc7-d30a-4fc6-a248-cf0b3d159aaf
charliegeannew/codeSpaceGit
leetcode/unfinish/47.cpp
/************************************************************************* * File Name: 47.cpp * Creat Time: 2021年09月24日 星期五 21时13分18秒 * Author :Charliegean * Mail :<EMAIL> *************************************************************************/ #include <iostream> #include <vector> #include <string> #include <stdlib...
ALGO
0.99999
4.660444
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2021-07-12T02:38: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": "20bd73391...
a217c818-d354-4036-b9ef-4660744bfb44
Mehdibenhadjkhelifa/ChessClone
ChessClone/src/Bishop.cpp
#include "ChessCore.h" #include "Bishop.h" #include <iostream> #include <algorithm> extern Board ChessBoard; Bishop::Bishop(int PosX, int PosY, bool color) :Piece(PosX, PosY, color) { CalculatePossibleMoves(); } void Bishop::CalculatePossibleMoves() { ClearPreviousPossibleMoves(); int i(PiecePosX), j(PiecePo...
ALGO
0.968387
3.220577
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2022-09-15T07:21:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "93af87f4e68...
ec73d452-a7ef-4905-a44b-2047b30ddcc3
gyk/TrivialSolutions
LongestSubseq/longestSubseq.cc
/* Longest Increasing Subsequence Implemented according to the USACO dynamic programming tutorial. */ #include <limits> #include <vector> #include <algorithm> #include <iostream> template <typename T> int longest_subseq1(const T& a, int n) { // the length of longest sequence that ends here int* ends_here = new int[...
ALGO
0.999872
4.719203
{ "github_metadata": { "branch": "master", "commit_count": 247, "repo_created_at": "2014-03-29T04:38:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "05737435...
4846dcd5-6f91-411a-93a4-539252125653
yuebaii/Data-Structure
test09_23A(线性表、栈)/线性表/dlist.cpp
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include "dlist.h" //初始化 void InitList(DList plist) { assert(plist != NULL); plist->next = NULL; plist->prio = NULL; } //头插,违背生活规律,尽量少用 bool Insert_head(DList plist,int val) { DNode *p = (DNode *)malloc(sizeof(DNode)); p->data = val; p->next = plist->n...
ALGO
0.999286
4.221265
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-03-30T06:32: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": "325079f545...
cc216e6d-248c-45fc-b366-e1af88b22b3c
Keyur1284/Strivers-SDE-Sheet-2023
Day 12 Heaps/Merge k Sorted Arrays.cpp
// Problem Link :- https://www.geeksforgeeks.org/problems/merge-k-sorted-arrays/1 // Solved using priority_queue // Time Complexity :- O(nlogn) // Space Complexity :- O(n) //User function Template for C++ class Solution { public: //Function to merge k sorted arrays. vector<int> mergeKArrays(vector<vecto...
ALGO
0.99999
6.144876
{ "github_metadata": { "branch": "main", "commit_count": 255, "repo_created_at": "2023-06-05T13:34:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1a4166bd0...
02f91205-8e80-4f44-9da9-e116782f8f2f
sk3316/DAA-codes
love babbar/swthcse.cpp
#include<bits/stdc++.h> using namespace std; int main() { // int num = 3; // cout<<endl; // switch (num) // { // case 1: // cout<<"first"<<endl; // break; // case 2: // cout<<"second"<<endl; // break; // default: // cout<<"it is default case"<<en...
ALGO
0.981077
3.263925
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2023-08-03T05:46:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "78ada2b515a...
858dfb80-af53-4fb6-8e55-e408c79425b7
InwooLeeme/algorithms-implementation
ETC/RadixSort.cpp
#pragma GCC target("avx,avx2,fma") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #define fastio ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) using namespace std; namespace kx { //reference : https://github.com/voutcn/kxsort static const int kRadixBits = 8; stat...
ALGO
0.999364
3.767867
{ "github_metadata": { "branch": "main", "commit_count": 127, "repo_created_at": "2022-05-16T12:47:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2c865ad5e...
80c93d0c-6e2c-4052-9626-ef045f94ace6
aquaEngineer/atcoder
abc-188/a.cpp
#include <bits/stdc++.h> // #include <atcoder/all> using namespace std; // using namespace atcoder; using ll = long long; #define rep(i,a,b) for(ll i=(a); i<(b); i++) #define YES cout << "YES" << endl; #define NO cout << "NO" << endl; #define yes cout << "Yes" << endl; #define no cout << "No" << endl; #define pai 3.1...
ALGO
0.999931
3.24216
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2020-03-07T17:58:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68e507460...
079187d5-3e78-43a0-b03c-acb249ceb03d
Yu-Xing-Hai/Thread-Pool
codes/KernelModuleDesign/include/TasksQueue.h
// #ifndef INCLUDE_TASKSQUEUE_H // //防止头文件之间相互包含导致的无限递归,如果未定义该宏,则编译以下内容 // #define INCLUDE_TASKSQUEUE_H // 定义宏标记 #pragma once // 编译器特性,效果相同但无需手动定义宏 /* [第二版]C++线程池实现 当前目标: 1. 实现有界任务队列 【√】 */ #include <atomic> #include <condition_variable> //线程同步工具,用于阻塞或唤醒线程 #include <functional> //通用函数包装器的库 #include <iostream...
TOOL
0.947964
5.351683
{ "github_metadata": { "branch": "YuXingHai", "commit_count": 6, "repo_created_at": "2025-04-17T02:21: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": "f6f01bf...
81f9798e-ebce-46f8-9c2e-dcf7100d0d06
hyk3633/IOCPServer
source/Pathfinder/PathFinder.h
#pragma once #include <cmath> #include <vector> #include <string> #include <fstream> #include <iostream> #include "../Structs/Pos.h" #include "../Structs/Vector3D.h" using namespace std; #define NW normalWeight #define HW heavyWeight const int normalWeight = 30; const int heavyWeight = 42; struct GridInfo { Pos po...
ALGO
0.995125
4.371054
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2024-02-01T13:32: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": "9e5c6082374...
369c5a45-dd0b-45c3-b682-93585c3f5a89
HPSSA-LLVM/HPSSA-LLVM
BBProfiler/tests/test1_simple.cpp
#include <iostream> // limit = 100 introduced no new tau's // Caloric connectors were identified // but no phi's were present using namespace std; int main() { int a, b; cin >> a >> b; if (a > 5) { a = a * 9 + 6; b = b * 3 + 1; } else { a = a + 8; b = b + 9; } a = a + 7; b = b * 6; ...
ALGO
0.999853
3.526872
{ "github_metadata": { "branch": "main", "commit_count": 198, "repo_created_at": "2021-06-03T13:21:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a89295e791...
5f763055-be71-4467-b7ff-352e3e34a4f3
stan-dev/math
stan/math/rev/fun/lambert_w.hpp
#ifndef STAN_MATH_REV_FUN_LAMBERT_W_HPP #define STAN_MATH_REV_FUN_LAMBERT_W_HPP #include <stan/math/rev/core.hpp> #include <stan/math/rev/meta.hpp> #include <stan/math/rev/fun/exp.hpp> #include <stan/math/prim/meta.hpp> #include <stan/math/prim/fun/boost_policy.hpp> #include <stan/math/prim/fun/lambert_w.hpp> namespa...
ALGO
0.994497
6.735194
{ "github_metadata": { "branch": "develop", "commit_count": 28933, "repo_created_at": "2015-07-01T18:40:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 785, "forks": 195, "issues": 298, "pull_requests": 19 }, "file_meta": { "content_id": ...
ad2c1afa-0f29-433c-a45d-32ea68465b9e
ellinx/LC-cpp
source/WordBreak.cpp
#include "../Solutions.hpp" using namespace std; /***************** Word Break *****************/ /* Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dictionary words. You may assume the dictionar...
ALGO
0.990429
5.031631
{ "github_metadata": { "branch": "master", "commit_count": 197, "repo_created_at": "2017-02-10T06:08: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": "b388444d...
2181f6c2-4b2d-49a1-b0fc-fdc3c8cd42c2
MdAbuNafeeIbnaZahid/Competitive-Programming
CODEFORCES/Codeforces Round #379 (Div. 2)/734 D. Anton and Chess version 2.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update #include <ext/pb_ds/detail/standard_policies.hpp> using namespace std; using namespace __gnu_pbds; using namespace __gnu_cxx; // Order Statistic Tree /* Sp...
ALGO
0.999837
3.495281
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2017-03-04T13:09:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5536a945...