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
2e2d7580-5894-413f-9cac-5eb901452f9c
facebook/hhvm
third-party/proxygen/src/proxygen/lib/http/codec/CodecUtil.h
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <assert.h> #include <folly/Range.h> #include <folly/portability/Windows.h> /...
TOOL
0.937409
7.101919
{ "github_metadata": { "branch": "master", "commit_count": 77511, "repo_created_at": "2010-01-02T01:17:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 18449, "forks": 3043, "issues": 407, "pull_requests": 93 }, "file_meta": { "content_id"...
96fea92a-a123-427f-aeaa-659f7d65de67
MatTwix/Yandex-Algo
homeworks/4/a.cpp
#include <iostream> #include <vector> using namespace std; int main (void) { vector<int> stack; string word; while (cin >> word) { if (word == "push") { int num; cin >> num; stack.push_back(num); cout << "ok" << endl; } else if (word == "si...
ALGO
0.98987
4.108568
{ "github_metadata": { "branch": "main", "commit_count": 58, "repo_created_at": "2025-04-09T15:53: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": "a9680ca1c43...
6727af41-e0b2-466d-990a-8713c6ab3495
gagan86nagpal/Interview-prep
Merge two sorted linked lists/main.cpp
#include <iostream> using namespace std; struct node { int data; node* next; }; node* insertAtBeginning(node * head,int data) { node * temp = new node(); temp->data =data; temp->next = head; head = temp; return head; } // This code is very redundant, // A lot of improvement can be done by...
ALGO
0.999977
5.456697
{ "github_metadata": { "branch": "master", "commit_count": 340, "repo_created_at": "2017-08-11T17:30:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b34d7b5...
158592e9-13b8-4124-b6bd-12dfd223efc1
shreyashji/SDE-Problems-Solutions
16.2 Graph Leetcode Problems/7.Flood Fill.cpp
//https://leetcode.com/problems/flood-fill/submissions/ //https://www.youtube.com/watch?v=7aikf56h9Gs&list=PLzjZaW71kMwSrxEtvK5uQnfNQ9UjGGzA-&index=10 class Solution { public: //fill given color=1 (with given i,j) on interconnected nodes //move to only specified color if found the exact color marked with new c...
ALGO
0.999525
6.390402
{ "github_metadata": { "branch": "main", "commit_count": 214, "repo_created_at": "2021-11-28T14:01:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b75e5f5ab...
1667b4c5-c3d0-4527-a24b-ffede606dc0c
SaidjonRavshanov/problems
c++ learning/5-bo'lim/Untitled8.cpp
#include <iostream> #include <ctime> #include <cstdlib> using namespace std; int generat(int start , int finish){ int number=rand()%(finish - start+1)+start; return number; } bool toqjuft(int toq){ return toq%2!=0;//toq bo'lsa true } int main(){ // srand(time(0)); int n; cout<<"massiv elementlari : "; cin>>n; ...
ALGO
0.9991
3.859255
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-30T07:55: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": "7e1a51078381...
0d8d970f-0c36-4c6c-98c0-d87223254452
ryan-fauder/Dijkstra-Algorithm
main.cpp
#include <iostream> #include "dijkstraAlgorithm.hpp" using namespace std; int main(){ int qtt_vertices, qtt_edges; int first, second, weight; AdjacencyList list; vector<int> parent; vector<int> distance; cin >> qtt_vertices >> qtt_edges; list = createAdjacencyList(qtt_vertices); while(qtt_edges--){ ...
ALGO
0.99997
4.51663
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-09-07T20:40: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": "8b770752d7...
8fde4dd0-86f2-4656-be41-2af42b0a65eb
mwy3055/Algorithm-codes
baekjoon/cpp/c++/16562.cpp
// SCC에서 친구비가 가장 작은 원소만 더한다? #include <bits/stdc++.h> using vi = std::vector<int>; using pii = std::pair<int, int>; int n, m, k, cost[10001]; vi graph[10001]; std::vector<vi> groups; bool visit[10001]; void make_scc(int root) { std::queue<int> q; vi group(0); q.push(root); visit[root] = true; gr...
ALGO
0.999993
4.301148
{ "github_metadata": { "branch": "main", "commit_count": 1073, "repo_created_at": "2022-01-08T11:18:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8c4857bf...
868a6d31-f477-4699-a8b3-24c69b8e0de8
mzry1992/ACMICPCTemplate
newTempalte/tool/integer120.cpp
struct integer { long long pa, pb; integer() {} integer(long long _pa, long long _pb) { pa = _pa; pb = _pb; } integer negate() { if (pa == 0 && pb == 0) return integer(pa, pb); else if (pa == 0) return integer(pa, -pb); else return integer(-pa, pb); } integer operator...
ALGO
0.999031
4.395809
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2012-09-25T13:54:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 70, "forks": 27, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "49a19bc...
4833d9a2-cea1-489e-9947-3b0423f87944
YetChunF/CSCI-115-
Term Project/Part2.cpp
#include <iostream> #include <unordered_map> #include <vector> using namespace std; //Brute Force Solution bool bruteForce(vector<int> vec, int target) { //Time = O(n2) because it have to go through the array again and again int n = vec.size(); for (int i = 0; i < n;i++) { //Remain for (int j = i + 1; j < n;j++...
ALGO
0.999864
5.900138
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2020-11-07T04:45: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": "c08370f6c6f...
8bd3d40b-5406-468f-8172-a633edb1743e
billycheung/HackerRank
data-structure/linked-list/full-linked-list-example.cpp
#include <iostream> #include <stack> using namespace std; struct Node { int data; struct Node *next; }; void Print(Node *head) { if (head != NULL){ cout << head->data << endl; Print(head->next); } } Node* InsertHead(Node *head, int data){ Node* temp = new Node(); temp->dat...
ALGO
0.999882
4.995526
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2017-05-14T13:37: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": "90638361af...
f32a36a2-97d5-4467-be69-1fcf942e501d
arangodb/arangodb
3rdParty/boost/1.78.0/boost/geometry/srs/projections/proj/eqdc.hpp
// Boost.Geometry - gis-projections (based on PROJ4) // Copyright (c) 2008-2015 <NAME>, Amsterdam, the Netherlands. // This file was modified by Oracle on 2017, 2018, 2019. // Modifications copyright (c) 2017-2019, Oracle and/or its affiliates. // Contributed and/or modified by <NAME>, on behalf of Oracle. // Use, m...
ALGO
0.940249
4.557804
{ "github_metadata": { "branch": "devel", "commit_count": 51986, "repo_created_at": "2011-10-26T06:42:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13878, "forks": 857, "issues": 743, "pull_requests": 38 }, "file_meta": { "content_id": ...
0be088e1-87e4-44d8-99e8-1fef8e656149
Sharjeel-Memon/LAB-TASKS
LAB TASK-9 PF/Q1 A LAB TASK-9.cpp
#include <stdio.h> int main() { int n; printf("Enter the Number of rows in terms of 'n' to print 2n+1 rows:"); scanf("%d",&n); for (int i = 0; i < n; i++) { for (int j = 0; j < n - i +1 ; j++) { printf(". "); } for (int j = 0; j < i + 1; j++) { p...
ALGO
0.999531
4.265772
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2024-09-14T13:22: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": "ba17a974dec...
6e66bb9b-3097-44dd-8591-6c2cefa51c87
lamhai2407/PTIT-baitapnho
CPP0805.cpp
#include <iostream> #include <fstream> #include <set> #include <sstream> #include <algorithm> using namespace std; // Hàm chuyển chuỗi về chữ thường string toLowerCase(string s) { transform(s.begin(), s.end(), s.begin(), ::tolower); return s; } // Hàm đọc từ file và lưu vào set void readWordsFromFile(const s...
ALGO
0.999622
5.029883
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-19T15:44: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": "2522136c05c7...
24698244-6d68-4e05-9f70-f494edfc5468
Mahajan-Sachin/leetcode
0014-longest-common-prefix/0014-longest-common-prefix.cpp
#include <iostream> #include <vector> #include <string> using namespace std; string longestCommonPrefix(vector<string>& strs) { if (strs.empty()) return ""; // Return empty string if input is empty // Use the first string as reference string prefix = strs[0]; // Compare with each string in the list ...
ALGO
0.999552
6.588224
{ "github_metadata": { "branch": "main", "commit_count": 668, "repo_created_at": "2024-08-26T07: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": "bbe722a9d7...
a67bb3fa-1772-45a2-98ee-a067bc0b23d0
Kartik-Mathur/CPPBatchJune26
L-42-DP/Test.cpp
#include <iostream> #include <cstring> // memset using namespace std; int lcs(string s1, int n, string s2, int m) { // base case if (n == 0 || m == 0) return 0; // recursive case if (s1[n - 1] == s2[m - 1]) return 1 + lcs(s1, n - 1, s2, m - 1); else return max(lcs(s1, n - 1, s2, m), lcs(s1, n, s2, m - 1)); } int...
ALGO
0.999848
4.555501
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2023-06-29T18:04:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62e4668cb3...
d5b20b3f-14cc-47a1-9dab-4d5c5384e297
jsmid/edu.smid
cpp_projects/0701_functions/lotto.cpp
#include <iostream> using namespace std; long double odds(unsigned numbers, unsigned picks); // This program calculates the odds of winning a lottery game based on the total number of numbers on the game card // and the number of picks made by the player. It prompts the user to enter these values and calculates the o...
ALGO
0.999779
4.278328
{ "github_metadata": { "branch": "Branch_init", "commit_count": 39, "repo_created_at": "2023-03-02T07:23:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d6d...
121c9cf1-3c3f-47cd-94d3-38fb541aecdc
qbolec/c
lekarstwo.cpp
#include<cstdio> int gcd(int a,int b){ if(!b)return a; return gcd(b,a%b); } int gcdex(int a,int b,int Awa,int Awb){ if(!b)return Awa; int c=a/b; return gcdex(b,a%b,Awb,Awa-Awb*c); } int abs(int x){ return x<0?-x:x; } int main(){ int a,b,d; while(1){ scanf("%d %d %d",&a,&b,&d); if(!a && !b && !d)...
ALGO
0.999938
3.613037
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2009-09-30T07:30: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": "26274c7d8a...
adcb7618-8c90-4fd7-b35e-fa8117d0fd19
lethinh26/Session12
Session12BT10.cpp
#include <stdio.h> #define MAX 100 int array[MAX]; int size = 0; int check = 0; void inputArray(); void printArray(); void insertArray(int pos, int value); void editArray(int pos, int value); void deleteArray(int pos); void sortArrayDown(); void sortArrayUp(); void findArrayLinear(int value); void findArrayBinary(int ...
ALGO
0.999772
3.804067
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-28T16:49:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d97c53d1c613...
bcc3a404-e2b8-44be-80b9-d3f6138f214d
abinsanty/Codeforces-Practice
Codeforces Round 903/A.cpp
#include <iostream> #include <string> #include <cstring> using namespace std; int t, n, m; string s, x; void solve() { int xlen = n; int o = 0; int xCount = 0; bool sFound = false; bool repeat = false; int matchS = 0; while(!sFound) { for(xCount; xCount < xlen; xCount++) { ...
ALGO
0.999919
3.683829
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-10-10T22:53: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": "c25ec77b3ffc...
93fc648c-34f3-4583-961c-a89d09360082
Farama-Foundation/ViZDoom
src/vizdoom/src/SkylineBinPack.cpp
/** @file SkylineBinPack.cpp @author <NAME> @brief Implements different bin packer algorithms that use the SKYLINE data structure. This work is released to Public Domain, do whatever you want with it. */ #include <cassert> #include <limits.h> #include "templates.h" #include "SkylineBinPack.h" using namespace st...
ALGO
0.99882
6.945415
{ "github_metadata": { "branch": "master", "commit_count": 1911, "repo_created_at": "2015-06-26T18:38:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1862, "forks": 418, "issues": 31, "pull_requests": 2 }, "file_meta": { "content_id": "5c...
fb02aeb4-5611-4eac-adf2-37af159160ed
StarQTius/Genetic-Collision-Avoidance-System
include/ltl/Range/actions.h
#pragma once #include "../algos.h" #include "../concept.h" #include "../functional.h" #include "Taker.h" namespace ltl { namespace actions { using std::begin; using std::end; struct AbstractAction {}; struct AbstractModifyingAction : AbstractAction {}; template <typename T> constexpr bool IsAction = std::is_base_...
TOOL
0.986509
6.00489
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2020-11-03T16:32:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ff83592794ca...
e1f989a5-c951-4b68-bbdf-bb370b2b7cf8
alxsoares/OI
sgu/code/p147_std.cpp
#include <cstdio> #include <cstdlib> #include <ctime> #include <algorithm> using namespace std ; const int INF= 0x7fffffff; struct NODE {int x, y;}; NODE b, w, bw; int N, Step, Ans= INF; int main() { freopen("t.in", "r", stdin); scanf("%d%d%d%d%d%d%d", &N, &b.x, &b.y, &w.x, &w.y, &bw.x, &bw.y); if(abs(...
ALGO
0.999942
3.169295
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2013-06-29T20:25:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ecfe4485c...
d9efbced-dddf-42fd-b76a-1ae6d9c385fc
thiagofons/google-prep
LeetCode/Graphs/FindIfPathExistsInGraph.cpp
#include <vector> #include <stack> #include <iostream> using namespace std; class Solution { public: bool validPath(int n, vector<vector<int>>& edges, int source, int destination) { stack<int> s; s.push(source); for (vector<int> edge : edges) { if (edge[1] == destination) return true; ...
ALGO
0.999879
6.189188
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2025-05-07T17:57: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": "d537181496d...
a6e3687d-cce3-4693-9c45-d2657d352d67
teddylfwu/RandomBinning
codes_KRR_randbin/include/Matrices/DMatrix.hpp
// The DMatrix class implements a dense matrix in double precision. A // substantial portion of the methods in this class are wrappers of // BLAS2, BLAS3, and LAPACK routines. The implementation tends to be // coherent with Matlab constructs. The matrix data is stored by using // column major order. // // In addition, ...
TOOL
0.995927
5.781967
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2016-01-18T20:40:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82fda08b1...
5767e1b0-0c28-4d54-a814-8b1314f08c9e
Supr3me-code/dsa-cp
striver-dsa-sheet/arrays-1/0-1-2-sort.cpp
// Given an array nums with n objects colored red, white, or blue, sort them // in-place so that objects of the same color are adjacent, with the colors in // the order red, white, and blue. // We will use the integers 0, 1, and 2 to represent the color red, white, and // blue, respectively. // You must solve this pr...
ALGO
0.999924
6.185211
{ "github_metadata": { "branch": "master", "commit_count": 289, "repo_created_at": "2022-02-04T15:08: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": "64b7217f...
dd1364dd-5f86-4637-b179-b0e78eae1abd
tasilareddy/SUDOKO-SOLVER-
Sudokosolver.cpp
#include <bits/stdc++.h> using namespace std; int recursiveCalls = 0; // Counter for recursive calls bool isValid(vector<vector<char>>& board, int row, int col, char c) { for (int i = 0; i < 9; i++) { if (board[i][col] == c) return false; if (board[row][i] == c) return false; if (board[3 ...
ALGO
0.999945
6.73077
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-04-03T19:49: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": "3dee55a5adaa...
7d3d2d02-4330-4d9f-9a6c-655a78b39942
Sebu/sprs
cpp/sprscode/trainermairal.cpp
#include "trainermairal.h" #include "dictionary.h" #include "coderlasso.h" #include "coderomp.h" #include "samples.h" #include "vigra_ext.h" #include <algorithm> #include <iostream> #include <fstream> //#include <Eigen/Array> TrainerMairal::TrainerMairal() : A_(0), B_(0) { } void TrainerMairal::save(const char* fileN...
DATA
0.987341
4.125046
{ "github_metadata": { "branch": "master", "commit_count": 443, "repo_created_at": "2012-08-29T13:59:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a81ea348...
c54ffabc-b82e-4d4a-8cd7-be43c0e2e254
ShaoQiBNU/coin
choir.cpp
#include <iostream> #include <algorithm> using namespace std; int n, k, d, a[50]; long long dmax[11][51], dmin[11][51]; int main() { // 初始化边界 fill(dmax[0], dmax[1], 1); fill(dmin[0], dmin[1], 1); cin >> n; for (int i = 1; i <= n; ++i) cin >> a[i]; cin >> k >> d; for (int i =...
ALGO
0.99995
3.573134
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2018-07-26T06: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": "e8af6dd72...
f9467fee-5b7b-48d2-a1d0-79ac4dd465a5
Nikoleta-v3/ESS-conditions-indirect-reciprocity-with-noise
Game.hpp
#ifndef GAME_H #define GAME_H #include "Norms.hpp" class Game { public: double assessment_error; double perception_error; double mu_e; Norm norm; Norm r_norm; double equilibrium_state; double resident_coop; static constexpr Reputation B = Reputatio...
ALGO
0.996815
5.272849
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-06-23T04:08: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": "cfc2623cfe91...
8f0da004-3c42-4944-aeab-7ff16a4f9d52
YuriiMikitiy/NaftaWork
ІП-22-1,Микитій_Юрій/8Laba.cpp
#include <iostream> #include <vector> // Функція для обміну значень двох елементів void swap(int& a, int& b) { int temp = a; a = b; b = temp; } // Функція для розділення масиву для швидкого сортування int partition(std::vector<int>& arr, int low, int high) { int pivot = arr[high]; int i = low - 1;...
ALGO
0.999977
6.106911
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-12-23T22:49: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": "4f1863ecc2c9...
2b60d7e1-ab0f-4edb-b4be-1887d4b53435
RickyL-2000/cpp-learning
ece/ece120/mt1_p6.cpp
#include <iostream> #include <math.h> int main() { /* declare variabes */ int X, Y, i, sum = 0; /* ask user to input X and Y */ printf("Please input two positive integers X, Y such that X > Y: "); /* collect user input */ scanf("%d %d", &X, &Y); /* check if X is larger than Y. If not, print...
ALGO
0.999905
4.130072
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2019-06-15T01:55: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": "5a8c2143...
0f140ae3-1163-42b5-a30f-abc325d5679c
xqoasis/basic-algo-structure-implement
algo_structure/trie.cpp
#include <iostream> #include <type_traits> #include <vector> using namespace std; class Trie{ private: // value is its index bool isWord = false; Trie * children[26] = {}; public: // insert // search void insert(string word){ Trie * cnt = this; for (char c : word){ int n = c - 'a';//int i...
ALGO
0.999746
4.506023
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-11-17T05:37: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": "1e59e7962246...
d10ed28e-0a33-4909-b788-b002665be51f
BackupTheBerlios/libherdstat-svn
trunk/herdstat/portage/package_finder.hh
/* * libherdstat -- herdstat/portage/package_finder.hh * $Id$ * Copyright (c) 2005 <NAME> <<EMAIL>> * * This file is part of libherdstat. * * libherdstat 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...
TOOL
0.994245
6.705362
{ "github_metadata": { "branch": "master", "commit_count": 227, "repo_created_at": "2015-08-16T05:24: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": "908577e5...
391fc6a1-a65a-4eba-8af9-82f41ec06690
ksherbina/numerical_optimization
programming_hw1.cpp
//Function, inputs, and parameters for problem 2a of homework 1 in ISE 520 Fall 2017 #include <iostream> #include <cmath> #include <stdio.h> //include printf #include <time.h> //for clock_t, clock, CLOCKS_PER_SEC #include <valarray> #include "golden_section_search.h" #include "dichotomous_search.h" using std::valarra...
ALGO
0.999735
5.054332
{ "github_metadata": { "branch": "master", "commit_count": 130, "repo_created_at": "2017-09-10T21:17:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa7edb3f...
1115c1e7-60a4-4000-bc21-41043bce414e
ME495-Navigation/slam-project-sdalal1
turtlelib/src/diff_drive.cpp
#include "turtlelib/diff_drive.hpp" #include <iostream> namespace turtlelib{ DiffDrive::DiffDrive(double track, double radius){ wheel_track = track; wheel_radius = radius; trans=Transform2D(); psi = wheel_positions{0.0,0.0}; twist = Twist2D{0.0,0.0,0.0}; } DiffDrive::DiffDrive(Transform2D t, doub...
ALGO
0.999119
5.844162
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2024-01-04T22:47:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "d0894472dacc...
a174c511-b52f-48a1-aa42-f42e46b4550d
noahpy/adventofcode24
03/puzzle1.cpp
#include "../lib/parseutils.h" #include "../lib/regexutils.h" #include <iostream> typedef size_t Acc; void f(Acc& acc, std::string line) { auto matches = reutils::getMatchesList(line, "(mul\\(\\d+,\\d+\\))"); auto func = [](Acc& mul, std::string s) { auto first = s.substr(0, s.find(',')); a...
TOOL
0.956884
5.092886
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2024-12-06T05:51: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": "08ca3aa86...
904e3b35-18d8-4bb6-9268-a58731cd6bf1
mindspore-ai/mindspore
mindspore/ccsrc/plugin/device/ascend/optimizer/ir_fusion/clip_by_value_fusion.cc
/** * Copyright 2020-2021 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicabl...
ALGO
0.998084
7.340469
{ "github_metadata": { "branch": "master", "commit_count": 83896, "repo_created_at": "2020-02-11T08:43:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4559, "forks": 740, "issues": 181, "pull_requests": 20 }, "file_meta": { "content_id": ...
f3f93152-021e-4cc8-8aba-e8fd1e5f8b8e
Pallav3198/n-ary_trees
kth_largest_element.cpp
#include<iostream> #include<vector> #include<stack> #include<limits> using namespace std; struct Node{ int data; vector<Node*>children; }; Node*create_newnode(int data){ Node*newnode = new Node; newnode->data = data; return newnode; } Node*constructor(vector<int>path){ stack<Node*>st; Node*r...
ALGO
0.999973
3.748975
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-01-30T17:10: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": "d00a0d1ee8...
11a434bf-476a-478d-9b64-707ca3724058
zjsxzy/algo
Uva/P459.cpp
#include <map> #include <set> #include <list> #include <cmath> #include <queue> #include <stack> #include <bitset> #include <vector> #include <cstdio> #include <string> #include <sstream> #include <cstdlib> #include <cstring> #include <iostream> #include <algorithm> using namespace std; const int MAXN = 111; int N; in...
ALGO
0.999434
3.704827
{ "github_metadata": { "branch": "master", "commit_count": 1296, "repo_created_at": "2013-05-18T10:52:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1c3a6af...
f9e005e7-8514-448e-b59d-0f50ccbb3a50
TeraokaKanekoLab/Tree-Decomposition
archive/src/walk-compare.cpp
#include <algorithm> #include <chrono> #include <fstream> #include <iostream> #include <queue> #include <random> #include <stdlib.h> #include <string> #include <time.h> #include <vector> #define MAX_TREE_WIDTH 100 #define INTERVAL 10 using namespace std; string file_name; string filename; string path; struct graph ...
DATA
0.995732
4.610572
{ "github_metadata": { "branch": "master", "commit_count": 349, "repo_created_at": "2020-09-26T08:37:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a970fdd34...
2cf34f9f-a61e-4de0-91f8-a64e41f25406
flameshimmer/leet2022
ReverseNodesinkGroup.cpp
#include "stdafx.h" //Given the head of a linked list, reverse the nodes of the list k at a time, and //return the modified list. //k is a positive integer and is less than or equal to the length of the linked //list. If the number of nodes is not a multiple of k then left-out nodes, in the //end, should remain as it ...
ALGO
0.999656
5.794352
{ "github_metadata": { "branch": "newMain", "commit_count": 113, "repo_created_at": "2022-05-31T18:51: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": "7e434aa...
6ae11837-39a7-4af8-8746-8d31106775e1
eternity6666/life-in-acm
practive/ICPC/2018/BeiJing/a2.cpp
#include <bits/stdc++.h> #define fei(a, b) for(int i = a; i <= b; i++) #define fej(a, b) for(int j = a; j <= b; j++) #define fni(a, b) for(int i = a; i < b; i++) #define fnj(a, b) for(int j = a; j < b; j++) using namespace std; const int maxn = 100 + 5; int dx[] = {1,0,-1,0}; int dy[] = {0,1,0,-1}; char c[maxn][maxn];...
ALGO
0.999943
3.734578
{ "github_metadata": { "branch": "master", "commit_count": 237, "repo_created_at": "2018-04-03T15:40: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": "342ec6d4...
de14a378-d956-4b81-bef6-65bde5a50126
raincross7/code-similarity
codes/train_code/problem342/problem342_386.cpp
#include <bits/stdc++.h> //#define endl '\n' #define modulo 1000000007 #define int long long #pragma GCC optimize("-Ofast") #define float double #define PI 3.141592653589793238462643383279502884 #define sinDegrees(x) sin((x) * PI / 180.0) #define t...
ALGO
0.99994
3.572114
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "338660eef74d...
85c36401-4774-4bf4-86c5-99d9a8f236c8
zonglinpeng/Game-Of-Life
PA5/Ant.cpp
/* * Ant.cpp * * Created on: Feb 18, 2018 * Author: Peng */ #include "Ant.h" #include <vector> #include <cstdlib> using namespace std; Ant::Ant(vector<vector<Organism*> > &g, int x, int y): Organism(g, x, y) { // TODO Auto-generated constructor stub } /** * defines the function "move" outside the abstr...
ALGO
0.998516
4.140007
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-02-01T20:52: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": "062fe6af0...
dc62dd81-180e-4415-bf1e-20a092b8a548
Gustavo-mts/estrutura_de_dados
stack/stack_burn/main.cpp
#include <iostream> #include <vector> #include <stack> #include <sstream> #include <time.h> #include <unistd.h> using namespace std; struct Position { int line; int column; Position(int line, int column) : line(line), column(column) {}; }; void toShow(vector<string> forest) { for(auto elem : forest) ...
ALGO
0.999108
4.186857
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-04-05T00:56: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": "5367d64a6b8f...
e9f2afb1-e3ce-4f25-82eb-4ae9aa18b2e7
qq734628996/ac-code
ZOJ/1074/18606077_AC_0ms_408kB.cpp
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i = 0; i < n; i++) #define PER(i,n) for(int i = n-1; i >= 0; i--) #define FOR(i,l,r) for(int i = l; i <= r; i++) #define ROF(i,l,r) for(int i = r; i >= l; i--) #define DEBUG(x) cout << #x << "=" << x << endl; #define SHOW1(A,n) { REP(i,n-1) printf(...
ALGO
0.999979
3.416967
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-05-23T08:33: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": "dbe0ec6acc...
8de405f4-a0ad-4ee5-97a1-e42b56931914
kamyu104/LeetCode-Solutions
C++/maximum-sum-of-3-non-overlapping-subarrays.cpp
// Time: O(n) // Space: O(n) class Solution { public: vector<int> maxSumOfThreeSubarrays(vector<int>& nums, int k) { const auto n = nums.size(); vector<int> accu = {0}; for (const auto& num : nums) { accu.emplace_back(accu.back() + num); } vector<int> le...
ALGO
0.99952
6.497694
{ "github_metadata": { "branch": "master", "commit_count": 19395, "repo_created_at": "2018-10-11T17:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4939, "forks": 1616, "issues": 1, "pull_requests": 55 }, "file_meta": { "content_id": ...
df8467dd-2079-4229-ae47-9b61ae3f5636
101magikarp101/USACO
usaco-guide/gold/dp/2017-jan-gold-2.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <queue> #include <map> #include <cmath> #include <iomanip> #include <cstring> #include <bitset> #include <string> #include <unordered_map> using namespace std; #define ll long long #define pll pair<ll, ll> #define pii pair<int, int> #d...
ALGO
0.999797
3.906595
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2024-09-25T15:08: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": "a24a22737bf...
f0e7c587-68b3-4830-ba30-73839d02a812
IgnaOromendia/Competitve-Programming-Problems
solutions/primes_path.cpp
#include <iostream> #include <vector> #include <cstring> #include <algorithm> #include <math.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vector<int> > mat; typedef pair<int,int> pi; #define pb push_back #define mp make_pair #define forn(i,from,to) for (int i = from; i < to; ...
ALGO
0.999972
3.879618
{ "github_metadata": { "branch": "main", "commit_count": 252, "repo_created_at": "2023-07-18T21:06: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": "6325302f27...
83cbe002-83bf-4ed1-b06d-43573cc06f49
chorogchip/PS
PS_BOJ/3020.cpp
#include<iostream> #include<cstdlib> #include<algorithm> #include<vector> #include<cstring> #include<string> #define fore(i, n) for (int i = 0; i != (n); ++i) #define FAST cin.sync_with_stdio(false); cin.tie(nullptr); #define endl '\n' using namespace std; int N, H, D[501010], T[501010], M = 2110101010, C, X, Y; int ...
ALGO
0.999993
3.65521
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-06-23T14:21: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": "e23ea06550f3...
312ed5a6-562a-40d8-a4d0-6686e63ca6be
vazgriz/VkColors
CoralGenerator.cpp
#include "CoralGenerator.h" #include <chrono> #include <iostream> #include <iomanip> CoralGenerator::CoralGenerator(ColorSource& source, ColorQueue& colorQueue, Options& options) : m_bitmap(options.size.x, options.size.y) { m_source = &source; m_queue = &colorQueue; m_running = std::make_unique<std::at...
ALGO
0.925084
6.26372
{ "github_metadata": { "branch": "master", "commit_count": 166, "repo_created_at": "2018-05-29T18:16:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3b51045...
4f4f0d84-6d95-42be-8fcc-e4ae297b256d
aneeshroy/infectious-disease-simulation
infect_lib.h
#pragma once #include <iostream> #include <string> #include <vector> #include <cstdio> #include <time.h> class Person { public: int status = 0; bool is_susceptible() { return (status == 0); } bool is_infected() { return (status > 0); } bool is_stable() { return status == -1; } string status_string()...
ALGO
0.994416
4.075983
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-12-22T05:40: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": "983c7b10fadc...
b54a12ca-ed39-4cdb-bec4-ddcf723d83af
MichaelMSP/Aoc22
Day2.cpp
#include <iostream> #include <string> #include <optional> #include <vector> #include <fstream> #include <algorithm> #include <numeric> #include <tuple> #include "days.h" namespace Day2 { enum choice { Rock = 1, Paper = 2, Scissors = 3 }; auto DetermineChoice(char c) { if (c == 'A' || c == 'X') { retur...
ALGO
0.999836
5.394761
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-12-22T09:47: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": "58f2afdcaf5...
b2e5b020-0425-438a-b935-85d2cf6ecfec
MariaCalderonV/Programacion-Basica
Practica 50.cpp
#include <iostream> #include <time.h> // Para rand() y time() using namespace std; int main() { int matriz[5][5]; // declara una matriz de 5 por 5 int i, j; srand(time(0)); // Inicializar la semilla de números aleatorios for (i = 0; i < 5; i++) { for (j = 0; j < 5; j++) { cout <...
ALGO
0.973433
4.45511
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-04-10T22:58: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": "b28404ed6c30...
2acd919a-59d8-4a66-a111-906d16935710
raae7742/Programmers
Level1/키패드 누르기.cpp
#include <string> #include <vector> #include <iostream> using namespace std; string solution(vector<int> numbers, string hand) { string answer = ""; int left = 10, right = 12; for (int i = 0; i < numbers.size(); i++) { switch(numbers[i]) { case 1: case 4: ...
ALGO
0.999986
5.331917
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2022-05-14T14: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": "5804c1437c5...
60a9a954-42bb-41d0-8914-5370a06bae33
Jisan10667/Problem-Solving-Practice
Codeforces Round 942 (Div. 2)/A/A.cpp
//<NAME> #include<complex> #include<queue> #include<set> #include<unordered_set> #include<list> #include<chrono> #include<random> #include<iostream> #include<algorithm> #include<cmath> #include<string> #include<vector> #include<map> #include<cstdio> #include<cstring> #include<string> #include<stdlib.h> #include<iomanip...
ALGO
0.999767
4.23192
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2023-12-28T12:30: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": "f2adc4a7eb9...
1bf6b305-dff4-405f-bfbe-59e568d38b31
bisVo159/DSA
43_DOUBLY_LINKEDLIST.cpp
#include<iostream> using namespace std; class node{ public: int data; node* prev; node* next; //constructor node(int d){ this->data=d; this->prev=NULL; this->next=NULL; } ~node(){ int value=this->data; if(next!=NULL){ delete next; ...
ALGO
0.999797
4.765939
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-03-25T07:46: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": "b8074467717f...
9d46baf7-52f4-43eb-b1d9-5992cb691551
VizKey01/My_Computer_Programing
vector/day12_sale.cpp
#include <bits/stdc++.h> using namespace std; #define fs first #define sd second int main(){ ios_base::sync_with_stdio(0);cin.tie(0); vector<string> sale; vector<double> price; string s; double x, N = 0; while(true){ cin >> s; if(s == "END") break; cin >> x; sale....
ALGO
0.998944
3.479329
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-11-21T20:06: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": "53921e00c8a...
09b7ae30-8bdd-4dd7-8447-b5e474ac5db7
YosidaMei/MT_2_1
main.cpp
#include <Novice.h> #include "Matrix.h" #include <imgui.h> const char kWindowTitle[] = "LD2A_11_ヨシダメイ"; const int kWindowWidth = 1280; const int kWindowHeight = 720; struct Sphere { Vector3 center; float radius; }; struct Line { Vector3 origin; Vector3 diff; }; struct Ray { Vector3 origin; Vector3 diff; }; st...
ALGO
0.972025
4.490602
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2023-06-23T01:57: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": "e970346d96...
f358bb4c-420e-47fe-bf83-01085d696817
guiblanchet/HMSC
src/fixParamPhylo.cpp
#include <RcppArmadillo.h> #include <Rcpp.h> #include "fixParamPhylo.h" using namespace arma ; using namespace Rcpp ; // Calculate Phylo parameters that do not change in the Gibbs sampler arma::field<arma::cube> fixParamPhylo(arma::mat& Phylo, arma::mat& iPhylo, double paramPhylo, Rcp...
ALGO
0.999389
6.304918
{ "github_metadata": { "branch": "master", "commit_count": 169, "repo_created_at": "2015-03-26T13:31:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 41, "forks": 13, "issues": 17, "pull_requests": 2 }, "file_meta": { "content_id": "53529...
1d35cdf0-7dd6-4660-9f73-14cf4e9e7d75
rocky946/data-structure-course
chapter10/bubble_sort1.cpp
// 改进的冒泡排序算法 #include <stdio.h> #include "seq_list.h" /** * 改进的冒泡排序 * @param R * @param n */ void BubbleSort1(RecType R[], int n) { int i, j; bool exchange; for (i = n - 1; i > 0; i--) { // 一趟排序前exchange置为假 exchange = false; for (j = 0; j < i; j++) { if (R[j].key > ...
ALGO
0.999983
3.890153
{ "github_metadata": { "branch": "master", "commit_count": 111, "repo_created_at": "2020-04-19T14:21: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": "4c8bce37...
69b29f78-033c-491c-a51c-d01545b5245b
leeiozh/infa4sem
lab3/main.cpp
#include <dolfin.h> #include "TentativeVelocity.h" #include "PressureUpdate.h" #include "VelocityUpdate.h" using namespace dolfin; // Define noslip domain class NoslipDomain : public SubDomain { bool inside(const Array<double>& x, bool on_boundary) const { return (on_boundary && (x[0] < DOLFIN_EPS...
ALGO
0.999906
5.463531
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2022-02-08T14:27:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9cf170008...
d7c4349b-46f7-490c-a365-0114e0d04e88
radiasoft/mlopal
src/Steppers/LF2.hpp
// // Class LF2 // Second order Leap-Frog time integrator // // Copyright (c) 2008 - 2020, <NAME>, Villigen PSI, Switzerland // All rights reserved // // This file is part of OPAL. // // OPAL is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published b...
ALGO
0.996769
5.866067
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-05-21T16:38:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f49aee592b8b3...
3e857ca7-0e92-408a-b5d5-5cb0d530118b
utkarsh-009/CP-Problem-Solving
Palindrome_Flipping.cpp
#include <bits/stdc++.h> #define ll long long #define mod 1000000007 using namespace std; void solve() { int n; cin >> n; vector<char> bin(n); int cnt0 = 0, cnt1 = 0; for (int i = 0; i < n; i++) { cin >> bin[i]; ((bin[i] - '0') ? cnt1++ : cnt0++); } if (n % 2 == 0 && c...
ALGO
0.999936
4.901285
{ "github_metadata": { "branch": "main", "commit_count": 242, "repo_created_at": "2022-07-17T15:13: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": "ba47fedcdb...
ba60023d-20d5-43f1-926a-3efaac05df35
Venu609/Final-project
main.cpp
#include <iostream> #include <fstream> #include <sstream> #include <iomanip> #include <vector> #include <cstring> // Define constants used in SHA-256 const unsigned int k[64] = { 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, ...
ALGO
0.999931
6.233326
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-10-18T04:31: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": "1c987c866b4c...
d72b72f2-4a4e-480f-9c81-5c1fbb1815be
mailcourses/mipt_basic_cpp_autumn_2023
seminar-04_2/matrix.cpp
#include <iostream> int** buildMatrix(int n, int m) { int** mt = new int*[n]; for (int i = 0; i < n; ++i) { mt[i] = new int[m]; } for (int i = 0; i < n; ++i) { for (int j = 0; j < m; ++j) { std::cin >> mt[i][j]; } } return mt; } voi...
ALGO
0.999648
4.185793
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2023-09-15T23:01:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7bc74ae3ad3a...
bb4a3a3f-ba1c-46f1-9c6f-12713b54395d
Jcannon4/Semaphore
belt.cpp
#include "belt.h" #include "production.h" using namespace std; Belt::Belt(int limit) { //Counters to track progress of proudcers and consumers Belt::consumption_counter = 0; Belt::production_counter = 0; //max is our breaking limit Belt::max = limit; //Acutal queue that will hold candies ...
ALGO
0.999299
4.788301
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2021-04-12T21:11: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": "1d1a81c5340...
5c5a3de0-525e-48c0-995d-b57e8a6e7282
sounishnath003/practice-180D-strategy
day-5-linkedLists/merge-sorted-ll.cpp
// Merge two sorted Linked List // advanced without space - using stack space concept #include<bits/stdc++.h> using namespace std ; #define fo(i, n) for(int i = 0; i < n; i++) #define foo(i, k, n) for(int i = k; i < n; i++) #define deb(x) {cout << #x << " " << x << endl ;} #define IOS ios::sync_with_stdio(false), cin.t...
ALGO
0.999996
4.955839
{ "github_metadata": { "branch": "master", "commit_count": 103, "repo_created_at": "2020-06-30T16:31:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "05284448...
ad324541-bd53-4b88-8671-eab962d66374
XinaiLU/Solution-to-the-Rubik-s-Cube
main.cpp
#include <assert.h> #include <algorithm> #include <cmath> #include <iostream> #include <queue> using namespace std; // 定义结构体,存储魔方每一个状态以及在对应状态时刻之前的操作 struct mofang { char qian[4][4]; char hou[4][4]; char zuo[4][4]; char you[4][4]; char shang[4][4]; char xia[4][4]; queue<int> steps; } init; // 用于BFS算法...
ALGO
0.999985
3.224818
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-11-18T04:21:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5f54db45967...
43796592-cc68-424e-888e-adeef1f5c2a5
nqviet/ChineseChessEngine
src/position.cpp
#include <algorithm> #include <cstring> // For std::memset, std::memcmp #include <sstream> #include "position.h" #include "thread.h" #include "tt.h" #include "misc.h" namespace PSQT { extern Score psq[PIECE_NB][SQUARE_NB]; } namespace Zobrist { Key psq[PIECE_NB][SQUARE_NB]; Key side; } namespace { const std::s...
ALGO
0.99856
4.229387
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2018-02-27T03:58:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "7dbf9903f...
df83f4ef-6ecd-425f-9542-f5dda63d1dc9
abubakaristiak/Leetcode-Problems
Medium/_790_Domino and Tromino Tiling790. Domino and Tromino Tiling.cpp
/* ||-----------------------------------|| || <NAME> || || Chattogram Polytechnic || || Department of CST || || <EMAIL> || ||-----------------------------------|| */ #include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> ...
ALGO
0.999995
5.277621
{ "github_metadata": { "branch": "master", "commit_count": 457, "repo_created_at": "2024-07-02T10:55:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "065912e8...
bd49689d-f564-4e18-92a2-c2def23c7ad8
DanqingLiu/practice
coding4_5.cpp
/* Validate BST */ #include<iostream> #include<limits> #include <cstdlib> using namespace std; struct Node{ int data; struct Node *left; struct Node *right; }; struct Node* newnode(int data){ Node *node = new Node; node->data = data; node->left = NULL; node->right = NULL; return node; } bool v...
ALGO
0.99996
4.531423
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2018-08-22T04:34: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": "602848718...
d1faf615-02ef-4373-9f51-d5e14f129939
RobotLocomotion/drake
multibody/benchmarking/position_constraint.cc
// @file // Benchmarks for PositionConstraint. // // This highlights the performance difference between using the analytical // derivatives (via CalcJacobian) vs the AutoDiffXd differences. #include "drake/multibody/inverse_kinematics/position_constraint.h" #include <benchmark/benchmark.h> #include "drake/multibody/...
TEST
0.921849
7.782179
{ "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":...
c9bd700e-e086-4a9b-9160-1ed64593b670
VishalSingh-07/Cpp-Code
Lab 1,2,3/Problem2.cpp
/* Define a class Shape whose attributes are radius, length and width calculate the perimeter of the rectangle and circle. Use constructors and destructors. */ #include <iostream> using namespace std; class Shape { private: float radius; int length; int width; float pie; long int p...
TOOL
0.947597
4.104008
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-06-09T12: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": "a8af48f5ab81...
702e6489-2e55-4596-9819-87fc974527d2
ishandutta2007/codeforces-y
yuu/normal/1511/F.cpp
#include <bits/stdc++.h> using namespace std; int n, m; string s[8]; map<tuple<int, int>, int> mapped; map<int, int> valid_map; set<int> g[2000]; set<int> rg[2000]; bool is_end_state[10000]; int sz; class AhoCorasick { public: class Node { public: int next[256]; bool is_end; string...
ALGO
0.999974
4.237578
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:40: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": "79c7d65010d3...
1019bcf5-ab14-4eff-9da0-495a099edf33
shocker-0x15/rtcamp8
renderer/gpu_kernels/renderer_kernel_common.h
#pragma once #include "../renderer_shared.h" using namespace rtc8; using namespace rtc8::shared; using namespace rtc8::device; namespace nvdb = nanovdb; struct HitGroupSBTRecordData { uint32_t geomInstSlot; CUDA_DEVICE_FUNCTION CUDA_INLINE static const HitGroupSBTRecordData &get() { return *reinte...
ALGO
0.987569
6.644085
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2022-07-16T19:53:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b49ffeea10...
c8887d7e-2911-426f-a493-2e6ea335e1d7
GardianT/leetcode-training
25.k-个一组翻转链表.cpp
/* * @lc app=leetcode.cn id=25 lang=cpp * * [25] K 个一组翻转链表 */ // @lc code=start /** * 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)...
ALGO
0.999975
6.33358
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2019-02-26T09:23: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": "fea573aef...
b6155e89-d179-408c-99f0-4b780289d0aa
laplaceyc/Parallel-Programing
Single_Source_Shortest_Path/time_measure/SSSP_MPI_sync.cpp
#include <stdio.h> #include <stdlib.h> #include <mpi.h> #include <stack> #define MAX 2147364847 #define INF -1 #define false 0 #define true 1 #define BELLMAN_TAG 0 int main (int argc, char *argv[]) { int rank, size; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank)...
ALGO
0.999965
3.976212
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2016-10-23T08:24:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f4734768...
ae88c545-26b9-4d7f-a2cb-f8bdab408e0a
aswinvisva/optical_flow_algorithms
src/Main.cpp
#include <stdio.h> // #include <io> #include <opencv2/core.hpp> #include <opencv2/imgcodecs.hpp> #include <opencv2/highgui/highgui.hpp> #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include <iostream> #include <stack> #include <sys/stat.h> #include <string> #include "...
ALGO
0.994338
4.69452
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-04-28T12:46:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82ab6b49df13...
80bc0597-766a-4228-8d58-97fac8047eb6
thiagobrigida/Estrutura-de-Dados
Exercícios funções/exercicio_funcoes/main.cpp
#include <iostream> using namespace std; int exponencial(int a, int b){ if(b == 0) return 1; if(b < 0){ a = 1/a; b *= -1; } int result = a; for(int i = 1; i < b; i ++){ result *= a; } return result; } int logaritmo(int logari, int base){ if (logari == 1...
ALGO
0.99979
4.186749
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-10-28T17:19: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": "63db80ab40ab...
ab69eb9f-eb9a-4602-910a-4e68d6fb9bb4
ishandutta2007/codeforces-a
adamant/normal/908/C.cpp
#include <bits/stdc++.h> using namespace std; #define double long double #define int int64_t #define all(x) begin(x), end(x) signed main() { //freopen("input.txt", "r", stdin); ios::sync_with_stdio(0); cin.tie(0); int n, r; cin >> n >> r; int x[n]; double y[n]; cout << fixed << setpr...
ALGO
0.999921
4.02436
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fbf5c47a2a22...
72117dca-e5e9-4417-bc07-535e513f34d8
xivid/Advanced-Data-Structures
Graph/Dijkstra/main.cpp
#include <iostream> #include <cstdlib> #include <algorithm> #include <utility> #include <queue> #define MAXN 10001 using namespace std; bool vis[MAXN]; void Dijkstra(int dist[][MAXN], int d[MAXN], int u, int n) { int v; memset(vis, false, sizeof(vis)); priority_queue<pair<int, int>, vector<pair<int, int> >...
ALGO
0.999973
3.790777
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-06-20T16:43:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91d5609004...
1313d97e-b892-4971-9578-e46eb1f0c756
stereomatchingkiss/blogCodes2
image_clean_up_tool/vp_tree.hpp
#ifndef VP_TREE_HPP #define VP_TREE_HPP #include <cstdlib> #include <algorithm> #include <vector> #include <queue> #include <limits> // A VP-Tree implementation, by <NAME>. (<EMAIL>) // Released to the Public Domain // Based on "Data Structures and Algorithms for Nearest Neighbor Search" by <NAME> template<typename ...
ALGO
0.998997
6.262642
{ "github_metadata": { "branch": "master", "commit_count": 1480, "repo_created_at": "2013-09-05T11:21:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 100, "forks": 44, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "c5a7...
1c1beac2-00ad-4d06-a65a-a1a1b13dbf49
sxs-collaboration/spectre
src/Evolution/Systems/NewtonianEuler/Limiters/Flattener.cpp
// Distributed under the MIT License. // See LICENSE.txt for details. #include "Evolution/Systems/NewtonianEuler/Limiters/Flattener.hpp" #include <array> #include <limits> #include "DataStructures/DataVector.hpp" #include "DataStructures/Tensor/EagerMath/DotProduct.hpp" #include "DataStructures/Tensor/Tensor.hpp" #i...
ALGO
0.999712
7.014914
{ "github_metadata": { "branch": "develop", "commit_count": 17103, "repo_created_at": "2017-04-07T17:28:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 168, "forks": 202, "issues": 530, "pull_requests": 57 }, "file_meta": { "content_id": ...
1032c6a5-3a4f-495c-b724-ec200f297cd3
atique7465/algorithm_in_detail
Greedy_algorithms/Knapsack_greedy/knapsack_brute_force.cpp
/// choosing all subset of items and check whether it provides maximum profit or not. /// To choose all subset time complexity is O( 2^n ) #include<bits/stdc++.h> using namespace std; int n,p,w,sack_size; vector<int>selected_items; struct item { int profit,weight; item(int p = 0, int w = 0) { prof...
ALGO
0.999983
4.244435
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2020-01-28T13:36: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": "e087f3c44...
fdefa7f8-4ec2-4cf0-8ad7-790bdb8b627e
LakshmiSrikumar/CP-31
contest 994 div 2/mex_cycle.cpp
#include <bits/stdc++.h> using namespace std; // Function to find MEX of a set int MEX(const set<int>& s) { int mex = 0; while (s.find(mex) != s.end()) { ++mex; } return mex; } vector<int> assign(int n, int x, int y) { vector<int> a(n, -1); vector<set<int>> similar(n); for (int i ...
ALGO
0.999964
5.427909
{ "github_metadata": { "branch": "main", "commit_count": 95, "repo_created_at": "2024-12-11T16:06: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": "43772f9a125...
1b559a5e-4bc9-4988-875e-85e0f9719b18
bluesky0904/codetree-TILs
241126/가장 가까운 거리의 최댓값/maximum-of-nearest-distance.cpp
#include<iostream> #include <vector> #include <tuple> #include <queue> #include <functional> using namespace std; #define MAX_N 100000 #define INF (int)1e9 vector<pair<int, int>> graph[MAX_N + 1]; priority_queue<pair<int, int>, vector<pair<int, int>>, greater<>> pq; int dist[MAX_N + 1]; int n, m, a, b, c; void dijk...
ALGO
0.999952
4.031942
{ "github_metadata": { "branch": "main", "commit_count": 1377, "repo_created_at": "2023-11-12T08:32: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": "497c2553f...
fca9637d-2cf7-4b84-ab39-3565456dea4e
RaviKumar-Nemala/DATA-STRUCTURES
DYNAMIC_PROGRAMMING/MAX_SUM_WITH_NON_ADJACENT_ELEMENTS.CPP
#include<bits/stdc++.h> using namespace std; class Solution{ public : int max_sum_recursive(int arr[] , int idx ) { if( idx == 0) return arr[idx]; else if(idx ==1 ) return max(arr[idx ], arr[idx -1]); return max( ( max_sum_recursive(arr , idx-2) +ar...
ALGO
0.999861
5.077796
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-09-19T06:17: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": "12aa5ddbb6...
b0aede65-ac11-4111-a80f-b84cac5e777a
sicklincoln/MusicalMachineListeningUnityPlugin
BeatStatistics.h
//(c) <NAME> 2019 all rights reserved #pragma once #include "MMLLSTFT.h" //<NAME> 16/9/2014 //Beat Statistics; using first stages of a beat tracker. Form beat histogram, then take (assumed tempo independent) statistics: entropy, ratio of first to second peak, harmonicity (how much explained by multiple positions rel...
ALGO
0.975325
5.991429
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-09-03T22:53:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "955275b105...
3d7d2197-fd2c-4586-841d-1f9f4e4ac4be
anshi-a2/DSA-System-Design
leetcode/150. Evaluate Reverse Polish Notation.cpp
// PROBLEM : You are given an array of strings tokens that represents an arithmetic expression in a Reverse Polish Notation. Evaluate the expression. Return an integer that represents the value of the expression. Note that: The valid operators are '+', '-', '*', and '/'. Each operand may be an integer or another ex...
ALGO
0.99998
6.145925
{ "github_metadata": { "branch": "main", "commit_count": 189, "repo_created_at": "2021-10-03T12:43: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": "31e16fa4b7...
bc036a5a-121c-445f-8f40-35da8fe58097
kavin-kr/cp
coding_patterns/topological_sort/FcanConstruct.cc
#include <bits/stdc++.h> using namespace std; bool canConstruct(const vector<int> &originalSeq, const vector<vector<int>> &seqs) { // initialize unordered_map<int, int> inDegree; for (auto &v: originalSeq) inDegree[v] = 0; // build graph unordered_map<int, vector<int>> adjList; for (a...
ALGO
0.999907
5.654053
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2021-04-24T10:41: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": "3b5130dfa55...
92ef7d43-5693-4917-8852-c116f042f22c
cansadadeserfeliz/gmdh
GMDH/alglibinternal.cpp
/************************************************************************* Copyright (c) <NAME> (ALGLIB project). >>> SOURCE LICENSE >>> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation (www.fsf.org); ...
ALGO
0.999804
3.703049
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2014-03-24T17:26:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6bde02e105...
827290e3-6da6-4afd-b031-fb9af66812a2
ivabby/Competitive-Programming
CodeForces/CodeForces Contest/CodeForces Round #600/B - Silly Mistake.cpp
#include<bits/stdc++.h> #include<set> #include<iterator> #include<algorithm> using namespace std; #define forr(a,n) for(int i=a;i<=n;i++) #define MAX 1000000007LL #define mod 998244353 #define forn(n,a) for(int i=n;i>=a;i--) #define all(x) x.begin() , x.end() #define mp(x,y) make_pair(x,y) #define pb(x) push_back(x) #d...
ALGO
0.999987
3.997937
{ "github_metadata": { "branch": "master", "commit_count": 1202, "repo_created_at": "2019-10-10T18:52:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a670b1b...
a004b3a0-0cdb-4b54-ad85-1bc53cff8d3f
harshprajapati8347/CPP-DSA-CP
Platform Problems/mergeTwoSortedListsLINKEDLIST.cpp
// You are given the heads of two sorted linked lists list1 and list2. // Merge the two lists in a one sorted list.The list should be made by splicing together the nodes of the first two lists. // Return the head of the merged linked list. // Input : list1 = [ 1, 2, 4 ], list2 = [ 1, 3, 4 ] // Output : [1, 1, 2, 3, 4, ...
ALGO
0.999869
6.070977
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2022-08-19T14:02: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": "51e16a4666...
4bc97f98-7f1d-4d27-a9ea-a963a3bace7b
shivamanandrj9/CP-codes
graph theory/finding_bridges.cpp
/* सरस्वति महाभागे विद्ये कमललोचने | विद्यारूपे विशालाक्षि विद्यां देहि नमोऽस्तु ते || */ #include<iostream> #include<algorithm> #include<numeric> #include<set> #include<queue> #include<deque> #include<map> #include<cmath> #include<vector> #include<cstring> #include<iomanip> #include<climits> using namespace std; #d...
ALGO
0.99987
4.565911
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2021-10-04T12:05: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": "7e360df3d4...
bdff7009-3132-4a43-bee0-a3cf5d6eba34
0xamitdutta/Leetcode-Solutions
Shortest Subarray to be Removed to Make Array Sorted.cpp
class Solution { public: int findLengthOfShortestSubarray(vector<int>& arr) { int n = arr.size(); int l = 0, r = n-1; while(l < r && arr[l] <= arr[l+1]) l++; // Eliminate the right side i.e n-l-1 if(l == n-1) return 0; while(r > l && arr[r-1] <= arr[r]) r--; // Elimi...
ALGO
0.999993
6.002163
{ "github_metadata": { "branch": "master", "commit_count": 540, "repo_created_at": "2020-02-28T17:03: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": "b5201459...
cc4425f6-71ae-4c79-b8c6-cb4a187bec04
lekimson/CSDL-PTIT
BUOI4/CHUONG_5/Bai_11.cpp
#include <iostream> #include <stack> #include <string> using namespace std; // Hàm tính toán giá trị của biểu thức hậu tố int evaluatePostfix(string exp) { stack<int> s; int n = exp.length(); for (int i = 0; i < n; i++) { char ch = exp[i]; if (isdigit(ch)) { s.push...
ALGO
0.999819
5.142748
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-01-13T15:40: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": "5b4bd24a99f...
01a8a2c8-8d9b-47fd-8ce2-7fc440d3f0e2
GabrielNyawade/programming
object_oriented/twosum.cpp
#include <iostream> void find_constituents_of(int target, int array[], int len) { int num1, num2, valid_arrays = 0; for (int i = 0; i < len; i++) { num1 = array[i]; for (int j = i+1; j < len; j++) { num2 = array[j]; int result = num1 + num2; if (r...
ALGO
0.999661
5.038651
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2024-09-29T15:40: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": "cb09102f4f0...
5f4f55ad-1041-435a-b3d9-a5148fa5c4f6
snl-dakota/dakota
src/dakota_bit_utils.hpp
/* _______________________________________________________________________ Dakota: Explore and predict with confidence. Copyright 2014-2025 National Technology & Engineering Solutions of Sandia, LLC (NTESS). This software is distributed under the GNU Lesser General Public License. For more informa...
ALGO
0.987342
5.1645
{ "github_metadata": { "branch": "devel", "commit_count": 11511, "repo_created_at": "2021-08-17T16:32:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 120, "forks": 40, "issues": 14, "pull_requests": 4 }, "file_meta": { "content_id": "9096...
e1749e7d-4812-4774-8d40-139d49847296
RostyslavRomanets/ThreadPool
main.cpp
#include <iostream> #include <vector> #include "SimpleThreadPool.h" int main() { std::vector<int> v { 2, 5, 6, 7, 8, 9 }; auto taskSum = [&]() { int res = 0; for (auto i : v) res += i; std::this_thread::sleep_for(std::chrono::seconds(1)); return res; }; a...
TOOL
0.984852
5.839253
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-03-29T11:47:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3c8486e871...