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 |
|---|---|---|---|---|---|---|---|
9b79840d-6351-4014-979b-f4a45b3537a7 | sahuyuvraj/LeetCode | 863-all-nodes-distance-k-in-binary-tree/863-all-nodes-distance-k-in-binary-tree.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:
unordered_map<TreeNode*,TreeNode*>parent;
void find_parent(TreeNode*root){
... | ALGO | 0.999994 | 5.826896 | {
"github_metadata": {
"branch": "main",
"commit_count": 1647,
"repo_created_at": "2022-05-31T06:17: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": "74ffb6edb... |
ec67729a-8ced-4437-8469-c5acad2d1003 | lydrainbowcat/tedukuri | 配套光盘/习题/0x5E 动态规划 总结与练习/BUY LOW, BUY LOWER/POJ1952 BUY LOW, BUY LOWER.cpp | #include<bits/stdc++.h>
using namespace std;
int n, a[5005], f[5005], c[5005], ans, tot;
int main() {
cin >> n;
for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
a[0] = 1 << 30;
memset(f, 0xcc, sizeof(f));
f[0] = 0, c[0] = 1;
for (int i = 1; i <= n; i++)
for (int j = 0; j < i; j++)
... | ALGO | 0.999991 | 3.391269 | {
"github_metadata": {
"branch": "master",
"commit_count": 140,
"repo_created_at": "2018-03-18T01:24:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2487,
"forks": 607,
"issues": 15,
"pull_requests": 0
},
"file_meta": {
"content_id": "30... |
fb36e790-ed8e-416d-a585-ac25c65ff538 | nvmexp/lw_runtime | samples/optix/prodlib/bvhtools/src/common/TypesInternal.hpp | // Copyright LWPU Corporation 2013
// TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
// *AS IS* AND LWPU AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
// OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE. I... | TOOL | 0.93319 | 3.434005 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-07-03T16: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": "6385e786d1e6... |
ef9fd487-d7eb-421b-bfb6-65b0e95dd727 | v2v3v4/BigWorld-Engine-14.4.1 | programming/bigworld/tools/modeleditor_core/GUI/tree_list.cpp | #include "pch.hpp"
#include "me_app.hpp"
#include "tools/common/delay_redraw.hpp"
#include "tree_list.hpp"
#include "../resource.h"
#include "resmgr/string_provider.hpp"
DECLARE_DEBUG_COMPONENT( 0 )
BW_BEGIN_NAMESPACE
// TreeList
/*static*/ const wchar_t TreeList::LOCKED_TAG[] = L" <locked>";
IMPLEMENT_DYNCREATE... | TOOL | 0.932962 | 6.261771 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2023-01-09T19:54:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 225,
"forks": 106,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4f3bb06... |
46814e14-d9cb-4080-b426-a31c7b88289e | shinhn/Algorithm | 코테스터디/그리디/boj_11000_강의실배정.c++ | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
using namespace std;
int N;
priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> pq;
priority_queue<int, vector<int>, greater<int>> c_end_time; // 각 강의실의 강의가 끝나는 시간
int main()
{
ios_base::sync... | ALGO | 0.999868 | 4.050658 | {
"github_metadata": {
"branch": "main",
"commit_count": 353,
"repo_created_at": "2021-06-29T05:41:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8fe84891b0... |
daa3b3bb-6e81-4e92-96af-2296ebd83434 | aleung27/Competitive-Programming | CF298-D2-A/solution.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define X real()
#define Y imag()
#define EPS 0.000000001
#define M_PI 3.14159265358979323846
#define CROSSPROD(a, b) (conj(a)*b).Y
template <class T>
T gcd(T a, T b) {
if (b == 0) return a;
return gcd(b, a%b... | ALGO | 0.999759 | 3.400323 | {
"github_metadata": {
"branch": "master",
"commit_count": 271,
"repo_created_at": "2020-04-04T13:04: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": "4374b9da... |
52db67f6-7cf1-418f-b30a-c814c43a8402 | prudhvivelasiri/DSA0183-C- | Day4 Q6.cpp | #include <iostream>
using namespace std;
void swapByValue(int a, int b) {
int temp = a;
a = b;
b = temp;
}
void swapByReference(int &a, int &b) {
int temp = a;
a = b;
b = temp;
}
int main() {
int a, b;
cout << "Enter the value for a: ";
cin >> a;
cout << "Enter the value for b... | ALGO | 0.999753 | 5.67661 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-09-04T05:12: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": "499ca2e16ee4... |
97394770-1824-4bee-9ce3-cddca63b5b30 | SumonAtikul/Data-Structure | Data Structure/Practice/1.cpp | #include <iostream>
#include <algorithm>
using namespace std;
const int MAX = 500;
struct Heap{
int h[MAX];
int heapSize;
Heap();
void insertData(int data);
int deleteRoot();
void heapifyUp(int i);
void heapifyDown(int i);
void display();
};
Heap :: Heap()
{
heapSize = 0;
}
vo... | ALGO | 0.997715 | 3.922029 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-10-10T15:37:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f03809e0225b... |
c17ab7b0-2023-4d1f-a32d-f6a63a56d53a | TAUSEEF-01/Data-structure-and-algorithm | Sorting/Heap_sort/heap_sort.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
struct Heap
{
int arr[1000000];
int sz = 0;
void insert(int val)
{
arr[sz++] = val;
}
void heapify(int n, int indx)
{
int left_indx = indx * 2 + 1;
int right_indx = indx * 2 + 2;
int max_in... | ALGO | 0.999922 | 5.026841 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2024-01-28T20:58:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bbab0cd228a... |
f2623b46-da2e-4ab4-adfd-9c24c3e6374f | I-am-nagesh/Data_Structure_and_Algorithm | numerical_analysis/newtonbackward.cpp | #include <iostream>
#include <vector>
using namespace std;
// Calculate factorial
int factorial(int n) {
if (n <= 1)
return 1;
else
return n * factorial(n - 1);
}
// Calculate divided differences recursively
double dividedDifference(vector<double>& y, int n, int i, int j) {
if (j == 0)
... | ALGO | 0.999939 | 6.152901 | {
"github_metadata": {
"branch": "main",
"commit_count": 77,
"repo_created_at": "2023-10-03T10:45: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": "9eced391fd0... |
909ab1fb-8db0-47aa-abe3-23bd3337d356 | isabella0428/SJTU-EI209 | Lab4/p4_2/main.cpp | #include <iostream>
#include <time.h>
#include <cstdlib>
#include <fstream>
#include "change.h"
int main() {
int order;
cout<<"Please input order:(1:default data 2:input data)"<<endl;
cin>>order;
switch(order)
{
case 1 :
{char value[9] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'};
... | ALGO | 0.979852 | 3.194366 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-03-07T02:17:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "811dca042b... |
ea6cc9ed-c178-4e1b-83a4-642b4919a497 | Parul2004/DSA | Array/LeetcodeRemoveDuplicatesFromSortedArray.cpp | #include <bits/stdc++.h>
using namespace std;
vector<int> removeDuplicates(vector<int> &v)
{
set<int> s;
for (int i = 0; i < v.size(); i++)
{
s.insert(v[i]);
}
// total number of elements left after removing duplicates
int n = s.size();
// to clear vetcor "v"
v.clear();
... | ALGO | 0.999615 | 4.378999 | {
"github_metadata": {
"branch": "main",
"commit_count": 87,
"repo_created_at": "2023-04-13T13:37:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0a4868125dd... |
e50feb18-aa8e-4d93-9ac3-aa5a392b4014 | minhvo-dev/Data-Structures-and-Algorithms-in-CPP | inc/sorts/experimental_quick_sort.hpp | /*
* File name: "experimental_quick_sort.hpp"
* Date: 9/3/2020 7:38:32 PM
* Author: Vo, <NAME>
* Purpose: Implementation of quick sort algorithm
* which utilizes insertion sort to sort small arrays
* Container is not supported yet.
*/
#pragma once
#ifndef _EXPERIMENTAL_QUICK_SORT_HPP_
#define _EXPERIME... | ALGO | 0.999735 | 6.788807 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-09-09T02:14: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": "ea8dfabc46... |
fd97d5d1-25d2-4875-a100-d0826eeedaf6 | Kyuseilee/leetcode | cpprounttmp/122.买卖股票的最佳时机-ii.cpp | /*
* @lc app=leetcode.cn id=122 lang=cpp
*
* [122] 买卖股票的最佳时机 II
*/
// @lc code=start
class Solution {
public:
int maxProfit(vector<int>& prices) {
int total_profit = 0;
int min_val = 1e9;
int max_val = 0;
for(int price : prices){
// cout << price - min_val << " and "... | ALGO | 0.999681 | 5.848945 | {
"github_metadata": {
"branch": "master",
"commit_count": 100,
"repo_created_at": "2020-05-29T06:59: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": "71f72ff6... |
3383dac2-6182-4aac-a476-1f58b59b6d98 | Nehagarg816/DSA-practice | QueueInput.cpp | #include <iostream>
using namespace std; // Input Restricted Queue (Dequeue)
class QueueInput
{
public:
int size;
int *arr;
int front;
int rear;
QueueInput(int n) // Constructor to initialize the Queue
{
size = n;
arr = new int[size];
front = -1;
rear = -1;
}... | ALGO | 0.997513 | 4.39316 | {
"github_metadata": {
"branch": "main",
"commit_count": 118,
"repo_created_at": "2024-01-07T11:28: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": "943e9f93f2... |
87abeb33-e9b5-411d-9638-e36ed78fb931 | AnikSarker/ACM-Library | String/Suffix Automata.cpp | // Tested : HDU 4270 - Dynamic Lover
// Tested : SPOJ SUBLEX, SPOJ LCS, CF 128B
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
const int ALPHA = 28;
const int MAXLEN = 300005;
const int LOG = 20;
int TotalLen, Size;
int Root, Last;
// Dstnct_substr can be calculated online as St[pos].Dstnct_sub... | ALGO | 0.999957 | 3.358862 | {
"github_metadata": {
"branch": "master",
"commit_count": 1015,
"repo_created_at": "2018-06-13T04:49:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 306,
"forks": 118,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "484... |
43b49768-0057-437e-980b-27fb8b82e4fd | Ite-2022-pwr/sem1-pp-lab-proj-ak | MathFormulaEvaluator.cpp | /*
* Autor: <NAME>
* Grupa: WTP 15:15 (wtorek parzysty godz 15:15)
* Temat: Ewaluator wyrazen matematycznych
*/
#include <string.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdexcept>
#include "MathFormulaEvaluator.hpp"
// Definicje metod
namespace MathFormulaEvaluator
{
unsign... | ALGO | 0.93033 | 4.285756 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-02-17T18:24:54.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "09f5295fdbb4a... |
778aa69c-9bb7-4564-b03e-f5410dc6d177 | monolife506/problem_solving | 그래프/그래프 탐색/깊이 우선 탐색 2.cpp | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
const int MAX_N = 100000;
vector<int> graph[MAX_N + 1];
int in[MAX_N + 1];
void dfs(int cur)
{
static int nth = 0;
in[cur] = ++nth;
for (int nxt : graph[cur])
{
if (in[nxt] == 0)
dfs(nxt);
}
}
in... | ALGO | 0.999982 | 4.156946 | {
"github_metadata": {
"branch": "master",
"commit_count": 433,
"repo_created_at": "2019-09-18T12:56: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": "e90fdc9b... |
55c9e898-45c1-4dc0-bd05-05fbc6bd0409 | sachuverma/DataStructures-Algorithms | Leetcode Daily Challenge/April-2021/08. Letter Combinations of a Phone Number.cpp | /*
Letter Combinations of a Phone Number
=====================================
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order.
A mapping of digit to letters (just like on the telephone buttons) is given below... | ALGO | 0.999737 | 6.602468 | {
"github_metadata": {
"branch": "master",
"commit_count": 1430,
"repo_created_at": "2020-10-07T10:08:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2049,
"forks": 541,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "e8... |
e6f80547-cba8-440b-88a9-d15d4efc9b72 | yiranwu0/MyVector | MyVector.h | //
// Created by mfbut on 3/10/2018.
//
#ifndef MYVECTOR_MYVECTOR_H
#define MYVECTOR_MYVECTOR_H
#include <sstream>
#include <stdexcept>
#include <memory>
#include <algorithm>
#include <vector>
#include <ostream>
#include "VectorItr.h"
#include "ConstVectorItr.h"
template<typename T>
class MyVector {
friend Vecto... | TOOL | 0.910581 | 3.024827 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2018-10-26T03:07: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": "7879a4f8e3... |
b0256363-4e4c-4f0d-a6a1-470a23435f57 | google/monster-mash | third_party/libigl/include/igl/local_basis.cpp | // This file is part of libigl, a simple c++ geometry processing library.
//
// Copyright (C) 2014 <NAME> <<EMAIL>>
//
// This Source Code Form is subject to the terms of the Mozilla Public License
// v. 2.0. If a copy of the MPL was not distributed with this file, You can
// obtain one at http://mozilla.org/MPL/2.0/.
... | ALGO | 0.921583 | 6.071547 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2021-01-28T21:04:52.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1312,
"forks": 182,
"issues": 24,
"pull_requests": 0
},
"file_meta": {
"content_id": "839b57... |
fd3f62da-c725-493f-98b0-f7b01e7ed2fb | Rayhke/BaekjoonHub_Cplusplus | 백준/Bronze/33173. マスキングテープ (Masking Tape)/マスキングテープ (Masking Tape).cc | #include <iostream>
using namespace std;
int Paper[500][500];
bool Masking[500][500];
int main() {
int H, W, Q, K, X, Y, C; cin >> H >> W >> Q;
while (Q--) {
cin >> K >> X >> Y; X--; Y--;
if (K & 1) { cin >> C; }
for (int n = X; n < X + 2; n++) {
for (int m = Y; m < Y + 2; ... | ALGO | 0.994753 | 3.648418 | {
"github_metadata": {
"branch": "main",
"commit_count": 1851,
"repo_created_at": "2023-03-07T15:53: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": "3110e1d7c... |
8b013c63-6851-4342-af63-c4351767e7e3 | bigship/leetcode_solutions | 46_Permutations.cpp | // 46. Permutations
/*
* Given a collection of distinct integers, return all possible permutations.
Example:
Input: [1,2,3]
Output:
[
[1,2,3],
[1,3,2],
[2,1,3],
[2,3,1],
[3,1,2],
[3,2,1]
]
*/
class Solution {
public:
vector<vector<int>> permute(vector<int>& nums) {
const int n = nums.size();... | ALGO | 0.99978 | 6.665133 | {
"github_metadata": {
"branch": "master",
"commit_count": 687,
"repo_created_at": "2013-10-10T13:53: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": "0c795938... |
078c6555-519b-4825-9cab-6bc54defa6d6 | sachuverma/DataStructures-Algorithms | Striver Sheet/Day-21/Kth largest element in BST.cpp | /*
Kth largest element in BST
==========================
Given a Binary search tree. Your task is to complete the function which will return the Kth largest element without doing any modification in Binary Search Tree.
Example 1:
Input:
4
/ \
2 9
k = 2
Output: 4
Example 2:
Input:
9
... | ALGO | 0.999974 | 5.703488 | {
"github_metadata": {
"branch": "master",
"commit_count": 1430,
"repo_created_at": "2020-10-07T10:08:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2049,
"forks": 541,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "70... |
65b8c13e-f775-42b2-922f-71634a0b8245 | vamsicool007/SDE_SHEET_30Days-Striver | 5.3.cpp | //Merge two sorted Linked List
//Method1: Creating a separate linked list and adding nodes according to priority
struct ListNode
{
ListNode *next;
int data;
};
ListNode* mergeTwoLists(ListNode* l1, ListNode* l2)
{
ListNode *prev=new ListNode();
ListNode *head=prev;
while(l1!=NULL || l2!=... | ALGO | 0.999941 | 5.329542 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2021-03-22T11:51: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": "9652ad882e2... |
6d9a9954-b1b7-40bd-9f9b-969cfebe397c | TomFraser/FG-B-2016 | Software/Email Files For My Dude/Omnidirve Calculator C++.cpp | //NOTE ---------------------> For a easier time I would recomend using the python script to generate an array of motor values.
//This is FG&Bs motor array. Its a 2D array where each vertical element is a different direction and each horizontal element is a PWM value (We have 4 motors)
//Yours should look similar but ... | TOOL | 0.997698 | 3.927237 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2017-02-21T10:56: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": "bc19d2ec9f... |
422bc9c7-d047-4a00-a785-4cecf7c6745e | eyalroz/cuda-api-wrappers | examples/zip.hpp | /**
* @file
*
* @brief A function for applying other functions to corresponding elements
* in multiple iterable sequences or containers. Small C++11 implementation not
* requiring Boost (which offers boost::combine() and boost::zip_iterator.
*
* @todo Use a tag so that `for_each_zipped()` can be used for contain... | ALGO | 0.922781 | 7.072203 | {
"github_metadata": {
"branch": "master",
"commit_count": 1079,
"repo_created_at": "2016-11-11T19:31:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 851,
"forks": 85,
"issues": 85,
"pull_requests": 0
},
"file_meta": {
"content_id": "d77... |
6a93455f-6a69-4093-9347-0bb70465be1d | FSund/transient-pipeline-flow | src/heattransfer/steadystate.cpp | #include "heattransfer/steadystate.hpp"
#include <cmath>
#include "heattransfer/utils.hpp"
#include "heattransfer/burialmedium.hpp"
#include "heattransfer/pipewall.hpp"
#include "heattransfer/ambientfluid.hpp"
using arma::uword;
using arma::vec;
SteadyStateHeatTransfer::SteadyStateHeatTransfer(
const double... | ALGO | 0.998482 | 5.816006 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2020-01-08T10:08:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 3,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "b265a9543... |
47d61d27-5d8b-4451-8909-b911919d46ee | townboy/acm-algorithm | HDOJcode/4308 2012-11-13 21 36 11.cpp | ******************************
Author : townboy
Submit time : 2012-11-13 21:36:11
Judge Status : Accepted
HDOJ Runid : 7151241
Problem id : 4308
Exe.time : 62MS
Exe.memory : 528K
https://github.com/townboy
******************************
#include<stdio.h>
#include<string>
#include<memor... | ALGO | 0.99984 | 3.569405 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2014-03-23T03:30: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": "ebaed396a... |
9f2d254a-91c8-4321-b8c5-df8170e7c4af | AlifioDitya/Brute-Force-24-Card-Solver | src/main.cpp | // Main program
#include <iostream>
#include <limits>
#include <chrono>
#include "func.h"
using std::cin;
using std::cout;
using std::endl;
using std::numeric_limits;
using std::streamsize;
using std::string;
using std::to_string;
using std::getline;
int main() {
int option;
vector<double> cards;
cout ... | ALGO | 0.978472 | 5.616184 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2023-01-18T16:24: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": "6248ac432d0... |
972ed6f3-bbb8-4c87-80be-773a9493d150 | danieltrt/SBFL | results/PROGRAM_TO_PRINT_DOUBLE_HEADED_ARROW_PATTERN.py.cpp | void drawPattern ( int N ) {
int n = N ;
int row = 1 ;
int nst = 1 ;
int nsp1 = n - 1 ;
int nsp2 = - 1 ;
int val1 = row ;
int val2 = 1 ;
while ( ( row <= n ) && ( row != n ) ) {
int csp1 = 1 ;
while ( ( csp1 <= nsp1 ) && ( csp1 <= nsp1 ) ) {
cout << " " ;
cout << " " ;
csp1 = c... | ALGO | 0.999222 | 3.99982 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-08-03T19:59: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": "0e412001c9d6... |
99d00368-5b13-462d-a144-39838e5519c6 | lok-i/gym-learn_wbc | gym_learn_wbc/envs/raisim_dll/lib_src/leg.cpp | #include <Eigen/Dense>
#include <iostream>
#include <math.h>
#define PI 3.141592
//LEG LINK LENGTHS
#define L1 0.12
#define L2 0.303
#define L3 0.303
#define FL 0
#define FR 1
#define BL 2
#define BR 3
#define MASS 11.168
/*inertia = 0.178402 -0.0458692 0.0180358
-0.0458692 0.470056 -8.95236e-08
0.0180358 -8.95236... | ALGO | 0.999221 | 3.901518 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2020-06-05T08:20:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "049a4d20b0... |
c6700307-f75e-4c01-bef6-e67a2c776b5f | Khushi130404/GraphiX-Lab | Home/src/Lab2/Bresenham.cpp | #include <stdio.h>
#include <graphics.h>
#include <math.h>
int main()
{
int gd = DETECT, gm, color;
initgraph(&gd, &gm, "");
int x0 = 30, y0 = 50;
int x1 = 400, y1 = 100;
int dx = x1 - x0;
int dy = y1 - y0;
int yk = y0;
int xk = x0;
float m = (float)abs(dy) / (float)abs(dx);
if ... | ALGO | 0.980591 | 4.159455 | {
"github_metadata": {
"branch": "main",
"commit_count": 135,
"repo_created_at": "2024-08-01T12:21: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": "c245298145... |
514518f6-3b9d-4e91-810e-91a4f2132c16 | Krsmanovic-S/Leetcode-Exercises | Medium/36. Valid Sudoku/main.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
bool isValidSudoku(vector<vector<char>>& board) {
if(board.empty()) return false;
using ui = unsigned int;
// We use this temp vector to track individual rows/columns,
// as well as later use it for the 3x3 matrix.
ve... | ALGO | 0.996489 | 6.613263 | {
"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": "60951c2a98c... |
06a66c36-dc00-4a9c-9349-28137db38ab2 | mpriti23/Cracking_The_Coding_Interview | C++/Linked_list/Partition.cpp | //Partiton in linked list
#include <bits/stdc++.h>
using namespace std;
struct Node {
int data = 0;
Node * next = NULL;
};
void insert( Node * & head, int data )
{
if(head==NULL){
Node * newNode = new Node;
newNode->data = data;
head = newNode;
}else{
Node * newNode = new No... | ALGO | 0.99998 | 5.274009 | {
"github_metadata": {
"branch": "main",
"commit_count": 61,
"repo_created_at": "2021-04-15T05:20:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "868923c4973... |
796cd94e-af6c-4a1d-ba64-28f68d09efa4 | akshatnema/DSA-Practice | Leetcode/add_two_num.cpp | // Question link - https://leetcode.com/problems/add-two-numbers/
#include <bits/stdc++.h>
using namespace std;
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* Li... | ALGO | 0.999967 | 6.279147 | {
"github_metadata": {
"branch": "main",
"commit_count": 449,
"repo_created_at": "2021-09-12T10:04:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "41d552255c... |
7d241c7e-389e-4ee8-b149-ce38339109f8 | vengin/barrel_distortion_correction | hls_brl_corr1/src/brl_corr_hls.cpp | #include "brl_corr_hls.h"
#include <stdio.h> // Include for printf
#define DEBUG
// ===================================================================
// HARDWARE CORE FUNCTION
// ===================================================================
void barrel_correction_accel(
AXI_STREAM& input_s... | ALGO | 0.970365 | 5.468265 | {
"github_metadata": {
"branch": "main",
"commit_count": 65,
"repo_created_at": "2025-06-01T12:39: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": "f99ada0036c... |
3906c043-99f3-44b2-941d-07917cd0ad5f | shawnyin128/Stock_Analysis_CppCLI | 6883 final/Models/Model.h | #ifndef Model_hpp
#define Model_hpp
#pragma once
#include <string>
#include <vector>
#include "Trade.hpp"
#include "Stock.hpp"
#include <map>
#include <vector>
#include <time.h>
#include "../Utils/Utils.hpp"
#include "../Utils/Parser.hpp"
using namespace std;
namespace fre {
typedef vector<double> Vector;
typedef ... | ALGO | 0.931947 | 5.355104 | {
"github_metadata": {
"branch": "main",
"commit_count": 53,
"repo_created_at": "2022-04-23T17:57:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0f520ebd3a7... |
cb758efe-4df8-4f0e-8cfd-8bf3a94505a5 | ClszK/BOJ | Class2/1966.cpp | #include <algorithm>
#include <deque>
#include <iostream>
using namespace std;
typedef deque<pair<int, int>>::iterator queueIt;
bool findPriority(queueIt beginIt, queueIt endIt, int priority) {
for (queueIt it = beginIt; it != endIt; ++it) {
if (it->first > priority) return true;
}
return false;
}
int mai... | ALGO | 0.999993 | 3.763537 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2024-07-13T18:20: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": "407d9e3f083... |
bc966347-2549-428f-b57c-e281c57e0a9a | HoangDinhThai/Code-C-plus-plus | Chuong5_char2.cpp | #include <iostream>
#include <string>
using namespace std;
int main()
{
/*
Bài 1: Viết chương trình nhập vào 1 chuỗi gồm các ký tự từ a -> z và có thể chứa khoảng trắng.
Hãy loại bỏ các khoảng trắng ở đầu và cuối chuỗi.
*/
/*
string str = "";
cout << "Nhap chuoi: ";
getline(cin... | TOOL | 0.978223 | 3.278553 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-03-17T14:37:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6b5a597a810e... |
27140a75-4c80-44b2-8ae9-d42603af1a15 | MK1014/apcs_c_cplusplus | fun1-2.cpp | #include <iostream>
using namespace std;
int fun1(int a,int b){
return a+b;
}
int fun2(int a,int b){
return a-b;
}
int fun3(int a,int b){
return a*b;
}
int fun4(int a,int b){
return a/b;
}
void print_data(int a,int b){
int res;
res = fun1(a,b);
printf("aa = %d bb = %d aa + bb = %d \n",a,b,re... | ALGO | 0.99695 | 3.415188 | {
"github_metadata": {
"branch": "main",
"commit_count": 30,
"repo_created_at": "2022-11-19T03:00:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2582985aca6... |
6f8d1e53-4266-4bd3-af2e-4bf3c0e6b4fc | luizsilvadev/algoritimos | Exercicios/Lista 5 - Exercícios de Vetores/exercicio9.cpp | #include <iostream>
using namespace std;
int main(){
int vetor[7];
int qntd2=0;
int qntd3=0;
int qntd3e2=0;
for (int i=0;i<7;i++){
cin>>vetor[i];
if (vetor[i]%2==0){
qntd2++;
}
if (vetor[i]%3==0){
qntd3++;
}
if (vetor[i]%... | ALGO | 0.999969 | 3.26527 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-07-25T13:23:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "af2c60512a... |
3bb9b38d-bbd7-498f-a7cd-29a14282b36c | AriaKaf/SIC-XE-Assembler | src/main.cpp | /*
Names:<NAME>, <NAME>
Class Accounts : cssc4055, cssc4043
Class Information : CS 530, Spring 2024
Assignment Information : Assignment #2, XE assembler program
File name : main.cpp
*/
#include "optab.h"
#include "parse.h"
#include "types.h"
#include <iomanip>
#include <iostream>
#include <fstream>
void pro... | TOOL | 0.910469 | 5.50535 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2024-04-10T02:05:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8bcc0a8157a... |
80fccd37-a148-475c-b8c7-5b1c170e9ce9 | ferreiraluisa/faculdade | S04/INF 330 - Graph Theory And Models/tp1/B2.cpp | #include <iostream>
#include <vector>
#include <stack>
using namespace std;
bool vizinho(pair<int,int> road1,pair<int,int> road2){
if(road1.first == road2.first | road1.first == road2.second | road1.second == road2.first | road1.second == road2.first) return false;
if((road1.first < road2.first & road2.first <... | ALGO | 0.999972 | 3.590271 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2022-11-05T01:37: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": "bec0087c5b2... |
e94b4e65-7b7d-41f5-8612-270a1edd7070 | PetrTeichgrab/rocket-start-numerical-simulation | main.cpp |
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include "simlib.h"
//falcon 9 parameters
// mass
double initial_mass = 0.1134;
// thrust force
bool use_thrust_curve = false;
std::string thrust_curve_input = "data/f15_thrust_curve.dat";
double thrust_force = 3.9;
double burnout_time = 2.... | ALGO | 0.996189 | 5.995299 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2023-12-07T15:44: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": "c893ef26e4a... |
06dda2e4-7c2b-48a9-8fa8-20150e33f676 | Mosharat/graphics-lab | bresen_line_works.cpp | // C++ program for Bresenhams Line Generation
#include <graphics.h>
#include <bits/stdc++.h>
using namespace std;
void plotPixel(int x1, int y1, int x2, int y2, int dx,
int dy, int decide)
{
// pk is initial decision making parameter
// Note:x1&y1,x2&y2, dx&dy values are interchanged
// and passed in plotPixel f... | ALGO | 0.999613 | 5.26612 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-07-20T14:24:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d8aa18386971... |
0b222ed5-2da8-4caf-8f59-a6bb96e6de30 | SaiyamTuteja/CPP-codes- | Sorting/BubbleSort.cpp | #include <bits/stdc++.h>
using namespace std;
// swap the adjusent elements of array if needed
void BubbleSort(int arr[], int n)
{
for (int i = 0; i < n - 1; i++)
{
for (int j = 0; j < n - i - 1; j++)
{
if (arr[j + 1] < arr[j])
{
int temp = arr[j];
... | ALGO | 0.999648 | 4.972769 | {
"github_metadata": {
"branch": "main",
"commit_count": 229,
"repo_created_at": "2025-02-12T13:18:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cf077faa63... |
71d693cd-8cf6-431d-a6df-2e69751a3b6e | AikoKanazawa/study | pc_training/pct3.cpp | #include <iostream>
#include <cmath>
#include <vector>
#include <random>
typedef std::vector<double> VectorR;
typedef std::vector<int> VectorI;
double rand_i(int N)
{
std::random_device rnd;
std::mt19937 mt(rnd());
std::uniform_int_distribution<> RG(0.0, N);
... | ALGO | 0.998734 | 3.853903 | {
"github_metadata": {
"branch": "main",
"commit_count": 99,
"repo_created_at": "2023-10-31T03:59: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": "d8b65cc7579... |
1c933a04-a908-45fa-a045-56caedd159df | manumerous/wb_humanoid_mpc | humanoid_nmpc/humanoid_centroidal_mpc/src/command/CentroidalMpcTargetTrajectoriesCalculator.cpp | /******************************************************************************
Copyright (c) 2024, 1X Technologies. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must... | ALGO | 0.995603 | 7.398228 | {
"github_metadata": {
"branch": "main",
"commit_count": 115,
"repo_created_at": "2024-12-24T02:58:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 125,
"forks": 29,
"issues": 4,
"pull_requests": 1
},
"file_meta": {
"content_id": "76dbe7d... |
393aaca6-aaa5-4124-80b4-c33b2ff3c2f1 | Ekter/python | dicho.cpp | //dichotomy over a sorted and rotated array of integers
#include <iostream>
using namespace std;
int dichotomy(int *tab, int n, int x)
{
int left = 0;
int right = n-1;
int middle = (left+right)/2;
while (left <= right)
{
if (tab[middle] == x)
return middle;
if (tab[le... | ALGO | 0.999988 | 5.198322 | {
"github_metadata": {
"branch": "master",
"commit_count": 176,
"repo_created_at": "2021-04-11T15:32:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3ee4d63e... |
a6b6cae2-1f65-4713-9f22-b26286f4c55c | TASEmulators/BizHawk | waterbox/bsnescore/bsnes/nall/cd/rspc.hpp | #pragma once
//reed-solomon product code
namespace nall::CD::RSPC {
inline auto encodeP(array_view<uint8_t> input, array_span<uint8_t> parity) -> bool {
ReedSolomon<26,24> s;
uint lo = 0, hi = 43 * 2;
for(uint x : range(43)) {
for(uint w : range(2)) { //16-bit words
uint z = 0;
for(uint y : ra... | ALGO | 0.996428 | 6.256228 | {
"github_metadata": {
"branch": "master",
"commit_count": 22787,
"repo_created_at": "2015-06-22T14:33:14.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2406,
"forks": 414,
"issues": 602,
"pull_requests": 66
},
"file_meta": {
"content_id": ... |
b4474e69-d0fd-4c89-b769-1eba648924e5 | LSantos06/PseudoOS | pseudoSO/src/filas.cpp | #include "../include/filas.h"
//Metodos de processo usuario
void FilasUsuario::insere(Processo* processo){
//Coloca processo na fila na posicao correta
filas[(processo->getPrioridade())-1].push(processo);
}
void FilasUsuario::realimenta(Processo* processo){
//Aumenta prioridade
if(processo->getPrioridade() < ... | ALGO | 0.961284 | 4.773426 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-11-08T13:54:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "1037f0277... |
4fc5e833-8084-47be-9cfe-98479e0e8a3d | arnavdas88/dnn | src/Genix.DNN.Native/source/convolution.cpp | #include "stdafx.h"
#include "mkl.h"
#include <ppl.h>
using namespace concurrency;
#define MT
void __forceinline tile(const int count, const int length, const float* src, float* dst, const int dststep)
{
for (int i = 0; i < count; i++, dst += dststep)
{
memcpy(dst, src, length * sizeof(float));
}
}
#ifdef MT
t... | ALGO | 0.998743 | 3.612545 | {
"github_metadata": {
"branch": "master",
"commit_count": 270,
"repo_created_at": "2018-12-20T11:39: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": "0d008ab6... |
95d9acbd-a0da-4ea6-9767-580d175baf4a | ishandutta2007/codeforces-p | prabowo/normal/1706/C.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 200005;
int n;
int a[N];
int add[N];
int solve() {
scanf("%d", &n);
for (int i = 0; i < n; ++i) {
scanf("%d", &a[i]);
}
for (int i = 1; i < n - 1; ++i) {
add[i] = max(0, max(a[i - 1], a[i + 1]) - a[i] + 1);
}
long long ans = 0;
if (... | ALGO | 0.999175 | 4.29707 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:49: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": "05ed71943fb8... |
ac125fc4-cfd5-4507-b814-bf71d273710b | gankoji/datastructures | Cpp/Sorting/main.cpp | #include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <iostream>
#include <chrono>
#include "quicksort.h"
#include "mergesort.h"
#include "heapsort.h"
using namespace std;
// Sorting - main.cpp
// Here we'll implement a few different sorting algorithms
// Mostly to show that I can still do it in C++. This ... | ALGO | 0.999162 | 5.544343 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2020-09-24T22:01:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "664ca49fb... |
6477e9d0-a40b-4a6b-b6d4-b8096b018f30 | MaksimSkorobogatov/TheCar2 | CNN.cpp | //
// Created by rege on 21.03.19.
//
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <plog/Log.h>
#include <experimental/filesystem>
#include <opencv2/imgcodecs.hpp>
#include "CNN.hpp"
#include "Detect.hpp"
using namespace std;
using namespace cv;
using namespace experimental::filesystem;
void C... | DATA | 0.935835 | 5.244308 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2019-03-01T19:24: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": "7b49def05f... |
978ff55a-2f74-4d31-985f-df03a253eb49 | Jeevan-Neupane/CPP | Question On Doubly Linked List/localMaximaAndMinima.cpp | #include <iostream>
#include <vector>
using namespace std;
class Node
{
public:
Node *prev;
int value;
Node *next;
Node(int data)
{
prev = NULL;
value = data;
next = NULL;
}
};
class DoublyLikedList
{
public:
Node *head;
Node *tail;
DoublyLikedList()
... | ALGO | 0.999986 | 4.913809 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2023-04-21T03:17: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": "ab0e4647a... |
2dbd5991-5a79-48b8-8f1c-44c8c38932f0 | PablodlFR/CyA | P_07/grammar.cc | // Universidad de La Laguna
// Escuela Superior de Ingeniería y Tecnología
// Grado en Ingeniería Informática
// Asignatura: Computabilidad y Algoritmia
// Curso: 2º
// Práctica 7: Gramática Regular a partir de un DFA.
// Autor: <NAME>
// Correo: <EMAIL>
// Fecha: 12/11/2022
// Archivo grammar.cc: Implementación de la ... | ALGO | 0.991844 | 5.06319 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2021-10-06T19:05: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": "7985456ed36... |
29ff2b44-26e8-4b62-b413-9a4047762c32 | shogun-toolbox/shogun | src/shogun/kernel/string/WeightedDegreePositionStringKernel.cpp | /*
* This software is distributed under BSD 3-clause license (see LICENSE file).
*
* Authors: <NAME>, <NAME>, <NAME>,
* <NAME>, <NAME>, <NAME>, <NAME>
*/
#include <shogun/base/Parallel.h>
#include <shogun/base/progress.h>
#include <shogun/io/SGIO.h>
#include <shogun/lib/Signal.h>
#include <shogun/lib/Tri... | ALGO | 0.999566 | 6.450845 | {
"github_metadata": {
"branch": "develop",
"commit_count": 17589,
"repo_created_at": "2011-04-01T10:44:32.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3050,
"forks": 1034,
"issues": 413,
"pull_requests": 10
},
"file_meta": {
"content_id"... |
8919e334-df0c-482d-96d2-f12abcb12c56 | extrateres260/1132_DataStructure-Lab01-Lab01_Q1.cpp | LAB08/LAB08.cpp | #include <iostream>
using namespace std;
// ========================
// 樹的節點類別
// ========================
class TreeNode {
public:
int data; // 節點儲存的資料
TreeNode* left; // 指向左子節點
TreeNode* right; // 指向右子節點
// 節點建構子:設定資料並初始化左右指標為空
TreeNode(int val) : data(val), left(nullptr), right... | ALGO | 0.999947 | 5.755903 | {
"github_metadata": {
"branch": "main",
"commit_count": 55,
"repo_created_at": "2025-02-27T12: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": "fa2a9bdb9fb... |
2c4159da-abf4-47bf-acb0-21e957fd115f | ishandutta2007/codeforces-a | agua_podrida/normal/1468/A.cpp | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<int,int> pi;
typedef pair<ll,ll> pll;
typedef pair<double,double> pd;
typedef vector<pi> vpi;
typedef vector<pll>... | ALGO | 0.999523 | 3.822822 | {
"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": "dabfb4911c04... |
5716261b-210d-46a8-90a3-c009a244b26d | blinderchief/CP_Practice | D_Counting_Points.cpp | /**
* writer:blinderchief
**/
#include<bits/stdc++.h>
using namespace std;
// #define LOCAL
// #ifdef LOCAL
// #include "algo/debug.h"
// #else
// #define debug(...) "india"
// #endif
#define ll long long int
#define f(i,a,n) for(int i = a; i < n; i++)
#define vll vector<ll>
#define vi vector<int>
#define pb push_b... | ALGO | 0.999901 | 3.826006 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2025-02-17T18:25:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "63ca36e0e3e... |
d354f3ec-4369-437a-9763-342411f5f824 | hungptit/ioutils | ioutils/search_regex.hpp | #pragma once
#include "filesystem.hpp"
#include "fmt/base.h"
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <dirent.h>
#include <fcntl.h>
#include <string>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <vector>
namespace ioutils {
// A class which has ... | TOOL | 0.972414 | 6.39345 | {
"github_metadata": {
"branch": "master",
"commit_count": 454,
"repo_created_at": "2018-01-26T15:44:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "851a83d9... |
6b1e7a46-c4a2-41ce-b189-1bd46e191918 | anhhoccode/demoGit | bai3.5.cpp | #include <iostream>
using namespace std;
int ghpt (float a, float b, float c, float d, float e, float f, float &x, float &y)
{
int T;
double det=a*e-b*d;
if (det==0 && c!=f)
{
return T=0;
}
else if (det!=0 && a!=0)
{
x =(c*e-b*f)/det;
y =(a*f-c*d)/det;
return T=1;
... | ALGO | 0.999792 | 3.826687 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-09-01T14:29: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": "9de3ce29b5... |
21e60342-d773-459c-a7d0-267123e67963 | shahidul2k9/problem-solution | uva online judge/10911 Forming Quiz Teams.cpp | #include <cstdio>
#include <cstring>
#include <cmath>
#include <iostream>
#include <climits>
#define IS_ON(pos, bitmask) (1 << pos) & bitmask
#define ON(pos, bitmask) bitmask |= (1 << pos)
//#define OFF(pos, bitmask) bitmask ^= (1 << pos)
#define OFF(pos, bitmask) bitmask &= (~(1 << pos))
using namespace std;
in... | ALGO | 0.999043 | 3.398906 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2014-05-04T17:13:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 51,
"forks": 57,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "239c0b3... |
bc32572c-68e8-4798-b3bf-a8b72697d34d | PaudelSiddhanta/DS_repo | LAB/lab4.cpp | /**
* @file lab4.cpp
* @author <NAME>
* @description Traffic Junction Simulation using Circular Queue in C++
* @date June 1, 2024
*/
// starter-code-begins
#include <iostream>
#include <iomanip> //for setw() manipulator
#include <exception>
#include <sstream>
#include <string>
#include <time.h>
#include <stdlib.h>... | ALGO | 0.99423 | 5.456369 | {
"github_metadata": {
"branch": "test-branch",
"commit_count": 2,
"repo_created_at": "2025-04-15T23:08: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": "d013a... |
046a53b5-5df2-490d-ba59-9c98fea8f0b3 | extinctCoder/OpenGL | OpenGL/base4.cpp | #include "stdafx.h"
#include "base4.h"
base4* _base4;
extern "C"
float base4::degreeToRadious(float degree) {
return degree * _base4->pi / 180;
}
void base4::keyboardHandler(int key, int x, int y) {
switch (key)
{
case GLUT_KEY_LEFT:
_base4->rotate_obj += 0.1;
cout << "GLUT_KEY_LEFT" << endl;
break;
case GL... | ALGO | 0.914826 | 4.90196 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-12-09T18:50:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1ce64bf0e8... |
ad292ee8-67d0-41e6-b46f-38c14e48c9ab | apple/turicreate | src/external/boost/boost_1_68_0/boost/geometry/arithmetic/cross_product.hpp | // Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2009-2012 <NAME>, London, UK.
// Copyright (c) 2008-2012 <NAME>, Amsterdam, the Netherlands.
// Copyright (c) 2008-2012 <NAME>, Paris, France.
// This file was modified by Oracle on 2016.
// Modifications copyright (c) 2016, Oracle and/or its affi... | ALGO | 0.903896 | 7.363437 | {
"github_metadata": {
"branch": "main",
"commit_count": 1571,
"repo_created_at": "2017-12-01T00:42:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11198,
"forks": 1137,
"issues": 502,
"pull_requests": 21
},
"file_meta": {
"content_id": "... |
e4a48090-30e6-47d8-bf4b-5f5f28c6cfdb | Baplisca/AtCoder-Submission | atcoder.jp/abc151/abc151_d/Main.cpp | #include <bits/stdc++.h>
using namespace std;
//#define int long long
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define rep(i,n) for(int i=0;i<n;++i)
#define rep1(i,n) for(int i=1;i<n;++i)
#define exrep(i, a, b) for(ll i = a; i < b; i++)
#define out(x) cout << x << endl
#define EPS... | ALGO | 0.999857 | 4.040078 | {
"github_metadata": {
"branch": "master",
"commit_count": 1610,
"repo_created_at": "2020-08-25T04:37: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": "dcd58b7... |
373fdac2-5eb7-41dc-8003-9d66c8cacfbe | Gazella019/Leetcode | leetcode_147_v_slow.cpp |
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
class Solution {
public:
ListNode* insertionSortList(ListNode* head) {
if(head == NULL)
return NULL;
ListNode *now, *end, *p, *unSorted;
int count, sortedNum = 1;
... | ALGO | 0.999996 | 5.288485 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-02-27T03:07: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": "f12089ae1b31... |
ae78c2d4-4f47-46c8-bb01-cdd6860876dc | gaotianpeng/cpp_algo | other/0001_get_up_median.cc | #include <algorithm>
#include <iostream>
#include <random>
#include <vector>
using namespace std;
namespace {
class Math {
public:
static double random() {
std::random_device r_d;
std::default_random_engine engine(r_d());
std::uniform_real_distribution<> distribution(0.0, 1.0);
r... | ALGO | 0.999928 | 5.347353 | {
"github_metadata": {
"branch": "master",
"commit_count": 294,
"repo_created_at": "2022-06-29T08:08: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": "7d34381e... |
a9ecc0ac-f34a-46e2-b172-8a014e137dfc | KevinMackenzie/AmberRabbit | Source/QuicksandEngine/Graphics3D/Raycast.cpp | #include "../Stdafx.hpp"
#include "Raycast.hpp"
#include <glm/gtx/intersect.hpp>
#include "Mesh.hpp"
#include "Scene.hpp"
#include "Raycast.hpp"
#include "SceneNode.hpp"
template <class T>
void InitIntersection(Intersection &intersection, GLuint faceIndex, GLfloat dist, GLfloat u, GLfloat v, ActorId actorId, GLuint* ... | ALGO | 0.995023 | 4.370663 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2014-06-21T19:37:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "8f96deae5... |
fee8d958-c2d6-4f4e-8daf-6a1bdef955a1 | svn2github/freearc | Compression/_Examples/4x4.cpp | // (c) <NAME> <<EMAIL>>
// Multithreaded compression with overlapped I/O
// 4x4 version 0.3 - now in C++
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../Compression.h"
#include "../MultiThreading.h"
#define Wait Lock
// **********************************************************************... | ALGO | 0.92566 | 4.829074 | {
"github_metadata": {
"branch": "master",
"commit_count": 665,
"repo_created_at": "2015-11-01T00:37:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 45,
"forks": 18,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "78ad16... |
5607eeba-96b4-446a-9b70-05a15c789618 | ntanthedev/Cpp | Du Tuyen/More/CAMERA.cpp | //problem "CAMERA"
//created in 08:31:31 - Tue 06/08/2024
#include<bits/stdc++.h>
// #define int int64_t
using namespace std;
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
voi... | ALGO | 0.999995 | 4.529124 | {
"github_metadata": {
"branch": "main",
"commit_count": 482,
"repo_created_at": "2023-06-11T15:32:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5c489d84bd... |
13747529-24a0-415e-94bd-a9120d8ee085 | DCTewi/CodeWorkspace | Contests/Virtual Judge/XunlianSai 20190425/5.cc | // c
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int n, k, c;
struct Monster
{
int hp, atk;
Monster(int d = 0, int x = 0)
{
this->hp = d; this->atk = x;
}
}monster[MAXN];
int hurt[MAXN], f[MAXN][MAXN];
int ans = 1 << 20;
void dfs(int usec)
{
if (usec > c)
... | ALGO | 0.999923 | 3.641969 | {
"github_metadata": {
"branch": "master",
"commit_count": 162,
"repo_created_at": "2019-03-12T11:11:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3b0ae496... |
cf10eba5-2f24-4186-89ab-4392b783ac47 | yssgood/Leetcode-Algorithm | 0005-longest-palindromic-substring/answers.cpp | class Solution {
public:
string longestPalindrome(string s) {
string answer = "";
int mid;
int len;
int best_len = 0;
int n = s.length();
for (mid=0; mid < n; mid++){
for (int x = 0; mid-x >= 0 && mid+x <n; x++){
if (s[mid-x] != s[mid+x])... | ALGO | 0.999965 | 5.879575 | {
"github_metadata": {
"branch": "main",
"commit_count": 506,
"repo_created_at": "2022-12-26T13:58: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": "f6df2e7c96... |
e02e227f-b7ba-4c00-89d0-476115f93c2d | PrinceCuet77/Data-Structure | Polynomial Equation/Adding two polynomial equations using array.cpp | #include <bits/stdc++.h>
using namespace std;
class Term {
public:
int coff;
int exp;
};
class Polynomial {
private:
int n;
Term *tm;
public:
Polynomial(int n) {
this->n = n;
tm = new Term[this->n];
}
~Polynomial() {
... | ALGO | 0.993415 | 4.226804 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2020-04-30T12:08:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb2d94d2b6... |
76361b58-39fd-4a67-bc5e-117c4d5fe2d1 | xiangzebo/Polyanya | warthog/search/flexible_astar.h | #ifndef FLEXIBLE_ASTAR_H
#define FLEXIBLE_ASTAR_H
// flexible_astar.h
//
// A* implementation that allows arbitrary combinations of
// (weighted) heuristic functions and node expansion policies.
// This implementation uses a binary heap for the open_ list
// and a bit array for the closed_ list.
//
// TODO: is it bet... | ALGO | 0.983056 | 6.88279 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-03-17T09:24:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d174b1d0e08... |
c4e31f9a-404f-4e0e-ac06-4a4c7d4eba54 | AlphaSparse/Library | src/kernel/dcu/level3/trsm/dcu_trsm_x_csr_u_hi.cpp | #include <hip/hip_runtime.h>
#include "alphasparse/handle.h"
#include "alphasparse/util_dcu.h"
#include "alphasparse/compute.h"
#include "alphasparse/spdef.h"
#include "alphasparse/types.h"
template <unsigned int DIM_X, unsigned int DIM_Y, typename T>
__launch_bounds__(DIM_X *DIM_Y) __global__ void csrsm_transpose(AL... | ALGO | 0.999521 | 5.901136 | {
"github_metadata": {
"branch": "master",
"commit_count": 55,
"repo_created_at": "2022-02-17T03:19:44.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 45,
"forks": 7,
"issues": 3,
"pull_requests": 2
},
"file_meta": {
"content_id": "4b8a2fd91... |
34c61a47-4c78-4f13-95a7-dc13d3b4e2d3 | ishandutta2007/codeforces-m | maomao90/normal/903/G.cpp | // time-limit: 4000
// problem-url: https://codeforces.com/problemset/problem/903/G
// Hallelujah, praise the one who set me free
// Hallelujah, death has lost its grip on me
// You have broken every chain, There's salvation in your name
// <NAME>, my living hope
#include <bits/stdc++.h>
using namespace std;
templat... | ALGO | 0.999935 | 4.054452 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-06-06T01:03: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": "82b3e940df62... |
d26d27b4-8141-4b34-b4e1-94f5602bdf15 | omkarrane/dsa | LEETCODE/palindrome-partitioning.cpp | #include <bits/stdc++.h>
using namespace std;
// https://leetcode.com/problems/palindrome-partitioning/
/**
* we can use backtracking to solve this problem. we can also use some utility functions to assist us while backtracking
*/
class Solution {
public:
vector<vector<string>> res;
bool isPalindrome(st... | ALGO | 0.999962 | 6.713406 | {
"github_metadata": {
"branch": "master",
"commit_count": 518,
"repo_created_at": "2019-01-01T18:10:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aff9c9c9... |
aa49a595-2cfb-44f1-b053-6c059be16371 | baicaihenxiao/LeetCode-Myself | cpp/BFS/126. Word Ladder II.cpp | /*
2017-8-16 17:43:52
https://leetcode.com/problems/word-ladder-ii/description/
Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) from beginWord to endWord, such that:
Only one letter can be changed at a time
Each transformed word must exist in the wo... | ALGO | 0.999982 | 5.219139 | {
"github_metadata": {
"branch": "master",
"commit_count": 270,
"repo_created_at": "2016-07-06T15:19:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 4
},
"file_meta": {
"content_id": "f137e16d... |
cc70e8bc-3cf1-4534-a0e3-5ebe219ff02b | psh3253/Baekjoon | 1238/1238/1238.cpp | #include <iostream>
#include <vector>
#include <queue>
#define INF 987654321
using namespace std;
vector<pair<int, int>> edge[1001];
int d[1001];
int home_to_X[1001];
int X_to_home[1001];
void dijkstra(int start)
{
priority_queue <pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> pq;
pq.push(make_pair... | ALGO | 0.999978 | 4.265822 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2019-09-11T15:23: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": "540aee9d8... |
5e68d9da-a925-47ec-b83f-97469163bac6 | uthman-khan/Data-Structure | advance/array_insertions_deletion_advanced copy.cpp | #include <iostream>
using namespace std;
class array{
private:
int tsize; //tsize ==> total size,
int usize; //usize ==> used size, of the array
int temp;
int *ptr;
public:
array(int ts) : tsize(ts){
this->usize = 0;
this->ptr = new int[ts];
}
/*8
/**/
* @brief Constructor for the array class.//+
*//+
... | ALGO | 0.999938 | 5.23283 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2024-09-18T05:43:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6e1f7e6aa... |
9d42802c-f4c5-4f91-aaca-de06ec0034da | dcamvik2020/Full-code-base | stuff/very_simple_tasks/linear_system.cpp | #include <iostream>
#define eps 1e-6
#define isNull(x) (-eps < (x) && (x) < eps)
int main()
{
double a, b, c, d, e, f;
std::cin >> a >> b >> c >> d >> e >> f;
double d0 = a * d - b * c;
double d1 = e * d - b * f;
double d2 = a * f - e * c;
if (!isNull(d0))
{
std::cout << "2 " << d1 / d0 << " " << d... | ALGO | 0.999575 | 3.944107 | {
"github_metadata": {
"branch": "main",
"commit_count": 60,
"repo_created_at": "2021-04-11T16:33: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": "701f383b3f0... |
79f7edc1-bc0f-48dd-8626-7ec69b238ece | wien0128/problem-solve | BaekJoon/2961_도영이가만든맛있는음식_Bitmasking_BruteForce.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <limits>
using namespace std;
// 도영이가만든맛있는음식 2961 Bitmasking, BruteForce
// O( n * 2^n )
int main(void)
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int n;
cin >> n;
vector<pair<int, int>> v(n); /... | ALGO | 0.999866 | 4.309395 | {
"github_metadata": {
"branch": "main",
"commit_count": 412,
"repo_created_at": "2024-03-05T13:13: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": "dba655d24e... |
a27c705d-1f1a-42ad-8d53-4fadc736d27e | ishandutta2007/codeforces-y | yosupo/normal/436/B.cpp | #include <vector>
#include <iostream>
#include <set>
#include <cstdio>
#include <queue>
#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <ctime>
#include <algorithm>
#include <tuple>
#include <algorithm>
#include <limits>
#include <map>
using namespace std;
typedef long long ll;
typedef pair<int, int>... | ALGO | 0.999818 | 3.468071 | {
"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": "9206dfd6a4c1... |
cc498956-3433-4f73-b638-6638d8471fae | AakashChauhan133/UDR | semester_3/ObjectOrientedPrograming/09_assignment/02_shape.cpp | /*
Date: November 16, 2023
*/
#include <iostream>
using namespace std;
class Shape
{
protected:
double dim1, dim2;
public:
void get_area(double dim1, double dim2)
{
this->dim1 = dim1;
this->dim2 = dim2;
}
virtual void display_area()
{
cout << "No area" << endl;... | TOOL | 0.970135 | 5.110999 | {
"github_metadata": {
"branch": "master",
"commit_count": 71,
"repo_created_at": "2023-01-14T11:02:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eece05dc4... |
6ce579c6-fadb-4985-989e-bc89a92f0136 | busebd12/InterviewPreparation | LeetCode/C++/General/Hard/NumberOfWaysOfCuttingAPizza/solution.cpp | #include <vector>
using namespace std;
/*
Solutions inspired by these resources:
1) https://www.youtube.com/watch?v=NU4hYLVprGg
2) https://www.youtube.com/watch?v=RFyJMlpA-pY
3) https://leetcode.com/problems/number-of-ways-of-cutting-a-pizza/solutions/623732/java-c-python-dp-prefixsum-in-matrix-clean-code/
*/
/*
Sol... | ALGO | 0.999958 | 5.885817 | {
"github_metadata": {
"branch": "master",
"commit_count": 218,
"repo_created_at": "2015-12-15T14:19: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": "a9287e0b... |
be199a0f-92c4-4c11-b5eb-a4d6578cfeaa | deepdarshan21/leetcode-solutions | 62. Unique Paths/DP.cpp | #include <bits/stdc++.h>
using namespace std;
/*
Approach: DP
Implement DP in recursive solution
Edge Cases:
Time Complexity: O(n) Space: O(n)
Status: Accepted
Runtime: 0 ms faster than: 100%
Memory Usage: 6.4 MB less than: 52%
Remarks:
*/
class Solution {
public:
int uniquePaths... | ALGO | 0.99999 | 6.048439 | {
"github_metadata": {
"branch": "main",
"commit_count": 889,
"repo_created_at": "2022-01-07T14:50:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "72e65a433d... |
6c5928dc-18fb-40be-9156-300d3431dbc4 | Shubhamrawat5/open-source-contribution | CPP STL/vector/vactor_othr_fucn.cpp | #include <iostream>
#include <vector>
using namespace std;
//#define int long long
/*
vector function
1. pop_back();
2. front();
3. back();
4. resize();
5. insert();
6. empty();
7. clear();
8. erase();
*/
int count = 0;
int main()
{
vector<int> v{10, 20, 30, 4, 5, 440};
v.pop_back();
//v.at(0) = 0; or... | TOOL | 0.909977 | 3.276938 | {
"github_metadata": {
"branch": "main",
"commit_count": 1337,
"repo_created_at": "2021-09-30T20:09:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 86,
"forks": 303,
"issues": 0,
"pull_requests": 17
},
"file_meta": {
"content_id": "3b086... |
edc0f957-2da8-4c71-a9c8-1b7dc11bf583 | SyedT1/OOP | Varsity Lectures/Exams/Mid-term/3/000.cpp | #include <iostream>
#include <cstdlib>
using namespace std;
class Array
{
int *dataPtr;
int noOfElements;
float avg;
public:
void set_noOfElements(int x)
{
noOfElements = x;
}
void set_values(int mx)
{
dataPtr = new int[noOfElements];
for (int i = 0; i < noOfElem... | ALGO | 0.977702 | 4.138212 | {
"github_metadata": {
"branch": "main",
"commit_count": 183,
"repo_created_at": "2021-02-02T09:05: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": "9ce03f6782... |
879af91e-ae6a-4448-b1d0-76d083baac15 | khanhnamle1994/technical-interview-prep | LeetCode/Reverse-Linked-List-II.cpp | // Reverse a linked list from position m to n. Do it in-place and in one-pass.
/* For example:
Given 1->2->3->4->5->NULL, m = 2 and n = 4,
return 1->4->3->2->5->NULL. */
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}... | ALGO | 0.999901 | 6.138866 | {
"github_metadata": {
"branch": "master",
"commit_count": 1000,
"repo_created_at": "2017-05-22T05:00:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 668,
"forks": 203,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b91... |
e3b04eb9-a969-4633-b7d6-3520603f5c78 | ishandutta2007/codeforces-m | matrixcascade_qwq/normal/1286/B.cpp | //#pragma GCC optimize("Ofast", "unroll-loops")
//#pragma GCC target("sse", "sse2", "sse3", "ssse3", "sse4", "avx")
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define int long long
#define YES puts("YES")
#define NO puts("NO")
#define Yes puts("Yes")
#define No puts("No")
#define edl p... | ALGO | 0.999843 | 3.235327 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-06-06T01:03: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": "17933876a1bf... |
201f3deb-ae87-4806-9d86-40f2861846ad | Spirit599/algorithm | lintcode/1849_1.cpp | class Solution {
public:
/**
* @param customers: the number of customers
* @param grumpy: the owner's temper every day
* @param x: X days
* @return: calc the max satisfied customers
*/
int maxSatisfied(vector<int> &customers, vector<int> &grumpy, int x) {
int n = custom... | ALGO | 0.999841 | 5.543833 | {
"github_metadata": {
"branch": "master",
"commit_count": 98,
"repo_created_at": "2022-04-25T08:50:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7d2947562... |
ee98f7dc-b7d1-4b35-a494-3b8d6c88d8d8 | Daves1245/UCF-Programming-Team | upsolve/fourteen/i/i.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct Dinic {
struct Edge {
int to, rev;
ll c, oc;
ll flow() { return max(oc - c, 0LL); } // if you need flows
Edge(int tt, int rr, ll cc, ll oo){
to = tt; rev = rr; c = cc; oc = oo;
}
};
vector<int> lvl, ptr, q;... | ALGO | 0.999928 | 3.810505 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2021-07-20T20:48:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5dc8bdfcf... |
9e524762-6081-4e33-858e-345e740eb7eb | kmjp/procon | codeforce/621-660/625/d.cpp | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZER... | ALGO | 0.999841 | 3.784009 | {
"github_metadata": {
"branch": "master",
"commit_count": 3966,
"repo_created_at": "2015-02-15T11:25:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 2,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "a26333... |
54032247-c932-4c7d-acef-b698d5649796 | jhickeyPhysics/gbmControl | src/gamma.cpp | // Gamma distribution with natural log link function ( mean = std::exp(prediction) )
// -19 <= prediction <= +19
#include "gamma.h"
#include <math.h>
#include <iostream>
CGamma::CGamma()
{
}
CGamma::~CGamma()
{
}
void CGamma::ComputeWorkingResponse
(
const double *adY,
const double *adMisc,
const doubl... | ALGO | 0.999491 | 7.022928 | {
"github_metadata": {
"branch": "master",
"commit_count": 314,
"repo_created_at": "2016-04-05T12:48: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": "f2aea2d1... |
acf9f5f5-fb07-44a7-bbf1-238307756ebb | yftsai/uva-online-judge | problem_set_volumes/volume_14/1449.cpp | #include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
using namespace std;
struct node
{
char ch;
map<char, node *> child;
node *parent, *suffix, *dictionary;
vector<int> word_index;
node(node *p, char c):
ch(c),
parent(p),
suffix(NULL),
... | ALGO | 0.9997 | 3.975983 | {
"github_metadata": {
"branch": "master",
"commit_count": 188,
"repo_created_at": "2016-01-28T02:37:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e8d579c3... |
03e78146-529c-4486-abfb-4bca5b3df879 | DPRAHUL-2021/RiverCrossingProblem | RiverCrossing.cpp | #include<bits/stdc++.h>
using namespace std;
typedef tuple<char,char,char,char> State;
State initial_state = make_tuple('L','L','L','L');
State goal_state = make_tuple('R','R','R','R');
bool is_valid(State state)
{
char M,T,G,C;
tie(M,T,G,C) = state;
if((T == G && T != M) && (G == C && G != M))
{
... | ALGO | 0.999977 | 4.120896 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-08-04T13:24: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": "8c2b0690fa80... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.