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 |
|---|---|---|---|---|---|---|---|
95cc9a85-a6ab-49b3-b7c6-a78e62c16e63 | kghees/Coding-Test | 백준/Silver/9934. 완전 이진 트리/완전 이진 트리.cc | #include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
using namespace std;
//Inorder순서로 들어옴
// 1 6 4 3 5 2 7 -> /2하면 3이 루트
//1 6 4 범위 5 2 7 범위에서 각각 /2하면 6 2
// 1 4 범위 5 7 범위 각각 /2 하면 1 4 5 7 순으로 들어와짐
int k;
int tree[1025];
vector<int> res[14];
void go(int x, int e, int lev) {
if (x > e) retu... | ALGO | 0.999962 | 4.605424 | {
"github_metadata": {
"branch": "main",
"commit_count": 993,
"repo_created_at": "2023-06-27T02:16:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "fd5ca4d414... |
09c03135-5b02-4cd2-b1b0-61302001f2dd | jmontel333/SchoolProjects | Programming 1/Lab10/10.1.cpp | #include <iostream>
#include <random>
#include <time.h>
using namespace std;
int main(void)
{
srand(time(NULL));
const int LIST_SIZE = 10;
int size[LIST_SIZE];
for (int i = 0; i < LIST_SIZE; i++)
{
size[i] = rand() % 8999 + 1000;
}
cout << endl << "the random integers: ";
for (int i = 0; i < LIST_SIZE; i++)
... | ALGO | 0.962872 | 3.670118 | {
"github_metadata": {
"branch": "main",
"commit_count": 104,
"repo_created_at": "2020-12-23T04:39: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": "ea07839e76... |
2b31e630-8f5d-470c-b1da-2b9bc9d3e2e4 | josemiguel/icpc-training | uva-judge/uva558.cpp | #include <algorithm>
#include <iostream>
#include <iterator>
#include <sstream>
#include <fstream>
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cstdio>
#include <vector>
#include <cmath>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include... | ALGO | 0.999945 | 4.095841 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2013-11-04T00:48:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6e07dd407... |
bfc05564-3adb-461a-bf52-866c22b0a72c | aaabriceno/AED | Semana_2/double_linked_list.cpp | /*
Hacer una lista doble enlace que tenga funciones
push_back - push_front; pop_back - pop_front y sobrecarga de corchetes
*/
#include <iostream>
using namespace std;
struct node {
int valor;
node* next;
node* prev;
node(int value) : valor(value), next(nullptr), prev(nullptr) {}
};
struct Clist {
node* head = n... | TOOL | 0.966791 | 4.853482 | {
"github_metadata": {
"branch": "main",
"commit_count": 166,
"repo_created_at": "2024-01-30T20:30: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": "b6371eac72... |
9faa1371-505d-4caa-9bca-0a545aff2427 | koyc-code/C-Exercises | hw12--template/13.1-Template_Binary_Search/Template.h | #pragma once
#include <iostream>
using namespace std;
template <typename T>
void ItrBinarySearch(const T a[], int first, int last, T key, bool &found, int &location) {
found = false;//?
while (first <= last) {//?
int middle = (first + last) / 2;
if (a[middle] == key) {
found = true;
location = middle;
re... | ALGO | 0.999969 | 4.897148 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2025-05-05T04:02:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "179b356dc0d... |
5eae4465-bc6b-4497-9436-2ca1e95dc3ef | MilkClouds/Competitive-Programming | BOJ/milkclouds/14870/14870.cpp14.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long lld;
int N;
int A[1501][1501], D[1501][1501];
int bit[1501][1502];
int S[1501], E[1501];
void add(int n, int v, int bit[1502])
{ for (;n<=N;n+=n&(-n)) bit[n] += v; }
int get(int n, int bit[1502])
{ int ret = 0; for (;n;n^=n&(-n)) ret += ... | ALGO | 0.999504 | 3.864069 | {
"github_metadata": {
"branch": "main",
"commit_count": 3514,
"repo_created_at": "2021-02-23T16:44:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "96cb77012... |
3e763ac3-ef0c-40cb-bb1d-2f566c998f2d | orion1610/CA | 8thExp.cpp | #include <bits/stdc++.h>
using namespace std;
ifstream custom_input;
double custom_min_support;
vector<set<string>> custom_data;
set<string> custom_items;
map<string, int> custom_item_count;
double custom_min_confidence;
vector<string> customSplitString(string str) {
vector<string> words;
string temp = "";
... | ALGO | 0.989098 | 5.622967 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2023-12-10T14:35: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": "62a2bfb2489... |
156ac442-9d4d-4146-a947-10ca493c0b53 | richardwei6/Competitive-Programming | VISUAL STUDIO/CodeForces/CodeForces/CaptainFlintAndCrewRecruitment.cpp | /*
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <functional>
#include <cmath>
#include <limits>
#include <list>
#include <memory>
#include <stack>
#include <iterator>
#include <queue>
#include <nume... | ALGO | 0.999146 | 3.205618 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2020-04-19T04:27:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3a1151607... |
6401a483-8bbb-4c25-bddd-c083c6a6b13f | vive6271/Problems-Solved | Introduction to C++/3.Conditionals and Loops/SumEvenOdd.cpp | /*
Q. Sum of even & odd
Write a program to input an integer N and print the sum of all its even digits and sum of all its odd digits separately.
Digits mean numbers, not the places! That is, if the given integer is "13245", even digits are 2 & 4 and odd digits are 1, 3 & 5.
Sample Input 1:
1234
Sample Output 1:
6 4
... | ALGO | 0.999697 | 5.07441 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-01-27T16:58:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "85572c7941fe... |
b660c21d-eab5-46c0-95db-058707b80494 | richardcypher/leetcode | 73/main.cpp | #include <iostream>
#include <vector>
using namespace std;
void setZeroes(vector<vector<int> >& matrix) {
bool fillrow1 = false, fillcol1 = false;
for (int i = 0; i < matrix.size(); ++i)
{
for (int j = 0; j < matrix[i].size(); ++j)
{
if(matrix[i][j] == 0) {
if(i... | ALGO | 0.999352 | 5.568473 | {
"github_metadata": {
"branch": "master",
"commit_count": 203,
"repo_created_at": "2015-04-26T04:55:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6e35dcc4... |
9971381a-d81c-4d3b-a692-47a66b62d4ee | Ragab2010/problem_solving_vscode | reverse_digit_number.cpp | #include<iostream>
#include<cstring>
#include<algorithm>
#include <bitset>
using namespace std;
int32_t reverse_digit_number_c(int32_t number){
uint32_t result = 0;
while(number != 0){
result =(result* 10) +(number % 10);
number =number/10;
}
return result;
}
int32_t reverse_digit_n... | ALGO | 0.999698 | 3.662032 | {
"github_metadata": {
"branch": "master",
"commit_count": 168,
"repo_created_at": "2023-04-09T04:28: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": "d8509561... |
e7950dbc-a769-48c2-8e41-1235dda3e333 | super3/RandomProjects | Projects2010/Grades2/Grades2/grades2.cpp | // Debugging: grades.cpp
#include <iostream>
#include <iomanip>
#include <ctime>
using namespace std;
const int NUM_GRADES = 10;
const int NUM_SUDENTS = 3;
int findHighest( int [] );
int findLowest( int [] );
void printDatabase( const int [][ NUM_GRADES ], const char [][ 20 ] );
int main()
{
int student1[ NUM_GR... | TOOL | 0.923444 | 4.738099 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2012-12-15T22:27:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e1471814d8... |
796bbe0a-b0b6-418f-bb89-2cf0d622b9fb | byte616/tree-prac | Distinct_Colors.cpp | #include <iostream>
#include <vector>
#include <map>
using namespace std;
int n, a, b, arr[200005], idx;
int in[200005], out[200005], tree[200005], ans[200005], Index[200005];
pair<int,int> q[200005];
vector<int> v[200005];
map<int,int> mp; // color : last idx
void dfs(int x, int pre){
in[x] = ++idx;
Index[idx... | ALGO | 0.999987 | 4.188682 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2023-09-22T07:15: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": "109578be3... |
4f6838f9-6abd-46f8-8ecc-e252810fcdfb | arangodb/arangodb | 3rdParty/boost/1.78.0/libs/numeric/ublas/doc/samples/matrix_matrix_solve.cpp | //
// Copyright (c) 2000-2002
// <NAME>, <NAME>
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// The authors gratefully acknowledge the support of
// GeNeSys mbH & Co. KG in producing this work.
//... | ALGO | 0.999775 | 3.955475 | {
"github_metadata": {
"branch": "devel",
"commit_count": 51986,
"repo_created_at": "2011-10-26T06:42:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 13878,
"forks": 857,
"issues": 743,
"pull_requests": 38
},
"file_meta": {
"content_id": ... |
d120dfed-daa8-4b05-87f1-a6489a65199f | fraser-campbell/CS106B | Programming_3/Cell phone mind/ReverseStr.cpp | /*
* File: ReverseStr.cpp
* --------------------------
* Name: <NAME>
* Section: Reverses a string using both iteractive and recursive strategies
*
*/
#include <iostream>
#include <string>
using namespace std;
// Consider recursing on the subsets of strings
string ImplReverseStrRecur(string reverse, string no... | ALGO | 0.999475 | 6.010252 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2014-06-25T10:12:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "65703e178... |
5fb53fd7-84fe-43ae-aec4-e47bc90e859d | riteme/test | oi/Contest/CEOI/2017/sure-bet.cpp | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
#define NMAX 100000
static int n;
static double a[NMAX + 10], b[NMAX + 10];
bool cmp(double x, double y) {
return x > y;
}
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
scanf("%lf%lf", a + i, b + i);... | ALGO | 0.999871 | 3.448886 | {
"github_metadata": {
"branch": "master",
"commit_count": 550,
"repo_created_at": "2015-04-26T07:16:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "a2e6f2a2... |
b305cac3-b118-40a9-905d-d991fe420537 | chlau6/cpoj | cpp/leetcode/q315-count-of-smaller-numbers-after-self.cpp | #include<bits/stdc++.h>
using namespace std;
class Solution {
public:
vector<int> countSmaller(vector<int>& nums) {
int n = nums.size();
vector<int> result(n);
vector<int> index(n);
for (int i = 0; i < n; i++) {
index[i] = i;
}
mergesort(result, index,... | ALGO | 0.999982 | 6.074135 | {
"github_metadata": {
"branch": "main",
"commit_count": 84,
"repo_created_at": "2021-10-18T07:20: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": "16b19ed2b03... |
1dd9e60e-303d-4912-9a7c-3237e42804db | chinoxyz/Spoj | KOPC12B.cpp | #include <cstdio>
#include <algorithm>
#include<iostream>
#include<vector>
#include<climits>
#include <complex>
#include <iostream>
#include <valarray>
#include<cstring>
#include<queue>
#include<bitset>
#include<map>
#include<set>
#include<sstream>
#include<ctime>
#include <stack>
#include <iomanip>
#include <cassert>
... | ALGO | 0.999937 | 3.839292 | {
"github_metadata": {
"branch": "master",
"commit_count": 65,
"repo_created_at": "2015-02-07T15:39:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d6712f594... |
5d32dd66-81f5-4c18-a051-d1b329afc483 | ishandutta2007/codeforces-d | djqtxdy/normal/641/B.cpp | #include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cs... | ALGO | 0.99976 | 3.661802 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:31:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6e652c10f4a9... |
a5e007a7-31e1-4496-955d-5e5df566ea15 | AhmedMaghawry/Compiler | classes/ModifiedDFA.cpp | //
// Created by default on 16/04/18.
//
#include <map>
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <set>
#include "../headers/ModifiedDFA.h"
const string e ="\\L";
Node getNode(string name);
vector<string> sy;
map<string, vector<Node>> e_clous;
map<string, Node> nodesMap;
map<string, pair<in... | ALGO | 0.999771 | 3.9687 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2018-03-18T13:30:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f72bef217... |
84176012-805e-4fed-a4fe-0eebadd530ee | TheComet/iceweasel | software/urho3d/game/iceweasel/include/iceweasel/Math.h | #pragma once
#include <Urho3D/Math/Vector3.h>
#include <Urho3D/Math/Matrix3.h>
class Math
{
public:
/*!
* @brief Wraps the specified angle so it is within the interval [-180 180]
*/
static float Wrap180(float angle);
/*!
* @brief Projects a point onto the plane defined by a non-degenerate... | ALGO | 0.93655 | 7.40171 | {
"github_metadata": {
"branch": "master",
"commit_count": 255,
"repo_created_at": "2016-06-27T18:20:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 16,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d1c7d49... |
b634b756-fd95-4175-9a13-0255c41a72a6 | zchee/cuda-sample | 4_Finance/binomialOptions_nvrtc/binomialOptions_gpu.cpp | /*
* Copyright 1993-2015 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use, reproduction, disclosure, or distribution of
* this software and related... | ALGO | 0.998118 | 6.597103 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2015-10-06T22:31:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 371,
"forks": 179,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "13098a... |
f848fc82-11bc-4575-95b4-71eb5f11adcc | NASA-rdt/ros_cyton_gamma | src/ros_cyton_pkg/include/control/ecJointSolutionConvergenceTool.h | #ifndef ecJointSolutionConvergenceTool_H_
#define ecJointSolutionConvergenceTool_H_
//------------------------------------------------------------------------------
// Copyright (c) 2001-2013 Energid Technologies. All rights reserved.
//
/// @file ecJointSolutionConvergenceTool.h
/// @class EcJointSolutionConvergenceTo... | ALGO | 0.927357 | 5.847497 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2014-07-02T14:56:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "529b26c4f5... |
243eb92a-3dd3-4517-ac0a-5dabac96fdcd | work-mohit/Placement-Practice | LeetCode Contest/Weekly Contest 277/2148 Count Elements With Strictly Smaller and Greater Elements.cpp | // 2148 Count Elements With Strictly Smaller and Greater Elements
class Solution {
public:
int countElements(vector<int>& nums) {
if(nums.size()< 2)
return 0;
int n = nums.size();
int cnt = 0;
sort(nums.begin(), nums.end());
int mi = nums[0];
int mx = n... | ALGO | 0.999975 | 5.500185 | {
"github_metadata": {
"branch": "main",
"commit_count": 210,
"repo_created_at": "2022-01-13T10:07: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": "1aea0deb8d... |
efa4283c-3864-4abe-b7b8-8a5359a9cb6d | iamshm/myCppPractice | AccBootCamp/SortNamesbyRomanNos.cpp | #include <bits/stdc++.h>
using namespace std;
string ltrim(const string &);
string rtrim(const string &);
/*
* Complete the 'sortRoman' function below.
*
* The function is expected to return a STRING_ARRAY.
* The function accepts STRING_ARRAY names as parameter.
*/
// storing values of roman nos
int conDecim... | ALGO | 0.999982 | 5.558763 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2021-02-03T18:57: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": "404f92dbceb... |
3b61e9ad-f335-4286-a84e-b5c968aad6fa | ishandutta2007/codeforces-a | amshz/normal/1500/B.cpp | //khodaya khodet komak kon
# include <bits/stdc++.h>
# pragma GCC optimize("O2")
# pragma GCC optimize("Ofast")
# pragma GCC optimize("unroll-loops")
# pragma GCC target("avx,avx2,sse,sse2,fma")
/*
// ordered_set
# include <ext/pb_ds/assoc_container.hpp>
# include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pb... | ALGO | 0.999984 | 3.93381 | {
"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": "38c716b8825c... |
a2821b2c-21af-4de6-876d-2afa9ceab797 | EfraGR/Algos | CHT.cpp | using namespace std;
#include <bits/stdc++.h>
#define all(v) v.begin(), v.end()
#define ff first
#define ss second
#define pb push_back
#define forx(i,n) for(int i=0; i<(int)n; ++i)
#define printF(x) for(auto &w : x) {cout << w << " ";} cout << endl;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;... | ALGO | 0.99979 | 4.218095 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-07-04T02:15: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": "5773e885a91b... |
c3037251-34a5-4294-aaf0-efb7eafdea6d | eldeshue/PS | BOJ/unclassified/1939.cc | //kruskal algorithm
#include <iostream>
#include <algorithm>
#include <memory.h>
#include <tuple>
#include <vector>
typedef std::tuple<int, int, int> edge;
int N, M, ans, start, end;
int parent[10001]; // union by rank에 의해서 root가 아닌 노드는 랭크값을 가짐
edge edges[100001];
int find(int target_index);
void Union(int node1, ... | ALGO | 0.999933 | 3.911284 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2025-02-15T12:59: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": "8764545c2... |
c7f9efa9-c6ad-409c-bb2e-6d0cdd8d89d6 | SAKTHISPARROW/Placement-Preparation | DSA/Stack/stack.cpp | #include <iostream>
using namespace std;
/*#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
#define size 10
int stack[size], top;
void push(int[], int);
void pop(int[]);
void peek(int[]);
void display(int[]);
struct Stack
{
int top;
int maxsize;
int *arr;
};
struct Stack *create(int num)
{
str... | ALGO | 0.998657 | 4.259533 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2023-10-01T14:58:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4392762864f... |
da47e651-b5cb-49ae-99ca-c9352307a347 | greiman/ChibiOS-Arduino | libraries/ChibiOS_ARM/examples/chSemaphore/chSemaphore.ino | // Example of counting semaphore
#include <ChibiOS_ARM.h>
// declare and initialize a semaphore for limiting access
SEMAPHORE_DECL(twoSlots, 2);
// data structures and stack for thread 2
static THD_WORKING_AREA(waTh2, 100);
// data structures and stack for thread 3
static THD_WORKING_AREA(waTh3, 100);
//------------... | ALGO | 0.989002 | 5.859261 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2014-08-11T17:15:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 111,
"forks": 33,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "21c181a... |
13f38973-1ba8-4741-a894-bcd8ea078db4 | Shikhar-S/Analysis-of-Competitive-Codebase | Data/Contest1236/Standings1/29090253_62786772.cpp | // warm heart, wagging tail,and a smile just for you!
// ███████████
// ███╬╬╬╬╬╬╬╬╬╬███
// ███╬╬╬╬╬████╬╬╬╬╬╬███
// ... | ALGO | 0.999956 | 4.81268 | {
"github_metadata": {
"branch": "master",
"commit_count": 74,
"repo_created_at": "2019-11-22T14:40: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": "e994f5bef... |
f6ebe594-36f1-4e04-aa02-3b1af0128c41 | dreyus95/AVSP_SourceQualityPrediction | CodeJamCrawler/dataset/10_15984_23.cpp | package codejam2010.round1A;
import java.io.BufferedReader;
import java.io.Closeable;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
public class ProblemA {
public enum Slot {
EMPTY, RED, BLUE
}
private static final int MATCH_R... | ALGO | 0.998065 | 3.420162 | {
"github_metadata": {
"branch": "master",
"commit_count": 70,
"repo_created_at": "2017-06-08T21:00: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": "017be00b5... |
0510478f-38e6-4751-b542-fe24d235ac65 | Tayeb-Ahmed-TAS/DSA-with-CPP | 01 - Arrays/05-print_subarrays.cpp | #include <iostream>
using namespace std;
void printSubarrays(int arr[], int n) {
for (int i = 0; i < n; i++) {
for (int j = i; j < n; j++) {
cout << "( ";
for (int k = i; k <= j; k++) {
cout << arr[k] << " ";
// (k == j) ? cout << arr[k] : cout << arr[k] << ", ";
// For Usin... | ALGO | 0.917114 | 4.966121 | {
"github_metadata": {
"branch": "main",
"commit_count": 156,
"repo_created_at": "2024-06-22T06:35:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1181511a10... |
6ae4e300-c06b-49d0-bb1a-f8878d4f5764 | Gfans/ISPH_NVIDIA_CUDA_CONTEST | IncompressibleFluidsPcisphCUDA/src/ISPH_NVIDIA_CUDA_CONTEST/include/cuda5.5_include/include/thrust/system/cuda/detail/temporary_indirect_permutation.h | /*
* Copyright 2008-2012 NVIDIA Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | ALGO | 0.939801 | 7.649832 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2014-08-03T09:23:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 62,
"forks": 14,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "9600255... |
1fdcaddb-8ad1-4f63-9418-9bb2e3f27bee | green-fox-academy/VeghFruzsi | week 1-2/day02/06_codinghours/main.cpp |
#include <iostream>
int main(int argc, char* args[]) {
// An average Green Fox attendee codes 6 hours daily
// The semester is 17 weeks long
//
// Print how many hours is spent with coding in a semester by an attendee,
// if the attendee only codes on workdays.
int week = 17;
int workingD... | TOOL | 0.923616 | 3.010439 | {
"github_metadata": {
"branch": "master",
"commit_count": 103,
"repo_created_at": "2018-10-18T18:57:26.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "93a80656f... |
d3a893b8-8b06-4173-a2a8-d6950fc648ec | gKaicon/Desenvolvimento_C_Cpp | AEDs2 2023.1/TP_Ordenação/Implementação/main.cpp | #include "funcoes.cpp"
int main(){
UINT CPAGE_UTF8 = 65001;
UINT CPAGE_DEFAULT = GetConsoleOutputCP();
SetConsoleOutputCP(CPAGE_UTF8);
HANDLE colors = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(colors, 2);
int op;
do{
menuStringInt();
cin >> op;
if (op... | TOOL | 0.908694 | 4.003027 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2024-02-22T15:13: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": "415c541665... |
530255df-9e02-47b2-a04b-f265af4baedf | sth-v/cmmcore | cmmcore/polygon.h | //
// Created by <NAME> on 08.10.24.
//
#ifndef POLYGON_H
#define POLYGON_H
#include <vector>
#include <cmath>
#include <limits>
#include <algorithm>
#include <unordered_set>
#ifdef CYTHON_ABI
#include "vec.h"
#else
#include "cmmcore/vec.h"
#endif
namespace cmmcore{
using polygon2=std::vector<vec2>;
struct No... | ALGO | 0.987096 | 6.791759 | {
"github_metadata": {
"branch": "master",
"commit_count": 78,
"repo_created_at": "2024-10-10T01:33:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "120678538... |
b23da0c3-2190-4b1d-838d-dd124dccca22 | trilinos/Trilinos | packages/rol/example/complex/RayleighQuotient.hpp | #pragma once
#ifndef RAYLEIGHQUOTIENT_HPP
#define RAYLEIGHQUOTIENT_HPP
#include "ROL_ComplexStdVector.hpp"
#include "HermitianMatrix.hpp"
#include "ROL_Objective.hpp"
/** \class RayleighQuotient
\brief Objective function for the Rayleigh quotient of a
Hermitian Matrix
The Rayleigh quotient is... | ALGO | 0.999223 | 5.497356 | {
"github_metadata": {
"branch": "master",
"commit_count": 104031,
"repo_created_at": "2015-11-16T19:39:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1299,
"forks": 593,
"issues": 263,
"pull_requests": 61
},
"file_meta": {
"content_id":... |
c4db9d0f-be45-4e97-9e3a-37908ba257a5 | RosettaCommons/rosetta | source/src/numeric/fourier/FFT.hh | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... | ALGO | 0.97629 | 6.179374 | {
"github_metadata": {
"branch": "main",
"commit_count": 11737,
"repo_created_at": "2023-11-17T16:42:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 296,
"forks": 100,
"issues": 27,
"pull_requests": 9
},
"file_meta": {
"content_id": "e586... |
fdbcca15-b7b6-4fd7-9903-5d8bc6913938 | viren-sureja/Love-Babbar-450 | 04_searching_and_sorting/24_aggressive_cows.cpp | /*
link: https://www.spoj.com/problems/AGGRCOW/
video: https://youtu.be/Zwp6M5sl36Q
*/
// ----------------------------------------------------------------------------------------------------------------------- //
#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
typedef long long ll;
bool che... | ALGO | 0.999918 | 5.000915 | {
"github_metadata": {
"branch": "master",
"commit_count": 49,
"repo_created_at": "2021-03-21T14:17:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 356,
"forks": 169,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "bab82... |
538d7022-a7aa-41c8-9e7f-ab6425e78967 | dyollb/VegaFEM | libraries/sparseSolver/LagrangeMultiplierSolver.cpp | /*************************************************************************
* *
* Vega FEM Simulation Library Version 4.0 *
* *
* "sparseSolver" li... | ALGO | 0.999564 | 5.492205 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2022-01-20T15:41:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 3,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "51ba5d41414... |
ec0c1bd7-a712-4bff-a58c-0f934c2869e1 | sreevidya-16/LeetCode | 0079-word-search/0079-word-search.cpp | class Solution {
public:
// unordered_set<string> path;
bool dfs(vector<vector<char>>& board, string word, int r, int c, int i){
int rows=board.size();
int cols=board[0].size();
int n=word.size();
if(i==n) return true;
if(
r<0 || c<0 ||
... | ALGO | 0.999723 | 6.276215 | {
"github_metadata": {
"branch": "main",
"commit_count": 404,
"repo_created_at": "2024-01-16T13:47: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": "d32351d1e1... |
1061c497-876c-4eff-899e-27e1fb8e7bbf | freeyy/Coding-Style-Practice | week2/five.cpp | #include <vector>
#include <string>
#include <fstream>
#include <sstream>
#include <iostream>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <algorithm>
using namespace std;
string raw; // raw data read from input
list<string> words; // words scanned
... | ALGO | 0.999003 | 4.753005 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2020-11-16T00:03: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": "81557bc118... |
1732485e-3d61-4fd2-afec-3385c814d656 | mbfilho/icpc | Questoes UVA ACM/5882 - Racing Car Trail.cpp | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <queue>
#include <vector>
using namespace std;
#define N 40000
#define M 100000
#define pb push_back
#define mp make_pair
char ma[110][110];
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, -1, 0, 1};
int n, m;
int comp[N];
int dist[N];
int atual[N];
int last... | ALGO | 0.999597 | 3.774053 | {
"github_metadata": {
"branch": "master",
"commit_count": 835,
"repo_created_at": "2016-02-27T01:54: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": "8a33c7ab... |
e35769ba-f7f5-4576-907f-25d627f21cdb | Restream/reindexer | cpp_src/core/index/keyentry.h | #pragma once
#include <vector>
#include "core/idset.h"
#include "sort/pdqsort.hpp"
#include "tools/errors.h"
namespace reindexer {
class UpdateSortedContext {
public:
virtual ~UpdateSortedContext() = default;
virtual int getSortedIdxCount() const noexcept = 0;
virtual SortType getCurSortId() const noexcept = 0;
... | TOOL | 0.976448 | 6.832869 | {
"github_metadata": {
"branch": "master",
"commit_count": 228,
"repo_created_at": "2017-07-07T14:14:38.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 788,
"forks": 61,
"issues": 19,
"pull_requests": 0
},
"file_meta": {
"content_id": "4f635... |
d7c2e68d-02fd-44a4-ac21-092db417e521 | Lidskjalv/Digital-media | digital_media/Software/pathplanning/src/coordTrans.cpp | #include "../include/pathplanning/coordTrans.h"
coordTrans::coordTrans()
{
}
coordTrans::coordTrans(vector<int> afrobitOffset, const double atheta)
{
frobitOffset = afrobitOffset;
theta = atheta;
rotationMatrix = { { atheta, atheta, 0 },{ atheta, atheta, 0 },{0, 0, 1} /* {(double)frobitOffset[0], (doubl... | ALGO | 0.987093 | 3.22483 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-05-22T07:08:55.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1989e010fae... |
520407a5-7f69-414a-ad84-64b5aff9a6dc | LandOS973/POO-C- | Templates/vector/vectors/main.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class test{
public:
test(int a);
int x;
};
test::test(int a):x(a){}
int main()
{
std::vector<int> V;
for(std::vector<int>::size_type i(0); i<V.size(); ++i){
}
// ERASE
for (std::vector<int>::iterator it = V... | ALGO | 0.989366 | 4.010132 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2022-12-03T08:19: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": "436a5db7d4ba... |
f3913bfb-8e5a-4db5-a40a-b23eb4278155 | SullyTKdU27/Data-Structures-And-Algorithms-Visualiser | DataStructuresandAlgorithmsVisualizer.cpp | import React, { useState, useEffect, useRef } from 'react';
// Main App Component
export default function AlgorithmVisualizer() {
const [array, setArray] = useState([]);
const [sortingAlgorithm, setSortingAlgorithm] = useState('bubbleSort');
const [isSorting, setIsSorting] = useState(false);
const [speed, setS... | ALGO | 0.99963 | 7.136001 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-04-18T16:52: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": "99c12d75fc45... |
10be8d57-b3ba-43ae-aecc-ec08ad8ed0dc | yaegareren/studious-octo-waffle | cpp codes/pattern printing codes/14_full_triangle_pyramid_pattern.cpp | /*
*
* *
* * * -----> pyramid pattern
* * * *
* * * * *
We have 5 rows and at every row number of stars is incrementing and between each symbol there's a
space which is ultimately making this pattern a full triangle otherwise it would be a half pyramid.
In loop1, i=1 and 1 <= 5 so we move inside lo... | ALGO | 0.999875 | 4.17054 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-02-04T11:25: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": "8e1b7803f8c5... |
d4f247a7-e575-41d0-9021-dde8af55424b | Charalampos-Thomaidis/PhoneBookConsole | PhoneBookConsole/PhoneBookConsole.cpp | #include <iostream>
#include <string>
using namespace std;
const int MAX_ENTRIES = 100;
class Person
{
public:
string name;
int number;
};
class PhoneBook
{
private:
Person entries[MAX_ENTRIES];
int count;
public:
PhoneBook() : count(0) {}
void displayDirectory() const
{
if (co... | TOOL | 0.978923 | 4.537092 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-06-05T20:08:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "22ccc71e034b... |
07503251-c6ae-4442-8cd3-34afaa28b8e9 | cestlascorpion/Leetcode-Cpp | Leetcode92cn/Leetcode92cn.cpp | //
// Created by Wang on 2019/10/28.
//
#include "Leetcode92cn.h"
ListNode *Leetcode92cn::reverseBetween(ListNode *head, int m, int n) {
if (head == nullptr) {
return nullptr;
}
ListNode *m_pre = nullptr;
ListNode *n_nxt = head->next;
ListNode *pm = head;
ListNode *pn = head;
--m;... | ALGO | 0.999928 | 6.037859 | {
"github_metadata": {
"branch": "master",
"commit_count": 256,
"repo_created_at": "2018-01-06T12:53: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": "cf6a47a8... |
4d8117e9-d09c-44f3-bf9c-1ea99a5525e9 | ishandutta2007/codeforces-y | ympc2005/normal/1654/D.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 2e5 + 10, mod = 998244353;
int n, T, a[N], b[N], c[N], d[N], ans, f[N], g[N];
vector <int> e[N], p[N];
int fpow_(int a, int b, int res = 1) {
for (; b; b >>= 1, a = 1ll*a*a%mod) {
if (b&1) {
res = 1ll*res*a%mod;
}
}
retur... | ALGO | 0.999818 | 5.272924 | {
"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": "ed4455bef145... |
f0671440-9772-488f-98d2-aa2119784c8c | mathiramilo/programming-2 | tarea2/src/cadena.cpp | /*5665788*/
#include "../include/cadena.h"
#include "../include/info.h"
#include "../include/utils.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
struct nodo {
TInfo dato;
TLocalizador anterior;
TLocalizador siguiente;
};
struct repCadena {
TLocalizador inicio;
TLocalizador final;
};
bool esLoca... | ALGO | 0.989636 | 3.865725 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-11-11T02:35:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8e03cc8c9229... |
edf43d70-978b-497d-8efd-c5c44d95983b | TranTrungTien/Data_structure_and_algorithms | DataStructure_Algorithms/numericalAnalysis.cpp | #include <iostream>
void backtracking(int*, int*, int, int);
void display(int*, int);
// Tired....
int main()
{
int n = 6;
int array[n] = {};
int T[n] = {};
array[0] = 1;
T[0] = 0;
backtracking(array, T, n , 1);
return 0;
}
void backtracking(int* array, int* T, int n, int i)
{
int j;
... | ALGO | 0.999624 | 4.515166 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-01-31T08: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": "07c88d37e1dc... |
ff0d4fc2-a347-4dbb-a730-c876c1c90b3f | DeMesquita/Estrutura-de-Dados-2018.1 | 03-Vetor/vector.c++ | #include <iostream>
using namespace std;
struct Vetor{
int * _data;//bloco de dados
int _capacidade;//tamanho maximo do vetor
int _size; //quantos elementos estao inseridos
Vetor(int capacidade){
this->_capacidade = capacidade;
this->_size = 0;
// this->data = (int*) malloc(cap... | TOOL | 0.906165 | 4.06933 | {
"github_metadata": {
"branch": "master",
"commit_count": 62,
"repo_created_at": "2018-03-21T00:19: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": "347b008c9... |
9fa14bdf-7579-41a6-be1e-18e9f75e5e02 | CathyF9600/computer-graphics-ray-casting | src/viewing_ray.cpp | #include "viewing_ray.h"
#include <Eigen/Core>
#include <iostream>
void viewing_ray(
const Camera & camera,
const int i,
const int j,
const int width,
const int height,
Ray & ray)
{
////////////////////////////////////////////////////////////////////////////
// Add your code here
double u = (- camera... | ALGO | 0.957642 | 5.070685 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-09-24T20:57: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": "7ca5a8a2adf4... |
41bc14e3-e503-4e0a-aa22-72a59b420e02 | wpineda21/ProyectoAlgo | Etapa IV/Union/ConBuildMinHepa.c++ | #include <iostream>
/* Definimos la Estructura de los Nodos establecidos en el proyecto */
struct TreeNode {
char symbol;
double probability;
TreeNode* parent;
TreeNode* left_son;
TreeNode* right_son;
};
TreeNode* crearNodo(char symbol, double probability) {
TreeNode* newnode = new TreeNode;
... | ALGO | 0.999992 | 5.199303 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-11-06T04:18: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": "eef64b57443b... |
1f871b61-f167-490b-9ccb-ae607b9708be | petrasvestartas/wood | cmake/src/wood/include/cgal_polyline_util.cpp |
#include "cgal_polyline_util.h"
#include "../../../stdafx.h" //go up to the folder where the CMakeLists.txt is
namespace cgal
{
namespace polyline_util
{
//! \cond NO_DOXYGEN
namespace internal
{
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////... | ALGO | 0.997349 | 3.824643 | {
"github_metadata": {
"branch": "main",
"commit_count": 61,
"repo_created_at": "2024-04-14T08:55:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ba89e0f15cc... |
729d543d-57c0-4f6e-85e4-d6bd6a0f398e | mareksm/aoc2024 | main_14.cpp | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <fstream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <unordered_map>
#include <set>
#include <string>
#include <sstream>
#include <vector>
#include <cstring>
using namespace std;
#if 1
constexpr auto size_x = 101;
constexpr auto si... | ALGO | 0.99944 | 4.999061 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2024-12-04T11:38: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": "e43d872415c... |
22a47d4b-6aaf-424c-b158-942cdffe955d | ankursinghbisht/DSA_CheatSheet | C++/String/10_all_permutations.cpp |
/*
Idea:
using backtracking , find all possible permutations of string
*/
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution
{
public:
void AllPermutation(string& input, int low, int high, set<string>& st)
{
// base case
if (low > high)
{
st.... | ALGO | 0.999968 | 6.146809 | {
"github_metadata": {
"branch": "main",
"commit_count": 627,
"repo_created_at": "2023-07-06T10:04: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": "2590fb706c... |
070e470a-a7a8-4976-85b3-6a54ded20a24 | Suldangoo/CodingTest | baekjoon/gold/9935.문자열 폭발/문자열폭발.cpp | // 9935. 문자열 폭발 (골드 4)
// 알고리즘 분류 : 문자열, 스택
#include <iostream>
#include <string>
using namespace std;
int main() {
string s, bomb;
cin >> s >> bomb; // s와 bomb 문자열 입력받기
string result; // 문자열을 담아낼 스택
int bombSize = bomb.size();
for(int i = 0; i < s.size(); i++) {
result.push_back(s[i]); ... | ALGO | 0.999912 | 5.25823 | {
"github_metadata": {
"branch": "main",
"commit_count": 464,
"repo_created_at": "2023-03-10T09:22: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": "bab35cde81... |
17e1950e-573c-4ecd-bf44-3e28c022fb65 | CitrusSin/AlgorithmProblemAnswers | Algorithms/matmul.cpp | #include <functional>
#include <iostream>
#include <limits>
#include <vector>
#include <utility>
#include <memory>
using namespace std;
int64_t arrange(const vector<pair<int, int>>& shapes, vector<int>& suffix_sequence) {
struct ast {
int64_t node;
pair<int64_t, int64_t> left, right;
ast(... | ALGO | 0.999988 | 4.215233 | {
"github_metadata": {
"branch": "main",
"commit_count": 141,
"repo_created_at": "2023-01-08T13:54: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": "406f2333cf... |
b92077e3-6715-4a0b-bf8d-f2604b837cb6 | benardp/Wickbert | Particles/Behaviors/ShadowAdhesion.cpp | /**
* Implementation of the shadow constraint.
* @file ShadowAdhesion.cpp
* @date June 06, 2005
* @author <NAME>
*/
#include "ShadowAdhesion.h"
#include "ParticlePosition.h"
#include "ParticleVelocity.h"
#include "ParticleNormal.h"
#include "ImplicitInterrogator.h"
#include "LightPosition.h"
#include "ParticleAge.... | ALGO | 0.970404 | 5.247962 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2018-04-26T10:40:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6b77e89d6f... |
45e6b9a3-dfeb-4209-b06b-1ae3abcd201f | DJaderberg/crrw | src/generateGraphics.cpp | /** @file generateGraphics.cpp
* Function for generating images from data
*/
//
// Created by <NAME> on 13/11/14.
//
#ifdef GRAPHICS
#include "generateGraphics.h"
#include <string>
#include <fstream>
/**
* Function for generating images from data
*/
void generateGraphics(std::string nodePath, std::string dataRea... | DATA | 0.973594 | 5.13555 | {
"github_metadata": {
"branch": "master",
"commit_count": 406,
"repo_created_at": "2014-10-28T08:34:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9282b8e8... |
406a5892-f1c4-49b6-88de-1e67c8ee7df9 | alexandraback/datacollection | solutions_5631572862566400_0/C++/jzj/main.cpp | #include <iostream>
#include <vector>
using namespace std;
void solve(int case_no);
void dfs(int cur_length, vector<int> &cur, int &answer, vector<bool>& visited, size_t n, const vector<int> &bff);
int main(void) {
int T;
cin >> T;
for (int case_no = 1; case_no <= T; case_no++) {
solve(case_no);
... | ALGO | 0.999969 | 4.530466 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6c1abbf0c... |
e364eaeb-5fe4-4557-bcce-474c880be7f8 | open-edge-platform/scenescape | controller/src/robot_vision/src/rv/tracking/MultipleObjectTracker.cpp | // SPDX-FileCopyrightText: (C) 2019 - 2025 Intel Corporation
// SPDX-License-Identifier: LicenseRef-Intel-Edge-Software
// This file is licensed under the Limited Edge Software Distribution License Agreement.
#include <algorithm>
#include "rv/Utils.hpp"
#include "rv/tracking/MultipleObjectTracker.hpp"
#include "rv/tra... | TOOL | 0.930931 | 7.268043 | {
"github_metadata": {
"branch": "main",
"commit_count": 122,
"repo_created_at": "2025-04-26T00:35:38.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 26,
"forks": 20,
"issues": 1,
"pull_requests": 22
},
"file_meta": {
"content_id": "b2098b5c... |
b2e3b3dd-f89a-426a-a7bc-8c811e290307 | apache/mesos | src/slave/containerizer/mesos/launch.cpp | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | TOOL | 0.905306 | 7.1296 | {
"github_metadata": {
"branch": "master",
"commit_count": 18448,
"repo_created_at": "2013-07-17T07:00:13.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5328,
"forks": 1676,
"issues": 0,
"pull_requests": 12
},
"file_meta": {
"content_id": "... |
e403fa67-069b-44ae-842c-65c04cf3aefb | lum7na/ACM | POJ/3017/10034170_AC_1219ms_10596kB.cpp | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <cstdlib>
#include <cmath>
using namespace std;
const int maxn = 1e5;
int n;
long long m;
int v[maxn + 5];
int que[maxn + 5], h, t;
long long s[maxn + 5];
long long f[maxn + 5];
int mx[maxn + 5][21];
void init() {
for (int i = 1; i <= n; ++i) {
mx[i... | ALGO | 0.99999 | 3.243429 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2021-05-10T09:49: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": "88d04f54f62... |
b77a7a9f-f6db-4fd7-b998-a3ad32137a0b | jherico/VulkanExamples | base/easings.hpp | #pragma once
#ifndef PI
#define PI 3.14159
#endif
namespace easings {
// t current time
// b beginning value
// c change in value
// d duration
template <typename T = float>
T inQuad(float t, float d = 1, T b = T(0), T c = T(1)) {
return c * (t /= d) * t + b;
}
template <typename T = float>
T outQuad(float t, f... | ALGO | 0.976058 | 6.702631 | {
"github_metadata": {
"branch": "cpp",
"commit_count": 640,
"repo_created_at": "2016-02-29T01:00:49.000Z",
"is_fork": true,
"is_org_owned": false,
"forked_from": "SaschaWillems/Vulkan",
"stars": 357,
"forks": 30,
"issues": 19,
"pull_requests": 1
},
"file_meta": {
"cont... |
df4983d5-bb64-402e-90f5-17c9fdded60b | Mateo-Guti1/PRACTICA_03 | Ejericicio_03_01.cpp | // Materia: Programación I, Paralelo 1
// Autor: <NAME>
// Fecha creación: 05/09/2024
// Número de ejercicio: 1
// Problema planteado: Calcula la suma de los primeros n numeros de la secuencia
#include <iostream>
using namespace std;
// Función para calcular el n-ésimo término de la serie
int calcularTermino(int n) ... | ALGO | 0.999989 | 5.49382 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-09-08T14:40: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": "1a6329f14ad7... |
3cb0bb50-b758-4164-ad17-b90ad54ddf21 | mikankari/paper2web | mikankari.hpp | #include <iostream>
#include <stack>
#include "opencv2/opencv.hpp"
using namespace std;
using namespace cv;
/**
* わいのねいむすぺーす。OpenCVでできなかったことを関数にした
*/
namespace mikankari{
/**
* メディアンフィルタ。4近傍に対して適用されます
*
* @param src 入力画像
* @param dst 出力画像
*/
void medianBlur(Mat &src, Mat &dst){
dst.create(src.siz... | ALGO | 0.978545 | 3.279346 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-01-27T08:37:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6a40fac095... |
e444852b-ebfa-4771-a8ec-f014462193d1 | kronk99/Actividades_en_claseBD | CASO4/InsertionSort.cpp | #include <iostream>
#include "Nodes.h"
#include "Pila.h"
#ifndef SORT
#define SORT1
using namespace std;
template <class T>
class InsertionSort{
private:
int interchanges = 0;
int compares = 0;
public:
Pila<T>* sort(Pila<T>* pNumberList) {
//metodo que ordena con el ins... | ALGO | 0.999185 | 3.928244 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2022-08-10T15:05: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": "c49c8c0a4d3... |
59230709-1115-4baf-9501-271325e5bf23 | yayajjiang/Advent-of-Code-2022 | code/day2.cpp | #include <algorithm>
#include <iostream>
using namespace std;
#include <vector>
#include <string>
int main()
{
freopen("day2data.in", "r", stdin);
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
vector<int> v;
string a;
char p1; char p2;
int count = 0;
int count2 = 0;
int num ... | ALGO | 0.999585 | 3.43986 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2022-12-01T08:48:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "454c23d17a5d... |
2cdf8a0f-4e18-4a52-b2eb-23ab698fdae9 | mhmdshaker/Competitve-Programming | 1822G2.cpp | #include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <math.h>
typedef long long ll;
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int t; cin>>t;
while (t--){
ll n; cin>>n;
map <ll, ll> mapp;
... | ALGO | 0.999648 | 3.550469 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2022-12-31T10:38: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": "b666a33e150... |
5f8ef201-484b-4604-8105-7078ba493e60 | quyentvo/C- | Lab4/chapter4.cpp | /*
Name: <NAME>
Date 9/14/22
Description: Geometry Calculator
*/
#include <iostream>
using namespace std;
int main()
{
short choice;
double area;
double PI = 3.14519;
double radius, length, width, base, height;
cout << "Geometry Calculator \n\n";
cout << "\t 1. Calculate the Area of a Circle\n";
cout << "\t ... | TOOL | 0.9709 | 3.602515 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-01-29T17:34:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "17c25c68db9a... |
19a419db-65bf-44e5-8bbb-332253c85742 | hyurumi/MuriSuDokei | raw/get_result_with_log.cpp | #include <stdio.h>
#include <string.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include <vector>
#include <iomanip>
using namespace std;
int find_place(string irrational_value, string time);
string get_digit_seq(string irrational_value, int current_pos);
int MAX_HOUR = 24;
int MAX_MINUTE = 60;
in... | ALGO | 0.997185 | 3.684988 | {
"github_metadata": {
"branch": "master",
"commit_count": 36,
"repo_created_at": "2016-10-08T03:49:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "02f982f53... |
f06bc644-60d6-407c-8a2d-d249d6bf248d | aamir-ops/Competitive-Programming | UVA/UVA11709.cpp | #include<bits/stdc++.h>
using namespace std;
#define MAX_N 1100
// variables for SCC algorithm
int scc_n, sccComp[MAX_N]; // *remember to intialize scc_n
stack<int> auxs;
vector<pair<int,int>> sccGraph[MAX_N], rsccGraph[MAX_N];
bool vis[MAX_N];
// user-defined variables
int m,a,b,c;
void revGraph(int u,vector<pair... | ALGO | 0.999789 | 4.109412 | {
"github_metadata": {
"branch": "master",
"commit_count": 105,
"repo_created_at": "2020-01-17T12:04: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": "0db4632e... |
ec8e9321-7913-433a-9a5c-666dc077347e | IsabellyTemoteo/Codigos-S2 | MatComputacional/Clube dos Cinco.cpp | // <NAME> >▽<
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a, b, c, d, e, f, g;
cin >> a >> b >> c >> d >> e >> f >> g;
//usar: f, d, e = ref;
int soma_1, soma_2, soma_3;
soma_1 = c - f - e;
soma_2 = b - d - f;
soma_3 = a - d - e;
int soma_total;
soma_tota... | ALGO | 0.999959 | 3.364416 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2022-01-06T18:44:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ccb4dc2c905... |
45e21bd7-2b7a-4b62-9d29-7420d0946ab4 | y00gi/Data_Structures_and_Algorithms_Coding_Ninjas | Test 3/Split Array.cpp | bool helper(int *input, int size, int start, int lsum, int rsum)
{
if(start == size)
{
return lsum == rsum;
}
if(input[start] % 5 == 0)
{
lsum+=input[start];
}
else if(input[start] % 3 == 0)
{
rsum+=input[start];
}
else
{
return helpe... | ALGO | 0.999842 | 4.378837 | {
"github_metadata": {
"branch": "main",
"commit_count": 62,
"repo_created_at": "2023-05-07T10:15: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": "93f7349c09f... |
0851bc0a-f5d1-45bb-965e-4a468091cd1f | szelinskip/image_matching | src/model/improc/algorithm/Ransac.hpp | #pragma once
#include <cstdint>
#include "RansacAlgo.hpp"
#include <improc/algorithm/transformation/TransformationModelPerspective.hpp>
namespace model {
namespace improc {
namespace algorithm {
using helpers::Point;
using MatchingPointsPairs = std::vector<std::pair<Point, Point>>;
class Ransac
{
public:
Ransa... | ALGO | 0.969077 | 7.373968 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2019-05-25T21:07:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "27117405b... |
145e1213-2e90-4e58-bd1e-b136070102eb | gs0622/leetcode | 714_maxProfit.cc | /* https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/description/
Your are given an array of integers prices, for which the i-th element is the price of a given stock on day i; and a non-negative integer fee representing a transaction fee.
You may complete as many transactions as you ... | ALGO | 0.999906 | 5.670868 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2014-06-13T09:02: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": "b2efb7891... |
be5bfc2e-d758-41e3-bbe6-aa6e86f6e3df | aliyun/aliyun-openapi-cpp-sdk | imm/include/alibabacloud/imm/model/QueryLocationDateClustersRequest.h | /*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | TOOL | 0.942734 | 6.520567 | {
"github_metadata": {
"branch": "master",
"commit_count": 2903,
"repo_created_at": "2017-12-26T02:53:27.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 104,
"forks": 74,
"issues": 11,
"pull_requests": 2
},
"file_meta": {
"content_id": "7481... |
4954c36a-b695-43ac-9cb2-ee881bf69b05 | kartickgupta/CoderForNow | algo/Binary Search/binarySearchUsingRecursion.cpp | // Recursiove Binary Search
#include<bits/stdc++.h>
using namespace std;
int BinarySearch(int arr[], int l, int h, int x){
if(l == h){
if(arr[l] == x) return l;
else return 0;
}
int mid = l + (h-l)/2;
if(arr[mid] == x) return mid;
else if(arr[mid] > x) return BinarySearch(arr,... | ALGO | 0.99996 | 4.666537 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2020-06-19T20:04: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": "4918e7b5b... |
ccd48d31-2720-424e-9272-d211eac4a0ac | dwax1324/baekjoon | code/14430 자원 캐기.cpp | #include <bits/stdc++.h>
// 전형적인 2차원배열 우,하 DP
// 위에,왼쪽에서 오는 값중에 큰 값을 채택한다.
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int arr[301][301];
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
cin >> arr[i][j];
}
}
int dp[301][301];
for (... | ALGO | 0.999987 | 4.210989 | {
"github_metadata": {
"branch": "main",
"commit_count": 116,
"repo_created_at": "2020-11-07T09:27:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e63d4d5a1e... |
06bb9be2-0a2f-4c74-9d50-b3195c4eb64e | sing-dance-rap-basketball/leetcode | zxq/cpp/40-combination-sum-ii.cpp | /*
* @lc app=leetcode id=40 lang=cpp
*
* [40] Combination Sum II
*/
/*
√ 172/172 cases passed (4 ms)
√ Your runtime beats 99.31 % of cpp submissions
√ Your memory usage beats 43.94 % of cpp submissions (9.4 MB)
√ 172/172 cases passed (8 ms)
√ Your runtime beats 88.64 % of cpp submissions
√ Your memory ... | ALGO | 0.99999 | 6.441057 | {
"github_metadata": {
"branch": "master",
"commit_count": 353,
"repo_created_at": "2019-06-30T09:35:12.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e04593340... |
b39866df-c0fc-40fa-8bb7-e3a2885b4cf0 | FangGet/BundleFusion_Ubuntu_Pangolin | include/FreeImage/include/CGAL/Mesh_3/Cell_criteria_visitor_with_balls.h | // Copyright (c) 2009 INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
// You can redistribute it and/or modify it under the terms of the GNU
// General Public License as published by the Free Software Foundation,
// either version 3 of the License, or (at your op... | ALGO | 0.969814 | 6.326297 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2020-06-29T03:53:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 132,
"forks": 34,
"issues": 6,
"pull_requests": 0
},
"file_meta": {
"content_id": "f958394... |
6ce7e684-13fa-4c1c-8987-f9019bebc0b4 | shamir0xe/problem-solving | codeforces/codeforces-round-895-div3/f/f.cpp | #include <bits/stdc++.h>
/**
* problem F (6/7)
* codeforces, codeforces-round-895-div3
* author: @shamir0xe
* generated by contest-builder
* https://github.com/shamir0xe/contest-builder
**/
typedef long long ll;
typedef std::pair<int, int> pii;
typedef std::vector<int> vi;
typedef std::vector<long long> vl;
typ... | ALGO | 0.999994 | 4.38233 | {
"github_metadata": {
"branch": "main",
"commit_count": 79,
"repo_created_at": "2023-08-09T18:31: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": "f45845158c3... |
68a8e6b9-8fa4-421f-b4c0-84680852606b | gbuchsbaum/cme211 | hw5/mazesolver.cpp | /* This program can solve a maze using the right-hand wall following algorithm.
* It takes a file representing the walls of a maze and a location to save the
* solution as command line inputs, and produces a file representing a path
* that can be used to navigate the maze. The basic process is as follows:
* read th... | ALGO | 0.99995 | 4.949686 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-11-13T21:53: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": "7c567c6318... |
4cfe44d0-5c0f-4e34-962c-3d6e2dc9495d | alexandraback/datacollection | solutions_5634697451274240_0/C++/xidui/main.cpp | //
// main.cpp
// Revenge of the Pancakes
//
// Created by 王越 on 16/4/9.
// Copyright © 2016年 王越. All rights reserved.
//
#include <iostream>
#include <fstream>
#include <string>
#include <set>
using namespace std;
void generate_digit(set<int>& si, long long i) {
while (i != 0) {
si.insert(i % 10);
... | ALGO | 0.998782 | 4.009712 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7585dd417... |
9a27561f-1c55-459d-bca8-0a60a9ae39c0 | john15518513/leetcode | cpp/addtwonumbersii.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) {
stack <ListNode*> l1Stack;
stack <ListNode*> l2Stack;
... | ALGO | 0.999976 | 6.055553 | {
"github_metadata": {
"branch": "master",
"commit_count": 568,
"repo_created_at": "2017-01-22T16:32: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": "9b0df382... |
0f139c31-a175-4e53-83c4-b2130d0f2813 | lukipuki/bootcamp-2014 | sunday/wordspin/submissions/accepted/wordspinIvona.cpp | #include <stdio.h>
#include <stdlib.h>
#define DEBUG 0
#define MAX 10000005
long n;
char word1[MAX];
char word2[MAX];
int dif[MAX];
long count;
void printDif() {
long i;
for (i=0; i<n; i++) printf(" %2d",dif[i]);
printf("\n");
}
// compute the nearest shift, start from position left
int comput... | ALGO | 0.999985 | 3.839541 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2014-05-21T13:07:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8b4eee8b6... |
30d99f31-a356-4ffe-8600-011a2b5b02d3 | NgTrGianz/PTIT_DSA | DSA06022.cpp | #include<bits/stdc++.h>
using namespace std;
using str = string;
using ll = long long;
int mod = 1e9 + 7;
int bin_search(int a[], int l, int r, int x){
int ans = -1;
while (l <= r){
int m = (l + r) / 2;
if (a[m] == x){
l = m + 1;
} else if (a[m] < x){
l = m + 1;
... | ALGO | 0.999976 | 3.795739 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2025-02-04T04:43:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ff255e87ed3... |
835acb88-bfa3-4637-9e98-8f2ee57588e8 | Bhupesh-Khordia/Strivers-A2Z-DSA-Sheet | Step_13_Binary_Trees_[Traversals,_Medium_and_Hard_Problems]/Lec_02_Medium_Problems/04_Maximum_path_sum.cpp | #include <bits/stdc++.h>
using namespace std;
// https://leetcode.com/problems/binary-tree-maximum-path-sum/
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x)... | ALGO | 0.999979 | 6.353073 | {
"github_metadata": {
"branch": "main",
"commit_count": 482,
"repo_created_at": "2025-02-09T19:57: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": "8f94860440... |
7064de8b-3aef-4ab1-a70c-7cff1403c71b | yumaohua/ymath | BVP_FD/src/Solver.cpp | #include "../include/Solver.h"
bool Solver::Prepare()
{
std::vector<bool> component_prepare;
component_prepare.push_back(_domain.Prepare());
component_prepare.push_back((*_rhs_function).Prepare());
return TestPrepare("Solver",component_prepare);
}
void Solver::Solve(){
int n = _A.size();
int* i... | ALGO | 0.999829 | 3.749321 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2024-03-07T11:54: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": "d6235023e67a... |
78ebe240-bed8-4234-b0e0-ed179bdd2088 | juneharold/USACO | usaco_practice/silver/silv_practice/rest_stop.cpp | /* c의 크기에 따라 정렬,
*/
#include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
pair <long long, long long> rest[100005]; //first=c, second=x;
pair <long long, long long> stop[100005];
int main()
{
//freopen("reststops.in", "r", stdin);
//freopen("reststops.out", "w", stdout);
long lon... | ALGO | 0.999734 | 3.279258 | {
"github_metadata": {
"branch": "master",
"commit_count": 554,
"repo_created_at": "2020-12-15T11:15: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": "78621b40... |
b686e2cc-f44f-401a-a914-393a5dffd54e | Phanxv/C-Cpp | C++/CPE-113-114/L02_2111310609/L0207_Compinterest/main.cpp | #include <iostream>
using namespace std;
int main()
{
cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(2);
float deposit, interest, balance;
int year, i;
cout << "Enter the deposit : ";
cin >> deposit;
balance = deposit;
cout << "Enter the number of years from now on : ";... | ALGO | 0.990937 | 4.017511 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2022-09-01T04:24: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": "a11023aca8... |
2fbc1e31-865e-430b-bd11-e22168e0d02f | rajnish952/InterviewBit | RotatedSortedArraySearch.cpp | /*
Rotated Sorted Array Search
Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2 ). You are given a target value to search. If found in the array, return its index, otherwise return -1. You may assume no duplicate exists in the array.
Input : [4 5... | ALGO | 0.999996 | 5.745803 | {
"github_metadata": {
"branch": "master",
"commit_count": 111,
"repo_created_at": "2019-09-18T02:34:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 10,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "e3f50c0... |
0bd2451a-8b4e-46a6-a075-f9a2eb2a1235 | KostiantynPolishko1/HW31_C-base_r00_20230509 | HW31_Macro.cpp | #include<iostream>
#include<cstdint>
using namespace std;
//Write a macro program that takes a numberand converts it into binary code
#define BINARY(a) \
int i = 0, binary = 0, temp = 0, d = 1; \
while (a) { \
temp = a % 2; \
temp *= d; \
binary += temp; \
a /= 2; \
d *= 10; \
} \
cout... | ALGO | 0.999275 | 4.459567 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2023-05-10T17:22: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": "4b332b4ee... |
976168ab-ace4-4323-b7cb-26bba4167da1 | Viing3107/Source-Code | Duyệt/CANDIES.cpp | /*
Author : <NAME>
Kim Son A High School - Ninh Binh
Created : 13:07:38 - 20/05/2024
*/
#include <bits/stdc++.h>
#define int long long
#define task "CANDIES"
#define forUp(i, l, r, step) for(int i = l; i <= r; i += step)
#define forDown(i, l,... | ALGO | 0.999984 | 3.612036 | {
"github_metadata": {
"branch": "main",
"commit_count": 450,
"repo_created_at": "2024-04-27T09:52: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": "b7a2f4aa23... |
1f966abb-4b31-42d9-ba16-a378b172a4d9 | Juanf4r/115-Ejercicios-resueltos-de-C | Ejercicio 9 Longitud de un cilindro.cpp | /*Escriba, compile y ejecute un programa que calcule la longitud de un cilindro de aluminio conocido el radio, la masa y su densidad.
Donde m es la masa, d la densidad del aluminio equivalente a 2.7 (g/cm3), r el radio del cilindro y pi 3.1416.*/
#include<iostream>
#include<string>
#include<cstdlib>
#define pi 3.1416... | TOOL | 0.943188 | 3.94844 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2023-05-27T19:11:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b77de8a5c8d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.