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 |
|---|---|---|---|---|---|---|---|
b744a48b-519d-4b75-883e-a24931effa13 | trilinos/Trilinos | packages/stk/stk_middle_mesh/stk_middle_mesh/patch_energy_objective.cpp | #include "patch_energy_objective.hpp"
namespace stk {
namespace middle_mesh {
namespace opt {
namespace impl {
double PatchEnergyObjective::compute_quality(const utils::Point& ptIn)
{
double q = 0;
const std::vector<utils::Point>& verts = m_data->get_unique_verts();
for (unsigned int i = 1; i < verts.s... | ALGO | 0.935331 | 6.493423 | {
"github_metadata": {
"branch": "master",
"commit_count": 104031,
"repo_created_at": "2015-11-16T19:39:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1299,
"forks": 593,
"issues": 263,
"pull_requests": 61
},
"file_meta": {
"content_id":... |
dca29526-0cb0-4968-9cd2-8d1e2923b7b4 | OpenXRay/xray-16 | src/xrGame/cover_evaluators.cpp | ////////////////////////////////////////////////////////////////////////////
// Module : cover_evaluators.h
// Created : 24.04.2004
// Modified : 24.04.2004
// Author : <NAME>
// Description : Cover evaluators
////////////////////////////////////////////////////////////////////////////
#include "StdAfx.h"
#inclu... | ALGO | 0.99624 | 5.486408 | {
"github_metadata": {
"branch": "dev",
"commit_count": 8240,
"repo_created_at": "2014-09-05T04:28:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3256,
"forks": 472,
"issues": 220,
"pull_requests": 23
},
"file_meta": {
"content_id": "24f... |
8243131e-ba31-42e1-9cc5-b9273db1daec | computercolin/PCat-Optimize | MyDistribution.cpp | #include "MyDistribution.h"
#include <RandomNumberGenerator.h>
#include <Utils.h>
#include <cmath>
#include <boost/math/special_functions/erf.hpp>
#include <iostream>
using namespace DNest3;
MyDistribution::MyDistribution(double l_min, double l_max,
double b_min, double b_max, bool radec,
double fluxlo,
... | ALGO | 0.978461 | 4.703374 | {
"github_metadata": {
"branch": "mymodel_loglikely_pointer_n_simd",
"commit_count": 58,
"repo_created_at": "2020-02-16T14:49:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
... |
aa27f4a5-fad0-4984-b5b1-f5c4f8b3a283 | dennismalmgren/tddd95 | exercise6/george.cpp | //distance/parent[] shortest_path(graph G, node start)
#include "algo_lib.h"
#include <bits/stdc++.h>
std::ifstream cin("in_george.txt");
//auto& cin = std::cin;
using namespace algo;
struct TestCase {
TestCase(int n, int m, int a, int b, int k, int g)
: n(n), m(m), a(a), b(b), k(k), g(g)
, george_int... | ALGO | 0.999869 | 3.605406 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2023-01-12T06:49: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": "853e3e26533... |
889bb54e-e921-493b-afca-96edfa9f1a11 | fontanf/coloringsolver | src/algorithms/milp_cplex.cpp | #if CPLEX_FOUND
#include "coloringsolver/algorithms/milp_cplex.hpp"
#include "coloringsolver/algorithm_formatter.hpp"
#include <ilcplex/ilocplex.h>
using namespace coloringsolver;
ILOSTLBEGIN
////////////////////////////////////////////////////////////////////////////////
////////////////////////// Assignment-bas... | ALGO | 0.999391 | 6.843345 | {
"github_metadata": {
"branch": "master",
"commit_count": 72,
"repo_created_at": "2020-08-16T06:00:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "996d1cc43... |
07cacad0-96d0-4c9f-9395-c79fef2c90b0 | Sarthaksource/LeetcodeSolutions | DSU/886. Possible Bipartition.cpp | class Solution {
private:
vector<int> parent;
vector<int> size;
int find(int i)
{
if(parent[i]==i)
{
return i;
}
return parent[i] = find(parent[i]);
}
void unionBySize(int i, int j)
{
int irep = find(i);
int jrep = find(j);
... | ALGO | 0.999896 | 5.664731 | {
"github_metadata": {
"branch": "main",
"commit_count": 70,
"repo_created_at": "2024-08-26T05:53: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": "9ac77f1ba33... |
1da4d1e3-06e0-440e-ace0-301f14732da9 | AmrishKhanna/algos_ds | Arrays/quickSort.cpp | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int partition(vector<int>& v, int l, int r)
{
int pValue = v[l];
int i = l;
int j = r;
while(i<j)
{
while(i <= r && v[i] <= pValue) i++;
while(v[j] > pValue) j--;
if(i < j)
{
swap(v[i], v[j]);
}
}
v[l] = v[j];
... | ALGO | 0.999993 | 5.841607 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2019-04-30T03:56:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0099c53c9e... |
5317d649-a981-44df-af85-4e8bf3ba30c8 | porres/pd-else | Source/Audio/plaits~/stmlib/algorithms/pattern_predictor.h | // Copyright 2013 <NAME>.
//
// Author: <NAME> (<EMAIL>)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, mo... | ALGO | 0.998347 | 7.516704 | {
"github_metadata": {
"branch": "master",
"commit_count": 6211,
"repo_created_at": "2016-04-22T16:45:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 354,
"forks": 43,
"issues": 273,
"pull_requests": 2
},
"file_meta": {
"content_id": "da... |
2034ad83-85af-4895-8722-6468c0075d7e | Apress/modern-x86-assembly-language-programming | 978-1-4842-0065-0_SourceCode/Chapter06/MmxCalcMean/MmxCalcMean/MmxCalcMean.cpp | #include "stdafx.h"
#include "MmxCalcMean.h"
#include <stdlib.h>
extern "C" int NMIN = 16; // Minimum number of elements
extern "C" int NMAX = 16777216; // Maximum number of elements
bool MmxCalcMeanCpp(const Uint8* x, int n, Uint32* sum_x, double* mean_x)
{
if ((n < NMIN) || (n > NMAX) || (... | ALGO | 0.999356 | 4.824581 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2016-10-18T13:24:58.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 167,
"forks": 62,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "638be778... |
14d86202-cca7-4eab-a30f-111d4291821e | manoflearning/cp-codes | Baekjoon OJ/14000-14999/14941.cpp | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#include <cassert>
using namespace std;
#define ll long long
#define ld long double
#define pii pair<int, int>
#define pll pair<ll, ll>
#define fr first
#define sc second
#define vt vector
#define all(c) (c).begin(), (c).end()
#define sz(x) (int)(x).size()
#define EXP... | ALGO | 0.999809 | 4.273508 | {
"github_metadata": {
"branch": "main",
"commit_count": 1899,
"repo_created_at": "2020-08-06T14:38: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": "608914250... |
5521ff22-cca8-4072-b6e8-a06ea11f97e9 | Anshulguptag/Data-Structures | Graph/FindingShortestPath.cpp | /*DFS is used*/
#include<iostream>
#include<list>
#include<queue>
using namespace std;
queue<int> temppath;
queue<int> path;
list<int> *adj = new list<int>[8];
void findShortPath(int x,int y,char ch[],int *count,bool visited[])
{
visited[x]=true;
temppath.push(x);
*count = *count+1;
if(x!=y)
... | ALGO | 0.999989 | 3.931284 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2018-07-01T15:25: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": "eba3529aa... |
dd3cf19c-fde6-41f9-ad48-7686f56940a7 | sudo-gera/c | opers.cpp | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
class longlong{
string digits;
std::ostream& operator<< (std::ostream &st){
reverse(digits.begin(), digits.end())
st<<digits;
reverse(digits.begin(), digits.end())
return st;
}
std::istre... | ALGO | 0.998453 | 3.546503 | {
"github_metadata": {
"branch": "master",
"commit_count": 2158,
"repo_created_at": "2020-08-02T15:19:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "407a376... |
4aa7fc8c-8504-4439-8403-83e7080dcc48 | sneakstarberry/cpp_algorithm | q16570/main.cpp | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<int> getPartialMatch(vector<int> &N) {
int M = N.size();
vector<int> pi(M, 0);
int begin = 1, matched = 0;
while (begin + matched < M) {
if (N[begin + matched] == N[matched]) {
matched++;
... | ALGO | 0.99994 | 3.656656 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2020-05-17T14:30: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": "aaf512567... |
0beab5fc-f59d-4ab0-a5dd-c5ac6bc59f09 | khalilof3D/gkit2light-master_MecacSim | src/master_MecaSim/src-etudiant/SolveurExpl.cpp | /*
* SolveurExpl.cpp : Application schemas semi-implicite sur les objets.
* Copyright (C) 2016 <NAME>, LIRIS
* <EMAIL>
* http://liris.cnrs.fr/florence.zara/
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Publi... | ALGO | 0.99855 | 3.713063 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-02-11T02:13: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": "5a44b5690260... |
2168310d-b6ae-4b29-8fc5-d18e238f89b2 | koriel50000/ACRi_Challenge | text-search/kernel.cpp | #include "kernel.hpp"
#include <hls_stream.h>
#include <hls_vector.h>
#include <ap_int.h>
const int DEGREE = 32;
const int BIT_WIDTH = 5;
typedef ap_uint<BIT_WIDTH> char_t;
typedef char_t buffer_t[PATTERN_SIZE + DEGREE];
typedef char_t word_t[PATTERN_SIZE];
typedef hls::vector<char_t, DEGREE> block_t;
typedef ap_uin... | ALGO | 0.999249 | 4.212437 | {
"github_metadata": {
"branch": "main",
"commit_count": 178,
"repo_created_at": "2024-10-12T00:28:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a1ccb2b991... |
75d03783-71ed-42cc-bf64-57748ba210f8 | trygas/example | lintcode/range_addition/range_addition.cpp | #include "general.h"
//void merge(vector<vector<int > > &data, vector<vector<int> > &output)
//{
// output.push_back(data[0]);
//
// for (int i = 1; i < data.size(); ++i)
// {
// int index = -1;
//
// for (int j = output.size() - 1; j >= 0; --j)
// {
// if (output[j][1] >= data... | ALGO | 0.9998 | 4.950491 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2019-06-12T13:06:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d57d373f1... |
c821f558-7ac3-4201-a4f1-b5417431281d | Manan-Chawla/CPP-codes | stack_college.cpp | #include<iostream>
#include<stdlib.h>
#define n 100 // constant is n which is set to be 100
using namespace std;
class box // class which basically represent a stack
{
private :
int *arr; // a pointer which refer to array
int top; // a integer which refers to the top pos... | ALGO | 0.998952 | 3.714063 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-08-08T15:45: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": "8be699f0b82b... |
658dda6d-9cbb-4d3f-aa91-d83bb9dcb507 | achan90/XAMK-CPP | Project29/Project29/Source.cpp | #include <iostream>
#include <functional>
#include <algorithm>
#include <deque>
#include <regex>
const int columns = 5;
const int rows = 5;
void print_table(int table[]) {
int row_sum = 0;
int col_sum = 0;
int col_num = 0;
for (int i = 0; i < 25; i++) {
row_sum += table[i];
if (i == 4 || i == 9 || i == 14 |... | ALGO | 0.967101 | 4.951399 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-09-14T16:41:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c7d7ff90f... |
dcf9c760-9c3e-482f-a39c-f40febb21ca3 | jcdiazvelez/cra-tools | simpledst-maps/src/private/splinechk.cc | #include <cmath>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
#include <units.h>
#include <photospline/splinetable.h>
#include <photospline/bspline.h>
int main(int argc, char* argv[])
{
photospline::splinetable<> spline;
std::string splineFile("/data/user/fmcnall... | ALGO | 0.963396 | 4.39831 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2018-05-10T12:02:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "54bd35f17... |
ca019e52-0e5f-4106-b772-bd7cfeb2f492 | JohnToro-CZAF/CP | CodeForce/Contest/723_div2/D.cpp | #include<bits/stdc++.h>
#include<limits.h>
#define f first
#define s second
using namespace std;
using ll = long long;
#define forn(i, n) for (int i = 0; i < int(n); i++)
struct tuple {ll x; ll y; ll z;};
ll inf = LONG_MAX;
ll cei(ll x, ll y){
ll t = (x+y-1)/y;
return t;
}
ll power(ll base, ll powerRaised)... | ALGO | 0.999641 | 4.193117 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2022-03-25T06:49: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": "e4f8f9ff09a... |
6a754a08-a012-4d74-ba62-d2affd4761e6 | kimmypracha/Problem-Solving-Code | band.cpp | #include <bits/stdc++.h>
#define fi first
#define se second
#define eb emplace_back
using namespace std;
typedef pair<int,int> pii;
typedef long long int lli;
const int lim= 1010;
bool G[lim][lim] = {};
vector<pii> vi;
int main(){
int n , m;
scanf("%d%d",&n,&m);
for(int i =0 ; i < m ;++i){
int a , b;
sc... | ALGO | 0.999965 | 3.088393 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-01-16T09:14:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7251e8a84a... |
b7a7e5d8-92a4-4ba7-b709-40a07a72ca97 | Bulg0t/gitrepo | cpp/trojkat.cpp | ,/*
* trojkat.cpp
* Napisz program, który pobiera od użytkownika 3 liczby, długości boków
* i sprawdza, czy da się z nich zbudować trójkąt.
* Program powinien wyprowadzić odpowiedni komunikat.
*/
#include <iostream>
#include <cmath>
using namespace std;
int main(int argc, char **argv)
{
float a, b, c;
cout... | ALGO | 0.994622 | 3.965726 | {
"github_metadata": {
"branch": "master",
"commit_count": 162,
"repo_created_at": "2018-09-11T11:02: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": "862c4401... |
dd505b92-dd22-484b-b7c4-f0a518d9007c | gajendra-iitm/starplat | graphcode/main_functions/PPRGRmain.cpp | #include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <cstring>
#include <climits>
// #include "./generated_omp/v_cover.cc"
int main(int argc, char*argv[]) {
char* filePath;
if (argc == 1) {
std::string inputPath;
... | ALGO | 0.961741 | 5.329476 | {
"github_metadata": {
"branch": "main",
"commit_count": 330,
"repo_created_at": "2024-06-01T10:18:48.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 9,
"issues": 2,
"pull_requests": 3
},
"file_meta": {
"content_id": "5bc40046ce2... |
65841b2c-2cf6-46e9-b26a-8d829fb183f8 | hameem008/Competitive_Programming | Codeforces_and_others/LeastPrefixSum.cpp | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define gap ' '
typedef long long ll;
typedef long double lld;
void solve(int I, int T)
{
ll i, j, k, a, b, c, d, m, n, p, q;
bool flag;
// solve starts
cin >> n >> m;
vector<ll> v(n + 1), prefix(n + 1);
for (i = 1; i <= n; i++)
... | ALGO | 0.999833 | 3.821082 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-06-02T07:22: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": "944c33ebab38... |
69606be4-6a5a-4af1-97ab-75dbe0039357 | yunxinzhang/algForRec | 00_leetcode/082_remove_duplicates_from_sorted_list_ii/modify.cpp | #include <iostream>
#include <vector>
#include <string>
using namespace std;
// sorted list;
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
void printList( ListNode *node){
ListNode * mv = node;
while(node!=NULL){
cout << node->val << " -->";
node = node->next;... | ALGO | 0.999992 | 5.274309 | {
"github_metadata": {
"branch": "master",
"commit_count": 48,
"repo_created_at": "2018-10-02T12: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": "45b8eab3f... |
b9cc0e0e-6611-4147-873b-82cd14fdc0c1 | Pluto-Jin/fromZero2GrandMaster | 670~679/673/5.cpp | #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<deque>
#include<set>
#include<map>
#include<bitset>
#include<string>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<iomanip>
#define fi first
#define se second
#define endl '\... | ALGO | 0.999739 | 3.285366 | {
"github_metadata": {
"branch": "master",
"commit_count": 172,
"repo_created_at": "2020-10-08T02:54:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a0919301... |
16ad5620-91d9-4494-a775-76d46561eba2 | suman105/LeetCode-Top-100-Liked-Problems | Linked Lists/146 LRU Cache.cpp | class LRUCache {
private:
struct Node {
int key, value;
Node* prev;
Node* next;
Node(int k, int v) : key(k), value(v), prev(nullptr), next(nullptr) {}
};
unordered_map<int, Node*> cache; // HashMap (key -> node)
Node* head; // Dumm... | ALGO | 0.998926 | 6.57868 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2025-02-22T10:10:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "948181db912... |
2d51d1f8-2128-4e5c-bcc0-726325485d00 | feichay10/Practicas-CyA | Practica 01 Simbolos, alfabetos y cadenas/Mejora p01/src/functions.cc | /**
*
* Universidad de La Laguna
* Escuela Superior de Ingeniería y Tecnología
* Grado en Ingeniería Informática
* Asignatura: Computabilidad y Algoritmia
* Curso: 2º
* Práctica 01: Símbolos, alfabetos y cadenas
* @file functions.cc
* @author <NAME> (<EMAIL>)
* @brief
* @version 0.1
* @date
*
* @copyright... | TOOL | 0.935589 | 5.098768 | {
"github_metadata": {
"branch": "main",
"commit_count": 153,
"repo_created_at": "2022-09-28T10:16: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": "8703250fdf... |
932a70da-7b5f-4b8f-8a04-1dbe810362df | trilinos/Trilinos | packages/epetraext/example/model_evaluator/GLpApp/GLpApp_GLpYUEpetraDataPool.cpp | /*
//@HEADER
// ***********************************************************************
//
// EpetraExt: Epetra Extended - Linear Algebra Services Package
// Copyright (2011) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retain... | TOOL | 0.951348 | 5.819129 | {
"github_metadata": {
"branch": "master",
"commit_count": 104031,
"repo_created_at": "2015-11-16T19:39:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1299,
"forks": 593,
"issues": 263,
"pull_requests": 61
},
"file_meta": {
"content_id":... |
d0bfa35b-412f-4333-bce7-454dff430182 | ishandutta2007/codeforces-a | abc864197532/normal/1285/B.cpp | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define fop(i,m,n) for (int i=(m);i<(n);i++)
#define FOP(i,m,n) for (int i=(m)-1;i>=(n);--i)
#define test(x) cout << #x << ' ' << x << endl;
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
int main() {
... | ALGO | 0.99947 | 4.707989 | {
"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": "51bbbb522eae... |
eb97e264-e3ad-47f8-92de-e90b084dc841 | MarcoAPelonero/Physics-Of-Liquids | Virial/src/MonteCarlo.cpp | #include "MonteCarlo.hpp"
#include <random>
#include <cmath>
#include <iostream> // <-- add this include for printing
#include <fstream>
double monteCarloHitOrMiss(
const std::function<double(const std::vector<double>&)>& integrand,
int dimension,
int nFreeNodes, // we've decided this = (nNodes - 1)
d... | ALGO | 0.999687 | 5.655361 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2025-03-10T07:13: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": "7290b143079... |
148695c4-6aba-477e-8ca2-096c81f3c1c9 | hihiEJ/Algorithm | 백준/Silver/18258. 큐 2/큐 2.cc | #include <bits/stdc++.h>
using namespace std;
int main(void) { //제일 먼저 들어온거 -> front , 나중에 들어온거 -> back pop부분이 헷갈린다. 제일 먼저 들어온걸 삭제하는지 나중것을 삭제하는지
ios::sync_with_stdio(0);
cin.tie(0);
queue<int>a;
int N;
cin >> N;
while(N--){
string s; // 명령문은 한번만 받는것이 아닌 n번 받는것이다 그러니 while문 안에 들어가서 string 초기화하고 입력받는게 맞는것이다... | ALGO | 0.998516 | 4.515106 | {
"github_metadata": {
"branch": "main",
"commit_count": 37,
"repo_created_at": "2024-08-20T05:29: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": "1f49cd10a3c... |
7b1ddc8c-7fab-48f0-9d49-e4bc9b3f5b71 | vnrk/Algorithms | merge_sorted_linked_list.cpp | #include<stdio.h>
#include<stdlib.h>
#include<assert.h>
struct Node
{
int data;
struct Node* next;
};
void push(struct Node** head_ref, int new_data)
{
struct Node* new_node =
(struct Node*) malloc(sizeof(struct Node));
new_node->data = new_data;
new_node->next = (*head_ref);
(*head_ref) = new_node;
}
void p... | ALGO | 0.999934 | 5.081724 | {
"github_metadata": {
"branch": "master",
"commit_count": 79,
"repo_created_at": "2015-05-18T16:17: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": "2869a65ab... |
347a0fc3-5efe-40a4-b327-7c855fe963f5 | fbenti/C-course | week11/lecture11/arithmetic-syntax-tree.h | #ifndef __arithmetic_syntax_tree__
#define __arithmetic_syntax_tree__
// Type of operation. Here, 'Const' represents a constant value (leaf node)
enum NodeType { Const, Add, Mult };
class ArithmeticSyntaxTree {
public:
// Constructor for leaf nodes (constants)
ArithmeticSyntaxTree(unsigned int value);
/... | ALGO | 0.972998 | 6.700567 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2021-09-04T11:46: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": "c8388fcb83b... |
26865da0-4707-4996-9a66-f4b75f6d4018 | lppferreira/solids4foam | src/blockCoupledSolids4FoamTools/BlockLduSolvers/BlockTrilinos/lduToCsrMatrix.H | /*---------------------------------------------------------------------------*\
========= |
\\ / F ield | foam-extend: Open Source CFD
\\ / O peration |
\\ / A nd | For copyright notice see file Copyright
\\/ M anipulation |
---------------------... | TOOL | 0.966594 | 5.429406 | {
"github_metadata": {
"branch": "3dTube-fix-parallel",
"commit_count": 311,
"repo_created_at": "2020-12-25T11:36:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_i... |
ec8a53cc-0867-47b9-9779-f1a1923e88dd | Fragmentszz/the-Methods-of-Optimization | Gold.cpp | #include"Gold.h"
#include"XlsxWriter.h"
const ld lamda1 = 0.5L * (3 - sqrtl(5.0L));
const ld lamda2 = 0.5L * (sqrtl(5.0L) - 1);
void GoldSearch::init(ld _a, ld _b, OneDimensionSearchFunc _target, ld _eps)
{
eps = _eps;
a = _a;
b = _b;
targetfunc = _target;
//OneDimensionSearch::init(_a, _b, _target);
ld mi = lamd... | ALGO | 0.999764 | 4.000484 | {
"github_metadata": {
"branch": "OneDimension",
"commit_count": 20,
"repo_created_at": "2023-10-07T10:24:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "87c... |
d663bcca-871f-4461-b372-261e15c9e1e0 | kumastry/atcoder | abc/091/091d.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <iomanip>
#include <cstdio>
#include <set>
#include <map>
#include <list>
#include <cstdlib>
#include <queue>
#include <stack>
#include <bitset>
using namespace std;
#define MOD 1000000007
#define... | ALGO | 0.999879 | 3.509075 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2020-12-30T14:58: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": "8108266954c... |
57035856-0bef-4e47-a986-4fda0d158a4a | Rohxn16/CompetitiveCoding_and_DSA | Old/DSA/Algorithms/index_of_subarray.cpp | // 1 2 3 4 5 - > 1 3 6 10 15
#include <bits/stdc++.h>
using namespace std;
vector<int> subarraySum(vector<int>arr, int n, long long s)
{
vector<int> ans(2);
long long temp;
for(int i = 0; i < n; i++){
temp = 0;
for(int j = 0; j < n; j++){
temp +=... | ALGO | 0.999911 | 3.974747 | {
"github_metadata": {
"branch": "master",
"commit_count": 50,
"repo_created_at": "2023-10-30T20:03: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": "914eeae98... |
0bc08399-0326-43d2-9f77-1e10a831ce21 | abufarhad/Codeforces-Problems-Solution | 1368B.cpp | #include<bits/stdc++.h>
#include<stdio.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
#define ll long long
#define fr(i,n) for (ll i=0;i<n;i++)
#define fr1(i,n) for(ll i=1;i<=n;i++)
ll bigmd(ll b, ll p){ ll res=1, rem=b; while(p) { if... | ALGO | 0.999984 | 3.267351 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2019-02-14T18:54:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 55,
"forks": 32,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6c93775... |
6cde92bf-997e-4cd6-9c9f-8dbfa827d66d | gamesburner/AIDS-FDS-SEM3 | pr13_double_ended_queue.cpp |
#include<iostream>
using namespace std;
#define max 5
class dqueue
{
private:
int dq[max];
int front,rear;
public:
dqueue()
{
front = rear =-1;
}
void enqueueFront();
void enqueueRear();
void dequeueFront();
void dequeueRear(... | ALGO | 0.981306 | 3.630605 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-12-13T14:49: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": "6b922ad385d1... |
349ffda9-50c5-49c4-a5a1-26b20cb376c3 | iNewLegend/muonline-client-emulator | shared/Math/src/Frustum.cpp | #include "Frustum.h"
#include "float.h"
#include <windows.h>// for min() and max()
BBox::BBox()
{
vMin.x=FLT_MAX;
vMin.y=FLT_MAX;
vMin.z=FLT_MAX;
vMax.x=FLT_MIN;
vMax.y=FLT_MIN;
vMax.z=FLT_MIN;
};
BBox::BBox(float fMinX, float fMinY, float fMinZ, float fMaxX, float fMaxY, float fMaxZ)
{
vMin.x=fMinX;
vMin.y=f... | TOOL | 0.996437 | 4.00878 | {
"github_metadata": {
"branch": "master",
"commit_count": 381,
"repo_created_at": "2015-04-20T13:35:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 5,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "8e7779fd... |
7c895f0b-f4e3-4077-ad3d-ab82be435006 | tabed23/Analysis-of-Algorithm-Couse | Assignment-4/Assignment-4/matrix_search_.cpp | #include<iostream>
#include<fstream>
#include<vector>
using namespace std;
void reader(vector<vector<int>>&,int&,int&);
void print(vector<vector<int>>&,int);
void SearchMatrix(vector<vector<int>>&,int&,int&);
int BinarySearch(vector<int>, int , int);
int main()
{
vector<vector<int>>Matrix;
int T,N;
reade... | ALGO | 0.999478 | 3.785027 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-05-07T20:59:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d016e039c7bc... |
98953c9b-1802-42a5-b333-f8697bbcc6ce | AZZRCN/luogu_problems | P1981.cpp | #include <iostream>
#include <string>
#include <stack>
using namespace std;
stack<int> S;
bool is_digit(unsigned char c) {
return (c ^ '0') < 0xA;
}
int main() {
string s;
cin >> s;
bool flag = false;
unsigned long long t = 0;
for (int i = 0; i < s.length(); i++) {
if (isdigit(s[i])) {//... | ALGO | 0.999949 | 3.791627 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-08-08T04:30: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": "97aa70e55e67... |
f326e1be-f648-4be6-8005-f6c4301c1c87 | carrieyin/algorithm | 栈/main.cpp | #define _CRT_SECURE_NO_WARNINGS
#include <stack>
#include <string>
#include <vector>
#include <iostream>
using namespace std;
//进制转换
void convert(stack<char> &s, int n, int base)
{
char digit[] = { '0', '1','2', '3','4', '5','6', '7','8', '9','A', 'B','C', 'D','E','F' };
while (n > 0)
{
s.push(digit[n % base]);... | ALGO | 0.999596 | 3.618913 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2020-11-15T13:22:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0da51c4b877... |
c5a27913-5c76-4c49-96d2-367d236aaca2 | twokoifish/shippensburg_university_archive | CSC350/hw3/lib/elementary/mat4/mat4.cpp | /**
* @file Matrix.cpp
* @author <NAME> (<EMAIL>)
* @brief Allows for the creation of a custom 4x4 matrix class.
* @version 0.1
* @date 2021-09-29
*
* @copyright Copyright (c) 2021
*
*/
#include "mat4.h"
/**
* @brief Construct a empty matrix.
*
*/
Mat4::Mat4(void)
{
for (int i = 0; i < ROW_SIZE; i++)
... | TOOL | 0.977944 | 3.058663 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-12-02T17:50:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a677a516a3d4... |
2ab93bab-05ca-458f-89b9-10b9c923a6d5 | yiqun-liu/Algo-Lab-ETHz | week5/planks/planks_old.cpp | #include <cstdio>
#include <vector>
#include <map>
typedef std::vector<int> Layout; // total length of planks on each side
// Reuse previous results: compute in a BFS manner
// 00, 10, 20, 30, 01, 11, 21, 31, 02, 12, 22..
void bruteForce(std::vector<Layout> &out, int n, const std::vector<int>& planks)
{
// initia... | ALGO | 0.999918 | 4.051965 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2019-10-23T12:22:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6c59ea00b... |
ebe93306-3e66-4722-bb49-663a93fc9740 | AoMas17/codeforces-perso | 0361/B/accepted.cpp | #include <iostream>
#include <vector>
#include <string>
#include <bits/stdc++.h>
using namespace std;
#define init ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define FORi(a) for (int i = 0; i < a; i++)
#define FORj(a) for (int j = 0; j < a; j++)
#define FORk(a) for (int k = 0; k < a; k++)
#define ull unsigne... | ALGO | 0.999966 | 3.879727 | {
"github_metadata": {
"branch": "main",
"commit_count": 77,
"repo_created_at": "2024-08-14T16:38:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3ab6258903f... |
0f40546b-2967-4770-9337-ec98c9222ec1 | ishandutta2007/codeforces-t | tutis/normal/1336/E1.cpp | /*input
4 4
3 5 8 14
*/
#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
template<typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_no... | ALGO | 0.999981 | 4.212124 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:27: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": "7318fd513093... |
10bfbc3e-f84e-4301-b503-54483de3cccf | limaraujo/Study-of-C-plus-plus | Algorithms/Hastable/closedpseudorandow.cpp | #include <bits/stdc++.h>
using namespace std;
struct Element{
int valor;
bool occupied;
Element() : valor(-1), occupied(false){}
Element(int it) : valor(it), occupied(true){}
};
typedef struct Dictionary{
int size;
int currcnt;
Element* table;
int* Perm;
Dictionary(int sz... | ALGO | 0.996693 | 4.782247 | {
"github_metadata": {
"branch": "main",
"commit_count": 133,
"repo_created_at": "2024-05-05T17:33: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": "da4ad65ce8... |
65bb5f96-96ce-42ee-9305-b082831f8f08 | kzvd4729/Problem-Solving | codeforces/E - Permutation Separation/Wrong answer on test 6 (2).cpp | /****************************************************************************************
* @author: kzvd4729 created: Jan/30/2020 22:35
* solution_verdict: Wrong answer on test 6 language: GNU C++14
* run... | ALGO | 0.999933 | 3.881594 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2022-02-01T09:12:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "72cd9e1ae7c... |
01023277-361c-4d9e-9928-beecd7c7adc1 | rwth-irt/gnssFGO | online_fgo/include/factor/gnss/PrDrFactor.h | // Copyright 2022 Institute of Automatic Control RWTH Aachen University
//
// 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
//
// Un... | ALGO | 0.928737 | 6.389229 | {
"github_metadata": {
"branch": "ros2",
"commit_count": 40,
"repo_created_at": "2022-09-15T10:54:54.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 161,
"forks": 26,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "454af8454... |
1f55eb8d-7b05-4720-9bf3-0a8d10f63cd6 | borglab/gtsam | gtsam/nonlinear/ISAM2-impl.cpp | /* ----------------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: <NAME>, et al. (see THANKS for the full author list)
* See LICENSE for the license information
* ------------... | ALGO | 0.999843 | 6.464147 | {
"github_metadata": {
"branch": "develop",
"commit_count": 19360,
"repo_created_at": "2017-03-27T17:12:06.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3002,
"forks": 845,
"issues": 99,
"pull_requests": 25
},
"file_meta": {
"content_id": ... |
c82f7753-1897-42e4-adff-5ba1cba24573 | kabirbatradev/competitive-programming | leetCode/medium/2845. Count of Interesting Subarrays.cpp | class Solution {
public:
using ll = long long;
long long countInterestingSubarrays(vector<int>& nums, int mod, int k) {
int n = nums.size();
ll total = 0;
int count = 0;
unordered_map<int, int> freqMap;
// simulate prefix sum 'count' starting at 0
freqMap[0] = 1... | ALGO | 0.999972 | 5.960733 | {
"github_metadata": {
"branch": "main",
"commit_count": 377,
"repo_created_at": "2022-05-15T20:58: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": "d56340050f... |
0c3bf25b-4b80-4155-b222-12458490aada | ishandutta2007/codeforces-r | receed/normal/1140/D.cpp | #include <iostream>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cassert>
#include <string>
#include <set>
#include <map>
#include <random>
#include <bitset>
#include <string>
#include <unordered_set>
#include <unordered_map>
#include <deque>
... | ALGO | 0.999956 | 3.461256 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:58: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": "de0247aa5ef5... |
1eaed8fa-6e09-4a6d-962e-749bb0c265f1 | johnnygoblue/pipelineSim | PipelineSimulator.cpp | #include "PipelineSimulator.h"
#include <iostream>
PipelineSimulator::PipelineSimulator(int r1, int r2, int r3, int r4) : cycle(0) {
registers[0] = r1;
registers[1] = r2;
registers[2] = r3;
registers[3] = r4;
}
void PipelineSimulator::processInstruction(const std::string& inst) {
Instruction i;
... | ALGO | 0.991842 | 6.016515 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2025-04-23T12: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": "52c22e588f... |
650592e1-2324-4a78-8ef5-29792654784c | ashu16993/Algorithm-Toolbox | Week 3/greedy_algorithms_starter_files/largest_number/largest_number.cpp | #include <algorithm>
#include <sstream>
#include <iostream>
#include <vector>
#include <string.h>
using std::vector;
using std::string;
bool IsGreaterOrEqual(string a , string b){
const char *n1 = a.c_str();
const char *n2 = b.c_str();
int length =0;
if(n2[0]=='-')
return true;
// if(strlen(num2)>strlen... | ALGO | 0.999858 | 4.625226 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-06-09T12:02:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f408830c9f... |
ad137dcd-f167-430d-86da-0cbe07f61531 | Lodour/ACM-ICPC | codes/poj/2386.cpp | #include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <string>
#include <sstream>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <cctype>
using namespace std;
#define INF 0x3FFFFFFF
#defin... | ALGO | 0.999883 | 3.890856 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2015-09-20T15:57: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": "6be276b39... |
6b8665b5-c2c2-4811-b6c7-be434963b359 | srmacario/competitive-programming | gym/305539/j.cpp | #include <bits/stdc++.h>
using namespace std;
#define st first
#define nd second
#define pb push_back
#define cl(x,v) memset((x), (v), sizeof(x))
#define db(x) cerr << #x << " == " << x << endl
#define dbs(x) cerr << x << endl
#define _ << ", " <<
typedef long long ll;
typedef long double ld;
typedef pair<int,int> p... | ALGO | 0.999977 | 4.433527 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2020-03-20T13:55: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": "9b6b87257... |
29b2bb78-ba98-4bd1-8b23-ea17c8b9aeb9 | r06921037zwh/Leetcode_note | Chapter_10_Depth_First_Search/p51_N-Queens.cpp | #include <string>
#include <vector>
#include <algorithm>
using namespace std;
class Solution {
public:
vector<vector<string>> solveNQueens(int n) {
vector<vector<string>> result;
vector<int> board(n, -1); // board[i] record ith Queen at (i, board[i])
dfs(result, board, 0);
return re... | ALGO | 0.999956 | 5.810811 | {
"github_metadata": {
"branch": "master",
"commit_count": 236,
"repo_created_at": "2019-11-14T21:26: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": "8c940b1d... |
09997d30-c6bf-40ce-aafe-f49dd99a24da | Yongrui-Su/POJ | lcu.cpp | #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <typeinfo>
#include <unordered_map>
using namespace std;
class node{
public:
int key;
int val;
node* next;
node* prev;
node(){
next = NULL;
prev = NULL;
};
node(int k,int v){
key = ... | ALGO | 0.999566 | 4.439974 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2016-09-15T04:00: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": "774d0c2c84... |
840f986b-50f5-4edb-bf07-dc1e724e12f4 | atkenshek/Loading-OBJ-file-with-valid-texture-coordinates | LoadingOBJ/main.cpp | #include <GL/glew.h>
#include <GL/freeglut.h>
#include <iostream>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <vector>
#include <map>
#include <fstream>
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
GLuint trfloc, prloc, lightloc, camloc, timerloc;... | TOOL | 0.925484 | 3.727159 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2022-10-15T13:52: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": "6f8ec1a82e... |
df55952d-7737-4ba9-9f56-0f1b5563966e | Rudrakshsinghchib/Code-Cpp | Recursion/class2.cpp | #include<iostream>
#include<limits.h>
#include<vector>
using namespace std;
void integer(int num,vector <int> &s)
{
if(num==0)
return;
int digit=num%10;
num=num/10;
integer(num,s);
s.push_back(digit);
}
void solve(int arr[],int size,int index, vector <int> &v)
{
if(index>=size)
{
... | ALGO | 0.999816 | 3.85022 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2024-03-15T18:02: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": "730a03a831... |
fd076120-c1bf-4b26-b263-238599d61193 | mgalle19atWhitworth/CS172 | 11.3/11.3/Source.cpp | /////////////////
// <NAME>
//4-7-15
// 11.3
//172
/////////////////
#include <iostream>
using namespace std;
// Function the book uses
int * doubleCapacity(const int *list, int size)
{ // y add the numbers into the new array
int y = 6;
// the array size times two
const int size2 = size * 2;
// make the new array... | ALGO | 0.963186 | 3.559069 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2016-02-26T05:15: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": "4bbad2590... |
5d1591f9-7a05-42b8-a32d-d2c6d2e982a4 | xxg1413/leetcode | 015.3Sum/cpp/coderfive/3sum.cc | #include <vector>
#include <string>
#include <utility>
#include <iostream>
#include <algorithm>
#include <limits>
using namespace std;
class Solution {
public:
vector<vector<int>> threeSum(vector<int>& nums) {
if (nums.size() == 0) return vector<vector<int>>();
vector<int> v(nums);
... | ALGO | 0.967328 | 5.749965 | {
"github_metadata": {
"branch": "master",
"commit_count": 210,
"repo_created_at": "2015-09-29T11:29:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 27,
"forks": 17,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5adc18... |
a70da7e8-e47d-42d2-bacf-511e257f45e8 | gane-dev/CPP | HackerRank/SockMerchant.cpp | //#include <bits/stdc++.h>
#include <map>
#include <vector>
#include<iostream>
using namespace std;
vector<string> split_string(string);
// Complete the sockMerchant function below.
int sockMerchant(int n, vector<int> ar) {
map<int, int> color;
for (int elem : ar)
{
if (color.find(elem) == color.end())
{
... | ALGO | 0.999975 | 4.800009 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2019-07-05T12:58: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": "c1f748a3e... |
ec287b67-6d7e-458b-8e9f-a13d1b7b3754 | woozway/BA | 算法基础课/第二讲 数据结构/Trie/AcWing 835. Trie字符串统计.cpp | #include <iostream>
using namespace std;
const int N = 1e5 + 10; // N是字符串总长度最大值
int son[N][26], cnt[N], idx; // trie根节点0
void insert(string &str) {
int p = 0; // trie树的遍历指针
for (int i = 0; i < str.size(); i ++ ) {
int t = str[i] - 'a';
if (!son[p][t]) son[p][t] = ++ idx; // 每个idx都对应一个独立前缀;这里不能是idx++,否则son[... | ALGO | 0.99679 | 3.488394 | {
"github_metadata": {
"branch": "master",
"commit_count": 268,
"repo_created_at": "2019-11-23T14:13:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8b049d0d... |
75535a62-09cf-46fd-b4ee-58fda68b4aed | imdj6/DSA-CPP | BinarySearch/LowerBound.cpp | //search insert position also have same answer
//also to find ceil and floor value has similar answer
#include <bits/stdc++.h>
using namespace std;
//this is brute force -> tc->O(N) and sc->O(1);
int lowerbound(vector<int> arr, int n, int x)
{
for (int i = 0; i < n; i++)
{
if (arr[i] >= x)
{
... | ALGO | 0.999986 | 5.74229 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2022-02-27T15:23: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": "aecc817b0... |
2529bea4-bf14-44b3-a3e2-ea8b62018cc9 | pie-12/CompetitveProgramming | OJTRAIN/VDCODER/DPKNSCO1/main.cpp | #include <bits/stdc++.h>
#define int long long
#define endl '\n'
using namespace std;
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int m, n;
cin >> m >> n;
vector <int> coins(n);
vector <int> ans(n);
map <int,int> mp;
int dp[m+1];
int first[m+1];
for (int i = 0; i < n; i... | ALGO | 0.999928 | 3.515234 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2024-05-08T04:23:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b3d3085685f... |
f0549288-1ead-4c90-92bf-cd5ea0f925bb | SumitGhughtyal/STACK | StackUsingLinkedList.cpp | #include<iostream>
using namespace std;
class Node
{
public:
int data;
Node *next;
};
class Stack
{
private:
Node *top;
public:
Stack();
~Stack();
void push(int x);
int pop();
int peek(int index);
int isEmpty();
int isFull();
int stackTop();
};
Stack::Stack()
{
to... | ALGO | 0.998607 | 4.21438 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-12-03T18:20: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": "ac9c757d557f... |
acb41a39-db9d-466b-babb-dc64fb207df2 | Mohamed-Amiir/Leet-code | 3439-find-minimum-diameter-after-merging-two-trees/3439-find-minimum-diameter-after-merging-two-trees.cpp | class Solution {
public:
pair<int, int> bfs(const vector<vector<int>>& tree, int start) {
int n = tree.size();
vector<int> dist(n, -1);
queue<int> q;
q.push(start);
dist[start] = 0;
int farthest = start, maxDist = 0;
while (!q.empty()) {
int node = q.front();
q.pop();
... | ALGO | 0.999882 | 5.953732 | {
"github_metadata": {
"branch": "main",
"commit_count": 982,
"repo_created_at": "2024-06-17T18:33:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7947203c41... |
61e9a839-38a6-4ab6-ac5f-9b185869551a | Shubham28/TopCoder | testprograms/BidirectionalQueue.cpp | #include <vector>
#include <map>
#include <queue>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <set>
#include <bitset>
#define FOR(A,B,C) for(int A=B;A<C;A++)
#define EFOR(A,B,C) for(int A=B;A<=C;A++)
#define RFOR(A,B,C) for(int A=B;A>=C;A--)
#define PB(A,B) ... | ALGO | 0.999941 | 4.945634 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2013-05-23T12:52: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": "9179593408... |
af4d3d46-0a05-460e-8eba-8e5055b2eff3 | MasterIceZ/TOI18_Practice | Contest/Round_4/AG_Silver_100.cc | /*
* AUTHOR : Hydrolyzed~
* SCHOOL : RYW
* TASK : AG_Silver
* ALGO : Dynamic Programming, Tree, Disjoint Set Union
* DATE : 26 May 2022
* */
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
#ifndef _DEBUG
// @==== Libary ====@ //
// @... | ALGO | 0.999604 | 4.582244 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2022-05-03T17:54:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a6d474fa067... |
90a69995-e72e-4379-8f59-ff963549dfa5 | JHaasIII92/BiqAlps | src/BiqUtil.cpp | #include "headers/BiqUtil.h"
#include "headers/BiqModel.h"
#include <iostream>
#include <utility>
#include <vector>
#include <array>
#include <math.h>
// use for sorting the heap on the triangle cuts
bool operator<(BiqTriInequality const &l, BiqTriInequality const &r)
{
return l.value_ < r.value_;
}
int Greedy... | ALGO | 0.998078 | 4.360541 | {
"github_metadata": {
"branch": "main",
"commit_count": 106,
"repo_created_at": "2023-09-16T20:51:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c94f374f7c... |
15eab9c4-2c5e-420b-b8b8-2ec4211c7642 | zeagle01/graphics_play_ground | common/sim_lib/simulator_data_update.cpp |
module;
#include <vector>
#include <ranges>
#include <algorithm>
#include <set>
#include <unordered_map>
module sim_lib : simulator_data_update;
import :sim_data;
import :small_mat;
import matrix_math;
namespace sim_lib
{
namespace simulator_data_update
{
struct assign
{
template<typename T >
stati... | TOOL | 0.983986 | 5.817352 | {
"github_metadata": {
"branch": "master",
"commit_count": 581,
"repo_created_at": "2019-03-23T06:12: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": "f2372793... |
e488dc9b-eb06-410a-88c9-ee31c49371c2 | mosthandsomeman/PAT_A | 1066.cc | //#include<cstdio>
//#include<cstdlib>
//#include<vector>
//#include<algorithm>
//using namespace std;
//struct node
//{
// int v, height;
// node * lchild, *rchild;
//};
//
//node * newNode(int x) {
// node * Node = new node;
// Node->v = x;
// Node->height = 1;
// Node->lchild = Node->rchild = NULL;
// return Node;
/... | ALGO | 0.999984 | 3.868956 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2019-01-04T09:41: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": "ac9f60b9bf... |
913cba02-84f1-485e-974a-cf29536aa701 | ishandutta2007/codeforces-r | realcomplex/normal/1764/D.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define fi first
#define se second
#define mp make_pair
#define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
int mod;
const int N = 5050;
int C[N][N];
void add(int &x, int y){
x += y;
if(x >= mod) ... | ALGO | 0.999967 | 4.162366 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:58: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": "a52bdf79ad34... |
249ee484-9cca-4742-ad3f-6cb733cc8e91 | marjanhasan/Algo-CPP | Graph/BFS/cycle_Detection.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 5;
vector<int> adj[N];
bool visited[N];
bool dfs(int u, int p = -1)
{
bool isCycleExist = false;
visited[u] = true;
for (int v : adj[u])
{
if (v == p)
continue;
if (visited[v])
return true;
... | ALGO | 0.999973 | 5.171815 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2023-08-02T10:40: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": "855445a2c80... |
e5b4ddef-9d81-41a9-a43e-6fb470dce1f1 | emollebr/webserv | srcs/LocationRequest.cpp | #include "common.hpp"
//check if request method is allowed in this location
int Request::_validateMethod() {
std::string methods[3] ={"GET", "POST", "DELETE"};
bool (LocationConfig::*requestFun[3])() const = {&LocationConfig::getAllowGET, &LocationConfig::getAllowPOST, &LocationConfig::getAllowDELETE};
fo... | WEB | 0.962123 | 4.831613 | {
"github_metadata": {
"branch": "main",
"commit_count": 298,
"repo_created_at": "2024-04-03T12:59:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "648979aadb... |
d381d49d-ade0-44a9-9e8f-1454a72ff57c | ArmandoRosasB/Code_forces_Problems_Solved | Contest Round 785 Div2/A.Subtle_Substring_Subtraction.cpp | #include <iostream>
#include <stdlib.h>
using namespace std;
template<class T>
int suma(T*, int, int);
int main(int argc, char* argv[]){
int t;
string palabra;
int* ASCII_nums;
cin>>t;
for(int i = 0; i<t; i++){
cin>> palabra;
ASCII_nums = new int[palabra.size()];
for(int... | ALGO | 0.997728 | 3.169334 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-11-15T07:11: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": "b8d87bfe5a06... |
3d76f5db-e4f9-464f-bfd9-9c792405fa45 | whoisaldo/CS3520-Summer-2025 | pa6/practice_2.cpp | // <EMAIL>
// <NAME> 5/23/2025 CS3520 course
//
// Bug fixes summary:
// 1. Changed matrix size from [size+1][size+1] to fixed [3][3].
// 2. Switched prompt from cin << to cout <<.
// 3. Declared loop variable i inside the for loop.
// 4. Fixed input indexing from Matrix[j][i] to Matrix[i][j].
// 5. Updated dis... | ALGO | 0.993232 | 4.868452 | {
"github_metadata": {
"branch": "main",
"commit_count": 65,
"repo_created_at": "2025-06-02T06:53: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": "0db6c2ae9d9... |
2acbaebb-f55f-406a-9683-1502565a941d | XiaoJiNu/data-structure-yr | 09-Shortest-Path/Course Code (C++)/05-Implementation-of-Bellman-Ford-yr/BellmanFord.h | //
// Created by yr on 9/4/2020
//
#ifndef _05_IMPLEMENTATION_OF_BELLMAN_FORD_YR_BELLMANFORD_H
#define _05_IMPLEMENTATION_OF_BELLMAN_FORD_YR_BELLMANFORD_H
#include <iostream>
#include <vector>
#include "SparseGraph.h"
#include "DenseGraph.h"
#include "Edge.h"
template <typename Graph, typename Weight>
class Bellma... | ALGO | 0.999747 | 5.077852 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2021-01-03T09:12:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1458e8d5da5d... |
1a0e424e-9dc1-47a3-9737-0008eed49bd0 | Ipiano/The-Before-Times | Other/Compressor/huffman_tree.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;
//CHANGEABLE VARIABLES
//--------------------------------
//Debugging
const bool OUTPUT_TREE = false;
//Delimiters in tree
const char DELIMITER = '@';
const char DELIMITER2 = '$';
//... | ALGO | 0.998865 | 4.129979 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2025-07-03T00:57: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": "7907b8eab3... |
5f42483a-fdc3-4d11-93c7-e4a0386a4d72 | zipdang04/VOI2021 | COCI/Nov20/crtanje.cpp | #include <bits/stdc++.h>
using namespace std;
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
*/
typedef long long ll;
typedef long double ld;
typedef vector... | ALGO | 0.99995 | 3.160972 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-03-08T09:16:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "455130943d5e... |
bfad94d3-df16-43ed-88ce-3eb9ad4a4741 | rabienrose/code_snipe | hightlight/matlab_slam/platform_m/AlgoLib_m/SearchByEpipolar/SeacrhByEpipolarHandle.cpp | //
// SeacrhByEpipolarHandle.cpp
// testSLAMTracker
//
// Created by zhaiq on 7/4/16.
// Copyright (@) 2016 ygomi. All rights reserved.
//
#include "SeacrhByEpipolarHandle.hpp"
#include "typeDef.hpp"
inline static cv::Mat getRotation(const cv::Mat& pose)
{
return pose.rowRange(0,3).colRange(0,3).clone();;
}
... | ALGO | 0.998866 | 5.951762 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2017-03-23T12:44:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "28a890aa6c... |
2b1c44be-4097-44bb-ba2f-e0800768ad53 | rajesh-1920/Competitive_Programming_Problem_Solve | Codeforces/B. Odd Grasshopper.cpp | // Author: <NAME>
// Date : 08.11.2023
#include <bits/stdc++.h>
using namespace std;
//----------------------------(definition section)-------------------------------------
#define ll long long int
#define rsrt(X) sort(X.rbegin(), X.rend())
#define srt(X) sort(X.begin(), X.end())
#define pa pair<ll, ll>
#define ve... | ALGO | 0.999963 | 4.2779 | {
"github_metadata": {
"branch": "main",
"commit_count": 80,
"repo_created_at": "2024-02-29T16:35: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": "8eeea307649... |
56873418-045f-4e56-ac6f-3768e8f0bdc7 | coding-minutes/dsa-essentials-course | 11 Backtracking/n_queen_all_ways.cpp |
#include <iostream>
using namespace std;
bool canPlace(int board[][20],int n,int x,int y){
//Column
for(int k=0;k<x;k++){
if(board[k][y]==1){
return false;
}
}
//Left Diag
int i = x;
int j = y;
while(i>=0 and j>=0){
if(board[i][j]==1){
retu... | ALGO | 0.999928 | 5.232399 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2021-08-11T05:50:37.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 599,
"forks": 338,
"issues": 5,
"pull_requests": 3
},
"file_meta": {
"content_id": "ba04654... |
aae569b7-ed56-4a83-9183-61e7100dbfca | Jinsun-Lee/Algorithm-template | 백준/Gold/12100. 2048 (Easy)/2048 (Easy).cc | #include <iostream>
#include <queue>
#include <cstring>
#include <algorithm>
#include <climits>
using namespace std;
const int MX = 21;
int N, map[MX][MX], ans = INT_MIN;
void turnCW(int map[MX][MX]) {
int tmp[MX][MX];
for (int i = 0; i < N; ++i) {
for (int j = 0; j < N; ++j) tmp[j][N - i - 1] = map[i][j];
}
me... | ALGO | 0.999975 | 4.491058 | {
"github_metadata": {
"branch": "master",
"commit_count": 189,
"repo_created_at": "2024-07-17T14:24:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0cf2c388... |
6cc09b4a-d4f2-4ed7-a989-c5b4c969f4a8 | xlujiax/ii | cpp/p04/z1.cpp | #include <iostream>
#include <typeinfo>
#include <limits>
#include <cassert>
// http://www.cplusplus.com/doc/tutorial/variables/
/*
* Lista szablonowa
*/
struct empty {};
template<typename T, typename U> struct
list
{
typedef T head;
typedef U tail;
};
/*
* Wyszukiwanie w liście pierwszego z dwóch element... | ALGO | 0.972115 | 5.35467 | {
"github_metadata": {
"branch": "master",
"commit_count": 604,
"repo_created_at": "2014-09-22T05:04: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": "55cb13f9... |
24846b14-6b60-43ad-b79b-7a3a31ffe896 | jingpu/Halide-HLS | apps/hls_examples/feature2d_hls/pipeline.cpp | #include "Halide.h"
#include <stdio.h>
using namespace Halide;
Var x("x"), y("y"), c("c");
Var xo("xo"), yo("yo"), xi("xi"), yi("yi"), tile_index("ti");
Var xio("xio"), yio("yio"), xv("xv"), yp("yp");
int blockSize = 3;
int Ksize = 3;
float k = 0.04;
//float threshold = 20000000;
float threshold = 1000;
class M... | ALGO | 0.98591 | 5.477108 | {
"github_metadata": {
"branch": "HLS",
"commit_count": 13419,
"repo_created_at": "2015-08-21T00:32:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 77,
"forks": 23,
"issues": 10,
"pull_requests": 1
},
"file_meta": {
"content_id": "bdb022... |
9649d6b9-656e-4fee-b91e-0475201da822 | n2cholas/Robotics_TER4M1_Coursework | Problem Sets/ArraysSet.cpp | /* <NAME>
* TER 4M1
* 14 March 2017
* Mr. Jay
* Arrays Problem Set
*/
#include <iostream>
#include <conio.h> //allows for getch
#include <stdlib.h> // srand, rand
#include <time.h> //time
using namespace std;
int* fill (int size) {
//accepts desired size, creates and returns array with random integers from 1... | TOOL | 0.973091 | 4.47485 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2017-03-04T02:24: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": "5ce0e5d4a... |
f6b946bc-8a8c-4b0b-a9fe-a091a67509b7 | romanov6416/diplom2016 | src/Topology.cc | /*
* Copyright 2015 Applied Research Center for Computer Networks
*
* 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 b... | TOOL | 0.953445 | 5.804234 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2015-11-04T18:14: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": "281b40e11d... |
5deb7827-89e4-4005-98d6-fcd3c5fc64a8 | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/09/0919/personal_submission/cf281b_sjw712.cpp | struct num{
int p, q;
num(int _p, int _q){
p = _p, q = _q;
}
bool operator<(num & t) const{
return p * t.q < t.p * q;
}
};
void solve(){
int x, y, n;
cin >> x >> y >> n;
num mn(-1, -1);
int a, b;
for(int bb = 1; bb <= n; bb ++){
int res = 1e18, aa;
for(int i = bb * x / y - 1; i <= bb * x / y + 1; i ++... | ALGO | 0.999852 | 4.628926 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "9557... |
3a9d092c-69f4-4e1a-a907-654c477dde69 | farukshin/e-olymp | 0-999/588/588.cpp | // https://www.e-olymp.com/ru/problems/588
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
void solve()
{
int n;
cin >> n;
vector<int> v(n);
for(int i = 0; i < n; i++)
cin >> v[i];
vector<ll> dp(n);
vector<int> parr(n);
dp[0] = 0;
for... | ALGO | 0.999838 | 4.252985 | {
"github_metadata": {
"branch": "master",
"commit_count": 293,
"repo_created_at": "2020-05-09T06:07:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8ef328ef... |
272f94c3-e00d-40e8-a99a-56a0fc6380fc | sigridjineth/cuda_practice | apss24/transpose/util.cpp | #include "util.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cstdbool>
#include <cmath>
#include <sys/time.h>
#include <omp.h>
double get_time() {
struct timeval tv;
gettimeofday(&tv, 0);
return tv.tv_sec + tv.tv_usec * 1e-6;
}
void check_transpose(float *A, float *B, int M, int N)... | TOOL | 0.966 | 5.065238 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2024-08-29T05:31:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "40802e487... |
0a07090e-b1dd-491c-882f-88725fcc935d | ayush9009/DSA | LC he.cpp | /* The Node structure is
struct Node {
int data;
Node * right, * left;
}; */
class Solution{
public:
// Function to create sets for leaf and non-leaf nodes
void make(set<int> &l,set<int> &n,Node *root)
{
if(root==NULL)
return;
// adding current node data to the non-leaf se... | ALGO | 0.999668 | 4.438451 | {
"github_metadata": {
"branch": "main",
"commit_count": 846,
"repo_created_at": "2023-01-31T19:20:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6ca16a18cb... |
b67bd94e-fd90-431c-bf18-e26ff5cef8d9 | nunch/INF-4301B | projet_hough/if4arch.cpp | #include <cv.h>
#include <highgui.h>
#include <stdlib.h>
#include <cmath>
#include <iostream>
#define atn(i,a, b) i[a*n+b]
#define atm(i,a, b) i[a*m+b]
#define at(i,a, b, c) i[a*c+b]
using namespace cv;
int DELAY_CAPTION = 1500;
int DELAY_BLUR = 100;
int MAX_KERNEL_LENGTH = 31;
double* deriche_GL(uchar* I, double g... | ALGO | 0.997534 | 4.190678 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2015-04-14T17:38: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": "5ccd2be559... |
c4dd5cfc-fb80-4cc8-bc90-241beb55afbb | rkdehdgns1230/boj_solutions | 백준/Silver/5635. 생일/생일.cc | #include <bits/stdc++.h>
using namespace std;
int n;
// true: date2가 더 앞의 시간, false: date1이 더 앞의 시간
bool compare_date(int y1, int m1, int d1, int y2, int m2, int d2) {
if (y1 > y2)
return true;
if (y1 == y2 && m1 > m2)
return true;
if (y1 == y2 && m1 == m2 && d1 > d2)
return true;
return false;
}
int mai... | ALGO | 0.9998 | 3.375371 | {
"github_metadata": {
"branch": "main",
"commit_count": 125,
"repo_created_at": "2023-09-07T05:04:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fb05dcd06a... |
d5e77ddc-73b7-4a04-b42a-43a871d743f3 | pyo7410/Study | SWEA/1230_Cryptogram_3/1230_Cryptogram_3.cpp | #include <iostream>
#include <list>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
for (int test_case = 1; test_case <= 10; ++test_case)
{
int len;
cin >> len;
list<int> cryptogram;
list<int>::iterator begin_iter, en... | ALGO | 0.997257 | 3.615702 | {
"github_metadata": {
"branch": "master",
"commit_count": 138,
"repo_created_at": "2019-09-04T07:24: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": "f29c16a3... |
c32dde79-b4bd-4679-ad50-d388e9c9fe21 | moinulshaon/UVa-Problems | vol 126/12627__completed/12627_parsing.cpp | #include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <utility>
#include <set>
#include <map>
#include <iostream>
#include <queue>
using namespace std;
typedef long long LL;
#define PB push_back
#define FRO freopen("in.txt","r",stdin);
LL func( int k,int r ){
if (... | ALGO | 0.998209 | 3.637919 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2016-07-05T15:35:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dbb58f89f... |
d6e06b84-6cac-4a6a-a7ae-57a076af94fd | mental2008/ACM | 2017 ACMICPC Asia Regional Qingdao Online/1002.cpp | #pragma comment(linker, "/STACK:102400000,102400000")
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <cmath>
#include <cstdlib>
#include <queue>
#define mem(a, i) memset(a, i, sizeof(a))
using namespace std;
typede... | ALGO | 0.99841 | 4.15806 | {
"github_metadata": {
"branch": "master",
"commit_count": 292,
"repo_created_at": "2017-02-15T13:47: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": "ebbbd19b... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.