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 |
|---|---|---|---|---|---|---|---|
2b4eae73-e53c-4ecc-a769-9ec5354e9082 | TimoRoth/BeeGFS | ctl/source/app/config/Config.h | #ifndef CONFIG_H_
#define CONFIG_H_
#include <common/app/config/AbstractConfig.h>
#include <modes/Mode.h>
#include <memory>
#define CONFIG_DEFAULT_CFGFILENAME "/etc/beegfs/beegfs-client.conf"
#define RUNMODE_HELP_KEY_STRING "--help" /* key for usage help */
struct RunModesElem
{
const char* modeString;
... | CONFIG | 0.901064 | 6.389055 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2021-03-16T12:55:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0bbd92370... |
d6aa718e-e05e-4bc6-b62a-a941e01f065b | shaozonglin1993/DataStru_Algo | tree/RBTree.cpp |
#include "RBTree.h"
template<class K, class V>
bool RBTree<K, V>::Insert(const K& key, const V& v)
{
if (_root == NULL)
{
_root = new Node(key, v, BLACK);
return true;
}
Node* parent = NULL;
Node* cur = _root;
while (cur)
{
if (key < cur->_key)
{
... | ALGO | 0.987911 | 4.017912 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2024-03-15T09:33:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5d3643a55e9... |
ee16869c-e4aa-4a29-9dee-231e3612db38 | ecto0310/procon_submission | atcoder/abc280/abc280_d/37001034.cpp | // Date: Sat, 03 Dec 2022 14:50:35 +0000
// Language: C++ (GCC 9.2.1)
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define endl '\n'
int main() {
i64 K;
cin >> K;
i64 ans = 1;
for (i64 i = 2; i * i <= K; i++) {
i64 cnt = 0;
while (K % i == 0) {
K /= i;
cnt++;
}
... | ALGO | 0.999973 | 5.198073 | {
"github_metadata": {
"branch": "main",
"commit_count": 2101,
"repo_created_at": "2022-12-07T13:10: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": "1297d9832... |
499d1919-77a3-44d0-bbf6-4c88bded7428 | im-cy/ACM-code | 周赛/180819/F.cpp | #include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#define inf 2147483641
using namespace std;
const int sz = 200010;
char temp[sz];
char s1[sz];
char s2[sz];
int n;
void trans(int x)
{
if(temp[x] == '1')
temp[x] = '0';
else if(temp[x] == '0')
temp[x] = '1';
return ;
}
int sol1()
{
for(in... | ALGO | 0.999975 | 3.291484 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-07-20T14:46: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": "6bb3babaa2... |
f0fe42bd-8d1b-49cd-b487-d4d0a3420e68 | rathee-19/DSA-and-CP | leetcode/8_June/mergeSortedArray.c++ | #include <iostream>
#include <vector>
#include <sstream>
#include <algorithm>
using namespace std;
void merge(vector<int> &nums1, int m, vector<int> &nums2, int n)
{
int a = 0;
int b = 0;
if (m == 0)
{
nums1 = nums2;
return;
}
if (n == 0)
{
return;
}
for (in... | ALGO | 0.999995 | 4.920228 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2024-06-18T16:01: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": "55defe198aa... |
08d9e00a-24f2-4c0e-b368-b75c0a3b5f04 | romilpunetha/Online-Judges | CodeForces/348/C.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void mover(vector<vector<pair<int, int> > >& arr, int r, int col) {
pair<int, int> temp = arr[r][0];
for (int i = 0; i < col - 1; i++) {
arr[r][i] = arr[r][i + 1];
}
arr[r][col - 1] = temp;
}
void movec(vector<vector<pair<int,... | ALGO | 0.999954 | 5.055061 | {
"github_metadata": {
"branch": "master",
"commit_count": 63,
"repo_created_at": "2016-09-10T10:28:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3bb846175... |
f7d81dda-bd07-47de-aa82-4bfef25858b6 | hroest/OpenMS | src/openms/source/MATH/STATISTICS/QuadraticRegression.cpp | // --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universit... | ALGO | 0.998379 | 6.66437 | {
"github_metadata": {
"branch": "develop",
"commit_count": 28908,
"repo_created_at": "2014-01-10T11:54:21.000Z",
"is_fork": true,
"is_org_owned": false,
"forked_from": "OpenMS/OpenMS",
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_i... |
a0a391d3-7d57-4a64-af22-1c6b623f7087 | NVIDIA/cuda-samples | Samples/2_Concepts_and_Techniques/sortingNetworks/main.cpp | /* Copyright (c) 2022, 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:
* * Redistributions of source code must retain the above copyright
* notice, this list of condi... | ALGO | 0.999913 | 6.388816 | {
"github_metadata": {
"branch": "master",
"commit_count": 376,
"repo_created_at": "2018-03-27T17:36:24.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 7763,
"forks": 2076,
"issues": 55,
"pull_requests": 29
},
"file_meta": {
"content_id": "e... |
0a409023-c4cd-4b13-a313-c91a56747350 | ishandutta2007/codeforces-h | heart_blue/normal/112/B.cpp | #include <cstdlib>
#include <cctype>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <iostream>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <fstream>
#include <numeric>
#include <iomanip>
#include <bi... | ALGO | 0.999656 | 3.059044 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T02:01: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": "cf6f98863ee6... |
af878804-8a06-4e07-b1d3-ef143ada0722 | luis201420/competitiveProgramming | uva/graph/13169.cpp | #include <bits/stdc++.h>
using namespace std;
vector<set<int>> graph3d,graph2d;
vector<bool> visited;
bool dfs(int ini,bool d,int l){
//cerr << ini << endl;
if(visited[ini]){
//cerr << ini << "()" << l << endl;
if(l!=-1 && l!=ini)return true;
else return false;
}
visited[ini]=1;
set<int> aux;
if(d)aux =... | ALGO | 0.999062 | 3.56367 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2019-11-28T02:28: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": "12582642d... |
72d73003-ebbf-4ff5-a973-c69e6ed74e7a | sajedehsajadi/tamrin9 | Source2.cpp | #include <iostream>
#include <conio.h>
using namespace std;
class Time
{
public:
int hour, minute, second;
Time(int h, int m, int s)
{
hour = h;
minute = m;
second = s;
}
void show();
void sum(Time s);
void tafrigh(Time s);
void s_t();
void t_s();
};
void Tim... | ALGO | 0.99769 | 3.450646 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-01-05T09:01: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": "3d4bfc11a583... |
dbf4aa5d-5ed1-4c98-9039-43655d56440d | aamirglb/TechNotes | src/cpp/leet/283.move-zeros.e.cpp | // Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements.
// Note that you must do this in-place without making a copy of the array.
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
void moveZeroes(vector<int>& nums) {
... | ALGO | 0.999924 | 6.663975 | {
"github_metadata": {
"branch": "main",
"commit_count": 745,
"repo_created_at": "2021-02-07T15:26:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 4,
"issues": 0,
"pull_requests": 20
},
"file_meta": {
"content_id": "324855ad3... |
6540c7cd-fa06-47ce-8f9e-bbdaef3fb3d9 | macroquest/macroquest2 | ISXDK/35/include/ISUI/LGUIListBox.h | #pragma once
enum eListBoxSort
{
LBSORT_NONE=0,
LBSORT_USER=1,
LBSORT_TEXT=2,
LBSORT_VALUE=3,
LBSORT_CUSTOM=4,
LBSORT_TEXTREVERSE=5,
LBSORT_VALUEREVERSE=6,
};
class ListBoxItem
{
public:
ListBoxItem(class LGUIListBox *p_pListBox, const char *p_Text, unsigned int p_Color, const char *p_Value, unsigned int p_I... | TOOL | 0.909426 | 5.6028 | {
"github_metadata": {
"branch": "master",
"commit_count": 1944,
"repo_created_at": "2016-11-16T03:22:54.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 18,
"forks": 12,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bf57a2... |
f3fe4812-433d-491f-9d14-22d7a6fa230a | rishabg30/Data-Structures-and-Algorithms | trees_problems/binary_trees_problems/preOrder_inOrder_postOrder_traversal_in_one_go.cpp | #include <bits/stdc++.h>
using namespace std;
void printArray_2D(vector<vector<int>> &arr)
{
for (auto it : arr)
{
for (auto it2 : it)
{
cout << it2 << " ";
}
cout << endl;
}
}
class TreeNode
{
public:
int val;
TreeNode *left;
TreeNode *right;
Tree... | ALGO | 0.999978 | 5.929911 | {
"github_metadata": {
"branch": "main",
"commit_count": 75,
"repo_created_at": "2024-08-31T07:35:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "528e809cd6f... |
f3d8048f-c9bd-421e-8dae-5a3182d373a2 | Mis-prog/trs_labs | lab_2/task_4.cpp | #include <iostream>
#include <vector>
#include <string>
#include <chrono>
#include <fstream>
#include <math.h>
#include <iomanip>
using namespace std;
vector<double> TripleDiag(vector<double> A, vector<double> B, vector<double> C, vector<double> D) {
vector<double> P(A.size());
vector<double> Q(A.size());
... | ALGO | 0.999304 | 4.303081 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2024-05-13T20:16: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": "63f267c52... |
2bd75263-ef76-4052-aaa7-74fe7f1c95d7 | JJho1314/fusion_detect | include/box_fitting.h |
#ifndef MY_PCL_TUTORIAL_BOX_FITTING_H
#define MY_PCL_TUTORIAL_BOX_FITTING_H
#include <array>
#include <pcl/io/pcd_io.h>
#include <vector>
#include "render/box.h"
// #include "component_clustering.h"
using namespace std;
using namespace pcl;
class Box_fitting
{
public:
// 将最小面积矩形(MAR)[128]应用于每个聚类对象,从而生... | ALGO | 0.9928 | 3.960458 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-07-31T08:00:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4b6cc2d5d7d5... |
46290f87-0a24-4dc7-8434-f4139e2c93a4 | WavenZ/Autumn-recruit | 总结/test.cpp | #include <bits/stdc++.h>
#include "test.h"
using namespace std;
int bb01(vector<int>& weight, vector<int>& val, int W){
int N = weight.size();
vector<vector<int>> dp(N + 1, vector<int>(W + 1));
for(int i = 1; i <= N; ++i){
for(int w = 1; w <= W; ++w){
if(w < weight[i - 1]) dp[i][w] = dp[... | ALGO | 0.999951 | 4.249066 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-06-21T12:19: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": "8eb795d604... |
bb18cfd8-5f55-430a-a8c1-29b9f118f1cb | hamgravy/volk | kernels/volk/volk_32f_expfast_32f.h | /* -*- c++ -*- */
/*
* Copyright 2014 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option... | ALGO | 0.983827 | 6.373977 | {
"github_metadata": {
"branch": "master",
"commit_count": 560,
"repo_created_at": "2014-12-12T20:05:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "95686f5e... |
6a3d16dc-87a8-4dde-af6b-c66c20ad596d | bank2014/OpenCV_project | OpenCV/main.cpp | #pragma comment(lib,"opencv_world455.lib")
#include "opencv2/opencv.hpp"
#include <iostream>
using namespace std;
using namespace cv;
// 인자로 받은 DFT 영상을 셔플링한다
void shuffleDFT(Mat& img)
{
int cX = img.cols / 2;
int cY = img.rows / 2;
Mat q1(img, Rect(0, 0, cX, cY));
Mat q2(img, Rect(cX, 0, cX, cY));
Mat q3(img, R... | ALGO | 0.977645 | 5.24581 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-05-17T16:27: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": "f012344a5df7... |
2387bcb1-51da-4458-9e4a-603dd3c8d4b8 | Sourav9063/Cpp-All-codes | programmes codeforces/MaximulContinuesRest.cpp | // Name:
#include<bits/stdc++.h>
using namespace std;
#define ll long long int //lld
#define ull unsigned long long int //llu
#define pt cout<<"*"<<"\n";
#define nl cout<<"\n";
#define deb(x) cout << #x << "=" << x << "\n";
#define pb(a) emplace_back(a)
#define all(x) (x).begin(),(x).end()... | ALGO | 0.999935 | 3.724922 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2020-02-28T05:22:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ad95eddde... |
a96a7090-89bf-4404-a2f7-9c6c50edefe2 | alek4k/p1-2016-17 | quarto appello_20_9_17.cpp | #include<iostream>
using namespace std;
struct nodo{int num, info; nodo* next; nodo(int a=0,int b=0, nodo* c=0){num=a; info=b; next=c;}}; // nodo di lista
struct FIFO{nodo* primo, *ultimo; FIFO(nodo*a=0, nodo*b=0){primo=a; ultimo=b;}};
struct nodoF{FIFO info; nodoF*next; nodoF(FIFO a=FIFO(),nodoF*b=0){info=a; next=b;}... | ALGO | 0.999918 | 3.376959 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2017-05-06T08:16:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6d14d4e99... |
33cc6a17-9102-4295-9f07-192e8c40b663 | aakashc31/Competitive-Programming | Lib/17.disjointset.cpp | #include <bits/stdc++.h>
using namespace std;
#define f(i,n) for(int i=0; i<n; i++)
#define pb push_back
#define mp make_pair
#define fab(i,a,b) for(int i=a; i<=b; i++)
#define test(t) while(t--)
#define getcx getchar//_unlocked
#define get(n) scanf("%d",&n)
#define getL(n) scanf("%lld", &n)
ty... | ALGO | 0.999227 | 4.372853 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2016-05-22T13:25: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": "4c84cc1e8d... |
d474b3e2-e772-4825-983b-e9c6a881c3c3 | asmwasim/online-judge-solution | Uva-Online-Judge/459 - Graph Connectivity.cpp |
#include <bits/stdc++.h>
using namespace std;
#define SF scanf
#define SFI(x) scanf("%d",&x)
#define PFI(x) printf("%d\n",x)
#define TEST() cout<<"Wroking"<<endl
#define PF printf
#define LL long long
#define ULL unsigned long long
#define LD long double
#define FV first
#define SV second
#define PB push_back
#define ... | ALGO | 0.999592 | 3.778496 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2022-02-01T18:43: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": "b2414f198f... |
114e963d-33ee-4b8a-a650-615e9c4bbbd4 | mahtabnik-polito/gragh-coloring | luby/luby.cpp | //
// Created by <NAME> - <EMAIL>
//
#include <iostream>
#include <thread>
#include <fstream>
#include <chrono>
#include <sstream>
#include <vector>
#include <mutex>
using namespace std;
int NTHREAD = 0;
int V, E;
class Graph
{
int V;
int vs;
vector<int> *graph;
public:
Graph();
Graph( int V )... | ALGO | 0.998851 | 4.521448 | {
"github_metadata": {
"branch": "main",
"commit_count": 73,
"repo_created_at": "2021-08-18T14:35:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b745ccd81ca... |
ae9af942-f7d0-4bdd-a6f9-dba229871bdb | HongSon28/Training | Contest training/VOI25 Training/STEEL.cpp | #include<bits/stdc++.h>
using namespace std;
const int N=5e5;
int n,m;
pair<long long,long long>a[N+5],b[N+5];
vector<pair<long long,long long>>va,vb;
long long res;
void solve(int l,int r,int optl,int optr) {
if (l>r) return;
int mid=(l+r)/2;
int opt=-1;
long long mx=0;
for (int i=optl;i<=optr;i++) {
if (vb[i].... | ALGO | 0.999956 | 4.337121 | {
"github_metadata": {
"branch": "main",
"commit_count": 37,
"repo_created_at": "2023-05-24T08:29: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": "fd25ba08356... |
a199aa20-cc39-4521-b2f1-a806cc1af403 | abhiXsliet/DSA-SHEETS | SDE Sheet Striver/Arrays-IV/004-largest-subarray-with-0-sum.cpp | // https://www.geeksforgeeks.org/problems/largest-subarray-with-0-sum/1
//{ Driver Code Starts
// Initial Template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
/*You are required to complete this function*/
class Solution {
private:
// TC = O(N^3)
// SC = O(1)
int br... | ALGO | 0.999882 | 5.695957 | {
"github_metadata": {
"branch": "main",
"commit_count": 198,
"repo_created_at": "2023-11-04T17:18:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6a30ef243e... |
d3e9bdb8-bccc-4fe0-91d3-40d1342e0dae | Dzon14/1TD317 | Inlupp 3/Funktioner.cpp | //---------------------------------------------
// Filnamn: Funktioner.cpp
// Syfte: Skriva ett program som gör några enkla beräkningar utifrån användarens inmatningar.
// Indata: tal och operation
// Utdata: resultat
//
// Programmerare: <NAME>
// Datum: 29/06/22
//---------------------------------------------
#inclu... | TOOL | 0.982525 | 4.014823 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2022-06-29T19:25: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": "09bb60cbc... |
eba33407-371f-4c43-bf65-b0eec03d8c8d | PiotrWi/AdventOfCode2022 | year2022/day11/Solution.cpp | #include "Solution.hpp"
#include <algorithm>
#include <parsers/parsers.hpp>
#include <StringAlgorithms/StringAlgorithms.hpp>
namespace day11
{
namespace
{
std::function<unsigned long long(unsigned long long)> parseOldOrVal(const std::string& in)
{
if (in == "old")
{
return [](auto in){ return in; };... | ALGO | 0.99705 | 5.781157 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2022-12-14T12:07:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "78fdd61a2... |
de97f9e1-6b8c-47f9-9f7f-a0a2635ff0fd | olofn/db_public | db-10_verkstan/vorlon2/oscillator.h | #pragma once
#include <math.h>
class Oscillator
{
public:
Oscillator() :
phase(0.0f)
{}
float get(float pps, float phaseOffset, float pulseFade)
{
float kernelSize = pps * 2.2f;
float value = getBoxFilteredSaw(phase, kernelSize) - getBoxFilteredSaw(fmod(phase + phaseOffset, 1.0f), kernelSize) * pulseFade;... | ALGO | 0.947946 | 5.504099 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2015-08-16T06:43:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d5855d99ef... |
a19df8fb-702e-4649-bf41-abd86bef1bc2 | ypca/data-structures-cpp | src/Nodes/Suma de datos de listas.cpp | #include<iostream>
#include<conio.h>
#include<stdlib.h>
#include<windows.h>
struct nodo{
int dato;
nodo* sig;
nodo* ant;
};
void sumar(nodo* uno, nodo*dos);
void imprimir(nodo* n);
nodo* crear(int x);
nodo* insertar_ini(int d, nodo* n);
nodo* insertar_fin(int d, nodo* n);
using ... | ALGO | 0.997879 | 4.541316 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-01-31T22:31:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f2f050945... |
3940b20a-3c9c-4ce7-9425-9d7308782493 | laviniameds/CP | studying/string/UVa-10815/10815.cpp | #include <iostream>
#include <istream>
#include <set>
#include <algorithm>
#include <vector>
using namespace std;
vector<string> remove_special_char(string s){
vector<string> v;
string x;
for(int i=0;i<s.length();i++){
if((s[i] >= 65 && s[i] <= 90) || (s[i] >= 97 && s[i] <= 122))
x.pu... | TOOL | 0.996762 | 3.789191 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2019-03-11T20:30: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": "0e8ced154... |
1a25ff4c-d46c-4f28-9404-e7f82406ee21 | devosoft/avida | avida-core/source/tools/cRunningAverage.cc | /*
* cRunningAverage.cc
* Avida
*
* Called "running_average.cc" prior to 12/7/05.
* Copyright 1999-2011 Michigan State University. All rights reserved.
* Copyright 1993-2003 California Institute of Technology.
*
*
* This file is part of Avida.
*
* Avida is free software; you can redistribute it and/or... | TOOL | 0.944578 | 5.593894 | {
"github_metadata": {
"branch": "master",
"commit_count": 4555,
"repo_created_at": "2010-11-05T14:27:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 625,
"forks": 116,
"issues": 26,
"pull_requests": 3
},
"file_meta": {
"content_id": "ee8... |
6c20165e-b0da-4985-a22e-6e8ea574560d | ankurg0806/LeetCode | Matrix/Max_Area_Of_Island.cpp | /* 695. Max Area of Island
Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by water.
Find the maximum area of an island in the given 2D array. (If there is no isl... | ALGO | 0.999661 | 6.34472 | {
"github_metadata": {
"branch": "master",
"commit_count": 50,
"repo_created_at": "2020-08-23T15:21:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f37d196b5... |
33e7efd2-8230-4b33-a248-5420c6539bd4 | NilanjanaLodh/OnlineJudge | GCJ/old/A17/countryleader.cpp | //<NAME>
#include <bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef vector<int> vi;
typedef vector<lli> vli;
const lli inf= 9000000000000;
const lli mod= 1000000007;
lli minimum(lli a, lli b)
{
if(a<b)return a;
return b;
}
lli maximum(lli a, lli b)
{
if(a>b)return a;
return b;
}... | ALGO | 0.999964 | 3.53753 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2016-07-08T10:05: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": "1ae11e4b2... |
9fd3c9fe-940d-432a-b6d9-4667558da1ad | c4mpos-dev/college-exercises | P2/C03 - C/Exercícios Moodle/Hashing/GuardandoNomes.cpp | #include <iostream>
#include <cstring>
using namespace std;
struct dado {
char info[50]; // informação (string)
int k; // chave calculada a partir da soma dos valores ASCII
int status; // 0: vazio, 1: ocupado, 2: removido
};
// Função h1 (primeira função hash)
int h1(int k, int m) {
retu... | ALGO | 0.999071 | 5.332655 | {
"github_metadata": {
"branch": "main",
"commit_count": 151,
"repo_created_at": "2024-04-21T18:13:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "34d16fd746... |
ead102a8-19e2-40ef-8b1f-9840304fc9b0 | yogsgehlot/Linked-list-c-- | delete node linkedlist.cpp | #include<iostream>
using namespace std;
class node
{
public:
int data;
node* next;
};
void append(int data,node *&head)
{
node* newnode=new node();
newnode->data=data;
newnode->next=NULL;
node*ptr = head;
if(ptr==NULL)
{
head=newnode;
}
else{
while(ptr->next!=NU... | ALGO | 0.998515 | 3.912391 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-03-30T18:52: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": "1ed3b10a0d... |
dca61a2b-8439-4a27-84b0-e9737ea2d028 | FDiot/code_tympan3 | Tympan/geometric_methods/AcousticRaytracer/Geometry/UniformPlaneSampler.h | /*
* Copyright (C) <2012> <EDF-R&D> <FRANCE>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is dis... | ALGO | 0.968238 | 4.663311 | {
"github_metadata": {
"branch": "master",
"commit_count": 2346,
"repo_created_at": "2020-02-11T16:39:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 37,
"pull_requests": 0
},
"file_meta": {
"content_id": "ce7803... |
fc1f1dd7-80da-4b3f-adc7-d6e34067a8f7 | OpenXRay/xray | SDK/boost_1_30_0/libs/graph/example/strong-components.cpp | //=======================================================================
// Copyright 2001 <NAME>, <NAME>, <NAME>,
//
// This file is part of the Boost Graph Library
//
// You should have received a copy of the License Agreement for the
// Boost Graph Library along with the software; see the file LICENSE.
// If not, ... | ALGO | 0.99884 | 6.020607 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2019-03-21T12:57:05.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 104,
"forks": 25,
"issues": 0,
"pull_requests": 3
},
"file_meta": {
"content_id": "e081da86... |
8294f0d9-0c8d-44fa-a8e8-69678782e5a7 | noth1ngood/Snake_project | Sourse.cpp | #include <SFML/Graphics.hpp>
#include <stdlib.h>
#include <comdef.h>
#include "string"
#include "Source.h"
/**
* функция генерации рандомного числа(была позаимствована)
* @param snake
* @return
*/
int randomcell(snake &snake) {
int cell_count = 0;
//пересчитываем свободные клетки, в которых ничего нет, то ... | TOOL | 0.969522 | 4.241053 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-06-19T13:29: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": "e6ea25ee10d0... |
a2828774-7c22-4609-8558-c2fb42955f1d | kantuni/Codeforces | 894B/ralph-and-his-magic-field.cpp | // WA
#include <bits/stdc++.h>
#define P 1000000007
using namespace std;
long long f(long long n) {
long long ans = 1;
for (long long i = 2; i <= n; i++) {
ans = (ans * i) % P;
}
return ans;
}
int main() {
long long n, m, k, ans = 0;
cin >> n >> m >> k;
if (n == 1 or m == 1) {
if (k == 1) {
... | ALGO | 0.999996 | 4.219864 | {
"github_metadata": {
"branch": "master",
"commit_count": 1466,
"repo_created_at": "2017-02-05T18:52:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 211,
"forks": 58,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4c05... |
65aa8cef-d1d6-4af5-bc14-6cfe9bd19006 | hpfem/hermes-AgrosInterface | hermes2d/include/picard_solver.h | // This file is part of Hermes2D
//
// Copyright (c) 2009 hp-FEM group at the University of Nevada, Reno (UNR).
// Email: <EMAIL>, home page: http://hpfem.org/.
//
// Hermes2D 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 Soft... | ALGO | 0.998767 | 6.271721 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2013-02-04T16:59:03.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "adf8f320351... |
150c39f7-43f2-4a69-8226-d16820a87213 | wongsingfo/cf-master | solved/1988E.cpp | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
#ifdef DBG
#define dbg(...) fprintf(stderr, __VA_ARGS__)
#else
#define dbg(...)
#endif
const int MAXN = 500005; // Adjust size based on problem constraints
vector<int> a;
void solve(int n)
{
// Implement the solution for one test case based on ... | ALGO | 0.999949 | 4.000841 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2022-02-06T14:25: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": "67bb48edb... |
78573614-93db-446e-9c73-7bc784c8cf98 | Zhima-Mochi/algorithm-problem-solving | cpp/2542.maximum-subsequence-score.cpp | /*
* @lc app=leetcode id=2542 lang=cpp
*
* [2542] Maximum Subsequence Score
*/
#include <vector>
#include <queue>
using namespace std;
// @lc code=start
// t:O(nlogn), s:O(n)
class Solution
{
public:
long long maxScore(vector<int> &nums1, vector<int> &nums2, int k)
{
vector<pair<int, int>> v;
... | ALGO | 0.999971 | 6.590105 | {
"github_metadata": {
"branch": "main",
"commit_count": 128,
"repo_created_at": "2022-03-09T05:47:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6d5f930c68... |
c233d789-f8fc-4df8-af47-da6b273a735f | raincross7/code-similarity | codes/train_code/problem179/problem179_422.cpp | ///#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math")
///#pragma GCC target("sse,sse2,sse3,ssse3,sse4,abm,mmx,popcnt,avx,avx2,tune=native")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
/*
zet:
find_by_order(... | ALGO | 0.99995 | 4.584888 | {
"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": "684515a8d1a3... |
c48f0620-b5d5-4b30-a733-a5cd303ffaca | izhang05/Competitive-Programming | cf/group/8FPkqdVYTt/334062/b/b.cpp | /* Author: izhang05
* Time: 07-10-2021 14:30:03
**/
#include <bits/stdc++.h>
using namespace std;
//#define DEBUG
void setIO(const string &name) {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cin.exceptions(istream::failbit);
#ifndef TEST
freopen((name + ".in").c_str(), "r", stdin);
freope... | ALGO | 0.999992 | 4.492798 | {
"github_metadata": {
"branch": "master",
"commit_count": 691,
"repo_created_at": "2021-01-21T17:58:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eafdaece... |
a0c8608c-f28a-4b78-9128-e5e4594a8b7f | faisal-rizwan36/GeeksforGeeks | Binary Search Tree/lowest_common_ancestor_bst.cpp | #include <bits/stdc++.h>
using namespace std;
struct node
{
int data;
struct node *left = NULL, *right = NULL;
};
struct node *root = NULL;
struct node *createBST(int val)
{
struct node *newnode = new node;
newnode -> data = val;
newnode -> left = NULL;
newnode -> right = NULL;
if(root == NULL)
root = newn... | ALGO | 0.999995 | 4.466526 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2018-07-11T20:05: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": "6fb9ffdd23... |
47743875-4816-4496-808f-bf5418b58fec | KatyT12/simplex-algorithm | Simplex.h | #include <iostream>
#include <vector>
#include <algorithm>
struct Coord
{
int x;
int y;
};
class Row{
public:
std::vector<float> components;
Row(std::vector<float> c)
{
components = c;
}
};
class Table{
public:
int* bv;
int componentNum = ... | ALGO | 0.994806 | 4.148787 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2021-02-16T15:32: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": "cb9025000... |
59ca3b1d-9c3d-408a-aadb-d8f2eb826216 | ankan-ekansh/Competitive-Programming | Codeforces practice/1332Cv2.cpp | #include<bits/stdc++.h>
#define ll long long
using namespace std;
ll modularExponentiation(ll x,ll n,ll M){
if(n==0)
return 1;
else if(n%2 == 0)
return modularExponentiation((x*x)%M,n/2,M);
return (x*modularExponentiation((x*x)%M,(n-1)/2,M))%M;
}
ll binaryExponentiation(ll x,ll n){
if(n=... | ALGO | 0.999959 | 4.089351 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2019-07-03T18:45:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb4026cb75... |
c53a06fe-1703-4300-9017-20cd25a723c4 | harshdeep91/Leetcode | 1026-maximum-difference-between-node-and-ancestor/1026-maximum-difference-between-node-and-ancestor.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999861 | 5.561233 | {
"github_metadata": {
"branch": "main",
"commit_count": 3363,
"repo_created_at": "2022-01-06T15:33: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": "f873545f0... |
457a6721-bd03-4100-ab86-860f9e0c50ce | rsummers11/CADLab | LymphNodeRFCNNPipeline/nifty_reg-1.3.9/nifty_reg/reg-apps/reg_average.cpp | /*
* reg_average.cpp
*
*
* Created by <NAME> on 29/10/2011.
* Copyright (c) 2009, University College London. All rights reserved.
* Centre for Medical Image Computing (CMIC)
* See the LICENSE.txt file in the nifty_reg root folder
*
*/
#ifndef MM_AVERAGE_CPP
#define MM_AVERAGE_CPP
#include "_reg_ReadWrite... | TOOL | 0.963677 | 4.438023 | {
"github_metadata": {
"branch": "master",
"commit_count": 174,
"repo_created_at": "2014-09-10T19:16:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 453,
"forks": 185,
"issues": 14,
"pull_requests": 5
},
"file_meta": {
"content_id": "a15... |
dfc2152c-6999-4923-a09c-8fcb52018767 | Chinkyu/CXXExercise | MyAlgorithmPractice/MyAlgorithmPractice/2043.SimpleBankSystem.cpp | // easy :
#include <iostream>
#include <vector>
#include <unordered_map>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <stack>
#include <bitset>
using namespace std;
class Bank {
public:
vector<long long> iBalance;
int l;
Ban... | ALGO | 0.999105 | 3.773628 | {
"github_metadata": {
"branch": "master",
"commit_count": 754,
"repo_created_at": "2016-11-04T06:14: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": "8442fcf5... |
35359523-2ee2-42f5-b34e-2374c41602c8 | lazymon4d/cses_submissions | 45_Nearest Smaller Values.cpp | #include<bits/stdc++.h>
using namespace std;
#define pb emplace_back
#define mp make_pair
#define fs first
#define sn second
#define cor(x) (((x%mod)+mod)%mod)
#define vec(T) vector<T>
#define printv(v) for(auto i: v)cout<<i<<" ";cout<<"\n";
#define scanv(v) for(auto& i: v)cin>>i;
typedef long long int ll;
template... | ALGO | 0.999995 | 4.254627 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2021-08-07T18:04: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": "417c3b0a6a... |
7ecdf840-3471-4658-8bee-26a28835f0ee | 21021660-LuongPhungNham/Homework | BT9/A4.cpp | #include <iostream>
#include <cstring>
using namespace std;
// Hàm đảo xâu
char* reverse(const char a[]) {
int len = strlen(a);
char* result = new char[len + 1];
for (int i = 0; i < len; ++i) {
result[i] = a[len - i - 1];
}
result[len] = '\0';
return result;
}
// Hàm xóa kí tự c
char*... | ALGO | 0.996929 | 3.933692 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-02-04T14:22: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": "65bbbb0eca94... |
044b33a2-6de4-44a9-b5a3-eeb22d211945 | Dnursaurio/trabajos_ccomp2 | merge de arreglos/MERGE.cpp | //incluicones
#include <iostream>
using namespace std;
//funcion merge
void Merge(int *p,int *q)
{
int *fin = q + (q - p);
while(p<q && q<fin)
{
if(*p > *q)
{
int temp = *q;
for(int* r = q; r>p; r--)
{
*r = *(r-1);
}
*p = temp;
q++;
}
p++;
}
}
void Split(int *ini, int *fin)
{
//al d... | ALGO | 0.999824 | 4.278717 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2024-08-21T01:42: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": "e4a2d44ec31... |
cd4a3c37-d2b6-4b16-ad2b-03566fca1e37 | Eradax/cp-solutions | judge.progolymp/rangequeries/countnumbers2/countnumbers2.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
const int inf = int(1e18);
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> p2;
#define rep(i, high) for (int i = 0; i < high; i++)
#define repp(i, low, high) for (int i = low; i < high; i++)
#define repe(i, cont... | ALGO | 0.999853 | 5.36365 | {
"github_metadata": {
"branch": "main",
"commit_count": 112,
"repo_created_at": "2024-08-23T20:31:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ab66e99b17... |
1968052b-0d0e-4d72-bc41-918b211150e9 | AdityaTomar016/Questions | 1171-remove-zero-sum-consecutive-nodes-from-linked-list/1171-remove-zero-sum-consecutive-nodes-from-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* removeZeroS... | ALGO | 0.999925 | 4.888497 | {
"github_metadata": {
"branch": "main",
"commit_count": 2369,
"repo_created_at": "2022-04-12T17:33:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3d8f49d50... |
ca45b57c-e01f-47e3-add1-4ad484705355 | chenhongqiao/USACO | sleepy/sleepy.cpp | #include <bits/stdc++.h>
using namespace std;
deque<int> c;
int n;
int tree[100005];
vector<int> ans;
void add(int p)
{
while (p <= n)
{
tree[p]++;
p += p & -p;
}
}
int sum(int p)
{
int s = 0;
while (p > 0)
{
s += tree[p];
p -= p & -p;
}
return s;
}
int ma... | ALGO | 0.999981 | 3.693334 | {
"github_metadata": {
"branch": "master",
"commit_count": 208,
"repo_created_at": "2020-06-10T17:06: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": "4027a003... |
39f695b0-102d-4a81-bd74-5f27ff446229 | doriath17/ArithmeticExpressionParser | src/parser/token_reduce.cpp | #include "token.hpp"
#include <stdexcept>
using namespace prs;
/**
* Search for the first token with the lowest priority from sx (from i to j)
*/
int search_from_sx(std::vector<Token *> v, int i, int j){
for (int k=i; k<=j; k++){
if (v[k]->get_priority() == token_priority::p0){
return k;
... | ALGO | 0.994178 | 5.140842 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2025-04-11T21:22:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f59d1d3fb... |
ad92ee73-c1b8-4f8b-971f-c27846b5eef6 | Sumitkk10/USACO-submissions | 2021/2020 December/Bronze/Daisy Chains.cpp | #include <bits/stdc++.h>
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define ll long long int
#define ld long double
using namespace std;
const int N = 1e6 + 5;
const int MOD = 1e9 + 7;
int main(){
fast;
int n;
cin >> n;
long long int pre_sum[n + 1], a[n + 1];
pre_sum[0] = 0;
for(int i... | ALGO | 0.99978 | 3.407753 | {
"github_metadata": {
"branch": "main",
"commit_count": 64,
"repo_created_at": "2020-12-09T04:34:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1efeabeb264... |
3f968f99-f9da-4cca-8c11-90ce9b6644a0 | PointCloudLibrary/pcl | surface/include/pcl/surface/on_nurbs/fitting_surface_pdm.h | /*
* Software License Agreement (BSD License)
*
* Copyright (c) 2012-, Open Perception, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code... | ALGO | 0.999071 | 6.284394 | {
"github_metadata": {
"branch": "master",
"commit_count": 14566,
"repo_created_at": "2013-02-12T16:40:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 10495,
"forks": 4656,
"issues": 432,
"pull_requests": 147
},
"file_meta": {
"content_id... |
b74851d3-2272-43ba-a5b2-f5c417985a45 | JefReeve/1063-DS-Reeve | assignments/Program_5/main.cpp | #include <iostream>
#include <string>
#include "termgame.h"
using namespace TermGame;
using namespace std;
class card {
public:
card* next;
int cnum;
int face;
int suit;
//public:
card(){
next = NULL;
cnum = 0;
face = 0;
suit = 0;
}
card(int num){
next = NULL;
cnum = num;
fa... | ALGO | 0.970838 | 3.107173 | {
"github_metadata": {
"branch": "master",
"commit_count": 63,
"repo_created_at": "2019-08-27T23:27:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0d29cfd57... |
cb8ebbf8-abb4-41ae-9f2f-96e16e1ebebd | akshaytheGodxo/Leetcode-Problems | 826.cpp | // Most profit assigning work
// per worker ke liye hame maximum profit dekhna hai uski ability ke hissab se
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;
#define sort(a) sort(begin(a), end(a))
#define opt() ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
class Solut... | ALGO | 0.999982 | 5.634297 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-07-24T18:02: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": "b3914affc502... |
a03ad304-504e-4976-bfcc-ed572a263baa | ishandutta2007/codeforces-t | tinsane/normal/641/A.cpp | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <vector>
#include <map>
#include <cmath>
#include <string>
#include <cstring>
#include <utility>
#include <stack>
#include <set>
#include <algorithm>
#include <bitset>
#include <function... | ALGO | 0.999854 | 4.038799 | {
"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": "e22a88fc73d8... |
95d0bcf7-60f3-4867-813c-89a7e6aebdf0 | Hieuvuongqt/Assignment8 | Assignment8.cpp | #include <stdio.h>
int main(){
int a[100];
int n;
printf("\nEnter the number of elements n = ");
do{
scanf("%d", &n);
if(n <= 0){
printf("\nRe-enter n = ");
}
}while(n <= 0);
for(int i = 0; i < n; i++){
printf("\nEnter a[%d] = ",i);
scan... | ALGO | 0.999886 | 3.883145 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-11-08T04:21:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5d21485fb54b... |
aa7b9f14-eff3-40f4-b448-eab60b37ecb2 | Abe016/LA-GTA-Crimes | SplayTree.h | #ifndef SPLAYTREE_H
#define SPLAYTREE_H
#include <iostream>
#include <stack>
using namespace std;
template <typename K, typename V>
class SplayTree {
private:
struct Node {
K key;
V value;
Node* left;
Node* right;
Node(K k, V v) {
key = k;
value = v;... | ALGO | 0.999691 | 4.671479 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2025-04-18T20:32: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": "57410b75fbb... |
9609343a-2120-48c1-b4fb-00e0d76b78a2 | vectorstorm/vectorstorm | VS/Utils/uni-algo/src/ext/translit/macedonian_to_latin_docs.h | /* Transliterator for Unicode Algorithms Implementation.
* License: Public Domain or MIT - choose whatever you want.
* See notice at the end of this file. */
#ifndef MACEDONIAN_TO_LATIN_DOCS_H_UAIX
#define MACEDONIAN_TO_LATIN_DOCS_H_UAIX
#include <string>
#include <string_view>
#include <unordered_map>
#include <un... | TOOL | 0.974277 | 7.149062 | {
"github_metadata": {
"branch": "master",
"commit_count": 1696,
"repo_created_at": "2012-04-12T11:10:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 37,
"forks": 7,
"issues": 2,
"pull_requests": 2
},
"file_meta": {
"content_id": "ce974a... |
a6a8722b-283a-4a36-836b-937737d83197 | coderafeng/cpp-basic-learning | template/03-function_template_array_sort.cpp | #include<iostream>
#include<string>
using namespace std;
/**
函数模板-数组排序
实现通用的数组排序函数
规则:从大到小
算法:选择
测试 char数组、int数组
*/
// 交换元素
template<typename T>
void mySwap(T &a, T &b) {
T temp = a;
a = b;
b = temp;
}
//排序算法
template<typename T>
void mySort(T arr[], int len) {
for (int i = 0; i < len; i++) {
... | ALGO | 0.999788 | 5.007824 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2023-04-01T16:12:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "50bb773a3... |
c8a16b55-e5b1-44f6-bed6-d39abb77c417 | rbd-benchmarks/rbd-benchmarks | testbenches/robcogen/time_robcogen/time_robcogen.cc | #include <declarations.h>
#include <transforms.h>
#include <inertia_properties.h>
#include <inverse_dynamics.h>
#include <forward_dynamics.h>
#include <jsim.h>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include "csv_reader.h"
#include "tictoc_timer.h"
#define VS... | ALGO | 0.998555 | 5.285801 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2019-03-01T23:26:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 27,
"forks": 7,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "750138903... |
c7bccb31-7455-4c28-a6ea-75e438646994 | siconos/siconos-deb | mechanics/src/contactDetection/basicBroadphase/SpaceFilter.hpp | /* Siconos is a program dedicated to modeling, simulation and control
* of non smooth dynamical systems.
*
* Copyright 2016 INRIA.
*
* 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
*
*... | ALGO | 0.99303 | 4.849904 | {
"github_metadata": {
"branch": "ubuntu/xenial",
"commit_count": 5332,
"repo_created_at": "2016-12-23T21:06:39.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a... |
11d135eb-0787-45e0-8c8c-cf2a34594552 | Matthew0826/NULunabotics | Software/ESP8266/Motors/Motors.ino | #include <Servo.h>
#include <TheiaSerial.h>
#define ID 4
// Using the SPARKmini Motor Controller
#define FORWARD_PULSE_WIDTH 2500.0 // in microseconds
#define REVERSE_PULSE_WIDTH 500.0 // in microseconds
#define MOTOR_COUNT 4
// on the board, it goes 11, 6, 9, 5
// so from left to right:
// left back, right back, ri... | TOOL | 0.950215 | 6.952045 | {
"github_metadata": {
"branch": "main",
"commit_count": 489,
"repo_created_at": "2024-10-23T13:34:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "992f8c5eb6... |
710b8e8b-6989-4a76-ade1-e68ed33467bb | marian-nmt/amun | src/amun/3rd_party/extract_lex/extract-lex.h | /***********************************************************************
Moses - factored phrase-based language decoder ... | TOOL | 0.918133 | 6.113433 | {
"github_metadata": {
"branch": "master",
"commit_count": 2115,
"repo_created_at": "2018-09-16T07:07:20.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 26,
"forks": 11,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2f62fa... |
6712f8d2-31bc-4010-b845-1766f6b41b00 | robot10235/some-codes | 栈/225.cpp | #include <iostream>
#include <queue>
using namespace std;
class MyStack {
public:
/** Initialize your data structure here. */
MyStack() {
}
/** Push element x onto stack. */
void push(int x) {
q1.push(x);
}
/** Removes the element on top of the stack and returns that element.... | ALGO | 0.974558 | 4.820472 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-09-14T22:03: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": "2ef992ecc69f... |
c49c3295-bbe5-4454-af0d-038af1961133 | kuromadoshiMJ/SfM | include/sfm.hpp | #pragma once
#include <opencv2/features2d.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/opencv.hpp>
#include <vector>
#include <iostream>
#include <map>
#include <fstream>
#include <cassert>
#define dbgLine std::cerr<<"LINE:"<<__LINE__<<"\n"
#define dbg(x) std::cerr<<(#x)<<" is "<< x <<"\n"
const int DS_FAC... | ALGO | 0.975855 | 4.582257 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-10-29T06:46: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": "66b634f3b992... |
de89733c-3a45-4797-8325-afa83ee035e6 | akash-podder/Job-Stuffs | Akash-Job-Stuffs/Leetcode-Solve/DP/Best Problems to Understand DP/House Robber/213. House Robber II.cpp | class Solution {
public:
int solve(vector<int>& nums, int n, vector<int>& cache){
if(n<0){
return 0;
}
if(n==0){
return nums[0];
}
if(cache[n]!=-1){
return cache[n];
}
int taken = nums[n] + solve(nums, n-2, cache);
... | ALGO | 0.999991 | 5.61906 | {
"github_metadata": {
"branch": "master",
"commit_count": 139,
"repo_created_at": "2021-10-21T20:19:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "466dab22... |
7018d4ec-fbfc-4de6-a340-c77b36b0b633 | JaiSharma09/DSA | stringPermutation.cpp | #include<iostream>
using namespace std;
bool checkEqual(int arr1[26], int arr2[26]){
for (int i = 0; i < 26; i++)
{
if(arr1[i]!=arr2[i]){
return 0;
}
}
return 1;
}
bool permutation(string s1, string s2){
int arr[26]={0};
for (int i = 0; i < s1.length(); ... | ALGO | 0.999996 | 3.786286 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-08-30T06:35: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": "26f69b7ab9... |
423633cf-f8f4-4f33-990c-03887cd13a80 | chrilars/genie-EL | include/ubdd/CuddUBDD.hh | /** @file CuddUBDD.hh
*
* @date 10.09.2021
* @author <NAME>
*/
#pragma once
#include "BaseUBDD.hh"
#include "CuddUBDDMintermIterator.hh"
#include <complex>
#include <memory>
#include <utility>
#include "cudd.h"
#include "cuddObj.hh"
#include "dddmp.h"
namespace genie {
/**
* @brief Implementation of ... | ALGO | 0.987755 | 7.121197 | {
"github_metadata": {
"branch": "main",
"commit_count": 124,
"repo_created_at": "2024-03-14T10:10: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": "09ffcf7c1a... |
ed81971b-888c-4f9f-a88e-c39a7602d86e | HynDufO/xpbd-vto | cloth_body_constraints.cpp | #include <bits/stdc++.h>
using namespace std;
vector<array<double, 3>> vertices;
vector<vector<int>> triangles;
void readOBJFile(const string &file_path) {
vertices.clear();
triangles.clear();
ifstream file(file_path);
if (!file.is_open()) {
cerr << "Error: Couldn't open file." << endl;
... | ALGO | 0.996412 | 4.092137 | {
"github_metadata": {
"branch": "body-moves",
"commit_count": 11,
"repo_created_at": "2024-03-14T07: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": "486c9... |
2e8bec29-ddbc-4968-80a8-32c5e633b79f | AnsonHooL/Coding_Note | sword_to_offer/【!!树 + 递归】26.树的子结构.cpp | //
// Created by lenovo on 2020/9/20.
//
/****** 判断树A 和 树B 是否有相同的自结构
* 两个递归一个是A树的递归
* 一个是B树的递归
* 重要是拆成两个递归!牛逼
* ***/
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution {
public:
bool isSubStruct... | ALGO | 0.999702 | 4.968875 | {
"github_metadata": {
"branch": "master",
"commit_count": 84,
"repo_created_at": "2020-11-26T13:01: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": "0842d76bb... |
60ecfcdb-b60d-4940-90ed-513755053154 | AbdooMatrix/Mini-Projects | Data Structure/2. Linear Structures/CircularLinkedList.h | // Name: <NAME>
// ID: 20221010
#ifndef DATASTUCTUREASS_CIRCULARLINKEDLIST_H
#define DATASTUCTUREASS_CIRCULARLINKEDLIST_H
#include <iostream>
using namespace std;
// Template for node in a circular linked list
template<typename T>
struct CircularNode {
T data; // Data stored in the node
CircularNode *link;... | ALGO | 0.994219 | 6.65508 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2024-07-06T10:24: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": "c60be4e039fb... |
c10d5ff0-2488-44e9-9ff6-7915cfd54006 | Collins-bit/pr-filter | scripts/get_MM_num.cpp | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
int get_MM_from_inverted_file(const std::string &path, std::map<std::string, std::vector<std::string>> &MM) {
int num = 0;
std::ifstream MM_myfile(path);
std::string w, line;
while (getline(MM_myfile, line)) {
std::stringstream ... | TOOL | 0.920051 | 4.07206 | {
"github_metadata": {
"branch": "master",
"commit_count": 52,
"repo_created_at": "2022-12-15T06:47:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "17c5ae221... |
e484d23e-ef46-4d44-8b25-9f77ba940a14 | oisee/autodiver_cpp | autodiver_cpp/main.cpp | //
// main.cpp
// autodiver_cpp
//
// Created by oisee on 02.02.15.
// Copyright (c) 2015 oisee. All rights reserved.
//
#define CELLX 8
#define CELLY 8
#include <iostream>
#include <fstream>
#include <string>
#include <Magick++.h>
#ifdef _WIN64
#include "./win/msdirent.h"
#define COPY_COMMAND "copy "
#define MK... | DATA | 0.937058 | 4.154641 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2015-02-03T09:05:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fe5575797... |
6a405231-f77e-460a-af7a-b20cdc928e7b | ishandutta2007/codeforces-x | xyf007/normal/1216/F.cpp | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
template <typename T>
void checkmax(T &x, T y) {
if (x < y) x = y;
}
template <typename ... | ALGO | 0.99978 | 3.885821 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:38: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": "d09d576e0d62... |
811e62ce-40ea-4613-96c8-bca50b09ae5e | 2018331056shanto/Problem-Solving | Mixed code Library/trietreelinkdlist.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#define sz 2000005
using namespace std;
// TRIE starts using pointer
#define trie_sz 26
struct node{
bool ending;
node *next[trie_sz];
node()
{
ending = false;
for (int i = 0; i<trie_sz; i++... | ALGO | 0.999779 | 3.542565 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2022-06-24T09:13: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": "5f2b740238c... |
e15026b1-1d03-420e-b4d5-0996c9cab706 | risenfromashes/truth-table-generator | Boolean/Formula.h | #pragma once
#include <map>
#include "ExpressionParser.h"
#include "Variable.h"
namespace Boolean {
template <std::integral T> class Formula {
std::map<std::string, VariableProperty<T>> m_var_table;
std::vector<VariableProperty<T>> m_var_list;
std::shared_ptr<Expression<T>> m_expression_root;
public:
cons... | TOOL | 0.918974 | 6.167426 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2021-11-23T16:09:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c7eed3343c... |
3d07c8aa-3bb7-43c6-9a71-a19f3b5cc889 | dangminhkhoi2212/Deadline_AI | Ex6/N3_14_B2007242_DangMinhKhoi_UpLy_DFS.cc | #include <stdio.h>
#include <stdlib.h>
#include <stack>
using namespace std;
#define Max_glass 6
#define up 0
#define down 1
#define Maxlength 100
typedef struct
{
int Glass[Max_glass];
} State;
const char *action[] = {
"First state",
"Change glass 1 2 3",
"Change glass 2 3 4",
"Change glass 3 4 5",... | ALGO | 0.99975 | 4.615694 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2022-08-31T08:36: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": "d3d545a64... |
8bcb0c81-4030-4451-b878-96d6795e803a | coolyuyuyu/leetcode | algorithm_0000-0999/882-Reachable Nodes In Subdivided Graph/main.cpp | class Solution {
public:
int reachableNodes(vector<vector<int>>& edges, int maxMoves, int n) {
vector<pair<int, int>> graph[n];
for (const auto& edge : edges) {
int u = edge[0], v = edge[1], cnt = edge[2];
graph[u].emplace_back(v, cnt + 1);
graph[v].emplace_back(u... | ALGO | 0.99999 | 6.032546 | {
"github_metadata": {
"branch": "master",
"commit_count": 4422,
"repo_created_at": "2017-03-26T16:52: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": "cabd495... |
fefbd07e-33a6-45ca-8b1a-6ddcf4042abe | Ericko0o/CCOMP2-2.2-2024-2 | Semana 11/aea/SHAPE.cpp | #include <iostream>
using namespace std;
class Shape {
public:
Shape() = default;
Shape(string description) : description(description) {};
// Función virtual a implementar en clase derivada
virtual void draw() const {
cout << "Dibujando " << description << "\n";
}
protected:
string descr... | TOOL | 0.936214 | 5.82255 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2024-08-23T12:35: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": "e08fadbff45... |
0e3b8af0-39ec-408f-9058-e14efb48005c | BruceSherwood/vpython-wx | include/renderable.hpp | #ifndef VPYTHON_RENDERABLE_HPP
#define VPYTHON_RENDERABLE_HPP
// Copyright (c) 2000, 2001, 2002, 2003 by <NAME> and others.
// Copyright (c) 2003, 2004 by <NAME> and others.
// See the file license.txt for complete license terms.
// See the file authors.txt for a complete list of contributors.
#include "util/rgba.hpp... | TOOL | 0.920483 | 6.729431 | {
"github_metadata": {
"branch": "master",
"commit_count": 461,
"repo_created_at": "2012-11-11T16:06:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 69,
"forks": 38,
"issues": 17,
"pull_requests": 0
},
"file_meta": {
"content_id": "28527... |
e84c1f0d-9675-4666-80f9-52c0d0832d14 | ML-UCV/ML-CodeBert-DistinctSolutions | Raw Dataset/ctc/tarjan/train/c3d531a3-c928-45d5-af8b-4e1149dc7960.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <stack>
using namespace std;
ifstream in("ctc.in");
ofstream out("ctc.out");
int const NMAX = 1e5;
vector <int> g[1 + NMAX];
vector <int> strongA[1 + NMAX];int strAsiz;
int visited[1 + NMAX];
int minReach[1 + NMAX];
bool onStack[1 + NMA... | ALGO | 0.999987 | 4.002261 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-03-06T17:44:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3222c9f6566c1... |
96803d22-876b-4ebf-ac1f-cd83402512ff | dwivedir/coding | codeforces/510E.cpp | #include<bits/stdc++.h>
typedef long long int ll;
using namespace std;
#define N 205
int Graph[N][N];
int A[N];
bool notprime[100005];
bool bfs(int n,int *parent)
{
int source = 0;
int sink = n+1;
bool visited[N];
memset(visited,0,sizeof(visited));
queue<int> q;
q.push(source);
visited[source] = true;
p... | ALGO | 0.999773 | 3.34872 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2015-01-23T07:58:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7c26002d1e... |
2aa0ff5a-de1d-450e-8255-a5ca80a62538 | cocos/cocos-engine | native/tools/simulator/libsimulator/lib/runtime/ConfigParser.h | /****************************************************************************
Copyright (c) 2017-2018 <NAME> Co., Ltd.
http://www.cocos.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated engine source code (the "Software"), a limited,
worldwide, royal... | CONFIG | 0.970119 | 5.357311 | {
"github_metadata": {
"branch": "v3.8.7",
"commit_count": 22238,
"repo_created_at": "2015-12-05T03:28:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 8826,
"forks": 2015,
"issues": 777,
"pull_requests": 63
},
"file_meta": {
"content_id":... |
d7547bda-e3fa-45d1-b6fa-423b5866dfce | shuvam07/Assignments_IIITB | Sem1/Algo/Assignments/Assignment_DP_Graph/3.cpp | // Problem:- Given a graph where each vertex has an associated weight,find a pair
// of vertices i,j such that j is reachable from i and w(j) - w(i) is maximum
// Brief idea:- Do a dfs from every node of the graph. For each node keep track of the max descendant value
// Then when this has been computed just iterate ov... | ALGO | 0.999925 | 3.798932 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2018-08-08T06:46:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c091cb0a8... |
a7650326-79a2-47fb-953e-7b4e2539c8e9 | Faiyaz-2021331021/Random-Topic | (A * (B^-1)) % mod.cpp | ////https://codeforces.com/problemset/problem/2008/F
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define endl '\n'
#define pp pair<int,pair<int,int>>
#define asort(a,n) sort(a,a+n)
#define arsort(a,n) sort(a, a + n, g... | ALGO | 0.999927 | 4.495378 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2024-02-23T06:50: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": "868c02aef23... |
cdb95d33-db9e-46ee-9f07-0368301ea646 | JackonYang/paper-reading | 02-tutorial-code/02-profile-examples/03-branch-prediction/test.cpp | #include <algorithm>
#include <ctime>
#include <iostream>
int main() {
const unsigned ARRAY_SIZE = 50000;
int data[ARRAY_SIZE];
const unsigned DATA_STRIDE = 256;
for (unsigned c = 0; c < ARRAY_SIZE; ++c) {
data[c] = std ::rand() % DATA_STRIDE;
}
// std ::sort(data, data + ARRAY_SIZE);
{ // 测试部分... | ALGO | 0.998668 | 4.969013 | {
"github_metadata": {
"branch": "master",
"commit_count": 174,
"repo_created_at": "2018-05-08T10:12:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 248,
"forks": 38,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c87d0... |
745121dc-bf90-4d14-b19e-fd4b9038878d | Subirxgt/CodingWorld | c++/DSA in C++/Linked_List/rotateListKtimes.cc | #include<iostream>
using namespace std;
class Node{
public:
int val;
Node* next;
Node(int data){
val=data;
next=NULL;
}
};
class LinkedList{
public:
Node* head;
LinkedList(){
head=NULL;
}
void insertAtTheTail(int value){
Node* new_node=new Node(value);
... | ALGO | 0.999979 | 5.160884 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-06-22T10:19:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4c425399faf8... |
5192b832-0e9a-4137-b31f-def6badf7006 | v2lab/max-sick-lms100 | blobs.naive.cpp | #include "maxxx.hpp"
#include <algorithm>
#include <cmath>
#define LMS_INFINITY 25000.
MXX_CLASS(BlobsNaive) {
float epsilon;
float max_step_delta;
long min_steps;
// blob finder state
long blob_steps;
float blob_min, blob_max;
BlobsNaive() : epsilon(25.), max_step_delta(50.), min_steps... | ALGO | 0.924416 | 4.589118 | {
"github_metadata": {
"branch": "master",
"commit_count": 166,
"repo_created_at": "2015-03-02T11:46:03.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a6390838b... |
91704fd0-a904-41e3-ab39-e147ed72c5fb | NilFoundation/placeholder | crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/small_field/opcodes/addmod.hpp | //---------------------------------------------------------------------------//
// Copyright (c) 2024 <NAME> <<EMAIL>>
// Copyright (c) 2025 <NAME> <<EMAIL>>
//
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "... | ALGO | 0.997491 | 3.146558 | {
"github_metadata": {
"branch": "master",
"commit_count": 13874,
"repo_created_at": "2024-08-23T08:11:27.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 16,
"issues": 41,
"pull_requests": 26
},
"file_meta": {
"content_id": "9754... |
808ae199-75ae-47a0-8fe2-c6104a8517f6 | temporaryhub/AISD2 | Cryptoanalysis/kryptoanaliza.cpp | // kryptoanaliza.cpp
/*
--------- Rozwiaznie zadania "Co to jest kryptoanaliza?"---------
link do tresci: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=12&page=show_problem&problem=949
------------------------ <NAME> 2013 -----------------------
----------- Zajęcia: Algorytmy i Struk... | ALGO | 0.999577 | 4.174101 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2013-03-10T11:49:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "97f65e4dc... |
d4d2926a-e39c-4d4b-b30f-3a586fd5eb92 | fprogress17/problem | code/LeetCode/uniqueBSTConsttuct.cpp | //
//
// @..*
//
// Created on 9/11/18.
// @..
//
#include "stdc++.h"
using namespace std;
vector<int> a;
struct node
{
int key;
struct node *left, *right;
};
vector<struct node *> constructTrees(int start, int end)
{
vector<struct node *> list;
/* if start > end then subtree will be ... | ALGO | 0.999892 | 4.139044 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2018-12-26T16:46:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cc80380321... |
ebd6aaae-f5b3-4269-836a-236d2f026f66 | yuki-jinnouchi/atcoder | contests/abc383/C/main.cpp | /**
* author: Jini
* sampled by
* https://gist.github.com/yoshihikosuzuki/bbf67915b0920954eb069be3c49b924d
**/
#include <bits/stdc++.h>
using namespace std;
/* alias */
using ull = unsigned long long;
using ll = long long;
using vi = vector<int>;
using vl = vector<long>;
using vll = vector<long long>;
using vvi ... | ALGO | 0.998773 | 3.958509 | {
"github_metadata": {
"branch": "main",
"commit_count": 104,
"repo_created_at": "2024-07-03T23:06:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "504c93f63e... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.