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 |
|---|---|---|---|---|---|---|---|
210710cf-e014-43dd-aa64-23d6d555a585 | LamaElMalatawy/Codeforces-Solutions | 831B - Keyboard Layouts.cpp | #include <bits/stdc++.h>
#define IO ios_base::sync_with_stdio(0),cin.tie(NULL),cout.tie(NULL)
#define ll long long
const int N=1e6+5;
//ll a[N],b[N]={0};
using namespace std;
int main() {
IO;
char a[27],b[27];
for (int i = 0; i < 26; ++i) {
cin>>a[i];
}
for (int i = 0; i < 26; ++i) {... | ALGO | 0.999919 | 4.14733 | {
"github_metadata": {
"branch": "main",
"commit_count": 310,
"repo_created_at": "2021-05-11T21:42: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": "6e4dd10eab... |
980b9ffc-6678-41dc-9ddf-170495d984ad | RoboMash/Cpp_Lessons | ReverseUsingStack.cpp | /* Reverse of a string using stack */
#include <iostream>
#include <stack>
#include <cstring>
using namespace std;
void Reverse(char *C, int n)
{
stack<char> S;
for (int i = 0; i < n; i++)
{
S.push(C[i]);
}
for (int i = 0; i < n; i++)
{
C[i] = S.top();
S.pop();... | ALGO | 0.999703 | 5.016262 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2022-02-05T09:46: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": "08e8ed2d579... |
81b84291-6dcf-4d4d-9bde-b749efaa593e | Tanmoy-compiling/DSA | recursion/revised_merge.cpp | #include <bits/stdc++.h>
using namespace std;
void merging(vector<int>& a, int begin, int mid, int end){
int i = begin;
int j = mid + 1;
vector<int> result;
while (i<=mid && j<=end) {
if(a[i]<a[j]) result.push_back(a[i++]);
else result.push_back(a[j++]);
}
while (i<= mid) result.push... | ALGO | 0.999967 | 4.797017 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2023-10-19T15:05: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": "7c755772c5... |
a5ce51ab-8a4b-4aee-b4ee-826d7edac716 | ShuyiLU/leetcode | leetcode-algorithms/005. Longest Palindromic Substrin/5. Longest Palindromic Substring.cpp | #include<iostream>
#include<vector>
#include<map>
#include<queue>
#include<string>
#include<cstring>
using namespace std;
class Solution {
public:
string longestPalindrome(string s) {
//int f[1001][1001];
int n = s.length();
int f[n+1][n+1];
//int d[n+1][n+1];
memset(f,0,sizeof(f));
... | ALGO | 0.999952 | 4.143746 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2019-10-25T14:03: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": "9527e6bf1... |
5b33e170-5fc7-4299-92a1-000328cc6c94 | 113bommy/PathRepair | variable_trace/cpp/cpp_code/cpp_incorrect/cpp_incorrect_test_76_2.cpp | #include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cer... | ALGO | 0.99969 | 3.866752 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2024-11-11T15:46:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1243427b4e6... |
8fce0cc0-4095-4188-8a80-a83ca045788d | rgantard/RGantard | C++/HW1/Q2/Main.cpp | #include "Employee.h"
#include <iostream>
int main()
{
int SSN, hours;
char name[21];
float wage, donations;
Employee highEarn;
Employee lowDonation;
Employee temp;
highEarn.setDonations(1);
std::cout << "enter details, to end enter 0:" << std::endl;
while (true)
{
int d... | TOOL | 0.947492 | 4.188484 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-03-17T12:39: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": "32150bc01961... |
8feb1504-e586-4bf5-aa80-6dd14792df7f | andrewleachtx/cuda-xpbd | include/apbd/Collisions.h | #pragma once
#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int
#include <Eigen/Dense>
#include <cuda/std/array>
#include <cuda/std/utility>
#include "apbd/CollisionReference.h"
#include "apbd/ConstraintReference.h"
#include "apbd/Contact.h"
namespace apbd {
struct alignas(16) Collision {
/// A stored sequence of contac... | ALGO | 0.997469 | 6.411802 | {
"github_metadata": {
"branch": "main",
"commit_count": 103,
"repo_created_at": "2025-01-21T15:22: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": "642f99c677... |
8224edbc-8822-45ac-aca1-07ad5cbee1c1 | abusayed310278/Competitive-Programing-Problem-Solving-code | BOX95.cpp | #include<bits/stdc++.h>
#define endl "\n"
#define int long long int
#define ll long long
#define l long
#define F first
#define S second
#define pb push_back
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
inline void cp() {
ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);... | ALGO | 0.999854 | 4.389639 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-09-30T15:28: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": "5203a89196... |
04a8767a-ac85-4376-8335-ae502682df17 | DQSSSSS/Algorithm-Competition-Code | CF/goodbye2017/F.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long LL;
const int SZ = 2000010;
const int INF = 1e9 + 10;
const int mod = 1e9 + 7;
const int dx[] = {0,1,0,-1};
const int dy[] = {1,0,-1,0};
LL read()
{
LL n = 0;
char a = getchar();
bool flag = 0;
while(a > '9' || a < '0') { if(a == '-') flag = 1; a = ge... | ALGO | 0.999547 | 3.197482 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2020-11-02T16:48:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "563a4bd477... |
27072a58-04b8-4fdc-9c94-a2869c5d642c | luke-belinc/AOC-2020 | Day 2/c++/aocday2/aocday2/main.cpp | #include <iostream>
#include <string>
#include <fstream>
int main(void) {
// file stream object
std::fstream f;
f.open("input.txt", std::ios::in);
// counters for number of valid passwords for part 1 and 2
int validPart1 = 0;
int validPart2 = 0;
// line placeholder
std::string line;
// loop over lines with... | ALGO | 0.99637 | 4.930309 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-09-01T08:51: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": "5e1bdab772ab... |
ebbb6585-f921-43b7-a70f-88390c75c7b4 | Ichigo27/lovebabbar-dsa-sheet | Stacks & Queues/408_First_negative_integer_in_every_window_of_size_k.cpp | // 408 First negative integer in every window of size “k”
// Given an array A[] of size N and a positive integer K, find the first negative integer for each and every window(contiguous subarray) of size K.
#include <bits/stdc++.h>
using namespace std;
vector<long long> printFirstNegativeInteger(long long int A[], lo... | ALGO | 0.999954 | 4.571584 | {
"github_metadata": {
"branch": "main",
"commit_count": 79,
"repo_created_at": "2022-12-14T08:39: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": "3667b536381... |
c11ce568-797f-47fd-bef5-ec8d0141ea97 | NoureldinYosri/competitive-programming | codeforces/781/A/main.cpp | #include <bits/stdc++.h>
#define loop(i,n) for(int i = 0;i < (n);i++)
#define range(i,a,b) for(int i = (a);i <= (b);i++)
#define all(A) A.begin(),A.end()
#define PI acos(-1)
#define pb push_back
#define mp make_pair
#define sz(A) ((int)A.size())
#define vi vector<int>
#define vl vector<long long>
#define vd vector<doub... | ALGO | 0.999955 | 4.28536 | {
"github_metadata": {
"branch": "master",
"commit_count": 50,
"repo_created_at": "2015-08-04T09:08: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": "a2d33c570... |
def4cfcd-64ce-4f05-b8b0-f4d77c7ee3df | koosaga/olympiad | ICPC/NAIPC/naipc19_e.cpp | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
using lint = long long;
using pi =pair<int,int>;
const int mod = 1e9 + 7;
int n, m;
int a[22][22];
int ord[22][22];
vector<pi> v[1<<20];
int dp[22];
int solve(int pos){
for(auto &i : v[pos]){
dp[i.first] = dp[i.second] = 1;
}
for(auto &i : v... | ALGO | 0.999942 | 3.10744 | {
"github_metadata": {
"branch": "master",
"commit_count": 361,
"repo_created_at": "2015-11-06T16:01:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 285,
"forks": 31,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e5f36... |
0abb1309-9cd9-4d50-ae4d-9d26b6a3344c | ParhamBateni/LeetCodeDailyProblems | src/NumberOfAtoms_726.cpp | /*
Given a string formula representing a chemical formula, return the count of each atom.
The atomic element always starts with an uppercase character, then zero or more lowercase letters, representing the name.
One or more digits representing that element's count may follow if the count is greater than 1. If the cou... | ALGO | 0.997066 | 5.245529 | {
"github_metadata": {
"branch": "main",
"commit_count": 94,
"repo_created_at": "2024-05-09T11: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": "7bc1218e692... |
dbaed288-77ed-4be8-ad5a-a07d134e6f9e | mlz000/Algorithms | Tyvj/1039.cpp | #include<cstdio>
#include<cstdlib>
#include<iostream>
#include<algorithm>
using namespace std;
int num[100001];
struct
{
int l;
int r;
int sum;
}node[400000];
int build_tree(int root,int l,int r);
int answer(int root,int a,int b);
int change(int root,int a,int b);
int main()
{
int i,p,a,b,m,n;
... | ALGO | 0.999967 | 3.901544 | {
"github_metadata": {
"branch": "master",
"commit_count": 110,
"repo_created_at": "2017-08-23T03:57:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1d682d8d... |
da7e705f-41c7-428c-adb2-b9520ca54411 | Academic-Ayda-z/Handling-and-Scheduling-patients_Data-structure-project- | main.cpp | #include <iostream>
#define MAX 1000
using namespace std;
class Node{
public:
int key;
Node* idsTree;
Node *left;
Node *right;
int height;
};
int max(int a, int b);
int height(Node *N)
{
if (N == NULL)
return 0;
return N->height;
}
int max(int a, int b)
{
return (a > b)? a : b;
}... | ALGO | 0.99996 | 4.237473 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-07-25T16:10: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": "0ed8a645ac16... |
cde18f5d-3f24-439f-beb2-17ff89e47a49 | KanishAnand/CompetitiveCoding | CodeforcesPractice/855C.cpp | #include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
using namespace std;
// using namespace __gnu_pbds;
#define lli long long int
#define llu unsigned long long int
#define pb push_back
#define rt return 0
#define endln "\n"
#define all(x) x.begin(), x.end()
#def... | ALGO | 0.999983 | 4.52779 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2022-06-13T09:13: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": "aca804e6a1... |
a45d5dd1-78e3-40b4-979e-1c5aea369b6f | fanfank/leetcode | symmetric-tree.cpp | /**
* Definition for binary tree
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
int MAX = 0x7fffffff;
vector<int> v1;
vector<int> v2;
void traverseLeft(TreeNode *root) {
... | ALGO | 0.99996 | 5.847228 | {
"github_metadata": {
"branch": "master",
"commit_count": 75,
"repo_created_at": "2013-11-02T16:32:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 171,
"forks": 95,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6e40ac... |
45ea4e9f-b566-4e7e-8542-76c7e8efaf71 | CGAL/cgal | QP_solver/include/CGAL/QP_solver/functors.h | // Copyright (c) 1997-2007 ETH Zurich (Switzerland).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : <NAME>
// <NAME> <<EMAIL>>
// <NAME>
// ... | ALGO | 0.927482 | 6.786426 | {
"github_metadata": {
"branch": "master",
"commit_count": 113659,
"repo_created_at": "2014-10-01T12:22:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5443,
"forks": 1475,
"issues": 511,
"pull_requests": 136
},
"file_meta": {
"content_id... |
a6cc0862-64fd-411f-94e8-1c799c93c2dd | doishimpeiu/mathematic_algorithm | 2/code4.1.1.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
//入力
long long ax, ay, bx, by, cx, cy;
cin >> ax >> ay >> bx >> by >> cx >> cy;
//ベクトルBA, BC, CA, CBの成分表示を求める
long long BAx = (ax - bx), BAy = (ay - by);
long long BCx = (cx - bx), BCy = (cy - by);
long long CAx = (ax - cx), CAy = (ay - cy);
l... | ALGO | 0.999448 | 4.232689 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2023-08-07T04:50: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": "463c82ac9dc... |
a3f935db-9ef4-4933-9e78-fa8ce3d56fbb | ensony713/Algorithm_Today_I_Learnd | Dynamic Programming/1520.cpp | #include <iostream>
#include <memory.h>
#define MAX 505
using namespace std;
typedef long long num;
num cache[MAX][MAX] = { 0 };
int map[MAX][MAX] = { 0 };
int dx[] = { 0, 0, -1, 1 };
int dy[] = { 1, -1, 0, 0 };
num dfs(int x, int y, int n, int m) {
if (x == n && y == m) {
return 1;
}
if (cache[x][y] != -1) ... | ALGO | 0.999916 | 3.514562 | {
"github_metadata": {
"branch": "main",
"commit_count": 175,
"repo_created_at": "2022-03-13T05:13:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "68505fe47c... |
137a8c13-250d-4f9f-8023-fd903fe8094c | joaoalvesss/feup-aed2 | headers/Graph.h | #ifndef PROJETO_AED_2_GRAPH_H
#define PROJETO_AED_2_GRAPH_H
#include "Airport.h"
#include "Flight.h"
#include <algorithm>
#include <limits>
#include <cctype>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <queue>
#include <set>
class Graph {
struct Edge {
std::string dest; ... | ALGO | 0.998588 | 4.880456 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2022-12-27T10:46: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": "4d786bc8f... |
972be36a-bbaa-4b25-be74-a6ad4e1439f4 | Mxgang/UGR-Fundamentos-de-Programacion-20162017 | Practicas/sesion5/ejercicio22.cpp | /*
Nombre: <NAME>
Grupo: A2
Numero de ejercicio: Ejercicio 22 sesion 5
Descripción del programa: Realizar la funcion gaussiana con condicional while
*/
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
double esperanza, desviacion, minimo, maximo, incremento, resultado_cociente, resultado_... | ALGO | 0.999034 | 3.328531 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-05-18T15:04: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": "21c906215e... |
f84d6bd2-5f76-410f-aa6b-713d6e6fe37c | Delthin/leetcode-solution | leetcode/editor/cn/[2]两数相加.cpp | /**
给你两个 非空 的链表,表示两个非负的整数。它们每位数字都是按照 逆序 的方式存储的,并且每个节点只能存储 一位 数字。
请你将两个数相加,并以相同形式返回一个表示和的链表。
你可以假设除了数字 0 之外,这两个数都不会以 0 开头。
示例 1:
输入:l1 = [2,4,3], l2 = [5,6,4]
输出:[7,0,8]
解释:342 + 465 = 807.
示例 2:
输入:l1 = [0], l2 = [0]
输出:[0]
示例 3:
输入:l1 = [9,9,9,9,9,9,9], l2 = [9,9,9,9]
输出:[8,9,9,9,0,0,0... | ALGO | 0.999991 | 5.893147 | {
"github_metadata": {
"branch": "main",
"commit_count": 95,
"repo_created_at": "2025-02-12T03:52:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "68825ad65fe... |
16feb2ed-7652-4907-ae77-5bb757d97fa3 | Icecubesaad/Uni-shi | DSA/Assignments/Assignment2/task-2/LinkedList.h | #include <iostream>
#include "Node.h"
using namespace std;
template <class T>
class LinkedList {
Node<T>* head;
public:
LinkedList();
void insertAtHead(T);
void insertAtTail(T);
T deleteFromHead();
T deleteFromTail();
static LinkedList reverseList(LinkedList&);
static bool palindrome(LinkedList&);
void displa... | ALGO | 0.995461 | 4.912889 | {
"github_metadata": {
"branch": "master",
"commit_count": 49,
"repo_created_at": "2023-04-27T17:59: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": "b6eb4ef29... |
22390f90-e964-4cb3-83aa-3d12e32187dd | nikhil-x24/DSA_Practics | Day_52-DouteClass13/06-leftView.cpp | #include<iostream>
#include<vector>
#include<queue>
using namespace std;
class Node {
public:
int data;
Node* left;
Node* right;
Node(int d){
data = d;
left = NULL;
right = NULL;
}
};
Node* BuildTree(){
cout <<"Enter a data ";
int data;
cin >> d... | ALGO | 0.999992 | 4.642905 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2023-01-05T12:32: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": "0649ad1d30... |
cf6b0094-797d-4609-bfc1-95380fb6c676 | JeraKrs/acm | codes/CodeForces/Round #224/cf394C.cpp | #include <stdio.h>
#include <string.h>
const int N = 1e3+10;
const int M = 4;
const char sign[M][M] = { "00", "01", "10", "11"};
int n, m, c[M], g[N][N];
void init() {
char str[M];
memset(g, 0, sizeof(g));
memset(c, 0, sizeof(c));
scanf("%d%d", &n, &m);
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j+... | ALGO | 0.999981 | 3.364016 | {
"github_metadata": {
"branch": "master",
"commit_count": 163,
"repo_created_at": "2016-05-23T06:40: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": "5e3619a8... |
d9765b52-9675-4b2b-bf40-523a7809d739 | ulyssesrr/carmen_lcad | src/saliency_search/Robots/Beobot2/Navigation/FOE_Navigation/MiddleTemporal.H | /*!@file Robots2/Beobot2/Navigation/FOE_Navigation/MiddleTemporal.H */
// //////////////////////////////////////////////////////////////////// //
// The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2001 by the //
// University of Southern California (USC) and the iLab at USC. //
// See http://iLab.usc.e... | ALGO | 0.993569 | 6.587605 | {
"github_metadata": {
"branch": "master",
"commit_count": 384,
"repo_created_at": "2015-11-26T15:08:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 15,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8e735ff... |
1e20504a-ba79-4f63-ac33-8a05cdd2bddf | arshadkhan515/DSA-Repo | Lecture065 Binary Tree Interview/kSumPaths.cpp | // { Driver Code Starts
//Initial template for C++
#include <bits/stdc++.h>
using namespace std;
class Solution{
public:
void solve(Node* root, int k, int &count, vector<int> path) {
//base case
if(root == NULL)
return ;
path.push_back(root->data);
//... | ALGO | 0.999748 | 5.886024 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2022-07-06T16:49:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "a663cb5ba... |
0d5083ef-cd3f-4b48-b4f4-efb1e029c37e | Tanzk-max1/myskiplist | main.cpp | // #include <iostream>
// #include <cstdlib>
// #include <cmath>
// #include <cstring>
// #include "skiplist.h"
// #define FILE_PATH "./store/dumpFile"
// int main() {
// // 键值中的key用int型,如果用其他类型,需要自定义比较函数
// // 而且如果修改key的类型,同时需要修改skipList.load_file函数
// SkipList<int, std::string> skipList(6);
// skipList... | ALGO | 0.996969 | 3.588955 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2024-04-17T14:52: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": "7c792063711... |
1cbb084c-aad3-4d08-a31b-e90897c9c694 | andreiva/simple-rssi-antenna-tracker | simple-rssi-antenna-tracker.ino | /*
Simple RSSI Antenna Tracker
RELATIVE
*/
#include <Servo.h>
#include <Timer.h>
/*
* For testing different curves
* All new curves are more precise
* and maintain lock better than old RELATIVE
*
* Uncomment one
*/
//#define EXPONENTIAL // OK
//#define RELATIVE // old, don't use
#def... | ALGO | 0.999357 | 6.065901 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2016-11-06T18:46:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 104,
"forks": 33,
"issues": 6,
"pull_requests": 0
},
"file_meta": {
"content_id": "d28c8c... |
a93ffdcd-6d40-48fb-92d8-6b955e68aa3b | tanish7199/DataStructuresChitkara | Stack/Exp.5-Stack using Array.cpp | #include <iostream>
using namespace std;
class Stack
{
int i,size,A[100],top;
public:
Stack()
{
cout<<"Enter size of stack: ";
cin>>size;
top = -1;
}
bool isempty()
{
if(top==-1)
return true;
else
return false;
}
void push(int value)
{
if(top==size-1)
{
cout<<"Stack Overf... | ALGO | 0.98572 | 3.981066 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2018-10-11T16:21:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "59c4c2ea7f... |
5a32a44c-9f24-422c-a1c2-6dbc532dcf9b | MarcoClaps/Euristics-and-Methaeuristics---Bruno---2024 | Lesson 01/03-Vectors/main.cpp | #include <iostream>
#include <vector>
int main() {
// Creating a vector of integers
std::vector<int> numbers;
// Adding elements to the vector
numbers.push_back(10);
numbers.push_back(20);
numbers.push_back(30);
// Accessing elements using index
std::cout << "Elements in the vector:" ... | ALGO | 0.999199 | 5.792654 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2024-01-17T09:12: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": "1f4bcb372e9... |
a011f4e8-225c-4741-9901-720ac624f00d | Subzero-10/leetcode | .history/135.candy_20200906201029.cpp | /*
* @lc app=leetcode id=135 lang=cpp
*
* [135] Candy
*/
// @lc code=start
class Solution {
public:
int candy(vector<int>& ratings) {
stack<int> s;
int len = ratings.size();
vector<int> left(len);
vector<int> right(len);
int sum = 0;
for (int i = 0; i < (int)ratin... | ALGO | 0.999999 | 6.57477 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2020-08-30T02:51: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": "273b583fe... |
38413008-d837-4823-a9e9-77b6d8ab44d9 | anirvinv/Codeforces | practice/A/icpcnotstupid1575A.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n, m;
cin >> n >> m;
vector<string> arr;
for (int i = 0; i < n; i++)
{
string val;
cin >> val;
arr.push_back(val);
}
for (int i = 0; i < n; i++)
{
for (int j = 1; j < m; j += 2)
{
... | ALGO | 0.999978 | 3.787767 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2021-09-25T20:08:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "988eabd880... |
7292f467-e8dc-48b0-b398-bd240c27cb27 | leanprover/lean3 | src/library/tactic/dsimplify.h | /*
Copyright (c) 2016 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: <NAME>
*/
#pragma once
#include "kernel/expr_maps.h"
#include "library/type_context.h"
#include "library/defeq_canonizer.h"
#include "library/tactic/simp_lemmas.h"
namespace le... | ALGO | 0.976136 | 6.432787 | {
"github_metadata": {
"branch": "master",
"commit_count": 13725,
"repo_created_at": "2013-07-17T00:42:34.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2156,
"forks": 218,
"issues": 58,
"pull_requests": 0
},
"file_meta": {
"content_id": "6... |
fd78c836-ad6e-49cd-9bf1-812bfbe47078 | ESElectric/Multi-Ultrasonic-targeting | Targeting.ino | #include <NewPing.h>
int max_dist_cm = 15;
// Pin definitions for forward sensors
int TP1 = 8;
int EP1 = 9;
// Pin definitions for left sensors
int TP2 = 10;
int EP2 = 11;
// Pin definitions for right sensors
int TP3 = 12;
int EP3 = 13;
NewPing sonar(TP1, EP1);
NewPing lonar(TP2, EP2);
NewPing ronar(TP3, EP3);
v... | TOOL | 0.936941 | 5.161576 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-01-02T23: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": "8bfb911b47c0... |
71e54cdd-6456-4bd7-8837-3d8a844ce171 | sachin-kumarrr/Practise-Programming | Practise question on dsa/array.cpp | #include <iostream>
using namespace std;
int main()
{
#ifndef ONLINE_JUDGE // not a part of code used to beautify the code
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
// int n, arr[n];
// cin >> n;
// for (int i = 0; i < n; i++)
// {
// cin >> ... | ALGO | 0.994384 | 4.06196 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2022-02-10T10:18: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": "c6e2ff7b15... |
b3787666-a68c-49f2-bc0f-d560db1b29bc | aceduce/leetcode-practice | leetcode/p118.cpp | #include"Solutions.h"
//#include"Helper.h"
// Time: O(n^2) : two loops
//
vector<vector<int>> p118::generate_simple(int numRows) {
vector<int> tmp (numRows, 0); // compute array (enough size)
vector<vector<int>> ans;
fill(tmp.begin(), tmp.begin() + 2, 1); // fill right size exclusive
for (int i = 3; i <= numRows; ... | ALGO | 0.999894 | 4.565009 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2019-02-14T21:37: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": "d671b6442... |
d26368d1-9a65-46de-be71-802457cdcc3e | Emmeral/MetroDispositionOptimization | src/builder/graph/headways/track/TrackHeadwayNodeBuilder.cpp |
#include "TrackHeadwayNodeBuilder.h"
#include "model/graph/abstractions/abstract/MultiTrackAbstraction.h"
#include "model/graph/abstractions/abstract/SingleTrackAbstraction.h"
#include "util.h"
namespace fb {
TrackHeadwayNodeBuilder::TrackHeadwayNodeBuilder(graph::AlternativeGraph &graph) : graph_(graph) {}
... | ALGO | 0.968524 | 7.019987 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-06-26T14:32: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": "7d041323549c... |
0bffd20b-d3e2-49d5-9e75-95d6d4d2d525 | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/09/0911/personal_submission/cf314b_tsreaper.cpp | #include <bits/stdc++.h>
#define MAXN 100
using namespace std;
int B, D, n, m;
char s1[MAXN + 5], s2[MAXN + 5];
int f[MAXN + 5][2];
int main() {
scanf("%d%d%s%s", &B, &D, s1, s2);
n = strlen(s1); m = strlen(s2);
int idx = -1, r1 = 1, r2 = 0;
while (true) {
for (int i = 0; i < m; i++) {
... | ALGO | 0.99996 | 3.642755 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "e4df... |
1c3b3aa5-c22f-4622-94e9-a3eb4c691d6e | morris821028/UVa | volume122/12265 - Selling Land.cpp | #include <stdio.h>
#include <stack>
#include <algorithm>
#include <string.h>
#define maxL ((1024*1024)>>5)+1
#define GET(x) (mark[(x)>>5]>>((x)&31)&1)
#define SET(x) (mark[(x)>>5] |= 1<<((x)&31))
using namespace std;
int mark[maxL];
void solve(int n, int h[], int record[]) {
int i, height;
stack< pair<int, int... | ALGO | 0.999597 | 3.193748 | {
"github_metadata": {
"branch": "master",
"commit_count": 1197,
"repo_created_at": "2013-06-14T12:34:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 571,
"forks": 269,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "47a... |
fe4a0c9c-58cf-446d-8308-f423a9d11ee1 | lytruongsinh123/Grid_Generate | chialuoidon.cpp | #include <iostream>
#include <fstream>
#include <cmath>
using namespace std;
int Nx, Ny;
double eta, d_eta, p, q, d_y, alpha, xi, d_xi, H, L;
double x[100][100], y[100][100];
double eta_0;
//Chia luoi bien tren va duoi
void boudary_layer() {
//delta_xi va delta_eta
d_xi = (double)1/(Nx - 1);
d_eta = (double)1/(Ny... | ALGO | 0.990589 | 3.344807 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-07-04T16:31:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "da9b94341b17... |
20532efe-6799-4b55-881e-ee6913d7778c | leizhipeng/operating_system | ReaderWriter/main.cpp | #include <iostream>
#include <mutex>
#include <condition_variable>
#include <thread>
#include <vector>
#include <chrono>
#include <random>
constexpr int num_readers = 5;
constexpr int num_writers = 5;
constexpr int X = 5;
std::mutex mtx;
std::condition_variable cv;
int shared_variable = 0;
int active_readers = 0;
int... | ALGO | 0.998999 | 6.062822 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2023-03-16T02:27:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb85cedaf3f8... |
f95619c1-b187-4426-8dfa-729f0a1222da | nguyenhuuniem12022005/DICRETE_MATH_2_PTIT | tplt_bfs.cpp | #include <bits/stdc++.h>
using namespace std;
bool visited[100];
int n;
int TPLT_bfs(int a[100][100]) {
int count = 0;
for (int i = 1; i <= n; i++) {
if (!visited[i]) {
count++;
queue<int> q;
q.push(i);
visited[i] = true;
while (!q.empty()) {... | ALGO | 0.99998 | 5.461913 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2025-06-22T16:46: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": "b580e3edefa... |
982d0ed8-9fd5-4c3d-ad75-1e74c044125c | reddy-lab-code-research/MuST-CoST | data/transcoder_evaluation_gfg/cpp/DECIMAL_REPRESENTATION_GIVEN_BINARY_STRING_DIVISIBLE_10_NOT.cpp | // Copyright (c) 2019-present, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
//
#include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include <fstream>
#include <iomanip>
#include... | ALGO | 0.996841 | 5.139685 | {
"github_metadata": {
"branch": "main",
"commit_count": 30,
"repo_created_at": "2022-02-08T19:28:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11,
"forks": 5,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "62750d880cc... |
575f5641-01d3-47a2-a8a6-93ae8fbe7600 | yyppsk/LeetCode | December 2024/2593FindScoreofanArrayAfterMarkingAllElements.cpp | #include <bits/bits-stdc++.h>
using namespace std;
long long findScore2(vector<int> &nums)
{
int n = nums.size();
int marked[1000000] = {0};
priority_queue<pair<int, int>, vector<pair<int, int>>,
greater<pair<int, int>>>
pq;
for (int i = 0; i < nums.size(); i++)
{
... | ALGO | 0.999992 | 4.376884 | {
"github_metadata": {
"branch": "master",
"commit_count": 759,
"repo_created_at": "2022-09-25T17:53:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "76b3cd48... |
9bec2c39-7bf9-4177-85f9-9f5faf10e2b0 | dbdbais/Solved_Problem_Storage | SWEA/D2/12712. 파리퇴치3/파리퇴치3.cpp | //
// Created by newbi on 2024-01-05.
//
#include<iostream>
using namespace std;
int T,N,M,ans;
int arr[17][17];
int dx[] = {0,0,-1,1};
int dy[] = {1,-1,0,0};
int bx[] = {1,1,-1,-1};
int by[] = {1,-1,1,-1};
void fastIO(){
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
}
bool out(int x,int y... | ALGO | 0.999918 | 5.726108 | {
"github_metadata": {
"branch": "main",
"commit_count": 666,
"repo_created_at": "2023-10-29T07:08: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": "3790a00e3e... |
0b6d9e49-e71b-4cd9-819a-879931473041 | Byrom90/XeUnshackle | Common/AtgNuiJointFilter.h | //--------------------------------------------------------------------------------------
// AtgNuiJointFilter.h
//
// This file contains various filters for filtering Joints
//
// Microsoft Game Technology Group.
// Copyright (C) Microsoft Corporation. All rights reserved.
//--------------------------------------------... | ALGO | 0.909104 | 6.30296 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2025-03-28T11:58:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 191,
"forks": 14,
"issues": 23,
"pull_requests": 3
},
"file_meta": {
"content_id": "dbea01ee... |
2a678767-0de8-4ff7-aa45-a7b0cd9a3de5 | akcho/CTCI | QuickSort.cpp | #include <iostream>
using namespace std;
/* Function to print an array */
void PrintArray(int arr[], int size) {
int i;
for (i = 0; i < size; i++) cout << arr[i] << " ";
cout << endl;
}
int Partition (int arr[], int left, int right) {
int pivot = arr[left + (right - left) / 2]; // arbitrary pivot p... | ALGO | 0.999988 | 5.838859 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2020-05-07T17:37:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f73461684... |
5286ac19-5894-4cfe-b267-bfdfb718ac89 | austenjs/kattis | Bus Numbers/busnumbers.cpp | #include <iostream>
#include <cstdlib>
#include <stack>
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include<cmath>
#include <math.h>
using namespace std;
int main() {
int busses; cin >> busses;
vector<int> park;
for (int i = 0; i < busses; i++) {
int bus; cin >> bus... | ALGO | 0.999962 | 4.54398 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-10-07T18:40: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": "ba2567fae4f4... |
1c210834-d1dd-49dd-8e12-a9286332ae06 | mathpaul3/Algorithm-Problem-Solving | baekjoon/cpp/9328.cpp | #include <iostream>
#include <queue>
using namespace std;
int T, h, w, dy[4]={0,0,-1,1}, dx[4]={-1,1,0,0};
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
cin >> T;
while (T--) {
int cnt=0;
char map[100][100]={0,};
bool visited[100][100]={0,}, key[2... | ALGO | 0.999721 | 3.674317 | {
"github_metadata": {
"branch": "master",
"commit_count": 478,
"repo_created_at": "2023-01-02T16:46:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "df709465... |
5e2cb3f4-1bb0-46c2-ab23-77180d9cf44d | aryan-gupta/TicTacToe | main.cpp | /*
* Copyright (c) 2017 The Gupta Empire - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
*
* Written by <NAME> <<EMAIL>>
*
* =============================================================================
* @author <NAME>
* @pro... | TOOL | 0.960374 | 4.736494 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2017-04-07T01:46: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": "c11491cedc... |
cd5c070b-0cc4-465e-9765-ddbc9560a3fe | EricLu1218/Advanced_Logic_Synthesis | Technology_Mapping/include/LEDA/incl/LEDA/core/b_prio.h | /*******************************************************************************
+
+ LEDA 5.2
+
+
+ b_prio.h
+
+
+ Copyright (c) 1995-2007
+ by Algorithmic Solutions Software GmbH
+ All rights reserved.
+
*******************************************************************************/
// $Revision: 1.3 $ $Dat... | ALGO | 0.996413 | 5.096014 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2022-06-16T16:40:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "57871e7d3f9... |
20e5d60b-a824-4bf0-b803-420d889b6a5c | apple/turicreate | src/core/storage/sframe_data/groupby.cpp | /* Copyright © 2017 Apple Inc. All rights reserved.
*
* Use of this source code is governed by a BSD-3-clause license that can
* be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
*/
#include<core/storage/sframe_data/groupby.hpp>
#include<core/storage/sframe_data/sarray_reader_buffe... | ALGO | 0.983442 | 6.422505 | {
"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": "... |
068ca3a2-be30-4787-ace4-3e4dc17b05c6 | al-pacino/Clustering | src/main.cpp | #include <cassert>
#include <mutex>
#include <limits>
#include <vector>
#include <string>
#include <thread>
#include <fstream>
#include <iostream>
#include <exception>
#include <algorithm>
#include <unordered_map>
#include <condition_variable>
using namespace std;
#include <MpiSupport.h>
#include <Vector2d.h>
#includ... | ALGO | 0.999631 | 5.59515 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2016-10-15T14:01:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b25a3703d... |
d93cafcb-c1dc-44e7-8fc6-3a76924ef2b5 | LucasProcopio/code-forces-challanges | #promotioncounting.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define repe(i, a, n) for (int i = a; i <= n; i++)
#define repi(i, a, n) for (int i = a; i > n; i--)
#define repie(i, a, n) for (int i = a; i >= n; i--)
#define pb push_back
typedef vector<int> VI;
//header
int main()
{
... | ALGO | 0.999085 | 3.921937 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2020-04-03T10:29: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": "afceaa1ce... |
66241abb-2605-4972-b5ab-6c65184fe89f | dickynovanto1103/CP | Online Judges/AtCoder/Regular Contest 104/c.cpp | #include <bits/stdc++.h>
using namespace std;
#define inf 1000000000
#define unvisited -1
#define visited 1
#define eps 1e-9
#define mp make_pair
#define pb push_back
#define pi acos(-1.0)
#define uint64 unsigned long long
#define FastSlowInput ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define d... | ALGO | 0.999989 | 3.461274 | {
"github_metadata": {
"branch": "master",
"commit_count": 212,
"repo_created_at": "2018-08-22T06:40:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "01fc847c... |
fdc46926-a1f5-412a-80c9-5c6fc0729c8d | Kyle549/MEng_Project | UserStoryElicitation/Code_Snippets/51-60/s803012624.cpp | #include <iostream>
#include <sstream>
#include <string>
#include <cmath>
#include <cstdio>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <functional>
#include <numeric>
using namespace std;
typedef unsigned int uint;
typedef long long ll;
typedef unsig... | ALGO | 0.999868 | 4.604487 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-05-22T06:40:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "55586eb21659... |
0d2b509c-63c1-4aef-92c8-ff3d48ebe07e | martkjoh/Sipipi | LinAlg/Matrix.cpp | #include "Matrix.h"
Matrix::Matrix(Shape s, float fill) : s{s}, data{new float[s.n * s.m]}
{
for (int i = 0; i < size(); i++) {data[i] = fill;}
}
Matrix::Matrix(int m, int n, float fill) : Matrix{Shape{m, n}, fill} {}
Matrix::Matrix(int m, int n, float* data) : s{m, n} {swap(this->data, data);}
Matrix::Matrix()... | ALGO | 0.985988 | 4.739593 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2019-02-26T20:38: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": "29a00490f5... |
8cbfe475-87f4-4a0f-94bd-f4c7706fa721 | yashunhawane/Praticals | DS PRACTICAL/DS 1 - Sorting/SelectionSort.cpp | #include <iostream>
#include <string>
using namespace std;
//Implementation of SelectionSort
void selectionSort(int arr[],int size)
{
int n = size;
// One by one move boundary of unsorted subarray
for (int i = 0; i < n-1; i++)
{
// Find the minimum element in unsorted array
int min_idx = i;
... | ALGO | 0.999733 | 4.841683 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2023-02-16T10:09:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "0300ef3da9f... |
5bcf4f45-27c2-4c83-8b5f-f2f6b3633138 | adamap/code-test2 | 300longestincreasingsubsequence.cpp | //Given an unsorted array of integers, find the length of longest increasing subsequence.
//
//For example,
// Given [10, 9, 2, 5, 3, 7, 101, 18],
// The longest increasing subsequence is [2, 3, 7, 101], therefore the length is 4. Note that there may be more than one LIS combination, it is only necessary for you to r... | ALGO | 0.999928 | 5.733061 | {
"github_metadata": {
"branch": "master",
"commit_count": 259,
"repo_created_at": "2016-02-11T08:40: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": "0ecb09fa... |
ae09c59f-e418-4ef1-976b-de5a253896f0 | Kaustubh1504/Striver-s-A2Z-DSA-Sheet | strings/13. Roman to Integer.cpp | class Solution {
public:
int romanToInt(string s) {
// int ans=0;
// for(int i=s.length()-1;i>0;i--){
// if(s[i]=='I'){
// ans+=1;
// }else if(s[i]=='V'){
// if(s[i-1]=="I"){
// ans+=4;
// }else{
// ... | ALGO | 0.999892 | 5.436582 | {
"github_metadata": {
"branch": "main",
"commit_count": 213,
"repo_created_at": "2023-03-02T05:15: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": "9c88128fc4... |
34b52b9b-de8f-49dc-bf0f-788b4ff868b2 | Hrithik200/DSA--c--- | programs/v44.cpp | /*
Lecture 44: Linked List & its types - Singly, Doubly, Circular etc.
Linked List: Collection of nodes where each node contains data and a reference to the next node
Types of LL
Covered in this video
Singly Linked List: Each node has data and a reference to the next node
Doubly Linked List: Each node has data and... | ALGO | 0.997269 | 3.619588 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-05-17T20:04:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a528eae210db... |
f7f6d573-8b9f-4802-9138-253233ea50a8 | DuyTaDinh/Code.ptit.TaDuy | C++/CPPRAN08.cpp | #include <bits/stdc++.h>
using namespace std;
int findMaxAverage(int arr[], int n, int k)
{
int *csum = new int[n];
csum[0] = arr[0];
for (int i=1; i<n; i++)
csum[i] = csum[i-1] + arr[i];
int max_sum = csum[k-1], max_end = k-1;
for (int i=k; i<n; i++)
{
int curr_sum = csu... | ALGO | 0.999973 | 4.975129 | {
"github_metadata": {
"branch": "main",
"commit_count": 44,
"repo_created_at": "2020-11-22T15:51:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 16,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fe11d4ea4c... |
0e4bee55-c66c-46ea-8835-89d719b74221 | secrary/Andromeda | Andromeda/APK.hpp | #pragma once
#include "utils.hpp"
#include "dex.hpp"
#include "manifest.hpp"
#include "cert.hpp"
#include "patterns.hpp"
#include "digestpp/digestpp.hpp"
namespace andromeda
{
class apk
{
public:
bool is_valid = false;
std::shared_ptr<manifest> app_manifest;
std::shared_ptr<andromeda::certificate> cert;
... | TOOL | 0.947203 | 5.702097 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2019-09-22T15:30:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 709,
"forks": 74,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "759b4e... |
2b0b9463-3a9d-445a-b2dd-0f1bdd0b881f | SrujanMuralidhar/DSA | DataStructures/Doubly_LinkeList.cpp | #include<iostream>
using namespace std;
class Node{
public:
int data;
Node* prev;Node* next;
Node(){
data = 0;
prev = next = NULL;
}
Node(int x){
data = x;
prev = next = NULL;
}
};
class LinkedList{
Node* head ,*last;
public:
LinkedList(){
head... | ALGO | 0.998936 | 4.115181 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-05-27T12:29: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": "9a7274bbba05... |
8772ebd7-4f69-4e19-93c5-c80d37271563 | JoeConley/openglfun | Ray Tracer/Samplers/Sampler.cpp | /*
* Sampler.cpp
* Ray Tracer
*
* Created by NoEvilPeople on 9/13/08.
* Copyright 2008 <EMAIL>. All rights reserved.
*
*/
#include "Sampler.h"
#include "Point3D.h"
#include <algorithm>
Sampler::Sampler(void)
: num_samples(1),
num_sets(83),
count(0),
jump(0) {
samples.reserve(num_samples * num_se... | ALGO | 0.938283 | 5.557821 | {
"github_metadata": {
"branch": "master",
"commit_count": 113,
"repo_created_at": "2015-03-25T12:40:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "a2c68cd6... |
fdddfc31-b25e-45d7-a1f8-35efe86be61f | VitaliiMishin/search_engine | src/searchServer.cpp | #include "searchServer.h"
std::vector<std::vector<RelativeIndex>> SearchServer::search(const std::vector<std::string>& queriesInput, int responsesLimit) {
std::vector<std::vector<RelativeIndex>> result(queriesInput.size());
int docsCount = _index.docs.size();
std::string request;
for(int i = 0; i < qu... | WEB | 0.99942 | 5.444154 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2023-12-10T21:11: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": "59c399ff2... |
bdf21a6b-90e8-4b47-8c6e-265dd3eb0e4c | erwincoumans/experiments | dynamics/corotational_fem/OpenTissue/core/containers/grid/util/grid_value_at_point.h | #ifndef OPENTISSUE_CORE_CONTAINERS_GRID_UTIL_GRID_VALUE_AT_POINT_H
#define OPENTISSUE_CORE_CONTAINERS_GRID_UTIL_GRID_VALUE_AT_POINT_H
//
// OpenTissue Template Library
// - A generic toolbox for physics-based modeling and simulation.
// Copyright (C) 2008 Department of Computer Science, University of Copenhagen.
//
// ... | ALGO | 0.992807 | 6.382231 | {
"github_metadata": {
"branch": "master",
"commit_count": 443,
"repo_created_at": "2011-05-31T01:15:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 132,
"forks": 26,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "71cb0... |
883c4ce9-f99a-4772-b2b6-aaaadbc74b6d | dongree/Baekjoon-Algorithm | c++/9252.cpp | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int dp[1001][1001];
int main() {
freopen("example.txt", "r", stdin);
string s1, s2;
cin >> s1 >> s2;
int n = s1.length();
int m = s2.length();
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
if (s1[... | ALGO | 0.999995 | 4.264583 | {
"github_metadata": {
"branch": "main",
"commit_count": 616,
"repo_created_at": "2021-01-09T01:32: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": "7b87914023... |
0f03f970-b619-4aeb-8805-9d975df90f81 | pszertlek/LeetCode | CPlusCode/CPlusCode/main.cpp | //
// main.cpp
// CPlusCode
//
// Created by apple on 2018/9/3.
// Copyright © 2018年 Pszertlek. All rights reserved.
//
#include <iostream>
#include <math.h>
#include <vector>
struct ListNode {
public: ListNode *next;
};
class Solution {
public:
ListNode *getIntersectionNode(ListNode *headA, ListNode *headB)... | ALGO | 0.999068 | 3.155174 | {
"github_metadata": {
"branch": "master",
"commit_count": 83,
"repo_created_at": "2017-11-27T07:14: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": "5bfb30791... |
c208bab4-9510-4e7f-ab01-3ae353c7a700 | MysteryArc/algorhithm_review | 最大子数组.cpp | /*
* @FileName : 最大子数组.cpp
* @Author : WangHengyu [<EMAIL>]
* @CreateTime : 2024/01/03 13:15:25
* 动态规划法
*/
#include <iostream>
#include <cmath>
#include <vector>
using namespace std;
int maxSubarray(vector<int> nums)
{
int size = nums.size();
int res = 0, sum[size] = {0};
sum[0] = nums[0], res =... | ALGO | 0.999981 | 4.747697 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2024-01-03T10:21: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": "5750ec851396... |
7026d684-4a9d-430b-951d-50dfaf729308 | ermine27/atcoder | joi2012yo/joi2012yo-d.cpp | #include <bits/stdc++.h>
using namespace std;
#define reps(i,s,n) for(int i = (int)(s); i < (int)(n); ++i)
#define rep(i,n) reps(i,0,n)
#define repf(i,n) reps(i,1,n+1)
using ll = long long;
using vi = vector<int>;
using vl = vector<long long>;
using vvi = vector<vi>;
using vvl = vector<vl>;
using mii = map<int,int>;
... | ALGO | 0.999969 | 4.171708 | {
"github_metadata": {
"branch": "main",
"commit_count": 124,
"repo_created_at": "2022-05-16T12:56:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "a98d223bd5... |
4116448f-f9e5-48a2-9ea7-b3b17b93bb73 | DennisZY/ACM-code | CodeForces/gym/102059/A.cpp | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#i... | ALGO | 0.999939 | 4.196784 | {
"github_metadata": {
"branch": "master",
"commit_count": 52,
"repo_created_at": "2019-08-02T05:51: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": "54113a293... |
0dae18b4-2efc-4922-9fd9-a98464bc2306 | DrSwad/CompetitiveProgrammingArchive | codeforces/1312/D.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define x first
#define y second
#ifdef LOCAL
#include "debug.h"
#endif
const int N = int(2e5) + 10;
const int MOD = 998244353;
int n, m;
int inv[N];
int fact[N];
int ifact[N];
int p2;
int nCr(int n, int r) {
if (n < ... | ALGO | 0.999974 | 4.731701 | {
"github_metadata": {
"branch": "master",
"commit_count": 161,
"repo_created_at": "2020-12-22T03:50:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "17ee3d59... |
36a3dde4-9465-4176-9d02-bfa82c7613b5 | KartikSindura/cp-solutions | B/445B.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define lp(i, n) for (int i = 0; i < n; i++)
#define lps(start, n) for (int i = start; i <= n; i++)
void dfs(int start, vector<bool> &visited, vector<vector<int>> &adj) {
visited[start] = true;
for (auto &val : adj[start]) {
if (!visited[val])... | ALGO | 0.999963 | 3.992655 | {
"github_metadata": {
"branch": "main",
"commit_count": 66,
"repo_created_at": "2023-06-15T17:41: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": "66ce7f3ce0d... |
b51165d6-6e4b-44e6-9a76-fc5d4ea900f4 | Kawser-nerd/CLCDSA | Source Codes/AtCoder/arc073/B/4593002.cpp | #include <cstdio>
#include <cstdint>
#include <vector>
#include <algorithm>
int main() {
size_t N;
intmax_t W;
scanf("%zu %jd", &N, &W);
std::vector<std::vector<intmax_t>> v(4);
intmax_t w1;
{
intmax_t v1;
scanf("%jd %jd", &w1, &v1);
v[0].push_back(v1);
}
for (size_t i = 1; i < N; ++i) {
... | ALGO | 0.999963 | 3.833511 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-09-30T05:38:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 22,
"forks": 8,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "c61f140b... |
5c7164a0-bbbc-486f-b3e3-e8aa50d9f0d9 | jswigart/omni-bot | Omnibot/dependencies/WildMagic5/LibMathematics/Intersection/Wm5IntrEllipse2Ellipse2.cpp | // Geometric Tools, LLC
// Copyright (c) 1998-2012
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
//
// File Version: 5.0.3 (2012/07/08)
#include "Wm5MathematicsPCH.h"
#include "Wm5IntrEllipse2Ellipse2... | ALGO | 0.999124 | 6.749134 | {
"github_metadata": {
"branch": "master",
"commit_count": 940,
"repo_created_at": "2015-03-15T01:21:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 80,
"forks": 23,
"issues": 5,
"pull_requests": 0
},
"file_meta": {
"content_id": "d138df... |
2000af47-77ec-4076-ba3a-b67493b00c27 | yuta1402/atcoder | abc/abc102/c.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <limits>
using namespace std;
using ll = long long;
int N;
ll func(const vector<ll>& a, ll b)
{
ll res = 0;
for(int i = 0; i < N; ++i) {
res += abs(a[i] - b);
}
return res;
}
int main()
{
cin >> N;
... | ALGO | 0.999867 | 4.610601 | {
"github_metadata": {
"branch": "master",
"commit_count": 31,
"repo_created_at": "2018-06-21T05:56:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "80e28ae32... |
48b0684a-fb35-4cad-800a-634dbe496915 | Hueber9500/codility | main.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int solution(vector<int> &T);
bool isVisited[100002];
bool is_neighbour(pair<int, int> c1, pair<int,int> c2)
{
return (abs(c1.first - c2.first) + abs(c1.second - c2.second) ) <= 1;
}
#define MAX_ROW 3
#define MAX_COL 3
vector<pair<... | ALGO | 0.999983 | 4.146718 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-08-20T13: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": "4212a8cf36... |
67c86e34-1329-407e-b63a-19e77177aba5 | polarr/competitive-programming | CSES/Mathematics/2210.cpp | /**
* Solution by 1egend (polarity.sh)
* Date: 2025-01-21
* Contest: CSES Problemset
* Problem: 2210
**/
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ull unsigned long long
#define ll long long
const int MAX_N = 1e5 + 1;
const ll MOD = 1e9 + 7;
/** ALGORITHM: Modular Exponentiation... | ALGO | 0.999923 | 4.211945 | {
"github_metadata": {
"branch": "main",
"commit_count": 241,
"repo_created_at": "2020-12-16T18:38:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2a3e6fb6af... |
9410829f-aabd-4217-9148-fed0c84662dd | PhamLeAnhThuy/DSA-LAB6 | Part8_11.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <cmath>
#include <unordered_map>
#include <algorithm>
using namespace std;
class Graph {
private:
int vertices;
vector<vector<int>> adjList;
vector<vector<pair<int, double>>> weightedGraph;
public:
Graph(int v) {
vertices = v;
... | ALGO | 0.999818 | 5.747444 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-01-02T14:47: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": "614c83b7322e... |
d97facbf-573f-41fb-9423-9809cef86644 | Pulkitbarala/gfg_self_paced_answers | Searching/Roof Top.cpp | class Solution
{
public:
int maxStep(int A[], int N)
{
int maxSteps = 0;
int currSteps = 0;
for (int i = 0; i < N - 1; i++) {
if (A[i] < A[i + 1]) {
currSteps++;
maxSteps = max(maxSteps, currSteps);
} else {
currSteps = 0;
}
}
... | ALGO | 0.999986 | 5.403648 | {
"github_metadata": {
"branch": "main",
"commit_count": 96,
"repo_created_at": "2024-05-14T13:47:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eef9b25654d... |
f5e9b376-f21f-4f3e-9246-21a0422deb7f | karmenkokoko/Leetcode | Aim_Offer/Offer007.cpp | #include <bits/stdc++.h>
// 105. 从前序与中序遍历序列构造二叉树
// 给定两个整数数组 preorder 和 inorder ,其中 preorder 是二叉树的先序遍历,
// inorder 是同一棵树的中序遍历,请构造二叉树并返回其根节点。
using namespace std;
class Solution {
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
... | ALGO | 0.999982 | 6.462445 | {
"github_metadata": {
"branch": "main",
"commit_count": 49,
"repo_created_at": "2021-08-04T00:58: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": "d18588f0c54... |
bf57a9e4-88c8-4146-8728-d63b1f01e430 | abbsgng/PMShulzhykDzmitry | 1course1semester/18.12 Shulzhyk Dzmitry/Task3(on the lesson).cpp | #include <iostream>
using namespace std;
int getLength(const char*);
bool isDigit(const char);
void reverseNumber(int&);
//etc
int parseStringToSumWithUnsigned(const char*);
int parseStringToSumWithSigned(const char*);
void parseStringToSumWithUnsignedTest();
void parseStringToSumWithSignedTest();
int numberOfDigits(... | ALGO | 0.975756 | 4.164728 | {
"github_metadata": {
"branch": "master",
"commit_count": 378,
"repo_created_at": "2019-09-21T13:16:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8eba4d01... |
02c488fe-97ec-4efd-9e22-a175650d8db6 | bikash451/DAA | Coinchange.cpp | #include <iostream>
using namespace std;
int countWays(int coins[], int n, int s) {
int dp[n + 1][s + 1];
for (int i = 0; i <= n; i++)
dp[i][0] = 1;
for (int j = 1; j <= s; j++)
dp[0][j] = 0;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= s; j++) {
dp[i][j] = dp... | ALGO | 0.99966 | 5.537289 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-05-05T17:40:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0a215026aa2d... |
b559fb38-fd74-4421-aa85-577c29c933c6 | shadyyd/shadyyd | Dungeon_Game.cpp | const int MAX = 200 + 1;
int memory[MAX][MAX];
vector<vector<int>> matrix;
const int OO = 1e8;
// This function calculates the minimum health required to traverse from (r, c) to the bottom-right corner
int minHealth(int r, int c) {
int rows = matrix.size(), cols = matrix[0].size();
if (r >= rows || c >= cols) // Ch... | ALGO | 0.999844 | 5.746063 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-12-07T16:19: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": "40f73a0a66d1... |
9b97b39c-d369-49ad-a009-7999c3f25aab | graphcore/popart | willow/src/op/reducemedian.cpp | // Copyright (c) 2021 Graphcore Ltd. All rights reserved.
#include <algorithm>
#include <cstdint>
#include <memory>
#include <string>
#include <vector>
#include <popart/op/reducemedian.hpp>
#include <popart/opmanager.hpp>
#include "popart/attributes.hpp"
#include "popart/datatype.hpp"
#include "popart/graphcoreoperato... | TOOL | 0.979588 | 7.528834 | {
"github_metadata": {
"branch": "sdk-release-3.4",
"commit_count": 4984,
"repo_created_at": "2020-07-01T15:21:50.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 7,
"forks": 5,
"issues": 2,
"pull_requests": 3
},
"file_meta": {
"content_id": ... |
fccfb4f0-e227-4292-942d-19ae4f697774 | Darumak13/Praticas-em-C- | Lista 5/Lista5_ex9.cpp | #include <iostream>
#include <math.h>
#include <locale>
using namespace std;
// Crie um programa que peça ao usuário para responder a uma pergunta com "sim" ou "não".
// Crie uma variável lógica para verificar se a resposta foi "sim".
int main(){
// Variaveis
string resp;
bool verificaResp;
setlocale(LC_CTYP... | ALGO | 0.923265 | 3.971507 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-03-01T17:37: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": "db55fbb67ebb... |
345f52c4-c4be-4128-a475-7f35675d70a2 | jackkimmins/Alpha-Digit | include/NeuralNetwork.h | #ifndef NEURALNETWORK_H
#define NEURALNETWORK_H
#include <vector>
#include <string>
#include <utility>
#include "Database.h"
class NeuralNetwork {
public:
// Constructor sets up the architecture and initialises weights
NeuralNetwork(int input_size, const std::vector<int>& hidden_layers_sizes, int output_size,... | ALGO | 0.934378 | 7.138991 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2024-11-09T19:45: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": "a4fc6cfcbad... |
c3724688-5912-40e8-b64d-93b69a803175 | kisupov/grns | tests/3rdparty/campary/Singles/src_gpu/Specs/specMultiplication.h | /*
* specMultiplication.h
*
* This file is part of CAMPARY Library
*
* Copyright (C) 2014 -
*
* CAMPARY Library is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* ... | DATA | 0.991919 | 5.07735 | {
"github_metadata": {
"branch": "master",
"commit_count": 51,
"repo_created_at": "2020-02-12T11:48:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b0480c97... |
5816b606-bd15-414d-8495-1391b22f43d4 | joeguinness/GpGp | src/covmatrix_funs.h | #ifndef ARMACOVMATRIX_FUNS_H
#define ARMACOVMATRIX_FUNS_H
#include <RcppArmadillo.h>
#include <iostream>
#include <vector>
// covariance functions
#include "covmatrix_funs_01.h"
#include "covmatrix_funs_02.h"
#include "covmatrix_funs_03.h"
#include "covmatrix_funs_04.h"
#include "covmatrix_funs_05.h"
#include "covmat... | ALGO | 0.950305 | 6.231346 | {
"github_metadata": {
"branch": "master",
"commit_count": 227,
"repo_created_at": "2018-01-22T19:45:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "54c9e28... |
aab901f6-8b55-4dc6-8a91-607558d3d853 | plstcharles/litiv | modules/video/include/litiv/video/BackgroundSubtractorPBAS.hpp |
// This file is part of the LITIV framework; visit the original repository at
// https://github.com/plstcharles/litiv for more information.
//
// Copyright 2015 <NAME>; pierre-luc.st-charles<at>polymtl.ca
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compl... | ALGO | 0.975941 | 6.629098 | {
"github_metadata": {
"branch": "master",
"commit_count": 1682,
"repo_created_at": "2015-09-13T01:30:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 104,
"forks": 31,
"issues": 5,
"pull_requests": 1
},
"file_meta": {
"content_id": "6823... |
02096363-0d06-4c88-a54b-47b16f89c2fa | AshutoshKumarPatel/100DaysWithCpp | Day97/diameter-of-binary-tree.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
TreeNode(int x, TreeNode *left, TreeNode *... | ALGO | 0.999935 | 6.160857 | {
"github_metadata": {
"branch": "master",
"commit_count": 102,
"repo_created_at": "2023-11-20T19:06:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "34e7fed6... |
8ba365d2-0cb6-4e32-b7d3-39b3f21830df | rdkit/rdkit | Code/GraphMol/Descriptors/Lipinski.cpp | //
// Copyright (C) 2011-2013 <NAME>
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <GraphMol/RDKitBase.h>
#include <GraphMol/M... | ALGO | 0.972884 | 5.500031 | {
"github_metadata": {
"branch": "master",
"commit_count": 8182,
"repo_created_at": "2013-05-12T06:19:15.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3003,
"forks": 931,
"issues": 110,
"pull_requests": 25
},
"file_meta": {
"content_id": "... |
103f9611-8fbe-4807-bd5e-e5cffb0c01b9 | Ayush7614/Daily-Coding-DS-ALGO-Practice | Leetcode/C++/binary_tree_from_preorder_and_inorder.cpp | //--Construct Binary Tree from inorder and preorder traversals--//
/*
Problem link is:https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
*/
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* Tre... | ALGO | 0.999988 | 6.741714 | {
"github_metadata": {
"branch": "main",
"commit_count": 2968,
"repo_created_at": "2020-12-28T05:34:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 322,
"forks": 474,
"issues": 335,
"pull_requests": 20
},
"file_meta": {
"content_id": "22... |
1cdbd2e6-95fd-4701-8f53-7ec100260766 | JoshNavarro512/cpp-class-projects | Lab 1/Navarro_Lab1.22.cpp | // This program calculates how many slices a pizza can be
// divided into based on the size given by the user
#include <iostream>
#include <cmath>
using namespace std;
// Declare contants
const float SLICE_AREA = 14.125, PI = 3.14;
main ()
{
// Declare variables
double diameter, radius, pizza_area, num_sl... | ALGO | 0.99594 | 5.678724 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-07-04T20:07: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": "9a56863b1a... |
33f51d03-f7e3-4f7d-bb57-e1174904802c | bradelement/coding_exercise | zoj/matching/1364_hungary.cpp | #include "cstdio"
#include "cstring"
#include "vector"
#include "string"
using namespace std;
const int MAXN = 200;
vector<int> g[MAXN];
int from[MAXN], used[MAXN];
int n1;
bool match(int x)
{
for (int i=0; i<g[x].size(); i++) {
if (!used[g[x][i]]) {
used[g[x][i]] = 1;
if (from[g[x... | ALGO | 0.999981 | 3.860606 | {
"github_metadata": {
"branch": "master",
"commit_count": 214,
"repo_created_at": "2014-03-11T14:19: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": "7bebe052... |
92ba4d84-7ca9-4478-b459-1b63429b54f5 | evenvalue/codeforces | 894B.cpp | #include <bits/stdc++.h>
using namespace std;
#ifdef evenvalue
#include "debug.h"
#define debug(...) print(#__VA_ARGS__, __VA_ARGS__)
#else
#define debug(...)
#endif
using int64 = long long;
using ld = long double;
template<typename T>
using min_heap = priority_queue<T, vector<T>, greater<T>>;
template<typenam... | ALGO | 0.999982 | 4.377969 | {
"github_metadata": {
"branch": "master",
"commit_count": 555,
"repo_created_at": "2021-02-27T15:51:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3b2b0443... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.