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
91b7e168-0bc5-46e4-af17-0a15513c873b
amanjain272002/codechefcp
maxAgry.cpp
#include <iostream> #include <math.h> using namespace std; long long solve() { long long n, k; cin >> n >> k; if (n == 1) { return 0; } else if (k >= floor(n / 2)) { return (n * (n - 1) / 2); } else { long long totalsum = 0, leftsum = 0, y; // To...
ALGO
0.999979
4.660675
{ "github_metadata": { "branch": "main", "commit_count": 353, "repo_created_at": "2022-09-19T11:17: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": "a8b240c637...
e2e0acbc-63e6-4211-8e2f-b1223a5d6c65
qbolec/Simm
EvaluateMatchings.h
#ifndef EVALUATEMATCHINGS_H #define EVALUATEMATCHINGS_H #include "TextInfo.h" #include "Utilities.h" #include "Output.h" #include "Graph.h" #include "AnalyzeText.h" template <class Atom> struct MatchingEvaluator { const TextInfoBeta<Atom> &a, &b; double bestLoss; Graph bestMatching; MatchingEvaluator(...
ALGO
0.982201
4.883985
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2013-04-06T16:17:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "78bf18a7b...
f92f517d-22a1-490a-a905-39183480cc59
sharc-lab/FPGA_ECE8893
2022_Spring/Final_Projects/GNN-virtual-node/source_code/gin_goldenC/main.cc
#include <stdio.h> #include <stdlib.h> #include "dcl.h" // Global weights float gnn_node_atom_encoder_atom_embedding_list_0_weight[119][100]; float gnn_node_atom_encoder_atom_embedding_list_1_weight[4][100]; float gnn_node_atom_encoder_atom_embedding_list_2_weight[12][100]; float gnn_node_atom_encoder_atom_embedding_l...
ALGO
0.930453
3.255814
{ "github_metadata": { "branch": "main", "commit_count": 218, "repo_created_at": "2022-01-25T19:25:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 36, "forks": 37, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "52e330a5d...
0a0a2957-6f60-4d91-875e-14f2d419dcee
Basrot/OOP-L-p-Tr-nh-H-ng-i-T-ng-C-
Ktra/Ktra/Cau 5.cpp
#include <iostream> #include <string> using namespace std; class Nguoi{ protected: string ht; int ns; public: void nhap(){ cin.ignore(); cout << "Nhap ho va ten: "; getline(cin, ht); cout << "Nhap nam sinh: "; cin >> ns; } void xuat(){ cout << "Ho va ten: " << ht; cout << "\nNam sin...
ALGO
0.994584
3.903188
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-06-08T03:24:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db040489d2...
fe833416-3253-4039-b6de-7ba3cb12251c
satooooshi/kyopro
green/abc181_e.cpp
#include<bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i=a;i<b;i++) #define rrep(i,a,b) for(int i=a;i>=b;i--) #define fore(i,a) for(auto &i:a) #define all(x) (x).begin(),(x).end() //void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); } typedef long long ll; const int inf = I...
ALGO
0.999986
3.549751
{ "github_metadata": { "branch": "master", "commit_count": 189, "repo_created_at": "2021-02-22T08:08: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": "eba96452...
f69fb9d7-441d-489c-8d79-d958a4c73d7b
TheDev05/CARDIO
CPP Language/Topics/Sorting/Project12.cpp
//**C++ Program To Sort An Array Using BUBBLE SORT TECHNIQUE // #include <iostream> // void swap(int *, int *); // void Bubble_sort(int *, int); // int main() // { // int num[20], count; // std::cout << "ENTER INPUT LIMIT: " << std::endl; // std::cin >> count; // std::cout << "ENTER YOUR ELEMENTS: "...
ALGO
0.999951
5.276751
{ "github_metadata": { "branch": "master", "commit_count": 975, "repo_created_at": "2021-06-04T20:37: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": "18eb84ab...
2eabefc2-f3f7-40a1-88a6-358e5f436a68
yychuyu/LeetCode
problems/0445_Add_Two_Numbers_II/add_two_numbers_by_pingtou.cpp
#include <iostream> struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; ListNode* addTwoNumbers(ListNode *l1,ListNode *l2){ ListNode dummy(-1); int carray = 0; ListNode *pa = l1; ListNode *pb = l2; ListNode * prev = &dummy; for(;pa != nullptr || pb != nullptr; ...
ALGO
0.999964
5.50979
{ "github_metadata": { "branch": "master", "commit_count": 3338, "repo_created_at": "2018-10-03T01:26:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 94, "forks": 141, "issues": 1, "pull_requests": 7 }, "file_meta": { "content_id": "284a...
1e3276f3-6ce7-4d4d-bea6-f40797717df9
cnyali-czy/code
others/noi.ac/2021-noi-challenge/day3/A/A.cpp
/* Problem: A.cpp Time: 2021-06-26 08:17 Author: CraZYali E-Mail: <EMAIL> */ #define REP(i, s, e) for (register int i(s), end_##i(e); i <= end_##i; i++) #define DEP(i, s, e) for (register int i(s), end_##i(e); i >= end_##i; i--) #define DEBUG fprintf(stderr, "Passing [%s] in Line %d\n", __FUNCTION__, __LINE__)...
ALGO
0.999977
4.216379
{ "github_metadata": { "branch": "master", "commit_count": 1593, "repo_created_at": "2018-02-24T06:16: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": "b3e65d4...
bf2165ca-12fd-4d75-a17a-05f7cedd3df1
Kop1M/MyLeetcode
72. Edit Distance.cpp
/* The shortest edit distance. editDistance[i][j] means the shortest distance between word1[i-1] to word2[j-1]( subscript is from 1) so equation of state : editDistance[i][0]=i; editDistance[0][j]=j; editDistance[i][j]=editDistance[i-1][j-1] (if word1[i-1]==word2[j-1]) editDistance[i][j]=min(editDistance[i][j-1...
ALGO
0.999851
4.626679
{ "github_metadata": { "branch": "leetcode", "commit_count": 21, "repo_created_at": "2016-10-31T07:14: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": "4adb680...
2ce708d6-33d0-47d6-8eda-ae491b223981
Kawser-nerd/CLCDSA
Source Codes/AtCoder/agc006/C/957721.cpp
#include <vector> #include <iostream> #include <unordered_map> #include <map> #include <iomanip> #include <functional> #include <algorithm> #include <cassert> #include <cmath> #include <string> #include <sstream> #include <queue> using namespace std; #define x first #define y second #define ll long long #define ld lon...
ALGO
0.999936
3.559985
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-09-30T05:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "f52d3f5b...
bc8e32ff-ca2f-4abd-8cd1-49310feeb752
harshagrwl/Competitive-Programming
Codeforces/candiesdivision.cpp
/* **********@harsh_agr********** */ #include<bits/stdc++.h> typedef unsigned long long ull; typedef long long ll; typedef long l; #define pii pair<int,int> #define pli pair<long,int> #define pil pair<int,long> #define pll pair<long,long> #define vi vector<int> #define vll vector<ll> #define vul vector<ull> #defi...
ALGO
0.999954
3.442939
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-01-20T19:19:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c9a068a91...
342b6211-186b-4d1d-879a-9c03aef827e8
SeisComP3/seiscomp3
src/trunk/libs/seiscomp3/math/filter_instantiation.cpp
/*************************************************************************** * Copyright (C) by <NAME> * * * * You can redistribute and/or modify this program under the * * terms of the...
ALGO
0.983444
4.299522
{ "github_metadata": { "branch": "master", "commit_count": 1963, "repo_created_at": "2014-09-19T08:37:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 112, "forks": 90, "issues": 19, "pull_requests": 3 }, "file_meta": { "content_id": "d626...
0665f2bc-5027-4cd0-ba08-cfeb7b49c1e6
kubonits/atcoder
kigyou/diverta/2019-2/d/main.cpp
#include <algorithm> #include <cstdio> using namespace std; typedef long long ll; ll dp[25000000]; int main() { ll n, g[2], s[2], b[2], ans = 0LL, a = 0LL; scanf("%lld", &n); for (int i = 0; i < 2; i++) { scanf("%lld%lld%lld", &g[i], &s[i], &b[i]); } for (int i = 0; i <= n; i++) { a = max(a, dp[i]);...
ALGO
0.999378
3.444691
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2018-12-07T13:30: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": "b7df92d69...
fd9031a7-1212-47de-aeac-ed7ddd30ab11
razaulazam/MLCpp
mean_shift/mean_shift.cpp
#include <vector> #include <iostream> #include <opencv2> #include <opencv2\highgui\highgui.hpp> #include <opencv2\imgproc\imgproc.hpp> using namespace cv; using namespace std; void meanShift(Mat matrix, Mat current) { double lambda = 0.3; int maxIter = 1; double tolerance = 0.001; int rows_mat = matri...
ALGO
0.991242
4.188062
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2020-09-13T22:17: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": "ac3d0990b...
ce6b2dee-2378-40cd-bec4-23bf4d55c3f9
that2sne/Ros2_Match
matcher/src/radar_matching.cpp
#include "matcher/matching.hpp" #include "matcher/parameter/match_param_interface.hpp" using ebase::fusion::matcher::IMatch; using ebase::fusion::matcher::Matching; using ebase::fusion::matcher::RadarData; using ebase::fusion::matcher::RadarInfo; using ebase::fusion::matcher::RadarMatching; RadarMatching::RadarMatchi...
ALGO
0.993741
6.010927
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-10-20T09:09: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": "013122d8342d...
8f1d4fc5-230b-4ee0-ad67-e85e6c848cd5
ishandutta2007/codeforces-s
sfiction/normal/889/B.cpp
#include <bits/stdc++.h> #define st first #define nd second #define all(x) (x).begin(), (x).end() using namespace std; using namespace placeholders; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<ll, ll> pll; template <class T> void mini(T &l, T r){l = min(l, r);} tem...
ALGO
0.999988
3.740823
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07: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": "ccbd3f2c44f4...
6dfe47c8-ab49-46d5-b631-0b7e0e1f7760
priyanshu28012002/Cp-with-Priyanshu
Algorithms/SegmentTree/NodeWithExtraInfo.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int #define ll long long #define rep(i, x, n) for (int i = x; i < n; i++) #define in(x) int x; cin >> x #define inputArr(arr,n) int arr[n]; rep(i,0,n) cin >> arr[i] #define inputVec(v,n) vector<int> v; rep(i,0,n) {int vectorValueforInput; cin >> vect...
ALGO
0.999663
4.346447
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-02-28T21:19: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": "8f2f0645962c...
bf48f586-8604-4e49-91a9-0366ba30d5c5
PirSeY/my-study-projects
Algorithm and data structures/RGR/graph_forms.h
#ifndef GRAPH_FORMS_H #define GRAPH_FORMS_H /** *Классы хранения рёбер графа: *абстрактный класс структуры *структура графа на матрице *структура графа на списке */ #include <vector> #include <list> using namespace std; template <class EdgeT> class GraphForm { public: //Вставка и удаление вершин и рёбер ...
ALGO
0.900647
4.258055
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-05-15T18:01: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": "4cb28248f04e...
24425772-e9e0-468e-a506-e5318f3b3f4a
SkyLoaderr/xray-engine-repo
xrLC/PMesh/bunnygut.cpp
/* * Polygon Reduction Demo by <NAME> (c) 1998 * Permission to use any of this code wherever you want is granted.. * Although, please do acknowledge authorship if appropriate. * * This module initializes the bunny model data and calls * the polygon reduction routine. At each frame the RenderModel() * rou...
ALGO
0.954269
4.720083
{ "github_metadata": { "branch": "master", "commit_count": 83977, "repo_created_at": "2021-04-21T18:03:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5b6...
101c0151-b8b8-4e7c-9d81-f1bece2ba7b8
jzhangtx/InvertBinaryTree
InvertBinaryTree/InvertBinaryTree.cpp
// InvertBinaryTree.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <queue> #include <vector> class Node { public: Node* left; Node* right; int data; Node(int d) : data(d) , left(nullptr) , right(nullptr) ...
ALGO
0.999982
5.703572
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-12-06T20:10: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": "4cd039e1af...
406f1b3a-8e91-47cc-a0e9-6e1aea8fa0a6
poon-zx/kattis
solutions/redrover.cpp
#include <algorithm> #include <array> #include <bitset> #include <climits> #include <cmath> #include <cstddef> #include <cstdint> #include <cstdio> #include <cstdlib> #include <deque> #include <functional> #include <ios> #include <iomanip> #include <iostream> #include <istream> #include <iterator> #include <map> #inclu...
ALGO
0.999967
4.134848
{ "github_metadata": { "branch": "main", "commit_count": 289, "repo_created_at": "2025-02-03T16:25:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "44d13c5b9a...
7afd64cf-d9fa-44f8-9223-1d0a2789143a
satake0916/AtCoder
lib/modinv.cpp
#include <iostream> using namespace std; // mod. m での a の逆元 a^{-1} を計算する long long modinv(long long a, long long m) { long long b = m, u = 1, v = 0; while (b) { long long t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } u %= m; if (u < 0) u += m; return u; } ...
ALGO
0.999757
4.816931
{ "github_metadata": { "branch": "master", "commit_count": 429, "repo_created_at": "2019-04-14T12: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": "1905e3c1...
ea124163-3cdd-4fb8-88a6-50f5cbd1589e
rstolys/adventOfCode
2021/Day6/solution.cpp
/*----------------------------------------------------------------------------- * solution.cpp * * 05 Dec 2021 <NAME> * * ----------------------------------------------------------------------------*/ /***INCLUDES******************************************************************/ #include <iostream> #include <ve...
ALGO
0.999468
5.264652
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2021-12-01T02:08:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1be3c2919a4...
4f4f20a5-aeb7-4ea2-9293-8f11f1e4b469
coudr3c/ACM-problems
rcoudert-TD3/10616-rcoudert.cpp
#include <iostream> using namespace std; #define MAX_D 20 int mod(int a, int p) { if(a >= 0) { return (a % p); } while(a < 0) { a += p; } return a; } int main() { int N, Q; int set(1); while(cin >> N >> Q && (N != 0 && Q != 0)) { cout << "SET " << set << ":" << endl; //get...
ALGO
0.998591
3.530588
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-01-31T11:46:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "85bfa0374...
829d2c19-d92a-46ed-9a06-6e953d8ae8bc
th0usandTW/LeetcodePractice
143/stack.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: void reorderList(List...
ALGO
0.999983
6.02303
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2020-12-10T15:10:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4f596574d...
97a0a38c-9f8a-471b-9a3b-b94e0b30af6b
amanaligit/competitive-coding
codeforces_problems/A_Phoenix_and_Gold.cpp
#include <bits/stdc++.h> #include <unordered_set> using namespace std; #define gc getchar_unlocked #define fo(i, n) for (i = 0; i < n; i++) #define Fo(i, k, n) for (i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1) #define ll long long #define F first #define S second #define deb(x) cout << #x << "=" << x << endl ...
ALGO
0.999959
4.031549
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2021-04-18T18:48:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33521891e64...
121607bc-3545-4329-8164-e54f378ce459
vsharkovski/Competitive-Programming
Programs/Mendo/Strelki.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<ld, ld> pd; typedef vector<int> vi; typedef vector<ll> vl...
ALGO
0.999383
4.268878
{ "github_metadata": { "branch": "master", "commit_count": 2053, "repo_created_at": "2018-04-09T16:32:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7912ace...
655764ec-020d-431d-b537-f134ec71a59c
IvanVinx/3221311416-
C.35.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #define GF G->adjlist[i].firstarc #define INFINITY 32767 // 值∞这里是当作int型为2字节 const int max=8; // 最大顶点个数 typedef struct { int arcs[max][max]; // 邻接矩阵数组 int n,e; // 图的当前顶点数和弧数 } MGraph; void CreateMat(MGraph &g, int A[][max], int n, int e){ //创建...
ALGO
0.999668
3.281265
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-05T05:20: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": "8acb1a145819...
bc69ced6-412f-432e-a9d0-1d12ec3f2ce1
Rupeshkumar4/CPP_DSA
TCS/Circle.cpp
#include <iostream> #include <vector> #include <cmath> #include <sstream> #include <string> using namespace std; vector<string> circles(vector<string>& info) { vector<string> result; for (const string& i : info) { // Parse the descriptors for circle A and circle B int xA, yA, rA, xB, yB, rB; ...
ALGO
0.999712
5.741709
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2023-10-06T09:51: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": "5470cd5f5...
e9ed37f1-ca24-4089-8e42-8bf291fb9ed6
William-Seven/Collected-study-materials-from-BUPT
程序设计竞赛基础/期末大作业/Wooden Spoon.cpp
#include<bits/stdc++.h> #define mod 998244353 using namespace std; const int N = 1 << 21; int n, dp[25][N], fac[N]; int main() { ios::sync_with_stdio(false); cin >> n; fac[0] = 1; for (int i = 1; i <= (1 << n); i++) fac[i] = 1ll * fac[i - 1] * i% mod; dp[0][0] = 1; for(int i = 0; i <= n; i++) for (int j = (1 ...
ALGO
0.999949
4.538967
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2023-10-23T13:30:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 57, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "83cf0eb5c7...
369d5212-cfc7-4cdf-8ede-6c9c346009a0
Durgesh4993/LeatCodeSolutionInCpp
Number of Closed Islands.cpp
class Solution { public: int closedIsland(vector<vector<int>>& grid) { int rows = grid.size(), cols = grid[0].size(), count = 0; function<bool(int, int)> dfs = [&](int i, int j) { if (i < 0 || j < 0 || i >= rows || j >= cols) { return false; } ...
ALGO
0.999819
6.487527
{ "github_metadata": { "branch": "main", "commit_count": 784, "repo_created_at": "2022-10-20T00:23:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3825a37675...
fce915a3-3417-4129-ae0c-d84a9e46ca2b
GyuhoLee/PS
BOJ/02000/2458_키순서.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define FUP(i, a, b) for(int i = a; i <= b; i++) #define FDOWN(i, a, b) for(int i = a; i >= b; i--) #define MS(a, b) memset(a, b, sizeof(a)) #define ALL(v) v.begin(), v.end() #define CIN(a) cin >> a; #define CIN2(a, b) cin >> a >> b #define CIN3(a, ...
ALGO
0.999913
3.658085
{ "github_metadata": { "branch": "master", "commit_count": 700, "repo_created_at": "2019-05-26T15:16:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6586961d...
0750b224-6d1e-407f-950e-eacd2b1e9378
EveSunMaple/Code
luogu/ZSTU-Day3/D.cpp
#include <algorithm> #include <iostream> #include <cstring> #include <cstdio> #include <vector> #include <tuple> #define N 100005 using namespace std; struct Node { int len; vector<int> num; Node() { len = 0; num.clear(); } Node(int a, vector<int> b) { len = a, num = b; } }; int tot = -1; bool c...
ALGO
0.999996
3.701885
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2023-07-31T10:59: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": "eb5a3592c...
de0365db-fa25-4ffd-8582-d301ecb111b6
EduardV777/Softuni-Exercises
C++/Advanced/Exam Tasks/Odd sum.cpp
#include <iostream> #include <string> #include <queue> using namespace std; void ShowArr(int** arr2D, int s) { for (int k = 0; k < s; k++) { for (int j = 0; j < s; j++) { cout << arr2D[k][j] << " "; } cout << endl; } } int returnOddSum(int** arr2D, int s, int& sumVar) { int j2 = s - 1; for (int k = 0; k...
ALGO
0.999934
4.114465
{ "github_metadata": { "branch": "main", "commit_count": 646, "repo_created_at": "2021-10-06T20:26: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": "257c621675...
9f250d82-238a-4d7e-ba62-661b86defe55
ishandutta2007/codeforces-s
shadowlight/normal/1728/E.cpp
#include <bits/stdc++.h> #define ll long long #define db long double #define ull unsigned long long #define x first #define y second #define mp make_pair #define pb push_back #define all(a) a.begin(), a.end() using namespace std; #define pper(a) cerr << #a << " = " << a << endl; void per() { cerr << endl; } template...
ALGO
0.999843
3.963175
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07: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": "70ef132d9761...
b3b50361-319b-498a-a5a6-63a2d438f00f
skourta/tiramisu_evaluation_scripts
wrappers/function_gemm_MINI_wrapper.cpp
#include "Halide.h" #include "function_gemm_MINI_wrapper.h" #include "tiramisu/utils.h" #include <iostream> #include <time.h> #include <fstream> #include <chrono> #include <omp.h> int omp_do_par_for(void *user_context, int (*f)(void *, int, uint8_t *), int min, int extent, uint8_t *state) { int exit_status = 0; ...
ALGO
0.989106
5.563438
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-05-07T08:19: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": "193929c0d9f6...
93fdb48d-a49b-4e85-aba1-e0af6e16f526
SarojKumarRanjan/DSA-with-cpp
05Sorting/Quick.cpp
#include<bits/stdc++.h> using namespace std; // difination of middle function int middle(vector<int> &arr,int low, int high){ int pivot = arr[low]; int left = low +1; int right = high; while(left<=right){ // here changing the code from arr[left] <= pivot for reverse sorting; while(arr[left] >= pivot && lef...
ALGO
0.999998
5.872754
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-08-22T08:31: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": "944a400cf408...
cd09600f-4d87-492d-a8e8-5cf19d809445
TheBadZhang/OJ
nowcoder/usx/03/小咪买东西.cc
#include <iostream> #include <cmath> #include <cstdio> #include <vector> #include <algorithm> using namespace std; using ll = long long; struct SB { int c, v; double rate; SB () { scanf ("%d %d", &c, &v); rate = (double)v/c; } }; int main () { int t; cin >> t; while(t--) { int n, k; cin >>...
ALGO
0.999269
3.526592
{ "github_metadata": { "branch": "master", "commit_count": 103, "repo_created_at": "2017-10-05T15:55:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "f4b98ec8...
c18b64ff-f1c6-42e8-9704-3736d3b9cf48
Sabuj-Kumar/MyCodes
Graph/Starting Of The Graph/Graph Adjecency Matrix.cpp
/** **UNIVERSITY OF ASIA PACIFIC** *<NAME>* Adjacency Matrix Graph **/ #include<bits/stdc++.h> using namespace std; int main() { int node,edge; freopen("input.txt","r",stdin); cout << "enter the node number :\n"; cin >> node; cout << "enter the edge number :\n"; cin >>...
ALGO
0.999555
3.526934
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-07-13T16:40:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0588b2b0a49f...
8d7ea37f-1b14-4540-8967-1eb514579826
ishandutta2007/codeforces-a
avinashkartik/normal/1615/C.cpp
#include<bits/stdc++.h> using namespace std; #define GODSPEED ios:: sync_with_stdio(0);cin.tie(0);cout.tie(0);cout<<fixed;cout<<setprecision(15); #define f first #define s second #define newl cout<<"\n"; #define pb push_back #define mset(a,x) memset(a,x...
ALGO
0.999969
4.067681
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1543307fefbf...
6434d4da-1c15-4bfe-a901-b3e85b001c0b
honyacho/atcoder_excercise
abc157/d.cpp
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) #define RNG(i,from,to) for(int i=(from); i<(int)(to); i++) #define gcd(i,j) __gcd((i), (j)) typedef long long ll; typedef pair<int, int> pii; typedef vector<ll> vecll; template<typename S, typename T> string to_string(pair<S, T...
ALGO
0.997753
3.124782
{ "github_metadata": { "branch": "master", "commit_count": 160, "repo_created_at": "2019-03-05T10:53: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": "6153f327...
fe530530-ec67-4837-af70-701ff5197272
OKullmann/oklibrary
Experimentation/Investigations/RamseyTheory/SchurProblems/plans/Schur6/general.hpp
// <NAME>, 18.7.2012 (Swansea) /* Copyright 2012 <NAME> This file is part of the OKlibrary. OKlibrary is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation and included in this library; either version 3 of the License, o...
ALGO
0.996435
4.276954
{ "github_metadata": { "branch": "master", "commit_count": 24909, "repo_created_at": "2008-07-30T18:20:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 32, "forks": 18, "issues": 0, "pull_requests": 6 }, "file_meta": { "content_id": "004f...
e033c4e2-5580-4a8f-a3cf-dcecf27a8af9
MasterCodeMFE/CPP
CPP_Module_08/ex01/Span.cpp
# include "Span.hpp" Span::Span(unsigned int N): Max(N) { } Span::~Span() { } Span::Span(const Span& other): numbers(other.numbers), Max(other.Max) { } Span& Span::operator=(const Span& other) { if (this != &other) { this->numbers = other.numbers; this->Max = other.Max; } return *th...
ALGO
0.998843
4.552975
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2024-10-17T15:32:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "10af0faae42...
90dd674d-cb41-4d24-bda8-921b87fa12aa
sgchoi5/algorithm_cp3
uva_10130_SuperSale.cpp
#include <cstdio> int dp[1001][31]; int P[1001]; int W[1001]; int MW[101]; int N; int max(int a, int b) { return a > b ? a : b; } int shopping(int item, int remained) { if (item > N || remained == 0) { return 0; } int& ret = dp[item][remained]; if (ret != -1) return ret; if (W[item] > remained) { ret...
ALGO
0.999923
3.370155
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2017-07-10T13:47: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": "acfddba46...
d2e2076c-f3d7-462e-bdbe-7238a4820ddd
Nanashima21/contestSub
atcoder.jp/abc307/abc307_c/Main.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<(n); i++) #define INF ((1LL<<62)-(1LL<<31)) #define all(a) (a).begin(),(a).end() #define rall(a) (a).rbegin(),(a).rend() typedef long long ll; typedef pair<ll,ll> pl; int main() { int ha,wa; cin >> ha >> wa; vector<string> a(ha);...
ALGO
0.999931
3.663223
{ "github_metadata": { "branch": "main", "commit_count": 822, "repo_created_at": "2023-07-17T15:14: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": "44891d4c4d...
9fc7e4cf-e5e3-422a-bc92-317ec8cf8399
kliment-olechnovic/voronota
expansion_js/src/dependencies/faspr/RotamerBuilder.h
/******************************************************************************************************************************* This file is a part of the protein side-chain packing software FASPR Copyright (c) 2020 <NAME> (<EMAIL>, <EMAIL>) Permission is hereby granted, free of charge, to any person obtaining a cop...
TOOL
0.973554
4.347799
{ "github_metadata": { "branch": "master", "commit_count": 4420, "repo_created_at": "2019-08-22T12:20:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 35, "forks": 6, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "a1f6e8...
d3c82c98-18f4-4f13-b583-1cbf24ce3f91
Hoff22/CompetitiveProgramming
cf/CF987/C.cpp
#include <bits/stdc++.h> #define N 200000 #define MOD 1000000007 #define INF 0x3f3f3f3f #define INFll 0x3f3f3f3f3f3f3f3fll #define se second #define fi first typedef long long ll; typedef unsigned long long ull; using namespace std; void solve(){ int n; cin >> n; if(n%2 and n <= 25){ cout << -1 << endl; ret...
ALGO
0.999569
4.137717
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2024-10-24T23:39: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": "7e7dd697afe...
de5f51e2-3b1c-4be0-8fe8-e1552058e917
Nitin408/Algozenith
0-1bfs.cpp
//One Day You will be Thankful for Yourself for Never Giving Up #include<iostream> #include<bits/stdc++.h> using namespace std; #define int long long int #define LD long double #define vi vector<int> #define pi pair<int,int> #define all(c) c.begin(),c.end() #define pb push_back #define eb emplace_back #define ff fir...
ALGO
0.999775
4.062095
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-06-21T07:21: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": "5ba149e62aaf...
07e3fbd8-5664-4dbc-9171-1d79cee87285
TommyNguyen12-Vie/Ctdl-gt1
on tap thi gk/QlSinhVien_ThayThanh.cpp
// Mỗi nhân viên có thông tin họ tên , mức lương, chức vụ, quê quán,. // Sử dụng dslk quản lí nhân viên của công ty. // - Đọc danh sách nhân viên tù tập tin và thêm vào danh sách liên kết // - Tìm kiếm nhân viên theo họ tên hoặc khoảng lương // -Sắp xếp danh sách nhân viên giảm dần theo lương. // -Sắp xếp nhân viên gi...
TOOL
0.98869
4.105574
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-09-10T16:23: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": "69842a4110a4...
f1d38a3b-6f33-482c-ae2c-80c5603b5782
loyinglin/Codeforces
699/C/Codeforces/main.cpp
// // main.cpp // Codeforces // // Created by loying on 16/7/27. // Copyright © 2016年 loying. All rights reserved. /************************** 题解 ********************** 题目链接:http://codeforces.com/contest/699/problem/C 题目大意:n天,每天有四种可能,如下。问最少能休息几天。 1、on this day the gym is closed and the contest is not carried o...
ALGO
0.999967
3.571939
{ "github_metadata": { "branch": "master", "commit_count": 362, "repo_created_at": "2016-07-27T01:47:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 73, "forks": 24, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f4f5d...
fe768780-7412-48dc-8833-7e9f74728af2
Kimighwan/BarkingDog_BOJ
바킹독의 실전 알고리즘 문제집 풀이/2573BOJ_빙산_미해결(시간초과).cpp
#include <iostream> #include <queue> using namespace std; int n, m, year = 0; int map[301][301]; int visit[301][301]; int tmp[301][301]; int dx[4] = { 0, 0, 1, -1 }; int dy[4] = { 1, -1, 0, 0 }; bool Check(int i, int j) { return (i >= 0 && j >= 0 && i < n && j < m); } void Init() { for (int i = 0; i < n; i++) fil...
ALGO
0.999938
4.018656
{ "github_metadata": { "branch": "main", "commit_count": 141, "repo_created_at": "2024-06-04T06:41: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": "dc87f0309f...
6fe4e15c-950a-4de5-93e4-b5e99223d503
mxcai/bivas
src/RcppExports.cpp
// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: <PASSWORD> #include <RcppArmadillo.h> #include <Rcpp.h> using namespace Rcpp; // outerloop_thread RcppExport SEXP outerloop_thread(arma::mat& X, arma::vec& y, arma::mat& Z, const arma::vec& group, const arma::vec& glevel, cons...
ALGO
0.990253
3.863352
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2017-10-03T14:06:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ea618fc1...
d18a9861-e4ea-4dd4-a473-48827835997a
dkoh0207/signal_processing
sigproc_tools/MiscUtils.h
/** * \file MiscUtils.h * * \ingroup sigproc_tools * * \brief Class def header for a class MiscUtils * * @author koh0207 */ /** \addtogroup sigproc_tools @{*/ #ifndef __SIGPROC_TOOLS_MISCUTILS_H__ #define __SIGPROC_TOOLS_MISCUTILS_H__ #include <vector> #include <algorithm> #include <iterator> #include <...
TOOL
0.990032
7.002253
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2019-11-06T00:08:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3faaf34b9...
c6483871-fb81-4db9-bf18-00a9195e57ac
WajahatAkhtar/Project-S.E
Source-code-3D-Scanner/Individual-Operation-Source-Code/3D-Reconstruction/3d_test/main.cpp
#include <QCoreApplication> #include <pcl/visualization/pcl_visualizer.h> #include <Windows.h> #include <pcl/io/pcd_io.h> #include <pcl/io/ply_io.h> #include <pcl/io/vtk_io.h> #include <pcl/point_types.h> #include <pcl/kdtree/kdtree.h> #include <pcl/search/kdtree.h> #include <iostream> #include <pcl/features/normal_3d....
ALGO
0.924275
5.09586
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2016-11-11T15:15:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d1d69154...
c0844170-4934-4cb2-b8c9-d2c0f2551c0e
YangboLong/image-stitcher
src/eight_point.cpp
/// Copyright (C) /// /// This program is free software; you can redistribute it and/or /// modify it under the terms of the GNU General Public License /// as published by the Free Software Foundation; either version 2 /// of the License, or (at your option) any later version. /// /// This program is distributed in the...
ALGO
0.994044
6.213555
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2017-07-19T01:01:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "faa2c08e7...
de62b0a7-9767-4ede-86d9-39578c831781
Adcode1/adicode-dsa
Csesquestions/sorting/collect2.cpp
#include <bits/stdc++.h> typedef long long ll; typedef long double ld; #define pf push_front #define pb push_back #define F first #define S second #define loop(i, m, n) for (int i = m; i < n; i++) #define arep(i, v) for (auto i : v) #define all(x) (x).begin(), (x).end() using namespace std; #include<ext/pb_ds/assoc_co...
ALGO
0.999978
3.905002
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2023-09-20T10:59: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": "7133df32c4d...
c369d24d-86fe-40e9-bc99-6e5522d8c647
code-dev05/Competive-Programming
cses/grid_paths.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int ll solve(ll n, vector<string>& grid) { vector<vector<ll>> dp(n, vector<ll>(n, 0)); dp[0][0] = 1; ll mod = 1e9 + 7; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (grid[i][j] == '*') dp[i][j] = 0...
ALGO
0.999989
5.008044
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-10-20T08:14: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": "2ef025f562fc...
e0c59278-ec1c-442c-9ed8-99c34259c2c1
tangziyi001/competitive-programming
SegmentTree/BalancedLineup.cpp
/* * USACO 2007 January Silver * Coded by <NAME> * Min & Max Segment Trees */ //#include <bits/stdc++.h> #include <iostream> #include <cstdio> #include <string> #include <cstring> #include <cstdlib> #include <sstream> #include <cmath> #include <algorithm> #include <list> #include <vector> #include <set> #include <...
ALGO
0.999992
3.91602
{ "github_metadata": { "branch": "master", "commit_count": 220, "repo_created_at": "2015-09-15T13:45:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2599184...
6bc6a3b6-e12b-4e5e-b10c-aefcc8f36fc8
denis-anuprienko/TwoPhaseFlow
main.cpp
#include <cstdio> #include "header.h" //#define V_ID(x, y, z) static_cast<unsigned long long>(((x-0)*(Ny+1)*(Nz+1) + (y-0)*(Nz+1) + (z-0))) #define V_ID(x, y, z) ((x-localstart[0])*(localsize[1]+1)*(localsize[2]+1) + (y-localstart[1])*(localsize[2]+1) + (z-localstart[2])) #define Rsample 0.0125 #define Lsample 0.01 ...
ALGO
0.980717
3.92428
{ "github_metadata": { "branch": "master", "commit_count": 123, "repo_created_at": "2020-12-08T10: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": "5d451b29...
d31f6d81-8b9e-48b9-90ff-da5f526246ae
ishine/eigen
src/deeplearning/bert.h
#pragma once #include "../std/utility.h" #include<vector> using std::vector; #include "keras.h" struct FeedForward { /** * */ Matrix W1, W2; Vector b1, b2; Activation activation = { Activator::relu }; Vector& operator()(const Vector &x, Vector &ret); Vector operator()(const Vector &x); Matrix& operator()...
TOOL
0.929188
6.176811
{ "github_metadata": { "branch": "master", "commit_count": 182, "repo_created_at": "2019-12-26T14:37:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "43b7237f...
35ce3ec8-6102-4ea4-9a5a-6eba53a0b621
catwor/prackic_2023
AVL_tree.cpp
#include "AVL_tree.h" AVLNode* AVLTree::copy(const AVLNode* node) { AVLNode* n = nullptr; if (node) { n = new AVLNode(node->surname, node->average_mark); n->right = copy(node->right); n->left = copy(node->left); } return n; } int AVLTree::add(AVLNode*& node, Student& stud) { int height = 0; if (node) {...
ALGO
0.99608
4.00994
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2023-07-13T13:40:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "888729ebc60...
0c0d83ee-b84d-4b68-ba44-534958c0d297
google/skia
src/pathops/SkIntersectionHelper.h
/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkIntersectionHelper_DEFINED #define SkIntersectionHelper_DEFINED #include "include/core/SkPath.h" #include "src/pathops/SkOpContour.h" #include "src/pathops/SkOpSegme...
TOOL
0.992425
6.203335
{ "github_metadata": { "branch": "main", "commit_count": 75918, "repo_created_at": "2014-01-09T17:09:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9958, "forks": 1593, "issues": 0, "pull_requests": 39 }, "file_meta": { "content_id": "0e...
91c1c3b6-7fe0-474b-9d0e-0a5c35bfe38c
fvannee/competitive-coding
UvA/U297.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <fstream> #include <iomanip> #include <cstdio> #include <...
ALGO
0.997623
4.198718
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-05-10T18:00: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": "7feb2e3985...
0cf5807b-4ec6-4728-a6b8-561db45fb9dd
duong2803/DSA-code.ptit-Full362
Duyệt đồ thị/DSA09032 - -KẾT BẠN.cpp
// created: 2023-05-26 23:34:16 // author: <NAME> #include<bits/stdc++.h> using namespace std; typedef long long ll; const int mxN = 100001; vector<int> adj[mxN]; int V, E; bool flag; bool visited[mxN]; int sz[mxN]; int par[mxN]; void make_set(){ for(int i = 1; i <= V; ++i){ sz[i] = 1; par[i] = i; } } int F...
ALGO
0.999925
5.50129
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2023-05-26T11:49:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d1fc97320...
f34a6945-cfc0-4a16-a57e-375a0972101b
NietzscheMYB/C-C-_memory
数据结构/二叉堆练习1/二叉堆练习1/Main.cpp
#include<iostream> #include<cstdio> using namespace std; void AdjustDown(int arr[], int size, int root) { //判断root是否是叶子节点 //因为堆是完全二叉树,所以没有左孩子一定没有右孩子 //又因为堆是顺序存储的 //所以,找到左孩子的下标,如果左孩子的下标越界了,则没有左孩子 int left = 2 * root + 1; int right = 2 * root + 2; if (left >= size) { //root此时是叶子节点 return; } //这里一定有左孩子,判断是否...
ALGO
0.999949
4.292974
{ "github_metadata": { "branch": "master", "commit_count": 434, "repo_created_at": "2018-03-27T11:48:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "67a20dd1...
e101c6f8-c1da-4a03-b825-097b0a2579ca
vidush11/Algorithms_In_CPP
avl_tree/main.cpp
// // main.cpp // avl_tree // // Created by <NAME> on 01/06/24. // #include <iostream> #include <cstdio> #include <fstream> #include <time.h> using namespace std; enum class CRT{ before, after, match, }; void print_CRT(CRT crt){ switch (crt){ case (CRT::before):{ cout<<"before...
ALGO
0.999739
4.596845
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2024-04-27T07:23:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3e9d7422c84...
511f5f24-0bcf-46d6-8a6b-d6f6416c68cd
IHR57/Competitive-Programming
LightOJ/1164 (Horrible Queries)-1.cpp
#include <iostream> #include <cstdio> #include <string.h> #include <algorithm> #include <vector> #define MAX 100005 using namespace std; typedef long long int lint; lint tree[3*MAX], lazy[3*MAX]; void update(int nodeNo, int low, int high, int x, int y, int value) { if(x <= low && y >= high){ //if the node i...
ALGO
0.999525
3.895737
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2018-12-28T07:37:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe9df639a...
18a0e57f-b411-478b-884a-2e3a31de75e6
Kumar-Madhurendra/TUF
mostFrequentElement.cpp
#include <iostream> #include <vector> #include <algorithm> // for max and min functions using namespace std; class Solution { public: int mostFrequentElement(vector<int>& nums) { int high = 0; int maxElement = 0; vector<int> hash(10000, 0); // A hash array to store the frequency of numbe...
ALGO
0.999971
7.271094
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2025-01-19T13:40: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": "0fc4deef742...
83c2e18e-1d5f-4a1c-a673-0f0ae97a7eb8
SAURABH08PANDEY/week1-DP5-CipherSchools
remove duplicates from ll.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* de...
ALGO
0.999818
5.348128
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-01-20T13:18: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": "651c7adf8e29...
e2771c46-0e22-4dcf-93bf-3e471a0d2669
samiunblack/phitron
semester 2/basic data structure/week 2/module 5/node_master.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int value; Node* next; Node(int value, Node* next = NULL) { this->value = value; this->next = next; } }; int main() { // Node* one = new Node(5); // Node* two = new Node(...
ALGO
0.999579
3.529294
{ "github_metadata": { "branch": "main", "commit_count": 272, "repo_created_at": "2023-03-24T02:43:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69bea5cb5...
ac145b35-bc37-42c2-94a2-0b9cef958a46
raghu-yemmanuru/code4fun
graphs/toplogical_shortest.cpp
#include <iostream> #include <vector> #include <fstream> #include <limits> #include <iterator> #include "graph.h" double inf = numeric_limits<double>::infinity(); void toplogical_short(Graph &g,int s,vector<int> &parents) { int v,w; vector<double> dist(g.V,inf); dist[s] = 0.0; for (int u = 1; u < g.V;...
ALGO
0.999521
4.411633
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2015-01-12T03:48: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": "64fccad993...
f8ff2f0d-15f6-477f-b19d-476884bbdf97
babar-ai/Programming_Skills
C++ Datastructure & Algorithm/Data-Structure-Algorithm-CPP/genral_practise/factorial_recu.cpp
#include <iostream> using namespace std; // // Function to calculate the factorial of a number using a loop // int factorial(int n) { // int fact = 1; // // Loop to multiply numbers from 1 to n // for (int i = 1; i <= n; ++i) { // fact = fact * i; // Multiply the current number with the accumulate...
ALGO
0.999902
5.135646
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-01-20T07:51: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": "8fbaf053e7bf...
640549bd-559b-4e89-a9be-0797e3ebda21
Siddharth19-02/Dsa-Code
graphs/2477-minimum-fuel-cost-to-report-to-the-capital.cpp
class Solution { public: int minimumFuel(int src,vector<int> adj[],vector<bool> &visited,long long &minimumCost,int distanceFar,int seats) { visited[src] = true; int personsTillNow = 0; for(int children : adj[src]) { if(!visited[children]) ...
ALGO
0.999807
5.437223
{ "github_metadata": { "branch": "master", "commit_count": 402, "repo_created_at": "2022-01-26T07:06:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01226a55...
4a4e91b4-6729-4e8a-9432-d32f72555d35
Adhamet/Problem-Solving
uva/10242 Fourth Point !!/10242.cpp
#include <bits/stdc++.h> using namespace std; #define adhamet ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); using ll = long long; using ld = long double; using ld = long double; using ull = unsigned long long; #define el '\n' #define dbg(v) \ co...
ALGO
0.999687
4.104325
{ "github_metadata": { "branch": "main", "commit_count": 798, "repo_created_at": "2022-01-29T00:47:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90f948fbf9...
5e8e1ed3-fb1a-4f1f-b4a4-ad9aeeb89dbc
atikislam/Codeforces
C_Target_Practice.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" #define INF 100000000 #define abc "abcdefghijklmnopqrstuvwxyz" #define ABC "ABCDEFGHIJKLMNOPQRSTUVWXYZ" #define PI 3.1415926535897932384626433832795 //define sort function #define asort(a) sort(a.begin(),a.end()) #define rsort(a) sort(...
ALGO
0.998834
4.771154
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2023-09-19T06:03: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": "8191a15a238...
c8992248-45fc-4482-b1bc-007c64970d61
sjtu-imperishable-night/code-library
Template/Template of Other Teams/Spear-of-Longinus/acm/2016-08-02(2012 Asia Chengdu Regional Contest )/B.cpp
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<iostream> #include<algorithm> using namespace std; const int N = 300005; int n; double p; long double f[N]; void work() { if(n == 1) { puts("1.00") ; return ; } if(fabs(p - 1) < 1e-7 || fabs(p) < 1e-7) { printf("%d\n", n); r...
ALGO
0.999841
3.728315
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2019-07-26T11:23:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8f204b327c...
577fbb39-e7b5-44b3-8d49-ba0c16e202ca
sanan-sajid/CP-Codes
Codeforces/oops.cpp
#include <iostream> #include <algorithm> struct Point { int x, y, z; }; struct Cuboid { Point p1, p2; Cuboid(int a, int b, int c, int d, int e, int f) { p1 = {std::min(a, d), std::min(b, e), std::min(c, f)}; p2 = {std::max(a, d), std::max(b, e), std::max(c, f)}; } }; bool hasPositiveVolumeIntersec...
ALGO
0.998103
4.747696
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2024-02-06T10:32: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": "c2aa54e1b9c...
4d657644-3b12-4d5e-8a4a-c3294827b5b9
ShahjalalShohag/ProblemSolving
codeforces/472/G.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") #pragma GCC optimize("unroll-loops") #include<bits/stdc++.h> using namespace std; const int N = 2e5 + 9; unsigned long long a[N], b[N]; int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); string A, B; ...
ALGO
0.999371
4.925414
{ "github_metadata": { "branch": "master", "commit_count": 2261, "repo_created_at": "2020-12-20T21:28:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 37, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1b612...
2c8f88fd-1133-4509-b009-d05143c57406
aadhikeaswar/CP-Solutions
CodeChef/C++14/ZCO16001/41245592.cpp
#include <iostream> #include <algorithm> using namespace std; inline int read(){ int n{0}; char c; while ((c=getchar_unlocked())<48); n += (c-'0'); while((c=getchar_unlocked())>=48) n = n * 10 + (c-'0'); return n; } int main() { int n = read(), k = read(); int a[n], b[n]; for(int ...
ALGO
0.999976
3.365262
{ "github_metadata": { "branch": "main", "commit_count": 495, "repo_created_at": "2022-10-30T16:22: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": "47f365ae22...
6762c772-8b49-4d86-b0ba-c5014288078e
wayfinder/Wayfinder-CppCore-v2
cpp/Targets/FMath/include/fmatrix.h
#ifndef _FMATRIX_H_ #define _FMATRIX_H_ #include "fcommon.h" #include <algorithm> namespace fmath { class fmatrix16 { public: fmatrix16( void ) { } fmatrix16( const fmath::fixed* matrix ) { m_matrix[0][0] = matrix[0]; m_matrix[1][0] = matrix[1]; m_matrix[2][0] = matrix[2]; ...
ALGO
0.958836
6.046187
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2010-06-28T06:47:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2e91b6b47c...
d96e756f-4645-4efa-8981-577f79dfae16
rajat2004/programming
codechef/may20B/covid19.cpp
#pragma GCC optimize ("-O3") #include<bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double ld; typedef pair<int,int> p32; typedef pair<ll,ll> p64; typedef pair<double,double> pdd; typedef vector<ll> v64; typedef vector<int> v32; typedef vector<vector<int> > vv32; typedef vector<vector<ll> ...
ALGO
0.999851
4.109987
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2020-01-15T18:38: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": "d85ef3478...
21af5af5-4684-4f8d-afd9-5d537bf13ec8
bishwauser/Interview-Questions
graph/graphTraversal.cpp
#include<iostream> #include<vector> #include<map> #include<set> #include<stack> #include<queue> using namespace std; map< char, vector<char> > graph = { {'f', {'g', 'i'}}, {'g', {'h'}}, {'h', {}}, {'i', {'g', 'k'}}, {'j', {'i'}}, {'k', {}} }; void bfs(const char &n, map< char, vector<char> > g...
ALGO
0.99998
4.188222
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-03-10T17:44:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0bdf2b5b003...
59ff6760-0f31-475e-ae2a-de1eae5383a3
webber2408/CplusplusLearning
LeetCode/Array/Finding_Duplicate_Number_In_Array.cpp
/* Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate number, find the duplicate one. Example 1: Input: [1,3,4,2,2] Output: 2 Example 2: Input: [3,1,3,4,2] Output: 3 Note: You m...
ALGO
0.99998
4.666324
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-04-28T10:42: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": "6d79fa50c...
80c76928-f44b-4d56-bc80-3562be3ca464
ishandutta2007/codeforces-g
golovanov399/normal/1630/C.cpp
#include <bits/stdc++.h> #define itn int #define all(x) (x).begin(), (x).end() #define make_unique(x) sort(all((x))); (x).resize(unique(all((x))) - (x).begin()) using namespace std; inline int nxt() { int x; scanf("%d", &x); return x; } void solve() { int n = nxt(); vector<int> first(n, -1), last(n, -1); for ...
ALGO
0.999667
3.965353
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:55: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": "830fb3c93029...
c144b92c-a1a3-4e85-9748-fc97befb01bc
JeraKrs/acm
codes/UVA/10001-19999/uva10869.cpp
#include <cstdio> #include <cstring> #include <set> #include <algorithm> #define lowbit(x) ((x)&(-x)) using namespace std; const int maxn = 200000; set<int> vec; int ans; int N, R, C, fenx[maxn+5], rec[maxn+5]; int cntx[maxn+5], cnty[maxn+5], have[maxn+5]; struct point { int x, y; int rx, ry; }p[maxn+5]; inline ...
ALGO
0.999867
3.196023
{ "github_metadata": { "branch": "master", "commit_count": 163, "repo_created_at": "2016-05-23T06:40:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73fa87d7...
aed5fa35-ea92-491e-bde8-c37886ad643f
Shiiiin/cpp
primSP.cpp
#include<iostream> #include<queue> using namespace std; //참조: https://makefortune2.tistory.com/37 class Graph{ public: int V; int E; int **adj; }; class Edge{ public: int v1; int v2; int weight; }; class comp{ bool operator()(Edge E1, Edge E2){ re...
ALGO
0.999959
4.349763
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-01-07T08:29: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": "cca63fb39...
27b8019a-b0a9-4cda-9b06-8709e03353e2
PaddlePaddle/Paddle-Lite
lite/kernels/host/sampling_id_compute.cc
// Copyright (c) 2021 PaddlePaddle Authors. 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...
ALGO
0.995728
7.321717
{ "github_metadata": { "branch": "develop", "commit_count": 7526, "repo_created_at": "2017-09-20T11:41:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7124, "forks": 1620, "issues": 68, "pull_requests": 17 }, "file_meta": { "content_id": ...
f202c44f-9e76-4131-b7b1-6f9b60a37015
std-freejia/hymni.study
Code(2021)/20210219_Coupon_std-freejia.cpp
#include <iostream> #include <algorithm> using namespace std; // 할인권 --100점 int Answer, n, m, k; int a, b, c, p, s, e; int cost[101][101]; int main(int argc, char** argv) { int T, test_case; cin >> T; for (test_case = 0; test_case < T; test_case++) { Answer = 0; cin >> n >> m >> k; // 정거장 개수, 경로 개수, 할...
ALGO
0.999729
3.672935
{ "github_metadata": { "branch": "master", "commit_count": 644, "repo_created_at": "2020-06-05T12:13:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1bce7197...
480ed8bc-c0fc-4b91-9280-c30068bdc318
FelixWinterstein/Vivado-KMeans
lloyds_algorithm_HLS/source/lloyds_algorithm_top.h
/********************************************************************** * <NAME>, Imperial College London * * File: lloyds_algorithm_top.h * * Revision 1.01 * Additional Comments: distributed under a BSD license, see LICENSE.txt * **********************************************************************/ #ifndef LLOYDS_...
ALGO
0.99994
5.140793
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2014-01-29T18:06:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 48, "forks": 23, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "fa07e22...
6e9a087e-fbbf-4789-bbe3-648707bfe9a3
NifTK/NifTK
Libraries/ITK/RegistrationToolbox/Optimizers/itkUCLRegularStepOptimizer.cxx
/*============================================================================= NifTK: A software platform for medical image computing. Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY o...
ALGO
0.915929
7.140021
{ "github_metadata": { "branch": "master", "commit_count": 13535, "repo_created_at": "2018-07-11T07:16:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 21, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "897ad...
bf1489c2-7dd4-4a41-8fa3-91eb7a7b1800
DevelopmentalImagingMCRI/MCRIBS
MIRTK/MIRTK/Packages/Deformable/include/mirtk/ImplicitSurfaceDistance.h
/* * Medical Image Registration ToolKit (MIRTK) * * Copyright 2013-2016 Imperial College London * Copyright 2013-2016 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * ...
ALGO
0.990587
6.881283
{ "github_metadata": { "branch": "master", "commit_count": 280, "repo_created_at": "2019-07-27T11:33:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13, "forks": 8, "issues": 16, "pull_requests": 3 }, "file_meta": { "content_id": "83cfb31...
40d9b4b9-95e6-4acd-bfa7-065635fb62c8
sterngerlach/my-gmapping-v2
include/my_gmapping/mapping/scan_matcher_hill_climbing.hpp
/* scan_matcher_hill_climbing.hpp */ #ifndef MY_GMAPPING_MAPPING_SCAN_MATCHER_HILL_CLIMBING_HPP #define MY_GMAPPING_MAPPING_SCAN_MATCHER_HILL_CLIMBING_HPP #include "my_gmapping/mapping/likelihood_function.hpp" #include "my_gmapping/mapping/scan_matcher.hpp" #include "my_gmapping/metric/metric.hpp" namespace MyGMapp...
ALGO
0.999069
6.632208
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2021-06-17T01:13:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "1d8ee0f22...
5125a1c4-fa43-4107-b7e0-01b128eb1852
sclshu3714/MODELWORX.CORE
OCCT.Foundation.Net/ModelingAlgorithms/TKTopAlgo/BRepApprox/XXXBRepApprox_TheComputeLineBezierOfApprox_0.cpp
// Created on: 1995-06-06 // Created by: <NAME> // Copyright (c) 1995-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser ...
TOOL
0.985381
4.668207
{ "github_metadata": { "branch": "master", "commit_count": 259, "repo_created_at": "2020-09-29T03:16:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "81b971e4...
736979ad-6b08-461e-a409-473d3ca75799
ianbraga30/Maratona_Cin
Seletiva/Homeworks/Homework_3/Toposort.cpp
#include <bits/stdc++.h> using namespace std; int n, m; vector<int> grau; vector<int> ordem; vector<vector<long long int>> adj; priority_queue<int, vector<int>, greater<int>> pq; void toposort(){ for (int i = 0; i < n; i++) { if (grau[i] == 0) { pq.push(i); } } whi...
ALGO
0.999994
4.551353
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2023-11-25T19:56:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7bd045ef81...
101169c7-ce55-42ce-9c51-cc808ca837cb
mslus/algorithms
varia/rabin-karp.cc
/* * rabin-karp.cc * * Created on: Sep 21, 2016 * Author: mslus */ #include <iostream> #include <string> #include <vector> using namespace std; class Hashing{ static const long long M = 3779; long long alphabet_size; public: Hashing(int n){ alphabet_size = n; } long computeHash(string s){ long...
ALGO
0.999806
4.935055
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2016-08-27T09:35: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": "d868b9ee5...
7a9a33b1-de0b-4f07-984a-1497b6ba5c55
metaphysis/Code
UVa Online Judge/volume002/225 Golygons/program.cpp
// Golygons // UVa ID: 225 // Verdict: Accepted // Submission Date: 2016-05-24 // UVa Run Time: 0.390s // // 版权所有(C)2016,邱秋。metaphysis # yeah dot net #include <bits/stdc++.h> using namespace std; struct point { int x, y; }; vector<point> blocks; vector<int> golygons(30); string headingText = "ensw"; int turn[...
ALGO
0.999873
4.127089
{ "github_metadata": { "branch": "master", "commit_count": 1710, "repo_created_at": "2016-03-07T13:28:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 229, "forks": 50, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e284...
1aa17f70-3b94-410c-be5f-241fa1cbcaf7
ishreya09/DSA
greedy/1005_Maximum_Sum_of_Array_after_K_negations.cpp
/* 1005. Maximize Sum Of Array After K Negations https://leetcode.com/problems/maximize-sum-of-array-after-k-negations/ Given an integer array nums and an integer k, modify the array in the following way: choose an index i and replace nums[i] with -nums[i]. You should apply this process exactly k times. You may choo...
ALGO
0.99996
5.515095
{ "github_metadata": { "branch": "master", "commit_count": 123, "repo_created_at": "2022-07-29T19:15: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": "361b1a71...
aa2bb75e-058b-4012-ad91-27ec7912bbd6
sa35577/leetcode
solutions/problems/bitwise_and_of_numbers_range/solution.cpp
class Solution { public: int rangeBitwiseAnd(int left, int right) { if (left == right) return left; vector<int> v1,v2; int a = left, b = right; for (int i = 0; i < 32; i++) { if (a % 2 == 0) v1.push_back(0); else v1.push_back(1); if (b % 2 == 0) v2...
ALGO
0.99997
5.601245
{ "github_metadata": { "branch": "main", "commit_count": 693, "repo_created_at": "2023-11-13T15:13:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b6df0f371...
69a8f97a-2ee1-4552-a1c3-1adca92c07db
sio2whocodes/BOJ
BinarySearch/BinarySearch/2776.cpp
// // 2776.cpp // BinarySearch // // Created by 임수정 on 2021/01/15. // #include <iostream> #include <algorithm> using namespace std; int T,N,M; int note1[1000000]; int binarySearch(int num){ int s = 0; int e = N-1; int mid; while(s <= e){ mid = (s+e)/2; if(note1[mid] == num){ ...
ALGO
0.999983
5.038062
{ "github_metadata": { "branch": "main", "commit_count": 94, "repo_created_at": "2021-01-25T03:36:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f90aa8c7cd...
6078c1a2-b94d-4001-bdbe-3821bc5b9cca
Honoluluchampi/sycl-exercise
heat_equation.cpp
// compile command // clang++ -fsycl -fsycl-targets=nvptx64-nvidia-cuda simple-sycl-app.cpp -L/usr/lib/gcc/x86_64-linux-gnu/11 -o simple-sycl-app -I /usr/include/c++/11 -I /usr/include/x86_64-linux-gnu/c++/11 #include <vector> struct field { int nx; int ny; double dx; double dy; std::vector<double> data; };...
ALGO
0.976737
4.502791
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-02-25T07:37: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": "8e273396bb21...