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 |
|---|---|---|---|---|---|---|---|
54941506-69f5-4087-a3d2-224d4795299d | Dantovisk/Programacao-Competitiva | GEMA/OBI/3a fase 2025/burocracia.cpp | #include <bits/stdc++.h> // Não funciona por algum motivo essa desgraça
#define MAXN 100010
using namespace std;
int par[MAXN][20];
vector<int> adj[MAXN];
int v[2*MAXN], lazy[8*MAXN];
int tin[MAXN], tout[MAXN];
int temp = 1;
void unlazy(int no, int l, int r){
if(lazy[no] == 0) return;
if(l == r) {
v[... | ALGO | 0.999907 | 4.31583 | {
"github_metadata": {
"branch": "main",
"commit_count": 34,
"repo_created_at": "2024-07-04T19:37:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c84ca9669c7... |
996c1054-e5ca-4e8c-b75e-ba2ad34bf639 | luchete80/fluxsol | FluxSol-Solver/Model/main.cpp | /************************************************************************
Copyright 2012-2013 <NAME>
Contact: <EMAIL>
This file is a part of FluxSol
FluxSol 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 Foun... | ALGO | 0.997389 | 3.678302 | {
"github_metadata": {
"branch": "master",
"commit_count": 449,
"repo_created_at": "2018-07-05T11:10:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 6,
"pull_requests": 0
},
"file_meta": {
"content_id": "099f9e13... |
3777a81a-c4bb-410f-b3c3-26ed5b437916 | haru210/atcoder | ABC350/B.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pint = pair<int,int>;
using pll = pair<long long, long long>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i,n) for (int i = 1; i <= (int)(n); i++)
#define YesNo(bool) if(bool) cout << "Yes" << endl; else cout << "No" << end... | ALGO | 0.999859 | 3.406234 | {
"github_metadata": {
"branch": "master",
"commit_count": 439,
"repo_created_at": "2023-05-18T08:20: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": "80ffcb1f... |
5637decc-85d7-464b-b93a-5f57fa7e538f | kevinxie4c/mass-SAMCON | src/config_loader.h | #ifndef CONFIG_LOADER
#define CONFIG_LOADER
#include <string>
namespace Config
{
// Simulation
extern double frictionCoeff;
extern double restitutionCoeff;
extern double gravity;
extern double ERP;
extern double CFM;
extern double timeStep;
extern double frameTime;
extern size_t stepPerFrame;
// cost funct... | CONFIG | 0.900976 | 4.599188 | {
"github_metadata": {
"branch": "master",
"commit_count": 77,
"repo_created_at": "2019-12-12T22:19: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": "a47af8f95... |
1a6c2c29-99bb-4401-9d46-d8acadee8c91 | Er0ze/Minor_Project---Sport-Buddy | src/main.cpp | #include <iostream>
#include <vector>
#include "UserAccountManagement/User.h"
#include "UserAccountManagement/UserAccountManager.h"
#include "EventManager/Event.h"
#include "EventManager/EventManager.h"
#include "Proximity-based Search/LocationManager.h"
#include "EventProximitySorter/EventProximitySorter.h"
#include "... | TOOL | 0.918568 | 6.363678 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-11-08T16:38: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": "778b697229c1... |
5d848515-eda5-4ed0-871f-1edc0d36d80c | ishandutta2007/codeforces-l | lawrenceli/normal/611/G.cpp | #include <cstdio>
#include <iostream>
#include <algorithm>
#include <cassert>
#include <cstring>
#include <ios>
using namespace std;
typedef long long ll;
const int maxn = 1000100;
const int mod = 1e9 + 7;
int n, x[maxn], y[maxn], mx[maxn], my[maxn], px[maxn], py[maxn];
ll area(int i, int j, int k) {
return ll... | ALGO | 0.999849 | 4.073981 | {
"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": "e9c4d7c97f2a... |
d5f4ec81-1b69-485a-be3d-f9ff669afedb | darcangelomauro/RFL | source/leapfrog.cpp | #include "geometry.hpp"
using namespace std;
using namespace arma;
// Standard leapfrog:
// K/2
// for (Nt-1) times:
// S
// K
// S
// K/2
void Geom24::leapfrog(const int& Nt, const double& dt)
{
for(int i=0; i<nHL; ++i)
{
mat[i] += (dt/2.)*mom[i];
for(int j=0; j<Nt-1; ++j)
... | ALGO | 0.999117 | 4.324916 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2019-10-22T11:52:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d1437561f... |
c92ee02c-5220-4528-9f53-046ce55bffe4 | raincross7/code-similarity | codes/train_code/problem039/problem039_165.cpp | #include <bits/stdc++.h>
using namespace std;
const long long int INF = 1e18;
int main(){
int n, k;
cin >> n >> k;
vector<int> h(n+1);
for(int i=1; i<=n; i++){
cin >> h[i];
}
vector<vector<long long int>> dp(n-k+1, vector<long long int>(n+1, INF));
// dp[i][j] = min #(operations) ... | ALGO | 0.999878 | 3.70095 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-06T05:07:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6be03a8b58be... |
301d189e-5cd3-465a-a4b8-12db504b25d8 | DrakePham/LeetCode-Process | 0729-my-calendar-i/0729-my-calendar-i.cpp | class MyCalendar {
public:
vector<pair<int, int>> bookings;
MyCalendar() {
}
bool isDoubleBooking(int currentStart, int currentEnd, int bookingStart, int bookingEnd){
if (bookingStart >= currentEnd || bookingEnd <= currentStart) return false;
return true;
}
bool bo... | ALGO | 0.99921 | 5.294041 | {
"github_metadata": {
"branch": "main",
"commit_count": 433,
"repo_created_at": "2024-08-05T16:52: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": "83962f1c57... |
a84a1570-604f-43cd-a447-5ed06892d6d6 | remydzn/cpp-study | STL/include/list/list_const_reverse_iterator.h | #pragma once
/*
* Custom const reverse iterator for list implementation by Seungtack Lee
* Author: <NAME>
* GitHub: https://github.com/remydzn/cpp-study
* Date: Apr 30, 2025
*
* <Authorship Verification>
* This section exists to verify that this project was originally created by <NAME>.
* Please leave a star when you ... | TOOL | 0.940164 | 5.779675 | {
"github_metadata": {
"branch": "main",
"commit_count": 85,
"repo_created_at": "2025-04-09T07:38:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "466380d16eb... |
934e10f5-cceb-4ec0-b1e7-8b35dacc7b8f | prince776/Data-Structures-and-Algorithms | DataStructures/Graphs/strongly_connected_componenets.cpp | #include <bits/stdc++.h>
using namespace std;
class Graph
{
int V;
vector<int> *adj;
void fillOrder(int v, bool visited[], stack<int> &s);
void dfsUtil(int v, bool visited[]);
public:
Graph(int V) : V(V)
{
adj = new vector<int>[V];
}
~Graph()
{
delete[] adj;
}
void addEdge(int v, int w);
void prin... | ALGO | 0.999951 | 5.506736 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2020-04-02T13:59:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 69,
"forks": 13,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "67b0f2f... |
670ede4f-0389-4a63-9570-7849241aa130 | 0tso/pathfinding | src/algorithms/a_star.cpp | #include "algorithms/a_star.hpp"
#include "algorithms/util.hpp"
#include "state.hpp"
Algorithm::Result::Type AStar::update()
{
if(open.empty())
{
result.type = Result::Type::FAILURE;
return Result::Type::FAILURE;
}
auto [approx_dist, node_idx] = open.top();
open.pop();
auto [... | ALGO | 0.999893 | 5.945124 | {
"github_metadata": {
"branch": "main",
"commit_count": 47,
"repo_created_at": "2024-07-12T09:02:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "c34c29c42fa... |
96fa4e0a-eeae-4707-ba9b-cdca0c131501 | ydb-platform/ydb | ydb/core/ymq/actor/attributes_md5.cpp | #include "attributes_md5.h"
#include <library/cpp/digest/md5/md5.h>
#include <util/network/init.h>
#include <cstdint>
#include <vector>
//
// About attributes MD5 calculation.
// https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html#sqs-attributes-md5-message-digest-... | TOOL | 0.932263 | 6.976038 | {
"github_metadata": {
"branch": "main",
"commit_count": 35208,
"repo_created_at": "2022-02-07T14:52:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4512,
"forks": 701,
"issues": 2263,
"pull_requests": 682
},
"file_meta": {
"content_id": ... |
bfb8c2a0-8f92-45d6-bc3d-76620bcbf4ca | ricortiz/moops | testing/math/inexact_newton.cpp | #include<iostream>
#include<limits>
#include<cmath>
#include<map>
#include "math/nonlinear_solver/inexact_newton.hpp"
template<int size>
struct function_type;
template<>
struct function_type<2>
{
template<typename value_type>
void operator() ( const value_type *x, value_type *Fx )
{
Fx[0] = x[0]-x... | ALGO | 0.991538 | 4.222796 | {
"github_metadata": {
"branch": "master",
"commit_count": 151,
"repo_created_at": "2013-09-19T23:14:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8cc1e0ab... |
ee5252eb-9453-4acc-9dc4-638e2523b1c2 | Ishwarendra/100-Day_Code-Challenge | Day_121_to_140/Day_121/1676_D.cpp | #include <bits/stdc++.h>
using i64 = long long;
#ifdef LOCAL
#include <F:\CPP\Debug\debug.h>
#else
#define trace(x...) 1
#endif
const i64 inf = i64(1e10);
void solve()
{
int n, m;
std::cin >> n >> m;
std::vector<std::vector<int>> grid(n, std::vector<int>(m));
for (int i = 0; i < n; ++i)
for (int j = 0... | ALGO | 0.999899 | 4.759748 | {
"github_metadata": {
"branch": "master",
"commit_count": 45,
"repo_created_at": "2022-05-15T05:31:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f77e643dd... |
49318cb0-5ede-45bb-af94-0c534a66b20e | JustinSu77/CS3A-Labs | Lab 12/problem___2.cpp | /**
Date: 10/10/2023
By: <NAME>
Purpose: Problem #2 of Lab #12
**/
#include <iostream>
using namespace std;
/**
Purpose: Outputs the elements of given dynamic integer array to terminal.
Input: array as dynamic integer array
arraySize as number of elements in given dynamic integer array a... | ALGO | 0.999604 | 5.396281 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2023-09-14T03:31: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": "b462a9c7ad4... |
994f5b9e-ebc0-47eb-9768-5475f651861b | AshwinKanna/practice-tasks | data-structures/queue/queue_using_array.cpp | #include <iostream>
#include <string>
using std::string;
using std::cout;
using std::cin;
using std::endl;
const short queue_size = 8;
int queue_array[queue_size];
char front = -1, rear = -1;
void handle_enqueue()
{
if(rear >= queue_size-1)
{
cout << endl << "Queue is already full. Please dequeue to... | ALGO | 0.914398 | 4.298661 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2020-05-01T08:11: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": "d3da597cd... |
f2168960-7120-406f-914d-fba2a4a450f7 | deepdarshan21/leetcode-solutions | 567. Permutation in String/Sliding Window.cpp | #include <bits/stdc++.h>
using namespace std;
/*
Approach: Sliding Window
Make a vector of size 26 to store the frequency of each character in s1.
Then, make another vector of size 26 to store the frequency of each character
in s2. Then, iterate over s2 and check if the two vectors are equal... | ALGO | 0.999974 | 6.414546 | {
"github_metadata": {
"branch": "main",
"commit_count": 889,
"repo_created_at": "2022-01-07T14:50:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c24c987bd3... |
d60f8a8f-65b6-485a-aacc-42908f63a628 | mangoqwq/competitive-programming | DMOPC/dmopc20c3p4.cpp | #include <bits/stdc++.h>
using namespace std;
#define ms(x,a) memset(x,a,sizeof x)
typedef long long ll;
const int mod=1e9+7, inf=0x3f3f3f3f, MAXN=5001;
// 8/15
int a[MAXN], ans;
int dp[MAXN][MAXN][2]; // 0 is dec, 1 is inc
int get(int l, int r){
return a[r]-a[l-1];
}
int main(){
cin.tie(0)->sync_with_stdi... | ALGO | 0.999969 | 3.537939 | {
"github_metadata": {
"branch": "master",
"commit_count": 540,
"repo_created_at": "2020-08-28T16:37:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "78f29336... |
e6f51c1f-b10c-4af4-bcff-0a4b253b8204 | mdihemu/Online-Judge | Codeforces/B. Minimum Product.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl "\n"
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
void solve();
int32_t main()
{
IOS;
int _=1;
cin >> _;
while(_--) solve();
return 0;
}
int calculation(int a,int b,int x,int y,int n)
{
int mn = m... | ALGO | 0.999893 | 4.308727 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2019-11-14T18:37: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": "82e5167a2... |
94cc73d4-77dc-4753-968f-250dba2e2a3f | ssk4988/Coding | CSES/additionalproblems/listofsums.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using pd = pair<ld, ld>;
using vi = vector<int>;
using vl = vector<ll>;
using vd = vector<ld>;
using vpi = vector<pi>;
using vpl = vector<pl>;
using vpd = vector<pd>;
using vv... | ALGO | 0.999972 | 3.457574 | {
"github_metadata": {
"branch": "main",
"commit_count": 189,
"repo_created_at": "2021-11-02T23:44:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "308af054c7... |
44a49878-c787-4444-a679-3951678e45c5 | jjoo0803/Algorithm | 10828 스택.cpp | #include <iostream>
#include <stack>
using namespace std;
int main() {
int n;
string com;
cin >> n;
stack<int> st;
for(int i=0; i<n; i++) {
cin >> com;
if (com == "push") {
int k;
cin >> k;
st.push(k);
}
else if (com == ... | ALGO | 0.998647 | 4.306422 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-09-04T02:38: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": "80f1d4b26f... |
9baa995c-5b6c-4741-9f53-08a9d08dd7e4 | sonishreyas/SDE | Linked List/check-palindrome-in-linked-list.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode* revers... | ALGO | 0.999867 | 6.016016 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2021-04-13T20:43: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": "ce3bcd38eb... |
96e5c181-168d-4a06-ab58-59aa769ca559 | boennecd/mixprobit | src/integrand-multinomial.cpp | #include "integrand-multinomial.h"
#include "Brent_fmin.h"
#include "pnorm.h"
#include "dnorm.h"
using std::log;
using std::exp;
using std::abs;
namespace integrand {
static double const norm_const = 1. / std::sqrt(M_PI * 2.),
norm_const_log = log(norm_const);
/** the class assumes that the `lp` obje... | ALGO | 0.999925 | 5.273725 | {
"github_metadata": {
"branch": "master",
"commit_count": 75,
"repo_created_at": "2020-01-28T13:09:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e73ffca61... |
81d0ee84-dafa-4801-8e08-19a650800833 | RDLLab/oppt | src/oppt/robotEnvironment/SDFParser.cpp | /**
* Copyright 2017
*
* This file is part of On-line POMDP Planning Toolkit (OPPT).
* OPPT is free software: you can redistribute it and/or modify it under the terms of the
* GNU General Public License published by the Free Software Foundation,
* either version 2 of the License, or (at your option) any later ver... | TOOL | 0.954648 | 6.329443 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-11-03T02:50:01.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 46,
"forks": 16,
"issues": 2,
"pull_requests": 1
},
"file_meta": {
"content_id": "23539f965... |
71255094-a78b-4c9c-8b3b-1db118694300 | Yash1256/Codechef-Solutions | UNITGCD.cpp | #include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
#define pb push_back
#define bg begin
#define ff first
#define ss second
#define PI 3.14
#define quick \
ios::sync_with_stdio(false); \
cin.tie(0);
#pragma GCC target("avx2")
#pragma GCC optimizati... | ALGO | 0.999894 | 3.860032 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-04-30T10:12: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": "9c4e0088a0... |
c3e1e4e7-1e98-4499-886e-d2e46eeed780 | s11o-4/Cpp | Theory/Estructuras_Datos/idea_listas_enlazadas.cpp | #include <bits/stdc++.h>
using namespace std;
/*
Insertar elementos en una lista
1. Crear un nuevo nodo
2. Asignar a nuevo_nodo->dato el elemento que queremos incluir en la lista
3. Crear dos nodos auxiliares y asignar lista al primero de ellos
4. Insertar el elemento a la lista
*/
struct Nodo
... | ALGO | 0.999704 | 4.830005 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2021-03-26T00:44: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": "07ae8104914... |
37db169d-1ae9-424e-bb89-71c55501d78f | wiizii/Algorithm_solution | SCC.cpp | #include <algorithm>
#include <iostream>
#include <stack>
#include <vector>
#define MAX 10001
using namespace std;
int v, e;
int id, d[MAX];
bool finished[MAX];
vector<int> adj[MAX];
vector<vector<int>> SCC;
stack<int> s;
// dfs는 총 정점 갯수만큼 실행
int dfs(int x) {
d[x] = ++id; //노드마다 고유 번호 할당.
s.push(x);
int... | ALGO | 0.999971 | 4.390151 | {
"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": "a45fcd4f... |
cdc582a7-2e15-4fc7-9334-c2d66aa4e5cf | Saurav1928/Hard75_Challenge | 1Jan/1739B.cpp | #include <bits/stdc++.h>
using namespace std;
void solve()
{
int n;
cin >> n;
vector<int> d(n);
for (int i = 0; i < n; i++)
cin >> d[i];
vector<int> a(n);
a[0] = d[0];
bool flg = true;
for (int i = 1; i < n; i++)
{
if (d[i] == 0)
{
a[i] = a[i - 1]... | ALGO | 0.999865 | 3.829381 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-01-02T02:31: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": "c90ec4a62e2... |
b4614069-853e-4dd9-bf7f-cd89671bf23e | NVIDIA/thrust | thrust/system/cuda/detail/tabulate.h | /******************************************************************************
* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistribution... | TOOL | 0.975738 | 7.406143 | {
"github_metadata": {
"branch": "main",
"commit_count": 4758,
"repo_created_at": "2012-03-06T01:01:29.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4980,
"forks": 764,
"issues": 0,
"pull_requests": 8
},
"file_meta": {
"content_id": "4d358... |
3f2190d0-c799-49b5-af6d-801f5be69b98 | carla-simulator/carla | LibCarla/source/third-party/marchingcube/Cube.h | #pragma once
#include "DataStructs.h"
namespace MeshReconstruction
{
struct IntersectInfo
{
// 0 - 255
int signConfig;
// If it exists, vertex on edge i is stored at position i.
// For edge numbering and location see numberings.png.
std::array<Vec3, 12> edgeVertIndices;
};
class Cube
{
... | ALGO | 0.998901 | 6.164923 | {
"github_metadata": {
"branch": "ue5-dev",
"commit_count": 6619,
"repo_created_at": "2017-10-24T09:06:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 12735,
"forks": 4115,
"issues": 1141,
"pull_requests": 28
},
"file_meta": {
"content_id... |
51f9cb06-eb2d-40fd-8611-e0713e7eddca | mchzh/LeetCodeForQuote | DFS/282. Expression Add Operators/282. Expression Add Operators.cpp | class Solution {
vector<string> rets;
public:
vector<string> addOperators(string num, int target) {
DFS(num, (long long)target, 0, 0, 0, "");
return rets;
}
void DFS(string& num, long long target, int pos, long long preval, long long lastval, string prestr) {
// corner case
... | ALGO | 0.999968 | 5.997508 | {
"github_metadata": {
"branch": "master",
"commit_count": 1277,
"repo_created_at": "2020-06-28T23:51: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": "d3c865c... |
a138be3f-542e-4bad-b738-a8fae0aa6177 | BasJansweijer/ChessBitBoards | tools/common/stockfish.h | #pragma once
#include <vector>
#include <string>
#include <boost/process.hpp>
#include <memory>
#include <map>
#include <chrono>
namespace bp = boost::process;
namespace stockfish
{
using perftResult = std::unordered_map<std::string, uint64_t>;
class Engine
{
public:
Engine()
{
... | TOOL | 0.964008 | 6.105381 | {
"github_metadata": {
"branch": "main",
"commit_count": 172,
"repo_created_at": "2025-02-13T13:12:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 5,
"pull_requests": 0
},
"file_meta": {
"content_id": "994aa3b774... |
c14e22cf-8947-419c-83e8-5f3a58fa84b5 | Forrest-Z/hokuyo | catkin_ws/src/bob_prototype/deprecated/src/binary_search_scan_matcher.cpp | #include <bob_slam/binary_search_scan_matcher.h>
#include <cstring>
#include <limits>
#include <list>
#include <iostream>
#include <ros/ros.h>
#include <bob_toolbox/grid_algorithms.h>
#include <bob_slam/scan_scoring.h>
#include <bob_config/config.h>
namespace bob
{
// Implements a sort of pseudo binary-search. S... | ALGO | 0.999112 | 5.805106 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2017-08-29T08:38:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a9f069fad6... |
cc8451b8-66bd-4b53-8006-9a2f73f76dfe | mr-sohel/Competitive-Programming | Light OJ/1136 - Division by 3.cpp | /**
* Author : Mr_Sohel
* Task :
* Algo :
**/
#include <bits/stdc++.h>
#define endl '\n'
#define sqr(x) (x) * (x)
#define gcd(x,y) __gcd(x,y)
#define lcm(x,y) ((x/gcd(x,y)) * y)
#define pb push_back
#define pf push_front
#define mk make_pair
#defi... | ALGO | 0.99981 | 4.158649 | {
"github_metadata": {
"branch": "master",
"commit_count": 371,
"repo_created_at": "2020-07-24T13:46:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "03c45819... |
3dc6b415-fa8f-4f6d-a412-cbc488add559 | allenanswerzq/byteme | codeforces/problems/1264a/1264a.cc | /* created : 2020-02-04 20:05:02
* accepted : 2020-02-04 21:32:13
* author : landcold7
*/
#include <bits/stdc++.h>
using namespace std;
#define x first
#define y second
#define mt make_tuple
#define all(x) (x).begin(), (x).end()
#ifndef LOCAL
#define trace(...)
#endif
typedef long long ll;
void solve() {
in... | ALGO | 0.998136 | 3.840521 | {
"github_metadata": {
"branch": "master",
"commit_count": 810,
"repo_created_at": "2017-06-16T09:27:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "748d49df... |
cb7ac3df-4347-4c47-8633-7dcb37fa32ea | 0xm4yo/compro | atcoder/tessoku-book/cpp/A54.cpp | #include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ull = unsigned long long;
#define rep(i, a, b) for(ll i=a; i<b; i++)
#define rrep(i, a, b) for(ll i=a; i>=b; i--)
#define all(a) (a).begin(), (a).end()
#define YesNo(bool) if(bool){cout<<"Yes"<<en... | ALGO | 0.999136 | 4.194375 | {
"github_metadata": {
"branch": "main",
"commit_count": 126,
"repo_created_at": "2024-05-07T13:22: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": "ae272a0c4e... |
346992b1-58f2-4791-99e1-ee307c362626 | Maria-Clara019/faculdade | exercício 4 - simulado.cpp | #include <iostream>
using namespace std;
int numeros(int num1, int num2, int num3){
if ((num1<num2)&&(num2<num3)){
cout << "os numeros estao em oredem crescente" << endl;
cout << "o maior numero : " << num3;
return num3;
}else{
if ((num3<num2)&&(num2<num1)){
cout << "os numeros estao em ordem decrescente";
... | ALGO | 0.999611 | 3.77424 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2025-05-20T19:13:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6fa207b3fb4... |
3fb793d0-6c1c-4a3c-893f-27a9bd0cd8ee | HayeonJeong/Algorithm | [5-3] 0-1 knapsack (DFS).cpp | void knapsack(index i, int profit, int weight) {
// 현재까지의 최대 이익과 현재까지의 최적해 정보 갱신
if (weight <= W && profit > maxprofit) {
maxprofit = profit;
numbest = i;
bestset = include;
}
// promising 함수를 통해 현재 상태가 유망한지 검사
if (promising(i, profit, weight)) {
// 1. i+1번째 아이템을 선택한... | ALGO | 0.999954 | 4.365141 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-12-15T15:01:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f1025b82d58c... |
03a2016d-9797-4d41-ace5-fae0f31c3321 | flxcsx/Cf_solved | 1770a.cpp | /* ALTXT */
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int inf = 1e9 + 5;
const int64_t INF = 1e18 + 5;
void solve()
{
int n, m;
cin >> n >> m;
vector<int> a(n);
vector<int> b(m);
ll suma = 0, sumb = 0;
for (int i = 0; i < n; i++)
{
cin >> a[i];
... | ALGO | 0.999985 | 3.654815 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-04-30T08:02: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": "c93ec3188246... |
aa644351-72a2-4f8a-ab69-f8b9eba8ee66 | overdd/BSUIR-Cplusplus | Anton Serko Solution/Laba 5_2/Source.cpp | #define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<stdio.h>
using namespace std;
void arithmeticMeanOfColumnWithNegativeValue(int**, int*, int*);
void tablePrinter(int**, int*, int*);
void horizontalLineTablePrinter(int**, int*); //my_prt_strt(array, qty column);
int main()
{
setlocale(LC_ALL, "Russi... | TOOL | 0.997144 | 3.89883 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2019-10-21T11:22: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": "0024e77cf... |
e7515f05-e402-4b65-a4dd-1e9f6ab79021 | Riyad0001/Phitron-Practice | Algorithm/Is_there_a_cycle.cpp | #include <bits/stdc++.h>
using namespace std;
int const N = 51 + 2;
vector<int> v[N];
bool vis[N];
bool ans;
void dfs(int src)
{
vis[src] = true;
for (int child : v[src])
{
if (vis[child] == true)
{
ans = true;
return;
}
dfs(child);
}
vis[src] ... | ALGO | 0.999975 | 4.339621 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-02-06T14:26: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": "192829ae4dc1... |
8d685e3e-d582-4011-9990-90078a03810f | PollobRay/DUET | Undergraduate (B.Sc. Engg.)/2. Second Year/2. Second Sem/Data Structure/Tree/Binary Search Tree/BST -Assignment Moksedul.cpp | //
// Created by Ray on 1/9/2022.
//
//
// Created by Ray on 1/9/2022.
//
/*
#include <iostream>
#include<algorithm>
#include <chrono>
using namespace std;
using namespace std::chrono;
struct node {
int key;
struct node *left, *right;
};
struct node *newNode(int item) {
struct node *temp = (struct node... | TEST | 0.98901 | 4.650683 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-07-02T15:49: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": "1fb31648b0cc... |
276d003d-e630-4154-94c4-ee02c1023a2c | lws803/mBot_grp3 | Code/Motor_Driver/Motor_Driver.ino | #include "MeOrion.h"
#include <PID_v1.h>
#define TIMEOUT 30000
#define ULTRASONIC_SENSOR_PIN 12
MeDCMotor motorL(M1);
MeDCMotor motorR(M2);
uint8_t motorSpeedL = 100;
uint8_t motorSpeedR = 100;
double Output, Output2, Input, Input2, Setpoint, Setpoint2;
int state = 0;
PID myPID(&Input, &Output, &Setpoint,1,0,0, D... | TOOL | 0.983499 | 4.262722 | {
"github_metadata": {
"branch": "master",
"commit_count": 90,
"repo_created_at": "2017-10-16T09:10:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c5bbd470e... |
6c4289d9-a8a4-4970-9e24-0d13fae35be7 | facebook/hermes | lib/Optimizer/Scalar/CodeMotion.cpp | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#define DEBUG_TYPE "codemotion"
#include "hermes/Optimizer/Scalar/CodeMotion.h"
#include "hermes/IR/Analysis.h"
#include "hermes/... | ALGO | 0.998283 | 7.256621 | {
"github_metadata": {
"branch": "main",
"commit_count": 5623,
"repo_created_at": "2018-10-22T19:13:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 10394,
"forks": 695,
"issues": 118,
"pull_requests": 67
},
"file_meta": {
"content_id": "a... |
896b0a0d-16fe-418d-a06b-cd967c2af4ba | pedrodelyra/competitive-programming | uvaonlinejudge/computational_geometry/10585.cpp | #include <bits/stdc++.h>
#define EPS 1e-6
using namespace std;
using ii = pair<int, int>;
class point {
public:
double x;
double y;
point(double xv = 0, double yv = 0) : x(xv), y(yv) {}
bool equals(point other) {
return fabs(x - other.x) < EPS && fabs(y - other.y) < EPS;
}
};
int main(void) {
int tc;
sca... | ALGO | 0.999954 | 4.550455 | {
"github_metadata": {
"branch": "master",
"commit_count": 163,
"repo_created_at": "2016-07-13T00:23:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4560f12c... |
1f8b4725-7f87-40dc-b402-7c341045b173 | shivangigoel1302/Data-Structures-and-algorithm | recursion/Nqueenrecursion.cpp | #include<iostream>
using namespace std;
bool issafe(int board[][10],int i,int j,int n)
{
for(int row=0;row<i;row++)
{
if(board[row][j]==1)
{
return false;
}
}
int x=i;
int y=j;
while(x>=0 && y>0)
{
if (board[x][y]==1)
{
return... | ALGO | 0.999799 | 4.40395 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2020-06-12T07:42:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4234d00c0c... |
df81d2c7-6a89-43df-9118-b7968b456b3b | singlarohan/leetcode_sol | 0235-lowest-common-ancestor-of-a-binary-search-tree/2023-06-30 00.13.59 - Accepted - runtime 40ms - memory 23.2MB.cpp | /**
* 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:
TreeNode *helper(TreeNode *root, TreeNode* p, TreeNode* q, long maxi, long mini){
if(!... | ALGO | 0.999987 | 6.193334 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-08-05T02:14: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": "c87e2d60959d... |
a4e0b215-357c-4a61-9f12-7c8eb95fb5b1 | Vol-Tric/codehelp | lecture 23(backtracking)/program_3.cpp | // sudoku solver
#include<bits/stdc++.h>
using namespace std;
bool isSafe(int row , int col , vector<vector<int>>& board , int val){
int n = 9;
for(int i=0 ; i<n ; i++){
// row check
if(board[row][i] == val){
return false;
}
// col check
if(bo... | ALGO | 0.998466 | 5.731102 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2024-03-06T03:47: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": "dbc7aad0691... |
ad47cb31-0019-4da6-b213-0920454796c9 | JaredPWright/Programming2Homework | blackbox/blackbox.cpp | #include <iostream>
#include "p2queue.h"
#include "p2priorityqueue.h"
#include "p2stack.h"
using namespace std;
int main ()
{
Queue<int> testqueue;
PriorityQueue<int, int> ptestqueue;
Stack<int> teststack;
initialize(testqueue);
initialize(ptestqueue);
initialize(teststack);
bool queueboo... | ALGO | 0.926994 | 4.497577 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2022-02-17T22:25:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d5feda434b... |
3467af2c-a5ad-4d01-9515-594fe3216ac3 | prasadwadghule/hpc | hpc3pr.cpp | #include <iostream>
#include <vector>
#include <numeric>
#include <omp.h>
using namespace std;
int main() {
int n;
cout << "Enter the size of the array: ";
cin >> n;
vector<int> arr(n);
cout << "Enter the elements of the array:\n";
for (int i = 0; i < n; ++i) {
cin >> arr[i];
}
... | ALGO | 0.999956 | 5.001605 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2024-04-29T17:00:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5eec48e1c49c... |
26836913-d559-4ace-ad41-4cb3dce77150 | chikien07012006/Competitive_Prog | Segment_tree_query_sum.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
long long n, m, a[N];
long long smt[N];
void build(int id, int l, int r) {
if (l == r) {
smt[id] = a[l];
return;
}
int mid = (l + r) / 2;
build(id * 2, l, mid);
build(id * 2 + 1, mid + 1, r);
smt[id] = smt[id... | ALGO | 0.999918 | 5.068811 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-12-29T08:28: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": "b6e195115049... |
6782d0bf-afbd-4550-b01a-2acfff1590dc | namanmodani/CS-32 | Homework/Homework 2/mazequeue.cpp | //
// CS 32 Homework 2
// <NAME>
// mazequeue.cpp
//
#include <iostream>
#include <queue>
#include <string>
using namespace std;
class Coord
{
public:
Coord(int rr, int cc) : m_r(rr), m_c(cc) {}
int r() const {return m_r;}
int c() const {return m_c;}
private:
int m_r;
int m_c;
};
bool pathExists... | ALGO | 0.999581 | 4.682838 | {
"github_metadata": {
"branch": "main",
"commit_count": 156,
"repo_created_at": "2022-01-19T01:12:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "de3ddc20af... |
f585ad9b-2920-4619-a683-9120d9dc777a | ludwigschubert/cs166 | pset4/StdSetTree.h | #ifndef StdSetTree_Included
#define StdSetTree_Included
#include <set>
#include <stddef.h>
#include <vector>
/**
* A BST type backed by the std::set container, which is typically implemented
* as a red/black tree. This is designed as a comparison point against which
* we'll measure the weight-balanced and splay tr... | TOOL | 0.97172 | 6.900879 | {
"github_metadata": {
"branch": "master",
"commit_count": 51,
"repo_created_at": "2016-04-06T02:56:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dee7afdfa... |
db4607db-83ec-47e4-85e9-c4baf38995ab | SongJiUk/Algorithm | 백준/Silver/2828. 사과 담기 게임/사과 담기 게임.cc | #include <iostream>
#include <queue>
#include <vector>
#include <algorithm>
#include <stack>
#include <string>
typedef long long ll;
#define endl '\n'
#define MAX 1e9
using namespace std;
int main(void)
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N, M, J;
cin >> N >> M;
cin >> J;
ve... | ALGO | 0.999963 | 3.801654 | {
"github_metadata": {
"branch": "main",
"commit_count": 395,
"repo_created_at": "2024-01-29T10:34:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0675b64ed5... |
94cae2b3-7e97-4c5e-a41f-39b3e853693b | fucfan/code | solution.cpp | #include<bits/stdc++.h>
#define fi first
#define se second
#define ull unsigned long long
#define ll long long
#define getBit(a , b) bool((a) & (1 << (b)))
#define turnOn(a , b) ((a) | (1 << (b)))
#define turnOff(a , b) ((a) ^ (1 << (b)))
#define pii pair<int, int>
#define pb push_back
#define nl cout << "\n";
#define ... | ALGO | 0.999987 | 4.046963 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-10-14T14:26: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": "de708027a1e4... |
31b40d43-d6e6-4191-91a9-a738601d8749 | shihuajie/Self-Tuning | PatchMatch/include/patch.h | /*******************************************************************************
* patch.h - abstract image patch
*******************************************************************************
* Add license here...
*******************************/
#ifndef PATCH_H
#define PATCH_H
#include <cmath>
#include <cstdli... | TOOL | 0.907653 | 6.448514 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-10-15T17:02:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "d7bee4042b... |
068761e4-4135-4ac2-970e-a60c9eb792a5 | DionysiosB/CodeForces | 0800-0899/864C-Bus.cpp | #include <cstdio>
int main(){
long a, b, f, k; scanf("%ld %ld %ld %ld", &a, &b, &f, &k);
if(b < f || b < a - f){puts("-1"); return 0;}
long g(b), count(0);
for(long p = 1; p <= k; p++){
if(p & 1){
g -= f; if(g < 0){puts("-1"); return 0;}
if(g < (p < k ? 2 : 1) * (a - f... | ALGO | 0.999722 | 3.030962 | {
"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": "4d5... |
7df68cce-2363-4e49-919e-149ae667e08d | ishandutta2007/codeforces-q | qaqautomaton/normal/1327/G.cpp | /*
Author: QAQAutomaton
Lang: C++
Code: G.cpp
Mail: <EMAIL>
Blog: https://www.qaq-am.com/
*/
#include<bits/stdc++.h>
#define int long long
#define debug(...) fprintf(stderr,__VA_ARGS__)
#define DEBUG printf("Passing [%s] in LINE %d\n",__FUNCTION__,__LINE__)
#define Debug debug("Passing [%s] in LINE %d\n",__FUNCTION__,_... | ALGO | 0.999938 | 3.794791 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:56: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": "5e0443336b46... |
85ff03a4-200b-40ee-bca6-c25ebd02b216 | caiangums/project-euler | 022/022.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
#define NAMES vector<string>
ifstream file;
void open_file(const char * file_name) {
file.open(file_name);
if (!file) {
cerr << "Error on reading file" << endl;
exit(1);
... | ALGO | 0.999091 | 4.368331 | {
"github_metadata": {
"branch": "main",
"commit_count": 57,
"repo_created_at": "2018-04-23T23:25: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": "e7add3359a5... |
418beede-e333-473e-8230-bef81f17e7cd | CitreaStricta/estructuras-de-datos | proyecto-1/Predictor.cpp | #include "Predictor.h"
Predictor::Predictor()
{
trie = new TrieNode();
}
Predictor::~Predictor()
{
delete trie;
}
void Predictor::insert(string s, int freq)
{
this->trie->insert(s, freq);
}
bool Predictor::wordIsInTrie(string s)
{
TrieNode* curNode = this->trie;
for (int i = 0; i < s.size(); i++... | ALGO | 0.998427 | 4.7786 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2022-08-18T22:13: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": "db278672d2... |
d47b2b6f-221d-4f3b-b060-d4ae3f12e815 | Maruf089/Light-Oj---Probelm-Solutions | Light Oj/1189 - Sum of Factorials.cpp | #include<bits/stdc++.h>
#define endl '\n'
#define sf scanf
#define sfi(a) sf("%d",&a)
#define sfl(a) sf("%lld",&a)
#define sffi(a,b) sf("%d %d",&a,&b)
#define sffl(a,b) sf("%lld %lld",&a,&b)
#define sfffi(a,b,c) sf("%d %d %d",&a,&b,&c)
#define sfffl(a,b,c) sf("%lld %lld %lld",&a,&b,&c)
#define pf printf
#define pfi(a) ... | ALGO | 0.997619 | 3.50457 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2019-08-03T18:13: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": "6dc1dfb7ea... |
d13ddd6c-a036-45c0-94a4-c78164b7b39d | thatayushmallick/cs314_iitdh | assignment-2/src/part2_partioner.cpp | #include <iostream>
#include <fstream>
#include <unistd.h>
#include <sys/wait.h>
#include <signal.h>
#include <string>
using namespace std;
int main(int argc, char **argv)
{
if(argc != 6)
{
cout <<"usage: ./partitioner.out <path-to-file> <pattern> <search-start-position> <search-end-position> <max-chunk-size>\npr... | ALGO | 0.957337 | 3.851181 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2024-08-06T10:24:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b5b8c25b072... |
36cec3a8-2485-4f36-b728-b2b957b7ff4d | Anas2108/Data_Structure | Vector.cpp |
#include <iostream>
#include <cassert>
using namespace std;
class Vector
{
private:
int*arr=nullptr;
int size =0;
int capacity;
public:
Vector(int size) :size(size)
{
if (size<0)
size=1;
capacity=size+10;
arr =new int [capacity];
}
~Vector() {
delete[] arr;
arr = nullptr;
}
int get (int index){
... | TOOL | 0.977272 | 3.847017 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-07-18T16:34: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": "00789a64a47d... |
9b58e45c-b763-4b55-a104-40d8c75e6a30 | aliemre2023/algorithm | algoleague/Algorithm Training Set - Data Structures #1/bom-with-strict-rules.cpp | // Josephus Problem
#include <iostream>
using namespace std;
// Header files, namespaces to use
// ordered set
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set \
tree<int, null_type, less<int>, rb_tree_tag,... | ALGO | 0.999997 | 4.425211 | {
"github_metadata": {
"branch": "main",
"commit_count": 104,
"repo_created_at": "2023-09-08T07:56: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": "0576174975... |
a9a4162d-b811-476e-81b9-35ef7483bcec | tsuyosshi/competitive-programming | Atcoder/ABC/E/LEQ.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define ALL(x) (x).begin(),(x).end()
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))
typedef pair<int,int> PI;
typedef pair<int,pair<int,int>> PII;
static const int INF=1010000000000000017LL;
static const double eps=1e-12;
sta... | ALGO | 0.999974 | 4.317655 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2020-05-14T23:22: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": "9a2aeffcc... |
e15e48d8-14fe-4a33-a06c-6bc3ba76bb91 | ryusuz/algorithm | programmers/level2/메뉴리뉴얼/메뉴리뉴얼.cpp | // 22. 01. 15. 메뉴리뉴얼
#include <string>
#include <vector>
#include <algorithm>
#include <iostream>
#include <map>
using namespace std;
bool cmp (pair<string, int> a, pair<string, int> b) {
return a.second > b.second;
}
void dfs(map<string, int> &m, string &order, string comb, int depth, int index) {
if (dept... | ALGO | 0.999961 | 5.157059 | {
"github_metadata": {
"branch": "master",
"commit_count": 767,
"repo_created_at": "2021-05-17T16:13: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": "a41cdf32... |
d7109ae1-a035-4c60-bf1e-444aa4120b01 | AliZaiN-157/Fast-3rd-Sem | DS/Lab/Lab12/Q1.cpp | #include <iostream>
#include <vector>
#include <list>
#include <map>
using namespace std;
// Prims Algorithm
class Graph
{
int V;
list<pair<int, int> >* adj;
map<int, int> m;
map<int, int>::iterator it;
int* key;
int* parent;
bool* mstSet;
int minKey();
void printMST();
public:
Graph(int V);
void addEdge(... | ALGO | 0.999992 | 4.938742 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-01-08T11:32:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "be1f4e7d0f... |
faef062e-31f2-4bb9-988b-3b810ac03c6b | jen-dooley/Robotics_Final | assets/BFS.ino | // need this to print stuff
#include <Sparki.h>
// need this to use the queue
#include "queue.h"
// makes directions readable
enum direction
{
left, right, up, down, none
};
// node keeps track of several things
struct node
{
// whether there is a wall
int wall;
// whether a node has been visited
int visited;... | ALGO | 0.999894 | 3.561534 | {
"github_metadata": {
"branch": "master",
"commit_count": 65,
"repo_created_at": "2015-11-13T20:03:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "edb3a7af9... |
607f9dcd-f4f3-4622-8fe1-22c5f2116fb7 | llynv/CP-files | codeforce/1975D.cpp | /*
Code by: linvg
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ii pair<int, int>
#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define rep(i, a, b) for (int i = (a); i < (b); ++i)
#define per(i, a, b) f... | ALGO | 0.999743 | 3.749066 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2023-05-26T04:12: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": "272621217f8... |
3d541434-5742-4976-807c-6179b6cb43e3 | QuickSorting/Codeforces | Round 755/D.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T> void check_min(T &a, const T &b){ a = (a < b) ? a : b; }
template<class T> void check_max(T &a, const T &b){ a = (a > b) ? a : b; }
#define all(x) (x).begin(), (x).end()
const int N = 10 + 3;
const int INF = 1e9;
int n;
string s[N... | ALGO | 0.999907 | 3.600931 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2021-12-13T18:02: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": "375562e4eb7f... |
8a5c1f24-3802-4b97-b5a2-55fa44ca27ca | Uintah/Uintah | src/Core/Math/CubeRoot.cc | /*
* The MIT License
*
* Copyright (c) 1997-2025 The University of Utah
*
* 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
* right... | ALGO | 0.99997 | 4.624784 | {
"github_metadata": {
"branch": "master",
"commit_count": 55375,
"repo_created_at": "2019-09-03T20:22:50.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 63,
"forks": 23,
"issues": 12,
"pull_requests": 1
},
"file_meta": {
"content_id": "b36a... |
3d8f68e6-1b0e-41eb-9a9a-b6267d70fcc8 | KrishnaTulasiSatti/Leetcode | 0213-house-robber-ii/0213-house-robber-ii.cpp | class Solution {
public:
int fun(vector<int>&nums,int ind,int n,vector<int>&dp) {
if(ind >= n) return 0;
if(dp[ind] != -1) return dp[ind];
// Pick the element and move to the next next index
int pick = nums[ind]+fun(nums,ind+2,n,dp);
// Not Pick the element
int non_pick = fun(nums,ind+... | ALGO | 0.999993 | 5.184253 | {
"github_metadata": {
"branch": "main",
"commit_count": 1575,
"repo_created_at": "2024-05-22T06:22: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": "4a72de602... |
1553330e-9677-4c39-adfa-083315264937 | rivercheng/view-dependent-progressive-mesh-streaming | vertexpq.hh | #ifndef __VISIBLE_PQ_H__
#define __VISIBLE_PQ_H__
#include <queue>
#include <GL/glut.h>
#include <map>
#include "vdmesh.hh"
enum SelectMode {Level, LevelArea, ScreenArea, Random, WeightedScreen, SilhouetteScreen};
//typedef std::priority_queue<VertexID, std::vector<VertexID>, CompareArea> PQ;
/**
* the class to ... | ALGO | 0.994543 | 5.18918 | {
"github_metadata": {
"branch": "master",
"commit_count": 56,
"repo_created_at": "2009-10-08T09:25:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "254a1c0f9... |
fafaf286-4fe0-4b76-b9b9-fe512005001f | ishandutta2007/codeforces-c | christ/normal/1521/C.cpp | #include <bits/stdc++.h>
using namespace std;
const int MN = 1e5+5;
int ask (int t, int i, int j, int x) {
printf ("? %d %d %d %d\n",t,i,j,x);
fflush(stdout);
int ret; scanf ("%d",&ret);
return ret;
}
void solve () {
int n; scanf ("%d",&n);
vector<int> p(n+1); vector<bool> done(n+1);
for (int i = 1; i <= n; i +=... | ALGO | 0.999947 | 3.288484 | {
"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": "ee0f81e6ffb9... |
c8f28a4f-db79-4af9-9915-92771a4fcf5e | frits-scholer/oef-stl | ex7-31.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <iterator>
#include <utility>
#include <algorithm>
using namespace std;
int char_average(int a, int b) {return (a+b)/2;}
bool char_diffmod2(int a, int b) {return (a-b)%2 == 0 && a != b;}
string average(const string& v, const string& ... | ALGO | 0.997756 | 3.652784 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2015-10-29T07:50: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": "74709138e... |
9b4de287-deff-48da-b6a1-7f55f0c9aa8a | shaohuawan/tmp1 | align.cpp | #include "main.h"
using cv::KeyPoint;
class CBlock
{
private:
public:
int m_criterionX;
int m_criterionY;
int m_corresX;
int m_corresY;
bool symmetry_match;
float m_dis;
float m_compareFactor;
bool operator<(const CBlock &m) const
{
return m_compareFactor < m.m_compareFacto... | ALGO | 0.99986 | 4.148138 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-11-21T13: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": "f60e43f2f8... |
48c48d0c-2a82-4917-afea-59c2249b9f5f | Shubham21122002/CCA | A_Star.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <climits>
#include <algorithm> // Added for reverse()
using namespace std;
#define INF INT_MAX
// Number of nodes
const int V = 6;
// Predefined heuristic values (Estimated cost to reach goal)
int heuristic[V] = {10, 8, 6, 5, 3, 0}; // h[start] to h[... | ALGO | 0.999994 | 5.614085 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2024-09-05T05:05: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": "0f619a724c0... |
16269fd7-ce41-4f90-b26b-3610ef60fe87 | Junn2k4/Du-n | c++/TX2.cpp | #include <bits/stdc++.h>
using namespace std;
class TAMGIAC
{
private:
float a,b,c;
public:
friend istream& operator >>(istream& in,TAMGIAC &x);
friend ostream& operator <<(ostream& out,TAMGIAC y);
friend TAMGIAC operator + (TAMGIAC x,TAMGIAC y);
friend TAMGIAC operator - (TAMGIAC x,TAMGIAC y);
friend boo... | ALGO | 0.98108 | 3.449058 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-04-17T13:53: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": "178c2352701a... |
f9654df0-a617-4897-8b88-bbd522402e08 | guyuehome/guyueclass | simulation&control/webots_ros_darwin_op3/Webots_ROS_Darwin_op3/src/robotis_math/include/robotis_math/minimum_jerk_trajectory.h | /*******************************************************************************
* Copyright 2018 ROBOTIS CO., LTD.
*
* 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.o... | ALGO | 0.996236 | 6.30677 | {
"github_metadata": {
"branch": "main",
"commit_count": 65,
"repo_created_at": "2021-01-19T15:23:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 677,
"forks": 449,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "1d396593... |
ddb1b29f-47d8-46cb-b185-dbefa5ababd9 | yuforest/contests | abc_304/f/main.cpp | // ここは競プロではサボりがちです
#include <bits/stdc++.h>
using namespace std;
// デバッグ用マクロです。詳しくは https://naskya.net/post/0002/
#ifdef LOCAL
#include <debug_print.hpp>
#define debug(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__)
#else
#define debug(...) (static_cast<void>(0))
#endif
// 節操ないですが、競プロでは便利です。
using ll = long ... | ALGO | 0.999928 | 4.365162 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2022-06-03T05:09:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "66ed0cca3... |
35df407f-6af5-484e-a6d0-c2c755e14605 | HaoYang0123/LeetCode | Increasing_Triplet_Subsequence.cpp | //Leetcode 334
//O(N)的时间复杂度,O(1)的空间复杂度
//方式1:比较复杂
class Solution {
public:
bool increasingTriplet(vector<int>& nums) {
stack<int> st; //记录当前的升序序列
int n=nums.size();
int second_v = INT_MAX; //记录之前清空的st中的第二个元素的值
//注意:关键在于second_v的使用,比如样例:[1,2,0,3]
//如果没有second_v,那么st之前维护(1,2),... | ALGO | 0.999984 | 5.75599 | {
"github_metadata": {
"branch": "master",
"commit_count": 943,
"repo_created_at": "2017-07-15T11:30:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "4563ee94... |
56256aed-690a-4365-90b0-f06c4a7f6998 | KenshiroHosaka/16ProbabilisticRobotics | src/problem2.cpp | /*
* problem2.cpp
* 作成者:K.hsk
* 第8回 問題2改
*/
#include <iostream>
#include <iomanip> //std::setw用
#include <fstream> //ファイル入出力用
#include <vector> //動的配列用
#include <algorithm> //std::max_element用
int main(){
using std::cout; // std::cout -> cout
using std::endl; // std::endl -> endl
... | ALGO | 0.999363 | 3.768885 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2017-02-02T19: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": "ee3957bd5... |
a0127bb5-e5e1-4364-a8b1-3a7f2aaf321b | vm105/3D_Object_Tracking | src/camFusion_Student.cpp |
#include <iostream>
#include <algorithm>
#include <numeric>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include "camFusion.hpp"
#include "dataStructures.h"
using namespace std;
// Create groups of Lidar points whose projection into the camera falls into the same bounding box
void... | ALGO | 0.984941 | 3.937497 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2020-02-04T00:39:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "33d46995b... |
1e4d762c-3261-4834-9139-60bc1d30d547 | SanishKumar/CPP-DSA | Leetcode/PalindromeLinkedList.cpp | // Given the head of a singly linked list, return true if it is a
// palindrome
// or false otherwise.
//
// Example 1:
// Input: head = [1,2,2,1]
// Output: true
// Example 2:
// Input: head = [1,2]
// Output: false
//
// Constraints:
// The number of nodes in the list is in the range [1, 105].
// 0 <=... | ALGO | 0.999803 | 6.478803 | {
"github_metadata": {
"branch": "main",
"commit_count": 100,
"repo_created_at": "2023-09-07T16:22: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": "301bc96411... |
d6a28a55-e708-4c4c-b9ad-fbe0d48e5a69 | aaniksahaa/CSE-208-Data-Structure-and-Algorithms-II-Sessional | DSA Offlines/Offline 1 - MST/prev/kruskal.cpp | #include<bits/stdc++.h>
using namespace std;
/*** Definitions ***/
#define int long long int
/*** Constants ***/
const int inf = LLONG_MAX - 100;
/*** Utility Function for Random ***/
// return random integer in the range [L,R] inclusive
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int ra... | ALGO | 0.999985 | 4.283399 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-11-01T20:42: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": "6ca6deaa0c3f... |
5c79f02a-ea11-4ff4-87a9-993a915d060c | humairshoukat/Bachelors-Computer-Science | Data-Structure-Algorithms/DS C++ Programs/Stack using an Array/main.cpp | #include<iostream>
#include<conio.h>
using namespace std;
#include"Stack.h"
int main()
{
Stack a;
int n;
do {
cout << "Please choose an option"<<endl;
cout << "1. Create\n";
cout << "2. Push\n";
cout << "3. Pop\n";
cout << "4. TOS\n";
cout << "5. IsEmpty\n";
cout << "6. IsFull\n";
cout << "7. Display... | ALGO | 0.929152 | 3.555395 | {
"github_metadata": {
"branch": "main",
"commit_count": 257,
"repo_created_at": "2023-02-03T03:13:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 72,
"forks": 20,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7aac7b15... |
a40f2f6d-251b-48b2-9827-19faeae93f20 | alu0100836950/gaussian_filter | src/prueba_mpi.cpp | #include <iostream>
#include <opencv2/opencv.hpp>
#include "mpi.h"
#include <math.h>
using namespace std;
using namespace cv;
void applyFilter(Mat *imagen, Mat *result){
Mat kernel;
kernel.create(5, 5,cv::DataType<double>::type);
double sigma= 5.0;
double sum=0.0;
int filterHeight = ker... | ALGO | 0.99899 | 4.565972 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2020-05-05T21:50: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": "8ecbfad84f... |
d1844398-ed18-48e0-a31f-5a8b0b668b48 | pizlonator/llvm-project-deluge | mlir/include/mlir/Dialect/Vector/Transforms/VectorDistribution.h | //===- VectorDistribution.h - Vector distribution patterns --*- C++------*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | TOOL | 0.926148 | 7.262774 | {
"github_metadata": {
"branch": "deluge",
"commit_count": 470529,
"repo_created_at": "2024-02-16T00:39:34.000Z",
"is_fork": true,
"is_org_owned": false,
"forked_from": "llvm/llvm-project",
"stars": 899,
"forks": 33,
"issues": 18,
"pull_requests": 2
},
"file_meta": {
"c... |
6e98996e-3531-43fc-81e8-5484ca4baab7 | Murad501/Phitron | Contests/AtCoder/ABC 404/A_Not_Found.cpp | // 03/05/2025 18:00
#include <bits/stdc++.h>
using namespace std;
#define nl '\n'
#define int long long
#define all(x) x.begin(), x.end()
#define ll long long int
#define yes cout << "YES" << '\n'
#define no cout << "NO" << '\n'
#define cyes cout << "Yes" << '\n'
#define cno cout << "No" << '\n'
#define minus cout << -... | ALGO | 0.999902 | 3.54917 | {
"github_metadata": {
"branch": "main",
"commit_count": 99,
"repo_created_at": "2024-05-19T14: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": "69738d7cfd0... |
0e0934cc-4449-433c-912a-85877bc67681 | cchester25/CalibOnline | calib_online/src/calib_online_node.cpp | #include "calib_online/calib_online_node.hpp"
class edge_calib {
public:
edge_calib(PairData p) { pd = p; }
template <typename T>
bool operator()(const T *_q, const T *_t, T *residuals) const {
bool is_distor = Distor;
if(is_distor)
{
Eigen::Matrix<T, 3, 3> innerT = inne... | DATA | 0.991371 | 3.362324 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-04-16T13:14:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ae13c07031b... |
7f2a7abf-9379-4981-8d46-a2f369c04bd2 | TMalicki/CodeWars-Kata-s | 7_Kyu_ConvertTheScore.cpp | #include <vector>
#include <string>
std::vector<int> scoreboard(const std::string &s) {
using std::vector;
std::vector<int> ans;
using std::string;
std::cout << s << std::endl;
size_t pos = 0;
vector<string> temp;
while (ans.size() != 2) {
if (s.find("one", pos) != string::npos) {
ans.push_back(1); te... | ALGO | 0.99901 | 4.309517 | {
"github_metadata": {
"branch": "master",
"commit_count": 45,
"repo_created_at": "2020-01-23T06:39: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": "ad8d9aa8b... |
5e58987f-d8d1-4ac6-b745-b41507acf3a9 | ishandutta2007/codeforces-p | peti1234/normal/1425/D.cpp | #include <bits/stdc++.h>
using namespace std;
const int c=2002, mod=1e9+7;
long long sum, fakt[c], inv[c];
int n, m, k, x[c], y[c], d[c], db[c], kom[c][c];
long long oszt(long long a) {
long long ans=1, p=mod-2;
while(p) {
if (p%2) ans*=a, ans%=mod;
p/=2, a*=a, a%=mod;
}
return ans;
}
l... | ALGO | 0.99993 | 4.642418 | {
"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": "43798dd32105... |
0d0305af-8962-4347-8aba-7a25b8926d33 | djadjaa/AISP22 | DODATNO IZVAN VEZBI/duplikati/najduzaduz2.cpp | /*
7
0 0 0 0 0 1
0 0 0 0 1 0
0 0 0 1 0 0
0 0 0 1 0 1
0 0 0 1 1 0
0 0 0 0 1 1
0 0 0 1 1 1
*/
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int64_t n;
cin>> n;
vector<vector<int64_t>> duz(n,vector<int64_t> (6));
for(int i = 0; i < n; i++){
for(int... | ALGO | 0.999722 | 3.648988 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2024-09-03T10:54: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": "650d5f305dfc... |
69111cd0-8aa0-4c6a-9b0c-ba76aa9d346c | Pruthvi-Parade/DSA-Practice | Linked List/Leetcode_2.cpp | #include <bits/stdc++.h>
using namespace std;
class Node
{
private:
/* data */
public:
int data;
Node *next;
Node(int data)
{
this->data = data;
this->next = NULL;
};
~Node();
};
void insert(Node *&Head, Node *&Tail, int data)
{
if (Head == NULL)
{
Node *Ne... | ALGO | 0.999925 | 4.994931 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2022-11-10T15:18: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": "ebe377884f3... |
c7f3129a-197a-420d-ac97-f051e3f2e3ea | hoanhdung3/hackerrank | cpp/migratory-birds.cpp | #include <bits/stdc++.h>
using namespace std;
string ltrim(const string &);
string rtrim(const string &);
vector<string> split(const string &);
/*
* Complete the 'migratoryBirds' function below.
*
* The function is expected to return an INTEGER.
* The function accepts INTEGER_ARRAY arr as parameter.
*/
int mig... | ALGO | 0.999969 | 4.951302 | {
"github_metadata": {
"branch": "main",
"commit_count": 191,
"repo_created_at": "2022-01-19T17:24: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": "08e19cd320... |
a64e3af3-db65-4bfd-a9cf-391160a56fc9 | andreitdr/probleme_pbinfo | pbinfo/530/main.cpp | #include <iostream>
using namespace std;
bool cautare_binara(int *a, int n, int x)
{
int li, lf, m;
li = 0;
lf = n - 1;
m = lf / 2;
while (li <= lf)
{
if (x < a[m])
lf = m - 1;
else if (x > a[m])
li = m + 1;
else
return true;
m... | ALGO | 0.999991 | 3.969813 | {
"github_metadata": {
"branch": "master",
"commit_count": 136,
"repo_created_at": "2021-10-08T09:45: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": "7a58d2e5... |
fc26ebad-a9cb-4a0c-848b-a4fc20215ffc | federicoemartinez/algo3-2008 | tp1/CD/ejercicio3/src/moda.cpp | #include <iostream>
#include <string>
#include <fstream>
#include <assert.h>
using namespace std;
int moda(int* a, int n) {
int indiceDeAtras = 0;
int indiceDeAdelante = 0;
//en tachados guardaremos que elementos descartamos porq encontramos uno distinto
bool* tachados = new bool[n];
for (int i ... | ALGO | 0.998864 | 3.884257 | {
"github_metadata": {
"branch": "master",
"commit_count": 468,
"repo_created_at": "2015-03-13T01:51:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "23e436f9... |
bc486932-b31e-4d57-9f97-c0c67010bae7 | ImTurtle35/Baekjoon | The_Six_Degrees_of_Kevin_Bacon.cpp | // Baekjoon 1389
// Floyd-Warshall Algorithm
#include <iostream>
#include <array>
#include <algorithm>
using namespace std;
const int INF = 5001;
int N, M, a, b, min_num, answer;
array<array<int, 101>, 101>dp;
int main() {
min_num = INF;
cin >> N >> M;
for (int i{ 1 }; i <= N; i++) {
for (int j{ 1 }; j <= N; j+... | ALGO | 0.999902 | 3.916781 | {
"github_metadata": {
"branch": "master",
"commit_count": 106,
"repo_created_at": "2019-09-16T10:28:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9cd4d38c... |
68e460ac-d71a-40cf-b655-304bf2adc930 | Xarma123/cp-practice | D_2_Set_To_Max_Hard_Version.cpp | #include <bits/stdc++.h>
using namespace std;
#define lol long long
lol spb[200005][30];
lol spa[200005][30];
lol ln[200005];
lol mn(lol i, lol j)
{
return min(spb[i][ln[j - i + 1]],
spb[j - (1ll << ln[j - i + 1]) + 1][ln[j - i + 1]]);
}
lol mx(lol i, lol j)
{
return max(spa[i][ln[j - i + 1]],
... | ALGO | 0.999993 | 4.283827 | {
"github_metadata": {
"branch": "master",
"commit_count": 176,
"repo_created_at": "2022-09-18T23:21: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": "fdb57827... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.