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 |
|---|---|---|---|---|---|---|---|
e8d47f72-3945-48d2-abe5-1bd178af204b | munna516/Online-Judge | Codeforces/58A.cpp | #include <bits/stdc++.h>
using namespace std;
#define ISO \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define ll long long
#define pi 3.1416
#define endl "\n"
#define yes cout << "YES" << endl;
#define no cout << "NO" << endl;
/*----------------------... | ALGO | 0.99964 | 3.211126 | {
"github_metadata": {
"branch": "main",
"commit_count": 104,
"repo_created_at": "2022-08-23T17:06:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "183a1b5759... |
9891afad-98a0-4477-8431-b90b09732adc | PauloRobertoPC/Library | Graph/LCASparseTable.cpp | //** Watch out, the sparse table is 0-indexed **
//build O(n.log n)
//LCA O(1)
#define maxn int(1e5+10)
int lvl[maxn]; //lvl[u] = level of vertex u in tree
int euler[maxn]; //euler[i] = vertex found at i-th step in euler tour
int first[maxn]; //first[u] = the first position of vertex v in euler tour
int cnt; //auxili... | ALGO | 0.999979 | 4.212204 | {
"github_metadata": {
"branch": "master",
"commit_count": 45,
"repo_created_at": "2022-02-26T21:07: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": "481e64e26... |
9e5ee20f-0627-4103-b237-297e8b9762b9 | maksimix/IONOSPHERE | path_nuprof_29072022_qt5/antenn_omp/rebeam.cpp | #include <math.h>
#include <stdio.h>
void rebeam (double f,double t, double m, double alfa,
double eps, double sig, double la, double h,
double psi, double fi, double *d)
/***************************************************************/
/* Входные параметры ... | ALGO | 0.999845 | 4.078786 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-02-25T15:22: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": "401cad20ebe8... |
24b5a649-9fe8-4039-95aa-80e6ee34d177 | CGAL/cgal | Interpolation/doc/Interpolation/CGAL/sibson_gradient_fitting.h | namespace CGAL {
/*!
\defgroup PkgInterpolationSibsonGradientFitting Sibson Gradient Fitting Functions
\ingroup PkgInterpolation2Interpolation
The first function implements Sibson's gradient estimation method
based on natural neighbor coordinates \cgalCite{s-bdnni-81}.
Further functions are provided to fit the gradi... | ALGO | 0.999017 | 6.701553 | {
"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... |
100ccd1a-1c80-4c80-aa1c-648de0980f21 | 02yuting/paixu | 插入排序.cpp | #include <iostream>
#include <math.h>
using namespace std;
bool charu(int array[], size_t arrLen) {
if (arrLen < 0) {
return false;
}
for (int orderedNum = 1; orderedNum < arrLen; ++orderedNum) {
int insertValue = array[orderedNum];
int orderedIndex = orderedNum - 1;
for (; ... | ALGO | 0.999974 | 5.049719 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2021-10-24T15:03: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": "c94aa009ba40... |
cd412098-72d3-4e7b-9c53-a9eb272acafc | Adversarr/ACG | examples/hybrid_admm_ct/app.hpp | #pragma once
#include <Eigen/IterativeLinearSolvers>
#include <Eigen/SparseCholesky>
#include <acore/math/sparse.hpp>
#include <acore/spatial/subdivision.hpp>
#include <aphysics/constriants.hpp>
#include <aphysics/objects/cloth.hpp>
#include <aphysics/objects/fluid.hpp>
#include <aphysics/objects/softbody.hpp>
#include... | ALGO | 0.992735 | 6.337538 | {
"github_metadata": {
"branch": "main",
"commit_count": 206,
"repo_created_at": "2022-09-15T14:46:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "13d32bb95c... |
1bc2d39f-4966-444b-bd0e-4db2e88a4fc3 | nerdola-de-cartola/TAP2 | Listas/lista7/l.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define N 10000000
struct Factor {
ll x;
ll k;
};
ll primes[N];
bitset<N> isPrime;
void sieveOfEratosthenes() {
int i, j;
isPrime.set();
for(i = 4; i < N; i += 2)
isPrime[i] = 0;
for(i = 3; (i*i) < N; i += 2) {
... | ALGO | 0.999886 | 4.8423 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2022-11-09T12:51: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": "e8963aa2173... |
bf590b73-733d-462b-b851-c084d34b7537 | Lavanshu5030/cdac-cpp-programs | cpp programs/assignment_04-10-2023_classworkQ1.cpp | /*
calculate(n1, n2, ref of sum , sub and mul using references make changes into sum, sub, mul variables
print results into main function
*/
#include <iostream>
using namespace std;
void calculate(int , int, int &sum, int &sub, int &mul);
int main(){
int n1, n2, sum, sub, mul;
cout << "Enter n1 and... | ALGO | 0.987969 | 4.27028 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2023-09-27T10:13:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0d3785ef33d... |
e4cb1243-051b-4ffb-afea-1c634a020d5d | awsm-research/LineVul | cppcheck/data/c_files/149.cpp | void comps_mrtree_unite(COMPS_MRTree *rt1, COMPS_MRTree *rt2) {
COMPS_HSList *tmplist, *tmp_subnodes;
COMPS_HSListItem *it, *it2;
struct Pair {
COMPS_HSList * subnodes;
char * key;
char added;
} *pair, *parent_pair;
pair = malloc(sizeof(struct Pair));
pair->subnodes = rt2->subnodes;
pair->key = NULL;
tmplist ... | ALGO | 0.985959 | 4.347527 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2022-01-19T10:21:10.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 143,
"forks": 39,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "496a73928... |
4184efcb-f9dc-4e8d-a3af-72a4aba702b2 | parikshit223933/Coding-Ninjas-Competitive-Programming | Dynamic Programming - 2/Charlie_and_Pilots.cpp | /* Charlie acquired airline transport company and to stay in business he needs to lower the expenses by any means possible. There are N pilots working for his company (N is even) and N/2 plane crews needs to be made. A plane crew consists of two pilots - a captain and his assistant. A captain must be older than his ass... | ALGO | 0.999961 | 3.922088 | {
"github_metadata": {
"branch": "master",
"commit_count": 677,
"repo_created_at": "2020-03-09T07:20:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 555,
"forks": 299,
"issues": 4,
"pull_requests": 7
},
"file_meta": {
"content_id": "7108... |
72a35daf-e9f1-47b7-8c5b-bb8096cdbc33 | swapnilhota/interviewBit | Arrays/Maximum Sum Square SubMatrix.cpp | int Solution::solve(vector<vector<int> > &A, int B) {
int n = A.size();
if(B==1) {
int sum = INT_MIN;
for(int i=0; i<n; i++) {
for(int j=0; j<n; j++) {
sum = max(sum, A[i][j]);
}
}
return sum;
}
if(B==n) {
int... | ALGO | 0.999929 | 3.903353 | {
"github_metadata": {
"branch": "main",
"commit_count": 243,
"repo_created_at": "2021-04-24T16:39: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": "7e5231dca5... |
cc363cb0-4487-45e0-9b6e-581f552cdec9 | strengthen/LeetCode | C++/1054.cpp | __________________________________________________________________________________________________
sample 180 ms submission
class Solution {
public:
vector<int> rearrangeBarcodes(vector<int>& barcodes) {
for (int i = 0; i < barcodes.size() - 1; ++i) {
if (barcodes[i] == barcodes[i + 1]) {
... | ALGO | 0.999989 | 5.031832 | {
"github_metadata": {
"branch": "master",
"commit_count": 518,
"repo_created_at": "2018-11-03T06:47:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 883,
"forks": 297,
"issues": 19,
"pull_requests": 0
},
"file_meta": {
"content_id": "947... |
dc2acdf8-d4d8-4b3b-a404-8e598fd2c8ee | Aman149/LeetCode-Questions | 0783-minimum-distance-between-bst-nodes/0783-minimum-distance-between-bst-nodes.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.999989 | 6.213557 | {
"github_metadata": {
"branch": "main",
"commit_count": 1043,
"repo_created_at": "2021-12-24T14:30:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "37c8652b2... |
1d0640e5-0936-47c4-a023-cf3743f774c4 | onww1/Problem-Solving | BOJ/Implementation/boj1531_투명.cpp | #pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#include <algorithm>
#include <functional>
#include <iostream>
#include <string>
#include <unordered_set>
#include <unordered_map>
#include <cmath>
#include <ctime>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#incl... | ALGO | 0.999706 | 3.899094 | {
"github_metadata": {
"branch": "master",
"commit_count": 2975,
"repo_created_at": "2018-04-22T02:22:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1f17eaf... |
ee71c955-15a8-4e0f-b220-de2a9c1bb7d8 | SoldierDown/work_space | cs523@rutgers/assignment3/CG/src/Conjugate_Gradient.cpp | //!#####################################################################
//! \file Conjugate_Gradient.cpp
//!#####################################################################
#include <Conjugate_Gradient.h>
//#include <Log/Log.h>
#include <cfloat>
#include <limits>
using namespace Nova;
//##########################... | ALGO | 0.999313 | 5.309258 | {
"github_metadata": {
"branch": "master",
"commit_count": 122,
"repo_created_at": "2019-01-22T05:37:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "57ded1dd... |
8a7c9ee8-37c3-4d1f-82fb-4c27f51c2e6f | emilyju0314/gpt_code_plagiarism | dataset/code_content_classifier/allpro_train/1_5447_0.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <set>
using namespace std;
typedef long long LL;
typedef pair<LL,LL> pll;
pll add(const pll &a, const pll &b){
return pll(a.first + b.first, a.second + b.sec... | ALGO | 0.99991 | 3.632867 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2024-04-28T03:59:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8277d6f28a1... |
2281e700-36e3-4e17-8439-47bf14a28935 | kn0pka22/MSU-numerical-methods | part_1/task_1 (Fourier 1d)/pcalculate.cpp | #include "task_1.hpp"
int pcalculate(int N){
double h;
double* xk = new double[N+1];
double* xk2 = new double[2*N+1];
double* yk = new double[N+1];
double* yk2 = new double[2*N+1];
double* phi = new double[N+1];
double* phi2 = new double[2*N+1];
double* cn = new double[N+1];
double* cn2 = new double[2*N+1... | ALGO | 0.999527 | 3.934297 | {
"github_metadata": {
"branch": "main",
"commit_count": 78,
"repo_created_at": "2024-09-04T19:01:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7b6b5a89249... |
b57453d3-79c2-45be-a232-6b8545a4eca5 | ishaanshah/Competitive-Programming | Others/USACO/January 2018/Silver/Problem 2.cpp | /* Created by <NAME> on 30-05-2018.
* Problem Name: Rental Service
* Problem Link: http://www.usaco.org/index.php?page=viewproblem2&cpid=787
*/
#include <bits/stdc++.h>
using namespace std;
bool comp(pair<int, int> a, pair<int, int> b) {
return a.second > b.second;
}
int main() {
#ifndef ONLINE_JUDGE
... | ALGO | 0.999958 | 4.003225 | {
"github_metadata": {
"branch": "master",
"commit_count": 202,
"repo_created_at": "2018-01-17T07:59:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "978a39fe... |
a76753ae-78e3-49b4-bd6d-ff4fd84c7601 | Chintujukuri/DSA_in_c- | Lecture064 Tree Interview Questions Day2/LeftView.cpp | #include <bits/stdc++.h>
using namespace std;
class node
{
public:
int data;
node *left;
node *right;
node(int data)
{
this->data = data;
this->left = nullptr;
this->right = nullptr;
}
};
node *insertBt(node *root, int data)
{
if (root == nullptr)
{
roo... | ALGO | 0.999977 | 5.030039 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-09-06T07:07: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": "3774383f59b5... |
ac4f6522-c8f5-4a92-a1c4-50d2d5dfbbca | konnichiwa12/SCU-Stuff | COEN79/coen79_Lab3/coen79Lab3/coen79Lab3/sequence1.cpp | //
// sequence1.cpp
// coen79Lab3
//
// Created by dkanai on 1/24/20.
// Copyright © 2020 SCU. All rights reserved.
//
#include "sequence1.h"
#include <cctype> // Provides toupper
#include <iostream> // Provides cout and cin
#include <cstdlib> // Provides EXIT_SUCCESS
#include <cassert>
#include <cm... | TOOL | 0.982074 | 4.361998 | {
"github_metadata": {
"branch": "master",
"commit_count": 103,
"repo_created_at": "2020-10-01T03:41: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": "7c70e45b... |
2bc9807d-a2aa-4b15-b821-4f1df6ae57a9 | ruturajch/Code | TikTokPrep/1996.NumberOfWeakCharacter.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
}
int numberOfWeakCharactersw(vector<vector<int>> &properties)
{
unordered_map<int, int> um;
int max_attack = INT_MIN;
int min_attack = INT_MAX;
int n = properties.size();
for (int i ... | ALGO | 0.999744 | 4.053778 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2023-06-30T05:03: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": "e584e0febad... |
0db988f2-3c5c-4118-873a-14167b1051b2 | Appbird/siv3d-smallest-enclosing-circle | src/Tester.hpp | # pragma once
# include <Siv3D.hpp> // Siv3D v0.6.15
# include <fstream>
# include "SmallestEnclosingCircle.hpp"
# include "Generator.hpp"
//-----------------------------
// データ構造の定義・ユーティリティ関数のプロトタイプ宣言
//-----------------------------
/** @brief テストの結果を表す構造体 */
struct TestCaseResult {
/** 与えられた要件(最小性と内包性)を満たし... | TEST | 0.926432 | 5.981579 | {
"github_metadata": {
"branch": "main",
"commit_count": 65,
"repo_created_at": "2024-11-10T15:06: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": "fab19a36512... |
56e18002-ec35-431f-836b-8523eb12b1c4 | algorithm006-class02/algorithm006-class02 | Week_06/G20200343030374/LeetCode_127_374.cxx | // https://leetcode-cn.com/problems/word-ladder/
#include <string>
#include <vector>
#include <unordered_set>
#include <queue>
using namespace std;
// use queue
class Solution_1 {
public:
int ladderLength(string beginWord, string endWord, vector<string>& wordList) {
unordered_set<string> dicts(wordList.beg... | ALGO | 0.99992 | 5.907875 | {
"github_metadata": {
"branch": "master",
"commit_count": 2140,
"repo_created_at": "2020-02-03T10:22:06.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 33,
"forks": 118,
"issues": 665,
"pull_requests": 0
},
"file_meta": {
"content_id": "60e... |
89d9ebcc-6531-484c-8171-74759d8d0a6d | ILOT-code/new-file | lrj/charpter 11/11-e-19.cpp | #include<vector>
#include<queue>
#include<map>
#include<string>
#include<cstring>
#include<algorithm>
#include<iostream>
#include<iomanip>
using namespace std;
const double eps = 1e-10;
const double INF = 0x3f3f3f3f;
const int maxn = 2000 + 5;
struct Edge {
int from, to, m, t, p, d;
Edge(int u, int v, int m, int t,... | ALGO | 0.999586 | 4.375274 | {
"github_metadata": {
"branch": "main",
"commit_count": 260,
"repo_created_at": "2022-03-12T14:33:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "36c30a3271... |
751c2ad9-a5b6-4519-9777-fc41fd046e90 | vidit1999/daily_coding_problem | data/dailyCodingProblem93.cpp | #include <bits/stdc++.h>
using namespace std;
/*
Given a tree, find the largest tree/subtree that is a BST.
Given a tree, return the size of the largest tree/subtree that is a BST.
*/
struct node{
int data;
node *left, *right;
};
node* newNode(int data){
node* root = new node;
root->data = data;
root->left = r... | ALGO | 0.999974 | 5.514596 | {
"github_metadata": {
"branch": "master",
"commit_count": 290,
"repo_created_at": "2020-09-04T15:44:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4d98a28... |
df60a42e-83a1-40f9-b24b-c04be5061885 | raduMMR/PlayingWithFHE | test2.cpp | #include <iostream>
#include <tfhe/tfhe.h>
#include <tfhe/tfhe_io.h>
#include <stdio.h>
#include <ctime>
using namespace std;
#define N 8
int main(int argc, char **argv) {
if(argc != 3)
{
cout<<"Nr de parametri incorect.\n";
return -1;
}
int8_t plaintext1 = atoi(argv[1]);
int8_t plain... | ALGO | 0.999139 | 3.923231 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2018-03-27T11:15: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": "ec85469de... |
89edc560-b47f-438c-a89d-c31efa23c999 | Redish03/Study_files_all | C++_algorithm_study/2469.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int k, n;
string str;
vector<int> start;
vector<int> finish;
vector<vector<char>> graph;
vector<char> result;
int fault = 0;
int main()
{
cin >> k >> n;
start.resize(k, 0);
finish.resize(k, 0);
graph.resize(n, vector<char>(k... | ALGO | 0.999991 | 3.368053 | {
"github_metadata": {
"branch": "master",
"commit_count": 75,
"repo_created_at": "2022-09-27T11:17:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "50905d782... |
0dc0d8f1-013c-4191-818f-1c6e22e5c1d6 | vedantbothikar/prepit | DSA - Practice/code/design/medium/622. Design Circular Queue/code.cpp | /*
- https://leetcode.com/problems/design-circular-queue/description/
initially:
front = -1
rear = -1
enqueue:
rear = (rear + n + 1) % n
currSize++
Can do this operation if currSize < capacity
dequeue:
front = (front + n + 1) % n
currSize--
But if front == rear, then just set both of them t... | ALGO | 0.998631 | 5.838208 | {
"github_metadata": {
"branch": "main",
"commit_count": 530,
"repo_created_at": "2022-08-30T19:01:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4dbfd2c9e5... |
1bd551da-e3fd-44ba-8931-0aa6723cc9e5 | saga-gis/saga-gis | saga-gis/src/tools/develop/dev_exercises/Exercise_07.cpp |
///////////////////////////////////////////////////////////
// //
// SAGA //
// //
// System for Automated Geoscientific Analyses //
// ... | ALGO | 0.994771 | 4.182549 | {
"github_metadata": {
"branch": "master",
"commit_count": 6655,
"repo_created_at": "2017-05-17T12:47:14.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 50,
"forks": 19,
"issues": 4,
"pull_requests": 1
},
"file_meta": {
"content_id": "7cb940... |
40098c8b-74d8-4042-82df-510996b070a1 | tizm317/CodingTest | Sort1/2751.cpp | //#include <iostream>
//#include <algorithm> // swap
//
//using namespace std;
//
//void MergeSort(int* ar, int k)
//{
// if (k == 1)
// return;
//
// // k -> k/2 크기 배열 두 개로 자름
// // ar[0]~ar[k/2-1]
// MergeSort(ar, k / 2);
//
// // ar[k/2]~ar[k]
// MergeSort(ar + k / 2, k - k / 2);
//
//
// // 임시 배열
// int* addedArr ... | ALGO | 0.999984 | 5.531949 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2023-06-01T12:58: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": "520efb97f12... |
5cc4726f-bd17-4875-9882-194eb263d847 | rubenaciego/supersopa | src/bloom.cpp | #include "bloom.hpp"
#include "murmurhash3.h"
#include <cmath>
#include <limits>
#include <iostream>
IndependentHash::IndependentHash(uint64_t k)
{
coefs.resize(k);
bool nonzero = false;
std::random_device dev;
std::mt19937 rng(dev());
std::uniform_int_distribution<std::mt19937::result_type> dist(... | ALGO | 0.998252 | 5.627923 | {
"github_metadata": {
"branch": "main",
"commit_count": 63,
"repo_created_at": "2022-09-30T08:28: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": "64fe379c874... |
961c5763-e643-4bca-b1a9-8264d0fd6713 | Shadey/Fall_Of_Ferald | src/AI.h | /* The AI class is responsible for determining the decisions that should be
* made by the computer in a combat scenario. It does so by populating a list
* of enemy units at the start of each of it's turns. It then checks whether
* or not any of it's units can engage with the enemy.
* if they can, the AI determine's... | TOOL | 0.917976 | 5.592377 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2015-05-10T23:21:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ebb56916f... |
38ad8b15-9cd3-4bca-93cf-95d0cea6ef55 | CGAL/cgal | Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_OpenMesh.cpp | #include <OpenMesh/Core/IO/MeshIO.hh>
#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
#include <CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h>
// Simplification function
#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_co... | ALGO | 0.976279 | 6.335508 | {
"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... |
3d542f24-322b-4edc-9150-2cdca4a5e24f | rakuishi/atcoder-practice | arc065_a.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int words_size = 4;
vector<string> words = {"dreamer", "dream", "eraser", "erase"};
// 左右反転
reverse(S.begin(), S.end());
for (int i = 0; i < words_size; i++) {
reverse(words[i].begin(), words[i].end());
}
bool match... | ALGO | 0.999905 | 3.877156 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2020-06-24T10:18:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b2b116837... |
1ece8331-f7d6-4df0-bde5-fc848bdf1877 | mhsn08/Data-Structure-Fall-21 | f13.cpp | #include<iostream>
using namespace std;
struct node
{
int info;
node * left , * right;
};
void Perpulate(node * temp)
{
bool ifswap = false;
int tempinfo = 0;
while(true)
{
if(temp->left != NULL && temp->right != NULL)
{
if(temp->info > temp->left->info || temp->inf... | ALGO | 0.999984 | 3.97331 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-10-01T15:37: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": "5516767c0858... |
4769b1dd-c101-4e53-a67b-6d132ac84338 | Black-Jade0/DSA | Codeforces/B1. Reverse Card (Easy Version).cpp | #include <bits/stdc++.h>
#include <cmath>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pllll = pair<ll, ll>;
using vi = vector<int>;
using vs = vector<string>;
using vb = vector<bool>;
using vll = vector<ll>;
using vvi = vector<vector<int>>;
using vvll = vector<vector<ll>>;
using vvb =... | ALGO | 0.99991 | 3.807969 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2025-01-16T10:00: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": "3a3612368... |
a7ea820a-271c-4a10-a14f-5cc1aaa0c631 | yuqin99yuqin99/WebEdu_LocalVersion_YuQin_DotNetCore21 | About-Binary_ASM_CPP_CS-FourPlatformsExpansionLanguages(Examples)/Binary_ASM_CPP_CS(CPP_ConsoleApplicationIOI)/19 lzb.h | #include <string>
#include <iostream>
using namespace std;
namespace lizebao
{
int func4_61()
{
int i, sum1 = 0, sum2 = 0;
for (i = 1; i <= 100; i++)
if (i % 2 == 0) sum1 += i;
else sum2 += i;
cout << "偶数和" << sum1 << " " << "奇数和" << sum2;
return 0;
}
int func4_62()
{
int i, j, sum1 = 0, sum2 ... | ALGO | 0.995606 | 3.276601 | {
"github_metadata": {
"branch": "master",
"commit_count": 136,
"repo_created_at": "2023-09-24T08:34: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": "75f794ed... |
af35ed53-85c3-4918-9e9e-5adf266d05e0 | ojaoweir/AdventOfCode2022 | AdventOfCodeCpp/day7.h | #pragma once
#include <iostream>
#include <fstream>
#include <string>
#include <forward_list>
#include <list>
#include <vector>
#include "day7.h"
#include "FileReader.h"
#include "StringUtils.h"
using namespace std;
class day7
{
class hiearchiFile
{
int size = 0;
std::string name;
public:
hiearchiFile(std::s... | ALGO | 0.977572 | 4.896716 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2022-12-07T16:46: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": "a0e74882d97... |
6b5c0412-e7ea-4b8c-a07f-946a1b24c9cd | junhee-won/problem-solving | BOJ_2467.cpp | // 21/11/21
#include <iostream>
#include <algorithm>
using namespace std;
int n;
int arr[100000];
int abs(int num)
{
if (num > 0)
return num;
else
return -num;
}
int main(void)
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n;
for (int i=0; i<n; i++)
cin >> arr[i... | ALGO | 0.999998 | 4.045544 | {
"github_metadata": {
"branch": "main",
"commit_count": 412,
"repo_created_at": "2021-09-05T05:06: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": "7e743df573... |
2eb98681-71ff-489a-b0cf-feeb9bd5b2cc | alexandraback/datacollection | solutions_1484496_0/C++/jyhuang/C.cpp | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cmath>
#include <iostream>
#include <sstream>
#include <string>
#include <numeric>
#include <utility>
#include <functional>
#include <algorithm>
#include <bitset>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#includ... | ALGO | 0.999451 | 3.200634 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fd238dece... |
f4957072-7362-49d1-9be6-a7cd78f725fc | zakwindy/Post-Minkowski | old_code/equations.h | #ifndef EQUATIONS_H
#define EQUATIONS_H
#include "body.h"
class Equations
{
protected:
double qax;
double qay;
double qbx;
double qby;
double pax;
double pay;
double pbx;
double pby;
double ma;
double mb;
//An array which contains first the positions of both bodies, th... | ALGO | 0.995616 | 3.933455 | {
"github_metadata": {
"branch": "master",
"commit_count": 177,
"repo_created_at": "2020-05-13T20:12:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "75308cc4... |
c6ca7c54-4677-46b5-a24b-db96abc1e05c | luqmanarifin/cp | 0-unclassified/divisions.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 1e9 + 3;
bitset<N> is;
int main() {
long long n;
scanf("%I64d", &n);
long long ans = 1;
int cur = 0;
while(n % 2 == 0) {
cur++;
n /= 2;
}
ans *= cur + 1;
for(long long i = 3; i * i <= n; i += 2) {
if(!is[i]) {
cur = 0;
... | ALGO | 0.999974 | 4.388062 | {
"github_metadata": {
"branch": "master",
"commit_count": 772,
"repo_created_at": "2016-02-09T04:26:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "06200702... |
df11aa37-af31-43f1-95b4-f08e4ffa8131 | op23singh/codes | dp_stone_game_leetcode.cpp | #include<bits/stdc++.h>
#define rep(i, n) for(int i=0;i<n;i++)
#define ll long long int
#define pb push_back
#define endl '\n'
#define vi vector<ll>
#define mod 1000000007
#define vii vector<int>
#define e 0b01110100011101000111010001110100
#define fio ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namesp... | ALGO | 0.999974 | 3.948639 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2021-07-22T12:36:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fc1cf0df0... |
34d35d0a-0ede-4078-9a75-c34a4a238402 | opencv/opencv_contrib | modules/fuzzy/src/fuzzy_F1_math.cpp | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... | ALGO | 0.994924 | 5.374795 | {
"github_metadata": {
"branch": "4.x",
"commit_count": 4557,
"repo_created_at": "2013-09-11T13:28:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 9757,
"forks": 5828,
"issues": 553,
"pull_requests": 88
},
"file_meta": {
"content_id": "40... |
17e0ff5c-f3d0-4816-b468-d6e6ae677c97 | Ryb7532/AtCoder | submissions/abc344/d.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define GET_MACRO(_1,_2,_3,NAME,...) NAME
#define rep3(i,s,e) for (int i=(int)s; i<(int)e; i++)
#define rep2(i,n) rep3(i,0,n)
#define rep1(n) rep2(_,n)
#define rep(...) GET_MACRO(__VA_ARGS__,rep3,rep2,rep1)(__VA_ARGS__)
#define ... | ALGO | 0.99997 | 4.116474 | {
"github_metadata": {
"branch": "master",
"commit_count": 249,
"repo_created_at": "2021-06-27T06:11:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "62dd4de5... |
7e2e97b7-3d27-4665-ac40-f6de46013e05 | ishandutta2007/codeforces-a | alexxela12345/normal/1253/A.cpp | #include <bits/stdc++.h>
using namespace std;
// #define int long long
typedef long long ll;
typedef long double ldb;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
vector<int> a(n), b(n);
for (int i = 0; i < n; i++) {
cin >... | ALGO | 0.999867 | 4.147215 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-04-11T00:51:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0162e3332624... |
8a7b41b4-8327-44e1-ab1c-8d3c331171ec | JaredSantiago-code/LED-Home-Automation-System | src/HomeAutomationSystem.ino | // Arduino-based Home Automation System with LED Strip Control
// Uses temperature sensor to control LED strip color and brightness smoothly based on temperature thresholds
#include <DHT.h> // DHT library for temperature sensor
#include <Adafruit_NeoPixel.h> // NeoPixel library for LED strip control
// Def... | TOOL | 0.946311 | 7.131216 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-10-31T03:40:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a4b5650d772e... |
f8812dcd-d7aa-4062-9000-15bf9722d733 | minilange/EOP_LZW | code/decode.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <filesystem>
#include <bits/stdc++.h>
using namespace std;
typedef basic_string<uint8_t> ustring;
int main(int argc, char *argv[])
{
// Input validation
if (argc != 2)
{
if (argc > 2)
cout << "Too many... | TOOL | 0.920887 | 4.664396 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-05-11T17:57: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": "3cd8338ea63a... |
f71a6c18-f0aa-4afb-a946-63c62a40c8ee | renato-yuzup/axis-fem | Axis.Solver/domain/algorithms/WaveSpeedProportionalClockwork.cpp | #include "WaveSpeedProportionalClockwork.hpp"
#include <omp.h>
#include "domain/elements/ElementGeometry.hpp"
namespace adal = axis::domain::algorithms;
namespace ada = axis::domain::analyses;
namespace adc = axis::domain::collections;
namespace ade = axis::domain::elements;
namespace afb = axis::foundation::blas;... | ALGO | 0.996781 | 6.286934 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2019-03-14T01:27:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "151d787585... |
a7366871-f777-4c88-b646-f10273cc0f20 | longwatermelon/usaco | silver/23jan2.cpp | #include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define sig(x) (x<0?-1:1)
#define sz(x) ((int)size(x))
#define all(x) begin(x),end(x)
#define all1(x) begin(x)+1,end(x)
template <typename T> T cdiv(T a, T b) {return a/b+(sig(a)/sig(b)==1 && a%b);}
template <typename T> using vec=vector<T>;
template <ty... | ALGO | 0.999728 | 4.361421 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2024-09-11T14:30:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1d2b0bd76... |
ba089551-574d-441d-84e5-308ef8c921c1 | GNLimerence/CProgramming | CountSolutions.cpp | #include <iostream>
#include <vector>
using namespace std;
int count2 = 0;
void countSolutions(int n, int M, vector<int>& a, vector<int>& x, int current, int sum) {
if (current == n) {
if (sum == M) {
count2++;
}
return;
}
for (int i = 1; i <= M; i++) {
if (sum... | ALGO | 0.999993 | 4.527398 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2023-10-04T06:15:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3ce1682e1... |
c98d138e-03de-4bce-aee8-e4e37ebe6d69 | dibery/UVa | vol102/10200.cpp | #include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
int prime[ 4800 ] = { 2 }, counter, size = 0, a, b, num[ 10001 ];
bool judge[ 10000 ] = { false };
bool isprime( int in )
{
for( int i = 1; i <= size; ++i )
if( in % prime[ i ] == 0 )
return false;
return true;
}
int m... | ALGO | 0.999427 | 3.824516 | {
"github_metadata": {
"branch": "master",
"commit_count": 149,
"repo_created_at": "2014-05-06T07:50:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fb245428... |
2709bbab-44f7-4d92-945b-83a033063e7e | igor-senin/blink-tree | blinktree.hpp | #ifndef BLINKTREE_HPP
#define BLINKTREE_HPP
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <stack>
#include <string>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "allocate_data.hpp"
#include "file_meta.h"
#inc... | TOOL | 0.965829 | 5.798445 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2024-10-15T11:15:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e4d5431f2... |
2fa87211-f7a8-4ad4-ab0f-8815cab4768f | sophgo/tpu-mlir | third_party/or-tools/include/ortools/util/range_minimum_query.h | // Copyright 2010-2022 Google LLC
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... | ALGO | 0.999526 | 7.606228 | {
"github_metadata": {
"branch": "master",
"commit_count": 4295,
"repo_created_at": "2022-06-03T11:54:08.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 759,
"forks": 186,
"issues": 69,
"pull_requests": 1
},
"file_meta": {
"content_id": "66c... |
baed0764-ca0f-4119-b346-62ca072426db | ishandutta2007/codeforces-a | ashishgup/normal/1238/C.cpp | #include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define int long long
const int N = 2e5 + 5;
int n, h;
int a[N];
int32_t main()
{
IOS;
int t;
cin >> t;
while(t--)
{
cin >> h >> n;
for(int i = 1; i <= n; i++)
cin >> a[i];
a[... | ALGO | 0.999922 | 3.706488 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-04-11T00:51:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5ecce524ff23... |
1b1614e1-65d5-4f0b-993f-b0c10e050b66 | Mustafa-Noor/DSA-Lab | LAB 6/DoublyLinkedList.cpp | #include <iostream>
using namespace std;
class Node {
public:
int data;
Node* next;
Node* prev;
Node(int value) {
data = value;
next = nullptr;
prev = nullptr;
}
};
class DoublyLinkedList {
public:
DoublyLinkedList() {
head = nullptr;
}
~DoublyLinkedLi... | ALGO | 0.999682 | 6.786678 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-12-11T16:31: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": "d25a39355e17... |
33517d32-5dc7-4b6a-bd46-ec79e71a3f40 | DionysiosB/CodeForces | 0400-0499/460C-Present.cpp | #include <cstdio>
#include <vector>
bool check(long h, const std::vector<long> &a, long m, long w){
const long n = a.size();
std::vector<long> v(n + w + 1, 0);
long cnt(0), total(0);
for(long p = 0; p < n; p++){
cnt += v[p];
long diff = h - (a[p] + cnt);
if(diff < 0){continue;}... | ALGO | 0.999978 | 3.9619 | {
"github_metadata": {
"branch": "master",
"commit_count": 4487,
"repo_created_at": "2013-06-27T18:15:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 690,
"forks": 163,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0a3... |
4d067621-e2d2-4c83-8a28-8b75b04a9fdc | Chiki1601/Hackerearth-Solutions | Algorithms/Sorting/Bubble Sort/Benny and Segments.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int test, n, L;
cin >> test;
pair<int, int> a[2020];
while(test--)
{
bool present = false;
cin >> n >> L;
for(int i = 1; i <= n; i++)
cin >> a[i].first >> a[i].second;
sort(a + 1, a + 1 + n);
... | ALGO | 0.99998 | 4.042744 | {
"github_metadata": {
"branch": "main",
"commit_count": 1808,
"repo_created_at": "2022-09-09T09:13:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 2,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "6da9b1f0... |
a3f039ce-32da-410a-ba3e-c2ca3252d8a3 | ishandutta2007/codeforces-n | ngyupeng06/normal/1348/C.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long int li;
typedef pair<int,int> pii;
typedef pair<li,li> pll;
#define mp make_pair
#define pb push_back
long long t, n, m, a, b, c, d, e, f, k;
string arr[100005], s;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cin >> t;
while(t--){
cin >> n >>... | ALGO | 0.999982 | 3.603919 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:35: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": "634737d86548... |
de622831-635b-4703-967e-740a953a024d | moonn6pence/PS_solutions | cpp_solutions/boj_2230/boj_2230.cpp | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int N, M;
vector<int> A;
void input(){
cin >> N >> M;
int i = N, tmp;
while (i--){
cin >> tmp;
A.push_back(tmp);
}
}
int search(){
int lo = 0, hi = 1;
int ansLo = 0, ansHi = N - 1;
while (lo ... | ALGO | 0.999994 | 3.908432 | {
"github_metadata": {
"branch": "master",
"commit_count": 525,
"repo_created_at": "2021-01-04T07:25: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": "ecf20df1... |
95da0067-1382-472a-9b14-a6dc811414a6 | kamyu104/LeetCode-Solutions | C++/assign-elements-to-groups-with-constraints.cpp | // Time: O(m + r * logn), m = len(groups), n = len(elements), r = max(groups)
// Space: O(r)
// hash table, number theory
class Solution {
public:
vector<int> assignElements(vector<int>& groups, vector<int>& elements) {
const int mx = ranges::max(groups);
vector<int> lookup(mx, -1);
for (i... | ALGO | 0.999958 | 6.239534 | {
"github_metadata": {
"branch": "master",
"commit_count": 19395,
"repo_created_at": "2018-10-11T17:38:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4939,
"forks": 1616,
"issues": 1,
"pull_requests": 55
},
"file_meta": {
"content_id": ... |
507dcd6b-30b6-4f23-b472-ecaaddbb7ac3 | bigship/leetcode_solutions | 1071_GreatestCommonDivisorOfStrings.cpp | // 1071. Greatest Common Divisor of Strings
/*
* For two strings s and t, we say "t divides s" if and only if s = t + ... + t
* (t concatenated with itself 1 or more times)
Given two strings str1 and str2, return the largest string x such that x divides both str1 and str2.
Example 1:
Input: str1 = "ABCABC", str2 =... | ALGO | 0.999736 | 6.340612 | {
"github_metadata": {
"branch": "master",
"commit_count": 687,
"repo_created_at": "2013-10-10T13:53:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bffb0ce4... |
a98a148a-a648-4438-aa8b-f61109008e07 | GeorgiKaradakov/Advent_of_Code | 2023/day_10.cpp | #include "../headers/day_10.h"
using namespace std;
typedef pair<pair<int, int>, vector<vector<char>>> input_type;
unordered_map<char, vector<pair<int, int>>> dxy{
{'|', {{1, 0}, {-1, 0}}}, {'-', {{0, 1}, {0, -1}}}, {'L', {{-1, 0}, {0, 1}}},
{'J', {{-1, 0}, {0, -1}}}, {'7', {{0, -1}, {1, 0}}}, {'F', {{0, 1}, ... | ALGO | 0.999915 | 5.56026 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-12-26T23:25: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": "846bb2fe0ba1... |
babf6f7e-3158-452b-b7fe-0e1d732e3c73 | DipanPramanik098/DSA-CPP | _06_Basic Hashing/_01_count freequency.cpp | #include <bits/stdc++.h>
#include<iostream>
using namespace std;
//~: <NAME> :~
vector<int> preprocess(vector<int>& array) {
int max_value = *max_element(array.begin(), array.end());
vector<int> hashArray(max_value + 1, 0);
for (int number : array) {
hashArray[number]++;
}
return hashArra... | ALGO | 0.999665 | 5.972456 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-07-05T04:25: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": "5f05cd283256... |
fe07299e-e5ea-4c33-a065-f7035f222e7d | SailHe/archives-algorithm | AlgorithmLearning/src/agoj/agoj18_10_17.cpp | #include<stdio.h>
#include<string.h>
#include<string>
#include<cmath>
#include<vector>
#include<iostream>
#include<queue>
#include<functional>//greater
#include<list>
#include<stack>
#include<map>
#include<iomanip>//cout各种操纵器
/*setfill(char ch) Fill whitespace with 'ch'
setprecision(int n) Set floating - poi... | ALGO | 0.999894 | 3.394371 | {
"github_metadata": {
"branch": "master",
"commit_count": 245,
"repo_created_at": "2018-10-18T12:20: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": "1585b809... |
07f68b5c-c66a-404f-983e-8c08dcce641b | ShivamAwasthi07/Data-Structures-Algorithms | dp/minsubsetdiff.cpp | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
//these three are for checking if subset exist or not and equal sum partition
bool checkSubSetSumMemo(vector<int> v, int sum, int index, vector<vector<int> >&dp){
if(sum < 0 || index == v.size()){
return false;
}
if(sum == 0){
... | ALGO | 0.999867 | 4.35508 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2023-05-24T18:58: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": "76192146b... |
0254eb6d-03fa-44a8-af40-7e5e86c1f77f | ishandutta2007/codeforces-s | shnirelman/normal/1535/B.cpp | #include <bits/stdc++.h>
#define f first
#define s second
using namespace std;
using li = long long;
using ld = long double;
using pii = pair<int, int>;
void solve() {
int n;
cin >> n;
vector<int> a(n), b;
for(int i = 0; i < n; i++) {
cin >> a[i];
if(a[i] % 2 == 1)
b.push... | ALGO | 0.999627 | 4.163996 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:07: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": "daa6e4a4a7e2... |
cceee431-f050-478d-87e8-f79e862c7b79 | wiizii/Algorithm_solution | programmers/배달.cpp | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
#define INF 0x3f3f3f3f
using namespace std;
vector<pair<int, int>> adj[51];
vector<int> dijkstra(int n, int start) {
vector<int> dist(n + 1, INF);
priority_queue<pair<int, int>> pq;
dist[start] = 0;
pq.push({start, 0});
wh... | ALGO | 0.999894 | 4.320882 | {
"github_metadata": {
"branch": "master",
"commit_count": 555,
"repo_created_at": "2020-05-11T06:56:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cde94bfa... |
62ea4619-61f9-48be-92d6-65988373c499 | shivamRavishankarChaurasia/Sortingalo | radixsort.cpp | #include <iostream>
using namespace std;
int Getmax(int arr[], int size)
{
int max = arr[0];
for (int i = 0; i < size; i++)
{
if (arr[i] > max)
{
max = arr[i];
}
}
return max;
}
void CountingSort(int arr[], int size, int div)
{
int output_array[size];
in... | ALGO | 0.999978 | 5.171582 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-12-08T10:59:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0031207f00... |
bfa72351-9254-4bb2-ba74-203e738ce9ac | gustavosm/uri | 1875.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int v[3];
char M, S;
int cases;
int gols;
cin >> cases;
while(cases--)
{
v[0] = v[1] = v[2] = 0;
cin >> gols;
while (gols--)
{
cin >> M >> S;
if (M == 'G')
{
if (S == 'R') ++v[0];
else v[0] += 2;
}
if (M == 'B')
... | ALGO | 0.999558 | 4.673827 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2015-05-21T11:39:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 17,
"forks": 11,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "804242b... |
f1d5c95a-2195-4c4a-9967-db9129ce8ecb | phitronio/Batch-4-Introduction-to-cpp-for-DSA | Module 1/min_max_swap.cpp | #include <iostream>
#include <algorithm>
#include <utility>
using namespace std;
// void my_swap(int *a, int *b)
// {
// int tmp = *a;
// *a = *b;
// *b = tmp;
// }
int main()
{
int a, b;
cin >> a >> b;
swap(a, b);
cout << a << " " << b << endl;
// int a, b, c, d;
// cin >> a >> b >... | ALGO | 0.999772 | 4.664639 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-11-11T09:32:09.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 20,
"forks": 13,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7443a2b3669... |
358cb636-2389-4de5-b190-72d933e7abab | pbamotra/hire | src/main.cpp | /*
* File: main.cpp
* Author: pbamotra
* Company: PayPal India
*
* Created on February 1, 2014, 7:19 PM
*
* Given an array of integer elements and an integer d please consider all the
* sequences of d consecutive elements in the array. For each sequence we
* compute the difference between the maximum and the... | ALGO | 0.998884 | 4.795976 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2014-02-01T16:46:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d1ceed49f3... |
fc305d35-8a93-479f-bf5e-303dd2fb36eb | louisluhao/CodingPractise | USACO/1.3/MixingMilk/milk.m.cpp | /*
ID: louislu1
PROG: milk
LANG: C++
*/
#include <iostream>
#include <fstream>
#include <string>
#include <map>
using namespace std;
int main() {
ofstream fout ("milk.out");
ifstream fin ("milk.in");
int totalMilk;
map<int,int> farms;
fin >> totalMilk;
int n;
fin >> n;
for(int i = 0; ... | ALGO | 0.999936 | 3.948465 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2016-08-10T19:22:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ddaa2068d... |
cc8b198e-f22b-4924-b3df-6381e9634466 | JimmyWang0417/Algorithm-Competitive-Codes | Libre Online Judge/#10156.cpp | #include <cstdio>
#define re register
#define N 1510
using namespace std;
inline int min(int a, int b)
{
return a < b ? a : b;
}
inline int read()
{
char s = getchar();
bool f = false;
int x = 0;
while (!(s >= '0' && s <= '9'))
{
if (s == '-')
f = true;
s = getchar();... | ALGO | 0.999247 | 3.696797 | {
"github_metadata": {
"branch": "master",
"commit_count": 106,
"repo_created_at": "2019-08-30T06:36:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "04e57b45... |
09d87a7d-42fd-4a86-8e78-e05a09a793ae | Arif-Rahman-Sikder/ICPC-Assiut-University-Community-Problemset | Sheet #3 (Arrays)/T_Matrix.cpp | // #include<bits/stdc++.h>
// using namespace std;
// int main(){
// int n;
// cin>>n;
// int arr[100][100];
// int pcount=0, scount=0;
// for(int i=0;i<n;i++){
// for(int j=0;j<n;j++){
// cin>>arr[i][j];
// if(i == j)
// pcount += arr[i][j];
// ... | ALGO | 0.999966 | 5.275214 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-09-26T18:31:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "609c5c618e6d... |
b7b08969-d867-4400-8a95-54d156b6bf85 | jdb19937/makemore | warp.cc | #define __MAKEMORE_WARP_CC 1
#include "warp.hh"
#include <assert.h>
#include <string.h>
#include <math.h>
namespace makemore {
void warp(double *src, double wx, double wy, double wz, double wr, int w, int h, double *dst) {
double dx = ((wx - 0.5) * 16.0);
double dy = ((wy - 0.5) * 16.0);
double z = 1.0 + (wz -... | ALGO | 0.997423 | 5.506076 | {
"github_metadata": {
"branch": "master",
"commit_count": 421,
"repo_created_at": "2018-12-26T17:10:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "31cb4043... |
eaa766f9-cf24-4206-a038-4fe35b14f90e | Philosophyofmany/dictionary_codec | src/query/query_handler.cpp | #include "../../include/query_handler.h"
#include "../../include/query_utils.h"
#include <iostream>
#include <chrono> // For timing
// Constructor to initialize the dictionary, encoded data, and index map
QueryHandler::QueryHandler(const std::unordered_map<std::string, int>& dictionary, const std::vector<int>& encoded... | ALGO | 0.926519 | 6.463889 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2024-11-11T20:56: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": "3d85514a9a5... |
f832cddd-94b0-4258-8547-d008fe27431a | blendmaster/rigid-faces | src/pca_aam.cpp |
/*
Copyright (C) 2009-2010 <NAME> (<EMAIL>) , Dr. <NAME>
BITS Pilani Goa Campus
http://code.google.com/p/aam-opencv/
This program 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, version 3... | ALGO | 0.995324 | 3.661882 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2014-04-18T21:45:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "07f385ef... |
118f4e9a-383c-4b50-830b-ddd1a92e86f9 | uoft-cs-robotics/robot_system_tools | franka_control_suite/src/interpolator/interpolator.cpp | #include "interpolator/interpolator.h"
QuinticInterpolator::QuinticInterpolator(double interpolation_timestep)
: interpolation_timestep_(interpolation_timestep) {};
void QuinticInterpolator::setInterpolationTimeWindow(double interpolation_window) {
interpolation_window_ = interpolation_window;
// Update ... | ALGO | 0.964925 | 6.090827 | {
"github_metadata": {
"branch": "master",
"commit_count": 175,
"repo_created_at": "2022-11-03T21:30:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 10,
"forks": 3,
"issues": 3,
"pull_requests": 2
},
"file_meta": {
"content_id": "e2da633c... |
9de428ed-cf67-4749-81c9-48286ab6f21c | ngiokweng/Data_Struct_And_Algorithm | 線性表(順序表、鏈表)/線性表/鏈式存儲結構(雙向鏈表).cpp | #include <iostream>
#include <string>
using namespace std;
//函數結果狀態代碼
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define INFEASIBLE -1
#define OVERFLOW -2
typedef int Status;
typedef char ElemType;
typedef struct DuLNode {
ElemType data;
DuLNode* prior, * next;
}*DuLinkList;
//取鏈表第i個元素值,並返回該節點指針... | ALGO | 0.998877 | 3.237938 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2021-10-30T12:54:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2d0f58b568b... |
b71197e8-5a43-4010-94ca-3304627a1fb2 | scidylanpno/dslo | min_and_remove.cc | /*
*
* For paper 'Finding Subgraphs with Maximum Total Density and Limited Overlap in Weighted Hypergraphs'
*
* Copyright reserved.
*
*/
#include "utility.h"
#include "hypergraph.h"
#include "algorithms.h"
string info = R"(
The program takes 5+1 arguments:
- the location of the nodes file;
- the location of the... | ALGO | 0.992032 | 4.210398 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-10-04T08:15: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": "32bb4d8df384... |
5840c8a1-7938-47f3-9b20-7d26b02481f9 | preyansraval/cp_journey | C_Sagheer_and_Nubian_Market.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll checker(ll n, ll S, vector<ll>& arr, ll k) {
vector<ll> temp(n, 0);
ll sum = 0;
for(ll i = 0;i < n;i++) {
temp[i] = (arr[i] + (i+1)*k);
}
sort(temp.begin(), temp.end());
for(ll i = 0;i < k;i++)
sum += temp[i];... | ALGO | 0.999855 | 4.340423 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2025-04-05T17:43: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": "ef4d2050460... |
caeacf49-8d1c-4454-bbe0-e43ff2fb1fd5 | siva-msft/cpptraj | src/Cluster_HierAgglo.h | #ifndef INC_CLUSTER_HIERAGGLO_H
#define INC_CLUSTER_HIERAGGLO_H
#include "ClusterList.h"
#include "ClusterMatrix.h"
#ifdef TIMER
# include "Timer.h"
#endif
class Cluster_HierAgglo : public ClusterList {
public:
Cluster_HierAgglo();
static void Help();
int SetupCluster(ArgList&);
void ClusteringInfo() ... | ALGO | 0.995497 | 5.240754 | {
"github_metadata": {
"branch": "master",
"commit_count": 9277,
"repo_created_at": "2020-04-21T19:28:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "8a790b5... |
a067ed5b-56b4-42dd-9c3d-572d2c80e6e3 | akash4-sys/DSA | Leetcode/Hard/446.cpp | #include "../../headers.h"
class Solution
{
public:
int numberOfArithmeticSlices(vector<int> &v)
{
int ans = 0, n = v.size();
vector<unordered_map<long, int>> dp(n);
for (int i = 0; i < n; i++)
for (int j = 0; j < i; j++)
{
long d = (long)v[i] - v... | ALGO | 0.999982 | 5.836866 | {
"github_metadata": {
"branch": "main",
"commit_count": 272,
"repo_created_at": "2022-07-17T09:39:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "05a4f1817b... |
58a5789d-9f05-4d15-89c7-71e2ec22d358 | Talk2dilshad/c-code | linklist/Menu-Driven-Matrix.cpp | /*
SUM , DIFFERENCE ,MULTIPLICATION ,TRANSPOSE OF MATRICS...
BY <NAME>
*/
#include <iostream>
using namespace std;
class Matrix
{
int First_Matrix[10][10], Second_Matrix[10][10], product_matrix[10][10], difference_matrix[10][10],
Sum_matrix[10][10],transpose_matrix[10][10];
int x,y,i,j; // row->x, col ... | ALGO | 0.999336 | 4.624095 | {
"github_metadata": {
"branch": "c",
"commit_count": 143,
"repo_created_at": "2021-03-10T14:36: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": "13f6e88918d1a... |
d5083ae7-99bb-443e-a989-367a24cf82f2 | GuruneLee/CPP-Algo | Baek-Joon/BinSearch/16960-다시/src.cpp | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> v(n+1, vector<int>());
for (int i=1; i<n+1; i++) {
int t;
scanf("%d", &t);
while(t--) {
int x;
scanf("%d", &x);
v[i].push_bac... | ALGO | 0.9999 | 3.062304 | {
"github_metadata": {
"branch": "master",
"commit_count": 228,
"repo_created_at": "2020-12-09T05:07: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": "36b9f481... |
32602480-599e-40ac-9c3a-d5b3ec72d329 | Mtaylorr/Competitive-programming-Solutions | DS/Sparse Table/Codeforces_1142_B.cpp | //https://codeforces.com/problemset/problem/1142/B
#include <bits/stdc++.h>
#define pb push_back
#define fi first
#define se second
typedef long long int ll;
using namespace std;
const int N = 2e5 + 5, M = 1000 + 5, E = 1e6 + 5;
const int MOD =998244353 ;
const double eps = 1e-7;
int n,m,q;
int p[N];
int a[N];
int... | ALGO | 0.99999 | 4.224692 | {
"github_metadata": {
"branch": "main",
"commit_count": 1208,
"repo_created_at": "2021-07-28T20:32:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 49,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2c330cf2... |
392e8766-ee56-4ce6-9948-94ed4f6b9494 | ishandutta2007/codeforces-p | pavel.savchenkov/normal/500/B.cpp | #include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <utility>
#include <cstdlib>
#include <memory>
#include <queue>
#include <cassert>
#include <cmath>
#include <ctime>
using namespace std;
#define pb push_back
#defin... | ALGO | 0.999913 | 3.459069 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:49:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bc5d10b81857... |
b900e0e3-22a8-453b-a3d9-4607c0d1bcc5 | uscvex/RobotCode | TurningPoint/CodeSnippets/autonComp1.cpp |
// AUTON ROUTINE FOR MULTI-BOT STARTING ON RED
double redAuton[] = {
180, // ROBOT STARTS 180° RELATIVE TO FIELD
PAUSE,3, // WAIT 3 SECONDS
INTAKE_ON, // TURN INTAKE ON
PAUSE,GOTBALL,5, // WAIT TILL GOT BALL (OTH... | ALGO | 0.979536 | 4.040135 | {
"github_metadata": {
"branch": "master",
"commit_count": 588,
"repo_created_at": "2015-10-01T23:44:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e1645d77c... |
b7c6221f-6db5-4a68-a242-c05fa8e480fe | yiftan/Onboard-SDK-3.1 | tools/localMissionPlanning/inc/twopoint-trajectory-generator/FeasibleTrajectory.h | /*! @file FeasibleTrajectory.h
*
* @brief
* See FeasibleTrajectory class.
*
* @copyright 2016 DJI. All rights reserved.
* Unauthorized copying of this file via any medium is strictly prohibited.
* Proprietary and confidential.
*/
#ifndef FEASIBLETRAJECTORY_H
#define FEASIBLETRAJECTORY_H
#define EPS 1e-6
... | ALGO | 0.998407 | 6.308082 | {
"github_metadata": {
"branch": "master",
"commit_count": 98,
"repo_created_at": "2016-11-07T11:29: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": "b19dccb13... |
8cc3523b-3529-44e7-8fe3-f287887c0f49 | Dipankar-Kumar-Singh/Codeforces | C_k_Tree.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
const long long MOD = 1e9 + 7;
const long long INF = numeric_limits<long long>::max();
#define t_case int ttt {} ; cin >> ttt ; while(ttt--)
#define FAST ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
#define all(x) (x).begin() , (x... | ALGO | 0.999825 | 3.71825 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-02-10T11:42:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1e0069471ede... |
1a2dfcac-9332-4043-bffe-2f80a89ed96a | ishandutta2007/codeforces-l | lzr_010506/normal/1738/D.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int b[N];
vector<int> a[N];
int main()
{
int T;
scanf("%d", &T);
while(T --)
{
int n;
scanf("%d", &n);
int k = 0;
int p = -1;
for (int i = 0; i <= n + 1; i ++) a[i].clear();
for (int ... | ALGO | 0.999877 | 3.777276 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:17:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "da54f5120445... |
95ab6405-1bff-43c5-bfda-6eaed0af647f | olivo/side-channel-analyzer | Z3-str/z3/lib/pdr_prop_solver.h | /*++
Copyright (c) 2011 Microsoft Corporation
Module Name:
prop_solver.h
Abstract:
SAT solver abstraction for PDR.
Author:
<NAME> (t-khoder) 2011-8-17.
Revision History:
--*/
#ifndef _PROP_SOLVER_H_
#define _PROP_SOLVER_H_
#include <map>
#include <string>
#include <utility>
#include "ast.h"
#inclu... | ALGO | 0.996938 | 6.987146 | {
"github_metadata": {
"branch": "master",
"commit_count": 80,
"repo_created_at": "2015-11-19T20:42:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 16,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "63e401cd... |
3d7b448d-2232-4b63-9bcf-9b22bcda0d0d | ishandutta2007/codeforces-c | chinese_zjc_/normal/1614/B.cpp | // This Code was made by Chinese_zjc_.
#include <bits/stdc++.h>
// #define debug
int T, n, a[200005], rk[200005], ans[200005];
long long tot;
signed main()
{
std::ios::sync_with_stdio(false);
std::cin >> T;
while (T--)
{
tot = 0;
std::cin >> n;
for (int i = 1; i <= n; ++i)
... | ALGO | 0.999768 | 4.0198 | {
"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": "86755eeb3c1c... |
859a53fa-4a07-41f4-8997-d006838f3871 | elbica/algorithm | 프로그래머스/lv3/81303. 표 편집/표 편집.cpp | #include <string>
#include <vector>
#include <stack>
#include <iostream>
using namespace std;
string solution(int n, int k, vector<string> cmd) {
stack<pair<int,pair<int,int>>> st;
vector<int> next(n + 2), prev(n + 2);
int here = k + 1;
// start: 0, end : n+1
for(int i=0; i<=n+1; i++) next[i]... | ALGO | 0.999958 | 4.932361 | {
"github_metadata": {
"branch": "main",
"commit_count": 142,
"repo_created_at": "2020-11-05T16:38: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": "13c17b891b... |
33ed283a-333e-4123-aece-56908bedaac6 | DesZou/Project-Eros | LuoGu/3911.cc | /**
* luogu 3911
*
* mobius inversion
*
*/
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
const int N = 3e5 + 5;
int cnt[N];
int p[N];
long long mu[N];
long long f[N];
bool notp[N];
int n, m;
void sieve() {
mu[1] = 1;
for (int i = 2; i <= m; ++i) {
if (!notp[i]) { p[++*p] = i;... | ALGO | 0.999887 | 4.184125 | {
"github_metadata": {
"branch": "master",
"commit_count": 51,
"repo_created_at": "2017-10-11T11:20:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "464a6bb83... |
b686da5f-8185-4f51-8235-aadb91a9ff91 | zeroli/myleetcode | LCpractise/103Binary Tree Zigzag Level Order Traversal .cc | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
// use two stacks: one for current level, and one for next level
vector<vector<int>> zigzagLeve... | ALGO | 0.999997 | 6.099873 | {
"github_metadata": {
"branch": "master",
"commit_count": 114,
"repo_created_at": "2022-07-27T16:06: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": "4cc3dd94... |
5f1d06bb-d1e0-4aad-8325-72bc2e7facfc | h4wwk3ye/code | Hackerearth/February Circuits/perfect_cubes.cpp | /*
C++
encoding:UTF-8
Modified: <20/Feb/2019 07:53:56 PM>
✪ H4WK3yE乡
<NAME>
Indian Institute Of Information Technology (IIIT),Gwalior
*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 10000... | ALGO | 0.999542 | 3.862123 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2022-03-12T15:34: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": "88551fab77... |
73be7470-c8b4-44c2-99e6-3c57a1a29372 | neha-tp/DSA | lab2/pointer.cpp | #include<iostream>
#include<cmath>
#include<cstdlib>
//Function to check for a palindrome number
void palindrome(int* num)
{
int* temp=(int*)malloc(sizeof(int));
int* pal=(int*)calloc(1,sizeof(int));
*temp=*num;
while(*temp>0)
{
*pal=(*pal*10)+(*temp%10);
*temp=*temp/10;
}
i... | ALGO | 0.969319 | 3.141935 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-05-03T17:29: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": "45bd604aab64... |
c0e5c2a2-8eee-4da5-b7c0-58c40b55c794 | cesar-borba/beecrowd-leetcode-questions | beecrowd/1000-1499/bee_1151.cpp | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define dbg(x) cout << #x << " = " << x << endl
#define print(x) cout << x << "\n"
typedef long long ll;
const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3f... | ALGO | 0.99995 | 3.382841 | {
"github_metadata": {
"branch": "main",
"commit_count": 118,
"repo_created_at": "2024-09-01T16:13:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "39c5871707... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.