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 |
|---|---|---|---|---|---|---|---|
1a9663c7-4e12-49d8-b7d4-f1286fec3b03 | devaspirant0510/C-DataStructure | DataStructure/Stack/main.cpp | #include <iostream>
#include "myStack.hpp"
#include "Student.hpp"
using namespace std;
char openStr[4] = "({[";
char closeStr[4] = ")}]";
bool checkType(char myVal, char* type);
bool isCouple(char a, char b);
int main() {
Stack<char> stack(100);
char input[] = "()(){{[()]{}}}";
for (int i = 0; i < sizeof(input)-... | ALGO | 0.994612 | 4.467877 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2021-09-28T01:16:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bc5e2b4ab4a... |
5a56e687-70e1-46f0-b0e6-41f0e12947c6 | nchkdxlq/Algorithm | Algorithm/Algorithm/Sort/InsertionSort.hpp | //
// InsertionSort.hpp
// Algorithm
//
// Created by nchkdxlq on 2017/7/21.
// Copyright © 2017年 nchkdxlq. All rights reserved.
//
#ifndef InsertionSort_hpp
#define InsertionSort_hpp
#include <stdio.h>
#include <algorithm>
using namespace std;
/*
插入排序的特点
1. 当排序的数组近乎有序时,排序的速度非常快,因为比较的速度远远快于交换和赋值的速度
2. 可以提前终止... | ALGO | 0.999624 | 5.266249 | {
"github_metadata": {
"branch": "master",
"commit_count": 179,
"repo_created_at": "2017-07-17T14:48: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": "2650653a... |
3f644586-6f9e-4d43-8b4b-630d34c2be37 | Byeongchan99/Algorithm_Study | 2021-05-01-baekjoon15552.cpp | 15552 빠른 A+B
본격적으로 for문 문제를 풀기 전에 주의해야 할 점이 있다. 입출력 방식이 느리면 여러 줄을 입력받거나 출력할 때 시간초과가 날 수 있다는 점이다.
C++을 사용하고 있고 cin/cout을 사용하고자 한다면, cin.tie(NULL)과 sync_with_stdio(false)를 둘 다 적용해 주고, endl 대신 개행문자(\n)를 쓰자.
단, 이렇게 하면 더 이상 scanf/printf/puts/getchar/putchar 등 C의 입출력 방식을 사용하면 안 된다.
Java를 사용하고 있다면, Scanner와 System.out.prin... | ALGO | 0.999664 | 5.252475 | {
"github_metadata": {
"branch": "main",
"commit_count": 431,
"repo_created_at": "2020-11-15T16:22: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": "51e9a32465... |
9ce39c2c-70cb-4dd4-bd79-7320f7d8a3a0 | Mhhhaster/PAT-test-Advanced | 1041-1060/1046 Shortest Distance.cpp | #include<iostream>
#include<stdlib.h>
#include<stdio.h>
using namespace std;
int dis[100000];
void Print(int a, int b,int N)
{
int Cdis = 0;
int Rdis = 0;
int start, end;
if (a > b)
{
start = b - 1;
end = a - 1;
}
else
{
start = a - 1;
end = b - 1;
}
... | ALGO | 0.999991 | 3.769763 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2020-04-15T09:26: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": "9b3e42bd1... |
803db4e3-6682-4f7d-868d-18aba08d34a2 | JRDNXr/C-Plus-Plus-Tutorials | 8-Constants-and-Enums/8-Constants-and-Enums/main.cpp | #include <iostream>
using namespace std;
enum weekday {
Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday,
};
// enum (enumeration) is a way to assign a custom word with a number. Every
// word in an enum is automatically assigned a value (in order, starting
// from 0).
enum colours {
Red = 19,... | TOOL | 0.95091 | 3.401157 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-04-15T18:57:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "187035437cbd... |
76a82b45-6120-4597-8110-10493521e119 | nitishbansal32/DSA-Project | DA.cpp | #include<iostream>
#include<list>
#include<string> //to define getline()
#define MAX_CHAR 256
using namespace std;
class SuffixTrieNode
{
private:
SuffixTrieNode *children[MAX_CHAR];
list<int> *indexes;
public:
SuffixTrieNode() // Constructor
{
// Create an empty linked list for indexes of
// suffixes startin... | ALGO | 0.997421 | 3.983707 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2021-05-21T13:13: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": "fb9502152c42... |
50aad04f-d095-43a2-8797-8b953dd2db4e | vukanoa/Coding_Problems | Orderless_Problems/Optimize_Version_2/optimize_version_2.cpp | #include <algorithm>
#include <iostream>
#include <unordered_map>
int original(vector<int> &A)
{
int N = A.size();
int result = 0;
for (int i = 0; i < N; i++)
for (int j = i; j < N; j++)
if (A[i] == A[j]) // Now when they are the SAME!
result = max(result, j - i);
return result;
}
/* =================... | ALGO | 0.999393 | 5.506657 | {
"github_metadata": {
"branch": "main",
"commit_count": 2647,
"repo_created_at": "2022-10-27T12:00:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b621c85e5... |
b0bec2eb-23f9-4029-9dee-ebd0ee13834e | abhishekolympics/My_daily_leetcode_solutions | Binary Tree Level Order Traversal.cpp | //WATCH THIS VIDEO https://www.youtube.com/watch?v=vQIiUWofWw8
/**
* 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) {}
* ... | ALGO | 0.999867 | 5.645702 | {
"github_metadata": {
"branch": "main",
"commit_count": 77,
"repo_created_at": "2024-01-09T16:40:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9b868d7d680... |
c2556cd6-0544-4142-bf0e-05f56ca1fda0 | NeoWickWang/Data_Structure_cpp | Search/Dynamic/BinarySearchTree/BinarySearchTreeMain.cpp | #include <iostream>
#include "BinarySearchTree.cpp"
using namespace std;
int main()
{
SET<int, char const *> a[] = {{10, "aaa"}, {8, "bbb"}, {21, "ccc"}, {87, "ddd"}, {56, "eee"}, {4, "fff"}, {11, "ggg"}, {3, "hhh"}, {22, "iiiii"}, {7, "jjj"}};
BinarySearchTree<int, char const *> tree; // char* :可修改值,char cons... | ALGO | 0.999521 | 3.60665 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2022-07-02T01:57: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": "fd0df664ccf... |
4954ea6d-ee8a-4c9f-b2b1-c3dbac89a0e9 | makio93/competitive-annualsites | Google/CodeJam/2022/Q/Q4/main0.cpp | // 本番AC
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i=0; i<(int)(n); ++(i))
#define rep3(i, m, n) for (int i=(m); (i)<(int)(n); ++(i))
#define repr(i, n) for (int i=(int)(n)-1; (i)>=0; --(i))
#define rep3r(i, m, n) for (int i=(int)(n)-1; (i)>=(int)(m); --(i))
#defin... | ALGO | 0.999898 | 4.016566 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2021-07-03T15:32:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e3d2e68f78b... |
1faedad9-ae40-4426-8544-6e0a879262f3 | Mehedi259/CodeForces | div2permutation.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
vector<int> a(n), b(n);
// Read input array a
for (int i = 0; i < n; i++) {
cin >> a[i];
}
//... | ALGO | 0.99998 | 4.939692 | {
"github_metadata": {
"branch": "main",
"commit_count": 161,
"repo_created_at": "2023-04-24T04:49:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bbdafa7dc7... |
0f638d59-0b64-491b-a12b-da363168b829 | itohdak/Competitive_Programming | AtCoder/ABC/378/B.cpp | #include <bits/stdc++.h>
#include <print.hpp>
using namespace std;
// #include <atcoder/all>
// using namespace atcoder;
#define ll long long
#define ld long double
#define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--)
#define rrep(... | ALGO | 0.999877 | 4.312863 | {
"github_metadata": {
"branch": "master",
"commit_count": 98,
"repo_created_at": "2020-10-16T18:27: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": "a7affbf14... |
faeea98d-fe87-40a7-922a-5365108eba32 | zhli-phys/LeetCode | 621_Task scheduler.cpp | class Solution {
public:
int leastInterval(vector<char>& tasks, int n) {
vector<int> todo(26, 0);
int len = tasks.size();
for (int i = 0; i < len; i++)
todo[tasks[i] - 65]++;
int ans = 0;
queue<char> doing;
while (true) {
if (doing.size() > n)... | ALGO | 0.999992 | 6.238865 | {
"github_metadata": {
"branch": "main",
"commit_count": 273,
"repo_created_at": "2021-08-09T20:35:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "043234d761... |
6fcd97f5-32f1-43b1-a5d9-aa4587eee1c7 | taruns0203/DSA | Divide-and-Conquer/quickSort/quickSort.cpp | #include <iostream>
using namespace std;
int partition(int arr[], int s, int e) {
// step-1: choose pivotelement
int pivotIndex = s;
int pivotElement = arr[s];
// step:2: find right position for pivot and place it there
int count = 0;
for (int i = s + 1; i <= e; i++) {
if (arr[i] <= pivotElement) {
... | ALGO | 0.999995 | 6.188214 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2023-03-20T10:06:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8401d534a... |
68d238b4-1c5a-4274-8c5d-ced0d8632e59 | Isa-rentacs/topcoder | MagicStonesStore.cpp | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cst... | ALGO | 0.999851 | 4.141938 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2011-12-20T04:46:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "421e65025a... |
257bc20c-e2fa-4497-99b0-0aae41891529 | prateekshyap/DSA | Tree/GFG_inOrderSuccBST.cpp | /*
https://practice.geeksforgeeks.org/problems/inorder-successor-in-bst/1
Inorder Successor in BST
*/
// { Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
// Tree Node
struct Node {
int data;
Node *left;
Node *right;
Node(int val) {
data = val;
left = right = NULL;
... | ALGO | 0.999774 | 5.110225 | {
"github_metadata": {
"branch": "main",
"commit_count": 655,
"repo_created_at": "2021-05-19T17:53:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 15,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5139b991d... |
02589fc7-36dc-4b0a-81ea-e258c73835d1 | QuestPackageManager/bs-cordl | include/GlobalNamespace/zzzz__CubicBezierHelper_impl.hpp | #pragma once
// IWYU pragma private; include "GlobalNamespace/CubicBezierHelper.hpp"
#include "System/zzzz__Object_impl.hpp"
#include "GlobalNamespace/zzzz__CubicBezierHelper_def.hpp"
#include "System/Collections/Generic/zzzz__List_1_def.hpp"
#include "UnityEngine/zzzz__Vector3_def.hpp"
// Writing Method size for meth... | ALGO | 0.958872 | 6.993036 | {
"github_metadata": {
"branch": "main",
"commit_count": 49,
"repo_created_at": "2023-12-27T18:45:51.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "856825c0d6dc... |
fd01b0ca-d394-47ab-a9f2-e7f096b6e893 | SAGAR-RAJ1/DSA-CODES1 | QUEUE/VIDEO 96/cirQueuePractice.cpp | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
class queue
{
int *arr;
int front;
int rear;
int size;
public:
queue(int n)
{
arr = new int[n];
size = n;
front = rear = -1;
}
bool IsEmpty()
{
return front == -1;
}... | ALGO | 0.996695 | 3.536075 | {
"github_metadata": {
"branch": "main",
"commit_count": 55,
"repo_created_at": "2024-10-23T15:55: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": "c4ba1249d73... |
9c2e701b-4a18-47f3-81e6-6e63d9f5653f | apple/turicreate | src/external/boost/boost_1_68_0/boost/geometry/strategies/cartesian/point_in_box.hpp | // Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2007-2015 <NAME>, Amsterdam, the Netherlands.
// Copyright (c) 2008-2015 <NAME>, Paris, France.
// Copyright (c) 2009-2015 <NAME>, London, UK.
// This file was modified by Oracle on 2015-2017.
// Modifications copyright (c) 2015-2017, Oracle and/o... | TOOL | 0.9855 | 7.541322 | {
"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": "... |
10448aa2-46a5-4279-b769-255c8838ac2a | abhiXsliet/Solved-DSA-Problems | Leetcode Daily Challenge/008-February-2024/014-rearrange-array-elements-by-sign.cpp | // https://leetcode.com/problems/rearrange-array-elements-by-sign/
#include <bits/stdc++.h>
using namespace std;
class Solution {
private:
// TC = O(N)
// SC = O(N/2) + O(N/2) ~ O(N) -> extra space
// N/2 -> since it is divided into equal parts
vector<int> solve_brute(vector<int>& arr, int n) {
... | ALGO | 0.999998 | 5.495002 | {
"github_metadata": {
"branch": "main",
"commit_count": 2156,
"repo_created_at": "2023-07-29T13:17:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "39d0f46f8... |
f3eb1358-8e97-4fb1-828d-e7da51021ae7 | mikelv92/Gas-Source-Localization | regression/src/Bout.cpp | /*
* Bout.cpp
*
* Created on: May 9, 2016
* Author: mikel
*/
#include "regression/Bout.h"
Bout::Bout() {
for (int i = PID; i != NUM_SIGNALS; i++)
{
SignalIndex index = static_cast<SignalIndex>(i);
sampleIndexes[i] = 0;
double * signal = (double*)malloc(SIGNAL_LEN * sizeof(double));
signalsMap[in... | ALGO | 0.977182 | 4.184876 | {
"github_metadata": {
"branch": "master",
"commit_count": 94,
"repo_created_at": "2016-05-10T15:17:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7da8dc2cd... |
da762dd0-5f95-44bf-811d-f471a8705dc0 | HoRiZ8N/Lab | lab3/3.5/functions.cpp | #include "functions.h"
int* createMatrix() {
int* matrix = new int[effSize];
return matrix;
}
void fillMatrix(int* matrix) {
for (int i = 0; i < effSize; i++) {
matrix[i] = rand() % 10 + 1;
}
}
int getIndex(int i, int j) {
return (j * (j + 1)) / 2 + i;
}
void printMatrix(int* matrix) {
... | ALGO | 0.997476 | 4.51838 | {
"github_metadata": {
"branch": "main",
"commit_count": 92,
"repo_created_at": "2024-09-26T10:01: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": "6fc4c52964b... |
b033ff80-351e-45d6-9609-fb1dd17f9c78 | GTLIDAR/digit_controller | include/GeometricKinematics/FK_Geo_v.cpp | //
// Academic License - for use in teaching, academic research, and meeting
// course requirements at degree granting institutions only. Not for
// government, commercial, or other organizational use.
// File: FK_Geo_v.cpp
//
// MATLAB Coder version : 3.4
// C/C++ source code generated on : 17-Jul-2022 20... | ALGO | 0.972039 | 3.868467 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2023-03-09T19:06:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 9,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "684d053a93b... |
5c862e55-4a03-419a-9b77-fed434e2ae37 | pritmanvar/DSA-with-CPP | Binary Search Tree/Bottom View of Binary Tree.cpp | // Problem Link : https://practice.geeksforgeeks.org/problems/bottom-view-of-binary-tree/1#
vector <int> bottomView(Node *root) {
map<int,int> mp; // in this i will store bottom view, map of horizantal distance, data
vector<int> ans; // answer
queue<pair<Node*,int>> q; // queue for level ord... | ALGO | 0.999994 | 5.548396 | {
"github_metadata": {
"branch": "main",
"commit_count": 648,
"repo_created_at": "2021-05-22T09:01:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 15,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0e2cd5880... |
1ab89963-5e4f-4e4f-87f3-f374b754270f | vanshu778/DSA-2025 | Searching/total_occurence.cpp | #include<iostream>
#include<vector>
using namespace std;
int firstOccurence(vector<int>arr, int target){
int start=0;
int end= arr.size()-1;
int mid= start+(end-start)/2;
int ans = -1;
while(start<=end){
if(arr[mid]==target){
ans=mid;
end=mid-1; // Skip the right p... | ALGO | 0.999911 | 6.000522 | {
"github_metadata": {
"branch": "main",
"commit_count": 79,
"repo_created_at": "2025-01-12T07:28: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": "b4dcd3949b7... |
9672d959-eb4b-42b3-972f-fc83647aa44e | ishandutta2007/codeforces-p | pwild/normal/518/A.cpp | #include <list>
#include <map>
#include <stack>
#include <set>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cfloat>
#include <numeric>
#include <functional>
#include <iomanip>
#include <cassert>
#include... | ALGO | 0.999963 | 3.436799 | {
"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": "1a95f14db9ea... |
ce942d8d-cf32-40d8-8b1b-39be722d828a | AlekseyKravchuk/cpp | Yandex_Practicum/sprint_08/01_debug_macroses.cpp | #include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
// функция выводит элементы контейнера через запятую
template <typename It>
void PrintRangeComma(It range_begin, It range_end) {
if (range_begin == range_end) {
return;
}
for (auto it = range_begin;... | ALGO | 0.9997 | 5.722355 | {
"github_metadata": {
"branch": "main",
"commit_count": 505,
"repo_created_at": "2022-08-10T11:17: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": "e508e066a3... |
5adc4220-f2ab-4c5a-93dd-e88f0058ae06 | OolongQian/Raft | src/raft/identities/candidate.cpp | #include <future>
#include "../../../include/raft/identities/candidate.h"
#include "../../../include/raft/raft_proto/raft_server.h"
// #define _NOLOG
namespace SJTU {
Candidate::~Candidate() {}
void Candidate::init() {
#ifndef _NOLOG
printf("init to be candidate...\n");
#endif
timer_.SetTimeOut(info.get_elect... | ALGO | 0.951491 | 4.115266 | {
"github_metadata": {
"branch": "master",
"commit_count": 95,
"repo_created_at": "2018-07-24T10:47:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1fee97305... |
66ee7a28-55ce-4d54-93b3-a1fd9bf07e4f | Suisuikitai/programming-practice | at-coder/gray/200/abc241_b.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i, x) for (int i = 0; i < x; i++)
int main(int argc, char const *argv[])
{
ios::sync_with_stdio(false);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<int> A(n, 0), B(m, 0);
vector<bool> used(n, false);
for (int &a : A)
cin >> a;
for (int &b : ... | ALGO | 0.999999 | 3.664828 | {
"github_metadata": {
"branch": "main",
"commit_count": 61,
"repo_created_at": "2022-04-04T10:41:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "91699b48ba2... |
361d02b3-116d-4619-94d8-16a742e50e40 | CodeAnk2829/DSA | Graphs/practice.cpp | #include <bits/stdc++.h>
using namespace std;
void printDFS(int** edges, int n, int sv, bool* visited) {
cout << sv << " ";
visited[sv] = true;
for(int i = 0; i < n; ++i) {
if(i == sv) {
continue;
}
if(edges[sv][i] == 1) {
if(visited[i]) {
con... | ALGO | 0.999954 | 5.013061 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2023-04-09T12:55:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9585298c8b7... |
637f7e3a-4274-4348-8346-78da6c1dcd54 | AshishKhatkar/ICPC-Practice | Ashish/Codeforces_DP_Track/363B.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define vi vector<int>
#define vl vector<ll>
#define pii pair<int,int>
#define pil pair<int, ll>
#define pll pair<ll, ll>
#define pli pair<ll, int>
#define pb(v, a) v.push_back(a)
#define mp(a, b) make_pair(a, b)
#define MOD ... | ALGO | 0.999997 | 3.976103 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2015-10-05T18:37:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d85826636... |
58fe0231-dbb6-4d56-9ed4-2c41d81b28d7 | trybushenko/c-cpp-solutions | C++/thirdWeek/SortedStrings.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
/*
developer: <NAME>
language: cpp
*/
using namespace std;
/*
task: Реализуйте класс, поддерживающий набор строк в отсортированном порядке.
Класс должен содержать два публичных метода:
class SortedStrings {
... | ALGO | 0.999208 | 6.018661 | {
"github_metadata": {
"branch": "master",
"commit_count": 86,
"repo_created_at": "2020-07-03T12:26: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": "383c96016... |
d6b98d9a-31c2-4d67-be77-77f3c5e37ecd | AswinBlue/acmicpc | 계단오르기/2579.cpp | //https://www.acmicpc.net/problem/2579
#include<iostream>
#define MAX_VAL 300
using namespace std;
int weight[MAX_VAL + 1];
//bool check[MAX_VAL + 1]; // no need
int sum[MAX_VAL + 1];//** important, max value for stairs
int main() {
int num;
cin >> num;
for (int i=1; i <= num; ++i) {
cin >> weight[i];
}
s... | ALGO | 0.999993 | 3.989952 | {
"github_metadata": {
"branch": "master",
"commit_count": 65,
"repo_created_at": "2019-12-03T09:12:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f26f691ae... |
0d138d34-efa1-4676-9775-d23a030b98b2 | ishandutta2007/codeforces-m | melnik/normal/715/A.cpp | #include <iostream>
#include <fstream>
#include <list>
#include <stack>
#include <deque>
#include <utility>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <vector>
#include <cmath>
#include <string>
#include <algorithm>
#include <iomanip>
#include <ctime>
#include <iterator>
#include <cstdio>... | ALGO | 0.999697 | 3.190713 | {
"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": "5ed4318b19e3... |
8458b290-45e8-419e-a223-e5c4cbaa6120 | drlongle/leetcode | algorithms/problem_0052/solution.cpp | /*
52. N-Queens II
Total Accepted: 44869 Total Submissions: 113129 Difficulty: Hard
Follow up for N-Queens problem. Now, instead outputting board configurations, return the total number of distinct solutions.
*/
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <c... | ALGO | 0.999986 | 5.432302 | {
"github_metadata": {
"branch": "master",
"commit_count": 1430,
"repo_created_at": "2017-02-08T14:00: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": "32bc2e6... |
4d2f4d96-1530-4304-8c5f-ce00aa3bf910 | overIsAC/contest | cf/1700/1795/e.cpp | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
using PII = pair<int, int>;
#define lson (k << 1)
#define rson (k << 1 | 1)
#if LEMON
#define db(x) cout << "function " << __FUNCTION__ << ", line " << __LINE__ << " : " << #x << " " << x << endl;
#else
#define db(x)
#endif
const int mod = 7 + 1e9;
/... | ALGO | 0.999975 | 5.068739 | {
"github_metadata": {
"branch": "main",
"commit_count": 131,
"repo_created_at": "2022-10-30T18:24: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": "372a178257... |
e1f6c524-4195-43fc-b5fa-7c79584f3593 | APS269/funPlusPlus | Graph.cpp | #include <bits/stdc++.h>
using namespace std;
void bfs(vector<vector<int>> v, int sv)
{
int n = v.size();
vector<bool> visited(n, false);
queue<int> q;
q.push(sv);
visited[sv] = true;
while (!q.empty())
{
int cv = q.front();
q.pop();
cout << cv << endl;
for (i... | ALGO | 0.999989 | 4.895071 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2023-08-03T19:48: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": "9b0d265f582... |
48632b71-2c17-4ded-bb21-0ef4cf005e48 | armandix23/C-Prog | 2DAM/10_programs_Chema/apollo_ul-ng.cpp | #include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <strings.h>
#define M 0x100
#define N 0x10
sig_atomic_t hijos = 0;
/*
// Nota marginal
const int i = 3; // La forma antigua
int const i = 3; ... | TOOL | 0.982886 | 4.357609 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2016-10-27T09:23:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f4b81d835... |
600c719c-eaa1-4455-8b1c-7ccdf12d38bf | KulakhmetovS/Lab10 | Tas2.cpp | #include <iostream>
#include <queue>
#include <cstdlib>
#include <ctime>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int** Creategraph(int **, int); //Создание графа
int** CreategraphO(int **, int); //Создание ориентированного графа
void BFSD(int **, int *, int, int); //Обход в ширину
void RadiusDia... | ALGO | 0.999521 | 4.441379 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-12-02T16:17: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": "2c424b7a36af... |
e4af9a26-9285-4568-998c-344be8dae3e8 | Andwerpz/Competitive-Programming-Practice | - cpp -/hamiltonianwall.cpp | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
//Codeforces - 1766C
//if you can paint the wall, then you can start the brush at the left edge, where col = 0 to paint it.
//assume that you can only paint a given wall if you start the brush at the center. If that is true, then
//there must be a... | ALGO | 0.999935 | 4.208904 | {
"github_metadata": {
"branch": "main",
"commit_count": 339,
"repo_created_at": "2021-02-26T19:38: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": "9a524815fa... |
7c51d075-755f-4afe-90f0-92b631ceba3b | thevkp/DSA | Stack_And_Queues/stack360.cpp | #include <iostream>
using namespace std;
class Stack{
private:
int top;
int capacity;
int* arr;
public:
Stack(int N){
this->capacity = N;
top = -1;
arr = new int[capacity];
}
// dealloacating the dynamically allocated memory
... | ALGO | 0.977828 | 4.697044 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-06-07T06:47:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "55a48b2264b0... |
747da1c8-6c1d-44f6-8f66-6da387332886 | samnemo/WClust | CDNAClust/cluster.cpp | #include "stdafx.h"
/* The C clustering library for cDNA microarray data.
* Copyright (C) 2002 <NAME>.
*
* This library was written at the Laboratory of DNA Information Analysis,
* Human Genome Center, Institute of Medical Science, University of Tokyo,
* 4-6-1 Shirokanedai, Minato-ku, Tokyo 108-8639, Japan.
* Con... | ALGO | 0.99999 | 5.066264 | {
"github_metadata": {
"branch": "master",
"commit_count": 45,
"repo_created_at": "2018-04-26T17:52:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ac7d7a88a... |
0773d94d-2297-400f-b8d1-c36134782eed | lanjoni/cpp-projects-bsi | sem1/week1/main4.cpp | #include <cstdlib>
#include <iostream>
#include <locale.h>
#include <cmath>
using namespace std;
int main(int argc, char** argv) {
setlocale(LC_ALL, "Portuguese");
char nome[50];
float base, potencia, raiz, lado, cubo, raio, resultado;
cout << " ================== Calcular operações matemáti... | ALGO | 0.968765 | 4.795321 | {
"github_metadata": {
"branch": "main",
"commit_count": 67,
"repo_created_at": "2022-04-20T17:56:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cf88dd7f4f8... |
1bc21aaa-1d1c-4087-9103-a0ebc7c9e416 | om3ga-solutions/daktilograf | native_client/ctcdecode/decoder_utils.cpp | #include "decoder_utils.h"
#include <algorithm>
#include <cmath>
#include <limits>
size_t get_utf8_str_len(const std::string &str) {
size_t str_len = 0;
for (char c : str) {
str_len += ((c & 0xc0) != 0x80);
}
return str_len;
}
std::vector<std::string> split_into_codepoints(const std::string &str) {
std... | TOOL | 0.987579 | 6.422464 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2021-03-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": "c5c67de4971... |
15fb1dc5-acc6-4fa5-96e6-6cde000485e4 | WebKit/WebKit-http | Source/ThirdParty/libwebrtc/Source/webrtc/rtc_tools/frame_analyzer/video_quality_analysis.cc | /*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... | TEST | 0.908637 | 7.485243 | {
"github_metadata": {
"branch": "master",
"commit_count": 231005,
"repo_created_at": "2011-01-11T13:50:19.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4992,
"forks": 1983,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "... |
4a1d2500-3d6b-4ab0-b589-b138668bac0a | SumitMARSS/All-Personal-Codes | compitive_programming/STL/deque.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
deque <int> d;
d.push_back(2);
d.push_back(3);
d.push_back(4);
d.push_front(5);
cout<<"Element in deque"<<endl;
for (auto &i : d)
{
cout<<i<<endl;
}
//pop operation
// d.pop_back();
// cout<<"After pop from ... | TOOL | 0.930185 | 4.640265 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-02-29T23:56:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b2ac2a1ae7c8... |
1b8ca0a5-8955-47f9-868f-625dbdd13b34 | langningchen/Coding | Etiger/187/unit01/SH-18701chenlangning/maiev/maiev.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 10005;
const int INF = 0x7FFFFFFF;
int n, SetCount;
set<int> PrimeList, OK, Sets[N];
bool IsPrime[N];
void Init()
{
IsPrime[0] = false;
IsPrime[1] = false;
for (int i = 2; i < N; i++)
if (IsPrime[i])
{
... | ALGO | 0.999968 | 4.025925 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2022-05-25T03:10:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e4288fc13a38... |
e6cc52a3-772e-47db-8866-78f63d7e8518 | AlibekovAA/monte-carlo-parallel-integration | MPI/helper.h | #pragma once
#ifndef HELPER_H
#define HELPER_H
#define _USE_MATH_DEFINES
#include <cmath>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <stdexcept>
namespace math {
const std::map<std::string, double> CONSTANTS = {
{"pi", M_PI},
{"e", M_E}
};
const std... | TOOL | 0.913911 | 6.663249 | {
"github_metadata": {
"branch": "main",
"commit_count": 30,
"repo_created_at": "2025-02-14T19:46:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "001a50dff52... |
06b8698b-0ea3-4729-ae81-559e9245ae24 | RooTinfinite/leetcode-solutions | solutions/1063-best-sightseeing-pair/best-sightseeing-pair.cpp | class Solution {
public:
int maxScoreSightseeingPair(vector<int>& values) {
int n = values.size();
// Initialize an array to store the maximum left scores up to each
// index.
vector<int> maxLeftScore(n);
// The left score at the first index is just the value of the first
... | ALGO | 0.999996 | 6.689318 | {
"github_metadata": {
"branch": "main",
"commit_count": 6094,
"repo_created_at": "2024-10-23T03:55:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "38b063423... |
744c70d5-3994-445a-be20-95cae92b3354 | hjyoon/baekjoon-answers | _15000/15788/15788.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <cstring>
#include <string>
#include <algorithm>
#include <tuple>
#include <set>
using namespace std;
int x, y;
long long map[501][501];
int n;
long long sum;
long long row_sum;
long long col_sum;
long long row_col_sum;
long long row_col_sum_2;
bool row_co... | ALGO | 0.999926 | 3.447463 | {
"github_metadata": {
"branch": "main",
"commit_count": 628,
"repo_created_at": "2021-01-21T06:28:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "56fe198071... |
62e67d6f-3082-46a5-8d91-1ffc7321b54f | old-yan/CP-template | TEST/local/EulerPath_udg_test.cpp | #include "GRAPH/EulerPath_udg.h"
#include "IO/FastIO.h"
int main() {
OY::EulerPathUDG::Graph G(5, 5);
G.add_edge(0, 1);
G.add_edge(2, 1);
G.add_edge(2, 4);
G.add_edge(4, 1);
G.add_edge(3, 1);
auto sol = G.calc(3);
if (sol.is_Euler_graph()) {
cout << "Graph is EulerGraph\n";
... | ALGO | 0.993334 | 5.265301 | {
"github_metadata": {
"branch": "main",
"commit_count": 390,
"repo_created_at": "2021-06-29T16:22:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 268,
"forks": 43,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c5e077d... |
288bfbd1-16f2-4e00-aea6-569d16269edf | mauriciopoppe/competitive-programming | UVa/10500/10502.counting-rectangles.cpp | #include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cctype>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<string>
#include<bitset>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<list>
#include<stack>
#include<sstream>
#include<utility>
#include<numeric>
#include<functi... | ALGO | 0.99955 | 3.830797 | {
"github_metadata": {
"branch": "master",
"commit_count": 67,
"repo_created_at": "2018-02-05T05:31:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "02dc421ee... |
19f475a7-5a5a-4683-b5e0-8dbf0cd8bdd9 | wysaid/android-gpuimage-plus | library/src/main/jni/custom/customFilter_N.cpp | //
// CustomFilter_N.h
// filterLib
//
// Created by wangyang on 16/8/2.
// Copyright © 2016年 wysaid. All rights reserved.
//
#include "customFilter_N.h"
using namespace CGE;
static CGEConstString s_fsh1 = CGE_SHADER_STRING_PRECISION_M(
varying vec2 textureCoordinate;
uniform sampler2D inputImageTexture;... | TOOL | 0.933946 | 5.212577 | {
"github_metadata": {
"branch": "master",
"commit_count": 533,
"repo_created_at": "2015-11-20T07:47:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1863,
"forks": 479,
"issues": 317,
"pull_requests": 5
},
"file_meta": {
"content_id": "d... |
f8709a58-1ca5-4af6-af43-ea4674a0c569 | arjo31/Personal-DSA-Problems | Graphs/Path Algorithms/city_with_the_smallest_no_of_neighbours_with_threshold_dist_k.cpp | #include <bits/stdc++.h>
using namespace std;
void floydWarshall(int n,vector<vector<int>>&edges,vector<vector<int>>&cost)
{
for (int i = 0; i < edges.size(); i++)
{
int u = edges[i][0];
int v = edges[i][1];
int w = edges[i][2];
cost[u][v] = w;
cost[v][u] = w;
}
for (int i = 0; i < n; i++)
{
cost[i][i... | ALGO | 0.999945 | 5.275575 | {
"github_metadata": {
"branch": "main",
"commit_count": 68,
"repo_created_at": "2024-05-18T15:56:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1ef893c0647... |
2f83c762-797c-40ae-9615-1cee4b57a849 | berjooj/POTA_algoritmos | N2/1_a/busca_sequencial_recursiva.cpp | #include <conio.h>
#include <stdio.h>
#include <stdlib.h>
// Define um tipo de lista com alocacao dinamica
typedef struct no {
int valor;
int chave;
struct no *proximo;
} NO;
// Define um tipo de lista com alocacao dinamica
typedef struct {
NO *inicio;
NO *fim;
} LISTA;
void inicializar(LISTA *lista);
void inc... | ALGO | 0.998911 | 3.82775 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2024-04-25T21:52: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": "b9637ada25... |
7d4289a5-72d1-4358-83a0-03efe3155e03 | stevenroach7/3DScanr | ThreeDScanner-iOS/Libraries/PCL/include/pcl-1.8/pcl/surface/3rdparty/poisson4/multi_grid_octree_data.hpp | /*
Copyright (c) 2006, <NAME> and <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of
conditions and the following ... | ALGO | 0.999367 | 5.183326 | {
"github_metadata": {
"branch": "master",
"commit_count": 172,
"repo_created_at": "2017-11-28T05:50:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 158,
"forks": 36,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "33f8e... |
4ec8a890-5402-456f-aa0f-1a252d26a165 | bomkvilt/sandbox | problems/interviews/yandex/2021-09-16 - II.cpp | 2 задача
Написать класс, который после первичной инициализации
сможет отдавать сумму элементов на заданном уровне
// ------------------------
struct Node {
int value;
Node* l;
Node* r;
};
class Handler
{
public:
void init(const Node* root)
{
if (!root)
{
return;
... | ALGO | 0.999258 | 5.244846 | {
"github_metadata": {
"branch": "main",
"commit_count": 148,
"repo_created_at": "2019-08-09T12:22:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 4
},
"file_meta": {
"content_id": "b03d12d9dd... |
fdb7b57b-d876-4a33-b47a-8da0f18327eb | captainys/public | src/ysgebl/src/kernelutil/ysshellext_roundutil.h | /* ////////////////////////////////////////////////////////////
File Name: ysshellext_roundutil.h
Copyright (c) 2017 <NAME>. All rights reserved.
http://www.ysflight.com
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1.... | TOOL | 0.968769 | 6.434833 | {
"github_metadata": {
"branch": "master",
"commit_count": 527,
"repo_created_at": "2018-12-18T22:09:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 35,
"forks": 10,
"issues": 7,
"pull_requests": 0
},
"file_meta": {
"content_id": "ce8490... |
8b7b2ab5-16f0-4bac-8179-df8c7e7dcc60 | RobinMaheshwary/5th-Sem | DAA lab/4th lab/q2.cpp | #include <bits/stdc++.h>
#include <cstdlib>
#include <time.h>
using namespace std;
void reverse(int a[], int n) {}
void merge(int arr[], int p, int q, int r)
{
int n1 = q - p + 1;
int n2 = r - q;
int L[n1], M[n2];
for (int i = 0; i < n1; i++)
L[i] = arr[p + i];
for (int j = 0; j < n2; j... | ALGO | 0.998595 | 4.319043 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2022-08-07T17:37:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "05b6388ff... |
a1fb26a9-2735-4356-a7e2-b4638aa3031b | ZWaldbusser/TerraVista | LinearRegression/LinearRegression.cpp | #include <iostream>
//************************************************************************************
//A starting file, aimed at solving the common House Price Machine Learning Problem.
//Goal: Create a modifiable Linear Regression Algorithm
//Problem: Given 2 input vectors (sqft and # bedrooms) and an output ... | ALGO | 0.989948 | 3.820436 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2024-02-12T18:48: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": "d2d5504855b... |
62f89862-f80c-4640-aa4b-973f4edc2859 | Yasg-uru/DSA-practice- | sliding window/medium/Maximum Sum of Distinct Subarrays With Length K.cpp | #include <vector>
#include <set>
#include <algorithm>
using namespace std;
class Solution {
public:
long long maximumSubarraySum(vector<int>& nums, int k) {
int i = 0, j = 0;
const int n = nums.size();
long long maxSubArraySum = 0, currWindowSum = 0;
set<int> s; // To store unique ... | ALGO | 0.99998 | 6.875485 | {
"github_metadata": {
"branch": "main",
"commit_count": 34,
"repo_created_at": "2025-03-18T17:40: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": "0106b1ae96e... |
62e60d83-c8ac-432f-8c3e-db7a03fc65f2 | chitwang/Space-Travel | main.cpp | #include <iostream>
#include <vector>
#include <math.h>
#include <ctime>
#include <chrono>
#include <sstream>
#include <algorithm>
#include <map>
using namespace std;
// Returns the current date as a string in the "dd-mm-yyyy" format
string getCurrentDate()
{
time_t tt;
time(&tt);
// Convert the time to ... | TOOL | 0.923064 | 3.457792 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-07-09T19:28: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": "85969e0e643f... |
c86af7fc-cb86-435c-94a8-ec8d2ed1a825 | Hadeer-Gamal4/Library-Management-System | LIBRARY MANAGMENT SYSTEM.cpp | #include <iostream>
#include<string>
using namespace std;
const int librarySize = 6; //the max size of places in library.
int numOfBooks=5; //the num of books in library.
//each book has some details (id,title,name of author,status if the book is avalible or not).
int ids[librarySize]={};
stri... | TOOL | 0.929259 | 4.039691 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-02-12T22:10: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": "98611bd87f7f... |
4885a6b5-7c1b-422d-9fc7-a538c6077a2a | AndresCox/hello-world | Final/Inversion de Numeros.cpp | #include <stdio.h>
#include <string.h>
#include <math.h>
void metodoPresentacion(float Num)
{
int residuo = 0;
printf("\nMetodo Presentacion: ");
while (Num != 0)
{
residuo = Num % 10;
printf("%d", residuo);
Num = Num / 10;
}
printf(" <--Presentacion inversa de la escritura");
}
void metodoPresentacion... | ALGO | 0.999372 | 3.184053 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2019-01-28T17:05: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": "67def4ff5b... |
3f690c32-def3-4280-9bea-4698e0c7338e | ishandutta2007/codeforces-a | ania/normal/568/A.cpp | #include<bits/stdc++.h>
using namespace std;
#define REP(i,a,b) for(int i = (a); i <= (b); ++i)
#define FORI(i,n) REP(i,1,n)
#define FOR(i,n) REP(i,0,int(n)-1)
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
#define vi vector<int>
#define ll long long
#define SZ(x) ((int)((x).size()))
#define IN(x... | ALGO | 0.99931 | 3.42509 | {
"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": "9922f7325c1d... |
75400ebd-b2f5-4456-93b9-e128c08081aa | yaovct/0010.RegularExpressionMatching | index.cpp | #include <iostream>
using namespace std;
class Solution {
public:
bool isMatch(string s, string p) {
if(p.size() == 0) return s.size() == 0;
if(p.size() == 1) return s.size() == 1 && (p[0] == s[0] || p[0] == '.');
if(p[1] != '*') {
if(s.size() == 0) return false;
return (p[0] == s[0] || p[0] == '.')... | ALGO | 0.991832 | 4.40589 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2020-03-26T02:37: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": "572e25e4c7... |
58dc79d2-736d-470e-821f-4c0dc1839c9b | khyun-kim/SW-expert-academy-study-storage | kmy/7728/solve.cpp | #include<iostream>
#include <string>
using namespace std;
int main(int argc, char** argv)
{
int test_case;
int T;
cin >> T;
string t;
for (test_case = 1; test_case <= T; ++test_case)
{
int N;
cin >> N;
string X;
int Value = 0;
bool flag[26];
getli... | ALGO | 0.999928 | 3.793279 | {
"github_metadata": {
"branch": "master",
"commit_count": 116,
"repo_created_at": "2019-03-25T08:02: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": "1bbf2538... |
29f696e8-1bab-485d-9a92-f93cee11fdb5 | enzogl25/Competitive-Programing | LeetCode/Find the Largest Almost Missing Integer.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
int largestInteger(vector<int>& nums, int k) {
int n = nums.size();
if(n == k){
int maxi = -1;
for(auto u : nums){
maxi = max(u, maxi);
}
... | ALGO | 0.999711 | 4.964094 | {
"github_metadata": {
"branch": "main",
"commit_count": 166,
"repo_created_at": "2025-02-13T22:39: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": "8fffd8c32b... |
46796ac6-94d1-4cc9-a2ef-ec79d347cb53 | daominhkhanh20/Algorithms | AlgorithmApplication/EXHSEARCH/CVRP/main.cpp | #include<bits/stdc++.h>
using namespace std;
#define N 1000
/*
n: number customer
K: number truck
q: maximum kg for each truck can carry
* */
int n,K,q;
int d[N];//save number package for each user
int x[N];//x[v] is the next point of v on the route
int y[N];//y[v] is the first client point of the route
int load[N];
b... | ALGO | 0.999828 | 3.329097 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2021-01-08T15:36:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6fa757d6c... |
fdfbbcae-4794-48a1-b06a-2efa3a785a86 | H-Shen/My_Code_Collection | ZJU_PAT/PAT_Basic_Level_Practice/1081.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const static string table = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.";
const int MINLENGTH = 6;
int main() {
unordered_set<char> tableSet(table.begin(), table.end());
int n;
cin >> n;
getchar();
string... | ALGO | 0.990753 | 3.657836 | {
"github_metadata": {
"branch": "master",
"commit_count": 1586,
"repo_created_at": "2019-04-11T06:48:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5e17e52... |
2671d18b-d548-4102-b6b2-f6b2d313f6f3 | vipinrao009/DSA_WITH_CPP | Backtracking & DnC/QuickSort.cpp | #include<iostream>
using namespace std;
void quickSort(int arr[], int low, int high)
{
// Base case
if(low>=high) return;
int pivot = high;
int i = low-1;
int j = low;
while(j<pivot)
{
if(arr[j]<arr[pivot])
{
... | ALGO | 0.999997 | 5.57414 | {
"github_metadata": {
"branch": "master",
"commit_count": 52,
"repo_created_at": "2023-09-12T05: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": "a4bbfc36f... |
9354e8df-8aab-4643-9585-225a3ec09914 | viennacl/viennacl-dev | viennacl/misc/cuthill_mckee.hpp | #ifndef VIENNACL_MISC_CUTHILL_MCKEE_HPP
#define VIENNACL_MISC_CUTHILL_MCKEE_HPP
/* =========================================================================
Copyright (c) 2010-2016, Institute for Microelectronics,
Institute for Analysis and Scientific Computing,
... | ALGO | 0.999937 | 5.476876 | {
"github_metadata": {
"branch": "master",
"commit_count": 1482,
"repo_created_at": "2013-02-22T14:47:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 288,
"forks": 89,
"issues": 85,
"pull_requests": 4
},
"file_meta": {
"content_id": "2a4... |
25d531e2-65d9-4d1c-83d0-50fdbb7cd2fa | raikrahul/scale_algo_examples | application_caching_example.cpp | #include <iostream>
#include <unordered_map>
#include <vector>
#include <deque>
#include <chrono>
#include <algorithm>
using namespace std;
class LiftWaitService {
private:
unordered_map<string, pair<chrono::system_clock::time_point, vector<int>>> cache;
deque<string> accessOrder;
const int CACHE_SIZE = 1... | ALGO | 0.998887 | 6.646029 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-07-01T10:06: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": "bbe365a79c91... |
f01485b2-c18c-4991-a9c8-9414c27fb951 | Pranav0786/COdeForEnjoy | 02binarysearch/q5bookallocation.cpp | #include<iostream>
#include<bits/stdc++.h>
using namespace std;
bool ispossible( vector<int>v , int size , int num , int mid)
{
int studentcount = 1 ;
int pagecount = 0 ;
for( int i=0 ; i<size ; i++ )
{
if( pagecount + v[i] <= mid )
pagecount+=v[i];
else
{
... | ALGO | 0.999965 | 4.193912 | {
"github_metadata": {
"branch": "main",
"commit_count": 54,
"repo_created_at": "2023-12-21T10:12: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": "6983a7682d6... |
aad5b3b8-9ff9-4e10-81ce-20901c53dabb | KulyginaJulia/QR-parallel-algorithm | Algorithm Householder/src/QRAlgorithmcpp.cpp | #include "../include/QRAlgorithm.h"
#include <iostream>
#include <cmath>
#include <ctime>
using namespace std;
using namespace QR;
QRAlgorithm::QRAlgorithm(int _n) {
n = _n;
A = new double[n * n];
Q = new double[n * n];
R = new double[n * n];
P = new double[n * n]; // matrix of the v vectors
}
void QRAlgorithm:... | ALGO | 0.999734 | 3.297373 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2018-10-21T12:49:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f948ecef7... |
7fa1f0d1-6f2f-4f71-865a-6543260b1097 | sjdy92/design_pattern | design-pattern/design-pattern/proxy-pattern.cpp | #include <iostream>
#include <unordered_set>
#include <unordered_map>
#include <string>
using namespace std;
class WebPage {
public:
WebPage(const int result, const string& ip, const string& html)
: _ip(ip)
, _result(result)
, _html(html) {}
int _result;
string _ip;
stri... | WEB | 0.909134 | 3.858379 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2023-06-01T04:42: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": "5bde6dac78f... |
7fe097ad-cb19-492b-937b-eacdd2f71d1d | ak840206/Data-Structures | BinarySearchTree.h | // Binary Search Tree ADT
// Created by <NAME>
// Modified by: <NAME>
#ifndef _BINARY_SEARCH_TREE
#define _BINARY_SEARCH_TREE
#include "BinaryTree.h"
//#include "Painting.h"
template<class T>
class BinarySearchTree : public BinaryTree<T>
{
private:
// internal insert node: insert newNode in nodePtr subtree
Bin... | ALGO | 0.999862 | 4.764478 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-01-21T03:31: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": "29f52ca5a5cb... |
32b4e9a9-d248-415d-b9d7-552b91c0ba9c | FuriTt/Lab3cpp | 2.cpp | #include <vector>
#include <fstream>
#include <functional>
#include <iostream>
#include <sstream>
#include <string>
#include "Eigen/Dense"
using namespace std;
using namespace Eigen;
vector<vector<float>> parse2DCsvFile(string inputFileName) {
vector<vector<float> > data;
ifstream inputFile(inputFileName);
... | DATA | 0.962294 | 4.912843 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-09-19T10:17: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": "158cdb0a53... |
0381d989-42ee-4991-888f-f02cc58b7cba | antonislambrou/GACP | varXover.cpp | #include <ga/ga.h>
#include <ga/GAStringGenome.h>
#include <ga/GA1DBinStrGenome.h>
#include <ga/GAAllele.h>
#include "global.h"
#include <stdio.h>
int VariableSizeCrossover(const GAGenome& p1, const GAGenome& p2, GAGenome* c1, GAGenome* c2)
{
// cout << "Crossover..." << endl;
// cout.flush();
GA1DBinaryStringGe... | ALGO | 0.996119 | 3.907254 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2016-04-30T17:18: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": "22bd4457c1... |
b665c0a9-6ade-4b5b-8141-7c81ec75cd9b | gerin98/Circuit-Solver | Main.cpp | #include <iostream>
#include <string>
#include <cstdlib>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cctype>
#include <cmath>
#include "Node.h"
#include "NodeList.h"
#include "Resistor.h"
#include "ResistorList.h"
#define MIN_ITERATION_CHANGE 0.0001
using namespace std;
/*
> NodeList s... | TOOL | 0.906264 | 4.345106 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2018-01-10T17:58: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": "244dac6e3... |
038a108f-eee6-490e-9b55-ac4dcf101042 | ManojKumar-18-24/DSA | BINARY TREES/BT-ATDT.cpp | #include<iostream>
#include<vector>
using namespace std;
class tree
{
public:
tree* lc;
int data;
tree* rc;
tree(int n)
{
lc=NULL;
data=n;
rc=NULL;
}
};
int tag=0;
void createbtree(tree* &t)
{
int ch;cin>>ch;
if(ch!=0)
{
t=new tree(ch);
... | ALGO | 0.999952 | 3.947009 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-12-25T14:39:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5b5baaf3966f... |
dbbdd829-0e1f-46a2-be55-75868b7c0f41 | lilagutelaunebaer/so_fancy | Drill/04_drill.cpp | // 04_drill.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung.
//
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
int main()
{
double i{};
double smallest{};
double largest{};
std::string unit{};
int m{ 100 };
double in{ 2.54 };
double ft{ 12 * in };
double cm{};
doubl... | TOOL | 0.965191 | 4.858159 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2017-03-26T23:37:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "863b3aa7c5... |
9f0b4dfa-ee2d-45b9-b89e-d7f60cc03da5 | doric2000/graph-assignment | algorithms.cpp | // <EMAIL>
#include "graph.hpp"
using namespace graph;
namespace graph{
// ============================
// BFS SECTION
// ============================
/**
* @brief Performs BFS traversal and builds a BFS tree.
*
* Traverses the given graph from a start vertex using Breadth-First Se... | ALGO | 0.999871 | 5.727655 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-04-01T16:45: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": "411ec5e6904a... |
22015c08-aa3b-4958-9362-a37999a9bcd3 | qkrdmstn/flip3d-turbulence-cuda | SurfaceTurbulence.h | #ifndef __SURFACETURBULENCE_H__
#define __SURFACETURBULENCE_H__
#include "CUDA_Custom/DeviceManager.h"
#include "CUDA_Custom/Dvector.h"
#include "CUDA_Custom/PrefixArray.h"
#include "thrust/sort.h"
#include <GL/freeglut.h>
#include "FLIP3D_Cuda.h"
using namespace std;
__host__ __device__
struct WaveParam
{
//Wave S... | ALGO | 0.950571 | 4.903901 | {
"github_metadata": {
"branch": "main",
"commit_count": 84,
"repo_created_at": "2024-04-02T12:12: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": "7cdde3bf444... |
722210b7-f19e-4ad7-aa7f-bcb7d5f5423b | Crashoverride996/tidyup | main.cpp | #include <vector>
#include <iostream>
#include <algorithm>
#include <filesystem>
#include <unordered_map>
enum class Options {
Help
};
void print_usage() {
std::cout << R"(
Usage: tidyup -d directory
This program groups and displays desktop items based on their type.
Options:
... | TOOL | 0.926291 | 6.913894 | {
"github_metadata": {
"branch": "development",
"commit_count": 2,
"repo_created_at": "2024-09-09T16:02: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": "2b799... |
80fa65bb-2e35-4cb0-babd-01ff3706281a | dysuby/Learn-ds | 刷题/soj/tree1001gjr.cpp | #include <iostream>
#include <string>
using namespace std;
string pre, in;
int count = 0;
void solution(int s1, int e1, int s2, int e2) {
if (s1 >= e1) return;
int i = s2;
while (i <= e2 - 1 && pre[s1 + 1] != in[i]) {
++i;
}
if (i == e2 - 1) ++count;
solution(s1 + 1, s1 + i - s2 + 1, s2, i);
solutio... | ALGO | 0.999896 | 3.879509 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2017-11-05T02:51: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": "183e6d519... |
e6992169-9701-40d5-a24c-55e12aeb849f | rajdeepdev98/CodingLibrary | Graph/Trees/Diameter.cpp | #include<bits/stdc++.h>
#define pb push_back
using namespace std;
const int MX=(int)(1e5)+5;
vector<int>graph[MX];
vector<int>diam;
int node=-1;
int mx=-1;
void dfs(int s,int par,int depth){
int temp=,x;
if(depth>mx){
mx=depth;
node=s;
}
for(auto el:graph[s]){
if(el!=par)... | ALGO | 0.999965 | 3.941539 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2020-11-01T12:24:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "59db2f81d... |
d6a64c5b-51d4-4c8a-b428-61ac5743f65c | sulivansimoes/Linguagem-C | C/URI/INICIANTE/REPETIÇÃO/Sequência de Números e Soma/Sequência de Números e Soma.cpp | /*
Leia um conjunto não determinado de pares de valores M e N (parar quando algum dos valores
for menor ou igual a zero). Para cada par lido, mostre a sequência do menor até o maior e a soma dos
inteiros consecutivos entre eles (incluindo o N e M).
Entrada
O arquivo de entrada contém um número não determinado de val... | ALGO | 0.999835 | 3.791168 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-06-23T18:09:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2962d736c9... |
d47bcf73-b8ab-4631-bcab-1d95b1288a34 | j0nrose/CSCI20-Fall2017 | Assign5/Assignment5.cpp | // <NAME>
// <NAME>
// CSCI 020
// 2/26/2018
/* This assignment is to create a program of our own choice. The program should have personal meaning for us.
The program should help us understand how programming can help in our field. */
#include <iostream> // include iostream
using namespace std; // name space... | ALGO | 0.999445 | 4.070306 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2017-08-21T19:01: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": "e6b5cc195... |
4f2340e6-e1a9-4f8f-8fc5-69554f99920f | rysh25/atcoder | abc332/d copy.cpp | #include <iostream>
#include <iomanip>
#include <sstream>
#include <list>
#include <utility>
#include <string>
#include <bitset>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <climits>
#include <cstring>
// #include <cstdlib>
#include <limits>
#include <algorithm>
#include <functional>
#include <vector>
... | ALGO | 0.999774 | 3.396544 | {
"github_metadata": {
"branch": "main",
"commit_count": 132,
"repo_created_at": "2022-08-14T16:25: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": "c7cba9d443... |
69b229eb-1c5c-4dfa-8cca-a3e94ba959bc | pichenettes/eurorack | plaits/dsp/oscillator/harmonic_oscillator.h | // Copyright 2016 <NAME>.
//
// Author: <NAME> (<EMAIL>)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, mo... | ALGO | 0.987229 | 6.253058 | {
"github_metadata": {
"branch": "master",
"commit_count": 191,
"repo_created_at": "2013-08-26T15:53:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2769,
"forks": 775,
"issues": 4,
"pull_requests": 3
},
"file_meta": {
"content_id": "317... |
14b9d261-a2ef-4c3b-9763-96e43df135f3 | mahdifullmath/cpp | test/main (2).cpp | #include <iostream>
using namespace std;
struct node3{
string name;
unsigned int id;
int avgmark;
node3 *next_name;
node3 *next_id;
node3 *next_avgmark;
};
struct noderas{
node3 *first_name;
node3 *first_id;
node3 *first_avgmark;
};
class list_stud {
private:
node3 *st=NULL;
... | TOOL | 0.991465 | 3.355863 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-07-28T22:09:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ecd641b8cf... |
e5272081-4d12-4f4a-839c-bde98bd11244 | pieperm/scheduler-showdown | scheduling_algorithms/shortest_process_next.h | #ifndef SHORTEST_PROCESS_NEXT_H
#define SHORTEST_PROCESS_NEXT_H
#include <vector>
#include "../scheduler.h"
using namespace std;
/**
* Scheduler that implements the Shortest Process Next (SPN) algorithm
* SPN is a non-preemptive scheduling algorithm
*/
class ShortestProcessNext: public Scheduler {
public:
... | ALGO | 0.999882 | 6.872151 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2020-11-26T03:34: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": "33e05a8298f... |
8f534d55-7198-428e-9099-7b395e95bd70 | sanyukta111/-6companies30days | Amazon/Rotten Oranges.cpp | //code runs in c++17 without warning
#include <bits/stdc++.h>
using namespace std;
int orangesRotting(vector<vector<int>> &grid)
{
int row = grid.size();
int col = grid[0].size();
queue<pair<int, int>> bfsQ;
bool possibility = false;
int count_unrot = 0;
for (int i = 0; i < row; ++i)
{
... | ALGO | 0.999978 | 5.432614 | {
"github_metadata": {
"branch": "main",
"commit_count": 89,
"repo_created_at": "2022-01-05T05:30:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "32c2838d1b5... |
daff896a-b09c-44ed-9b4c-acdba8de21f2 | amypixel/Pokemon-Sinner | data/maps/MeteorFalls_StevensCave/scripts.inc | # 1 "data/maps/MeteorFalls_StevensCave/scripts.pory"
# 2 "data/maps/MeteorFalls_StevensCave/scripts.pory"
.set LOCALID_STEVEN, 1
# 3 "data/maps/MeteorFalls_StevensCave/scripts.pory"
# 4 "data/maps/MeteorFalls_StevensCave/scripts.pory"
MeteorFalls_StevensCave_MapScripts::
# 5 "data/maps/MeteorFalls_StevensCave/scripts... | TOOL | 0.923862 | 3.694553 | {
"github_metadata": {
"branch": "master",
"commit_count": 15819,
"repo_created_at": "2024-08-13T09:58:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ac64b6... |
b6e7a825-2fdc-4382-b950-ed3cba6f8d32 | anandhp/LeetCode | LargestRectangleInHistogram.cpp | /**
* Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.
*
*
* For example consider histogram where width of each bar is 1, given height = [2,1,5,6,2,3].
*
*
* The largest rectangle is = 10 unit.
*
**/
... | ALGO | 0.999966 | 6.356435 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2014-05-13T13:13: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": "d887e756e... |
f8423435-f210-421f-8227-4bdfbadb6d52 | masashi99/compete | atcoder/arc169/A.cpp | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define repc(e, c) for (auto&& e : c)
#define all(a) (a).begin(), (a).end()
using namespace std;
typedef long long ll;
int main() {
ll N;
cin >> N;
vector<ll> A(N + 1), P(N + 1);
A[0] = -10000;
P[0] = -10000;
P[1] = -10000;
... | ALGO | 0.999991 | 3.498976 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-10-05T15:32:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8a15562974e8... |
61872168-1015-45ad-8071-83054c55e87c | rainbow-auto/rainbow-codes | Luogu/P1967.cpp | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <queue>
using i64 = long long;
#define fastread std::ios::sync_with_stdio(false); std::cin.tie(0);
const int maxn ... | ALGO | 0.999989 | 4.401257 | {
"github_metadata": {
"branch": "master",
"commit_count": 749,
"repo_created_at": "2024-09-07T02:10:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ca9f3594... |
f941e10f-f03d-4215-9a21-0065b8cfbf7a | cran/SpatialNP | src/spatialnp.cpp | #include <cmath>
//#include <R.h>
//#include <Rdefines.h>
//#include <Rinternals.h>
extern "C" {
using namespace std;
double **prepmat(double *X, int n, int k)
//be careful to free this memory!!!
{
int i;
int j;
double **Y = new double* [n];
for (i=0; i<n; i++) Y[i]=new double [k];
for (i=... | ALGO | 0.999943 | 3.966006 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2014-03-13T03:40:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4c7a846324... |
4155edb6-bd83-4468-b4a1-36a31ef7df78 | t104/atcoder-cpp | tenkei90/062.cpp | #include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define INF 1001001001
#define LINF (1LL<<60)
#define rep(i,n) for (int i = 0; i < (n); ++i)
template<typename T1,typename T2> inline bool chmin(T1 &a,T2 b){ return a > b && (a = b, true); }
template<typename T1,typename T2> i... | ALGO | 0.999988 | 4.079795 | {
"github_metadata": {
"branch": "master",
"commit_count": 657,
"repo_created_at": "2021-07-24T09:44: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": "e5f8ba75... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.