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 |
|---|---|---|---|---|---|---|---|
f3e9d235-d8cc-469a-884d-4b7e6d5cda0e | Joseph21-6147/Raytracing---Sidneys1-inspired | main - step 4f - multisampling.cpp | // Raytracing! (by Sidneys1.com)
// =============================
// part 4f: multisampling
// article: https://sidneys1.com/programming/2022/03/23/raytracing.html
// Implementation by Joseph21 - february 8, 2024
// got upto and including: see the arrow (<<====) in below TOC
/* Table of Contents
* ================... | ALGO | 0.989472 | 7.528706 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-02-08T07:29: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": "1a83b0a8f8cc... |
538fee87-058a-4016-ac4d-09a437524c1c | samirKeshwani2201/Strivers-A2Z-DSA-Course-Sheet | other questions/palindrom.cpp |
#include <bits/stdc++.h>
using namespace std;
class Solution
{
public:
bool isValid(char ch)
{
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9'))
{
return true;
}
return false;
}
char toLowerCase(char ch)
{
if (... | ALGO | 0.999824 | 5.402915 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2023-07-21T13:00:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "844ff299f... |
62b559d6-247a-4694-b80f-9ca2f9aeccc7 | huypham85/Cpp-Source | prime16.cpp | #include<iostream>
#include<math.h>
using namespace std;
const int N = 1e6 + 5;
int isPrime[N];
void sieve(){
for(int i = 0 ; i < N ; i++) isPrime[i] = 0;
isPrime[0] = isPrime[1] = 1;
for(int i = 2 ; i <= sqrt(N) ; i++){
if ( isPrime[i] == 0 ){
for(int j = i * i ; j < N ; j += i)
... | ALGO | 0.999741 | 4.612883 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-09-01T16:06: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": "062eebc244... |
b748b45e-e856-49e7-b54b-d074bc191d17 | shivansh2598/cp | codingninjas/segmenttree/segmenttreecreation.cpp | #include <bits/stdc++.h>
typedef long long int lli;
typedef unsigned long long int ulli;
typedef long double ld;
#define fr(i, k, n) for (lli i = k; i < lli(n); ++i)
#define pb push_back
using namespace std;
void vprint(vector<int> &v)
{
for (int i = 0; i < v.size(); i++)
cout << v[i] << ' ';
cout << e... | ALGO | 0.999882 | 4.974271 | {
"github_metadata": {
"branch": "master",
"commit_count": 45,
"repo_created_at": "2019-11-15T17:27: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": "1495fcbf1... |
cbe9269d-4194-4aac-b66c-28799b19b6f9 | AkashAswal5/cpp-programs | linked_list/3.4Circular_Linkllist.cpp | /*
Circular Linked List --> linklist where all nodes are connected to form a Circle
--> no NULL at the end
Advantages of circular linklist
--> Any node can be a starting point
--> in a conventional linked list, we traverse the list from the head node and
stop the traversal when we reach NULL.
*... | ALGO | 0.999184 | 4.566107 | {
"github_metadata": {
"branch": "main",
"commit_count": 259,
"repo_created_at": "2024-06-22T12:19: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": "7d6f6d22d9... |
da946b27-f33b-43af-b4a0-360caa814da4 | uedakou/CcyberCreator2026_UedaKou | 01_プロジェクト/コード/code/collision/collision_manager.h | //============================================
//
// 当たり判定マネージャー[collision_manager.h]
// Author:Uedakou
//
//============================================
#ifndef _COLLISION_MANAGER_H_
#define _COLLISION_MANAGER_H_
#include "collision_3d.h"
#include "collision_2d.h"
#include "collision_3D_line.h"
#include "collision_3... | ALGO | 0.922189 | 4.018118 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2024-11-15T04:07: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": "bb2bc67e01b... |
68960170-981c-475a-ae01-f1de9941862d | atom-zju/Auto-virtflex | runtime_estimator.cpp | #include "runtime_estimator.h"
#include "topo_change_engine.h"
#include "topo_change_d.h"
#include "vm.h"
#include "util.h"
void runtime_estimator::print(){
cout << "Runtime estimator content:" << endl;
cout << "\t";
for(auto& x: est_map){
cout << "vm_id: " << x.first << ", avg_rt: "
<< x.second.first << ", l... | ALGO | 0.985745 | 4.999763 | {
"github_metadata": {
"branch": "master",
"commit_count": 80,
"repo_created_at": "2022-08-01T22:35: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": "65df77778... |
2a553c61-6de6-425e-9666-cf112e815564 | DeepanshuNIT27/Leetcode | 1228-minimum-cost-tree-from-leaf-values/1228-minimum-cost-tree-from-leaf-values.cpp | class Solution {
public:
//recursive soln
int solveUsingRecu(vector<int>&arr,map<pair<int,int>,int>&maxi , int s ,int e){
//base case
if(s>=e){
return 0;
}
int ans = INT_MAX;
for(int i=s;i<e;i++){
int leftRangeKaMax = maxi[{s,i}];
int rightRangeKaMax = maxi[{i+1,e}];
... | ALGO | 0.999973 | 5.648868 | {
"github_metadata": {
"branch": "main",
"commit_count": 911,
"repo_created_at": "2024-09-11T13:24: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": "bfe56c5cc3... |
7d9323d8-e74c-45b7-9c1a-b54a9a4cdb1c | LTzycLT/code | acm/hdu/bs59/B.cpp | #include<stdio.h>
#include<string.h>
#include<iostream>
#include<algorithm>
#include<math.h>
#include<map>
#include<vector>
#include<string>
#include<set>
#include<queue>
#define MP(x,y) make_pair(x,y)
#define clr(x,y) memset(x,y,sizeof(x))
#define forn(i,n) for(int i=0;i<n;i++)
#define sqr(x) ((x)*(x))
#define MAX(a,b... | ALGO | 0.999945 | 3.417156 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2015-05-25T05:51:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e84be0f89... |
3081eecb-3009-410d-b26d-54a70d037e3c | Thiraput01/Algorithm-design-2024 | sort_algorithms/Merge_sort.cpp | #include <bits/stdc++.h>
using namespace std;
vector<int> v;
vector<int> tmp;
void merge(vector<int> &v, int l, int m, int r, vector<int> &tmp){
//ex merging 4 3 6 , 1 7 2
// l m+1 r
// = 1 2 3 4 6 7
int bi = l;
int ci = m+1;
for(int i=l; i<=r; ++i){
if(ci>r){
... | ALGO | 0.999993 | 4.18277 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2024-02-19T17:36: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": "e9f4af8178a... |
674b60aa-e024-4e87-a103-bbbdecf0f902 | xhq197/quant | 2用C++开发高频金融数据(每3s一条记录)/src/klineBFMain.cpp | #include "kline.h"
#include "listFiles.h"
using namespace std;
#include <fstream>
#include<algorithm>
#include <cstdlib>
#include <filesystem>
#include <unordered_map>
namespace fs = std::filesystem;
#include<ctime>
#include <iostream>
extern ofstream klineBFErr;
//自定义排序函数
bool sortFun(const tick &p1, const tick &p2... | DATA | 0.922262 | 4.606929 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-03-12T09:36:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e10bb862a71c... |
5802f81e-60dc-497a-9f73-74ed4d4e34d2 | awesomePavi/CPP-Expression-Calculator | Addition.cpp | /*
* Name: <NAME>, <NAME>, <NAME>
* MacID: kenthks, jaint, Pathmap
* Student Number: 001429801, 001419931, 001410729
* Description: Adds two expressions
*/
#include "Addition.h"
//returns the type, this is only required to identify subtraction so it returns the linked type, since subtraction is linked by an
//o... | ALGO | 0.979268 | 4.828834 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2016-10-15T02:10: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": "bf105d00d5... |
49fb324e-7c9c-471e-b0ce-9fe6d731c83b | c-PRIMED/fvm | src/fvm/src/modules/fvmbase/FluxLimiters.h | // This file os part of FVM
// Copyright (c) 2012 FVM Authors
// See LICENSE file for terms.
#ifndef _FLUXLIMITERS_H_
#define _FLUXLIMITERS_H_
#include <math.h>
struct minModLim
{
template<class T>
T operator()(const T r)
{return max(0., min(1., r));}
};
struct vanLeer
{
template<class T>
T operator()(c... | ALGO | 0.999086 | 4.101007 | {
"github_metadata": {
"branch": "master",
"commit_count": 3035,
"repo_created_at": "2014-10-24T14:46:01.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 16,
"forks": 21,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3a8348... |
bf3c3e57-79d3-4f29-b46d-ea399b1bfb6b | tjolsen/BlazeIterative | include/solvers/ConjugateGradient.hpp | //
// Created by tyler on 6/24/17.
//
#ifndef BLAZE_ITERATIVE_CONJUGATEGRADIENT_HPP
#define BLAZE_ITERATIVE_CONJUGATEGRADIENT_HPP
#include "IterativeCommon.hpp"
#include "ConjugateGradientTag.hpp"
BLAZE_NAMESPACE_OPEN
ITERATIVE_NAMESPACE_OPEN
namespace detail {
template<typename MatrixType, typename T>
void solve... | ALGO | 0.999802 | 6.575382 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2017-06-26T18:43:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 20,
"forks": 6,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "8d3ee1c2... |
6a352fda-4bc6-4ef5-9757-5c4356640adc | AlexandraWeber12/Sudoku | Sudoku/SudokuGrid.h | #pragma once
#include "Field.h"
class SudokuGrid
{
private:
std::vector<int> Solution{};
int dim{};
int numberOfFields{};
Field** DataArray{};
coordinates** SectionArray{};
coordinates* CoordinateArray{};
int cntCoordinatesToSolve{};
bool solutionFound{ false };
bool verifyValue(i... | ALGO | 0.981733 | 5.134663 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2021-05-08T18:41: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": "857f3c05ff... |
c6c9b316-3fe1-47fe-9079-9ca768c9678b | Edith-3000/Algorithmic-Implementations | Dynamic Programming/DP on Trees/Re-rooting DP Technique/Problem - 1.cpp | // Ref: https://www.youtube.com/watch?v=3UXK0Mab5fM
// https://www.youtube.com/watch?v=-wUgqgClBIM
// https://codeforces.com/contest/1324/submission/90631691
/********************************************************************************************************/
// Problem: F. Maximum White Subtree
// Cont... | ALGO | 0.999929 | 5.002008 | {
"github_metadata": {
"branch": "master",
"commit_count": 490,
"repo_created_at": "2020-07-24T04:49:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2a3ea9fc... |
e02f53ce-c13f-42fb-aa6f-b9af6ea9f2d5 | MMuusskkaann/DSA | c++ codes folder/arrays1.cpp | #include<iostream>
using namespace std;
int main(){
// int marks[5] = {1,2,3,4,5}; // 0 to 49
// cout << marks[0] << endl; // 1
// cout << marks[1] << endl; // 2
// cout << marks[2] << endl; // 3
// cout << marks[3] << endl; // 4
// OUTPUT IN ARRAYS
// cout << "size of array = "<< sizeof(mark... | ALGO | 0.955984 | 3.246441 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-12-25T15:58:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6206d8c7eb14... |
646a164c-b619-476d-b698-f2f62c4fe605 | luqian2017/Algorithm | LeetCode/160_Intersection-of-Two-Linked-Lists/160_Intersection-of-Two-Linked-Lists.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) {
int lenA = 0, lenB = 0;
ListNode *pA = headA;
... | ALGO | 0.999759 | 5.138612 | {
"github_metadata": {
"branch": "master",
"commit_count": 1110,
"repo_created_at": "2018-08-01T03:45:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e05521c... |
e85b0170-5e0b-4ab3-ba56-fe6c6b3f4023 | yarinShapira/cpp-assignment3 | solver.cpp | #include <iostream>
#include <complex>
#include <stdexcept>
#include "solver.hpp"
solver::RealVariable::RealVariable(){
_a = 0;
_b = 1;
_c = 0;
_pow = 1;
}
solver::RealVariable& solver::RealVariable::operator*(double num){
RealVariable *temp = new RealVariable();
temp->_a = this->_a;
... | ALGO | 0.979399 | 3.976168 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2020-04-23T15:21: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": "2e89e2471... |
f2ba906c-eaa7-4909-b4c8-a5957616f035 | QuyDatSadBoy/DSA_Tong_Hop | Dp/Hoa_anime.cpp | #include <bits/stdc++.h>
#define ll long long
#pragma GCC optimize("Ofast")
const ll mod = (ll)1e9 + 7;
#define endl "\n"
#define maxn 1000006
#define _oo LLONG_MIN
#define oo LLONG_MAX - 9
#define bit(x, i) ((x >> i) & 1)
#define all(v) v.begin(), v.end()
#define ms(a) memset(a, 0, sizeof(a))
#define faster() ... | ALGO | 0.999876 | 4.099696 | {
"github_metadata": {
"branch": "main",
"commit_count": 37,
"repo_created_at": "2023-03-29T07:57:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8d121ca8db8... |
a9389501-4013-428e-b4a7-00638c2f2b20 | xinghe06/lt-411 | the 5th week pta.c/FileName.cpp | #include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <math.h>
int main() {
char str[100], hex_str[100];
int i, j = 0, is_negative = 0;
long int decimal = 0;
//printf("请输入一个以#结束的字符串: ");
scanf_s("%[^#]s", str,100);
// 判断是否为负数
for (i = 0; str[i] != '\0'; i++)
{
if (s... | ALGO | 0.990562 | 3.694086 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-04-11T13:18: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": "9ff8ba91b267... |
e982ec32-df13-498d-9827-a1cbd9294585 | uzh-rpg/hybrid_ann_snn | lifting_events_to_3d_hpe/scripts/h3m/generate_full_joints/h36m_utils/Release-v1.1/external_utils/randfeat/mex_featurize.cpp | #include <mex.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <string>
#include "mkl_cblas.h"
#include "omp.h"
#include "mkl.h"
#include "mat.h"
/* Don't do the sqrt */
const double SQRT2 = 1.414213562373095;
const double PI = 3.1415926535897932384626;
const int INIT_NPERDIM = 200;
/* This compute... | ALGO | 0.999396 | 5.180246 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2024-04-13T11:55:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 22,
"forks": 1,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "de7bc6f87b... |
fb8d0ed1-ade5-41d7-874b-5eeef79cd0c7 | rmcconnell14/OSU_Classes | CS162/Week10/Lab10.cpp | /*********************************************************************
** Program Filename: Lab10.cpp
** Author: <NAME>
** Date: 12/2/2014
** Description: This program compares the runtime performance of 3 algorithms, each calculating the Fibonacci sequence in a different way.
** Input: User inputs how many numbers in... | ALGO | 0.998673 | 5.626867 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2015-02-02T00:11: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": "f11f590be... |
7015089b-a55e-45fc-89f0-141e54be70f3 | ayoung-dev/in-SWU | C++/Application/과제4(실습문제 10.1)/소스.cpp | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
void stringSort(string & s) {
char temp;
for (int min = 0; min < s.length(); min++) {
for (int j = min;j < s.length();j++) {
if (s[min] > s[j]) {
temp = s[min];
s[min] = s[j];
s[j] = temp;
}
}
}
}
bool isAnagra... | ALGO | 0.99994 | 4.269042 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2022-04-11T06:06: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": "be4a4fe4a... |
a7d49d61-2f61-43cd-adf0-7906a643003d | masal9pse/atcoder-practice | abc/0~99/042/c.cpp | #include <iostream>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <regex>
#include <iomanip>
#include <map>
#include <cassert>
#include <stack>
#include <queue>
#include <deque>
#include <numeric>
using namespace std;
using ll = long long;
template <class T>
using P... | ALGO | 0.999817 | 3.823106 | {
"github_metadata": {
"branch": "master",
"commit_count": 221,
"repo_created_at": "2022-03-11T08:41: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": "6a85bc84... |
4d79a1e2-7403-4e5b-8294-9ff97c842d54 | TigerMee/leetcode_onlinejudge | helper/helper.h |
#ifndef _HELPER_H_
#define _HELPER_H_
#include <iostream>
#include "common.h"
using namespace std;
#define ARR_SIZE(T) (sizeof(T)/sizeof(T[0]))
template <class T>
void print_v(const vector<T>& v) {
for (size_t i = 0; i < v.size(); i++)
cout << v[i] << ",";
cout << endl;
}
template <class T>
void p... | TOOL | 0.969817 | 4.493967 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2013-07-13T14:31:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb51566ce8... |
ad99e63e-b1fb-42b8-aba6-8259074aabef | drhouma/multithread_algorithms | src/ant/travelling_salesman_problem.cpp | /**
* @file travelling_salesman_problem.cpp
* @authors telvina<telvina<at>student.21-school.ru>
* @authors sreanna<sreanna<at>student.21-school.ru>
* @authors jmadie<jmadie<at>student.21-school.ru>
* @date 02/10/22
*/
#include "./ants_colony/ants_colony.h"
#include "./graph/s21_graph_algorithms.h"
namespa... | ALGO | 0.999951 | 5.579064 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2022-10-07T13:18: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": "091db6800a... |
8f332939-4ecc-43d5-8102-60ab6af91b85 | wassimalharaki/Codeforces | 1100/VityaintheCountryside.cpp | #include <bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define int long long
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define nl << '\n'
#define pii pair<int, int>
#define v vector
#define vi v<int>
#define vvi v<vi>
#define vpii ... | ALGO | 0.999994 | 3.985821 | {
"github_metadata": {
"branch": "main",
"commit_count": 160,
"repo_created_at": "2023-09-19T17:56: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": "399a444aa2... |
11c95fd3-ad2b-4688-b840-d0f529b11552 | mmascarello/Improving | Excercises/LeetoCode/1.cpp | /* 1. Two Sum
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
You can return the answer in any order.
Example 1:
Input: nums = [2,7,11,1... | ALGO | 0.999955 | 6.238691 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2021-10-15T14:10: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": "a00914bb0a0... |
326487ef-f1c5-4280-9024-69ed497e9951 | ishandutta2007/codeforces-t | tadijasebez/normal/1450/D.cpp | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define pii pair<int,int>
#define pll pair<ll,ll>
#define ldb double
template<typename T>void ckmn(T&a,T b){a=min(a,b);}
template<typename T>void ckmx(T&a,T b)... | ALGO | 0.999531 | 3.211832 | {
"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": "50ea2b0154a7... |
0df817f0-3cb0-463c-9b83-a6401bca0d2e | grzegorz-k-karch/my_pbrt | src/core/sampling.cpp | #include "sampling.h"
namespace pbrt {
Point2f ConcentricSampleDisk(const Point2f& u) {
// <map uniform random numbers to [-1,1]^2>
Point2f uOffset = 2.0f*u - Vector2f(1, 1);
// <handle degeneracy at the origin>
if (uOffset.x == 0 && uOffset.y == 0) {
return Point2f(0, 0);
}
// <apply concentric map... | ALGO | 0.997892 | 6.655517 | {
"github_metadata": {
"branch": "master",
"commit_count": 60,
"repo_created_at": "2016-12-20T08:16: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": "81586958b... |
ccbf4690-adf7-4942-bce8-1d6c7146e9e4 | albertsgrc/practica-algorismia | src/algoritmos/tabla-hash-hopscotch.cc | #include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <forward_list>
#include <cstdint>
#include <sys/time.h>
#include <sys/resource.h>
#include "io.hpp"
#include "cronometro.hpp"
using namespace std;
class hash_hopscotch {
private:
struct Bucket {
bool ocupad... | ALGO | 0.925707 | 4.740238 | {
"github_metadata": {
"branch": "master",
"commit_count": 62,
"repo_created_at": "2015-12-18T14:42:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1cd5e2354... |
a5315c8e-1146-4e7a-b2e2-4080f157e43f | Palmkonde/CompetitiveProgramming | TOI/TOI7_sewer/TOI7_sewer.cpp | #include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
const int N = 105;
vector<pii> mp[N][N];
char tmp;
bool vis[N][N];
int n, m;
int main()
{
cin.tie(NULL)->sync_with_stdio(false);
cin >> n >> m;
for (int i = 1; i <= n; i++)
{
for (int j = 1; j <= m; j++)
{
... | ALGO | 0.999951 | 3.172642 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2024-08-26T13:54: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": "ba06389f01... |
d9edc5e1-11da-451f-9cc5-5028476f1112 | GuyOnWifi/CCC-Prep | dmoj/nukit.cpp | #include <bits/stdc++.h>
#pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#define pb push_back
typedef long long ll;
using namespace std;
int moves[5][4] = {{2, 1, 0, 2}, {1, 1, 1, 1}, {0, 0, 2, 1}, {0, 3, 0, 0}, {1, 0, 0, 1}};
int memo[31][31][31][31];
bool winner(int a, ... | ALGO | 0.999971 | 4.92512 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2025-02-01T15:54: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": "280afb7eb9f... |
4aef5810-1f86-4340-973d-66a7a42f73b7 | marc-hanheide/cogx | subarchitectures/vision.sa/branches/post-review-yr2-11533-minimal/src/c++/vision/components/StereoDetector/vs3/FormClosures.cc | /**
* @file FormClosures.cc
* @author <NAME>, <NAME>
* @date 2007, 2010
* @version 0.1
* @brief Gestalt principle class for forming closures.
**/
#include <algorithm>
#include <vector>
#include <cstdio>
#include "Vector2.hh"
#include "VisionCore.hh"
#include "Line.hh"
#include "LJunction.hh"
#include "TJunction.... | ALGO | 0.993264 | 3.213137 | {
"github_metadata": {
"branch": "master",
"commit_count": 21234,
"repo_created_at": "2019-11-04T09:11:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c758db... |
efbb1543-8f40-43a2-8a7f-80d59f13c3d7 | peeyushy95/Building-Blocks-Of-Programming | Articulatn.cpp | /*
(•_•)
<) )>
/ \
AUTHOR : <NAME> {~_~}
Problem : Articulation Point
*/
#include<bits/stdc++.h>
using namespace std; typedef long long ll; typedef pair<int,int> grp;
inline ll power(ll a,ll b) { ll r=1; while(b){ if(b&1) r=r*a ; a=a*a ; b>>=1;} return r;}
inline ll power(ll a,ll b,ll m){ ll ... | ALGO | 0.999965 | 3.608854 | {
"github_metadata": {
"branch": "master",
"commit_count": 51,
"repo_created_at": "2015-08-05T02:13:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b4e45bdec... |
c40e1d91-fa60-44da-b020-a67b01d7ab15 | zobaer-ahmed-zihad/journeyToCode | 05_CP_Weekly_Mission/02_CP_Weeks/cp-solutions-random/D_Line.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while (t--)
{
int n;
cin >> n;
string st;
cin >> st;
ll initial_sum = 0;
vector<int> v;
fo... | ALGO | 0.999943 | 4.72608 | {
"github_metadata": {
"branch": "main",
"commit_count": 360,
"repo_created_at": "2024-10-04T03:29:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f33801daf9... |
746ad874-6d60-4397-aca0-2520dc6bacdb | CrabBucket/Super-Competitive-Competivie-Programming | 1370C/game.cpp | #include <iostream>
#include <vector>
#include <array>
using namespace std;
vector<long long> trial_division3(long long n) {
vector<long long> factorization;
for (int d : {2, 3, 5}) {
while (n % d == 0) {
factorization.push_back(d);
n /= d;
}
}
static array<int, 8... | ALGO | 0.999951 | 3.766768 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2020-06-10T02:35: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": "46f4507c0... |
db7f1106-caa8-45a9-9d2a-419fd54fa593 | mehedihasanshakil7/Compiler-Design-Lab | 04.cpp | /*
Build a lexical analyzer implementing the following regular expressions:
Integer variable = (i-nI-N)(a-zA-Z0-9)*
ShortInt Number = (1-9)|(1-9)(0-9)|(1-9)(0-9)(0-9)|(1-9)(0-9)(0-9)(0-9)
LongInt Number = (1-9)(0-9)(0-9)(0-9)(0-9)+
Invalid Input or Undefined = Otherwise
*/
#include <bits/stdc++.h>
using namespace std;
... | ALGO | 0.948449 | 3.39632 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2024-01-30T12:17:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e0270fb229... |
7c296178-c4a8-468a-b097-b651face8598 | Mugdha-Hazra/180-Questions-Striver-SDE-sheet-in-CPP | Walls Coloring - GFG/walls-coloring.cpp | //{ Driver Code Starts
//Initial Template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function Template for C++
class Solution{
public:
int minCost(vector<vector<int>> &colors, int n) {
int Ai = colors[0][0], Bi = colors[0][1], Ci = colors[0][2];
for(int... | ALGO | 0.999923 | 5.749738 | {
"github_metadata": {
"branch": "main",
"commit_count": 1760,
"repo_created_at": "2020-11-19T06:26:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 243,
"forks": 77,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "51b1ff... |
8f7127f6-10a0-4d08-838c-e8d8e5f54b47 | Sacha-Gonzalez-DeMuer/GPP_Exam_ZombieGame | ZombieGame/project/framework/EliteAI/EliteGraphs/EliteGraphAlgorithms/EEularianPath.h | #pragma once
#include <stack>
namespace Elite
{
enum class Eulerianity
{
notEulerian,
semiEulerian,
eulerian,
};
template <class T_NodeType, class T_ConnectionType>
class EulerianPath
{
public:
EulerianPath(IGraph<T_NodeType, T_ConnectionType>* pGraph);
Eulerianity IsEulerian() const;
std::vector... | ALGO | 0.99288 | 6.891741 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2022-12-30T16:15: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": "e4f5959c9b3... |
dff908e1-1249-418d-8620-46ee8924918a | ishandutta2007/codeforces-p | petr/normal/1396/C.cpp | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author
*/
#include <iostream>
#include <fstream>
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include... | ALGO | 0.999833 | 3.908522 | {
"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": "2f57400456ac... |
c038d3d0-16d8-4e10-87f5-febc40c11907 | nngm/Data-Structures | assignment4/AVLTree.h | #include "Tree.h"
template <class keyT, class valT>
class AVLTree_t : public Tree_t<keyT, valT> {
long check_bf(Node_t<keyT, valT>* n) {
// Checks balance factor values in tree.
long hr, hl, h;
hr = hl = 0;
if(!n) return 0;
hr = check_bf(n->right);
hl = check_bf(n->l... | ALGO | 0.983409 | 5.303333 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-10-11T15:44: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": "65d453c05802... |
1726b699-9fb1-402e-a486-c41cd6be0e7e | hofmannu/openmbr | src/reconsett.h |
#include "vector3.h"
#include <cstdint>
#ifndef RECONSETT_H
#define RECONSETT_H
class reconsett
{
private:
// vector3<int16_t> medfiltKernel = {1, 1, 1};
float regStrength = 0.1f; // regularization strength
vector3<float> dr = {10e-6f, 20e-6f, 20e-6f}; // resolution of output
int16_t nIter = 10; // number of ite... | ALGO | 0.930661 | 3.628475 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2021-05-17T18:05:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 10,
"pull_requests": 0
},
"file_meta": {
"content_id": "635dba08ae7... |
55ef4bec-85d4-4cbe-907e-70d28c8b3c74 | Faathir81/Algoritma-Pemrograman | Tugas-Akhir-Algoritma-Struktur-Data/TugasBesar.cpp | /* TUGAS BESAR
ALGORITMA & PEMOGRAMAN
NAMA : <NAME>
NPM : 4522210033
KELAS : A
MATERI/SOAL : SI PENJUAL OBAT DI APOTEK(TIDAK ADA INPUTAN)
SELECTION/SELEKSI
REPATATION/PENGULANGAN
ARRAY
FUNCTION
STRING
INSERTION SORT - DESCENDING
*/
#includ... | ALGO | 0.996378 | 3.245023 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-25T12:05: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": "9a3126aab98b... |
82a56056-c840-404b-956d-c40f7e31ffa9 | rgoermer/dealt | inc/ts_laplace.h | #ifndef TS_LAPLACE
#define TS_LAPLACE
#include <memory>
#include <utilities.h>
#include <ts_triangulation.h>
#include <tspline_function.h>
#include <isoparametric_function.h>
#include <deal.II/grid/tria.h>
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/grid/grid_generator.h>
#include <deal.II/fe/fe_q.h>
... | ALGO | 0.996266 | 4.424865 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2024-06-18T08:57:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "0d571b4ab7... |
f294ae3e-9980-49b2-b5f2-ef1ca00d5cca | QuickSorting/Codeforces | Round 681/C.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 2e5 + 3;
const int Inf = 1e9;
const int Log = 20;
const ll Mod = 998244353;
int n, m;
vector<int> adj[2][N];
int dist2[Log][N];
pair<int, int> dist[2][N];
int solve2(){
for(int i = 1; i <= n; ++i)
for(int j = 0; j < Log; +... | ALGO | 0.99996 | 4.72568 | {
"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": "bcebfca1dd73... |
f49c196f-59b7-41f7-ba14-135ce8a6bf0a | shingst/ExaHyPE-Engine | ApplicationExamples/Linear/LinearWave2D_Topo/MyLinearWaveSolver.cpp | #include "MyLinearWaveSolver.h"
#include "MyLinearWaveSolver_Variables.h"
#include <algorithm>
#include "CurvilinearTransformation.h"
tarch::logging::Log Linear::MyLinearWaveSolver::_log( "Linear::MyLinearWaveSolver" );
void Linear::MyLinearWaveSolver::init(const std::vector<std::string>& cmdlineargs,const exahy... | ALGO | 0.99939 | 3.444124 | {
"github_metadata": {
"branch": "master",
"commit_count": 11427,
"repo_created_at": "2022-06-13T20:15: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": "4aad87... |
0cea2db0-1554-4701-bbba-4a1bf8b76af2 | BrinkOfMan/Parallel-Distributed-Computing | hw3/big-primes1.cpp | #include <iostream>
using namespace std;
#include <cmath>
#include <unistd.h>
#include <stdlib.h>
#include <sstream>
#include "mpi.h"
#include <fstream>
int array_size = 50847535;
int arr[50847535];
int main(int argc, char** argv){
/* Variables */
int my_rank; /** MPI id for this process, will be used as the se... | ALGO | 0.999656 | 3.715587 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-06-10T19:05: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": "56899214e333... |
5b0a9fd8-20df-4d45-9fb8-56948a9cfc70 | alanlyyy/C-Sedgewick-Data-Structures | Chapter 4/ADT/Poly_linked_list.h | #pragma once
#include <iostream>
template <class Number>
class Poly_linked_list {
private:
struct node {
Number item;
node* next;
node* prev;
node(Number x,node* p, node* n) {
item = x; prev = p, next = n;
}
};
typedef node* link;
link head; //prev_head = null
link tail; //tail_next =null
int ... | TOOL | 0.992803 | 3.905273 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2020-11-15T23:02: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": "269e15255bc2... |
6d36eb14-4184-44a6-8fcc-916e2eef80b6 | goodbyebada/Algorithm | BOJ/cpp/Basic-algo-lecture/[0x09]BFS/ff_boj7576.cpp |
#include <algorithm>
#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#define X first
#define Y second
using namespace std;
/**
* 토마토
* 골드 5
*
*
* 보관 후 하루가 지나면, 익은 토마토들의 인접한 도마도들이 익는다.
*
* 상자의 크기 M(가로 칸) N(세로 칸)
* 정수 1 : 익은 토마토
* -1 : 토마토가 들어있지 않은 칸
*
* 저장부터 모든 토마토가 익어있다면 0 출력
* 모두 ... | ALGO | 0.999987 | 4.159046 | {
"github_metadata": {
"branch": "main",
"commit_count": 178,
"repo_created_at": "2023-07-15T05:07: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": "3ef095746e... |
7b3fcb68-756f-4f23-b8dd-d454e43dd859 | JieunHan17/algorithm | baekjoon/tree/1967.cpp | #include <cstdio>
#include <vector>
#include <utility>
#include <algorithm>
#define MAX 10001
using namespace std;
vector<pair<int, int> > v[MAX];
bool visited[MAX] = {
false,
};
int maximum = 0;
int dfs(int start, int total)
{
visited[start] = true;
bool flag = false;
for (int i = 0; i < v[start].s... | ALGO | 0.999779 | 4.183077 | {
"github_metadata": {
"branch": "main",
"commit_count": 260,
"repo_created_at": "2021-04-10T01:59: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": "ffa2ef8c14... |
764c3e70-0078-4895-8881-d929ad352960 | PaddlePaddle/Anakin | saber/funcs/permute_power.h | /* Copyright (c) 2018 Anakin Authors, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by ... | ALGO | 0.928104 | 7.315428 | {
"github_metadata": {
"branch": "master",
"commit_count": 788,
"repo_created_at": "2018-05-18T05:32:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 533,
"forks": 134,
"issues": 53,
"pull_requests": 15
},
"file_meta": {
"content_id": "3fa... |
601a3390-db36-4a1c-a95c-24ce207ca80d | ordinarydennis/solve_algorithm_problems | leetcode_129_Sum_Root_to_Leaf_Numbers.h | /**
* 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.999834 | 6.194626 | {
"github_metadata": {
"branch": "master",
"commit_count": 405,
"repo_created_at": "2022-01-03T04:53: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": "5c5a2b5c... |
6b4566aa-c8ec-4b58-bc44-594a1c284499 | RosettaCommons/rosetta | source/src/apps/public/DRRAFTER/fit_helix_in_map.cc | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... | ALGO | 0.998964 | 5.288584 | {
"github_metadata": {
"branch": "main",
"commit_count": 11737,
"repo_created_at": "2023-11-17T16:42:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 296,
"forks": 100,
"issues": 27,
"pull_requests": 9
},
"file_meta": {
"content_id": "583f... |
d03d4300-46a6-4c7d-b710-4d31f3efac6e | LroseC/OI | AtCoder/Regular_138/C/main.cpp | #include <vector>
#include <cctype>
#include <cstdio>
#include <algorithm>
struct FSI
{
template<typename T>
FSI& operator>>(T &res)
{
res = 0; T f = 1; char ch = getchar();
while (!isdigit(ch)) { if (ch == '-') f = -1; ch = getchar(); }
while (isdigit(ch)) { res = res * 10 + ch - '0'; ch = getchar(); }
res... | ALGO | 0.999994 | 3.333222 | {
"github_metadata": {
"branch": "main",
"commit_count": 914,
"repo_created_at": "2021-04-05T03:53:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "54f6a3a3c6... |
39313a72-efa8-4964-9638-2734cd0137f8 | setnormTJC/maze-solving---recursion-backtracking | Decimal to binary - iterative and recursive approaches/dec to bin.cpp | #include <iostream>
#include <string>
#include <vector>
using std::cout;
using std::cin;
using std::endl;
using std::string;
/*for readability/groups of 4 binary digits*/
void addPaddingZeros(std::vector<int>& binaryDigits)
{
while (binaryDigits.size() % 4 != 0)
{
binaryDigits.push_back(0);
}
}
std::vector<i... | ALGO | 0.998553 | 5.382059 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2024-07-31T01:06:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f9cf0475df... |
2f145723-3e63-462e-931e-a7967af64c1a | diccooo/aoapc2-bac-UVa | 8/UVa11093.cpp | #include <cstdio>
const int maxn = 100000 + 5;
int n, p[maxn], q[maxn];
int go(int s) {
int fuel = p[s] - q[s];
for (int i = (s + 1) % n; i != s; i = (i + 1) % n) {
if (fuel < 0) return i;
fuel += p[i] - q[i];
}
if (fuel < 0) return -1;
return s;
}
int solve() {
int start = 0;... | ALGO | 0.999921 | 3.93544 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2017-01-10T17:21: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": "2668df49a... |
b7e27be2-d188-4cc6-a7ef-2570bb5fc70c | senapk/fup_2014_2 | provas/prova5/esta_trabalhando.a.cpp | /////////////////////////////////////////////
// Fundamentos de Programação - UFC Quixada
// Baixe o motor.h ou comente o include
// motor.h: https://github.com/senapk/arcade
/////////////////////////////////////////////
#include <motor.h>
#include <iostream>
using namespace std;
//@begin
//Um funcionário trabalha de... | TOOL | 0.926728 | 4.539292 | {
"github_metadata": {
"branch": "master",
"commit_count": 67,
"repo_created_at": "2014-08-05T21:34:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eb1d24f52... |
86b892ae-f490-456d-b43c-50b568422185 | dzhelek/algorithms | saa2/13-sames.cpp | //
// Created by joan_ on 8.10.2023 г..
// Съставете алгоритъм и напишете програма за намиране на броя на площадките на едномерен масив.
// Площадка наричаме два или повече съседни и еднакви елемента на едномерен масив.
#include "iostream"
#define N 9
using namespace std;
int main () {
int arr[N], same, sames = 0... | ALGO | 0.999639 | 4.17001 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2023-10-08T15:01: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": "cd34270b6559... |
f61e117b-c242-447a-89df-996135fe5a4e | khhelland/comp_project_3 | main.cpp | #include "planet.h"
#include "solarsystem.h"
/*
Simulation of the solarsystem. The sun, the planets and pluto are included.
The orbits are assumed to be co-planar. Initial positions and velocities
taken from NASA JPL-Horizons service for the 01/10/14.
Data are written to files rk4.dat and verlet.dat
*/
int main()... | ALGO | 0.999777 | 4.168522 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2014-10-03T13:39:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5cc1ea27e... |
60c58179-9013-4d98-bf06-2dfc151e82d1 | AhmedAlyElGhannam/LeetCode_Playground | Day_06/876_MiddleOfTheLinkedList.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* middleNode(... | ALGO | 0.999831 | 6.153316 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2025-04-11T02:58: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": "fcc65bd692b... |
87dc75a2-1764-47f5-b2ee-07f8d37dbe6d | Gorachand-Senapati/Gora-s-DSA-Sheet | Binary Search/single element in sorted array.cpp | class Solution {
public:
int findOnce(vector<int>& arr) {
// code here.
int n = arr.size();
if(n == 1) return arr[0];
int st = 0, end = n-1;
while(st<= end){
int mid = st + (end- st)/2;
if(mid == 0 && arr[0] != arr[1]) return arr[mid];
... | ALGO | 0.999988 | 5.501751 | {
"github_metadata": {
"branch": "main",
"commit_count": 58,
"repo_created_at": "2025-06-14T15:01: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": "cce25d93bf4... |
978885f5-70c8-4024-8d60-bf3630fa38fd | sriankit/CGraphix | SegTree/main.cpp | #include<GL/glut.h>
#include<GL/glu.h>
#include<windows.h>
#include<stdio.h>
#include<stack>
using namespace std;
int ww,wh;
int blkh = 20, seph = 40, sepx = 20;
int n;
int arr[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int tree[48];
int TL, TR;
bool reBuild=true;
int wait=1;
int stx = 25, sty = 400;
GLfloat normal[... | ALGO | 0.996017 | 3.088612 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2015-07-19T13:26: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": "0770dafc23... |
6ac6895e-849a-49ff-bfdf-ed4ba45433ce | SinaMostafanejad/OpenRDM | src/libmcpdft/mcpdft.h | #ifndef MCPDFT_H
#define MCPDFT_H
#include <armadillo>
namespace mcpdft{
class MCPDFT {
public:
/// constructor
MCPDFT();
MCPDFT(std::string test_case);
/// destructor
~MCPDFT();
/// initialize the class member variables
void common_init(std::string test_case);
//... | TOOL | 0.906965 | 5.328294 | {
"github_metadata": {
"branch": "master",
"commit_count": 332,
"repo_created_at": "2019-08-22T15:55:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 20,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c9788a9... |
aa444b82-1296-4382-b022-1e41632fa8ac | Arsh-ak7/CSES-Problem-Set | Graph/countingRooms.cpp | /*
Idea : Iterate over every . and find wherever you can traverse dfsly
*/
#pragma GCC optimize("O2")
#include <iostream>
using namespace std;
int neighborX[4] = {0, 0, 1, -1};
int neighborY[4] = {1, -1, 0, 0};
int n, m, answer = 0;
int vis[1010][1010];
char grid[1010][1010];
bool isValid(int i, int j)
{
if... | ALGO | 0.999924 | 4.761135 | {
"github_metadata": {
"branch": "main",
"commit_count": 105,
"repo_created_at": "2021-03-20T04:52:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3bc3edda46... |
7dad8cfb-9da1-4ea6-966e-0d9a0bd79252 | rockieCao/LeetCodeSolution | Sort/MaxGap.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
/***
* Pigeonhole Princle
* Suppose there are N elements and they range from A to B.
* Then the maximum gap will be no smaller than ceiling[(B - A) / (N - 1)]
* Let the length of a bucket to be len = ceiling[(B - A) / (N - 1)], then we... | ALGO | 0.999852 | 4.243697 | {
"github_metadata": {
"branch": "master",
"commit_count": 49,
"repo_created_at": "2015-12-12T08:48:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3934638eb... |
e351ebef-72d4-40a2-8905-761d1509bb52 | impulsado/EternalFIB | PRO1/Exercicis/P35971.cc | #include<iostream>
#include<vector>
using namespace std;
typedef vector<vector<int> > Matriu;
void askMatrix(Matriu& matrix,int rows, int cols) {
for (int row = 0; row<rows; row++) {
for (int col = 0; col<cols; col++) {
cin >> matrix[row][col];
}
}
}
int suma_linia(const Matriu& m... | ALGO | 0.999659 | 5.191687 | {
"github_metadata": {
"branch": "main",
"commit_count": 426,
"repo_created_at": "2023-11-26T21:46:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a90abd2dc2... |
bc80af7a-b275-422a-afc1-2fb53d1abb56 | mejibyte/competitive_programming | UVa/11335 - Discrete pursuit/c.cpp | // <NAME>
// Accepted
using namespace std;
#include <algorithm>
#include <iostream>
#include <iterator>
#include <numeric>
#include <sstream>
#include <fstream>
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cstdio>
#include <vector>
#include <cmath>
#include <qu... | ALGO | 0.9999 | 3.734272 | {
"github_metadata": {
"branch": "master",
"commit_count": 355,
"repo_created_at": "2011-10-27T01:25:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 196,
"forks": 66,
"issues": 1,
"pull_requests": 2
},
"file_meta": {
"content_id": "3cb4d... |
325d294a-3b75-4a57-aa71-68eaefb1b7fa | AnirudhDaya/DSA-in-Cplusplus | DSA_in_c++/infix_prefix.cpp | #include <bits/stdc++.h>
using namespace std;
int postfixevaluation(string s)
{
stack<int> st;
for (int i = 0; i < s.length(); i++)
{
if (s[i] >= '0' && s[i] <= '9')
{
st.push(s[i] - '0'); // to push as an integer
}
else
{
int op2 = st.top();
... | ALGO | 0.999872 | 4.49169 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2022-01-05T11:12:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "5ff0a85406... |
35430a87-1d7d-4913-af3b-e64ff9a4166b | ahmedhosssam/competitive-programming | CF-D2/CF931-D2-B.cpp | #include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <vector>
#include <stack>
#include <climits>
#include <cmath>
using namespace std;
#define int long long
int32_t main() {
int t; cin >> t;
int arr[5] = { 15, 10, 6, 3, 1 };
//vector<int> arr = { 15, 10, 6, 3, 1 };
... | ALGO | 0.999593 | 3.711753 | {
"github_metadata": {
"branch": "main",
"commit_count": 155,
"repo_created_at": "2024-01-08T05:44: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": "01b634469c... |
41a1260d-9d0c-4e98-ad84-230fefac7f5c | MathieuDutSik/basic_common_cpp | src_graph/GRAPH_traces.h | // Copyright (C) 2022 <NAME> <<EMAIL>>
#ifndef SRC_GRAPH_GRAPH_TRACES_H_
#define SRC_GRAPH_GRAPH_TRACES_H_
#include "ExceptionsFunc.h"
#include "Timings.h"
#include "traces.h"
#include <iostream>
#include <limits>
#include <utility>
#include <vector>
#ifdef TIMINGS
#define TIMINGS_TRACES
#endif
struct DataTraces {
p... | ALGO | 0.98166 | 4.85889 | {
"github_metadata": {
"branch": "master",
"commit_count": 1356,
"repo_created_at": "2018-07-23T09:57:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6f42d30... |
e7ba4d3a-72f3-42bb-9f70-6bcd2beea876 | ZoroarkDarkrai/CS5234 | gen.cpp | #include <bits/stdc++.h>
#define rep(i, n) for(ll i = 0; i < n; i++)
#define ll long long
#define fs first
#define sc second
#define MAXN 1000005
#define lsb(x) (x&(-x))
#define endl '\n'
#define pb push_back
using namespace std;
std::mt19937 rng(150101);
int cnt[122];
bool seen[122];
int main() {
ios::sync_with_... | ALGO | 0.998578 | 3.253981 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2021-11-09T22:00: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": "9754878aec... |
76e1bbc7-d24a-46db-aa2c-40dc13fa0d9e | hank/life | code/interview_practice/quick_sort.cpp | #include <iostream>
#include <ctime>
#include <cstdio>
#include <cstdlib>
using namespace std;
// Pick a random pivot
// Sort on each side of the pivot
int partition(int a[], int lo, int hi)
{
// Static pivot
int piv = a[lo];
printf("Pivot: %d\n", piv);
int q = hi+1, r = lo-1, h;
for(;;)
{
... | ALGO | 0.99958 | 4.837292 | {
"github_metadata": {
"branch": "master",
"commit_count": 522,
"repo_created_at": "2008-04-26T04:20:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 17,
"forks": 11,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ebc947... |
7a386313-267f-49a4-aee2-384f63163285 | HazyResearch/safari | csrc/fftconv/mathdx/22.02/include/cufftdx/include/database/fft_4_fp32_fwd.hpp.inc | #ifndef CUFFTDX_FFT_4_FP32_FWD_PTX_HPP
#define CUFFTDX_FFT_4_FP32_FWD_PTX_HPP
template<> __forceinline__ __device__ void cufftdx_private_function<17, float, 1>(cufftdx::detail::complex<float> *rmem, unsigned smem){
asm volatile (R"({
.reg .f32 f<33>;
.reg .b64 rd<2>;
add.f32 f17, %8, %13;
add.f32 f18, %9, %15;
sub.... | ALGO | 0.988913 | 5.635459 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2023-02-14T08:15:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 894,
"forks": 70,
"issues": 25,
"pull_requests": 1
},
"file_meta": {
"content_id": "537e2192... |
4342b60e-6309-4c81-ade7-401da4c0870c | yuchen1024/Kunlun | mpc/okvs/paxos.hpp |
/*
** Modified from https://github.com/Visa-Research/volepsi.git
** (1) simplify the design
** (2) add serialize/deserialize interfaces for variables such as matrices
** (3) fix two overflow issues when the weight is not 3
*/
#ifndef KUNLUN_PAXOS_HPP_
#define KUNLUN_PAXOS_HPP_
#include <algorithm>
#include <type_tra... | TOOL | 0.949373 | 6.911104 | {
"github_metadata": {
"branch": "master",
"commit_count": 181,
"repo_created_at": "2021-08-27T13:15:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 79,
"forks": 21,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "7e16e3... |
da8de4db-04f0-49e4-af58-ed19534d2a1c | MarinaPE02-23/computer.pract | 2-2.cpp | #include <iostream>
#include <cmath>
#include <random>
using namespace std;
// Структура для хранения координат точки
struct Point {
double x, y, z;
};
// Структура для хранения параметров прямой
struct Line {
Point a; // Точка на прямой
Point d; // Направляющий вектор
};
// Функция для генерации случай... | ALGO | 0.999757 | 5.764984 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2024-02-13T09:37: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": "34a56972cbc... |
830ace21-6645-4282-8183-958c273a17e7 | siddharthsaumya/OOP-Ass-1 | LE1.3.cpp | #include <iostream>
#include <cmath>
using namespace std;
int main() {
float a, b, c, x1, x2, d, real, imaginary;
cout <<"Enter coefficients of x^2, x and 1: ";
cin >> a >> b >> c;
d = b*b - 4*a*c;
if (d > 0) {
x1 = (-b + sqrt(d)) / (2*a);
x2 = (-b - sqrt(d)) / (2*a);
c... | ALGO | 0.964488 | 3.3881 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-08-04T14:15: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": "e38314a746... |
a60e188e-6415-4741-be3d-dba9603cf425 | proshan/Absolute-Cpp-Solutions | Chapter 5/Programming Projects/4.cpp | /*Write a program that reads in an array of type int . You may assume that there
are fewer than 50 entries in the array. Your program determines how many entries
are used. The output is to be a two-column list. The first column is a list of the
distinct array elements; the second column is the count of the number of o... | ALGO | 0.99986 | 3.902869 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2016-11-23T03:41:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 18,
"forks": 12,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4d832d8... |
52fc3957-7297-4c8f-9c77-b8e3601a6720 | HeitorCode7/Algoritmos-SORT | bubble.h | #ifndef BUBBLE_H
#define BUBBLE_H
#include <time.h>
#include <iostream>
double BubbleSort(int *elem, int n)
{
int chave, troca = 1, i, j;
clock_t inicio, fim;
double tempo = 0.0;
inicio = clock();
//Loop para controlar o número de passagens pela lista
for (j = n - 1; (j >= 1) && (troc... | ALGO | 0.998455 | 4.421973 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2025-03-19T13:28: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": "043671b90f... |
1b21a331-5894-4bcb-81ca-5d2c76a70b13 | yassin64b/competitive-programming | ICPC/NWERC16/E.cc | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author yassin
*/
#include <fstream>
#include <iostream>
#include <vector>
#include <string>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <cmath>
#include <cstdlib>
#include <tuple>
#include ... | ALGO | 0.999694 | 3.358677 | {
"github_metadata": {
"branch": "master",
"commit_count": 786,
"repo_created_at": "2016-03-07T18:10: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": "f2322a75... |
70ae00ff-273a-48b6-aaa1-fdad59e6b4f9 | ByungKwanLee/Adavanced-ECMS | advanced_ecms/src/optimizer.cpp | #include <optimizer.hpp>
#include <ICEMG.hpp>
#include <VehicleInfo.hpp>
using namespace std;
template <typename T>
struct NaN_include
{
bool operator() (T a, T b) const
{
if (std::isnan(a))
{
return false; // Assume NaN is greater than *any* non-NaN value.
}
if (std::isnan(b))
{
r... | ALGO | 0.999171 | 3.645514 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2019-05-08T08:55:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 29,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bf3ca24d... |
3519d7fe-dfd9-4944-bad9-4476e07571c3 | BlackHenry/Freshman | Lab_04/Lab_04/Program.cpp | #include "stdafx.h"
#include "Program.h"
Program::Program()
{
}
void Program::AddRule(Rule r, bool b) {
program.add(0, r);
if(b) size++;
}
void Program::RemoveRule(string s) {
Rule r = Rule(s);
program.remove(r);
}
void Program::Load(string path) {
ifstream f(path);
f >> size;
for (int i = 0; i < size; i++)... | ALGO | 0.945057 | 3.750387 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-09-11T20:04:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c82bdee31a... |
e298c052-6d08-4dd0-9676-ade2f1e823db | Sristi27/DSA-Important-Problems | Arrays/Pascal Triangle.cpp | Pascal Triangle
Given numRows, generate the first numRows of Pascal's triangle.
Pascal's triangle : To generate A[C] in row R, sum up A'[C] and A'[C-1] from previous row R - 1.
Example:
Given numRows = 5,
Return
[
[1],
[1,1],
[1,2,1],
[1,3,3,1],
[1,4,6,4,1]
]
vector<vector<int> > Soluti... | ALGO | 0.999962 | 5.188047 | {
"github_metadata": {
"branch": "main",
"commit_count": 96,
"repo_created_at": "2021-04-27T06:31:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "16e0ff77298... |
56607ce3-2fd2-4b74-8670-3c1e920b6d5b | charles-mendoza/MAGNUS | Include/Magnus/Utility.h | #pragma once
#ifndef MAGNUS_UTILITY_H
#define MAGNUS_UTILITY_H
#include <sstream>
#include <vector>
#include "Magnus/Structures.h"
namespace Magnus
{
class TextObject;
namespace Utility
{
template <typename T>
inline T Min(T a, T b)
{
return a < b ? a : b;
}
template <typename T>
inline T Max(T a... | TOOL | 0.923319 | 6.638216 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2019-01-19T15:25:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a5083a6fac... |
04feca61-9e64-4a58-889d-5f9956aa4865 | sirparashar/Dsa_Solutions | 19-remove-nth-node-from-end-of-list/remove-nth-node-from-end-of-list.cpp | class Solution {
public:
ListNode* removeNthFromEnd(ListNode* head, int n) {
if (head == nullptr) {
return nullptr; // Handle empty list
}
int count = 0;
ListNode* temp = head;
// Count the number of nodes in the list
while (temp != nullptr) {
... | ALGO | 0.999925 | 6.764719 | {
"github_metadata": {
"branch": "main",
"commit_count": 930,
"repo_created_at": "2024-01-25T17:41:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1dbbb41613... |
973dbcea-80f1-45e6-b98d-a10d7eab31b2 | zzzz955/Algorithm_Solved | C++17/백준/Platinum/13544. 수열과 쿼리 3/수열과 쿼리 3.cc | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
const int N = 100001;
int n, m, i, j, k, last;
int nodes[N];
vector<int> tree[N * 4];
void build(int node, int s, int e) {
if (s == e) tree[node] = { nodes[s] };
else {
int mid = (s + e) / 2;
build(node * 2, s, mid);
build(node * 2 +... | ALGO | 0.999989 | 5.308773 | {
"github_metadata": {
"branch": "main",
"commit_count": 1236,
"repo_created_at": "2024-07-11T13:55:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a06770f94... |
17d09900-3e80-4e9e-978a-85c4d4c81ffb | boyplus/competitive-programming | programming.in.th/1020.cpp | #include <stdio.h>
#include <string.h>
void change_string();
bool check_palindrome();
bool check_double_palindrome();
char string[300]="";
int length =0;
int main()
{
int i,j,k;
scanf("%s",string);
length = strlen(string);
change_string();
bool stat = check_palindrome();
if(length == 1)
{
... | ALGO | 0.999955 | 3.781105 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2016-09-04T15:38: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": "6bfc9307a... |
dffaa887-aefe-4168-b1b4-de8eaf66a5b0 | Qeeweew/AscendC-S3 | MatMulSub/op_kernel/mat_mul_sub.cpp | #include "kernel_operator.h"
#include "lib/matmul_intf.h"
using namespace matmul;
#define MIN(a, b) ((a) < (b) ? (a) : (b))
// x1 (M, K) x2 (K, N) x3 (M, N) y(M, N)
template<typename FLOAT_T, uint32_t TILE_M, uint32_t TILE_K, uint32_t TILE_N>
class KernelMulMatSub {
public:
__aicore__ inline KernelMulMatSub() {}
... | ALGO | 0.997961 | 5.746949 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-01-26T06:59: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": "9ef96ec2eead... |
93b3002b-2d6e-4e52-a3e0-c04deda05a58 | Morwenn/cpp-sort | include/cpp-sort/detail/sorting_network/sort10.h | /*
* Copyright (c) 2015-2022 Morwenn
* SPDX-License-Identifier: MIT
*/
#ifndef CPPSORT_DETAIL_SORTING_NETWORK_SORT10_H_
#define CPPSORT_DETAIL_SORTING_NETWORK_SORT10_H_
namespace cppsort
{
namespace detail
{
template<>
struct sorting_network_sorter_impl<10>
{
template<
typename Rando... | ALGO | 0.999437 | 4.311295 | {
"github_metadata": {
"branch": "1.x.y-develop",
"commit_count": 1748,
"repo_created_at": "2015-08-01T11:58:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 661,
"forks": 61,
"issues": 40,
"pull_requests": 0
},
"file_meta": {
"content_id... |
50956607-eb80-454e-9dbf-4969c1e93849 | rinikerlab/RDKit_mETKDG | modified_rdkit/Code/ForceField/UFF/PositionConstraint.cpp | // $Id$
//
// Copyright (C) 2013 <NAME>
//
// Copyright (C) 2004-2006 Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.... | ALGO | 0.975496 | 6.689499 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-06-14T20:01:45.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 10,
"forks": 6,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "bff2592d18... |
7cc9d3b4-b414-4db6-aee4-56a70392d981 | NasuPanda/atcoder-practice | cpp/practice/2409/bootcamp-for-beginners/medium_012.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define all(x) (x).begin(),(x).end()
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin... | ALGO | 0.999937 | 3.414744 | {
"github_metadata": {
"branch": "main",
"commit_count": 102,
"repo_created_at": "2022-07-24T01: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": "0e545fc38f... |
fc56bd72-9587-4124-8f39-2de6646ffc47 | Adi8080/Hactoberfest2021 | C++ Linked List/Question 6.cpp | #include<bits/stdc++.h>
using namespace std;
class node
{
public:
int data;
node * next;
};
class linked
{
public:
node * head = NULL;
node * tail = NULL;
node * create(int data)
{
node * s;
s = new node;
s->data = data;
s->next = NULL;
return s;
}
void insert(int data)
{
if(head == NULL)
... | ALGO | 0.999958 | 4.548597 | {
"github_metadata": {
"branch": "main",
"commit_count": 555,
"repo_created_at": "2021-10-01T14:56:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 32,
"forks": 281,
"issues": 5,
"pull_requests": 64
},
"file_meta": {
"content_id": "65ca85... |
7c2d9f2e-de19-4ef0-b24d-6b654c06287e | Tagore22/algorithmSolve | algorithmSolve/백준/11048_1.cpp | #include <iostream>
using namespace std;
// 11048번의 함수를 사용하지 않고 for문을 이용한 dp 풀이.
// 재귀함수를 사용하지 않기 때문에 더 빠르다.
// 또한 코드의 길이도 짧고 가독성도 좋다.
// 이 풀이를 사용하면서 처음에 한가지 중요한 실수를 했었는데 기존에는 board[1000][1000]이었고
// dp[1000][1000]이었다. 또한 시작 idx는 0이었다. 이렇게 하면 안되는 이유는 다음과 같다.
// 1. for문의 비교 연산을 보면 바로 현재 좌표 앞의 값과 비교를 하게 되는데 상술하였듯 idx... | ALGO | 0.999986 | 4.141181 | {
"github_metadata": {
"branch": "master",
"commit_count": 1452,
"repo_created_at": "2022-04-27T10:40: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": "867e332... |
62e8eea7-389e-424c-b9fb-01d6eab39ba7 | MajenkoLibraries/Average | src/Average.h | /*
* Copyright (c) , <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions... | TOOL | 0.94171 | 5.88025 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2013-12-17T16:04:57.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 57,
"forks": 49,
"issues": 7,
"pull_requests": 1
},
"file_meta": {
"content_id": "55a1f052... |
d1cc8836-5caa-4e5b-b530-b4f1a9d3821b | kmhikaru/ProCon | AOJ/1126.cpp | #include <iostream>
#include <algorithm>
#include <cstring>
#include <cctype>
#include <cstdlib>
using namespace std;
char tbl[80][80];
string T[80][80];
bool isnumber(char c){
if('0'<=c && c<='9') return true;
return false;
}
string Max(string a,string b){
string u="", t="";
bool f1=false,f2=false;
int m... | ALGO | 0.999891 | 3.427004 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-02-11T07:29: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": "1f9052c508... |
d1a9dfd6-f5e0-4112-aac8-000d0608d4e8 | MogaRiana/NewCode | Preg_Bgdn/NrSubsirCresc2/main.cc | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ft first
#define sd second
#define sz(x) (i64) x.size()
#define col(x) x.begin(), x.end()
#define srt(x) sort(x.begin(), x.end())
#define rsrt(x) sort(x.rbegin(), x.rend())
#define rvs(x) reverse(x.begin(), x.end())
#define LSOne(S) ((S) & (-S))
... | ALGO | 0.999966 | 3.786529 | {
"github_metadata": {
"branch": "master",
"commit_count": 146,
"repo_created_at": "2023-02-17T14:08:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "550e8729... |
032b6957-cae5-4114-bee8-f71154e98b8e | apru02/LeetCode-ACs | 893-all-nodes-distance-k-in-binary-tree/all-nodes-distance-k-in-binary-tree.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:
void inorder(TreeNode* root,vector<int> adj[]){
if(root == nullptr) return;
if(... | ALGO | 0.999994 | 5.914502 | {
"github_metadata": {
"branch": "main",
"commit_count": 670,
"repo_created_at": "2023-09-03T18:57: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": "7be22cd11c... |
de87a943-4d24-4576-9ba4-8d7ae8125b72 | blender/blender | source/blender/gpu/intern/gpu_batch_utils.cc | /* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup gpu
*/
#include "MEM_guardedalloc.h"
#include "DNA_vec_types.h"
#include "BLI_math_vector.h"
#include "BLI_math_vector_types.hh"
#include "BLI_polyfill_2d.h"
#include "BLI_sort_utils.h"
#include... | TOOL | 0.956851 | 3.051012 | {
"github_metadata": {
"branch": "main",
"commit_count": 152123,
"repo_created_at": "2019-10-09T12:47:28.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 15670,
"forks": 2395,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e... |
da7b935a-87bf-42aa-822e-ce6d6be419f0 | ML-UCV/ML-CodeBert-DistinctSolutions | Raw Dataset/apm/kruskal/train/0c00b533-ee87-4e5f-b34a-6c336fad3c19.cpp | #include <bits/stdc++.h>
using namespace std;
vector <tuple<int,int,int>> v;
vector<pair<int, int>> ans;
vector <int> ind;
int n, m, cost;
int root(int x) {
if(ind[x] == x) {
return x;
}
return (ind[x] = root(ind[x]));
}
void fabricaDeUnire(int x, int y) {
ind[ind[y]] = ind[x]... | ALGO | 0.999992 | 3.724662 | {
"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": "4cee9fe29d047... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.