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 |
|---|---|---|---|---|---|---|---|
34aa6f4f-66b8-4fb0-8ffb-fe54e94ce3b5 | invtfl-bharti/DSA-PROBLEM-SOLVING-ALL-PLATFORMS | Geeks-for-Geeks/9-04-24-Count-the-Triplets/9-04-24-Count-the-Triplets.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function template for C++
class Solution{
public:
int countTriplet(int arr[], int n)
{
// Your code goes here
unordered_map<int,int>freqMap;
for(int i=0;i<n;i++) {
freqMap[arr[i]]++;
}
... | ALGO | 0.999593 | 6.265637 | {
"github_metadata": {
"branch": "main",
"commit_count": 1025,
"repo_created_at": "2024-02-19T18:16:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8d8e6a079... |
6e19254f-c42b-4db6-8702-c88724d4d521 | lakshyadosi/100daysofcoding | Easy/Count Digits/count-digits.cpp | //{ Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution{
public:
int evenlyDivides(int number){
int numberCopy = number;
int count = 0;
/*
1. n%10 -> gives the reminder
exapmple: 54%10 -> 5
2. n/10 -> removes t... | ALGO | 0.999458 | 5.732986 | {
"github_metadata": {
"branch": "main",
"commit_count": 403,
"repo_created_at": "2024-06-13T17:29: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": "c721351187... |
8eb5aced-0083-411f-8c94-693f30b19964 | ghazal1998rabiei/Kattis | cudoviste.cpp | #include <bits/stdc++.h>
using namespace std;
int r, c;
char g[53][53];
int ans[5];
int main(){
cin >> r >> c;
for(int i = 0; i < r; i++)
for(int j = 0; j < c; j++)
cin >> g[i][j];
for(int i = 0; i < r - 1; i++)
for(int j = 0; j < c - 1; j++){
bool building = 0;
... | ALGO | 0.999782 | 3.789891 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2021-07-02T14:59: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": "36f4a1037037... |
af18ab39-1173-4bbe-a524-f4a50b441f63 | SujayVivek/Ok-lets-CP | 1700-1900/C_Hard_problem.cpp | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define ff first
#define ss second
typedef vector<vector<long long>> vvi;
typedef vector<long long> vi;
#define int long long
#define endl "\n"
void Solve() {
int n; cin>>n;
vi c(n,0);
vector<string> S, Srev;
for(auto &x: c) cin>>x;
... | ALGO | 0.999954 | 3.705453 | {
"github_metadata": {
"branch": "master",
"commit_count": 652,
"repo_created_at": "2024-01-02T17:40:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a9ad507e... |
b9aefbc3-297d-4690-9649-f44cbee03e43 | Apress/software-exorcism | chapter01/LogFramework.cpp | /* LogFramework.cpp -----------------------------------------------*/
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Declaration +
++++++++++++++++++++++++++++++++++++++++++++++++++++... | TOOL | 0.912831 | 5.466653 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-10-05T00:38:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 13,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9f4c9c8a16... |
14bc205b-dfe7-4e14-93c7-2b4dc072a1f1 | shrimaliashish/MyLeetCodeSolutions | Infix to Postfix - GFG/infix-to-postfix.cpp | //{ Driver Code Starts
// C++ implementation to convert infix expression to postfix
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
// Function to convert an infix expression to a postfix expression.
string infixToPostfix(string s) {
stack<char>st;
... | ALGO | 0.999769 | 5.884126 | {
"github_metadata": {
"branch": "main",
"commit_count": 497,
"repo_created_at": "2022-10-11T18:34: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": "09c51bb85c... |
846ece0b-c78e-434b-9069-910c8cdab0c0 | iltyty/Data-Structure-Implement | bstree/bstree.h | #ifndef __BSTREE_H_
#define __BSTREE_H_
#include "../bintree/bin_tree.h"
template <typename T> class BST : public BinTree<T> {
protected:
BinPos(T) _hot = nullptr;
protected:
BinPos(T)& search_in(const T &e, BinPos(T) & root, BinPos(T) & hot);
BinPos(T) remove_at(BinPos(T) &x, BinPos(... | ALGO | 0.999574 | 5.129315 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2020-01-22T13:06:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "92255659a... |
f9965941-e040-411a-9f1d-e615ece68083 | santhosh-4000/IPMP1921 | week9/DP/stackBoxes.cpp | //https://practice.geeksforgeeks.org/problems/box-stacking/1#
//O(n20 time O(n) space
void fillRotations(int height[],int width[],int length[],int n,
vector<vector<int>>& rotations) {
for(int i=0;i<3*n;i+=3){
int x=height[i/3],y=width[i/3],
... | ALGO | 0.999767 | 4.610629 | {
"github_metadata": {
"branch": "main",
"commit_count": 296,
"repo_created_at": "2021-04-03T09:33: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": "9f01b22a94... |
534dc095-1d04-4d7f-915a-93aa083d250f | LiuXinchen1997/MyOJRecord | Codeup/2117.cpp | /// WA :-(
#include <iostream>
#include <vector>
using namespace std;
#define N 505
vector<int> adj[N];
int ind[N];
bool visited[N];
int n, m;
bool init()
{
cin >> n >> m;
if (n == 0 && m == 0) { return false; }
for (int i = 1; i <= n; i++) {
ind[i] = 0;
visited[i] = false;
}
f... | ALGO | 0.999966 | 3.766336 | {
"github_metadata": {
"branch": "master",
"commit_count": 103,
"repo_created_at": "2018-01-21T14:48:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d135775e... |
6f9bd0e3-a250-4dfd-bd3b-392717df4660 | immuntasir/competetive-programming | library/Graph/dfs.cpp | #include <bits/stdc++.h>
using namespace std;
#define MAX 100010
vector <int> edge[MAX];
int visited[MAX];
int level[MAX];
int parent[MAX];
int dt[MAX];
int ft[MAX];
int shomoy;
void Input (int n, int m) {
int a, b;
shomoy = 0;
for (int i=0; i<n; i++) {
edge[i].clear();
visited[i] = 0;
... | ALGO | 0.999655 | 3.39251 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2016-10-12T02:08:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c4ecc3db9... |
1cd9ab9f-0017-4b51-8040-3ea281fd6b5d | moinulshaon/UVa-Problems | vol 11/1194__completed/1194.cpp | #include<iostream>
#include<vector>
#include <map>
#include <string>
#include<algorithm>
#include<queue>
#include<cstdio>
#include <cmath>
#include <cstring>
#include<ctime>
using namespace std;
#define MAX 300
#define NIL 0
#define INF (1<<28)
vector <int> G[MAX];
int n=50, match[MAX], dist[MAX];
// n: number of no... | ALGO | 0.99985 | 3.380578 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2016-07-05T15:35:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "51ea2a776... |
943d173b-ff8d-4ec4-a571-032e5f812acd | surinoel/boj | swea1206.cpp | #include <cstring>
#include <iostream>
using namespace std;
#define max(n, m) n > m ? n : m
#define min(n, m) n > m ? m : n
int mat[1000];
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
for (int tc = 1; tc <= 10; tc++) {
memset(mat, 0, sizeof(mat));
int n;
cin >> n;
for (int j = 0;... | ALGO | 0.999876 | 3.940246 | {
"github_metadata": {
"branch": "master",
"commit_count": 656,
"repo_created_at": "2019-03-26T19:53: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": "5596a0d6... |
817f1076-7911-4c04-a265-e5aadb230575 | hjmkt/AtCoder | ABC/abc186/d.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
#define REP(i, n, m) for(ll i=n; i<(ll)m; ++i)
#define IREP(i, n, m) for(ll i=n-1; i>=m; --i)
#define rep(i, n) REP(i, 0, n)
#define irep(i, n) IREP(i, n, 0)
#define all(v)... | ALGO | 0.999942 | 3.665888 | {
"github_metadata": {
"branch": "master",
"commit_count": 428,
"repo_created_at": "2019-04-13T13:51: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": "c12f491b... |
511d16a1-2896-4716-8477-e19598be06ab | NVIDIA/cutlass | include/cutlass/reduction/kernel/tensor_reduce_affine_strided.h | /***************************************************************************************************
* Copyright (c) 2017 - 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are p... | ALGO | 0.999321 | 7.030109 | {
"github_metadata": {
"branch": "main",
"commit_count": 667,
"repo_created_at": "2017-11-30T00:11:24.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 8078,
"forks": 1336,
"issues": 322,
"pull_requests": 54
},
"file_meta": {
"content_id": "25... |
489582dd-d1e8-4539-8cbf-fa112cab97b4 | cawhitworth/aoc23 | Day3/tests.cc | #include <catch2/catch_all.hpp>
#include "day3.h"
std::vector<std::string> sampleInput = {
"467..114..",
"...*......",
"..35..633.",
"......#...",
"617*......",
".....+.58.",
"..592.....",
"......755.",
"...$.*....",
".664.598.."
};
Part numbers[] = {
Part { "467", 0, 0 },
... | TEST | 0.929703 | 4.931252 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2023-12-08T10:45: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": "1e55f2d473d... |
394ec532-c32a-4131-8684-9e9c45527b8d | Pritishpattnaik7/C-DSA-My-practice-folder | Graphs/Problems/cycledirkahan.cpp | //cycle detection in undirected graph
//by Kahan's algo (BFS)
#include<bits/stdc++.h>
using namespace std;
bool isCyclic(int n, vector<int> adj[]){
vector<int> indegree(n, 0);
queue<int> q;
for (int i=0 ; i<n ; i++){
for (auto x : adj[i]){
indegree[x]++;
}
}
for (int i=0... | ALGO | 0.999888 | 4.231804 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-11-17T16:47: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": "94f13b4456... |
26d71137-2586-4306-a138-5cf828b45aab | ishandutta2007/codeforces-d | dpair/normal/342/E.cpp | //
#include <assert.h>
#include <ctime>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#define debug(...) fprintf(stderr, __VA_ARGS__)
#define rep(i,s,t) for(int i=(s),i##END=(t);i<=i##END;++i)
#define per(i,t,s) for(int i=(t),i##END=(s);i>=i##END;--i)
#define REP(i,s,t) for(int i=(s),i##EN... | ALGO | 0.999648 | 3.840604 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:31: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": "734034aa3f00... |
ddf54646-f864-4560-9fec-a381057d2794 | tars0x9752/atcoder | b/45.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string a, b, c;
cin >> a >> b >> c;
int ai = 0;
int bi = 0;
int ci = 0;
char next = 'a';
while (1) {
if (next == 'a') {
if (ai < a.size()) {... | ALGO | 0.999825 | 3.354645 | {
"github_metadata": {
"branch": "master",
"commit_count": 271,
"repo_created_at": "2019-04-22T05:04: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": "8feda3ef... |
732e7a6a-3119-4f3d-8b87-41df7bad8b5b | ishandutta2007/codeforces-s | snuke/normal/576/C.cpp | #include <cstdio>
#include <algorithm>
#include <stack>
#include <queue>
#include <deque>
#include <vector>
#include <string>
#include <string.h>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <map>
#include <set>
#include <iostream>
#include <sstream>
#include <numeric>
#include <cctype>
#define fi firs... | ALGO | 0.999969 | 3.99319 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:07:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c517bbaa0548... |
fbe9f6aa-eb25-4e68-8285-c3aef69a433f | kamleshbiloniya/demo | fair.cpp | #include<iostream>
#include<stdio.h>
#include<string.h>
#include <vector>
#include <string>
#include <cctype>
#include<math.h>
using namespace std;
int a[1000];
int item[100];
int count=0;
typedef struct Node{
int val;
struct Node *next;
}node;
node * arr[1000];
node *createNode(int a){
node *newnode = (node*)mal... | ALGO | 0.999929 | 3.165805 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2019-11-02T08:50: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": "1b1122c39... |
480f2be0-289c-4970-8282-ab69c9b6f38a | Krsmanovic-S/Leetcode-Exercises | Easy/268. Missing Number/main.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int missingNumber(vector<int>& nums) {
int size = nums.size();
sort(nums.begin(), nums.end());
// First element must always be a 0,
// last element must be equal to the size.
if(nums[0] != 0) return 0;
if(num... | ALGO | 0.99961 | 4.896764 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2022-04-08T10:04: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": "f2a62b70a01... |
d068a5d2-55a4-444c-99f8-9b24c06b1555 | dalabudda/studia-programowanie-obiektowe | CppLab3/Zwierze.cpp | #include "Zwierze.h"
#include "Komentarz.h"
#include <stdlib.h>
bool Zwierze::rozmnazaj(const int tura)
{
if (swiat->czyWolneMiejsceWOkolicyXY(x, y))
{
int X, Y;
do
{
X = rand() % 3 + x - 1;
Y = rand() % 3 + y - 1;
}
while(swiat->czyXYnalezyDoSwia... | ALGO | 0.963605 | 4.787873 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-10-21T17:56: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": "907a553023db... |
77af47b7-cd21-44ae-bda6-c6c782b43068 | AG-Philipsen/hopping-large-nt | pm.paths.cpp | //Created: 09-09-2013
//Modified: Tue 19 Aug 2014 11:32:57 CEST
//Author: <NAME> (<EMAIL>)
//Description: Implementation of the member functions of the class PMPath
#include"pm.paths.h"
namespace hop{
/* -- Print modifier initialisation -- */
/* ======================================================================... | TOOL | 0.921586 | 4.886999 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2016-06-23T21:10:38.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "2bde1a1e978... |
5cfcc4b0-69ba-4287-a6e1-6320cf0694ce | shadow-robot/simox_ros | sr_grasp_mesh_planner/src/sr_approach_movement_surface_normal.cpp | /*
* Copyright (c) 2013 Shadow Robot Company Ltd.
* All rights reserved.
*
* This code is proprietary and may not be used, copied, distributed without
* prior authorisation and agreement from Shadow Robot Company Ltd.
*/
/**
* @file sr_approach_movement_surface_normal.cpp
* @author <NAME> <<EMAIL>>
* @bri... | ALGO | 0.926372 | 5.441305 | {
"github_metadata": {
"branch": "master",
"commit_count": 193,
"repo_created_at": "2013-11-06T10:40:49.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 7,
"forks": 5,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "8172445d9... |
6932e86c-1c5a-4ddc-9bf3-8cb109015c99 | bergolho1337/Programming | C++/Codes-Book-Programming-Principles-In-C++/Ch4/ex14.cpp | // Optimize prime number generator and checker using Sieve of Erastosthenes. O(N log logN)
// It find all primes in the range [0,max]
#include <iostream>
#include <vector>
#include <bitset>
using namespace std;
vector<int> primes;
bitset<10000010> bs; // Can go up to 10^7 numbers
// It return the lis... | ALGO | 0.999664 | 4.833615 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2020-04-10T13:13:51.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8dd0c665ae... |
b6fc193d-84c8-426d-bbfa-c8c65359402f | CuzImBisonratte/getraenke-tanke | code.ino | //Getränketanke-Projekt von Findus_Friedrich und CuzImBisonbisonratte
//https://bit.ly/getränketanke
//Code verwendbar nach der MIT-License (https://bit.ly/getränketankelizenz)
//Definieren aller Motor-Pins an die die Rohdaten gesendet werden
int MotorPinA = 8;
int MotorPinB = 9;
int MotorPinC = 10;
int MotorPinD = 11... | ALGO | 0.980764 | 5.082983 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2021-08-11T20:34: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": "93915974e4a... |
755dae1a-77ee-4b10-9970-4d592b8c26ae | vihanagarwal18/leetcode | 1185-find-in-mountain-array/1185-find-in-mountain-array.cpp | /**
* // This is the MountainArray's API interface.
* // You should not implement it, or speculate about its implementation
* class MountainArray {
* public:
* int get(int index);
* int length();
* };
*/
class Solution {
public:
int binarysearch1(int left,int right,MountainArray &mountainArr,int&... | ALGO | 0.99998 | 5.662392 | {
"github_metadata": {
"branch": "main",
"commit_count": 1379,
"repo_created_at": "2024-08-11T06:31: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": "ff531e7bd... |
76cb12ca-e54f-4081-b4f1-f4a7b86f0a47 | Jay7221/competitve-programming | codeforces/normal_rounds/Round890/E.cpp | #include <bits/stdc++.h>
using namespace std;
//#pragma GCC optimize("Ofast,unroll-loops")
//#pragma GCC target("avx,avx2,avx512,fma")
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; }
template<typename T_container,... | ALGO | 0.999947 | 3.968665 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-12-20T15:54:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8b11ab6dfd73... |
cf4e562e-0a53-4e8b-a2ca-856d401fb5de | dotAadarsh/programs | CPP/arrayRotation.cpp | // Given an array of integers arr[] of size N and an integer, the task is to rotate the array elements to the left by d positions.
#include<bits/stdc++.h>
using namespace std;
void rotate(int arr[], int d , int n) {
int k = 0;
int temp[n];
d=d%n;
for(int i=d; i<n;i++) {
temp[k] = arr[i];
k++;
}
... | ALGO | 0.999959 | 5.499478 | {
"github_metadata": {
"branch": "main",
"commit_count": 99,
"repo_created_at": "2021-11-29T08:12: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": "86873da1bfb... |
69f9a435-13cb-44e7-8acc-6b04d3cc9e6d | ricklee209/Channel_Flow | Flux_Y_limiter.cpp |
#include <mpi.h>
#include <omp.h>
#include <math.h>
#include "Resolution.h"
extern int X_np;
#define min(a,b) (((a)<(b))?(a):(b))
#define max(a,b) (((a)>(b))?(a):(b))
void Flux_Y_limiter
(
// ============================================================================ //
int myid,
double (*U1_)[Y_m][Z_m] = n... | ALGO | 0.999794 | 3.89426 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2017-09-28T02:43:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "a8a062aa8f... |
4d84443a-0cd7-431b-8d9d-3cbaf26dd428 | oczhang2010/ContainerNoSearch | ContainerNoSearch/GetJZXNumber/numbernndoc.h | #ifndef C_MLP_NUMBER_CNN_DOC_H_H
#define C_MLP_NUMBER_CNN_DOC_H_H
#include "NeuralNetwork.h"
#include "error.h"
//#include <wx/string.h>
#define NUMBER_CNN_IMAGE_WIDTH 28
#define NUMBER_CNN_IMAGE_HEIGHT 28
#define NUMBER_CNN_MLP_VER_COUNT 10
#define PLACE_CNN_IMAGE_WIDTH 60
#define PLACE_CNN_IMAGE_HEIGHT 60
#define ... | CONFIG | 0.900679 | 3.785753 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-05-26T07:41: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": "7918f14179c1... |
988db6ad-a9ca-4442-b43e-068e500c0471 | ericpowerss/PageRank | AdjacencyList.h | #ifndef PAGERANK_ADJACENCYLIST_H
#define PAGERANK_ADJACENCYLIST_H
#include <string>
#include <vector>
#include <utility>
#include <map>
#include <algorithm>
#include <iomanip>
#include <set>
using namespace std;
class AdjacencyList
{
private:
map<string, vector<string>> outDegree;
map<string, vector<string>>... | ALGO | 0.998296 | 5.72334 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-07-12T02:12:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "62286b7bf10c... |
754ec532-eb5e-4224-933f-ca062bff8802 | vanhieuhp/internet-of-things | arduino/lesson3/traffic-light.ino | #define A 1
#define B 2
#define C 3
#define D 4
#define E 5
#define F 6
#define G 7
#define red1 8
#define yellow1 9
#define green1 10
#define red2 11
#define yellow2 12
#define green2 13
int flag = 1;
void setup()
{
for (int i = 1; i < 14; i++)
{
pinMode(i, OUTPUT);
}
}
void loop()
{
for... | ALGO | 0.930576 | 4.430906 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2023-04-26T14:02: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": "1dcb96d2c1... |
498d4aac-afc9-470a-8720-60a01653c855 | subhashreddykallam/Solves_Codeforces | B/680B.cpp | /* I feel the need... the need for speed. */
#include<bits/stdc++.h>
using namespace std;
# define ll long long
# define vll vector<ll>
# define vvll vector<vector<ll>>
# define vchar vector<char>
# define vstr vector<string>
# define vpll vector<pair<ll, ll>>
# define mll map<ll, ll>
# define sll set<ll>
# define scha... | ALGO | 0.999964 | 3.581859 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2018-11-19T13:19: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": "7d688e75f... |
c748fdda-f720-4333-b02e-75e681a27e3e | yfuka86/pc | atcoder/abcold/abc241/c/abc241_c.cpp | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define rep_r(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define rep2(i,sta,n) for(ll i=sta;i<(ll)(n);i++)
#define rep2_r(i,sta,n) for(ll i=(ll)(n)-1;i>=sta;i--)
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define mp ... | ALGO | 0.999981 | 5.528028 | {
"github_metadata": {
"branch": "main",
"commit_count": 549,
"repo_created_at": "2021-12-25T02:46:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "90254d6f7b... |
dd45003e-96e9-4f03-8f7d-c30a5c10f351 | GopherTeen/OJ_Code | Problems/Codeforces/1801-1900/1898/B_Milena_and_Admirer.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr int mod = 1e9 + 7;
void solve() {
int n;
cin >> n;
vector<int> vec(n);
for (int& v : vec) {
cin >> v;
}
ll ans = 0;
for (int i = n - 2; i >= 0; --i) {
if (vec[i] <= vec[i + 1]) {
con... | ALGO | 0.99972 | 4.425562 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2024-11-01T07:27: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": "419ed0c17... |
3c273184-b4d9-4324-aa7c-7b5b3842eb35 | ikhsaneff/DSAMidExam | LinkedList.h | #include <string>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
using namespace std;
class Node
{
public:
string data;
Node* next;
private:
void push(Node** headRef, string inputEquation);
void deleteHistory(Node** headRef, string key);
void printHistory(Node* he... | ALGO | 0.987841 | 3.812889 | {
"github_metadata": {
"branch": "main",
"commit_count": 40,
"repo_created_at": "2022-10-10T07:37: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": "b7de05cd90e... |
5d445b94-f9da-45ee-9ebf-65f6283e43d2 | thanh-nguyen03/CPP-Code | DSA/CodePTIT/CodePTIT-DSA-Freshman/DSA06001_SAP_XEP_XEN_KE.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
const long long mod = 1e9 + 7;
#define pb push_back
#define all(x) x.begin(), x.end()
#define vi vector<int>
#define vll vector<ll>
#define tester() int t; cin >> t; while(t--)
int n, a[1000000];
void run_test_case() {
cin >> n... | ALGO | 0.999984 | 4.054595 | {
"github_metadata": {
"branch": "main",
"commit_count": 62,
"repo_created_at": "2022-02-23T14:43:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8e947c8b3e6... |
e8845619-3066-4811-bf54-8106ee82c531 | farroshsy/CodeConnoisseurs | E-Olymp/282 - Sails.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;
template <typename _T>
inline void read(_T &f) {
f = 0; _T fu = 1; char c = getchar();
while(c < '0' || c > '9') { if(c == '-') fu = -1; c = getchar(); }
while(c >= '0' && c <= '9') { f = (f << 3) + (f <<... | ALGO | 0.999878 | 3.565237 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2022-07-04T13:12:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e89b353f6d1... |
c8e261a1-5bda-449b-81c4-5e86cf7bce19 | zjlllovo/CloudServer | clientTest/series.cc | #include "linuxHeader.h"
#include <cstdio>
#include <workflow/RedisMessage.h>
#include <workflow/WFFacilities.h>
#include <workflow/WFTask.h>
#include <workflow/WFTaskFactory.h>
#include <workflow/Workflow.h>
static WFFacilities::WaitGroup waitGroup(1);
void sigHandle(int num) {
fprintf(stderr, "Ctrl C signal shutd... | TOOL | 0.956865 | 3.223844 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-11-22T16:27: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": "34049bdcc3dc... |
681493d0-29d6-4a37-b1eb-35ac2428e4a8 | Jasonchan35/ax_project_gen | src/Util/Vector.h | #pragma once
#include <vector>
namespace ax_gen {
template<typename T>
class Vector {
public:
void popBack () { _p.pop_back(); }
void append (const T& v) { _p.push_back(v); }
void extend (const Vector<T>& rhs) { for (auto& p : rhs) append(p); }
template<typename... ARGS>
T& emplaceBack(ARGS&&...... | TOOL | 0.954164 | 5.985286 | {
"github_metadata": {
"branch": "master",
"commit_count": 226,
"repo_created_at": "2017-04-03T21:40:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "59f93cbd... |
efff36f7-4df1-4203-80fc-1168232bfcb1 | HowardChengUleth/Contest | uva/11280.cc | #include <iostream>
#include <map>
#include <string>
#include <climits>
using namespace std;
void solve()
{
int N;
cin >> N;
map<string, int> name;
for (int i = 0; i < N; i++) {
string city;
cin >> city;
name[city] = i;
}
int cost[100][100];
for (int i = 0; i < N; i++) {
for (int j ... | ALGO | 0.999281 | 3.939672 | {
"github_metadata": {
"branch": "master",
"commit_count": 600,
"repo_created_at": "2020-05-11T16:38:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f244ccc4... |
247abb5c-30ee-4899-a28f-97f29d612471 | rolandjansky/athena | Simulation/G4Extensions/Quirks/src/HyperbolaStepper.cxx | /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "G4Track.hh"
#include "G4DynamicParticle.hh"
#include "G4ElectroMagneticField.hh"
#include "DummyEquation.h"
#include "HyperbolaStepper.h"
HyperbolaStepper::HyperbolaStepper(
InfracolorForce& string,
const G4Track& track... | ALGO | 0.983827 | 5.729472 | {
"github_metadata": {
"branch": "master",
"commit_count": 100549,
"repo_created_at": "2022-08-07T05:54:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5317a... |
0dd55749-0dcc-4e77-89a0-c52ec6bf7144 | drrtuy/misc | ya_algo/3_sorting/J_bubble.cpp | #include <iostream>
#include <vector>
#include <cassert>
#include <sstream>
#include <algorithm>
#include <cmath>
void bubbleWrapper(std::istream& in, std::ostream& out);
void bubbleTest(std::vector<std::string>& input, std::string& expected)
{
std::stringstream in;
std::stringstream ss;
for (auto& e: inp... | ALGO | 0.999769 | 5.312104 | {
"github_metadata": {
"branch": "master",
"commit_count": 100,
"repo_created_at": "2016-12-26T12:57:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "71d1cb13... |
b41b8bbb-eea7-41f6-81ee-646e4bf2d858 | chenxuhao/SpeedCodeBench | src/tc/omp_base.cc | // Copyright 2020 MIT
// Authors: <NAME> <<EMAIL>>
#include <omp.h>
#include "BaseGraph.hh"
void TCSolver(BaseGraph &g, uint64_t &total) {
int num_threads = 1;
#pragma omp parallel
{
num_threads = omp_get_num_threads();
}
std::cout << "OpenMP Triangle Counting (" << num_threads << " threads)\n";
uint64... | ALGO | 0.99576 | 6.259824 | {
"github_metadata": {
"branch": "main",
"commit_count": 125,
"repo_created_at": "2023-04-02T14:58:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c6d381c8d1... |
7064fa80-a260-4827-b6f9-ff52dce9a463 | chiragarwal26/DSA-CPP | DSA C++/60_leetcode_problem_no_567.cpp | #include<iostream>
using namespace std;
bool checkEqual(int a[26], int b[26]){
for(int i = 0; i<26;i++){
if(a[i]!=b[i]){
return 0;
}
}
return 1;
}
bool PermuationChecker(string s1, string s2){
//creating a count array
int countArray1[26] = {0};
for(int i = 0; i<s1.l... | ALGO | 0.999991 | 4.22789 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2023-06-06T08:48: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": "aac9261b765... |
c14ca1cf-c755-4c5d-8d6f-5cc4cd46ef42 | CommitPot/CommitPot-Study | 알고리즘/유찬홍/백준/11000/11505.cpp | #include <cstdio>
typedef long long int ll;
int a, b, c, n, m, k, mod = 1e9 + 7;
ll arr[4000001], sum = 1;
void find(int s, int e) {
if (s % 2 == 1) sum = (sum % mod * arr[s] % mod) % mod;
s = (s + 1) / 2;
if (e % 2 == 0) sum = (sum % mod * arr[e] % mod) % mod;
e = (e - 1) / 2;
if (s > e) {
... | ALGO | 0.999994 | 4.422629 | {
"github_metadata": {
"branch": "main",
"commit_count": 1695,
"repo_created_at": "2022-07-27T14:49:42.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 10,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "21afcaf67... |
5b80a4c8-d14d-489f-87bd-ebbabf029413 | Keval545/Advance-Algorithm | lab02_Randomized_Primality_Testing.cpp | #include <bits/stdc++.h>
using namespace std;
unsigned long long gcd(unsigned long long a,unsigned long long b){
while(b != 0){
unsigned long long t = a%b;
a = b;
b = t;
}
return a;
}
unsigned long long power(unsigned long long b,unsigned long long e,unsigned long long m){
... | ALGO | 0.999001 | 3.811116 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2023-07-15T09:33:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "710780e03d6... |
0dd513fb-5129-4372-acda-da9deedb1e65 | Valhalla1010/LABb2 | main.cpp | #include <iostream>
#include "SelInSSort.h"
#include "QS_Partition.h"
#include "QS_MedianOFThree.h"
#include "output.h"
int main() {
//int arr[] = {2, 8,3,1,9,7,1};
//int n = sizeof (arr) / sizeof (arr[0]);
//Selection_Sort ss;
//ss(arr, arr + n);
//Insertion_Sort in;
//in(arr, arr + n);
//... | ALGO | 0.9987 | 4.286096 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2023-05-24T12:23:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eca901678b... |
a5fbed06-21ef-4fc0-bc55-929345a6069d | yfuka86/pc | atcoder/abcold/abc228/d/abc228_d.cpp | #pragma GCC optimize("Ofast")
#include <iostream>
#include <iomanip>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <math.h>
#include <vector>
#include <algorithm>
#include <limits>
#include <climits>
#include <cassert>
#include <bitset>
#include <numeric>
#include <atcoder/segtree>
#define r... | ALGO | 0.999259 | 4.795009 | {
"github_metadata": {
"branch": "main",
"commit_count": 549,
"repo_created_at": "2021-12-25T02:46:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d517b61a79... |
2e45c8ff-d594-4eb0-9c43-d1be62660ca6 | zhangzhiqiangccm/Olympiad-in-Informatics | code/9单元习题参考程序/第6课/minimum/minimum.cpp | #include <bits/stdc++.h>
#define fst first
#define sec second
#define mp make_pair
using namespace std;
typedef long long LL;
typedef long double LD;
LL getin(){
char ch;
while (!isdigit(ch = getchar()) && ch != '-');
LL x = ch == '-' ? 0 : ch - '0';
LL opt = ch == '-' ? -1 : 1;
while (isdigit(ch = getchar())) x ... | ALGO | 0.999561 | 3.238812 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2020-07-23T23:05:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b553975f4... |
bef18def-ad31-40e0-9e5f-08f54f902b60 | EnTiKayyyyy/Tin_Hoc_Co_So_2_PTIT | C06025.cpp | /* <NAME>
B21DCCN472
D21CQCN04-B
NHOM 26 */
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<ctype.h>
#include<stdbool.h>
#include<stdlib.h>
#define test long long t; scanf("%lld", &t); while (t--)
#define ll long long
int main()
{
int lenA, lenB;
int t;
scanf("%d",&t);
while (t--)
{
{
scanf("\n... | ALGO | 0.999982 | 3.655873 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-06-03T13:20: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": "a83d647e78e8... |
205962f6-292a-4c0d-9c23-500fd30fbb59 | SilentLimbo/Data-Structures | 10_stl_2_files_maps_and_sets/Vectors.h | #ifndef VECTORS_H
#define VECTORS_H
#include <iostream>
#include <string>
#include <vector>
using namespace std;
void printVector(const vector<int>& aVector)
{
vector<int>::const_iterator iter = aVector.cbegin();
vector<int>::const_iterator iterEnd = aVector.cend();
for (iter; iter != iterEnd; ++iter)
cout << *i... | ALGO | 0.93675 | 4.875947 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-11-25T22:52: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": "03d006aeb421... |
b274b7e3-8c3c-4afc-851d-7d4b88aa6d50 | gyan777/Coding | 273_integer_to_english_words.cpp | #include <vector>
#include <iostream>
#include <unordered_map>
/* Problem Description
Convert a non-negative integer to its english words representation. Given input is guaranteed to be less than 231 - 1.
Example 1:
Input: 123
Output: "One Hundred Twenty Three"
Example 2:
Input: 12345
Output: "Twelve Thousand Three... | ALGO | 0.998323 | 6.240751 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2020-08-06T03:52:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3856fabb0... |
ec7737f7-fd0a-4b19-9847-15588d41a364 | Eperix/Toon-UE | Engine/Source/Runtime/Core/Public/Algo/Compare.h | // Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreTypes.h"
#include "Templates/EqualTo.h"
#include "Templates/IdentityFunctor.h"
#include "Templates/Invoke.h"
#include "Templates/Less.h"
#include "Templates/UnrealTemplate.h"
namespace Algo::Private
{
template <typename InAT, typename InB... | TOOL | 0.960592 | 7.073145 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2025-02-12T17:17:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "320f9b94cbe... |
8587b4cc-f4fe-4fa5-ae15-25641f2c5430 | QianMo/GPU-Gems-Book-Source-Code | GPU-Gems-3-CD-Content/content/12/demo/gpuocclusion_standalone/gpuocclusion/OcclusionTree.h | /*! \file OcclusionTree.h
* \author <NAME>
* \brief Defines the interface to a
* hierarchy for triangles.
*/
#ifndef OCCLUSION_TREE_H
#define OCCLUSION_TREE_H
#include <gpcpu/Vector.h>
#include <vector>
class OcclusionTree
{
public:
typedef float3 Point;
typedef float3 Normal;
typedef Vec... | ALGO | 0.994472 | 7.313965 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2018-04-21T15:43:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1080,
"forks": 449,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "6731... |
18e28803-e41a-4eee-ac75-e9d3ec5c5c4b | himTresor1/student_Handler_in_Structures | node.cpp | #include<iostream>
using namespace std;
class Node {
public:
int data;
Node *next;
Node(int x)
{
this->data = x;
this->next = NULL;
}
};
void display (Node *node)
{
while (node != NULL... | ALGO | 0.995872 | 4.773881 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-02-03T08:24:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a37127aba46e... |
dbbc530a-4214-4119-8161-481bca487f77 | Prakash-Daga7/Dynamic-Programming | Dynamic Programming/DP_ON_SUBSEQUENCING/Kadane's_algorithm.cpp |
/*
https://practice.geeksforgeeks.org/problems/kadanes-algorithm-1587115620/1
*/
/* Brute Force (O(n^3)))*/
long long maxSubarraySum(int arr[], int n){
// Your code here
long long int maxi=INT_MIN;
for(int i=0;i<n-1;i++)
{
for(int j=i;j<n;j++)
{
... | ALGO | 0.999974 | 5.186296 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-11-20T13:03:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "013a49a00d0d... |
22a2d1a8-1701-4153-819c-ee6747f68c98 | ayushh089/ALgorithm | SEARCHING & SORTING/exponentialSearch.cpp | #include <bits/stdc++.h>
using namespace std;
int binarySearch(int arr[], int l, int r, int data)
{
if (l <= r)
{
int mid = (l + r) / 2;
if (data == arr[mid])
{
return mid;
}
else if (data < arr[mid])
return binarySearch(arr, l, mid - 1, data);
... | ALGO | 0.999859 | 5.19489 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2022-01-08T12:13: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": "8d43328f3d7... |
a30c091e-132e-430e-9eb7-d86888679129 | CGAL/cgal | Interpolation/examples/Interpolation/nn_coordinates_3.cpp | #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/natural_neighbor_coordinates_3.h>
#include <fstream>
#include <iostream>
#include <iterator>
#include <utility>
#include <vector>
typedef double NT; //Number Type
typedef CGAL::Exact_predicates_... | ALGO | 0.975243 | 4.532078 | {
"github_metadata": {
"branch": "master",
"commit_count": 113659,
"repo_created_at": "2014-10-01T12:22:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5443,
"forks": 1475,
"issues": 511,
"pull_requests": 136
},
"file_meta": {
"content_id... |
9daa31fe-21a3-4a04-811b-8d6d76aebc8a | AmirAlakbarli/E-olymp-solutions | problem10802.cpp | #include <iostream>
using namespace std;
class ListNode
{
public:
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL){};
};
int DistanceToCycle(ListNode *head)
{
ListNode *slow = head, *fast = head;
while (fast != NULL && fast->next != NULL)
{
slow = slow->next;
fast ... | ALGO | 0.999946 | 4.791956 | {
"github_metadata": {
"branch": "main",
"commit_count": 36,
"repo_created_at": "2022-09-13T19:33:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "142d0f1a553... |
b8099e77-ef68-490c-82fb-c115a71fd82d | SilverPoision/DSA | 6_Graph/22_shortestPathinDAG.cpp | #include <bits/stdc++.h>
using namespace std;
class graph
{
public:
unordered_map<int, vector<pair<int, int>>> adj;
void addEdge(int u, int v, int weight)
{
pair<int, int> wPair = make_pair(v, weight);
adj[u].push_back(wPair);
}
void printAdj()
{
for (auto i : adj)
{
cout << i.first... | ALGO | 0.999992 | 5.172513 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2024-03-02T13:22: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": "7958fa37334... |
17fe7222-3282-41e8-9b1c-909bf4df33fb | MarkKim1/Leetcode | 0105-construct-binary-tree-from-preorder-and-inorder-traversal/0105-construct-binary-tree-from-preorder-and-inorder-traversal.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999992 | 6.509059 | {
"github_metadata": {
"branch": "main",
"commit_count": 3223,
"repo_created_at": "2022-04-11T16:47:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6384b292f... |
18359a94-b164-4b6f-9629-dadda2bca9c2 | 01Bruna11/ESTRUTURA_DE_DADOS_2022 | burn.cpp | /*Dado uma matriz que representa espaços vazios e árvores e um ponto inicial onde começa o fogo, retorne a matriz com as árvores queimadas. O fogo se não se espalha nas diagonais, apenas nas 4 direções cardeais.
A matriz está codificada assim. 1a linha: nl, nc, l, c respectivamente
número de linhas e colunas da m... | ALGO | 0.999572 | 4.243752 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2022-03-26T20:19:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0a5bbcc92fc... |
1b3efd2d-dd2f-4b46-ab30-f81e7739fbea | sinhadiptiprakash/dsa | Binary Search Tree/.vscode/largest_bst_in_binary_tree.cpp | // C++ program to find largest BST in a
// Binary Tree.
#include <bits/stdc++.h>
using namespace std;
struct BSTNode
{
int data;
struct BSTNode *left;
struct BSTNode *right;
BSTNode(int d)
{
data = d;
left = NULL;
right = NULL;
}
};
// to store the information of each and... | ALGO | 0.999983 | 6.316288 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-01-08T07:31:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4edd2796e443... |
0183f9cc-4c7c-430d-bbb6-ce3da21cd1df | kushalj1997/Quadcopter | Quadrotor old/Code/QuadrotorMainAeroQuad/QuadrotorMotors.ino | #define MOTOR_PWM_Timer
#define NB_MOTOR_CONFIG FOUR_Motors
#include <Motors_PWM_Timer.h>
#define MOTOR1 2
#define MOTOR2 3
#define MOTOR3 5
#define MOTOR4 6
#define KP 0.8
#define KI 0
#define KD .05
#define WINDUP_GUARD_GAIN 50.0
float iState = 0;
float lastValue = 0;
float pTerm, iTerm, dTerm;
#define MAXANGL... | ALGO | 0.999232 | 5.830646 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-12-20T03:36: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": "1bf90f77a1... |
889e05e5-adda-4b71-aa25-46398e1ea805 | weakunix/python_git | live_events/CompetitveProgrammingPractice/z_BACKUPS/NOI2021P6/BFIVersions/bfi.cpp | #include <iostream>
#include <string>
#include <cstring>
#include <vector>
#include <utility>
#include <algorithm>
#include <cassert>
using namespace std;
typedef long long ll;
typedef pair<int, int> simps;
typedef pair<int, simps> threesome;
#define sec second.first
#define third second.second
#define all(v) v.begi... | ALGO | 0.999989 | 4.033111 | {
"github_metadata": {
"branch": "master",
"commit_count": 1520,
"repo_created_at": "2019-06-07T23:32:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "b69996a... |
a9526d68-114f-40d5-9831-33bc05155520 | agustindls/programacion-de-computadores | laboratorio9.cpp | #include <stdio.h>
char tablero[3][3] = {{'-', '-', '-'},
{'-', '-', '-'},
{'-', '-', '-'}};
int fila;
int columna;
bool ganador = false;
int turnos = 0;
//prototipo
int coordenadaf();
int coordenadac();
bool winner ();
void impjuego ();
int main(){
//impresion t... | ALGO | 0.999427 | 3.800405 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2020-12-09T20:17: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": "3570df61dd5... |
db9d31bd-97e9-4888-a374-18afa178b093 | wm860/vrk4 | main.cpp | #include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "rk4.h"
//void vrk4( double x0, double y0[], double h, int n, void (*fun)(double, double*, double*), double y1[] )
void fun(double, double*, double*);
double h = 0.01; //krok calkowania
int n = 2;
double H = 1; //wysokosc stozka
double z0 = 2; //poc... | ALGO | 0.999987 | 3.738452 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2024-03-10T22:07: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": "24142c8ee4... |
ed580a07-2882-4033-9286-dedb879bb894 | nettrino/slowfuzz | apps/isort/main_driver.cpp | #include <cstdint>
#include <cstring>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <sys/stat.h>
#define TYPE uint8_t
using namespace std;
void isort(TYPE *arr, int n) {
for (int i = 0; i < n; i++) {
for (int c = i - 1; c >= 0; c--) {
if (arr[c] > arr[c + 1]) {
TYP... | TOOL | 0.994718 | 3.925484 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2017-11-05T17:11:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 53,
"forks": 13,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ef5a9aed... |
bd3c86f8-3577-455a-a38a-54046b185ebd | mongodb/mongo | src/third_party/boost/libs/thread/include/boost/thread/lock_algorithms.hpp | // Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// (C) Copyright 2007 <NAME>
// (C) Copyright 2011-2012 <NAME>
#ifndef BOOST_THREAD_LOCK_ALGORITHMS_HPP
#define BOOST_THREAD_LOCK_ALGORITHMS_HPP
#include <boost/t... | ALGO | 0.99602 | 7.167968 | {
"github_metadata": {
"branch": "master",
"commit_count": 90314,
"repo_created_at": "2009-01-15T16:15:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 27329,
"forks": 5655,
"issues": 0,
"pull_requests": 82
},
"file_meta": {
"content_id": ... |
40ebb78f-a8b8-453e-b763-369129148859 | hangzhaosbu/Leetcode | 1043-partition-array-for-maximum-sum/1043-partition-array-for-maximum-sum.cpp | class Solution {
public:
int maxSum(vector<int>& arr, int k, int dp[], int start) {
int N = arr.size();
if (start >= N) {
return 0;
}
// Return the already calculated answer.
if (dp[start] != -1) {
return dp[start];
}
... | ALGO | 0.999854 | 6.12919 | {
"github_metadata": {
"branch": "master",
"commit_count": 3618,
"repo_created_at": "2020-06-27T20:40:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0395678... |
1b49f092-dd17-495c-9cc7-162445366430 | Fumeme/AI-Cats | GAME307_StudentTemplate/Graph.cpp | #include "Graph.h"
#include <queue>
Graph::Graph()
{
}
Graph::~Graph()
{
}
bool Graph::OnCreate(std::vector<Node*> nodes_)
{
// given a list of nodes, initialize a matrix of costs with 0.0
int numNodes = nodes_.size();
cost.resize(numNodes);
for (int i = 0; i < numNodes; i++)
{
// popu... | ALGO | 0.998618 | 4.347467 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2024-11-08T01:13: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": "b9edb5ae4f1... |
d98c473b-3268-4cce-b495-98b84ed06826 | p4773rn/flightsim | src/wheels.cpp | #include "wheels.h"
#include "environment.h"
#include <iostream>
#include "misc.h"
#include <cstdlib>
using std::cout;
using std::endl;
std::tuple<glm::dvec3, glm::dvec3> Wheels::getForceAndTorque(
const glm::dvec3& velocity,
const glm::dvec3& planePosition,
const glm::dvec3 angularVelocity,
const ... | ALGO | 0.967745 | 5.672409 | {
"github_metadata": {
"branch": "master",
"commit_count": 135,
"repo_created_at": "2018-09-25T08:36:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "122ef6d6... |
23d2e26e-1d66-4a06-bb61-1a0e11e62e7c | Jevan-National-University-of-Singapore/CS2040C_Data_Structures_and_Algorithms_C- | AssignmentCodes/ml.cpp | #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
using namespace std;
class Player{
public:
string name;
long long s1;
long long s2;
long long s3;
/*bool operator()(Player a, Player b){
return string(a.... | ALGO | 0.999927 | 3.781968 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-01-23T03:04:38.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d0d840b0468... |
e6c1c652-b0e9-453e-859c-1ca934cd2082 | QiangLongMa/autodriver | src/control/include/toolKits.h | #pragma once
#include <Eigen/Eigen>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp> //与图像处理有关
#include <cmath>
#include <iostream>
namespace tool{
const double pi = 3.14159265358;
struct frentPoint {
double s = -1;
double d = 999999... | ALGO | 0.998141 | 3.499941 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2024-11-08T02:25:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9cc310fa7... |
294f5597-9aac-4806-8fbb-2424a370eae4 | TempestHe/PPC-index | index/lib/src/auxiliary.cpp | #include "auxiliary.h"
bool check_nlf(Graph* query, int query_anchor, Graph* data, int data_anchor){
unordered_map<Vertex, Vertex>& query_dist = query->nlf_data[query_anchor];
unordered_map<Vertex, Vertex>& data_dist = data->nlf_data[data_anchor];
for(auto p : query_dist){
auto itf = data_dist.find... | ALGO | 0.998545 | 4.575507 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-03-31T11:02: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": "a997ad5346a1... |
4f2d865a-e60c-4d75-bff4-0633ee7b6aed | CodesByShivam/Data-Structures-in-C- | LinkedList.cpp | #include<iostream>
using namespace std;
struct Node{
int data;
struct Node *next;
};
Node *head = NULL;
void append(int value){
Node *newNode = new Node();
newNode->data = value;
if(head == NULL){
head = newNode;
}
else{
Node *temp = head;
while(te... | ALGO | 0.99973 | 5.264192 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-04-27T12:31:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dadd48403b... |
da23c697-c35d-403e-b51e-7b40100992a7 | samuelluo/practice | balance_travel/balance_travel.cpp | // g++ -std=c++17 balance_travel.cpp
/*
Suppose there are interviewing N job candidates for roles in New York and
San Francisco.
There are two costs associated with each candidate, one for sending him/her to
each city.
Split the candidates into two equal-sized groups while also minimizing travel
cost.
*/
#include <alg... | ALGO | 0.999926 | 5.775192 | {
"github_metadata": {
"branch": "master",
"commit_count": 107,
"repo_created_at": "2018-06-15T00:43: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": "5c056581... |
73b53484-d740-4827-92a6-b0c75c6e3ade | EthanMatth/adventOfCode | Day03/Rucksack.cpp | /*-----Advent of Code Day 03-----*/
#include <iostream>
#include <string.h>
#include <vector>
#include <fstream>
using namespace std;
int main(int argc, char const *argv[])
{
string compOne;
string compTwo;
int sum = 0;
bool inLineOne = false;
bool inLineTwo = false;
bool inLineThree = fals... | ALGO | 0.999858 | 4.872176 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-12-02T18:40: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": "df63692ae9bb... |
ec018523-e2a3-4c97-8a1f-3eb443e7d3e4 | nathyq6/3er-parcial | ejercicio2.c++ | #include <iostream>
#include <vector> //utilizo vectores
#include <algorithm>
using namespace std;
int main() {
// Declaración de variables
vector<int> numeros(5); // Vector para almacenar los 5 números
int menor, mayor;
bool hayRepetidos = false;
// para ingresar los 5 numeros
cout << "Ingrese 5 núm... | ALGO | 0.999219 | 4.004939 | {
"github_metadata": {
"branch": "main",
"commit_count": 101,
"repo_created_at": "2024-05-22T18:13:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cf3b4ed99e... |
36406496-56ea-45df-9a07-a344ddf1fff3 | eptom/cplusplus_training | prepostInc.cpp | #include <iostream>
using namespace std;
int main(){
int a;
for(a=5;a<10;++a){
cout << " wchodze do petli i a = " << a << endl;
a++;
cout <<"post :" << a << endl;
++a+1;
cout << "pre :" << a << endl;
}
int b = a;
cout << " po wyjsciu z petli b = a = " << a << endl;
b = ++a;
cout << " b = ++a" ... | ALGO | 0.979378 | 3.62046 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2017-04-04T12:51: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": "eda472d0a... |
dd18e7b0-9902-4a0c-a6ec-7365ccf0c974 | mike323zyf/BCQN | code/2D/lib/mex/panozo/parametrization_utils.cpp | #include "parametrization_utils.h"
#include <igl/adjacency_matrix.h>
#include <igl/arap.h>
#include <igl/avg_edge_length.h>
#include <igl/boundary_loop.h>
#include <igl/colon.h>
#include <igl/harmonic.h>
#include <igl/edge_topology.h>
#include <igl/grad.h>
#include <igl/slice_into.h>
#include <igl/map_vertices_to_circ... | ALGO | 0.998798 | 3.057965 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2018-08-12T21:36:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 7,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "4c9d38f60... |
40d3e177-1f08-4fec-ac25-a8ae563538d6 | detu/mcadjoint | Code/OilProblem/minimizer.cpp | //
// Created by <NAME> on 30.04.18.
//
#include "minimizer.hpp"
#include "sensitivity.hpp"
#include "vectorToBeMappedAsMatrix.hpp"
#include "logging.hpp"
#include <array>
#include "dumpToMatFile.hpp"
#include <stefCommonHeaders/xoroshiro.h>
#include <cppoptlib/problem.h>
#include <cppoptlib/solver/gradientdescentsolve... | ALGO | 0.999174 | 5.736217 | {
"github_metadata": {
"branch": "master",
"commit_count": 180,
"repo_created_at": "2022-06-22T08:17: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": "ca60e919... |
dfc49a4a-4a29-4fc5-81e2-a4596be220f8 | xbjiang/algorithms | JianzhiOfferExercises/Utilities/BinaryTreeNode.cpp | #include "stdafx.h"
#include "BinaryTreeNode.h"
#include <algorithm>
BinaryTreeNode* CreateBinaryTreeNode(int value)
{
BinaryTreeNode* pNode = new BinaryTreeNode();
pNode->m_nValue = value;
pNode->m_pLeft = NULL;
pNode->m_pRight = NULL;
return pNode;
}
void connectBinaryTreeNode(BinaryTreeNode* pParent, BinaryT... | ALGO | 0.999614 | 4.201634 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2016-11-04T15:32: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": "44c6e4810... |
841348f5-5b0a-4975-a7b2-25644f248908 | yangchunsan/cpp_learning_code | topic5/main.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <sstream>
#include <string>
#include <climits>
#include <cmath>
#include <stdlib.h> // 用于 system("pause")
using namespace std;
// 点结构体:存储二维平面点的坐标
struct Point {
int x, y;
Point(int x_, int y_) : x(x_), y(y_) {}
};
// 结果结构体:存储最近点对及其距离的平方(避免浮... | ALGO | 0.999981 | 5.023091 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2025-01-03T13:32: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": "e7aedca42... |
8a7d3b54-58c6-4ce9-886b-334fb636e421 | Larissa-alSouza/PROGRAMACAO-E-ALGORITMOS-ETEC-Modulo-I | Linguagem C/Lista de Exercícios 3/exercicio_5.cpp | /* 5- A loja Saldão está vendendo seus produtos com desconto de 15% para pagamento à vista,
em até 5x sem acréscimo e com juros de 10% para pagamentos com mais de 5 prestações.
São fornecidos: o nome do produto, seu preço e a quantidade a ser comprada. O usuário
deverá escolher a forma de pagamento. Mostrar como resul... | TOOL | 0.94268 | 4.184603 | {
"github_metadata": {
"branch": "main",
"commit_count": 294,
"repo_created_at": "2025-02-10T23:16: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": "55ef302f58... |
bbec84ba-00ec-49c3-a367-df6165d2cbd3 | jasonrohrer/OneLife | gameSource/convolution.cpp | #include "convolution.h"
#include "minorGems/system/Time.h"
#include <stdio.h>
#include <math.h>
#include <string.h>
/*
static void naiveConvolve( double *inA, int inLengthA,
double *inB, int inLengthB,
double *inDest ) {
for( int i=0; i<inLengthA; i++ ) {
... | ALGO | 0.994468 | 5.382258 | {
"github_metadata": {
"branch": "master",
"commit_count": 6047,
"repo_created_at": "2017-10-12T17:32:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1058,
"forks": 296,
"issues": 52,
"pull_requests": 4
},
"file_meta": {
"content_id": "f... |
e0b34d5c-f211-42d4-a48c-95f6a064f011 | steveLauwh/Algorithms | Tree/LeetCode-Tree/Binary Tree Inorder Traversal/BinaryTreeInorderTraversal.cpp | // 借助栈实现
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
vector<int> inorderTraversal(TreeNode* root) {
vector<int> res;
stack<... | ALGO | 0.999999 | 6.406 | {
"github_metadata": {
"branch": "master",
"commit_count": 789,
"repo_created_at": "2017-09-19T15:24:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 63,
"forks": 19,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6d01c9... |
b72bbb2e-d516-4123-8b8e-7d462a5e02fe | hophacker/algorithm_coding | POJ/4006/10853795_AC_1719MS_80632K.cc | #include <cstdlib>
#include <cctype>
#include <cstring>
#include <string.h>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <set>
#include <queue>
#include <stack>
#include <limits.h>
#inclu... | ALGO | 0.999905 | 3.738896 | {
"github_metadata": {
"branch": "master",
"commit_count": 51,
"repo_created_at": "2014-04-05T22:51:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 0,
"issues": 10,
"pull_requests": 0
},
"file_meta": {
"content_id": "79ff003b... |
2c3c12c2-5a12-4ea8-b7d1-3776fe88cb39 | Hackeries/RealityCheck | Week1/Day6/bsPredicate.cpp | #include <bits/stdc++.h>
#define lli long long
#define pii pair<int,int>
#define fi first
#define sc second
#define pb push_back
#define EB emplace_back
#define MP make_pair
#define vi vector<lli>
#define vov vector<vector<lli>>v(n,vector<lli> (m))
#define vpii vector<pair<lli,lli>>
#define all(o) (o).begin(), (o).end(... | ALGO | 0.999996 | 3.900507 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2024-09-15T14:31: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": "5488ec6e0d3... |
462cab78-f819-4569-913c-cb0b7cc8fd9e | HzDmS/algorithm_cpp | string_matching/src/main.cpp | #include<iostream>
#include<string>
#include<vector>
typedef std::shared_ptr<std::vector<int>> mytype;
mytype partial(std::string& pattern) {
int n = pattern.size();
mytype lookup_vec = std::make_shared<std::vector<int>> (n, 0);
for (int i = 1; i < n; i++) {
int k = lookup_vec -> at(i - 1);
... | ALGO | 0.999952 | 5.667021 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-07-31T10:35: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": "3bd02b72ec... |
56d4ba5a-762d-4212-a010-c71425da3810 | KunalParkhade/leetcode-daily | 543-diameter-of-binary-tree/diameter-of-binary-tree.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999731 | 6.332026 | {
"github_metadata": {
"branch": "main",
"commit_count": 658,
"repo_created_at": "2024-02-06T14:11:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8abc616c96... |
ec766a9d-8e99-42a2-b454-456164ca9120 | dev234tripathi/dataStructures | LL/convertSortedListToBinarySearchTree.cpp | /*
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1.
Example:
Given the sorted linked list: [-10,-3... | ALGO | 0.999995 | 6.515337 | {
"github_metadata": {
"branch": "master",
"commit_count": 62,
"repo_created_at": "2020-02-29T09:39: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": "4886c7522... |
fb79f4fc-0b51-4c70-94dc-c966edc17890 | Ketchp/EP2 | src/freckles.cpp | #include <bits/stdc++.h>
using namespace std;
//#define int ll
#define real long double
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define all(x) std::begin(x), std::end(x)
#define sz(x) (int)(x).size()
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef vector<int> vi;
typedef... | ALGO | 0.999707 | 4.898269 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-06-28T14:27:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1f828fa77cb3... |
a4bbb808-283d-483b-b97b-adad5fd9ae39 | google-research/google-research | parallel_clustering/clustering/util/dynamic_weight_threshold.h | // Copyright 2025 The Google Research Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | TOOL | 0.936662 | 7.212408 | {
"github_metadata": {
"branch": "master",
"commit_count": 4832,
"repo_created_at": "2018-10-04T18:42:48.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 36026,
"forks": 8143,
"issues": 1061,
"pull_requests": 576
},
"file_meta": {
"content_id... |
36832d57-fe9b-4727-a4bf-4703091ba47b | phbastosa/interpolation | 2d_example.cpp | # include "utils.hpp"
# include "cubic.hpp"
# include "linear.hpp"
void build_function(float * f, float * x, float * y, int Nx, int Ny)
{
float xi =-10.0f;
float xf = 10.0f;
float yi =-10.0f;
float yf = 10.0f;
linspace(x, xi, xf, Nx);
linspace(y, yi, yf, Ny);
for (int i = 0; i < Nx; i++)
... | ALGO | 0.996066 | 6.16252 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-01-13T18:37:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8912042751b7... |
961dc6bd-62c5-4e3d-8e8b-940228cc8984 | LeadCoding/FrazArmy | Recursion/Lecture 21/LeetCode/N Queens Approach 1.cpp | /* This problem asks us to fill N Queens in N * N ChessBoard such that no Queen will cancel each other
In order to be sure, no Queen cancel out each other, we need to check in 3 directions:
a) In the column where we are placing the Queen
b) In the Top Right / Upper Right Diagonal of the Cell in which we are placing th... | ALGO | 0.999969 | 6.537743 | {
"github_metadata": {
"branch": "main",
"commit_count": 69,
"repo_created_at": "2022-05-15T17:55:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 84,
"forks": 71,
"issues": 4,
"pull_requests": 7
},
"file_meta": {
"content_id": "86ca68c38... |
1847dd13-2aa6-4c57-b399-ad0372316174 | ndb796/python-for-coding-test | 6/6.cpp | #include <bits/stdc++.h>
#define MAX_VALUE 9
using namespace std;
int n = 15;
// 모든 원소의 값이 0보다 크거나 같다고 가정
int arr[15] = {7, 5, 9, 0, 3, 1, 6, 2, 9, 1, 4, 8, 0, 5, 2};
// 모든 범위를 포함하는 배열 선언(모든 값은 0으로 초기화)
int cnt[MAX_VALUE + 1];
int main(void) {
for (int i = 0; i < n; i++) {
cnt[arr[i]] += 1; // 각 데이터에 해당하... | ALGO | 0.999969 | 4.697195 | {
"github_metadata": {
"branch": "master",
"commit_count": 584,
"repo_created_at": "2020-04-15T21:07:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2378,
"forks": 843,
"issues": 131,
"pull_requests": 1
},
"file_meta": {
"content_id": "d... |
51129118-9189-4bec-99b1-ca7a5ea14500 | PreritaP/DataStructure | ds_string.cpp | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
void reverse(string s, int n, int m){
char temp;
while(n<m){
temp = s[n];
s[n] = s[m];
s[m] = temp;
n++;
m--;
}
}
int isRotated(string s1, string s2){
if(s1.length() != s2.length())
retur... | ALGO | 0.99987 | 4.502263 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2020-06-28T13:53: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": "e7f15321fd... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.