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 |
|---|---|---|---|---|---|---|---|
92455635-cd49-4a6e-80f6-fa0ccf60e40c | Krishna-mudgal/LeetCode | lc_1267_count_servers_that_communicate.cpp | #include <bits/stdc++.h>
using namespace std;
// https://leetcode.com/problems/count-servers-that-communicate/description/?envType=daily-question&envId=2025-01-23
class Solution {
public:
int countServers(vector<vector<int>>& grid) {
int m = grid.size(), n = grid[0].size();
vector<int> row, col;
... | ALGO | 0.99996 | 5.880126 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2025-05-15T04:34: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": "c5c37c157... |
7549acf4-4d28-4c20-abbf-78d2ef2a50b3 | nideez45/leetcode | 0947-most-stones-removed-with-same-row-or-column/0947-most-stones-removed-with-same-row-or-column.cpp | class Solution {
public:
int parent[1005];
int sz[1005];
void makeset(int v){
parent[v] = v;
sz[v] = 1;
}
int find(int v){
if(parent[v] == v) return v;
return parent[v] = find(parent[v]);
}
void Union(int a,int b){
a = find(a);
... | ALGO | 0.99939 | 5.186529 | {
"github_metadata": {
"branch": "main",
"commit_count": 760,
"repo_created_at": "2022-07-31T02:20: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": "85140f0bc8... |
31e9ce94-ac2c-4414-a2bd-05c53ae825b8 | nayemislamzr/Data-Structures | quick_sort/quick_sort.cpp | #include <iostream>
#define sz 1000
int partition(int arr[],int left ,int right)
{
bool r = true;
while(left < right)
{
if(arr[left] > arr[right])
{
std::swap(arr[left],arr[right]);
r^=1;
}
if(r)
right--;
else
... | ALGO | 0.999949 | 5.55722 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2021-02-08T19:46:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cd267f3f8e66... |
94446e97-5823-4133-8b45-ef59f1126784 | Superm4n97/competetive-programming | Codeforces vol 03/1380B.cpp | #include <bits/stdc++.h>
#define pb push_back
#define ll long long int
#define scd(a) scanf("%d",&a)
#define mp(a,b) make_pair(a,b)
#define scl(w) scanf("%I64d",&w)
#define scdd(a,b) scanf("%d %d",&a,&b)
#define srt(a) sort(a.begin(),a.end())
#define rs... | ALGO | 0.999983 | 3.967862 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2021-12-16T18:34:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "766db9d266... |
6be1f304-0144-4015-90f8-a46797ddb60b | apache/mxnet | src/kvstore/comm_tree.h | /*
* 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 ... | ALGO | 0.99125 | 6.243754 | {
"github_metadata": {
"branch": "master",
"commit_count": 11896,
"repo_created_at": "2015-04-30T16:21:15.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 20806,
"forks": 6757,
"issues": 1805,
"pull_requests": 204
},
"file_meta": {
"content_i... |
71ddb93b-0df7-41e8-9572-38ef16190c75 | MrAbdukarim/CPP-Projects | All in a file/Source D7V2.cpp | //
// Created by MrAbdukarim on 10/1/2024.
//
#include <iostream>
using namespace std;
int main() {
/** 1-vazifa **/
/* 1. 1 ta son berilgan. Agar son 100 dan katta bo'lsa uni qiymatini 20 ga oshirib, aks holda o'zini ekranga chiqaring. */
cout << "Sonni kiritig: ";
int num;
cin >> num;
if ... | ALGO | 0.995326 | 4.15654 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2024-11-13T05:57: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": "0e93404f4a5b... |
c743561e-2ebe-4865-bf26-d44dcad5f485 | chenx859/Exotic-Option | main.cpp | #include <iostream>
#include"BlackSchollesmodel.h"
#include"PathDepOption.h"
#include"ArithAsian.h"
#include"Barrier.h"
#include"ImpliVol.h"
#include<vector>
using namespace std;
int main()
{
int choice;
double S0, r, sigma, T, K, L,MktPrice,IV;
char PutCall;
long N = 100000;//N is the number of itera... | ALGO | 0.999362 | 5.290679 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2015-05-08T18:15:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "b8e9c9ceb2... |
7d5a6dbc-bb22-4dc1-968d-889e25406763 | rahul799/leetcode_problems | DP/Edit Distance Variation/Double String Concatenation.cpp | https://binarysearch.com/problems/Double-String-Concatenation
Double String Concatenation
You are given a lowercase alphabet string s. In one operation, you can remove, insert or update any character in s. Return the minimum number of operations required such that s = t + t for any t.
Constraints
0 ≤ n ≤ 100 where n... | ALGO | 0.999881 | 5.400453 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-04-20T19:46:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b0cf50998ca4... |
f3d573fb-dfce-490f-b12c-bd818726a4f3 | SumitM28/Cpp | 26_heaps/06_kthLargestSum.cpp | // find the kth largest sum of the subarray.
#include <bits/stdc++.h>
using namespace std;
// approach 1
int kthLargestSum(vector<int> arr, int k)
{
vector<int> sumStore;
for (int i = 0; i < arr.size(); i++)
{
int sum = 0;
for (int j = i; j < arr.size(); j++)
{
sum += a... | ALGO | 0.99998 | 4.708019 | {
"github_metadata": {
"branch": "main",
"commit_count": 68,
"repo_created_at": "2022-10-02T14:09:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "81ff5b6d92e... |
65810152-f4a5-4e69-93eb-51985b55e2c3 | hiroshi-maybe/codeforces | solutions/EhabAndTheExpectedXORProblem.cpp | #include <bits/stdc++.h>
using namespace std;
// type alias
typedef long long LL;
typedef pair<int,int> II;
typedef tuple<int,int,int> III;
typedef vector<int> VI;
typedef vector<string> VS;
typedef unordered_map<int,int> MAPII;
typedef unordered_set<int> SETI;
template<class T> using VV=vector<vector<T>>;
// minmax
te... | ALGO | 0.999949 | 4.193651 | {
"github_metadata": {
"branch": "master",
"commit_count": 1095,
"repo_created_at": "2018-04-29T09:01:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d200a65... |
5eff23fe-0060-4a63-88c1-081ca0d64316 | Manthan-R-Sheth/CodingHub | hr/GRAPH.cpp | #include<bits/stdc++.h>
#include<climits>
using namespace std;
class Graph
{
int V;
list< pair<int, int> > *adj;
public:
Graph(int V);
void addEdge(int u, int v, int w);
void shortestPath(int s);
};
Graph::Graph(int V)
{
this->V = V;
adj = new list< pair<int, int> >[V+1];
}
void Gra... | ALGO | 0.999878 | 3.810046 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2018-02-24T11:18: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": "54e43c6dff... |
34c15c41-7d50-46fd-a297-e84259eafbb5 | alifalhasan/CP-code-vault | AtCoder/m-solutions2020/m_solutions2020_d/15456292.cpp | #include<bits/stdc++.h>
using namespace std;
#define G getline
#define SZ size()
#define C clear()
#define B begin()
#define F front()
#define T top()
#define E end()
#define EM empty()
#define V vector
#define Q queue
#define DQ deque
#define PQ priority_queue
#define ST stack
#define FI first
#define SE second
#def... | ALGO | 0.999984 | 3.277366 | {
"github_metadata": {
"branch": "main",
"commit_count": 5924,
"repo_created_at": "2023-06-06T13:32: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": "edae042d1... |
d7023c41-683e-4fc9-a7e9-3cab0572e576 | makixi/-OJ | 历届试题/PREV-22.国王的烦恼(并查集).cpp | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
const int maxn = 10000 + 10;
struct node {
int from, to, w;
node(int ff,int tt,int ww):from(ff),to(tt),w(ww){}
bool operator < (const node &a)const {
return w > a.w;
}
};
int fa[maxn];
int find(int x) {
int a = x;
while (x != fa[x])x =... | ALGO | 0.999997 | 4.289693 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2017-10-29T00:05: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": "f4b4b853cb... |
f4631579-52e7-4145-a2c4-e9280d302289 | irfan-m-mohammad/MissionRnD-C-Recursion-Worksheet | src/Steps.cpp | /*
You have N steps to climb .
You can either take one step or two steps at a time .
You need to find the total number of ways you can reach N steps .
Example : For N=4 , You can either reach 4 steps in following ways
->1111
->112
->121
->211
->22
So total number of ways is 5
Input : A Integer denoting N ... | ALGO | 0.999978 | 4.037743 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2016-03-24T18:05:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2d623777e1... |
276b8fbb-eff5-48c0-ac50-549bef7b4a7e | snakefoot/cgridlistctrlex | CGridListCtrlEx/ViewConfigSection.h | #pragma once
//------------------------------------------------------------------------
// Author: <NAME>
// Source: http://www.codeproject.com/KB/list/CGridListCtrlEx.aspx
// License: Free to use for all (New BSD License)
//------------------------------------------------------------------------
#ifdef CGRIDLISTC... | CONFIG | 0.944403 | 6.175368 | {
"github_metadata": {
"branch": "master",
"commit_count": 561,
"repo_created_at": "2015-03-16T21:07:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 101,
"forks": 64,
"issues": 7,
"pull_requests": 0
},
"file_meta": {
"content_id": "b774e... |
9d7c062c-a23d-4a92-9ca1-e94f286e3963 | ishandutta2007/codeforces-c | coderanshu/normal/1363/D.cpp | #include<bits/stdc++.h>
using namespace std ;
#define M 1000000007
#define MM 998244353
#define ll long long
#define pb push_back
#define mem0(a) memset(a,0,sizeof(a))
#define mem1(a) memset(a,-1,sizeof(a))
#define memf(a) memset(a,false,sizeof(a))
#define all(v) v.begin(),v.end()
#define sz(a) (ll)a.size()
#define ... | ALGO | 0.999902 | 3.982929 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:17: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": "5a83eb7b3183... |
d02f8f04-06c2-4a21-b5b5-858c06b43b58 | kmjp/procon | 2017-2021/2020/joi/spring/g.cpp | //#include <bits/stdc++.h>
#include <vector>
#include <set>
#include <iostream>
#include <algorithm>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin())... | ALGO | 0.999949 | 4.221363 | {
"github_metadata": {
"branch": "master",
"commit_count": 3966,
"repo_created_at": "2015-02-15T11:25:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 2,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "2562ef... |
a67b0e74-669a-41e9-90d2-302ade6a09a1 | ThomasQTruong/Hangman | LinkedList.cpp | /*
* LinkedList.cpp
* LinkedList declaration.
*
* Copyright (c) 2022, <NAME>.
*/
#include "LinkedList.h"
/**
* Destructor: deletes the Nodes of the LinkedList.
*/
LinkedList::~LinkedList() {
for (Node *i = _head, *next; i != nullptr; i = next) {
next = i->_next; // Next pointer set to the node after i.
... | TOOL | 0.993185 | 5.649708 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2022-01-15T23:28:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fed96cf5c... |
afb93997-eda9-4f80-9217-5cf81242114c | Blaga-Cristian/Personal-Projects | Competitive programming - solutions/All Problems (pbInfo, Infoarena, Codeforces, Kilonova...)/Furtuna revenge/main.cpp | #include <fstream>
#include <vector>
#include <queue>
#include <cstring>
#include <bitset>
#define MAX_M 2001
#define MAX_COST 301
using namespace std;
ifstream cin("furtuna.in");
ofstream cout("furtuna.out");
const int N = 409, Inf = 0x3f3f3f3f;
using pi = pair<int,int>;
int n,m,T,C,t[N],cap[N][N],a,b,c,x,p,tur[N],... | ALGO | 0.999901 | 4.017522 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-10-23T19:43: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": "a6a9f198a224... |
4680a26b-98b5-4fa9-a1be-ff33567331da | y2k-shubham/dsa-in-cpp | GeeksForGeeks/Trees/efficiently-design-insert-delete-median-query-set.cpp | // http://www.geeksforgeeks.org/efficiently-design-insert-delete-median-queries-set/
// Segment Tree (without lazy propagation), all elements in range 0 to 10^6
/*
1 1
4 1
7 1
8 1
9 1
-1 -1
0 3
2 5
3 2
-1 -1
*/
#include <cstdio>
#include <iostream>
#include <climits>
#include <cmath>
#include <cstring>
using namesp... | ALGO | 0.99954 | 4.854333 | {
"github_metadata": {
"branch": "main",
"commit_count": 2061,
"repo_created_at": "2020-05-23T08:08:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c0358f216... |
f6c0c641-f6b0-4243-ad71-7c6d39b6a642 | kostko/q2hivemind | include/fuzzy/trapezoid.h | /*
* This file is part of HiveMind distributed Quake 2 bot.
*
* Copyright (C) 2010 by <NAME> <<EMAIL>>
* Copyright (C) 2010 by <NAME> <<EMAIL>>
* Copyright (C) 2010 by <NAME> <<EMAIL>>
*/
#ifndef HM_FUZZY_TRAPEZOID_H
#define HM_FUZZY_TRAPEZOID_H
#include <algorithm>
namespace HiveMind {
/**
* A simple trapezo... | ALGO | 0.996547 | 7.469212 | {
"github_metadata": {
"branch": "master",
"commit_count": 193,
"repo_created_at": "2015-03-15T13:09:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "15b88b65... |
a5165ae4-d1d0-478b-aa25-c3d4032cc943 | Debojyoti1915001/DSA-CP | Codeforces/20220706/b.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
/*
The program doesn't handle the unbalanced parantheses,
that logic can be create easily with stacks, and it is exercise
*/
// Precedence of basic operators
int precedence(char operate) {
if (operate == '+' || operate == '-')
return 1;
else if (ope... | ALGO | 0.999978 | 4.846689 | {
"github_metadata": {
"branch": "main",
"commit_count": 1924,
"repo_created_at": "2021-05-14T17:38:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fa6d10c0e... |
6b67ab43-6483-4a24-a4b0-96245ebd6be7 | jgirald/survey-propagation-experiments | include/Solver.hpp | #pragma once
#include <FactorGraph.hpp>
#include <random>
using namespace std;
namespace sat {
// This constant is to ensure correct comparsion of doubles when checking
// if a number is 0. All numbers below 1.0e-16 are considered 0.
#define ZERO_EPSILON (1.0e-16)
enum AlgorithmResult {
CONVERGE,
UNCONVERGE,
... | ALGO | 0.999931 | 7.137866 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2020-09-22T16:19: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": "996218205... |
add57b90-35f6-4011-b5e6-51ac94b5f57b | Srushtii10/dsacode | practl2 set.cpp | #include<iostream>
using namespace std;
class set
{
public:
int A[20], B[20], C[30];
int a,b;
void read()
{
cout << "\nEnter how many elements you want to add in the first set: ";
cin >>a;
cout << "\nEnter how many elements you want to add in the second set: ";
ci... | TOOL | 0.984875 | 4.777979 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-05-03T14:35: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": "42d8db67fd8c... |
6a8e6940-d4a7-435a-a209-b29aa8b02d97 | nessan/bit | include/bit/vector.h | /// @brief A bit-vector class bit::vector.
/// @link https://nessan.github.io/bit
///
/// SPDX-FileCopyrightText: 2023 <NAME> <<EMAIL>>
/// SPDX-License-Identifier: MIT
#pragma once
#include "verify.h"
#include <array>
#include <bit>
#include <bitset>
#include <chrono>
#include <concepts>
#include <format>
#include... | TOOL | 0.941009 | 7.775294 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2024-05-13T13:45:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b986780da5d... |
3b5a6a40-96e5-4329-a460-29e120b8ee68 | dogma0/programming-questions | interviewbit/backtracking/unique_permutation/main.cc | /*
* Created on 2017-04-22.
* -------------------------------------------------------------------------------
* Question:
* -------------------------------------------------------------------------------
* Examples:
* Input:
* Output:
* -------------------------------------------------------------------------... | ALGO | 0.999987 | 5.68518 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2017-04-01T18:19: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": "64602977a... |
0defe489-3b66-4638-a8f5-3b90a3b25474 | PhamLeQuangNhat/CS112.L11.KHTN | Practice/Atcoder/Edu_DP/Q.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<ll> a, h;
vector<ll> fen;
int n;
void update(int id,ll val){
while (id <= n){
fen[id] = max(fen[id],val);
id += (id & -id);
}
}
ll get(int id){
ll ans = 0;
while (id){
ans = max(ans,fen[id]);
id ... | ALGO | 0.999949 | 3.589179 | {
"github_metadata": {
"branch": "master",
"commit_count": 188,
"repo_created_at": "2020-09-10T03:06:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c04a5787... |
184a58fd-d3bd-4030-83e9-7dd772d5b680 | HHgzs/OpenRM-2024 | include/kalman/interface/antitopV1.h | #ifndef __OPENRM_KALMAN_INTERFACE_ANTITOP_V1_H__
#define __OPENRM_KALMAN_INTERFACE_ANTITOP_V1_H__
#include <utils/timer.h>
#include <kalman/filter/ekf.h>
#include <structure/slidestd.hpp>
#include <algorithm>
// [ x, y, z, theta, vx, vy, vz, omega, r ] [ x, y, z, theta]
// [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] [ ... | TOOL | 0.938763 | 5.645233 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2024-08-15T15:19:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 187,
"forks": 10,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "13ba64e5... |
93e127f7-a0e7-4d7a-95ee-74d1add15924 | AnsumanEI/Learning-Directory | check4.cpp | #include <iostream>
#include <bits/stdc++.h>
#include <math.h>
#include <strings.h>
#include <string>
#include <cstring>
using namespace std;
class Solution
{
public:
int arrangeCoins(int n)
{
int l = 1;
int r = n;
int mid = l + (r - l) / 2;
int total = mid * (mid + 1) / 2;
... | ALGO | 0.999947 | 5.107832 | {
"github_metadata": {
"branch": "main",
"commit_count": 123,
"repo_created_at": "2022-01-19T09:09:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ece710793a... |
cae6c633-ebe4-480e-bd7f-1dfeb7d1cf3a | jhosep2004/LABORATORIO-3 | EJERCICIO 3.cpp | #include <iostream>
using namespace std;
void tiempo(int a,int b,int c,int d,int e,int f){
int cantyear,cantmes,cantdia;
if (d>c){
cantyear=f-e;
cantmes=d-c;
if(b>a){
cantdia=b-a;
}
else{
if (c==1 or c==3 or c==5 or c==7 or c==8 or c==10... | ALGO | 0.996369 | 3.621861 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-05-05T16:18:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8b9bca1242c6... |
f1f832ab-a91c-46a1-8901-ce4b37e4e19b | vishal19102/Interview-Prep | LeetCode/GreedyPatterns/minaddpara.cpp |
// Created By <NAME> ....
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <math.h>
#include <string>
#include<cstring>
#include<unordered_map>
using namespace std;
#define TRACE
#ifdef TRACE
#defin... | ALGO | 0.999039 | 4.021375 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2020-06-18T10:10: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": "d8f4f78e73... |
770ddfc9-9007-40a4-ab70-9a0a7abec997 | ToMe25/AdventOfCode | 2021/Cpp/src/Day4.cpp | /*
* Day4.cpp
*
* Created on: 04.12.2021
* Author: ToMe25
*/
#include "Day4.h"
#include <algorithm>
#include <iostream>
#include <sstream>
template<>
void DayRunner<4>::solve(std::ifstream input) {
std::string token;
input >> token;
std::replace(token.begin(), token.end(), ',', ' ');
std::istringstream... | ALGO | 0.999565 | 5.754415 | {
"github_metadata": {
"branch": "master",
"commit_count": 288,
"repo_created_at": "2020-12-01T12:12: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": "36d97227... |
d353e8e0-55f3-4fe7-ae10-0e70310d21d3 | dmytrolev/algorithms | pairs-again/main.cpp | // n = A + B, A <= B
// A = a * x; => A mod a = 0, A >= a
// B = b * y; => B mod b = 0, B >= b > a
// a < b => B > A
#include <iostream>
#include <vector>
#include <set>
#include <iterator>
#include <algorithm>
#ifdef ALGO_DEBUG
#include "../test/debug.cpp"
#else
#define TRACE(message)
#define TRACE_LINE(message)
#d... | ALGO | 0.999808 | 5.264339 | {
"github_metadata": {
"branch": "master",
"commit_count": 191,
"repo_created_at": "2016-06-13T09:11: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": "ee4f9b52... |
3523653e-2458-4a20-a775-8634a1565f34 | kang-min-seok/BaekJoon_cpp | 알고리즘별 풀어보기/다이나믹 프로그래밍/2096.cpp | #include <iostream>
#include <vector>
#include <tuple>
#include <algorithm>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
vector<tuple<int,int,int>> down_map(n);
for(int i = 0; i < n; i++) {
int a, b, c;
cin >> a >> b >> c... | ALGO | 0.999959 | 4.205426 | {
"github_metadata": {
"branch": "main",
"commit_count": 62,
"repo_created_at": "2024-10-02T07:03: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": "8588c2c967d... |
8328adfa-4d62-40f7-8164-cc677099c85c | PauAmetller/AdvancedGraphics_Framework | RTACG_Students/RTACG_Students/src/renderers/RendererCaching.cpp | #include "RendererCaching.h"
#define M_PI 3.14159265358979323846
RendererCaching* RendererCaching::instance = nullptr;
//Constructor
RendererCaching::RendererCaching(Shader* shader, char* shader_DI_) {
this->max_nodes = 100000;
this->node_count = 0;
this->shader = shader;
this->num_samples = 254;
... | ALGO | 0.96171 | 6.345389 | {
"github_metadata": {
"branch": "main",
"commit_count": 46,
"repo_created_at": "2024-09-29T16:45:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a40d8e765f6... |
b363941a-4824-40b4-bafb-60ec867da419 | vi5hnuu/DSA-prac | sorting/partition_qsort.cpp | #include<iostream>
using namespace std;
ostream& operator <<(ostream &out,int arr[]){
int sz=9;//flaw use vector instead so that size can be known
for(int i=0;i<sz;i++){
out<<arr[i]<<" ";
}
cout<<endl;
return out;
}
int partition(int arr[],int low,int high){//not stable //pivot is first el... | ALGO | 0.999858 | 5.489122 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2022-06-13T16:51: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": "0987a8d79... |
167623bb-9eca-4ead-932b-ccbd19b098e5 | LucaTheSorcerer/Graph-Theory | Laborator/L5/Kruskal/Graph.h | /**
_____________________________________________________________________________________________________
/ @Author: <NAME>, group 713, Faculty of Computer Science \
| **************************************************************************************************** |
| BFS fo... | ALGO | 0.998826 | 4.626812 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2023-03-07T08: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": "06f87b3a99b... |
e484378b-2bd5-40b0-9542-4733cfc10d3c | zhangxiaoya/FB | src/Utils/Utils.cpp | #include "Utils/Utils.h"
#include <vector>
#include <algorithm>
#include <opencv2/core.hpp>
int Utils::CalculateCount(const std::vector<bool> value_list, const bool value)
{
auto count = 0;
for (auto currentValue : value_list)
currentValue == value ? count++ : count;
return count;
}
cv::Mat Utils:... | TOOL | 0.995927 | 6.197814 | {
"github_metadata": {
"branch": "master",
"commit_count": 149,
"repo_created_at": "2017-04-06T11:03:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 69,
"forks": 17,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "d6ea40... |
d086af56-9422-4e57-a751-0e6d3849445e | lessandro/nbis | misc/nistmeshlab/vcglib/vcg/complex/trimesh/inertia.h | /****************************************************************************
* VCGLib o o *
* Visual and Computer Graphics Library o o *
* _ O _ *
* Copyri... | ALGO | 0.998796 | 4.179669 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2011-09-21T11:13:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 80,
"forks": 81,
"issues": 0,
"pull_requests": 3
},
"file_meta": {
"content_id": "97120d3d... |
3af73f50-a7c7-439e-9d20-d83c41798aab | MimFSD/Giga-Struct-Conqueror-Odyssey | Array DS -part-1/array-syntax.cpp | #include <iostream> // Include the iostream library for input and output
int main() {
int numbers[5] = {10, 20, 30, 40, 50}; // Array of size 5 with initial values
// Accessing elements using indexing
std::cout << "First element: " << numbers[0] << std::endl; // Output: 10
std::cout << "Second elem... | ALGO | 0.995227 | 4.115245 | {
"github_metadata": {
"branch": "main",
"commit_count": 295,
"repo_created_at": "2024-09-05T17:19: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": "b5f8d708e3... |
16157ebf-6c4e-4aac-83ed-bc0191b7c442 | BSKorolev/labs | 67/SomeFunctions.cpp | #pragma once
#include "SomeFunctions.hpp"
#include <iostream>
#include <math.h>
#define N 50
#define M 50
namespace mt
{
int s = 0;
int v = 0;
int d = 0;
bool isPrime(int x)
{
if (x < 2)
return false;
for (int d = 2; d <= sqrtl(x); d++)
if (x % d == 0)
... | ALGO | 0.999922 | 3.658332 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2021-10-25T01:28: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": "41b882d03a2... |
8266c095-9fbf-4fb9-87c9-eec78d74521d | Ujala-2110/DSA_Cpp | Binary_Search/Aggressive_cows.cpp | #include <bits/stdc++.h>
using namespace std;
bool Check(vector<int> &arr, int d, int k)
{
int n = arr.size();
int cows = 1;
int cord = arr[0]; // first cow is placed at arr[0]
for (int i = 1; i < n; i++)
{
if ((arr[i] - cord) >= d)
{
cows++;
cord = arr[i];
... | ALGO | 0.99997 | 5.325937 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-07-14T13:16: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": "cba032c88eac... |
7fdce263-5f7a-4cb7-b87e-d84cf0aeda1d | sagar1024/not-mycppjourney | CP/Codeforces/4. Problems rated 1100+/6. BerSU ball(accepted).cpp | // <NAME>
// time limit per test1 second
// memory limit per test256 megabytes
// inputstandard input
// outputstandard output
// The Berland State University is hosting a ballroom dance in celebration of its 100500-th anniversary! n boys and m girls are already busy rehearsing waltz, minuet, polonaise and quadrille ... | ALGO | 0.999992 | 4.307762 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2024-06-27T10:02: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": "06002e8221... |
c3ef887b-78d8-4d6e-aa11-3dd171cd8733 | ahay/src | user/chengjb/Mtti2delasticlrsep2ps.cc | /* 2-D two-components wavefield modeling based on original elastic anisotropic displacement
wave equation and P-SV separation using low-rank symbol approximation in 2D TTI media.
Authors: <NAME> (Tongji University) and <NAME> (The University of Texas at Austin)
Copyright (C) 2012 Tongji University, Shan... | ALGO | 0.997804 | 3.831237 | {
"github_metadata": {
"branch": "master",
"commit_count": 15821,
"repo_created_at": "2015-07-26T15:48:10.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 297,
"forks": 177,
"issues": 70,
"pull_requests": 0
},
"file_meta": {
"content_id": "1a... |
df0a1df8-58a5-451c-b395-5553b63058ab | guojunliu7/DataStructure | SequenceTable/SequenceTable.h | #include <iostream>
using namespace std;
/**
* 本头文件实现以下功能:
* 1、初始化一个顺序表
* 2、向已有表中插入一个元素(表满则拓展)
* 3、移除表中给定元素(没有元素则返回警告)
* 4、移除指定下标元素(判断下标是否合法)
* 5、查找指定元素并返回下标
* 6、访问指定下标并返回对应元素值
* 7、返回表中元素个数
* 8、表中元素排序(从低到高、从高到低)
*/
/**
* 宏定义
*/
#define MAX_TABLE_SIZE 128 //最大数组长度
typedef int ElemType; //定义ElemType
/*... | ALGO | 0.999509 | 4.941191 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2020-03-16T21:07:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ec0d006a7... |
c3de1f0c-2b64-4af7-8674-5b555a39b1d8 | Mten7271/AtCorder | 20210725_a.cpp | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
int N, K;
cin >> N >> K;
vector<int> a(N, 0);
vector<int> b(N, 0);
for (int i = 0; i < K; i++)
{
char c;
int k;
cin >> c >> k;
k--;
b[k] = 1;
for (int j = 0; j < N; j... | ALGO | 0.999956 | 4.283836 | {
"github_metadata": {
"branch": "master",
"commit_count": 101,
"repo_created_at": "2021-06-09T05:41: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": "f6bf9e46... |
ff4fdf2b-4c30-4e83-b5fc-7f47ecc6efc7 | winsvega/GCP | math/GCP_Math_Physics.h | struct reflectinfo
{
double reflectedAngleOX;
double reflectedAngle;
double refractedAngleOX;
double refractedAngle;
bool refractionError;
double N1, N2;
};
//преломление и отражение line1 от line2
template<class T>
static void lineRefractReflect(GCP_Line<T> const& line1, GCP_Line<T> const& line2, reflectinfo& i... | ALGO | 0.994443 | 3.904467 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2014-03-18T20:08:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a333d207a... |
db61eac4-7407-429b-8cda-aeefd5ba4276 | epsilon-0/usaco-code | butter/butter.cpp | /*
ID: mathgen2
PROG: butter
LANG: C++11
*/
#include <bits/stdc++.h>
using namespace std;
template <class num_t>
class Dijkstra{
public:
Dijkstra(){}
vector<num_t> distance(vector<vector<pair<int, num_t> > >& graph, int source){
vector<num_t> distance(graph.size(), _INF);
distance[source] = 0;
set<p... | ALGO | 0.999982 | 4.053168 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2016-11-21T21:35: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": "245a849ba8... |
97eab829-14b4-4f37-aee5-e593409435f0 | daniel555666/CPP-3B-Matrix_operators | sources/Matrix.cpp | #include <iostream>
#include <vector>
#include "Matrix.hpp"
#include <stdexcept>
#include <fstream>
#include <sstream>
#include <string>
using namespace std;
using namespace zich;
Matrix::Matrix(const vector<double> &arr, int row, int col)
{
if (row <= 0 || col <= 0 || row * col != arr.size())
{
thro... | TOOL | 0.914451 | 4.161597 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-04-11T14:08: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": "70d297ba5486... |
5332e03d-a677-4b30-9f95-8f82ee97f3de | HaiZeizhouyuan/HZOJ | 539.cpp | /*************************************************************************
> File Name: 539.cpp
> Author: zhouyuan
> Mail:
> Created Time: 2020年08月22日 星期六 16时14分26秒
************************************************************************/
#include<iostream>
#include<algorithm>
#include<string>
#include<cstdio>
u... | ALGO | 0.99966 | 3.983068 | {
"github_metadata": {
"branch": "master",
"commit_count": 62,
"repo_created_at": "2020-06-24T02:31:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d9d9d0c66... |
da995df0-3b51-4921-8a63-d805634aedc1 | MikePeri/Phonetic-Search | PhoneticFinder.cpp | #include <iostream>
#include <cstring>
#include "PhoneticFinder.hpp"
using namespace std;
namespace phonetic{
//This funtion change the given word to letters and numbers by groups
string change(string word)
{
string str("");
for(int i=0;i<word.length();i++)
{
char letter... | ALGO | 0.998023 | 3.686363 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2020-03-29T19:47: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": "4bfefd8b06... |
d615788c-04c8-4fb2-9700-2ffbd1ec9a6a | ankitwest/DataStructure-Algorithm | LeetCodeSolution/Matrix/$0074-0240. Search a 2D Matrix I and II.cc |
class Solution {
public:
bool searchMatrix(vector<vector<int>>& matrix, int target) {
int n = matrix.size(); int m = matrix[0].size();
int row = -1;
for(int i=0;i<n;i++){
if(target<=matrix[i][m-1])
{row = i;break;}
}
if(row==-1) return fa... | ALGO | 0.999966 | 6.103233 | {
"github_metadata": {
"branch": "main",
"commit_count": 1569,
"repo_created_at": "2021-10-01T09:11:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "812b1c22e... |
84d141b0-925d-45a5-bc98-29ddddc9a449 | jmoraes7/Elements-of-Programming-Interviews | Binary Trees/LowestCommonAncestorNoParent.cpp | /*
* LowestCommonAncestorNoParent.cpp
* -----------------
*
* Chapter 10 Question 3
*/
#include <cassert>
#include <iostream>
#include <vector>
#include <algorithm>
#include <random>
#include <unordered_map>
#include "./BinaryTreeNode.h"
using namespace std;
struct Result {
int num_target_nodes;
BinaryTreeNode<... | ALGO | 0.999929 | 6.454495 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2020-10-19T18:45:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6bcdb1b8ddeb... |
af8d2714-1436-4b1f-8efe-19cb32310d6f | FGDES/libFAUDES | plugins/pushdown/src/pd_alg_lrm.h | /** @file pd_alg_lrm.h functions related to LR machines*/
/* Pushdown plugin for FAU Discrete Event Systems Library (libfaudes)
Copyright (C) 2013 <NAME>, <NAME>, <NAME>
*/
#ifndef FAUDES_PD_ALG_LRM_H
#define FAUDES_PD_ALG_LRM_H
#include "corefaudes.h"
#include "pd_include.h"
namespace faudes {
/**
... | ALGO | 0.994981 | 6.530893 | {
"github_metadata": {
"branch": "main",
"commit_count": 281,
"repo_created_at": "2024-02-15T13:50:10.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "72fbb44d934... |
2b6e5d8b-4120-4723-aafe-81a0af4d9d16 | Richi78/CF-Algorithms | RPC_02_H_Human_Pyramid.cpp | #include <bits/stdc++.h>
using namespace std;
#define debug1(x) cout << #x << " = " << x << "\n";
#define debug2(x,y) cout << #x << " = " << x << " " << #y << " = " << y << "\n";
#define vdebug(a) cout << #a << " = "; for(auto x: a) cout << x << " "; cout << "\n";
#define int long long
#define FIO ios_base::sync_with... | ALGO | 0.999906 | 4.209716 | {
"github_metadata": {
"branch": "main",
"commit_count": 124,
"repo_created_at": "2025-05-15T02:57:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0ee0955126... |
4743381d-7fb8-420d-91cf-adc21358c481 | sohnryang/csed233 | assignments/pa3/avl.cpp | #include "avl.h"
#include "bst.h"
#include "tree.h"
#include <iostream>
#include <string>
#include <deque.h> // expand: true
using namespace std;
/////////////////////////////////////////////////////////
////////// TODO: Implement From Here //////////////
/* Write your codes if you have additional functions ... | ALGO | 0.999143 | 4.144433 | {
"github_metadata": {
"branch": "main",
"commit_count": 121,
"repo_created_at": "2022-09-04T04:42:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9e16b2568a... |
75dafb64-d75f-4904-8527-cd5854099909 | dringakn/ROSExamples | src/example_iterative_closest_points_algorithm.cpp | /**
Author: Dr. Ing. <NAME>
Email: <EMAIL>
Description:
Eigen Geometry module provides two different types of transformations.
Abstract Transformation:
Such as rotations(angle and axis, quaternions), translations, scaling.
These transformations are not represented by matrices, never ... | ALGO | 0.913675 | 5.435431 | {
"github_metadata": {
"branch": "master",
"commit_count": 385,
"repo_created_at": "2020-02-08T09:52:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a7614fe5... |
4b061061-980e-436c-82d6-4d6cf6459175 | heisenberg0424/NSYSU_CSE_2021 | AdvancedPrograming/UVA/uva615/uva615.cpp | #include <iostream>
#include <vector>
#include <utility>
#include <map>
#include <cstring>
#include <algorithm>
using namespace std;
int copymat[100][100];
int matrix[100][100];
void clear(int row){
for(int i=0;i<100;i++){
copymat[row][i]=0;
}
}
void bfs(int root){
clear(root);
for(int i=0;i<10... | ALGO | 0.999824 | 3.975231 | {
"github_metadata": {
"branch": "master",
"commit_count": 80,
"repo_created_at": "2021-01-10T11:45: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": "3b089b290... |
8ec54684-e054-45d6-ab6e-a447acfe7022 | mmhlego/Cheatsheet-2024 | Algebra/Gausian Elimination.cpp | const int MAX_N = 3;
// adjust as needed
struct AugmentedMatrix { double mat[MAX_N][MAX_N + 1]; };
struct ColumnVector { double vec[MAX_N]; };
ColumnVector GaussianElimination(int N, AugmentedMatrix Aug) {
// input: N, Augmented Matrix Aug, output: Column vector X, the answer
for (int i = 0; i < N - 1; ++i) {
// fo... | ALGO | 0.999943 | 3.711985 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2024-05-27T20:30: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": "eac63e4b0e... |
50a6c5d6-5b89-46af-b864-73c51818c06d | wuwendb/cccode | atcoder/abc/abc353/abc353_g.cpp | // Problem: G - Merchant Takahashi
// Contest: AtCoder - AtCoder Beginner Contest 353
// URL: https://atcoder.jp/contests/abc353/tasks/abc353_g
// Memory Limit: 1024 MB
// Time Limit: 2000 ms
#include <bits/stdc++.h>
#define endl "\n"
#define rep(i, a, b) for (int i = (a); i <= int(b); ++i)
#define rev(i, a, b) ... | ALGO | 0.99993 | 4.106454 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-03-28T09:10: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": "0948e4564157... |
1904a7f9-16b6-4db2-bc6d-a89286e689b6 | kyechou/adventofcode | 2023/1.cpp | /**
* @file 1.cpp
* @author <NAME> (<EMAIL>)
* @date 2023-12-19
*
* --- Day 1: Trebuchet?! ---
*
* Something is wrong with global snow production, and you've been selected to
* take a look. The Elves have even given you a map; on it, they've used stars
* to mark the top fifty locations that are likely to be ha... | ALGO | 0.999511 | 6.280427 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2023-12-20T12:28: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": "835b2ff95f... |
a3816cee-da6c-48ab-b33a-28ade9502056 | Yefri97/Competitive-Programming | Training/CSES/4 - Graph Algorithms/05 - Building Teams.cpp | #include <bits/stdc++.h>
#define endl '\n'
#define debug(X) cout << #X << " = " << X << endl
#define SZ(X) ((int)X.size())
#define SQ(X) ((X) * (X))
#define all(X) X.begin(), X.end()
#define fori(i,a,b) for(int i = a; i < b; i++)
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, i... | ALGO | 0.999989 | 4.645221 | {
"github_metadata": {
"branch": "master",
"commit_count": 378,
"repo_created_at": "2016-06-01T01:51:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cf1268b6... |
9cfb9db0-9f1b-4b51-acac-37e2c53bf6f3 | smhemel/UVA-Online-Judge | Uva 10083- Division/Uva 10083- Division/main.cpp | //
// main.cpp
// Uva 10083- Division
//
// Created by <NAME> on 10/9/16.
// Copyright © 2016 <NAME>. All rights reserved.
//
#include<iostream>
#include<cmath>
#define digitMax 101
using namespace std;
int main()
{
int t, a, b;
int ans[digitMax], divisor[digitMax], tmp[digitMax];
int i, j, k, count, ... | ALGO | 0.999572 | 4.406754 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2018-03-18T08:19: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": "07b5cd1d1... |
c4766cee-9161-4d7b-8e5d-d0020df19925 | Jay1105/Codeforces | r775div2C.cpp | // CF Round 775 Div 2 C
#include <bits/stdc++.h>
using namespace std;
#define ll long long
void solve()
{
ll n, m;
cin >> n >> m;
map<ll, vector<ll> > x;
map<ll, vector<ll> > y;
for (ll i = 0; i < n; i++)
{
for (ll j = 0; j < m; j++)
{
ll col;
cin >> ... | ALGO | 0.999963 | 3.355785 | {
"github_metadata": {
"branch": "main",
"commit_count": 39,
"repo_created_at": "2022-11-15T18:28: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": "bbd9642b9fc... |
d7219c26-797b-403f-ae9a-2a1c6d711089 | MOIRobot/MOI_Robot_Winter | src/winter_globalplanner/src/MoveBase/costmap_G.cpp | #include <math.h>
#include <winter_globalplanner/costmap_G.h>
#include <geometry_msgs/PoseStamped.h>
namespace agv
{
LocalMap_G::LocalMap_G(costmap_2d::Costmap2D *costmap,const std::vector<geometry_msgs::Point> &footprint_spec)
{
if (costmap != NULL)
{
world_model_=new base_local_planner::CostmapModel(*cost... | ALGO | 0.998097 | 5.109796 | {
"github_metadata": {
"branch": "master",
"commit_count": 168,
"repo_created_at": "2017-09-10T12:44:28.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 13,
"forks": 10,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "24e4ca9... |
74e0e1a2-4913-4bf1-b4b2-60cfcbd71005 | bhaktiagrawal088/DSA_Sheet | Basic/dividebyN.cpp | // #include<iostream>
// using namespace std;
// int main(){
// int n;
// cin>>n;
// int count=0;
// for(int i = 2; i < n; i++){
// if(n%i == 0){
// count++;
// }
// }
// cout<<count;
// }
#include <iostream>
#include <string>
int countDivisibleDigits(int n) {
// Conver... | ALGO | 0.99975 | 6.290272 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2024-01-15T18:40:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e583d4f2763... |
7779fd0b-057f-4732-af4d-5f64ea9adeef | vladirares/MultiSetPOO | MultisetPOO/MultisetPOO/Comparator.h | #pragma once
#include<functional>
#include<iostream>
using namespace std;
template < typename T >
class Comparator //functor
{
hash<T> hashing;
public:
size_t operator ()(const T item) const {
return hashing(item);
}; //std::size_t can store the maximum size of a theoretically possible object of any type(includ... | TOOL | 0.992728 | 5.196644 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2020-05-08T12:54: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": "5e7bdcdae... |
a22122a3-3f2c-41c4-b40f-1713e360d277 | MathIsLife/PrewrittenCodes | MinCostMaxFlow.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1234;
const ll INF = 1e9 + 69;
struct edge {
int v, rev_pos;
ll cap, cost, flow = 0;
};
struct MCMF {
int n;
vector <vector <edge>> E;
bitset <N> vis;
int par[N], pos[N];
ll caps[N], dist[N];
MCMF (int n) : n(n), E(... | ALGO | 0.999825 | 4.218888 | {
"github_metadata": {
"branch": "master",
"commit_count": 115,
"repo_created_at": "2018-12-30T23:57:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cb6a038f... |
290ae8eb-c1bf-4200-961a-cec4840b6378 | shunak/alg-sandbox | dp_maximize_memorized_recurrsive.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <limits.h>
using namespace std;
#define ll long long
int maximized_happiess=0,N,TodaysHappiness[100000][3],A[100000],B[100000],C[100000];
int calc_happiness(int day, int preChoice){
if(day==N) return 0;
if(TodaysHappiness[d... | ALGO | 0.999935 | 4.307713 | {
"github_metadata": {
"branch": "master",
"commit_count": 145,
"repo_created_at": "2018-08-24T14:46:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "45cdd52c... |
3ef0bd5f-4d72-4c43-830f-2cadab32e2a9 | qornwh/BOJ | 7576.cpp | #include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <map>
using namespace std;
struct coordinate
{
int x;
int y;
};
int N = 0;
int M = 0;
int **grid;
int result;
int total;
int date = 0;
vector<coordinate> temp;
bool findTemp(vector<coordinate>, int, int);
bool findTemp(vector<co... | ALGO | 0.999968 | 3.7042 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2020-10-10T11:30:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d5b55c77c2d... |
71b6239b-fe77-44c4-aa2a-8c60f1c0757d | cinder/Cinder | src/cinder/BSplineFit.cpp | /*
Portions Copyright (c) 2010, The Barbarian Group
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that
the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditio... | ALGO | 0.997338 | 7.322516 | {
"github_metadata": {
"branch": "master",
"commit_count": 9142,
"repo_created_at": "2010-04-21T19:03:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5441,
"forks": 959,
"issues": 320,
"pull_requests": 73
},
"file_meta": {
"content_id": ... |
b878d983-9264-4c99-ab44-eb9cf686e24b | hhjj0506/study-repo | PS/10844.cpp | #include <iostream>
#include <algorithm>
using namespace std;
int dp[101][10];
/*
n=1 : 1 2 3 4 5 6 7 8 9 (9)
n=2 : 10, 12, 21, 23, 32, 34, 43, 45, 54, 56 ... (17)
n=3 : 101, 123, 121, 210, 212, 232, 234, 323, 321, 343
1부터 8까지는 자릿수가 늘어나면 두개의 숫자가 새로 추가되는데,
0과 9가 마지막 숫자라면 자릿수가 하나 늘어나면 1과 8, 하나씩밖에 추가되지 않는다.
따라서 경우의 수는 ... | ALGO | 0.999861 | 4.116017 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2022-03-07T01:08: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": "78256a2fc66... |
c9888554-191b-4c08-a56f-6c7f75d7a266 | yefantingyu/Dissertation | ACO_2022_6_28_HAVE MISTAKES/Problem.hpp | #include "Macro.hpp"
#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<string>
#include<cstring>
#include<math.h>
#include<algorithm>
#include<fstream>
#include<time.h>
#include<limits.h>
#include <vector>
#include <limits.h>
#include <string>
using namespace std;
struct node {
int id;
double x;
... | ALGO | 0.996563 | 3.818412 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2022-06-18T16:57: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": "101d5ed6d66... |
7aaf0bd7-ac0f-40b6-98b0-ab9a9bb676ea | SterbenVD/Course-Projects | pastry_kademlia/test/include/pastry.hpp | #include "utils.hpp"
vector<vector<string>> routing_table;
vector<vector<int>> corr_machine;
vector<vector<pair<string, int>>> leaf_set;
int b = 4, base = 16;
// Initialize routing table, leaf set and other data structures
void init_tables()
{
routing_table.resize(log(n, base), vector<string>(base, ""));
corr... | ALGO | 0.998887 | 4.207318 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2024-03-12T18:06: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": "99b8b459867... |
d5193095-9266-414c-b835-718249e808ec | antonioMarchese/SerialUncertaintyHipertermia | main.cpp | #include <iostream>
#include <random>
#include <chrono>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define TAM 100
#define STEPS 6000
#define INTERVAL 600
#define real double
#define EXPERIMENTS 100
using namespace std;
int main()
{
printf("Número de experimentos: %d\n", EXPERIMEN... | ALGO | 0.998473 | 3.152929 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2022-12-19T14:31: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": "797869faf85... |
c0ca1746-8108-4fc1-87d1-b8823e62034e | nasrutdinov/cprog | 1sem/list/main.cpp | #include <iostream>
template <typename T>
struct Node {
T value;
struct Node* next;
};
// Вставка нового узла после узла curr
template <typename T>
Node<T>* insert(Node<T>* curr, T value) {
Node<T>* node = new Node<T>;
node->value = value;
if (curr != nullptr) {
node->next = curr->next;
curr->next = node;
}... | ALGO | 0.999297 | 4.492097 | {
"github_metadata": {
"branch": "master",
"commit_count": 106,
"repo_created_at": "2020-03-03T10:46:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0d430e74... |
c79aa414-5f8a-4918-b439-316c361401e5 | ekrogh/AudioAnalyzer | VectorGenerator.h | #include <vector>
#include <coroutine>
#include <iostream>
template <typename T>
class VectorGenerator {
public:
struct promise_type {
std::vector<T> value;
std::exception_ptr exception;
VectorGenerator get_return_object() {
return VectorGenerator{ std::coroutine_handle<promise... | TOOL | 0.984998 | 7.193439 | {
"github_metadata": {
"branch": "main",
"commit_count": 247,
"repo_created_at": "2023-12-07T03:24: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": "e63f5f9180... |
e59d4a3b-0b0a-4cd1-ad5e-10aea530eb9d | zhoutengteng/t2lp | t2lp/main.cpp | #include <cstdlib>
#include <cstdio>
#include <assert.h>
#include "Vocabulary.h"
#include "Utils.h"
#include "Formula.h"
#include "Formulas.h"
#include "SMTranslator.h"
#include <iostream>
#include <unistd.h>
#include "NNFUtils.h"
#include "PNFUtils.h"
#include "structs.h"
#include "Cabalar.h"
#include "CabalarUtils.h"... | TOOL | 0.968649 | 3.605713 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2017-06-01T06:57:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "23225e177... |
7b535af6-b089-4e31-a455-8d795d1e9aca | CodeBravish/2d_physics_engine_opengl | src/Objects/Ball_Simulator.cpp | #include "Objects/Ball_Simulator.h"
#include <cstddef>
#include <glm/geometric.hpp>
void simulateBalls(Ball* balls, size_t size, float delta_time) {
for (size_t i = 0; i < size; i++) {
Ball* ball = &balls[i];
ball->position += ball->velocity * delta_time;
// ball->velocity.y += 9.8 * delt... | ALGO | 0.986182 | 5.114165 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-09-02T07:21: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": "a4496118e63f... |
2abd72ea-326d-4e8d-a890-0106bac59d76 | JianHangChen/LeetCode | 101. Symmetric Tree.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999976 | 6.326865 | {
"github_metadata": {
"branch": "master",
"commit_count": 842,
"repo_created_at": "2019-02-15T05:09:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb7318df... |
3c54d567-d1c0-4147-94a4-dfb1609f1b7a | JoelHaubold/multi-robot-motion-planning | WellSeparatedSolver/WSMotionGraphSolver.cpp | //
// Created by joelh on 30/10/2023.
//
#include "WSMotionGraphSolver.h"
//#include "../Utils/GraphvizDrawUtils.h"
#include "../Utils/StringUtils.h"
#include "../mytypedefs.h"
#include <boost/graph/adjacency_list.hpp>
#include <exception>
MotionSchedule WSMotionGraphSolver::solveMotionGraphs(std::unordered_map<std::... | ALGO | 0.999137 | 5.191035 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2023-10-19T11:33:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "411adc530e8... |
1144ab5c-eafe-4852-a27b-1166442698fe | katsuunhi/PTA | test/好朋友/main.cpp | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
int father[210];
bool isRoot[210];
void init(int n){
for(int i = 1; i <= n; i ++){
father[i] = i;
isRoot[i] = false;
}
}
int findfather(int v){
if(v == father[v]) return v;
else{
int f = findfather(father[v]);
... | ALGO | 0.999807 | 3.182122 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2020-03-01T09:14: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": "8372753e5... |
f9831a4a-c162-4eb5-8d2c-fd2fb39a7e00 | zcPasser/leetcode_cpp | Solution572.h | #pragma once
#include<stack>
#include"TreeNode.h"
using namespace std;
class Solution {
public:
bool isSubtree(TreeNode* root, TreeNode* subRoot) {
bool cur = compare(root, subRoot);
if (cur)
return true;
if (root) {
bool left = isSubtree(root->left, subRoot);
... | ALGO | 0.999903 | 5.453692 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-06-04T12:50: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": "36238d1ba82f... |
2627adb8-9335-455d-9aae-22f4801988b1 | Minal-Abid/DSA-Basics-Codes | listfuncs.cpp | #include<iostream>
using namespace std;
class Node {
public:
int data;
Node* next;
};
class Mylist {
Node* head;
public:
Mylist() {
head = nullptr;
}
void addNode(int num) {
Node* newNode = new Node;
newNode->data = num;
newNode->next = nullptr;
if (head == nullptr) {
head = newNode;
}
else {... | ALGO | 0.999856 | 5.548501 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2025-06-21T10:12: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": "831ac09d4e67... |
e8c4e389-3f97-4cf8-87a2-8f667cf4363c | NEUQ-ACM/Lanqiao | week1/徐俊杰/第二题-直线.cpp | #include <iostream>
#include <algorithm>
#include <iomanip>
#include <vector>
using namespace std;
struct Point {
int x, y;
Point() {}
Point(int x, int y) {
this->x = x;
this->y = y;
}
};
struct Line {
Point a, b;
Line(Point a, Point b) {
this->a = a;
this->b = ... | ALGO | 0.99968 | 4.051303 | {
"github_metadata": {
"branch": "master",
"commit_count": 830,
"repo_created_at": "2022-02-08T07:50:24.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 8,
"forks": 60,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "450f326e... |
a235471c-cfab-4961-9129-025e83a509ee | JongTKim/Algorithm | Algorithm/21921.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
// 2024.05.06
// Written by JongTKim
// 푼 방법 : 슬라이딩 윈도우, 누적 합
int psum[250005];
int N, X, nnum, cnt;
ll maxn;
vector<int> vec;
void input() {
cin.tie(NULL); cout.tie(NULL); ios_base::sync_with_stdio(false);
cin >> N >> X;
for (int i = 1; i <= N... | ALGO | 0.999965 | 4.333142 | {
"github_metadata": {
"branch": "master",
"commit_count": 79,
"repo_created_at": "2024-03-28T10:31:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8ba3a3231... |
92348ca7-ac3b-403c-a65e-55a0b7a28e2f | RyanL123/Competitive-Programming | Codeforces/545C.cpp | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef vector<pair<int, int>> vii;
typedef vector<int> vi;
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define srt(x) sort(x.begin(), x.end())
#d... | ALGO | 0.999963 | 3.967412 | {
"github_metadata": {
"branch": "master",
"commit_count": 616,
"repo_created_at": "2019-04-09T21:00: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": "e89a33be... |
126075f8-6229-4004-b2dd-1177ce4ab88b | OpenFOAM/OpenFOAM-dev | src/thermophysicalModels/solidThermo/solidSpecie/transport/exponential/exponentialSolidTransport.H | /*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\... | TOOL | 0.926421 | 6.645377 | {
"github_metadata": {
"branch": "master",
"commit_count": 8589,
"repo_created_at": "2014-12-10T15:47:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1770,
"forks": 642,
"issues": 0,
"pull_requests": 3
},
"file_meta": {
"content_id": "f6... |
28eeff6b-b632-4423-b816-7871d582ba57 | chaobing/baseAlgo | leet/4_high/04_miss_dup.cpp | #include "../leetcommon.hpp"
////////////////////////////////////////////////////////////////////////
// You have a set of integers s, which originally contains all the numbers from
// 1 to n. Unfortunately, due to some error, one of the numbers in s got
// duplicated to another number in the set, which results in rep... | ALGO | 0.985412 | 5.355932 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-07-21T06:27: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": "2fc9b4f8c... |
bfde4225-5913-4af5-9e0e-ff6fe942bee5 | weitk1/Algo_HW | HW_2/Q_1/main.cc | #include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <set>
#include "Edge.h"
#include "Vertex.h"
using namespace std;
typedef set<int> T_Leaders;
void add_vertex(T_Vertices &vertices, T_Leaders &leaders, int vertex_num)
{
Vertex &vertex = ... | ALGO | 0.999621 | 4.408158 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2012-12-13T06: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": "754419c2b... |
1aceeb11-59ce-4c97-8251-e588ae6d85ff | Raigis/Modul16 | FourthTask/main4.cpp | /*
Создайте упрощённую модель механического пианино.
У этого пианино семь клавиш, которые соответствуют семи нотам.
Каждая клавиша кодируется уникальной битовой маской, которая записывается в enum.
В начале программы пользователь вводит «аккорд», то есть строку с набором цифр от 1 до 7, например: 1234 или 63.
Далее ну... | ALGO | 0.971803 | 5.686313 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2024-10-03T10:24: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": "19dd6593e... |
9e789e2d-ec43-4de8-a228-6f8013e5494e | ammardab3an/ACM | problems/done/codeforces/D. Bash and a Tough Math Puzzle.cpp | // Problem: D. Bash and a Tough Math Puzzle
// Contest: Codeforces - Codecraft-18 and Codeforces Round #458 (Div. 1 + Div. 2, combined)
// URL: https://codeforces.com/contest/914/problem/D
// Memory Limit: 256 MB
// Time Limit: 2500 ms
//
// Powered by CP Editor (https://cpeditor.org)
// By AmmarDab3an - Aleppo Univ... | ALGO | 0.999747 | 5.475739 | {
"github_metadata": {
"branch": "main",
"commit_count": 36,
"repo_created_at": "2021-10-06T07:54:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5228d066d88... |
de1ca904-3d09-4784-87ea-c477fe24f957 | zopsicle/blender | source/blender/bmesh/intern/bmesh_query_uv.cc | /* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup bmesh
*/
#include "MEM_guardedalloc.h"
#include "BLI_array.hh"
#include "BLI_linklist.h"
#include "BLI_math.h"
#include "BLI_math_vec_types.hh"
#include "BLI_utildefines_stack.h"
#include "BKE_customdata.h"
#include "DNA_meshdata_types.h"
#inc... | ALGO | 0.997912 | 6.642138 | {
"github_metadata": {
"branch": "master",
"commit_count": 118783,
"repo_created_at": "2022-01-03T17:54:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3e8b5... |
da432f98-ca79-45ae-b956-655b4a4b18f5 | darkBasic666/Algo-1 | Guia 8 : Demostracion de ciclos/factorial a/main.cpp | int main(int argc, char const *argv[])
{
return 0;
}
int factorial(int n){
//Estado 0
// Vale n == pre(n) && n >= 0
int i = 0 , res = 1;
//Estado PC
// Vale i = 0 && res = 1 n == n@0
// Implica n == pre(n) && n >= 0
while(i<n){
//Estado a
// I: 0 <= i <= n && res == fact(i)
// V: n -i;
// Vale I && B... | ALGO | 0.999918 | 4.698452 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2014-11-03T00:20: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": "159912dd94... |
39533b7a-a211-4180-8dc5-b6e85d771224 | vsharkovski/Competitive-Programming | Programs/Codeforces/1141F2 - Same Sum Blocks (Hard).cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
int main() {
ios::sync_with_stdio(false); cin.tie(0);
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; ++i) {
cin >> a[i];
}
map<int, vector<pii>> sums;
for (int r = 0; r < ... | ALGO | 0.999917 | 4.106382 | {
"github_metadata": {
"branch": "master",
"commit_count": 2053,
"repo_created_at": "2018-04-09T16:32:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7635d0e... |
ff09a295-f73f-46d1-aae4-6272b6aa913f | sattti161/Spoj | kgss.cpp | #include <iostream>
#include <vector>
using namespace std;
vector<long long int> GetMaxValues(long long int *arr, int x, int y);
int main(int argc, char *argv[]) {
int n, q;
cin >> n;
long long int arr[n];
for (int i = 0; i < n; i++)
cin >> arr[i];
cin >> q;
int x, y;
vector <int> max_sums;
char query;
... | ALGO | 0.99978 | 5.012576 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2013-07-10T07:07: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": "8051bf575a... |
2eb61459-810c-4070-ad34-cde8bcf054d1 | tyg99sr/DS2024 | 数据结构/exp1/test/main.cpp | #include <iostream>
#include <iomanip>
#include "Vector.cpp"
#include <cstdlib>
#include <ctime>
class Complex {
public:
double real;
double imag;
double module;
Complex() : real(0), imag(0), module(0) {}
Complex(double real, double imag) {
this->real = real;
this->imag = imag;
... | ALGO | 0.998808 | 4.633998 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-10-07T13:27: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": "5510a59dd989... |
63d1457f-1c01-4a6c-b058-be82880b4bf0 | chetanyamahana/DSA-CPP | trees/TreesUse.cpp | #include <iostream>
#include <queue>
#include "TreeNode.h"
using namespace std;
TreeNode<int>* takeInputLevelWise(){
int rootData;
cout << "Enter root Data" << endl;
cin >> rootData;
TreeNode<int> *root = new TreeNode<int>(rootData);
queue<TreeNode<int>*> pendingNodes;
pendingNodes.push(root);
... | ALGO | 0.999391 | 4.321503 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-07-12T05:47: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": "3181a3551a0a... |
c327812b-f6b2-4de6-97f3-039ffa8ecb99 | riyazahameed2/Competative | BubbleSort.cpp | #include<iostream>
using namespace std;
void swap(int *ab,int *ac){
int temp = *ab;
*ab = *ac;
*ac = temp;
}
void bubbleSort(int arr[], int num){
int i, j;
bool swapped;
for(i = 0; i < num - 1; i++){
swapped = false;
for(j = 0; j< num - i - 1; j++){
if(a... | ALGO | 0.999725 | 4.723395 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-05-08T12:08:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "35a53ae06c... |
7fc0f17d-ef80-41d7-99da-2952e5833a2b | shoraaa/CompetitiveProgramming | 2. Codes/Anh Vuong/School/School/Codes/sumbitop.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
int n; cin >> n; ll cnt[2];
vector <int> a(n);
ll sumand = 0, sumor = 0, sumxor = 0;
for (int &x : a) cin >> x;
for (int p = 20; ~p; p--){
cnt[... | ALGO | 0.999945 | 3.78448 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2023-07-31T18:18: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": "903695a91617... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.