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
7e07658a-c975-4d1e-b966-910aa2408619
antoniole01/tictactoe-deprecated-
main.cpp
#include "pch.h" #define TAHOMA "c:/z/_MI/data/font/Tahoma.ttf" #define T(a,b,c) \ if(board[a][b] == '-') \ { \ if(X_KEY) \ { \ bx[c] = true; \ bo[c] = false; \ } \ if(O_KEY) \ { \ bx[c] = fa...
TOOL
0.969791
3.383969
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-02-05T09:55: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": "93bbb64559d6...
98b0999b-913d-4d0c-bddf-6273668cb11d
haozzzzzzzz/osgEarthX
environment/build/3rdParty/include/geos/geos/operation/predicate/RectangleContains.h
/********************************************************************** * * GEOS - Geometry Engine Open Source * http://geos.osgeo.org * * Copyright (C) 2006 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU Lesser General Public Licence as p...
ALGO
0.974692
7.563553
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2015-09-19T06:19:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 75, "forks": 48, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "84a64c7...
9f162f74-9b10-46b0-84bc-cb5381122e78
TaskmasterRishi/CONM
gausse_Forward_and_Backward.cpp
#include <bits/stdc++.h> using namespace std; vector<vector<double>> forwardTable(vector<double> &x, vector<double> &y) { int n = x.size(); vector<vector<double>> forwardDifferenceTable(n, vector<double>(n, 0.0)); for (int i = 0; i < n; ++i) { forwardDifferenceTable[i][0] = y[i]; } for (i...
ALGO
0.999963
5.486995
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-16T09:48:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "057170385bdb...
1660ff0a-ffd8-4828-a0c4-88dd764af8a6
noname1711/DSA_basic
ccpp/ctdlgt/BinarySearchTree/tree.cpp
#include<bits/stdc++.h> using namespace std; struct Node //cấu trúc của 1 node { int data; Node *left; Node *right; }; typedef Node *Tree; Node *CreateNode(int init) //tạo node { Node *p = new Node; p->data = init; p->left = NULL; p->right = NULL; return p; } void CreateTree(Tre...
ALGO
0.999929
4.156383
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-07-14T13:52:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "05efb24af3ac...
a7f2ce33-4083-49c3-80d8-16bbdd279a3f
AK9654AK/LeetCode-Solutions
0003-longest-substring-without-repeating-characters/0003-longest-substring-without-repeating-characters.cpp
class Solution { public: int lengthOfLongestSubstring(string s) { int i=0;int j=0;int n=s.size();int answer=0; set<char> mp; while(i<n){ //////////////////////https://www.youtube.com/watch?v=RqxIXM6eyiY au...
ALGO
0.99973
5.480746
{ "github_metadata": { "branch": "main", "commit_count": 2663, "repo_created_at": "2022-12-25T17:54: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": "79e8273f5...
68d88539-3dcd-4ee2-b664-23b2c9fc6970
btdat2506/IT.CLA.K18---CP---btdat2506
Codeforces/Official/Codeforces Round #608 (Div. 2)/C. Shawarma Tent.cpp
#include <bits/stdc++.h> using namespace std; typedef int64_t ll; #define x first #define y second #define For(i, a, b) for(ll i = a; i <= b; i++) ll n, a, b, ans, mark[10]; pair <ll, ll> pt[200010]; ll max(ll a, ll b, ll c, ll d) { return max(max(a, b), max(c, d)); } void process() { For(i, 1, n) { if (pt[i]...
ALGO
0.999968
3.617404
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2019-09-02T04:01:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "ca8b1bf9e...
6e4c5ab3-b22a-49d2-83d9-df486ce37b40
srcid/alcidesribeiroparalela20211
atividades/atividade13/mtx_mult.cpp
#include <bits/stdc++.h> #define ECHO 0 using namespace std; template <class T> vector<vector<T>> multm(vector<vector<T>>& ma, vector<vector<T>>& mb, const int N) { int i, j, k; vector<vector<T>> mc(N, vector<T>(N, 0.0)); for (i=0; i<N; i++) { for (j=0; j<N; j++) { for (k=0; k<N; k++...
ALGO
0.998241
3.374045
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2021-05-12T02:37: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": "ce33d5ca8...
ca16109f-095c-48d5-bb0c-8ed240f414ba
AlexG1203/UBB-INFO
ANUL 1/Semestrul 2/Algoritmica Grafelor/Lab 5/Problema 2/Problema 2/main.cpp
#include <fstream> #include <vector> using namespace std; ifstream fin("input.txt"); ofstream fout("output.txt"); struct Edge { int flow, capacity; int u, v; }; struct Vertex { int h, e_flow; }; class Graph { private: int V; vector<Vertex> ver; vector<Edge> edge; bool push(int u); void relabel(int u); void...
ALGO
0.999965
4.314441
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2023-08-30T00:03:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ba4bdbe6ef...
fc1c56df-300d-4f27-a29f-b631f31bcb00
xdestiny110/Leetcode
129.求根到叶子节点数字之和.cpp
/* * @lc app=leetcode.cn id=129 lang=cpp * * [129] 求根到叶子节点数字之和 */ // @lc code=start /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ #include <string> class Solution ...
ALGO
0.999933
6.436165
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2019-05-18T04:31:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5ad0c48...
25137c30-8fab-4d21-a36d-372941fa702c
Krushnatawri18/DSA-In-CPP
Add two numbers represented by linked lists.cpp
/* Given two decimal numbers represented by two linked lists of size N and M respectively. The task is to return a linked list that represents the sum of these two numbers. For example, the number 190 will be represented by the linked list, 1->9->0->null, similarly 25 by 2->5->null. Sum of these two numbers is 190 + 2...
ALGO
0.999986
6.201291
{ "github_metadata": { "branch": "main", "commit_count": 158, "repo_created_at": "2022-12-12T11:30:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f3ef5c2811...
8800d674-8b02-4f23-b460-8d1a8434022b
CodeNinja1126/coding_test
coding_test_cpp/16197.cpp
/* 백준 16197번 두 동전 브루트포스 재귀 */ #include <iostream> #include <string> #include <vector> #include <set> #include <queue> using namespace std; set<vector<int>> backtrack; int dir[4][2] = {{0,1}, {1,0}, {-1,0}, {0,-1}}; char board[20][20] = {{0,},}; int n, m; int ans = -1; void move(int dir_i, vector<int>& coin_pos){ ...
ALGO
0.999914
3.718281
{ "github_metadata": { "branch": "main", "commit_count": 103, "repo_created_at": "2022-05-08T17:52: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": "690f02a99d...
65b628c9-c54a-4256-81d3-70888e5b41e8
Kitware/VTK
ThirdParty/viskores/vtkviskores/viskores/viskores/filter/uncertainty/ContourUncertainUniformMonteCarlo.cxx
//============================================================================ // The contents of this file are covered by the Viskores license. See // LICENSE.txt for details. // // By contributing to this file, all contributors agree to the Developer // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO...
ALGO
0.950286
5.579526
{ "github_metadata": { "branch": "master", "commit_count": 94968, "repo_created_at": "2010-04-27T15:12:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2910, "forks": 1246, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b...
cea600ca-22a5-4940-88de-30adc96909ba
OpenSees/OpenSees
SRC/element/forceBeamColumn/HingeRadauBeamIntegration.cpp
/* ****************************************************************** ** ** OpenSees - Open System for Earthquake Engineering Simulation ** ** Pacific Earthquake Engineering Research Center ** ** ** ** ...
ALGO
0.980849
6.219471
{ "github_metadata": { "branch": "master", "commit_count": 8721, "repo_created_at": "2018-09-12T00:49:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 667, "forks": 719, "issues": 42, "pull_requests": 23 }, "file_meta": { "content_id": "c1...
71259a63-c6b7-44d5-9bc2-b0ffa7a70726
venkataramanab/MissionRnD-C-Arrays-Worksheet
src/studentsCount.cpp
/* OVERVIEW: Write a function that takes ascending sorted student's score array and tells how many number of students got more marks and how many students got less marks than the given student. E.g.: Input array: [10, 20, 30, 40, 50], score: 30, lessCount value is 2 (10, 20 are less than 30), moreCount value is 2 (40...
ALGO
0.999863
3.953471
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2015-11-09T19:46: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": "f21ea4f87...
4d8b40c6-8d17-4f28-a0d7-032749f08275
aldomelladop/Tareas_POO
2018-2/Tarea-2/Archivos/tarea2v7.cpp
#include <iostream> #include <vector> using namespace std; vector <int> ssal,ds; vector<int> countandSay(vector<int> lass,int n) { int l,counter =1; ssal = lass; ds = ssal; lass.clear(); //borra todos los elementos que contiene el vector sobre el cual se harán push back los valores posteriores de la secuenci...
ALGO
0.999906
3.894091
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2018-08-27T14:56: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": "5431e2a33...
57e56427-c338-4201-8f8d-90fd2b7e119e
wdiiahk/procon-archive
atcoder.jp/abc007/abc007_2/Main.cpp
//デバッグ用オプション:-fsanitize=undefined,address //コンパイラ最適化 #pragma GCC optimize("Ofast") //インクルードなど #include <bits/stdc++.h> using namespace std; typedef long long ll; //マクロ //forループ //引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか //Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる //FORAは範囲for文(使いにくかったら消す) #define R...
ALGO
0.999793
3.403532
{ "github_metadata": { "branch": "main", "commit_count": 544, "repo_created_at": "2021-03-07T00:32: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": "0b1d173933...
d7947bd7-d5ca-4de1-b7af-8ab04adf29f3
njumathdy/code-practice
google code jam kickstart/Practice Round 2019/B_Mural/solution.cpp
/******************* Thanh wants to paint a wonderful mural on a wall that is N sections long. Each section of the wall has a beauty score, which indicates how beautiful it will look if it is painted. Unfortunately, the wall is starting to crumble due to a recent flood, so he will need to work fast! At the beginning...
ALGO
0.999855
4.176033
{ "github_metadata": { "branch": "master", "commit_count": 149, "repo_created_at": "2019-03-13T03:39: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": "7c05c478...
23c8f056-8f14-4897-9f6e-3ba24dbb2e31
ashenBlade/introduction-to-algorithms
chapter_9/qsort_order_static.cpp
#include <vector> #include <iostream> inline void swap(std::vector<long> &elements, int i, int j) { long temp = elements[i]; elements[i] = elements[j]; elements[j] = temp; } int get_median(std::vector<long> &elements, int left, int right) { swap(elements, left + random() % (right - left + 1), right); ...
ALGO
0.99997
5.495675
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-12-21T04:15: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": "6166659153...
166d0d5f-7c27-4ffb-976a-a9d89aec3ddf
Nivishka-M/Data-Structures-and-Algorithms
Lab 8 - heap.cpp
#include <iostream> #include <vector> using namespace std; // function to heapify the tree void heapify(int arr[], int n, int root) { // build heapify int i=root; int l = 2*i+1; //left child of i int r = 2*i+2; //right child of i int largest; //a variable to store largest number of i,...
ALGO
0.999984
4.487972
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2023-03-30T07:56: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": "d506a0111f2...
3bd1d4e6-2936-45d1-b39b-fd137b1abddf
viren-sureja/Love-Babbar-450
01_array/26_sell_buy_stock_atmost_twice.cpp
/* link: https://www.geeksforgeeks.org/maximum-profit-by-buying-and-selling-a-share-at-most-twice/ */ // ----------------------------------------------------------------------------------------------------------------------- // // very simple and nice solution (for any no. of buy and sell); // here main logic i...
ALGO
0.992343
5.299622
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2021-03-21T14:17:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 356, "forks": 169, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "ec814...
6dc40948-877b-4f2a-9b23-d94b857b0438
Sadman007/codelibrary
Graph Algo/Bipartite Check.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define pii pair<int,int> #define SET(n) memset(n,-1,sizeof(n)) #define CLR(n) memset(n,0,sizeof(n)) #define MAX 1010 #define pb push_back int vis[MAX]; int dist[MAX]; int clr[MAX]; int s,d; vector<int> gr[MAX]; void dfs(i...
ALGO
0.999796
5.079013
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2017-04-11T18:46:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "014d60e38...
3c0c9f10-522f-4494-a0bc-40d91bfdfc1a
oliverphilcox/HIPSTER
power_mod/kernel_interp_bispectrum.h
// kernel_interp_bispectrum.h - Interpolator for kernel functions for bispectrum computation // This stores 3(-1)^ell D_ell(kw) #ifndef KERNEL_INTERP_H #define KERNEL_INTERP_H // BISPECTRUM SPECIFIC CODE #define MAXORDER 10 #define NLM_MAX ((MAXORDER+1)*(MAXORDER+2)/2) // Some global constants for the a_lm normaliza...
ALGO
0.999047
6.354131
{ "github_metadata": { "branch": "master", "commit_count": 149, "repo_created_at": "2019-06-13T13:54:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "85a711fd...
7a47c31c-7e8a-4667-937c-58418df221ec
rebelskywalker/CIS133-Data_Structures_And_Algorithms
TannyAirHash/hash.cpp
/* <NAME> Homework 3 : Hash Problem Date Due: 4/17/2017 Compiler used: Visual Studio 2015 Description: This cpp file contains the function definitions that will run the dictionary program to display the dictionary list, index of each item, and number of collisions at each position. Further, these functions allow for ...
ALGO
0.972151
3.908177
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2024-05-21T00:48: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": "e959c8a8456...
074b7ce2-e7c7-4bab-8406-d322491f5d31
cryzzer/FMI-Semester-1-Homeworks
Homework1/fn62518_d1_5_vc.cpp
/** * * Solution to homework assignment 1 * Introduction to programming course * Faculty of Mathematics and Informatics of Sofia University * Winter semester 2020/2021 * * @author <NAME> * @idnumber 62518 * @task 5 * @compiler VC * */ #include <iostream> using namespace std; int main() { int divideNumber = 0; dou...
ALGO
0.999853
4.127262
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-01-03T12:14:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3312382c880...
9e0c90b1-6284-434f-b65c-791f51704768
matthew-tawa/coen244-graphs
DirectionalCyclicalGraph.cpp
#include "DirectionalCyclicalGraph.h" using namespace std; bool DirectionalCyclicalGraph::addVertex(Vertex& v) { if (searchVertex(v)) { // if this vertex already exists on the graph, doesn't make sense to re-add it cout << "This vertex already exists on the graph." << endl; return false; } vertices.push_back(v)...
ALGO
0.938821
5.037953
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-03-25T17:13: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": "667f5f314b...
29f3c60d-3d84-4e6e-b5f7-75c288161ca9
tayyabarafique2004/BinaryTreeTraversals
BinaryTreeTraversals/traversals.cpp
#include<iostream> #include<string> #include <cstdlib> using namespace std; class Node { public: int info; Node* left; Node* right; Node(int data) { info = data; left = nullptr; right = nullptr; } }; int getValidInput() { int data; while (true) { if (cin >> data) { break; } else { cout <<...
ALGO
0.99979
4.055973
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-12-08T18:09: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": "72ff05f9ea...
8214dc2f-efd0-424e-8b72-628c8400ed25
Isham17NIT/DSA
110-balanced-binary-tree/balanced-binary-tree.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.999857
5.866815
{ "github_metadata": { "branch": "main", "commit_count": 464, "repo_created_at": "2025-02-27T04:49:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca2029237c...
022aba51-9932-4537-a417-9f3cc780e0d1
wpla/FuzzyDictionary
src/EditDistance.cpp
#include <core/precompiled.h> #include <limits.h> #include <tagdistiller/SimpleString.h> #include "EditDistance.h" namespace Distiller { int EditDistance::levenshtein_counter = 0; int EditDistance::ukkonen_counter = 0; int EditDistance::calc(const SimpleString& pattern, const SimpleString& text, ...
ALGO
0.998352
5.801862
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-08-29T21:01:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5bd7ae40c...
03e7a252-6c72-49da-a066-2429ab1c5839
AhmedHafez98/My-Competitive-Programing
Spoj/SPOJ ONP.cpp
#define _CRT_SECURE_NO_WARNINGS #include<bits/stdc++.h> using namespace std; #define all(v) ((v).begin()),((v).end()) #define allr(v) ((v).rbegin()), ((v).rend()) #define sz(v) ((int)(v).size()) #define clr(arr, val) memset(arr, val, sizeof(arr)) #define JSE ios::sync_with_stdio(0); cin.tie(0); cout.tie(...
ALGO
0.999941
4.132558
{ "github_metadata": { "branch": "master", "commit_count": 150, "repo_created_at": "2018-01-29T01:32:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "18b71938...
1af35f21-fe1b-47b9-aad5-bb68837858ea
RolfVieten/StalGrowth
src/alglib/specialfunctions.cpp
/************************************************************************* ALGLIB 3.9.0 (source code generated 2014-12-11) Copyright (c) <NAME> (ALGLIB project). >>> SOURCE LICENSE >>> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published...
ALGO
0.996542
5.448202
{ "github_metadata": { "branch": "master", "commit_count": 147, "repo_created_at": "2015-04-16T23:02:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15e8bc6a...
3c3cb864-7b6e-4f85-8594-1bce253ff406
ranjinxi/DataStruct
7.binary_tree.cpp
/************************************************************************* > File Name: 7.binary_tree.cpp > Author: ranjinxi > Mail: <EMAIL> > Created Time: 2019年10月19日 星期六 19时07分22秒 ************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <time.h...
ALGO
0.99987
4.540358
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-10-22T02:41: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": "d26b978f82...
14e55e09-6fbf-410b-93fd-04fc16f63b65
carlossosvos/Lab2CarlosCasco
Lab2CarlosCasco.cpp
#include <iostream> #include <string> #include <cmath> #include <math.h> //#include <stdlib> using namespace std; void ConvertBase(string); void ejercicio2(int); void CambioADecimal(string); int main() { int s = 0; while(s==0){ int op = 0; string title ="Laboratorio # 2 \n"; string options = "1)E...
ALGO
0.981398
3.125813
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-10-21T19:22: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": "7e2f927dcd...
64c824b1-c308-4c25-8afe-07370dfbffb7
tmoux/prog-contests
codeforces/1554/d/d.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define sz(x) (int)(x).size() #define all(x) x.begin(), x.end() template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; } template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0...
ALGO
0.999223
4.294162
{ "github_metadata": { "branch": "master", "commit_count": 288, "repo_created_at": "2018-10-21T03:33:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96125c12...
a5a60547-5038-470f-87c3-b58a31b1659f
transfix/trans-vr
src/ContourTiler/xml/Ser_reader.cpp
#include <iostream> #include <stdexcept> #include <algorithm> #include <vector> #include <boost/tokenizer.hpp> #include <boost/foreach.hpp> #include <boost/lexical_cast.hpp> #include <ContourTiler/xml/tinyxml.h> #include <ContourTiler/xml/Ser_reader.h> using namespace std; using namespace boost; //-----------------...
TOOL
0.912968
5.881709
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2013-05-02T20:41:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d8974c0430...
c9176cf5-1c04-48e2-9236-06d31f04ce14
RashmiDR/Craftsmanship
misc/sumOfNumbersFromRootToLeaf.cpp
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int sumNumbers(TreeNode *root) { // Start typing your C/C++ solution below // DO NOT...
ALGO
0.999975
4.846969
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2013-01-30T01:27: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": "97b66b930f...
b28dfa2a-d330-467a-bb6a-1f0eba1d4890
Dragonfire3900/Multi_Dim_Analysis
OGDF_Mods/src/coin/Clp/ClpPredictorCorrector.cpp
/* $Id: ClpPredictorCorrector.cpp 1753 2011-06-19 16:27:26Z stefan $ */ // Copyright (C) 2003, International Business Machines // Corporation and others. All Rights Reserved. // This code is licensed under the terms of the Eclipse Public License (EPL). /* Implements crude primal dual predictor corrector algorithm ...
ALGO
0.999472
5.595186
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2020-11-08T01:47:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6da2cea0e81...
e545e8b6-d3cf-4c9e-9487-d87434c3e616
quanglm1998/competitive-programming
codeforces/1523/f.cpp
#include <bits/stdc++.h> using namespace std; #define int long long template <typename T> inline bool MaxTo(T &u, const T &v) { return u < v ? (u = v, true) : false; } template <typename T> inline bool MinTo(T &u, const T &v) { return u > v ? (u = v, true) : false; } const int INF = 1e18; const int N = 14; con...
ALGO
0.999872
4.341056
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-04-23T08:04:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f514743f9b...
7d676404-d8ee-4449-b61c-50841a5199b0
jer22/OI
hdu/5970/5970.cpp
#include <cstdio> #include <cstring> #include <algorithm> #include <iostream> #include <vector> #include <cmath> using namespace std; int T; long long n, m, p; long long g[705][705], c[705][705]; void fuck(int i, int j) { int tt = 0, x = i, y = j; while (y) { tt++; int t = x % y; x = y; y = t; } c[i][j] ...
ALGO
0.999911
4.365919
{ "github_metadata": { "branch": "master", "commit_count": 357, "repo_created_at": "2014-12-02T12:22: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": "d92a5d85...
089c1b15-9dd1-4ea8-974a-271c22d8d134
Yupdown/PScpp
bojc++/BOJ6832.cpp
#include <bits/stdc++.h> #define FASTIO() cin.tie(0),cout.tie(0),ios::sync_with_stdio(0) using namespace std; constexpr int NMAX = 32; constexpr int MMAX = 32; char table[NMAX][MMAX]; int memo[NMAX][MMAX]; int main() { FASTIO(); int t; cin >> t; while (t--) { memset(memo, -1, sizeof(memo)); int n, m; c...
ALGO
0.999966
4.550143
{ "github_metadata": { "branch": "main", "commit_count": 209, "repo_created_at": "2022-09-16T06:08:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00c77abcb5...
bc55eeb8-7573-4ee4-a5ec-25fb2c90df69
Pooch11/DPS915
Wordfinder.cpp
#pragma once #include "WordProcessor.h" #include <iostream> #include <string.h> #include <string> #include <stdlib.h> #include <fstream> #include <cstdlib> #define Timing 0 #if Timing #include <chrono> #include <ctime> //reportTime function made by <NAME> void reportTime(const char* msg, std::chrono::steady_clock::dura...
TOOL
0.924523
4.664525
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2017-02-25T08:37: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": "361723977e...
35c2a407-d0c5-434d-92ea-00d8950e4cb7
NVIDIAGameWorks/PhysX
physx/source/physxcooking/src/mesh/QuickSelect.h
// // 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 conditions and the following disclaimer. // * Redistributions in bin...
ALGO
0.999625
6.435275
{ "github_metadata": { "branch": "4.1", "commit_count": 12, "repo_created_at": "2018-12-05T14:30:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3397, "forks": 824, "issues": 311, "pull_requests": 18 }, "file_meta": { "content_id": "9e91d...
7c66f407-2bc2-4ae8-94e2-52540826be18
Ing-Josef-Klotzner/python
_multiples_of_3.cpp
#include <iostream> #include <string> using namespace std; template <typename T> inline void inp (T &n) { n = 0; int ch = getchar_unlocked (), sign = 1; while (ch < '0' || ch > '9') { if (ch == '-') sign = -1; // only if also negative integer ch = getchar_unlocked (); } while (c...
ALGO
0.999335
4.14252
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2019-05-28T14: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": "0d9daeece...
43da5fa1-9b64-4c6a-9f9c-2e732eb879d2
syohex/leetcode
problems/1018-binary-prefix-divisible-by-5/main.cpp
#include <cassert> #include <vector> std::vector<bool> prefixesDivBy5(const std::vector<int> &A) { std::vector<bool> ret(A.size(), false); int num = 0; for (size_t i = 0; i < A.size(); ++i) { num += A[i]; int mod = num % 5; ret[i] = mod == 0; num = mod << 1; } retur...
ALGO
0.9987
5.297448
{ "github_metadata": { "branch": "master", "commit_count": 1794, "repo_created_at": "2020-06-01T00:08:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5942b0c...
6fb7aea3-a933-4267-81fc-918b179e0639
airockchip/rknn-toolkit2
rknpu2/examples/librknn_api_android_demo/rknn_create_mem_demo.cpp
// Copyright (c) 2021 by Rockchip Electronics Co., Ltd. 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 // // Unl...
DATA
0.910892
6.164501
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2023-09-25T12:54:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1905, "forks": 211, "issues": 324, "pull_requests": 1 }, "file_meta": { "content_id": "45...
4e81684d-3cc1-41ac-ad82-3c9706e6fd8e
ssk4988/Coding
CodeForces/892div2/c.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using pi = pair<int, int>; using pl = pair<ll, ll>; using pd = pair<ld, ld>; using vi = vector<int>; using vl = vector<ll>; using vd = vector<ld>; using vpi = vector<pi>; using vpl = vector<pl>; using vpd = vector<pd>; using vv...
ALGO
0.999977
4.461824
{ "github_metadata": { "branch": "main", "commit_count": 189, "repo_created_at": "2021-11-02T23:44:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90ef8523e0...
bcb2d456-e3bc-4bfb-b9af-11e3623ff27a
abhisehekkumr/DP
subsetSum.cpp
#include<bits/stdc++.h> using namespace std; bool isSumPossible(int arr[], int n, int sum){ bool dp[n+1][sum+1]; for(int i = 0; i <= sum; i++) dp[0][i] = false; for(int i = 0; i <= n; i++) dp[i][0] = true; for(int i = 1; i<= n; i++){ for(int j = 1; j <= sum; j++){ ...
ALGO
0.999976
4.126424
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-07-20T12:53: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": "a732eb4b9b...
a88e8bdd-d643-4b3a-a89b-96c3b3dd2f90
nkeke21/Programming_Abstraction
Assignment_5/pqueue-doublylinkedlist.h
/******************************************************* * File: pqueue-doublylinkedlist.h * * A priority queue class backed by an unsorted, doubly-linked * list. */ #ifndef PQueue_DoublyLinkedList_Included #define PQueue_DoublyLinkedList_Included #include <string> using namespace std; /* A class representing a ...
ALGO
0.950468
6.345189
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-08-31T10:41:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "571cb86d5222...
e5f9523f-0ee7-44fa-8b37-76ae17ab86f3
JJJoonngg/Algorithm
백준/12865 평범한 배낭.cpp
// // Created by 김종신 on 2020/05/16. // #include <bits/stdc++.h> #define MAXI 101 using namespace std; int n, k, a, b; int arr[MAXI][100000 + 1]; struct info { int w, v; }; vector<info> v; int main() { cin.tie(NULL); cout.tie(NULL); std::ios::sync_with_stdio(false); cin >> n >> k; v.push_back(...
ALGO
0.999986
3.871852
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2019-07-09T15:05:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "098c3a14d...
0c49e0d1-b70f-4d96-83c8-567e039ad1d0
Duranta19/UIU-Helpline
questions/2 (4).cpp
#include <iostream> #include <algorithm> using namespace std; int n; int p[1001]; int r[1001]; int maximizedIncome(int n) { if (n == 0) { return 0; } int q = p[n]; for (int i = 1; i <= n/2; i++) { q = max(q, maximizedIncome(i) + maximizedIncome(n-i)); ...
ALGO
0.999565
3.927594
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2023-02-28T13:22:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bca3f0e1488...
c273b449-617a-4cc5-a21d-30cb010b0234
bjbjkidrock/LeetCode-1
Algorithms/substring-with-concatenation-of-all-words.cpp
30. Substring with Concatenation of All Words https://leetcode.com/problems/substring-with-concatenation-of-all-words/ You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in words exactly once and wi...
ALGO
0.99816
6.53676
{ "github_metadata": { "branch": "master", "commit_count": 2420, "repo_created_at": "2019-04-03T19:49:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60cfda6...
c9d4ba8d-9dc1-4878-9f9a-5895286eaee5
largusdeda/Netology
2.4/2.4.2/homework2.4.2.cpp
#include <iostream> #include <fstream> #include <new> class Address { private: std::string municipality; std::string street; int houseNumber; int flatNumber; public: Address(std::string municipality, std::string street, int houseNumber, int flatNumber) { this->municipality = municipality...
ALGO
0.989407
4.90692
{ "github_metadata": { "branch": "main", "commit_count": 165, "repo_created_at": "2024-11-21T11:55:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cee500b3d3...
4d80bab6-171e-4658-b00e-658d2512bd19
tiankonguse/leetcode-solutions
other/lcof/list/68-er-cha-shu-de-zui-jin-gong-gong-zu-xian-lcof/68-tiankonguse.cpp
#include "base.h" typedef long long ll; typedef long long LL; typedef unsigned long long ull; typedef unsigned long long ULL; typedef pair<int, int> pii; typedef pair<ll, ll> pll; // const int mod = 1e9 + 7; template <class T> using min_queue = priority_queue<T, vector<T>, greater<T>>; template <class T> using max_qu...
ALGO
0.999986
5.490985
{ "github_metadata": { "branch": "master", "commit_count": 1037, "repo_created_at": "2015-04-11T09:31:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 81, "forks": 26, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "8a7f5...
debf5d33-4131-43ae-b633-2bf17e3a3ad4
basmaashouur/competitive-programming
Solutions-library/graphs-solutions/11094-UVa.cpp
/* Name: 11094 - Continents Online Judge: UVa Tags: Flood Fill, Vectors, 2DArray Complexity: O(N + M) Tutorial: First know what is the land cell, and that would be the initial continent cell, then mark all the initial continent cells, now try to find the max connected continent cells using flood fill, be carefull you c...
ALGO
0.999948
3.809319
{ "github_metadata": { "branch": "master", "commit_count": 905, "repo_created_at": "2018-02-14T07:00:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26de08a...
704ee65b-8024-4e46-bdef-163e61eaa2bc
siconos/siconos
externals/numeric_bindings/libs/numeric/bindings/lapack/test/ublas_pptrf_pptrs.cc
// solving A * X = B // A symmetric/hermitian positive definite in packed format // factor (potrf()) and solve (potrs()) #include <cstddef> #include <iostream> #include <complex> #include <boost/numeric/bindings/lapack/computational/pptrf.hpp> #include <boost/numeric/bindings/lapack/computational/pptri.hpp> #include...
ALGO
0.999803
5.056053
{ "github_metadata": { "branch": "master", "commit_count": 9767, "repo_created_at": "2015-06-19T07:55:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 178, "forks": 32, "issues": 11, "pull_requests": 1 }, "file_meta": { "content_id": "14f8...
a80f6c3e-94ba-4bd9-810b-d978abdc53a2
ChandlerKenworthy/ChessEngine
include/Generator.hpp
/** * @file Generator.hpp * @brief Definition of the Generator class. */ #ifndef GENERATOR_HPP #define GENERATOR_HPP #include <memory> #include <vector> #include <chrono> #include <algorithm> #include "Constants.hpp" #include "Board.hpp" #include "Move.hpp" /** * @class Generator * @brief Handles generation of...
TOOL
0.96343
6.845937
{ "github_metadata": { "branch": "main", "commit_count": 308, "repo_created_at": "2023-12-04T09:11:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "a0b52f3b86...
8912d868-a3bd-486a-ac4a-318478970a47
deepakkumar1997/DSA
Structure/structAsParam.cpp
// Create a structure of student and pass it as parameter(as value, reference , address) #include<iostream> using namespace std; struct Student{ int rollNo; string name; }; // Pass by value Student changeRollNo(Student s, int roll){ s.rollNo = roll; return s; } // Pass by reference void changeName(St...
TOOL
0.911199
3.971598
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2022-07-10T10:22: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": "4a0130d60db...
38b5d021-67c0-44cf-ba82-5a50bb3126d5
pukuba/Algorithm
boj/02468/02468.cpp14.cpp
#include <bits/stdc++.h> using namespace std; int n; int in(int a,int b){ return ( 1<=a && a<=n && 1<=b && b<=n ); } int check[101][101]; int map_arr[101][101]; int dx[4]={-1,0,1,0}; int dy[4]={0,-1,0,1}; int arr[101][101]; struct point{ int y,x; }; int main(){ cin>>n; for(int i=1; i<=n; i++){ ...
ALGO
0.999912
3.766313
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-12-01T14:12:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "98727fb38...
f050ab1b-7b18-41af-900c-952b2854e3fb
yanyanlongxia/MyCode
MyProjects/C++/2020/07.13/P1006.cpp
// // Created by admin on 2020/7/14. // #include <bits/stdc++.h> using namespace std; int m,n,dp[110][60][60],a[60][60]; const int d1[2]={0,1},d2[2]={0,1}; //记录转移方式 int main() { cin>>n>>m; for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) cin>>a[i][j]; for(int i=0;i<n+m-2;i++) //枚举路径长度 ...
ALGO
0.999982
3.697387
{ "github_metadata": { "branch": "main", "commit_count": 85, "repo_created_at": "2021-01-09T04:12:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "406209b18cc...
088a0610-6783-43e6-9b45-06b9588c25d5
Tehno-R/LeetCode_problems
2/main.cpp
#include <iostream> 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* addTwoNumbers(ListNode* l1, ListNode* l2) { List...
ALGO
0.99998
6.339059
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-10-30T11:09: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": "2fbb74b067...
ae3480a3-74bb-448e-a6e9-fd6533aa21c6
psycoder69/Codechef
1200-1399 1-star Advanced Level/1398__Chef_and_Recipe.cpp
#include <bits/stdc++.h> using namespace std; const int MAX = 1e5 + 5; const int MOD = 1e9 + 7; int main() { ios_base :: sync_with_stdio (false); cin.tie (NULL); cout.tie (NULL); int t, n; cin >> t; while (t --) { cin >> n; vector <int> nums(n); for (int& num : ...
ALGO
0.999662
4.541734
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2023-05-15T10:07:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b2bce29ac...
69d0e2de-ce34-40cf-8c74-6564c2e7465b
lecky-fu/code
leetcode/532.数组中的k-diff数对.cpp
/* * @lc app=leetcode.cn id=532 lang=cpp * * [532] 数组中的K-diff数对 */ #include"utils.h" // @lc code=start struct numPair { int i; int j; numPair(int first,int second) { i = min(first,second); j = max(first,second); } bool operator< (const numPair&p) const { if(i...
ALGO
0.999868
6.192131
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-11-03T14:48: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": "4357c6571...
67350e8e-5c75-4865-9200-242883ec43b6
mdzobayer/Problem-Solving
Algorithms/Graph Algorithms/Dijkstra Algorithm.cpp
#include <bits/stdc++.h> using namespace std; struct node { node() { no = 0; weight = 0; } int no, newRoad; int weight; bool operator < (const node &n) { if (weight < n.weight) return true; else if (weight > n.weight) return false; else { if (no...
ALGO
0.998426
3.411048
{ "github_metadata": { "branch": "master", "commit_count": 987, "repo_created_at": "2019-01-14T15:44:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "92434d3b...
16ac8e90-fc4a-4b86-beff-94463d266a02
lerchunt/Studies
Etudes Informatique/IUT/Crypto/S4Crypto-feistel/feistel_BEA_MARIE.cc
#include <iostream> #include <fstream> #include <string> #include <stdlib.h> #include <time.h> using namespace std; #define MSG_SIZE 64 #define RONDE 4 void showBloc(bool * b, int size){ for (int i = 0; i < size; i++) cout << b[i]; } void copy(bool *b1, bool *b2, int size){ for (int i = 0; i < size; i++) b1[i...
ALGO
0.999882
3.805012
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-07-18T17:55:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "35f0c763c6...
0f5867d9-1356-47df-9c5e-681727b90dcc
EndoTomohiro/atcoder
90/44.cpp
#include <bits/stdc++.h> using namespace std; using ll = int64_t; using pl = pair<ll, ll>; using vl = vector<ll>; using vb = vector<bool>; using vp = vector<pl>; using vs = vector<string>; using vvl = vector<vl>; using ql = queue<ll>; const double pi = 3.14159265359; const ll INF = 1000000000000000; #define rep(i, n) f...
ALGO
0.999986
4.128155
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2021-11-10T01:22: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": "61f68ff4...
5fa8129b-b954-4c91-81bc-e73aae9bda4c
VYCode-4065/DSA-CPP-Question
BinarySearch/Intro.cpp
// In intro section we implement the binary search over the linear search for sorted array #include <iostream> #include <vector> using namespace std; // Binary Search iterative approach int binarySearch(vector<int> &arr, int k) { int right = arr.size() - 1; int left = 0; int mid = left + (right - left) / ...
ALGO
0.999985
5.70765
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-08-27T02:36:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "21bd025cab9...
a1c85230-c29a-46f1-8300-987a9d12a867
anubhavgupta1/Dynamic-Programming
LCS Problems/6 Uncrossed Lines/DP/LCS.cpp
#include<iostream> #include<cstring> using namespace std; //DP Method int lcs(int *arr1, int *arr2, int m, int n, int **ans) { for(int i = 0; i< m+1; i++) { ans[i][0] = 0; } for(int i = 0; i< n+1; i++) { ans[0][i] = 0; } for(int i = 1; i < m+1; i++) { for(int j...
ALGO
0.999965
4.810984
{ "github_metadata": { "branch": "main", "commit_count": 111, "repo_created_at": "2021-07-22T19:00: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": "c641dd0f94...
9c43e4ac-c4b3-431d-8c3a-7b2b5a1371bb
VersionMaruti/DS-ALGO
Arrays/Arraychallenge.cpp
#include<iostream> using namespace std; int main(){ int n; cin>>n; int arr[n]; for(int i=0;i<n;i++){ cin>>arr[i]; } int s; cin>>s; int i=0,j=0,st=-1,en=-1,sum=0;//-1 isliye liya gaya hain us conditon ke liye jab sum s na ho. while(j<n && sum+arr[j]<=s){//sabse pehla l...
ALGO
0.999843
3.514909
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-02-13T13:25:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "805f7ec41191...
de3cd22b-72a3-4fc0-a450-6927edbf0bfe
sripriyaagarwal16/DSA-Basic_to_hard_level
BinaryTrees/findnode.cpp
#include<iostream> #include<queue> using namespace std; template <typename T> class BinaryTreeNode{ public: T data; BinaryTreeNode<T>*left; BinaryTreeNode<T>*right; BinaryTreeNode(int data){ this->data=data; left=NULL; right=NULL; } ~BinaryTreeNode(){ delete l...
ALGO
0.999946
4.152651
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-07-28T12:28:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "069ac1d377...
6f5e7cb2-2873-4732-9c51-fb069ef9ed82
Alok214/DSA
array/maxSubArrSum.c++
// #include<iostream> // #include<bits/stdc++.h> // using namespace std; // int main(){ // // kadane's algo // int n=8; // int subar=0; // int mx=INT_MIN; // int a[n]={-3,-4,5,-1,2,-4,6,-1}; // for (int i = 0; i < n; i++){ // subar=subar+a[i]; // if(subar<0){ // subar=0; // } // mx=max(m...
ALGO
0.999915
4.755506
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2022-07-17T09:36: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": "342158a3cf...
1a2be8c1-0ec5-4929-8055-aec32e02a77b
carbotaniuman/sycl-apriltag-test
include/combinadics.h
#ifndef COMBINADICS_H #define COMBINADICS_H #include <algorithm> #include <array> #include <cstddef> // A class to implement the combinatorial number system. // https://en.wikipedia.org/wiki/Combinatorial_number_system // The template paramter T is the data type for the lookup table, // make sure N choose K fits insi...
ALGO
0.998296
6.878484
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-14T01:47:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da8b0643c6e5...
dafe6633-6d6c-4652-a30f-997f64722abb
navneet2508/leetcode-daily-challenge
simple-data-structure/arrays/mergetwosortedarrays.cpp
#include <bits/stdc++.h> using namespace std; void mergesortedarray(int arr1[], int n, int arr2[], int m, int arr3[]) { int i = 0; int j = 0; int k = 0; while (i < n && j < m) { if (arr1[i] < arr2[j]) { arr3[k] = arr1[i]; k++; i++; } ...
ALGO
0.999992
4.2101
{ "github_metadata": { "branch": "main", "commit_count": 122, "repo_created_at": "2023-02-03T18:07: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": "4382fa269e...
49225f1b-bf43-482b-965c-0d0076b3e7dd
ishabhray/Competitive-Programming
codejam/2021-1B/B.cpp
#include <bits/stdc++.h> using namespace std; #define PI 3.141592653589 #define ll long long int #define ld long double #define vi vector<int> #define vl vector<ll> #define ii pair<int,int> #define pb push_back #define mp make_pair #define ff first #define ss second #define pll pair<ll,ll> #define vv vector #define al...
ALGO
0.999867
3.59725
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2021-04-25T07:45: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": "fc3c492e824...
94bc1c66-1e38-4c24-8413-a71cd4fec1a6
Farqd/fvs-algorithms
chordal/chordal.cpp
#include "chordal/chordal.h" #include "permutation/util.h" #include "util/util.h" #include <list> #include <unordered_set> namespace chordal { ChordalGraph::ChordalGraph(Graph const& graph) : graph(graph) { n = graph.size(); perfect_elimination = FindPerfectElimination(graph); ...
ALGO
0.996092
5.074078
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2019-04-08T22:38:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5bfc67ac...
d37b6372-3937-4a2b-aa85-c0d038e0158e
marozau/cpp_craft_0314
solutions/dmitriy_senkovich/1/sources/solution_1_5/solution_1_5.cpp
#include <fstream> #include <iostream> #include <string> #include <vector> #include <queue> using namespace std; void if_land( vector<string>& a, int n, int m, queue<vector<int>>& tabl, vector<int> curr, int side ){ switch( side ){ case 0:{ if ( ( curr[0]-1 < 0 ) ) return; if ( a[curr[0]-1][curr[1]] != 'o' ...
ALGO
0.999481
4.34187
{ "github_metadata": { "branch": "master", "commit_count": 790, "repo_created_at": "2014-03-04T10:44:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 18, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "ace53e3...
0d1385a6-020d-4b95-b6c3-47f71a13a2c8
mateuszlewko/ads
v-eb.h
#pragma once #include <cmath> #include <iostream> #include <memory> #include <vector> #include "interface.h" template <typename T> class v_eb : public fast_set<T> { /// expononent of universe size const int u_exp; const int u_exp_low; const int u_exp_high; const T u; std::vector<v_eb<T>> buckets; std:...
ALGO
0.964281
5.365492
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-01-29T16:22: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": "e73f62d0d...
a4607f5f-06e7-4d42-8904-b3b64f8e77b2
momomorgentau/code
atcoder/abc/abc172/c_tsundoku.cpp
//diff 878 //abc172_C_tsundoku #include<bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;++i) using namespace std; using ll = long long; using Pii = pair<int, int>; int main() { ifstream in("input.txt"); cin.rdbuf(in.rdbuf()); int n, m, k; cin >> n >> m >> k; vector<int> a(n), b(m); rep(i, n)...
ALGO
0.999982
3.487814
{ "github_metadata": { "branch": "develop", "commit_count": 286, "repo_created_at": "2020-10-01T18:13:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "05ac703...
4ef03d5d-52c7-4ad0-aac8-5a96d3b12681
ankur-kayal/Competitive
Contests/Google/Kickstart21/RoundC/B/brute.cpp
#include <bits/stdc++.h> using namespace std; #define nl '\n' //----------------------------------- DEBUG ----------------------------------- #define sim template < class c #define ris return * this #define dor > debug & operator << #define eni(x) sim > typename \ enable_if<sizeof dud<c>(0) x 1, debug&>::type operat...
ALGO
0.997279
4.461629
{ "github_metadata": { "branch": "main", "commit_count": 84, "repo_created_at": "2020-12-29T03:32:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8bea5054bed...
79a152bb-c570-49dd-bc39-24803ff420b0
Kan19990810/Cpp
爱刷算法基础课/搜索与图论/846树的重心.cpp
#include <iostream> #include <cstring> using namespace std; const int N = 200010; int e[N], ne[N], h[N], idx; bool p[N]; int n, a, b; int res = N; void add(int a, int b) { e[idx] = b; ne[idx] = h[a]; h[a] = idx++; } int dfs(int u) { p[u] = true; int sum = 1, ans = 0; for (int i = h[u]; i != ...
ALGO
0.999228
3.485836
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2023-07-03T14:53: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": "1e349803f...
4183c6f6-9907-4cc0-9e23-11b132d15214
carlos-felipe88/voxel-Terrain
blub/core/quadVector3.hpp
#ifndef QUADVECTOR3_HPP #define QUADVECTOR3_HPP #include "blub/core/vector3.hpp" #include "blub/core/plane.hpp" #include "blub/core/vector.hpp" #include "blub/core/triangleVector3.hpp" namespace blub { struct quadVector3 { quadVector3() { ind[0] = vector3(0); ind[1] = vector3(0); ind[...
ALGO
0.920806
6.540386
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2013-11-16T14:12:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0baddf3f...
25166223-ad01-4045-a82a-7823a7e7838c
vikashkumarjha/missionpeace
lc/lc/2021_target/companies/cisco/lc_54_spiral_matrix.cpp
// given a m * n matrix return all elements if the matrix in the spiral order // #include <iostream> #include <vector> using namespace std; class Solution { public: vector<int> spiralOrder(vector<vector<int>>& matrix) { if ( matrix.size() == 0) return {}; int R = matrix.size(); int C = ...
ALGO
0.999925
5.975935
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2020-02-19T22:59: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": "3cc1deb07...
34cc4211-f6e1-4e52-a744-9610d07ed93d
OneEspylacopa/Data-Structure
QT/src/SHA512.hpp
#ifndef SHA512_HPP #define SHA512_HPP #include <string> using std::string; typedef unsigned long long ULL; typedef unsigned char UC; static const ULL Kt[80] = { 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, 0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL, 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL, 0x923f...
ALGO
0.973516
6.472859
{ "github_metadata": { "branch": "master", "commit_count": 137, "repo_created_at": "2017-03-29T09:17:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9f758e07...
010fa911-8113-4c72-a0bc-50ff0fd5c036
NaomiMH/Clases.Semestre1.FP
11ejercicios/06-OperacionesConDosNumeros.cpp
/** * <NAME> a01282098 * 4 de septiembre * 48 lineas mas 7 de comentarios. 55 en total. * 13 min. * Pide 2 numero y un caracter y hace la operacion correspondiente. */ #include<iostream> #include<iomanip> #include<cmath> using namespace std; int inum1, inum2, ires; char ccar; void CalculadoraSimple() { swi...
ALGO
0.983005
3.132082
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2016-10-08T23:49:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "ce7baa54...
014839f4-1de1-41a5-b289-b7951a76d68f
wavescholar/numerical_libraries
itpp/itpp-4.3.1/itpp/srccode/vqtrain.h
/*! * \file * \brief Definitions of a vector quantizer training functions * \author <NAME> * * ------------------------------------------------------------------------- * * Copyright (C) 1995-2010 (see AUTHORS file for a list of contributors) * * This file is part of IT++ - a C++ library of mathematical, sign...
ALGO
0.965459
6.05614
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2012-11-30T14:19:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 4, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "461e91b0...
a97f83c2-7a25-4228-8a8e-4864c6d323ff
CodeHarshh/DSA-Leetcode
0875-koko-eating-bananas/0875-koko-eating-bananas.cpp
class Solution { public: int long long totalhrsrequired(vector<int>& p, int k) { int long long total_cnt = 0; for (int i = 0; i < p.size(); i++) { total_cnt = total_cnt + p[i] / k; if (p[i] % k != 0) { total_cnt++; } } return total_...
ALGO
0.999858
5.250657
{ "github_metadata": { "branch": "main", "commit_count": 1154, "repo_created_at": "2024-06-18T19:38:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dabb85d99...
468429d8-e69b-4ad5-9a2b-2d299a240b45
nju-websoft/KeyKG
hl_code/sspexp_codes/command/ConstructionParadigms.h
#ifndef _COMMAND_CONSTRUCTION_PARADIGMS #define _COMMAND_CONSTRUCTION_PARADIGMS #include "../src/graph.h" #include "../src/ordering.h" #include "../src/construction.h" #include "../src/coverage_ordering.h" #include "../src/coverage_ordering_path.h" #include "../src/coverage_ordering_bp.h" #include "../src/coverage_ord...
ALGO
0.975119
5.44197
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-01-16T13:33:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "991d462864...
1697fc7f-65da-4d9a-9b43-95c8572caef6
Lukefrotts227/learningC
cppbasics/wrapper/vect.cpp
#include <iostream> #include <string> #include <vector> using namespace std; template <typename Data> class myVect{ private: vector<Data> mine; public: myVect(vector<Data> it) : mine(it) {} myVect() {} template <std::size_t N> myVect(const Data (&array)[N])...
TOOL
0.956713
4.432623
{ "github_metadata": { "branch": "Main", "commit_count": 321, "repo_created_at": "2023-05-19T18:11: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": "ba011e7f41...
ccff69ed-ca33-4422-a14f-39fcc409e188
jongyeon95/algorithmStudy
백준/c++ 로 풀어본 문제/14502 연구소.cpp
#include <iostream> #include <cstring> #include <queue> using namespace std; int map[8][8]; int tempMap[8][8]; int temptempMap[8][8]; int n,m; int result=0; int dx[4]={0,0,1,-1}; int dy[4]={1,-1,0,0}; void inputMap(){ cin >> n >> m; for (int i = 0; i < n; ++i) { for (int j = 0; j < m; ++j) { cin >> map[i][j]...
ALGO
0.999906
3.518715
{ "github_metadata": { "branch": "master", "commit_count": 681, "repo_created_at": "2019-03-30T15:10: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": "4f5d582b...
a1924b3d-8faf-4454-859a-bd16148f649d
OsvaldoRodriguez/Competitive_Programming
Contests/AtCoder/ABC175B.cpp
#include <bits/stdc++.h> #define FIN ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define ii pair<int,int> #define F first #define S second #define pb push_back #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() #define fore(i,a,b...
ALGO
0.999949
3.876647
{ "github_metadata": { "branch": "master", "commit_count": 1457, "repo_created_at": "2020-07-31T19:59: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": "c67e2ed...
dc82a5a0-fdb6-4a27-94fe-a61afc399ddf
marcoMiglio02/IntroPARCO-2024-H2_Marco_Miglioranza
code/H2/matrix_operation.h
#ifndef MATRIX_OPERATION_H #define MATRIX_OPERATION_H #include <vector> #include <cstddef> using namespace std; class Matrix { private: vector<double> data; size_t rows; size_t cols; public: Matrix(size_t r, size_t c) : data(r * c, 0.0), rows(r), cols(c) {} // Copy constructor Matrix(con...
ALGO
0.98013
6.792343
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2025-01-17T16:32: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": "a219abe8d53...
56e30a80-87dd-4dc4-ae17-d929ff40ae36
CompPhysics/ThesisProjects
doc/MSc/msc_students/former/ChristianF/ThesisCodes/vmc-solver/sampler.cpp
#include <iostream> #include <fstream> #include <cmath> #include <vector> #include "sampler.h" #include "system.h" #include "particle.h" #include "Hamiltonians/hamiltonian.h" #include "WaveFunctions/wavefunction.h" using namespace std; Sampler::Sampler(System* system) { m_system = system; m_stepNumber = 0; } ...
ALGO
0.994766
6.028671
{ "github_metadata": { "branch": "master", "commit_count": 213, "repo_created_at": "2015-09-23T12:38:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd504b99c...
9bb33bdc-7380-4da2-a88b-e087feaedc92
smhx/dmoj
a_classic_problem/main.cpp
#include <cstdio> #include <algorithm> #define MAXN 3000005 #define getchar() (*_pbuf ? *_pbuf++ : (_buf[fread_unlocked(_pbuf = _buf, 1, 16384, stdin)] = 0, *_pbuf++)) char _buf[16385], *_pbuf = _buf; int read() { int c, o = 0; while ((c = getchar()) < '0'); do o = o*10 + c - '0'; while ((c = getchar()...
ALGO
0.99979
3.9461
{ "github_metadata": { "branch": "master", "commit_count": 128, "repo_created_at": "2017-10-22T14:40:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "316212be...
9cb48f99-3a73-45ab-ba57-442dfcc41769
jadyntao/HuaWei_CodeCraft_2020
Second_Round/Code/test_main10.cpp
#include<bits/stdc++.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/mman.h> #include <unistd.h> #include <omp.h> #include <arm_neon.h> #include <stdarg.h> #include <stddef.h> #include <stdint.h> using namespace std; #define maxn 2000000 #define outMAXS 400000000 #define Tnum 4 pthread...
ALGO
0.998787
3.431809
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-06-06T13:28:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01211f758...
e71f7f34-3e71-4762-8b87-1ddad7435011
mive93/tkMetrics
include/tkMetrics/BoundingBox.h
#ifndef TKMETRICSBOUNDINGBOX_H #define TKMETRICSBOUNDINGBOX_H #include <iostream> #include <cmath> namespace tk {namespace metrics { class BoundingBox { float overlap(const float p1, const float l1, const float p2, const float l22) const; float boxesIntersection(const BoundingBox &b) const; float boxesUni...
ALGO
0.979076
4.617935
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2020-06-08T17:27:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2956225cc...
ccdeaffc-e18c-41ec-8f96-91751192fb84
daikidaiku/procon-archive
atcoder.jp/abc328/abc328_b/Main.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i,n) for(int i=0; i<(n); i++) #define rep2(i,x,n) for(int i=x; i<(n); i++) #define all(...) begin(__VA_ARGS__), end(__VA_ARGS__) #define rall(...) rbegin(__VA_ARGS__), rend(__VA_ARGS__) struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0...
ALGO
0.999648
4.131089
{ "github_metadata": { "branch": "main", "commit_count": 296, "repo_created_at": "2023-07-15T11:41:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db07f4a4ca...
4777227b-0e51-4421-9993-5c7d9bcac254
InteractiveComputerGraphics/TreeNSearch
TreeNSearch/source/TreeNSearch.cpp
#include "TreeNSearch.h" #include <libmorton/morton.h> #include <taskflow/taskflow.hpp> #include <taskflow/algorithm/sort.hpp> #include "internals/shuffle_lut.h" using namespace tns::internals; void tns::TreeNSearch::set_search_radius(const float search_radius) { if (this->set_radii.size() > 0) { std::cout << "...
ALGO
0.985266
3.718426
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-12-01T15:04:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 57, "forks": 10, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d395b75049...
6b93925f-9fe5-443b-9b02-dcfd0c6341e7
Mehrnoushkh/Land_filling
laplace.cpp
#include <vector> #include <cmath> const double R_E = 6371000.0; // I defined it in main code as well std::vector<std::vector<double>> Laplace( const std::vector<std::vector<double>>& f, const std::vector<std::vector<double>>& cosLat, double dlat, double dlon ) { int Nlat = f.size(); int Nlon ...
ALGO
0.99971
4.805254
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-23T18:37: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": "810512c92308...
4f3f1545-7afb-414a-96db-e7bfaaa9a43c
forgedays/PVZ-in-Qt
sunflower.cpp
// sunflower.cpp 文件,实现 Sunflower 向日葵的属性、动画、阳光生成机制等逻辑 #include "sunflower.h" // 向日葵构造函数,初始化属性和动画 Sunflower::Sunflower(QPointF point) { HP = 300; sunCounter = 0; sunCreateTime = 227; // 生命值、阳光计数器、阳光生成周期 name = "SunFlower"; // 名称 movie = new QMovie(":/graphics/Plants/" + name + "/1....
ALGO
0.965473
6.015238
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-06-30T13:53: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": "fab79d5a3111...
6b32baa2-537d-4908-ad54-daac19b08494
Danchetto/Technopark_Algorithms
module2/5_1/main.cpp
/*Дана очень длинная последовательность целых чисел длины n. * Требуется вывести в отсортированном виде её наименьшие k элементов. * Последовательность может не помещаться в память. Время работы O(n * log(k)). * Доп. память O(k). Использовать слияние. */ #include <iostream> #include <vector> #include <algorithm> ...
ALGO
0.999995
4.458916
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-01-23T16:18: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": "817635af29...
49d58606-a3dc-4db0-b53a-4015a7e741ca
Cristiana-Cocheci/FMI
First Year/sem2/Struct_date/tema3/a_lot_of_games/main.cpp
#include <iostream> #include <bits/stdc++.h> #define NMAX 26 struct Trie{ struct Nod{ bool win,lose; std::vector<Nod*> copii; Nod():win(0),lose(0),copii(NMAX,nullptr){} }; Nod *radacina; Trie():radacina(new Nod){} void insereaza(std::string cuv) { int scot=0; ...
ALGO
0.999992
3.932596
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-03-02T09:23: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": "dbe6faa10c6c...
a725ea28-4f05-471d-81a9-5686e015def2
convexwf/leetcode
.cpp/0957.prison-cells-after-n-days.cpp
/* * @lc app=leetcode id=957 lang=cpp * * [957] Prison Cells After N Days */ // @lc code=start // 1. 哈希表 // 2023-08-15 submission // 267/267 cases passed // Runtime: 3 ms, faster than 78.5% of cpp online submissions. // Memory Usage: MB, less than 68.24% of cpp online submissions. class Solution { public: vec...
ALGO
0.999998
6.191245
{ "github_metadata": { "branch": "master", "commit_count": 189, "repo_created_at": "2020-12-20T11:41: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": "424fe610...