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
76f7e1a6-9044-4e60-822a-9cf2ce7b011b
DANNHIROAKI/XJTU-CS-Courses
COMP350105-算法设计与分析/算法设计_XJTU/其他资料/算法分析与设计(Github实验)/moodle_4.cpp
//解空间是一颗三叉子集树,三个子树分别表示进入A,进入B,都不进入 #include <iostream> #include <math.h> #include <fstream> using namespace std; class ExcAB{ private: int matrix[1000][20];//原始矩阵 int exclusion[20][20];//互斥表,为1表示互斥,为0表示不互斥。初始化时计算一次,后续直接查表 int result[20];//记录当前结果,1表示进入A,2表示进入B,0表示都不进入 int bestResult[20];//当前最优解 int s...
ALGO
0.99962
3.198301
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2024-04-24T12:45:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 72, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b35acd22...
416b2ff5-d4a3-4593-9bc1-c2223dcf50f4
gabrielrcp/Treino-Maratona
Seletiva2009/0402/1632.cpp
#include <cstdio> #define MAX 36 int ns[MAX]; char mat[MAX][MAX]; bool comum[MAX]; bool vai(int ats, int nus, int k) { if(nus == k) return true; if(ats == MAX) return false; bool ant[MAX]; if(ns[ats] >= k){ int c = 0; for(int i = 0; i < MAX; i++){ ant[i] = comum[i]; comum[i] = ...
ALGO
0.999466
3.412008
{ "github_metadata": { "branch": "master", "commit_count": 218, "repo_created_at": "2010-05-22T19:49:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0fd92f0...
fe1104c3-8b2d-4613-98b6-80510692831e
asamieh/Hypergraph
src/hypergraph_edges.cpp
/****************************************************************************** * hypergraph_edges.cpp * auther <NAME> * email <EMAIL> * * contains the code to get edge_edges graph from the hypergraph, ******************************************************************************/ #include <cstdio> ...
ALGO
0.998424
4.621601
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2015-05-21T11:40: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": "364665800...
5a6abec4-d203-40c1-9e66-301f5d273ff4
ZhangShuaiH/demos
algorithm/回溯法-8皇后.cpp
#include <iostream> #include <vector> #include <typeinfo> #include <string> #include <stack> #include <map> #include <set> #include <windows.h> #include "mydebug.h" #include <QString> using namespace std; const int NUM = 8; void print2Array(int a[NUM][NUM]){ for(int r=0; r<NUM; r++){ for(int c=0; c<NUM; ...
ALGO
0.999728
4.188764
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2020-04-07T10:29:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3825ec8fa...
bb128e9f-ba76-4c42-b9b9-a5fd9a868dda
kwrobert/ResearchCode
include/o2scl/min_brent_gsl.h
/* ------------------------------------------------------------------- Copyright (C) 2006-2014, <NAME> This file is part of O2scl. O2scl 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 ...
ALGO
0.99841
6.896405
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-09-04T15:27:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b9717f1aa5...
74490fb0-2dae-4d1a-b0d7-2f8dd8175229
dumitrux/PRO2-jutge-FIB
S2/X99804.cc
#include <iostream> #include <vector> #include <algorithm> using namespace std; #include "Estudiant.hh" void seleccio(vector<bool>& v, int n) { for (int i = 0; i < n; i++) { int assig; cin >> assig; v[assig - 1] = true; } } void mitjanes(vector<Estudiant>& est,const vector<bool>& selec, int sel) { int tam ...
TOOL
0.960951
3.532953
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2018-02-21T22:20:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "22c973f61...
c3f46096-bd10-4226-8c6f-89001d052691
USNavalResearchLaboratory/TrackerComponentLibrary
Mathematical_Functions/Shared_C++_Code/spherHarmonicSetEvalCPP.cpp
/*SPHERHARMONICEVAL A C++ implementation of functions to determine a * potential and/ or the gradient of the potential from * ral or complex spherical harmonic coefficients. * *This function is a C++ implementation of the main routine of the function *spherHarmonicEval in Matlab. ...
ALGO
0.995533
5.533955
{ "github_metadata": { "branch": "master", "commit_count": 100, "repo_created_at": "2017-02-02T14:24:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 421, "forks": 137, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb703...
24e8e255-f5fb-420d-9471-dda854b891e0
dudnbubn/ProblemSolving
BOJ1000-9999/BOJ1517_BubbleSort.cpp
#include <iostream> #include <algorithm> using namespace std; int N; pair<int, int> arr[500001]; int tree[2000000]; int leaf[500001]; void set_tree(int start, int end, int node) { if (start == end) { leaf[start] = node; return; } int mid = (start + end) / 2; set_tree(start, mid, node * 2); set_tree(mid + 1,...
ALGO
0.999422
4.140289
{ "github_metadata": { "branch": "main", "commit_count": 858, "repo_created_at": "2021-07-23T01:59:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9a606c1af6...
3c885d29-0d11-4ed4-8de0-1b8fe4f28025
GagandeepCodes/100DaysOfCode
Day33/POTD_gfg.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: long long int wineSelling(vector<int> &Arr, int N) { // Code here. long long int buy = 0, sell = 0; // int n = a.size(); long long int ans = 0; while (buy < N && sell < N) { // f...
ALGO
0.999974
4.391111
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2022-09-12T18:49:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "363886ea9...
099bfc43-ec64-4948-b1a1-1da68637edda
Amr-Shwieky2/OOP2_gameLogic
include/AI/PatrolStrategy.h
#pragma once #include "AIStrategy.h" /** * @brief AI strategy for patrolling back and forth horizontally. * * The PatrolStrategy makes the enemy move left and right along a fixed horizontal path. * It automatically reverses direction when reaching the patrol distance from the starting point. * * This behavior is...
ALGO
0.994776
7.11126
{ "github_metadata": { "branch": "master", "commit_count": 235, "repo_created_at": "2025-06-13T12:26:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "53b4696b...
13194a92-3a71-47a0-a95b-6f19c4e26e88
joshcurtis/UVA
11498.cpp
#include<iostream> using namespace std; int main() { int cases, divX, divY, x, y; cin >> cases; while(cases != 0) { //Get division lines cin >> divX >> divY; for(int i = 0; i < cases; i++) { //Get coordinates cin >> x >> y; //Check for on a border if(x == divX || y == divY) co...
ALGO
0.999568
3.555763
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2014-04-18T02:41:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "681610b7a...
bc8ac2a3-33dd-446e-bc70-4715e41154f2
aman-shrivastava95/DataStructuresAndAlgortihmsJava
DynamicProgramming/src/unboundedKnapsack.cpp
#include<bits/stdc++.h> using namespace std ; int f(int ind, int w, vector<int> &wt, vector<int> & val,vector<vector<int>> &dp){ //base case if(ind==0){ return ((int)w/wt[0])* (val[0]) ; } if(dp[ind][w]!=-1) return dp[ind][w] ; int not_take = f(ind-1,w,wt,val,dp) ; int take = INT_M...
ALGO
0.999998
5.022336
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2021-11-10T14:36:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0ea827b2...
bf518677-64e9-41a8-98e8-6c6f0c63dd37
Noodle3D/ZCookie
algorithm/Codeforces/CF250D Building Bridge.cpp
#include <cmath> #include <cstdio> #include <cstring> const int MAXN = 100005; int n, m; double A, B; double a[MAXN]; double b[MAXN]; double L[MAXN]; double getLen(double a, double b, double c, double d) { return sqrt((a - c) * (a - c) + (b - d) * (b - d)); } double getLen(int i, int j) { return sqrt(a[i] * ...
ALGO
0.999949
3.647945
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2013-05-17T09:57:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c68ed56...
f46443ad-37d2-45b8-9ffb-83fe9d00f06b
stg0123/baekjoonlearn
brute force/baekjoon15683.cpp
#include <iostream> #include <vector> using namespace std; int INF=1000000000; int dx[4]={0,1,0,-1}; int dy[4]={1,0,-1,0}; class watch{ private: vector<vector<int>> map; vector<pair<int,int>> loc; int N,M; int size=0; int sol= INF; public: watch(){ std::cin >> N >> M; map.resize(...
ALGO
0.999638
4.177887
{ "github_metadata": { "branch": "main", "commit_count": 278, "repo_created_at": "2020-11-19T18:11:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "25c1813584...
5a2f39e2-8d34-4398-9a55-4fe75726c554
Acejoy/LeetcodePrep
343. Integer Break/main.cpp
/* The question link is: https://leetcode.com/problems/integer-break/submissions/ The solution is simple dynamic Programming intBreak of 5: max of all below: 1xmax(4, intbreak(4)) 2xmax(3, intbreak(3)) 3xmax(2, intbreak(2)) 4xmax(1, intbreak(1)) we can memoise the results by storing it in a table. */ #include<...
ALGO
0.999997
5.198759
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2021-03-20T05:11: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": "c0083046f72...
fc791b73-cc71-48c2-a5a0-87b69e689194
neal2018/oj_env
codeforces/gr16/e.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll T, n, u, v; cin >> T; while (T--) { cin >> n; vector<vector<int>> g(n); for (int i = 0; i < n - 1; i++) { cin >> u >> v; g[u - 1].push_back(v - 1); g[v - 1].push_back(u - 1); } ll res = 0, has...
ALGO
0.999682
4.738895
{ "github_metadata": { "branch": "master", "commit_count": 175, "repo_created_at": "2021-08-18T06:24:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "896272a1...
df384997-fed9-4ce9-97cd-9ff4031a220e
ishandutta2007/codeforces-w
weakesttopology/normal/1364/D.cpp
#include <bits/stdc++.h> int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); int N, M, K; std::cin >> N >> M >> K; std::vector<std::vector<int>> E(N); for (int j = 0; j < M; ++j) { int u, v; std::cin >> u >> v; --u, --v; E[u].push_back(v); E[v].push_back(u); } ...
ALGO
0.999987
4.540952
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:34:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "750cff710d04...
4d18b673-6e32-4b5b-8437-a37593454e5a
fimkap/paristr
Options.cc
#include "Options.h" #include "Util.h" #include "../config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #ifndef __FreeBSD__ #include <getopt.h> #endif #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> /** * Constructor * * Parse the com...
TOOL
0.918911
5.094909
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2020-12-28T07:50: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": "5118354e7320...
348099b3-606f-4055-98e7-1c362c493dd7
kimyu0218/algorithm
Baekjoon/1000-1999/1865.cpp
#include <iostream> #include <vector> #include <tuple> using namespace std; typedef tuple<int, int, int> ti; const int INF = 1e6 * 5; vector<int> bellman_ford(int s, int n, vector<ti> &edges) { vector<int> dist(n+1, 0); dist[s] = 0; // 시작 위치 for(int i = 1; i <= n; i++) { bool renew = false; ...
ALGO
0.999837
5.394367
{ "github_metadata": { "branch": "main", "commit_count": 517, "repo_created_at": "2021-09-05T15:47: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": "34791ef320...
ea0b01f5-2689-4a4a-88c6-a378704da8da
ishandutta2007/codeforces-t
teapotd/normal/1326/D1.cpp
#define _USE_MATH_DEFINES #include <bits/stdc++.h> #ifdef LOC #include "debuglib.h" #else #define deb(...) #define DBP(...) #endif using namespace std; using ll = long long; using Vi = vector<int>; using Pii = pair<int, int>; #define pb push_back #define mp make_pair #de...
ALGO
0.999984
4.084377
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27: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": "34b59029ed13...
da99859d-1103-4bba-9ea7-9930abbb3d7f
jainrishabh98/CP
cf446B.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; int main () { ll n,m,k,p; cin>>n>>m>>k>>p; ll x; ll sumr[n]={0}; ll sumc[m]={0}; for(int i=0;i<n;i++) { for(int j=0;j<m;j++) { cin>>x; sumr[i] += x; sumc[j] += x; ...
ALGO
0.999911
3.409917
{ "github_metadata": { "branch": "master", "commit_count": 262, "repo_created_at": "2018-09-30T05:49: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": "95e03569...
3c5b250e-fd9e-4a80-b3e3-6ba39def823b
NVlabs/timeloop
src/workload/density-models/hypergeometric-distribution.cpp
/* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
ALGO
0.938695
6.705826
{ "github_metadata": { "branch": "master", "commit_count": 938, "repo_created_at": "2019-04-13T01:58:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 409, "forks": 119, "issues": 68, "pull_requests": 1 }, "file_meta": { "content_id": "8e4f...
2b15594e-a477-453d-bf80-12c0ba87f1a4
teodutu/EGC
Source/Teme/Tema1/FlappyBird.cpp
#include "FlappyBird.h" #include <Core/Engine.h> #include "Transform2D.h" FlappyBird::FlappyBird() : fallAngleSpeed(100.f), riseAngleSpeed(200.f), gravity(1200.f), liftForce(300.f), numObstacles(4), obstacleWidth(80.f), obstacleDistance(325.f), obstacleStart(630.f), scaleSpeed(300.f), wingScaleSpeeddAcc(.3...
TOOL
0.928162
4.782316
{ "github_metadata": { "branch": "master", "commit_count": 126, "repo_created_at": "2019-10-08T18:39:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c9d0312...
d2c686a6-69c5-439c-bc9d-68c4e6ace5d8
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/15/62/13.cpp
#include <cstdio> #include <vector> #include <cmath> #include <set> #include <map> #include <algorithm> #include <string> #include <iostream> #include <cassert> #include <ctime> #include <memory.h> using namespace std; #define forn(i, n) for (int i = 0; i < (int)(n); i++) #define foreach(it, a) for (__typeof((a).begin...
ALGO
0.999924
4.373969
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-09-30T05:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "83aa648c...
25e2bd2b-8119-49ce-97f5-f3ef884d9564
rajsahu213/DSA-and-CP-codes
DSA-codes/avltree.cpp
#include<bits/stdc++.h> using namespace std; struct node { int key; int height; node *left; node *right; }; node* create_node(int key_) { node *child = new node; child->key = key_; child->height = 1; child->left = NULL; child->right = NULL; return child; } int get_height...
ALGO
0.999989
4.629067
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-02-08T05:58: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": "2dcad6b875...
d3c39a88-96a5-4d47-8074-4d6cf938ca79
leejihoindaeyo/Uwith_DataStructure
DataStructure/4.SortAndSearch/Group1/seoyoon/2512.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; int budgets[10000]; for (int i = 0; i < n; ++i) { cin >> budgets[i]; } int totalBudget; cin >> totalBudget; int left = 0, right = 0; for (int i = 0; i < n; ++i) { if (budgets[i] > right) { ...
ALGO
0.99994
4.16465
{ "github_metadata": { "branch": "main", "commit_count": 237, "repo_created_at": "2024-08-22T06:11:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "f92fad204...
4aa47373-f553-4349-a98e-8ef3bc3ccf78
bingbingzhenbang/LeetCode_Answers
LeetCode/Top_K_Frequent_Elements.cpp
//Given a non - empty array of integers, return the k most frequent elements. // //For example, //Given[1, 1, 1, 2, 2, 3] and k = 2, return[1, 2]. // //Note: // //You may assume k is always valid, 1 ¡Ü k ¡Ü number of unique elements. //Your algorithm's time complexity must be better than O(n log n), where n is the arra...
ALGO
0.999992
6.468004
{ "github_metadata": { "branch": "master", "commit_count": 211, "repo_created_at": "2016-08-12T08:18:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "776b078f...
ca39fc25-0703-4070-b36c-ddf214e2b634
bohongbobo/termproject
game.cc
// File: game.cxx /** *@file game.cc *@brief This is a file includes moves, winer and some other functions *@author <NAME>, <NAME>, <NAME>, <NAME> *@date 2017/11/12 */ #include <cassert> // Provides assert #include <climits> // Provides INT_MAX and INT_MIN #include <iostream> // Provides cin, cout #include <qu...
ALGO
0.999
3.247114
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2017-11-02T02: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": "82f205c79...
794f7daa-6568-45d2-ad59-eae8c3cf897d
Evil-crow/AC
LeetCode/Linked_List/merge_two_sorted_lists.cc
/* * @filename: merge_two_sorted_lists.cc * @author: Crow * @date: 10/11/2018 09:56:09 * @description: 此版本的代码, 大量使用了构造, 可以预想在list比较长的情况下 * 构造会有极大的开销 => 事实: leetcode上, 14ms (14.33%) * 另一个版本,是进行链表的串联, 效率大幅提高 => 8ms (90.50%) */ #include <iostream> #include <vector> using names...
ALGO
0.99996
5.68422
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2017-07-17T07:50: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": "9f961a83b...
15ca35e1-3fb3-4e9f-8181-3449f1172ae4
RaviShankar27/LeetCodeApril20
ContiguousArray.cc
class Solution { public: int findMaxLength(vector<int> nums) { if (nums.size() <= 1) return false; unordered_map<int, int> hashMap; int n = nums.size(); int sum = 0; int max_len = 0; int ending_index = -1; for (int i = 0; i < n; i++) nums[i] ...
ALGO
0.999934
5.500491
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-05-05T08:12: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": "062cf71605...
926b2638-9a02-45d2-8fda-1c93fabb51af
ashwinktpu/StarPlat
graphcode/manual_mpi/preflow_push/distributedv2.0/distributed_bfs.hpp
#ifndef __BFS__ #define __BFS__ #include "synchronize_p2p.hpp" #include "perform_updates.hpp" #include "serial_methods.hpp" #include <queue> #include <utility> void distributed_bfs (int *heights, const int& global_vertices, const int& local_vertices, const int& sink, const int& source, const int& p_no) { log_me...
ALGO
0.999888
4.945915
{ "github_metadata": { "branch": "main", "commit_count": 852, "repo_created_at": "2020-11-10T14:28:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 19, "issues": 11, "pull_requests": 8 }, "file_meta": { "content_id": "b45e321...
4eb269ee-a387-4b74-9912-39bcf89fa695
zhxinhust/motion_planner
src/fgmm/update.cpp
/********************************************************************* FGMM: a fast(er) and light Gaussian mixture model implementation. Copyright (C) 2010 <NAME> Contact: <EMAIL> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version ...
ALGO
0.999822
5.273579
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2018-01-03T02:52:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bea586836...
0acfa2ef-023b-4b04-bea8-105b0655b9c8
mjcaley/AlgorithmsOnGraphs
Week 4/DetectingAnomaliesInCurrencyExchangeRates/main.cpp
#include <algorithm> #include <iostream> #include <limits> #include <vector> using std::vector; void reverse_graph(const vector<vector<int>>& in, vector<vector<int>>& out) { out.resize(in.size()); out.clear(); for (int i {0}; i < in.size(); ++i) { for (int j {0}; j < in[i].size(); ++j) ...
ALGO
0.999987
4.723642
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2016-09-19T15:54: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": "79222a599...
e8aabd78-8b4f-4b39-8be8-2cb29533882b
jiwoo0629/Baekjun_Algorithm
algorithm/수학/1405_미친 로봇.cpp
#include <iostream> #include <cstdlib> #include <vector> using namespace std; int n, east, west, south, north; double per = 0; void repeatPermutation(vector<char>, vector<char>, int); bool simple(vector<char>); int main(void) { cin >> n >> east >> west >> south >> north; vector<char> vec = {'e', 'w', 's', 'n'}; v...
ALGO
0.999752
3.661115
{ "github_metadata": { "branch": "main", "commit_count": 264, "repo_created_at": "2022-03-02T07:53: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": "e78b8129eb...
f26ef080-09fd-43f4-915e-942ab4b73928
IMSY-DKFZ/MITK-IGT
Modules/IGTBase/src/mitkStaticIGTHelperFunctions.cpp
/*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. =================...
ALGO
0.986672
6.329478
{ "github_metadata": { "branch": "main", "commit_count": 44489, "repo_created_at": "2024-05-16T13:55:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1bd2619de...
5e413cb8-661d-400e-9da1-be8abd7f1772
AbhishekMaity001/C-Codes
05-bitwise-operators.cpp
#include<iostream> using namespace std; int main(){ int a = 5; int b = 6; cout << "a & b = " << (a&b) << endl; cout << "a | b = " << (a|b) << endl; cout << "~ a = " << (~10) << endl; cout << "a ^ b = " << (a^b) << endl; // LEFT SHIFT (multiply by the shift number * 2) & RIGHT SHIFT (div...
ALGO
0.935953
3.431884
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2022-06-22T19:47: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": "a899d6864e...
400faf21-9f56-419c-8379-f700f5073d87
cran/matrixprofiler
src/contrast.cpp
// This is a personal academic project. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++, C#, and Java: https://pvs-studio.com #include "contrast.h" #include "mpx.h" #include "mpx_parallel.h" /** * @brief Contrast Profile * * @param negative_data stream with the non-event * @param ...
ALGO
0.97427
6.108186
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2021-02-18T11:03:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f19c8d2e21...
cdde8da9-6413-4f9e-a839-231f9ba6a4fc
lclpsoz/competitive-programming
ARCHIVE/2019-06-05-2000/UVA11951.cpp
#include "bits/stdc++.h" using namespace std; ////////////// Prewritten code follows. Look down for solution. //////////////// #define x first #define y second #define len(x) ((int)(x).size()) using pii = pair<int, int>; using ll = long long; using llu = long long unsigned; using ld = long double; const ld EPS = 1e-9...
ALGO
0.999934
3.406819
{ "github_metadata": { "branch": "master", "commit_count": 274, "repo_created_at": "2020-07-09T09:09:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8db1da42...
7bde34c3-f948-47ab-a61f-559aba6ad67f
timeeeee/anagrams
trie.cpp
#include <stdexcept> #include <iostream> #include "trie.h" TrieNode::TrieNode() { // Initialize children to null for (int i = 0; i < 26; i++) { children[i] = NULL; } // If there was no root argument, make this the root root = this; // This is not an end of a word end = false; } TrieNode::TrieNo...
ALGO
0.947127
5.524723
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-03-25T23:03: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": "7b391b3592...
cfad2507-e504-4fa5-8c48-29ca7f9bc3a0
TeresaMGL2/MAE263F
Final/src/rod_mechanics/external_forces/uniformConstantForce.cpp
#include "uniformConstantForce.h" #include "time_steppers/baseTimeStepper.h" uniformConstantForce::uniformConstantForce(const shared_ptr<softRobots>& m_soft_robots) : baseForce(m_soft_robots) { } uniformConstantForce::~uniformConstantForce() = default; void uniformConstantF...
ALGO
0.989494
6.466648
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2023-10-10T22:45: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": "d7c247f06bf...
fd152921-bb93-4717-8233-42d6749e12e4
slyjain/CP
AZ/ScrambledString.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define MOD 1000000007 #define MOD1 998244353 #define INF 1e18 #define nline "\n" #define pb push_back #define ppb pop_back #define mp make_pair #define ff first #define ss s...
ALGO
0.999991
5.695028
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-11-05T07:10: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": "80b37ce21c...
00f74668-0ed8-4ac5-9b56-8ca8cf170f54
calebschoepp/arduino-sudoku-solver
submission/server/algo_dancing_links.cpp
/* Names: <NAME>, <NAME> ID: 1532565, 1534577 CCID: rjmah1, cwschoep CMPUT 275 , Winter 2019 Arduino Sudoku Solver */ #include "algo_dancing_links.h" #include <iostream> DancingLinks::DancingLinks(std::queue<gridNum> *displayQueue, gridArr boardCopy) { // Constructor board = boardCopy; outputQueue = di...
ALGO
0.999893
3.444877
{ "github_metadata": { "branch": "master", "commit_count": 136, "repo_created_at": "2019-03-07T17:10: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": "f388b29c...
cd41ab4d-0b8c-4b56-bb54-8861ab42df57
ParkDaeYi/Algorithm_Study
4485.cpp
//이건 많이 느리네요 //#include <iostream> //#include <vector> //#include <queue> //#include <functional> //#define MAX_NODE 15625 //#define INF 1e9+1 //using namespace std; //typedef pair<int,int> pii; // //int n, s, dist[MAX_NODE], ans, _map[MAX_NODE]; //vector<pii> graph[MAX_NODE]; // //int main() { // ios_base::sync_with_s...
ALGO
0.999873
4.230983
{ "github_metadata": { "branch": "master", "commit_count": 549, "repo_created_at": "2020-02-13T05:39: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": "794816f8...
381b1981-5c39-4ed8-bfe6-9ba28ec343f4
viscrisn/mit-algo-cpp
CPP Projects/ACM ICPC Online 2013/Blurry vision.cpp
#include<iostream> #include<stdio.h> #include<cstring> #include<stdlib.h> #include<cmath> #include<vector> #include<algorithm> #include<map> #include<functional> #include<stack> #include<set> #include<queue> #include<fstream> using namespace std; int a[11][11]; int big1[32][32]; int big2[32][32]; int main() { int t...
ALGO
0.999807
3.120498
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2014-06-21T10:51: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": "749dfb5ccf...
04182a9d-41e0-4883-9a16-27964c83f33f
cedrickchee/pytorch-android
app/src/main/cpp/include/nomscheduler/Scheduler/CriticalPathAnalyzer.h
//===----------------------------------------------------------------------===// // // Tool to analyze (theoretical) critical path of a task scheduling problems. // //===----------------------------------------------------------------------===// #ifndef NOM_SCHEDULER_CRITICAL_PATH_ANALYZER_H #define NOM_SCHEDULER_CRIT...
ALGO
0.999786
7.08466
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2018-11-03T07:35:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 106, "forks": 18, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "8e5bfa...
62e84789-1bf8-4bd3-8fee-95445acb4e5a
AndreWaehlisch/Cpp_Uebung_13
odeint.h
#ifndef _ODEINT_H_ #define _ODEINT_H_ #include <climits> #include "helfer.h" // ********** class StepperBase { public: double &x; double xold; VecDoub &y, &dydx; double atol, rtol; bool dense; double hdid; double hnext; double EPS; int n, neqn; VecDoub yout, yerr; // Parent class for stepper classes Step...
ALGO
0.974131
5.634645
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2015-01-27T01:42: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": "2aac2130b0...
7367e87e-531f-4191-a336-682b94f15c6e
goodgood619/Problem-Solving
BOJ 2/14440.cpp
#include <cstdio> #include <algorithm> #include <cstring> #include <vector> #include <queue> #include <map> #include <iostream> #include <string> #include <math.h> #include <set> #include <list> #include <climits> #include <string.h> #include <deque> #include <functional> #include <stack> using namespace std; typedef l...
ALGO
0.999965
3.925094
{ "github_metadata": { "branch": "master", "commit_count": 248, "repo_created_at": "2019-09-07T16:13:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7dce3ac3...
1a6e32bb-6ee7-4130-84ef-a4646ca3c5c0
trinhminhtriet/leetcode
solutions/3300-3399/3367.maximize-sum-of-weights-after-edge-removals/Solution.cpp
class Solution { public: long long maximizeSumOfWeights(vector<vector<int>>& edges, int k) { int n = edges.size() + 1; vector<vector<pair<int, int>>> g(n); for (auto& e : edges) { int u = e[0], v = e[1], w = e[2]; g[u].emplace_back(v, w); g[v].emplace_back...
ALGO
0.999963
5.607486
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2024-12-09T17:55:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d4e6d...
50fb4640-fdb6-42fb-af2d-483b098d299a
jer22/OI
GCJ/2017/Qualification/A/a.cpp
#include <cstdio> #include <cstring> #include <algorithm> #include <iostream> using namespace std; char rev[266]; int main() { freopen("a.in", "r", stdin); freopen("out", "w", stdout); int T; scanf("%d", &T); string s; int k; rev['+'] = '-'; rev['-'] = '+'; for (int cas = 1; cas <= T; cas++) { printf("Case...
ALGO
0.99993
3.75586
{ "github_metadata": { "branch": "master", "commit_count": 357, "repo_created_at": "2014-12-02T12:22: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": "b1cd0acd...
75069dfe-6e61-4df0-a6a7-f806aa94e0fb
ddiLab/InsituBloodFlow
rbc/pair_platelet_morse_prob.cpp
/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories <NAME>, <EMAIL> Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with San...
ALGO
0.997932
4.892143
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-05-26T16:01:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e4396f731605...
1dbe64de-4c5d-455c-a23a-8e95fc9f657a
krist7599555/otog.cf-solution
629.cpp
// https://api.otog.cf/problem/doc/629 #include <iostream> #include <algorithm> #include <vector> const int N = 2002; const int M = 10003; char inp[N][M]; const char EMPTY = '0'; const char STAR = '1'; int remove_star(int i, int j) { std::vector<int> memo; while (inp[i][j] == STAR) { // std::cout << "start " ...
ALGO
0.999532
3.621286
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2022-12-20T23:55:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "abd4f329a60...
211098f5-2a6a-4159-b366-4bba28211edc
rusmanr/StateSpaceControlGUI
StateSpace.cpp
#include "StateSpace.hpp" // 0 for FullState //1 for Autonomous (to be implamented) StateSpace::StateSpace(int state, int input, int output, int enumtype) { inputs = input; outputs = output; states = state; type = enumtype; // Establish proper size for matrices: Comments represent common...
ALGO
0.981764
4.720691
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-04-02T01:51: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": "e18b1b7e3c...
bf85a558-7af8-45ee-90b9-99ca6f728563
swwind/code
luogu/3810.cpp
#include <bits/stdc++.h> #define N 100020 #define ll long long using namespace std; inline int read(){ int x=0,f=1;char ch=getchar(); while(ch>'9'||ch<'0')ch=='-'&&(f=0)||(ch=getchar()); while(ch<='9'&&ch>='0')x=(x<<3)+(x<<1)+ch-'0',ch=getchar(); return f?x:-x; } struct node { int x, y, z; int ans; }a[N]; i...
ALGO
0.999959
4.444767
{ "github_metadata": { "branch": "master", "commit_count": 255, "repo_created_at": "2017-06-08T08:20: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": "946c25ca...
f4732333-dbfe-42af-b1af-31c3fa23bdb3
ColorlessBoy/leetcode
747.至少是其他数字两倍的最大数.cpp
/* * @lc app=leetcode.cn id=747 lang=cpp * * [747] 至少是其他数字两倍的最大数 */ /* * Notes: * */ #include <bits/stdc++.h> using namespace std; // @lc code=start class Solution { public: int dominantIndex(vector<int>& nums) { int n = nums.size(); if(n <= 1) return n - 1; int first...
ALGO
0.999758
5.366337
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2020-07-29T11:22: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": "74840f522...
b0f2e5c9-3a3d-464b-b72c-c0ad811b459d
wassimalharaki/Codeforces
1000/cAPSlOCK.cpp
#include <bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define int long long #define all(v) v.begin(), v.end() #define nl << '\n' #define v vector #define vi vector<int> #define pii pair<int, int> #define mp make_pair #define pb push_back #define INF LONG_LONG...
ALGO
0.999591
4.563827
{ "github_metadata": { "branch": "main", "commit_count": 160, "repo_created_at": "2023-09-19T17:56: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": "03e53ff4cb...
98ccdb09-3ae0-4955-99eb-d746d618b04a
zhp-ncu-dev/ReferenceLineSmooth
discrete_point_smoothing/3rd_party/colpack/include/ColPack/GraphOrdering.h
/************************************************************************************ Copyright (C) 2005-2008 <NAME>, <NAME>, <NAME>, <NAME> This file is part of ColPack. ColPack is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as ...
ALGO
0.968378
5.616188
{ "github_metadata": { "branch": "dev", "commit_count": 19, "repo_created_at": "2021-07-20T13:52:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b4b4ab3547e...
3f520d64-cd26-4352-93f2-82e190d4d7fb
Gusabary/Leetcode
Weekly Contest/Weekly-Contest-176/1.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: int countNegatives(vector<vector<int>>& grid) { int ans = 0; const int height = grid.size(); const int width = grid[0].size(); for (int i = height - 1; i >= 0; i--) { if (grid[i][width-1...
ALGO
0.999974
6.063394
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2018-12-16T04:41:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "81443c671...
297b459e-d055-4606-9626-807a7757d81e
Team-L/CS-460-Project-1
TeamLP1.cpp
#include <stdio.h> #include <ctype.h> #include <string> #include <iostream> #include <map> using namespace std; /* File: TeamLP1.cpp Author: <NAME>, Date: 2/9/17 Description: This progaram is a lexer. */ int start(char a, string stream, int i, string lexeme); int collect1(char a, string stream, int i, string lexe...
ALGO
0.975486
3.17283
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2017-02-23T02:30:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "16ef33bde9...
a94f8252-03ee-4fa1-8c5a-87a9445b9471
JesusEduardoEscobar/EstructurDeDatos
TC1031(Portafolio_Final)/Pruebas/Prueba1_Act5.2/MyLinkedList.cpp
#include "MyLinkedList.h" //Ya en el .h <string> #include <fstream> #include <stdexcept> #include <iostream> using namespace std; //O(1) //Constructor por default MyLinkedList::MyLinkedList(){ this->size=0; this->head=this->tail=nullptr; } //O(n) //Destructor MyLinkedList::~MyLinkedList(){ while(!isEmpty()){ ...
TOOL
0.978107
4.031196
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-11-16T03:27: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": "8736b9b9756...
5a57fb39-b5a9-4954-86c0-709a978f517c
Lancifolium/Lancifolium
MovLancifolium.cpp
#include "MovLancifolium.h" void MovLancifolium::init() { siz = 19; conflict = confmove = 0; memset(ston, 0, sizeof(char) * 676); memset(calcbord, 0, sizeof(char) * 676); root = new GnNode(); curNode = root; /* 初始指向root */ conflict = 0; } void MovLancifolium::deleteroot(struct GnNode *tmproot) { if (tmproo...
ALGO
0.960279
4.009099
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-09-22T05:58:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d9603033589...
5bb92d8a-404a-45b7-ab63-a276ad80f29b
RoshanChef/DSA-2.0
9 Queue/6 Queue_use_stack.cpp
#include <iostream> #include <stack> using namespace std; // Approach 1 class queue { stack<int> s1; stack<int> s2; public: void push(int data) { // insert at bottom if (!s1.empty()) { s2.push(s1.top()); s1.pop(); } s1.push(data); ...
ALGO
0.999447
4.735538
{ "github_metadata": { "branch": "main", "commit_count": 164, "repo_created_at": "2024-05-24T05:19: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": "e839cd9d95...
d23210b5-f41b-4a12-b379-1e7d2ea5811c
kimmoonwoong/boj
백준/Silver/29755. 블랙홀과 소행성/블랙홀과 소행성.cc
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; long long arr[200001]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n, m; cin >> n >> m; for (int i = 0; i < n; i++) cin >> arr[i]; sort(arr, arr + n); long long ans...
ALGO
0.99999
4.130215
{ "github_metadata": { "branch": "main", "commit_count": 480, "repo_created_at": "2023-01-10T07:54: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": "a1f527f5fe...
c1182420-2301-4abb-84a9-832dc6070d14
kama1kant/Programming
Programing_Practice_of_DataStructures_and_Algorithms/String/find_occ_of_pat_in_txt.cpp
#include<iostream> using namespace std; int find_occ(string txt, string pat); string reverse(string s); int kmp(string txt, string pat); int create_lps(string pat, int m, int lps[]); int main() { string txt = "abcd"; string pat = "dc"; cout<<find_occ(txt, pat); return 0; } int find_occ(string txt, string pat) { ...
ALGO
0.999949
4.829003
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-01-26T20:15: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": "e7e86ba737...
ac652b58-ee7c-49a9-9695-6b7a913cee4d
Mansterteddy/Cracking-the-Coding-Interview
language/c++/data structure/Tree/AVL Tree/Binary_Tree.h
#ifndef BINARY_TREE_H #define BINARY_TREE_H /** Class for a binary tree. */ #include <cstddef> #include <sstream> #include <stdexcept> #include <string> #include "BTNode.h" template<typename Item_Type> class Binary_Tree { public: // Constructors and Functions /** Construct an empty Binary_Tree. */ Binar...
TOOL
0.938985
6.299735
{ "github_metadata": { "branch": "master", "commit_count": 335, "repo_created_at": "2016-08-08T08:35: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": "693627b0...
09b5da7a-5dba-4a4b-b71c-8024869d0e5a
invincible04/Competitive-Programming
D_Lucky_Chains.cpp
#include <bits/stdc++.h> #define int long long #define f(i,a,b) for(int i = a; i < b; i++) #define pb push_back #define all(a) a.begin(), a.end() #define arraysort(a) sort(a, a + n) #define endl "\n" #define inputarray(a, n) f(i, 0, n) { cin >> a[i]; }...
ALGO
0.999984
4.281043
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2023-01-28T22:56:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60826a589...
b9d17244-1eb0-4379-a00a-d930d4dd1d25
ogoe/waves2Foam
src/waves2Foam/relaxationZone/relaxationWeight/relaxationWeightCourantCorrection.H
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright held by original author \\/ M anipulation | ------------------...
ALGO
0.939337
6.183971
{ "github_metadata": { "branch": "master", "commit_count": 277, "repo_created_at": "2012-02-20T17:41:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 47, "forks": 45, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "ed5855...
77477bba-bae3-4ba0-b266-4907d982a72d
ashaw1270/big-int
bigint.cpp
#include "bigint.h" #include <iostream> using namespace std; const BigInt BigInt::zero("0"); const BigInt BigInt::one("1"); const BigInt BigInt::ten("10"); string toString(long long val) { size_t numDigits = log10(abs(val)) + 1; char* digits = new char[numDigits + 1]; digits[numDigits] = '\0'; for (i...
ALGO
0.966456
4.882806
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-10-29T21:19: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": "5096c78022f6...
2d4b9425-f521-4cc1-b951-72b86d723166
Ashokav008/LeetCode
Add two numbers represented by linked lists - GFG/add-two-numbers-represented-by-linked-lists.cpp
// { Driver Code Starts // driver #include <bits/stdc++.h> using namespace std; /* Linked list Node */ struct Node { int data; struct Node* next; Node(int x) { data = x; next = NULL; } }; struct Node* buildList(int size) { int val; cin>> val; Node* head = new Node(val...
ALGO
0.999856
5.698924
{ "github_metadata": { "branch": "main", "commit_count": 1718, "repo_created_at": "2022-03-02T10:39: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": "972305f22...
f1cbfbf9-d0e5-43c2-8010-400b565e2ec8
abhishekpaul77/DSA
linked_list.cpp
#include<bits/stdc++.h> using namespace std; // Linked list is a data structure that stores a collection of elements, called nodes, each pointing to the next node by means of a pointer. // It is a linear data structure, where elements are not stored at contiguous memory locations. // The elements in a linked list are ...
ALGO
0.999869
5.004762
{ "github_metadata": { "branch": "main", "commit_count": 162, "repo_created_at": "2024-03-10T17:55:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4800df8b61...
ea1e8ca0-bcb6-464c-a62d-a196d6489b6f
bhardwaj2000/zoo
zoo_jtc.cpp
#include<iostream> using namespace std; static int ticket_num=0; class Zoo{ private: int num_of_guest; int *Age_of_guest; public: Zoo(int num){ num_of_guest=num; Age_of_guest=new int[num_of_guest]; } ~Zoo(){ delete []Age_of_guest; } void setvalue(); void Total_charge(); void security_check();...
TOOL
0.970588
3.456411
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-12-16T04:55: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": "96d125be6c0d...
85781399-99eb-4f80-8fcc-5a1d2d1e4222
Pisces311/vscode_workspace
ACM/Online Judges/Codeforces/Codeforces Round #556 (Div. 2)/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define scan(a) scanf("%d", &a) #define print(a) printf("%d\n", a) #define mem(a, b) memset(a, b, sizeof(a)) #define up(i, a, b) for (int i = a; i <= b; ++i) #define dn(i, a, b) for (int i = a; i >= b; --i) const int maxn ...
ALGO
0.999993
4.650056
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2020-03-21T02:52:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d9bb5ae...
ea14126d-01cc-432a-adb4-5af6cf1be55b
kinetic-rb/kinetic-rb.github.io
code/P2186.cpp
// Please submit with C++14! It's best to use C++20 or higher version. #ifndef LOCAL // Spectre #pragma region HEAD // By rbtree (https://rbtree.dev) #endif #include <algorithm> #include <array> #include <bitset> #include <cmath> #include <cstring> #include <functional> #include <iostream> #include <list> #incl...
ALGO
0.999488
5.311362
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2022-11-19T06:37: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": "46790bbd1a7...
0480d263-0957-4493-93d0-7c7b04c02ad7
romainaugier/OpenViewer
libOpenViewerUtils/src/filesystem.cpp
// SPDX-License-Identifier: BSD-3-Clause // Copyright (c) 2022 - Present <NAME> // All rights reserved. #include "OpenViewerUtils/filesystem.h" #include <locale> #include <codecvt> #if defined(LOVU_WIN) #include "windows.h" #include "ShlObj_core.h" #elif defined(LOVU_LINUX) #include <unistd.h> #include <sys/types.h>...
TOOL
0.961135
7.518775
{ "github_metadata": { "branch": "master", "commit_count": 236, "repo_created_at": "2021-05-27T10:13:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a4db667...
c881a08f-82ff-424d-bdcf-625d745ab9f5
stg0123/baekjoonlearn
brute force/baekjoon1260.cpp
#include <iostream> #include <vector> #include <algorithm> #include <queue> #include <stack> using namespace std; class node{ public: int data; vector<node *> edge; }; void connect(vector<node>& nd, int M){ for(int i=0;i<M;i++){ int a,b; std::cin >> a>>b; nd[a].data=a; ...
ALGO
0.999975
3.912534
{ "github_metadata": { "branch": "main", "commit_count": 278, "repo_created_at": "2020-11-19T18:11:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "416617f6fd...
26948785-d548-472d-979e-24e462ff32a1
pinam45/USCP
code/solver/include/solver/algorithms/greedy.hpp
// // Copyright (c) 2019 <NAME> // // Distributed under the MIT license // See accompanying file LICENSE or copy at // https://opensource.org/licenses/MIT // #ifndef USCP_GREEDY_HPP #define USCP_GREEDY_HPP #include "common/data/solution.hpp" #include "common/algorithms/greedy.hpp" #include "common/utils/logger.hpp" #i...
ALGO
0.992536
7.350179
{ "github_metadata": { "branch": "master", "commit_count": 276, "repo_created_at": "2019-09-05T12:45:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6676faba...
a1949705-edde-4206-9cea-d624265cbcfe
alexandraback/datacollection
solutions_5765824346324992_0/C++/Dendro/main_ex2.cpp
#include <iostream> #include <random> #include <time.h> #include <limits> #include <vector> #include <sstream> using namespace std; class Instance{ public: void read(); void write(); void compute(); private: long _n; vector< long > barbers; vector< long > num; vector< vector <long > > time_per_barber; vec...
ALGO
0.999972
3.410658
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "23e4a7ab7...
4456cf88-9f4e-4969-8c45-64315fb77dff
ericl816/Competitive-Programming-Solutions
DMOJ/Seasonal/Another Contest 4 Problem 9 - Fast Fourier Transform!.cpp
#include <bits/stdc++.h> using namespace std; int N; int power(int x, unsigned int y, int p) { int res = 1; x = x % p; while (y > 0) { if (y & 1) res = (res * x) % p; y = y >> 1; x = (x * x) % p; } return res; } int modInverse(int a, int p) { return power(a, p - 2...
ALGO
0.999878
4.485808
{ "github_metadata": { "branch": "master", "commit_count": 388, "repo_created_at": "2021-05-10T21:58:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b1736f2...
24ceaf1d-6752-4c47-b1a5-78d3991bc0f0
HoangGiang2004/Mindx
baithi2.cpp
#include <iostream> #include <vector> using namespace std; vector<vector<int>> subsets(vector<int>& nums) { vector<vector<int>> result; int n = nums.size(); int p = 1 << n; for (int i = 0; i < p; i++) { vector<int> subset; for (int j = 0; j < n; j++) { if (i & (1 << j)) { subset.pu...
ALGO
0.999883
5.624322
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-12-07T04:31:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "17e77b9c0ce8...
c5dccb0e-1f3e-4fbe-b34f-b89a8fc90a96
xlgames-inc/XLE
Foreign/cml-1_0_2/cml/matvec/matvec_mul.h
/* -*- C++ -*- ------------------------------------------------------------ Copyright (c) 2007 <NAME> and <NAME> http://cmldev.net/ The Configurable Math Library (CML) is distributed under the terms of the Boost Software License, v1.0 (see cml/LICENSE for details). *------------------------------------------------...
TOOL
0.975926
6.607738
{ "github_metadata": { "branch": "master", "commit_count": 6572, "repo_created_at": "2015-01-15T05:07:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 339, "forks": 73, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "edfa9...
8f14a447-ef14-4fc2-bcca-67b5c11d5682
ManfredZhang/Programs
Storehouse/基础/问求/数独大作业/Sudoku_精确覆盖/wuyusheng.cpp
#include <iostream> #include <vector> #include <algorithm> #include <time.h> using namespace std; struct scondition { int sline, srow, snum; }; //现实数独的一个条件(行,列,数字) vector <vector <int> > psudoku(729, vector<int>(324, 0)); vector<int> solve; vector<int> lineinuse; vector<int> rowinuse; //定义全局变量:程序矩阵;存放代表解的行数;存放需要考虑的行...
ALGO
0.999664
3.43113
{ "github_metadata": { "branch": "master", "commit_count": 268, "repo_created_at": "2017-02-06T12:33:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3331346a...
227b570a-c596-4241-a9b3-90754a9ecac9
xfhy/dataStructure
线性表/三元组/main.cpp
# include <iostream> using namespace std; #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define INFFASIBLE -1 typedef int Status; typedef int ElemType ; typedef ElemType* Triplet ; //初始化三元组 Status InitTriplet(Triplet &T,ElemType v1,ElemType v2,ElemType v3) { T = (Triplet)malloc( sizeof(ElemType) ...
ALGO
0.9989
3.074475
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-02-13T10:52:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "37d1b223cd...
322e1884-19b3-4677-999c-a82dcb456120
ganeshalamuru/prg
codeforces/hello2025/C_Trip_to_the_Olympiad.cpp
#include <bits/stdc++.h> using namespace std; #define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); typedef long long ll;typedef long double ld;typedef pair<int,int> pii; #define F first #define S second #define PB push_back #define MP make_pair const ll mod = 1e9+7, N = 2e6+7, M = 2e6+7, INF = INT_MAX/10; ll po...
ALGO
0.999932
3.741377
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-08-02T10:36: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": "805805b676f7...
2749dfd6-a4ac-469c-b9bc-834be967e33e
joaovicentesouto/INE5452
lists/three/binary_tree.hpp
//! Copyright [2017] <<NAME>> #ifndef STRUCTURES_BINARY_TREE_H #define STRUCTURES_BINARY_TREE_H #include <cstdint> // std::size_t #include <stdexcept> // C++ exceptions namespace structures { //! Classe Árvore binária /*! Implementação de uma árvore binária de busca. * \author <NAME>. * \since 13/05/17 * \v...
ALGO
0.976582
4.556781
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2019-03-16T01:01: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": "60359e78b...
4ce8e60d-91a6-44d5-bcf0-9b3209dc0749
apple/turicreate
src/toolkits/sgd/sgd_solver_base.hpp
/* Copyright © 2017 Apple Inc. All rights reserved. * * Use of this source code is governed by a BSD-3-clause license that can * be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause */ #ifndef TURI_SGD_SGD_SOLVER_CLASS_H_ #define TURI_SGD_SGD_SOLVER_CLASS_H_ #include <map> #include <...
ALGO
0.94526
7.69826
{ "github_metadata": { "branch": "main", "commit_count": 1571, "repo_created_at": "2017-12-01T00:42:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11198, "forks": 1137, "issues": 502, "pull_requests": 21 }, "file_meta": { "content_id": "...
4bc39a20-f2ac-4660-ac93-cc161168c127
peitianyu/tt_3d_slam
lv_math/src/core/math/grid_map/grid_map_base.h
#ifndef __TYPES_GRID_MAP_BASE_H__ #define __TYPES_GRID_MAP_BASE_H__ #include "index3d.h" #include "types/pose3d.h" #include <unordered_map> #include <vector> #include <mutex> namespace grid_map{ struct index_hash_fn { std::size_t operator() (const Index3D& index) const { return std::hash<int>()(in...
TOOL
0.905906
6.296291
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2023-04-11T12:08:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d7c00906237...
dc7d169b-53ae-4494-9b8e-93db1ee12057
qowlz/codetree-TILs
241106/특정 조건으로 묶여있는 숫자 그룹/a-group-of-numbers-tied-to-specific-conditions.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int n, k; vector<int> arr; int main() { cin >> n >> k; arr.assign(n, 0); for (int i = 0; i < n; i++) { cin >> arr[i]; } sort(arr.begin(), arr.end()); int j = -1; vector<pair<int, int>> groups; ...
ALGO
0.999946
4.454813
{ "github_metadata": { "branch": "main", "commit_count": 549, "repo_created_at": "2023-11-28T13:21: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": "9ad4a1c4c3...
e1cfec8a-cca5-4b23-b493-555c82bebdc2
woodart8/Learning-Algorithm-CPP
1092.cpp
#include <iostream> #include <vector> #include <algorithm> #include <set> using namespace std; int N,M; vector<int> cranes; multiset<int> boxes; void input() { cin >> N; for (int i=0; i<N; i++) { int limit; cin >> limit; cranes.push_back(limit); } cin >> M; for (int i=0; ...
ALGO
0.999972
3.685451
{ "github_metadata": { "branch": "main", "commit_count": 148, "repo_created_at": "2023-12-11T12:31:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a9836d9f8d...
567a99ac-84e6-43f8-b077-6bf033cbd3c6
deathblade1104/DSA_Practice
Unit Area of largest region of 1's - GFG/unit-area-of-largest-region-of-1s.cpp
// { Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find unit area of the largest region of 1s. int findMaxArea(vector<vector<int>>& grid) { // Code here int area=0,n=grid.size(),m=grid[0].size(); ...
ALGO
0.999875
6.236192
{ "github_metadata": { "branch": "main", "commit_count": 8577, "repo_created_at": "2022-01-19T08:03:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "84db71eed...
92d23809-59b4-4fb3-a577-f85c7beafa56
naman-indranil/One-Piece
inPlaceMergeSort.cpp
// C++ program to Count // Inversions in an array // using Merge Sort #include <bits/stdc++.h> using namespace std; void _mergeSort(int arr[], int left, int right); void merge(int arr[], int left, int mid, int right); /* This function sorts the input array and returns the number of inversions in the array */ void mer...
ALGO
0.999985
5.251717
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2020-09-13T08:10: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": "cfcc809ff...
7d4384cd-9d03-4278-b0a4-b5a3f226b469
yuerbujin/data-structure
实验/161940219-阴俊晖-第三次实验/161940219-阴俊晖-上机代码/5.CSP题目.cpp
#include <stdio.h> #include <math.h> #include "myarray.h" void Bubble_Sort( P_List L ) ; void Find(P_List L); int main() { P_List L = InitList(MAXSIZE) ; Input(L); Bubble_Sort(L) ; Find(L); } void Swap( ElemType* e1, ElemType* e2 ) { ElemType tem = *e1 ; *e1 = *e2 ; *e2 = tem ; } void Bubble_Sort( P_L...
ALGO
0.999967
3.548011
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-03-08T09:13: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": "561a171642e7...
2384988b-d74e-4f15-90e1-a2b24ae71a3e
FindAWayy/C-and-C-Training-Code
Day14 Coding Practice/Pointers Advance/practice1.cpp
// Pointer to a const #include <iostream> using namespace std; int main() { int x = 10; int y = 20; const int* ptr = &x; // ptr points to constant data (x) cout << "Value of x: " << *ptr << endl; // prints 10 // *ptr = 30; // Error: can't modify the value of *ptr, it's a const poi...
TOOL
0.960358
3.575271
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2024-10-23T12:28: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": "c54585e2781...
df7917a9-f66d-48bc-a307-c15898f9660b
Stuart-Mouse/Stuart-Mouse.github.io
src/collision.cpp
typedef enum Directions { DIR_NONE = 0, DIR_U_I = 0, DIR_R_I = 1, DIR_D_I = 2, DIR_L_I = 3, DIR_UR_I = 4, DIR_DR_I = 5, DIR_DL_I = 6, DIR_UL_I = 7, DIR_U = 1 << DIR_U_I, DIR_D = 1 << DIR_D_I, DIR_L = 1 << DIR_L_I, DIR_R = 1 << DIR_R_I, DIR_UR = 1 << DIR_UR_I, DIR_DR = 1 << DIR_DR_I, DIR_UL =...
ALGO
0.971032
5.738988
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2021-03-17T23:19: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": "bc4a1db3225...
f8c233df-8e69-437f-8e40-f938e32ce348
PointCloudLibrary/pcl
gpu/segmentation/include/pcl/gpu/segmentation/impl/gpu_seeded_hue_segmentation.hpp
/* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2009, <NAME>, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met...
ALGO
0.967244
6.27876
{ "github_metadata": { "branch": "master", "commit_count": 14566, "repo_created_at": "2013-02-12T16:40:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10495, "forks": 4656, "issues": 432, "pull_requests": 147 }, "file_meta": { "content_id...
05240114-99e1-4daf-9c0f-86d29d3c3e62
suraj-iitb/algorithm-identification
BERT/Data_Dump/Selection/C++/Code/selection5045133.cpp
#include <bits/stdc++.h> using namespace std; void trace(int array[], int n) { for (int i=0;i<n;i++) { if (i == n-1) { cout << array[i]; } else { cout << array[i] << " "; } } cout << endl; } void solve(...
ALGO
0.999928
3.912805
{ "github_metadata": { "branch": "main", "commit_count": 229, "repo_created_at": "2020-05-24T06:21:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 10 }, "file_meta": { "content_id": "9a32ba3ad...
a51d8b25-5e68-4083-bbbe-3ea79855b74d
hauntsaninja/Angram
Angram/cword.hpp
#ifndef cword_hpp #define cword_hpp #include <vector> #include <string> #include <functional> #include <map> #include <unordered_map> using namespace std; struct cword { int len; int counts[26]; string value; cword() { len = 0; for(int i = 0; i < 26; ++i) counts[i] = 0; ...
ALGO
0.995003
5.300626
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-07-03T06:26: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": "47546601a8...
26b20120-68b7-41e5-9648-7f885bc24a32
ndongre98/codeforces
CF/B/1367B/even_array.cpp
#include <iostream> using namespace std; #define fio ios_base::sync_with_stdio(true); cin.tie(NULL); cout.tie(NULL); int main() { fio int epochs, n, x; int i, j; string s; int num_odds, num_evens, num_mismatches; cin >> epochs; for (i = 0; i < epochs; i++) { cin >> n; num_odds = 0...
ALGO
0.999819
3.746019
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2020-05-14T18: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": "e63f9e717...
eee67c17-270e-44d1-be64-41a2867bb4bb
adi05gpl/UniversityProjects
Programming Fundamentals ( C++ )/Undefined work/problema7_lab9.cpp
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <conio.h> #include <string.h> using namespace std; int a[50],b[50]; int main() { int i,j; int nrapar[30]; char text[255]; char cuvinte[30][50];//matrice de caractere sau vector de cuvinte puts("dati textul format din mai multe cuvinte"); c...
ALGO
0.999365
3.149652
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2025-06-12T18:32: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": "2a3c371dade...
0d33f173-c000-404e-a7b4-03329532a36b
reedme17/CS187_Rendering
src/warp.cpp
/* This file is part of Nori, a simple educational ray tracer Copyright (c) 2015 by <NAME> Nori is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation. Nori is distributed in the hope ...
ALGO
0.998824
6.225861
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-04-22T23:17: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": "3b1ce2d742...
809e41b9-0311-4274-b180-542672135dec
dulte/Comp-Phys
Project1/Project1-Daniel/gaussian_benchmark.cpp
#include <iostream> #include <cmath> #include <iostream> #include <fstream> #include <algorithm> #include <armadillo> #include "time.h" /* Denne filen brukes ved å gi 3 argumenter. Foerste argument bestemmer antall iterasjoner. Velger man 1 her, vil programmet lage en fil med loesningen for N'en gitt i argument 2. Vel...
ALGO
0.997942
4.273149
{ "github_metadata": { "branch": "master", "commit_count": 184, "repo_created_at": "2016-08-25T08:32:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82012a8f...
c9bdd803-d8cb-498f-a4eb-b304891ff54b
BigBookPlus/coding-exercises
leetcode-2015/CrackingLeetCode/maxPoints.cpp
#include "Solution.h" int Solution::maxPoints(vector<Point> &points) { if (points.size() == 0) return 0; map<double, int> hmap; double index[1000]; const double eps = 0.000001; const int M = 1000000; const double INF = 1000000000; int max = 0; for (int i = 0; i < points.size(); i++) { int k = 0; int self...
ALGO
0.999818
4.839399
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2014-07-19T14:10: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": "926088cd5...