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
d4c5b2d4-8174-426c-944d-c181d6091036
kekesh/Algorithms
USACO/Training_Pages/Chapter_2/hamming.cpp
/* ID: ekfrmd1 LANG: C++11 TASK: hamming */ #include <assert.h> #include <math.h> #include <string.h> #include <algorithm> #include <fstream> #include <iostream> #include <list> #include <set> #include <stack> #include <vector> #include <string> using namespace std; typedef long long ll; typedef pair<int, int>...
ALGO
0.99998
3.307994
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2019-01-02T00:36:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "daacdf55c...
174f1fb8-b423-4906-a1c5-65a3440cddc2
CompRD/BroadCRD
src/paths/KmerAlignSet.cc
/////////////////////////////////////////////////////////////////////////////// // SOFTWARE COPYRIGHT NOTICE AGREEMENT // // This software and its documentation are copyright (2012) by the // // Broad Institute. All rights are reserved. This software is supplied // ...
ALGO
0.995728
4.898206
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2015-04-16T17:15:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "25dbfa75b5...
9567f05f-ff9d-4301-9267-985d9e672fdf
austin880625/problem_solving
NCTUHW/478.cpp
#include <stdio.h> #include <iostream> using namespace std; typedef long long int ll; int n; ll A[100005]; int ran(){ static int x = 7122; return x=x*0xdefaced+1; } struct Node{ ll v,cnt,num,sum; int pri; struct Node *ch[2]; Node(ll _v, ll c):v(_v),cnt(c),num(c),sum(c*_v),pri(ran()){ ch[0] = ch[1] = NULL; } }; vo...
ALGO
0.999949
3.709785
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2015-09-29T21:54: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": "2273af60d...
1d5e0f15-075c-4319-946b-33a7efbdaac2
MicBosi/VisualizationLibrary
src/vlCore/Plane.cpp
/**************************************************************************************/ /* */ /* Visualization Library */ /* http://visualizationlibrary.org ...
ALGO
0.992651
6.741217
{ "github_metadata": { "branch": "master", "commit_count": 1535, "repo_created_at": "2015-03-23T10:57:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 355, "forks": 98, "issues": 73, "pull_requests": 4 }, "file_meta": { "content_id": "8d9...
216dea43-9d6f-49a5-95d7-783d05fd82d0
Arnob-sen/propblem_solving
B_Appleman_and_Card_Game.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define fastio \ { \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ } // #define inf 1e12 int main() { fastio ll n, k; ...
ALGO
0.999929
3.915959
{ "github_metadata": { "branch": "master", "commit_count": 263, "repo_created_at": "2022-12-06T09:24: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": "25a7b56b...
1ab1032f-8406-4b97-80a1-eac57d8d0733
martinwkol/min-cut-karger-near-linear
src/spanning_tree.hpp
#pragma once #include <vector> #include "graph.hpp" /** * Compute the minimum spanning tree (MST) of the given graph based on edge multiplicities. * @param edgeIndicesBuffer Pointer to a pre-allocated buffer where the indices of the edges forming * the MST will be written. The buffer must have space for at...
ALGO
0.998852
7.026659
{ "github_metadata": { "branch": "main", "commit_count": 169, "repo_created_at": "2024-02-17T16:41: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": "e22a16208c...
360d7c43-f36b-4ce4-9af3-d3dd166db99e
shuxian12/UVA
100/10029_Edit_Step_Ladders.cpp
#include<iostream> #include<vector> #include<map> #include<string> using namespace std; // https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=970 // https://www.twblogs.net/a/5b8276612b717766a1e85dd8 map<string, int > wordMap; vector<string> wordList; // int dp[N]; int main(...
ALGO
0.999891
3.673331
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2023-03-17T19: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": "5dccee6b36...
7bec662f-b4b0-43d8-90ac-6e6a7c467dd1
luxiaodong/Compiler
theory/ggrammarlr0.cpp
#include "ggrammarlr0.h" GGrammarLR0::GGrammarLR0() { } void GGrammarLR0::test() { QStringList list; list<<QString("S'->S"); list<<QString("S->B,B"); list<<QString("B->a,B"); list<<QString("B->b"); this->create(list); this->print(); } void GGrammarLR0::create(const QStringList& list) { ...
ALGO
0.900472
3.43149
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2022-01-11T06:26: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": "d94e8f266cb...
f7cae202-1206-4e99-858e-95b7d0aac42a
StefanoVerrilli/elim_projects
Hough/HoughLines/HoughLines.cpp
#include <iostream> #include <opencv2/opencv.hpp> using namespace std; using namespace cv; int main(int argc,char ** argv){ Mat img = imread(argv[1]); if(img.empty()) return -1; GaussianBlur(img,img,Size(5,5),0,0); Mat CannyImage; Canny(img,CannyImage,35,85,3); int th = 220; in...
ALGO
0.99596
4.653286
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-04-25T11:11: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": "afdb6c0174...
2bca2a29-b9d0-4372-b4e0-e34485403d77
jingju-SMC2016-PCS/SMC2016
code/pyin_noteTransition/IntonationHistogram.cpp
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ /* * Copyright (C) 2016 Music Technology Group - Universitat Pompeu Fabra * * This file is part of pYIN Beijing Opera version * * pYIN Beijing Opera version is free software: you can redistribute it and/or modify it under * the terms...
ALGO
0.969723
5.609885
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2016-03-25T08:15:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68cff7bb7...
b8032c28-7d4e-4668-83ce-223d707956b5
JuanCor253/Trabajos_ALSE
clase/eje_3/funciones.cpp
#include <stdio.h> #include <math.h> double funeval3( const double &x ){ // El puntero que permite llegar a esta función tiene la forma // de double (*p)(const double&) return cos(x*M_PI/25); } double funeval2( const double &x ){ // El puntero que permite llegar a esta función tiene la forma // de double ...
ALGO
0.997566
4.319539
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2025-02-05T19: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": "5fd152d5253...
62eb8bdb-2cc7-407f-baf5-1a248f365108
BekzhanKassenov/olymp
codeforces.com/Contests/424 div 2/A/A.cpp
/***************************************** ** Solution by <NAME> ** *****************************************/ #include <bits/stdc++.h> using namespace std; #define by(T, x) [](const T& a, const T& b) { return a.x < b.x; } #define all(x) (x).begin(), (x).end() const int dx[] = {1, 0, -1, 0}; const int dy[] ...
ALGO
0.999997
4.184471
{ "github_metadata": { "branch": "master", "commit_count": 426, "repo_created_at": "2015-07-29T15:25:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86129a13...
dade0e82-b2d3-4dc8-909a-f854ffe731f0
tamim2007009/BitManipulation
swap1.cpp
#include <bits/stdc++.h> using namespace std; void swap(int &a, int &b) { int temp = a; a = b; b = temp; } void swapW(int &c, int &d) { c = c + d; d = c - d; c = c - d; } void swapX(int &x, int &y) { x = x ^ y; y = x ^ y; x = x ^ y; } int main() { // With temp variable int a, b; cin >> a ...
ALGO
0.999935
5.050195
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-12-19T17:13:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9cc4a2c20f3b...
cb7acf27-bf24-4dd7-ba92-48283b90840f
Realhyeonwoo/study-algorithm
04.graph/1976.cpp
#include<iostream> #include<vector> #define MAX 201 using namespace std; int N, M; int map[MAX][MAX]; int num[MAX]; int getParent(int x) { if(x == num[x]) return x; return getParent(num[x]); } void unionParent(int a, int b) { a = getParent(a); b = getParent(b); if(a < b) { num[b] = a; } else { num[a] = b;...
ALGO
0.99999
5.134533
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2019-09-20T15:53: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": "b640a2cf...
5205b737-5645-4663-b2b8-c57c5d8a613f
yashwantOfficial27/problem-solving
binary_search/nthRootOfM.cpp
#include<bits/stdc++.h> using namespace std; long long func(int n, int m) { for(int i = 1; i<= m; i++) { long long val = 1; for( int j = 1; j<=n; j++) { val *= i; // cout << "value of i is : " << i << " and value of i*i is " << val << endl; } if (val == m) {...
ALGO
0.999988
4.172837
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-02-05T14:58: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": "aa6e0c61b940...
3e5da87e-977a-43c1-be6e-5ca228ed2b65
salmonofdoubt/TECH
PROG/C/cpp/PC_Simu/Test4.cpp
#include <stdio.h> #include <math.h> double f(int n,int z,double x,double y,double vx,double vy,double t) { double ak ; /* Beschleunigung */ double A,m,cw,g ; m = 1.0 ; g = 9.81; cw= 0.35; A = 0.75 ; switch(n) /* Unterscheidung von...
ALGO
0.99967
3.343751
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2017-08-10T10:06:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c9f99ca4...
7307ca5d-d244-4915-82c6-5511337b3747
ye-luo/openmp-target
tests/target_task/taskloop_offload_nowait.cpp
#include <iostream> #include <cstdlib> #include <cmath> bool almost_equal(float x, float gold, float tol) { if ( std::signbit(x) != std::signbit(gold) ) { x = std::abs(gold) - std::abs(x); } return std::abs(gold) * (1-tol) <= std::abs(x) && std::abs(x) <= std::abs(gold) * (1 + tol); } int main() { const ...
ALGO
0.975775
4.216405
{ "github_metadata": { "branch": "master", "commit_count": 204, "repo_created_at": "2019-04-23T17:24:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 6, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "1a8bd97...
1cbf61ac-279b-4bd2-bf89-c031966c4a2e
shubhampawar574/Coding-Problems
March/Leetcode/22_Minimum Score of a Path Between Two Cities.cpp
// DFS Code class Solution { public: int mini=INT_MAX; void dfs(int node, vector<pair<int,int>> adj[], vector<int>& vis){ if (vis[node])return; vis[node]=1; for (auto val:adj[node]){ mini= min(mini,val.second); dfs(val.first,adj,vis); } } int ...
ALGO
0.999974
5.833414
{ "github_metadata": { "branch": "main", "commit_count": 368, "repo_created_at": "2023-01-03T09:59:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "70612daf12...
3b3914dd-f5bc-477c-a8d8-8f8c8ab4da00
decajoin/old-courses-2023
数据结构实验/数据结构第五次实验课/队列实验/3.cpp
#include<iostream> #include"myQueue1.h" #include"mystack2.h" using namespace std; void Arrival(LinkStack &P, LinkQueue &Q, int n, int num, int time) { // Len_P是在栈里面元素个数 int Len_P = StackLength(P); // Len_Q是在队列里面元素个数 int Len_Q = QueueLength(Q); // 压位 - 由于头文件中data是一个数据,在这里我们把num和time压位再存入栈 // 当时间超过10000时,压位操作失效...
ALGO
0.948295
3.637946
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-01T03:37:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48dcdff99448...
bb923302-8461-45c2-834f-3a82dcbc7650
ykfre/BsodSurvivor
llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
//===- IndVarSimplify.cpp - Induction Variable Elimination ----------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
TOOL
0.924654
5.54966
{ "github_metadata": { "branch": "master", "commit_count": 358048, "repo_created_at": "2020-12-31T20:45:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 172, "forks": 23, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "39...
89fa6cd8-c2d3-4e41-9f96-87aeea7a3714
halo2718/Logic-Compiler
Logic compiler.cpp
#include<iostream> #include<stack> #include<cstring> #include<cmath> #include<cstdio> using namespace std; char s[10000]; struct Mi{char q;int v;}s0[10000],alpha[20]; int calcu[10000],op; int bi[10000000],tmp[10000000]; int Truth[10000000][30]; stack<char> stk; void Display() //输出初始界面 { cout<<"**********************...
ALGO
0.999671
3.185261
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-01-15T02:09: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": "5cb59692541f...
061cadd2-486d-4d1d-b8af-f0e629630efc
qiufengyu/LetsCode
Challenge-2021-11/29-accounts-merge.cpp
#include "../header.h" static auto _ = [](){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); return 0; }(); class Solution { unordered_map<string, string> m; unordered_map<string, string> n; void u1(const string& a) { m[a] = get(a); } void u2(const ...
ALGO
0.999986
5.836386
{ "github_metadata": { "branch": "main", "commit_count": 218, "repo_created_at": "2020-06-03T15:05:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "29cbe56100...
675f0d36-a9b2-4fdf-aa9d-6a8dc3e9ce50
YadaYuki/atcoder-
kyopro-tessoku/a57_2.cpp
#include <bits/stdc++.h> using namespace std; int main() { int N, Q; cin >> N >> Q; int A[N]; for (int i = 0; i < N; i++) { cin >> A[i]; A[i] -= 1; } int dp[30][N]; for (int i = 0; i < N; i++) dp[0][i] = A[i]; for (int i = 1; i < 30; i++) { for (i...
ALGO
0.99998
4.165248
{ "github_metadata": { "branch": "master", "commit_count": 1837, "repo_created_at": "2021-08-12T12:50:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "76fc0f0...
ce18b6af-4a50-4618-8700-06d4a4cda253
Kiritow/OJ-Problems-Source
HDOJ/3646_autoAC.cpp
#include <iostream> #include <stack> #include <queue> #include <cstdio> #include <cstdlib> #include <cmath> #include <set> #include <vector> #include <cstring> #include <algorithm> #define INF 0x7ffffffffffLL #define N 10010 #define M 100010 #define LL long long #define mod 95041567 using namespace std; struct node{ ...
ALGO
0.999985
3.14269
{ "github_metadata": { "branch": "master", "commit_count": 939, "repo_created_at": "2016-04-10T01:06:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 24, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68adffd...
11bda813-f858-4aea-be96-b0392633a993
CJared22/DSA-activities
Aaron_ClarkJared_Lab2_complete.cpp
#include <iostream> using namespace std; typedef struct Node{ string songName; Node *link; }Node; Node *createNode(string data){ Node *newNode = new Node; newNode->songName = data; newNode->link = NULL; return newNode; } void traverse(Node *head){ Node *temp = new Node; temp = head...
ALGO
0.989589
4.55854
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-02-22T09:45: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": "745e2d9b41ec...
4633e53c-06c9-4944-a184-aa7715c8edbb
hk2201/DSA
Sorting/Quick_Sort.cpp
#include <iostream> using namespace std; void print(int *arr, int size) { for (int i = 0; i < size; i++) { cout << arr[i] << " "; } cout << endl; } int partition(int *arr, int low, int high) { int pivot = arr[low]; int i = low + 1; int j = high; int temp; do { w...
ALGO
0.999978
5.918735
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2022-08-08T10:19:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "32d611f36...
6bce0e39-20dc-4609-be17-37fd0b62ac44
viethuyvu/Eng1510Source
word-count.cc
/** * @file: word-count.cc * @author: <NAME> * @date: Feb 11th 2023 * @brief: This code take in text as input and counts the number of words, sentences and calculates the number of words per sentence. */ #include <iostream> #include <iomanip> #include <cstdlib> using namespace std; int main(int argc, char ...
TOOL
0.929588
4.872927
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-03-02T17:13:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4377a289e5c...
d6669cbb-3c47-4400-8c44-c35795ad8b8c
tenable/routeros
msg_re/get_policies/src/main.cpp
#include <list> #include <map> #include <vector> #include <fstream> #include <cstdlib> #include <iostream> #include <algorithm> #include <boost/cstdint.hpp> #include <boost/program_options.hpp> #include <boost/algorithm/string.hpp> #include "winbox_session.hpp" #include "winbox_message.hpp" namespace { const char...
TOOL
0.949901
5.087833
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2018-10-02T13:59:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 889, "forks": 389, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "b8a086...
fcd6ee61-0299-4c3a-a3e4-efe6c33a69dd
bkubick/cpp-dsa
cpp-dsa/data_structures/Tree.hpp
class Node { public: int value; Node* left; Node* right; Node(int value) { this->value = value; left = nullptr; right = nullptr; } }; class BinarySearchTree { private: Node* root; /** * @brief Prints the tree...
ALGO
0.999709
5.881104
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-11-06T16:47: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": "b46edc701b6...
a1c98216-8b0c-4fa8-a645-1e56ba510316
mike4192/spotMicro
spot_micro_motion_cmd/src/smfsm/spot_micro_walk.cpp
#include "spot_micro_walk.h" #include <eigen3/Eigen/Geometry> #include "spot_micro_transition_stand.h" #include "spot_micro_motion_cmd.h" #include "rate_limited_first_order_filter.h" SpotMicroWalkState::SpotMicroWalkState() { contact_feet_states_.right_back_in_swing = false; contact_feet_states_.right_front_in_s...
ALGO
0.992012
5.80405
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2020-03-31T00:54:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1960, "forks": 474, "issues": 37, "pull_requests": 0 }, "file_meta": { "content_id": "6a...
0d8ae122-f698-4142-af8e-1581ac994470
SolveGuys/AlgorithmStudy
Problems_Archives/55week/nmp9981/programmers92342_ERROR.cpp
#include <string> #include <vector> using namespace std; vector<int> answer; vector<int> bow;//화살 결과 vector<int> getScore;//어디서 점수를 얻을 것인가 bool isWin = false; int maxDiff = 0;//최고 점수차 //점수 세기 void Judge(int n,vector<int> getScore,vector<int> apach){ int arrow = 0;//사용 화살 개수 int apachScore = 0;int lionScore = ...
ALGO
0.999827
3.990311
{ "github_metadata": { "branch": "master", "commit_count": 2184, "repo_created_at": "2021-11-06T03:55:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4deff067...
13d24055-16d4-46ee-8172-42b96db44b75
vsotofrances/MOKACLIFFORD
src/lib-rounding/rounding-generic.hh
/* * lib-rounding : Opérations de chamfreinage. * Copyright (C) 2004, Moka Team, Université de Poitiers, Laboratoire SIC * http://www.sic.sp2mi.univ-poitiers.fr/ * Copyright (C) 2009, <NAME>, CNRS, LIRIS, * <EMAIL>, http://liris.cnrs.fr/ * * This file is part of lib-rounding * * Thi...
TOOL
0.95227
5.629942
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-12-18T17:58: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": "1d79e84903...
a56e8a70-c685-4d63-84b9-b44ff9b89af1
hwennnn/competitive-programming
codeforces/1430-B.cpp
// https://codeforces.com/contest/1430/problem/B #include <bits/stdc++.h> #define ll long long #define ar array using namespace std; const ll M = 1000000007; const int mxN = 1e3; void solve(){ int n, k; cin >> n >> k; ll A[n]; for (ll i = 0; i < n; i++) cin >> A[i]; sort(A, A+n); for (int i ...
ALGO
0.999979
5.030551
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-10-15T13:02: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": "21c8c8cbbc...
8ddc1356-ea77-4842-998e-93111edcf106
lizmoscow/polar-codes-with-bch-kernel
out/external/StructuredLinAlg.cpp
#include "StructuredLinAlg.h" #include <iostream> #include "SoftSIMD.h" #include "SoftProcessing.h" Word OneArray[65]; unsigned ShortOneArray[33]; bool OneBoolArray[65][8]; bool isOneArrayInitialized = false; #ifdef AVX __m256 SignMask = _mm256_castsi256_ps(_mm256_set1_epi32(0x7FFFFFFF)); __m256 Mask2 = _mm256_castsi2...
ALGO
0.999953
4.3291
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-09-24T19:49:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7103c48ae5...
a7670ef2-9ad2-4410-8b55-4052e28951b5
NicoManke/WorldExtender
code/code/game/src/tilemap/generators/PortalIslandGenerator.cpp
#include "PortalIslandGenerator.h" #include <array> namespace WorldExtender { std::vector<int> PortalIslandGenerator::generateChunk() { std::vector<int> island(WIDTH * HEIGHT, 0); island = defaultLayout(); std::array<int, 12> ports = std::array<int, 12>(); ports[ 1] = (WIDTH * 0.5); ports[ 0] = ports[1] - ...
TOOL
0.903635
5.877125
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2023-11-27T13:56: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": "a6b9bfd253...
3c12c03c-cc81-43d0-9221-46292168ae6c
StrangerZ667/NamMaNow4
lab9_1.cpp
#include<iostream> #include<iomanip> using namespace std; int main(){ double loan,interest,sum,payment; cout << "Enter initial loan: "; cin >> loan; cout << "Enter interest rate per year (%): "; cin >> interest; cout << "Enter amount you can pay per year: "; cin >> payment; sum = loan; cout <...
ALGO
0.988456
3.329394
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2023-12-15T07:10:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "87be19471...
cb8751a3-b17d-4cc7-a455-7221611e2006
Con-TI/Coding-Portfolio
NumericalMethodsforFinanceinC++/chapt5/controlvariates/Main22.cpp
#include <iostream> #include "PathDepOption04.h" #include "GmtrAsianCall.h" #include "RegEurCall.h" using namespace std; int main(){ double S0 = 100.0, r =0.03, sigma=0.2; BSModel Model(S0, r, sigma); double T= 1.0/12.0, K=100.0; int m=30; ArthmAsianCall Option(T,K,m); GmtrAsianCall CVOption(T...
ALGO
0.998201
4.351219
{ "github_metadata": { "branch": "main", "commit_count": 94, "repo_created_at": "2024-10-09T14:55: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": "c0ca4de098c...
b57947e4-bd53-4b33-b386-e12dd166993a
Zhanghq8/Quadrotor_planner
quadrotor_demo/include/quadrotor_demo/task_assignment/cbba_impl.hpp
#ifndef CBBA_IMPL_HPP #define CBBA_IMPL_HPP #include "cbba.hpp" namespace librav{ template<typename VehicleType> void CBBA::BundleConstruction(std::shared_ptr<AutoTeam_t<VehicleType>> vehicle_team, TasksSet tasks){ for(auto&agent: vehicle_team->auto_team_){ agent->BundleRemove(); } for(auto&agent: vehicle_...
ALGO
0.99902
3.33116
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2019-10-01T04:30: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": "e1f978110...
c3b24bf3-becb-4971-ba20-509aaa5b5e1b
yulinhuyang/code_hub
leetcode/C++/97 Interleaving String.cpp
// LeetCode, Interleaving String // 递归,会超时,仅用来帮助理解 class Solution { public: bool isInterleave(const string& s1, const string& s2, const string& s3) { if (s3.length() != s1.length() + s2.length()) return false; return isInterleave(begin(s1), end(s1), begin(s2), end(s2), ...
ALGO
0.998861
5.759564
{ "github_metadata": { "branch": "master", "commit_count": 537, "repo_created_at": "2015-06-27T07:25:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "9fb0a5c2...
f536c642-c895-4904-8c45-4949652fa6ff
AdisaDizdarevic/CPP_Projects
algorithm.cpp
#include <algorithm> #include <iostream> #include <iterator> #include <list> #include <ostream> #include <type_traits> #include <utility> #include <variant> #include <vector> struct Entry { std::string ime; int index; }; bool operator==(const Entry &x, const Entry &y) { return x.ime == y.ime && x.index == y.inde...
ALGO
0.998868
5.504666
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2023-07-05T06:54: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": "71781f7ef...
81c69359-199d-4854-9457-66e4034b60b6
vaibhaviDixit/AdvancedC
ADS/programs/25/eight.cpp
/* Implement a linked list and find the middle node. Input: Enter elements for linked list (enter -1 to stop): 4 6 8 9 12 -1 Output: Linked List: 4 6 8 9 12 Middle Node: 8 */ #include <iostream> using namespace std; // Node structure for linked list struct Node { int data; Node* next; }; // Function to in...
ALGO
0.999904
7.057109
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2023-06-28T08:50:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1dfb0deb6...
b352d746-96b1-4ecc-9be0-8881b32ed1b1
betanalpha/stochastic_integrators
figures/multivariate_batch_calcs.cpp
#include <iostream> #include <fstream> #include <cmath> #include <vector> #include <Eigen/Core> #include <boost/random/additive_combine.hpp> #include <boost/random/variate_generator.hpp> #include <boost/random/normal_distribution.hpp> #include <boost/random/uniform_real_distribution.hpp> #include <boost/random/unifo...
ALGO
0.999587
5.808447
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2015-01-26T13:47:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "df847a319...
861103ce-041f-4cd4-a05f-3e8b0a7510d5
le-incroyable1-dev/dsa_archive
graph/adjmat0.cpp
#include <bits/stdc++.h> using namespace std; void dfs(vector<vector<int>> &g, int v, bool *vis, int sv){ if(vis[sv]) return; vis[sv] = true; cout << sv << " "; for(int i = 0; i < v; ++i){ if(g[sv][i] == 1 && !vis[i]){ dfs(g, v, vis, i); } } ...
ALGO
0.999988
5.029883
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-02-09T14:27: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": "d43e1073cbc1...
8c1c3f40-f52c-40f1-9286-c18cc1557fbf
alsdk3586/study-algorithm
3월-11월/6월/20210620/유원상/5430.cpp
#include <iostream> #include <cctype> #include <vector> #include <string> std::vector<int> calc_offset(std::string& str) { std::vector<int> offset; if (str == "[]") return offset; str.pop_back(); int strlen = (int)str.length(); for (int i = 0; i != strlen; ++i) { if (...
ALGO
0.99956
5.211583
{ "github_metadata": { "branch": "main", "commit_count": 472, "repo_created_at": "2021-03-25T10:53:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b7ae25b69...
d82a57f7-5c85-4421-9ab1-890a24a497b5
bachtiarherdianto/Free-Learning
Competitive-Programming/TSP-Naive/src/main.cpp
#include <iostream> #include <algorithm> #include <vector> #include <climits> /* Travelling Salesman Problem * solve using naive approach */ #define V 4 int TSP(int graph[][V], int s); int main() { int matrices[][V] = {{0, 10, 15, 20}, {10, 0, 35, 25}, {15, 35, 0, 30...
ALGO
0.999934
4.888062
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2020-08-04T11:01: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": "46e1ead80...
ebce2606-4ceb-4bff-ae5c-c963e4feefd0
KevinPortfolio1/programminglearn
sort.cpp
#include <iostream> #include <vector> #include <ctime> #include <cstdlib> #include <iomanip> #include <chrono> using namespace std; using namespace std::chrono; // 泡沫排序 void bubbleSort(int arr[], int n) { for (int i = 0; i < n - 1; i++) for (int j = 0; j < n - i - 1; j++) if (arr[j] > arr[j + 1]) swap(arr[j...
ALGO
0.999837
5.472193
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2024-10-01T06:55:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f1f1c7d55f...
04a4ba3e-8a69-4ef1-b9b0-949f97da08ea
clay-arras/cp-practice
usaco/gold/roundsubset.cpp
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "algo/debug.h" #define open(x) freopen(x, "r", stdin); #else #define open(x) #endif void solve() { int N, K; cin >> N >> K; vector<pair<int, int>> a; for (int i=0; i<N; i++) { int t; cin >> t; int twos=0, fivs=0; ...
ALGO
0.999624
4.226533
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-04-21T22:35: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": "829f58fe3414...
2ea1d006-f778-40db-99ce-7483d3c041af
Sharpless298/CompetitiveProgramming
UVa/429.cpp
#include <cstring> #include <iostream> #include <queue> #include <vector> using namespace std; bool vis[205]; int dis[205]; vector<string> G[205]; bool check(int len, string a, string b) { int cnt = 0; for (int i = 0; i < len; i++) if (a[i] != b[i]) cnt++; if (cnt == 1) return true; return false; } int ...
ALGO
0.999691
3.654667
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-04-12T13:45:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b0d20b8ad55...
22b31ed8-d647-4d21-be1f-ea8a39374ae4
byubean/cs235
fall2022/Unit9-Heap/section006/main.cpp
#include <iostream> #include <unordered_map> #include <vector> using namespace std; template<class T, class P> class PQ { struct Tuple { T item; P priority; }; unordered_map<T, int> item_location; vector<Tuple> heap; int parent(int index) { } int left(int index) { ...
ALGO
0.996308
4.020263
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2021-12-08T22: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": "f79c1a923ae...
ba743867-9221-410e-8954-d4d8a2a7d1a1
Mumbaikar007/Code
Logics/lrOParser.cpp
// // Created by optimus on 11/4/18. // # include <iostream> # include <vector> # include <algorithm> #include <iomanip> # include <string> using namespace std; struct States { //int productions[100]; vector <int> productions; //unnecessary vector <pair<int, int>> startOfProduction; vector <pair<char, i...
ALGO
0.999648
4.364847
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2017-09-24T06:10:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55531c231...
93aa9435-59d4-4968-932f-b63178dbb5f8
HNSHongTian/dataStructure
BiTree/BiTree/main.cpp
// // main.cpp // BiTree // // Created by 肖业凡 on 2019/8/28. // Copyright © 2019 肖业凡. All rights reserved. // #include <iostream> #include "Stack.h" #include "Queue.h" using namespace std; typedef struct BiTNode{ int data; struct BiTNode *lchild, *rchild; } BiTNode, *BiTree; bool CreateBiTree(BiTree &T){ ...
ALGO
0.999853
4.70836
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-08-28T12:12: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": "9594b0ae75...
a89784d3-74b6-4128-ad67-873a6417e530
yurikiselev/algos
_check_BST-2-doubly-linked-list.cpp
// Binary Search Tree and Double-linked List // http://codercareer.blogspot.ru/2011/09/interview-question-no-1-binary-search.html #include <iostream> #include <fstream> #include <map> #include <set> #include <string> #include <vector> #include <cassert> #include <algorithm> #include <list> #include <functional> #inclu...
ALGO
0.999163
4.304663
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2013-05-14T07:58: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": "59af45041...
d889dd8a-7f2a-43fa-99dc-625f5de89e0c
kim0chan/PS
Codes/BOJ/1000-1999/1300-1399/1389.cpp
#include <bits/stdc++.h> using namespace std; #define INF 999999 #define IDX(x) x - 1 #define MIN(a, b) a<b ? a:b int adj[101][101]; int main() { cin.tie(0); cin.sync_with_stdio(0); int min = INF; int minidx = -1; int N, M; cin >> N >> M; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { if ...
ALGO
0.999893
3.579606
{ "github_metadata": { "branch": "master", "commit_count": 183, "repo_created_at": "2023-01-02T11:49:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "616e1b89...
a9b3d866-1021-454b-a503-372eaa81e725
ishandutta2007/codeforces-t
tabr/normal/1709/B.cpp
#include <bits/stdc++.h> using namespace std; #ifdef tabr #include "library/debug.cpp" #else #define debug(...) #endif int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n >> m; vector<long long> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } vector<long ...
ALGO
0.999889
4.791076
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6fb9c2e85189...
519901eb-c739-4c40-81d7-578b42cb6511
dougshidong/PHiLiP
src/physics/mhd.h
#ifndef __MHD__ #define __MHD__ #include <deal.II/base/tensor.h> #include "physics.h" #include "parameters/parameters_manufactured_solution.h" namespace PHiLiP { namespace Physics { /// Magnetohydrodynamics (MHD) equations. Derived from PhysicsBase /** Only 2D and 3D * State variable and convective fluxes given by...
ALGO
0.997896
3.946018
{ "github_metadata": { "branch": "master", "commit_count": 1502, "repo_created_at": "2018-12-17T20:30:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 49, "forks": 40, "issues": 80, "pull_requests": 14 }, "file_meta": { "content_id": "a6d...
5f17f030-ee04-4209-994f-a8efdecccb26
dayweek/raytracer
src/impl/fractallandscape.h
#include "../core/algebra.h" #include "../core/array2.h" #include "../rt/basic_definitions.h" #include "../rt/bvh.h" #include "../rt/shading_basics.h" #include "../rt/texture.h" // class for generating mountain like objects. output is a set of faces. // Shader is shared between triangles // limitation: mountain grows...
ALGO
0.990052
4.0343
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2010-12-29T20:36:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0266f7b3...
f88bd13c-4a38-4ed7-91b1-9939e3af2559
osirisQdt2810/algorithms
src/leetcode/daily/2024_12_12/2558_take_gifts_from_the_richest_pile.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: long long pickGifts2(vector<int>& gifts, int k) { int N = gifts.size(); for (int i = 1; i <= k; ++i){ int maxIdx = -1, maxGift = -1; for (int j = 0; j < N; ++j){ ...
ALGO
0.999923
5.044378
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2024-08-28T12:54:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "09f62541f...
0514e807-2051-4530-9d54-54d89d166034
Majwt/Advent-of-code
Dag 04/Del 1/part1.cpp
#include <iostream> #include <vector> #include <string> #include <fstream> #include <filesystem> #include <sstream> #include <regex> struct passport { std::string byr; std::string iyr; std::string eyr; std::string hgt; std::string hcl; std::string ecl; std::string pid; std::string cid; ...
TOOL
0.909174
4.968961
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2020-12-03T19:13: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": "3038c4f49...
67533504-ec4e-4887-b299-5c83df626c92
gourdi/ggp
ggokernel/src/kernel/math/shapes_2d/ggo_segment.imp.h
namespace ggo { ///////////////////////////////////////////////////////////////////// template <typename data_t> data_t segment<data_t>::get_length() const { return ggo::distance(_p1, _p2); } ///////////////////////////////////////////////////////////////////// template <typename data_t> data_t se...
TOOL
0.986796
5.863046
{ "github_metadata": { "branch": "master", "commit_count": 642, "repo_created_at": "2015-12-11T09:06: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": "c61e69a8...
ce8d658c-a683-4d53-b229-9a101c6af031
Xan-ca/CF-Submissions
Practice-C/P183.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define INF (ll)1e18 mt19937_64 RNG(chrono::steady_clock::now().time_since_epoch().count()); void Solve() { ll n, base=1, pw=0,res=0; cin>>n; while(base*9<n){ base*=9; pw++; } //cout<<base<<endl; while(n>0){ (...
ALGO
0.999843
3.791179
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2025-02-04T12:15:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "23151f3cb...
26582b33-c6b5-4ffc-9e7a-59940c2ec3a5
Gobans/algorithm-study
herbi/백준/1260(DFS_BFS)/1260(DFS_BFS)_2.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <vector> #include <queue> #include <algorithm> #define MAX 1001 using namespace std; int N, V; bool visit[MAX]; vector<int> matrix[MAX]; int rt[MAX]; int rtindex = 0; void DFS(int x) { if (visit[x] == true) return; rt[rtindex++] = x; visit[x] = true;...
ALGO
0.999994
3.865499
{ "github_metadata": { "branch": "main", "commit_count": 90, "repo_created_at": "2022-03-13T11:18:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e928746d943...
bd313217-ef2b-4eec-92de-8b81a2339733
Qixyimoe/Delta
Codeforces/1732/A/A.cpp
#include <bits/stdc++.h> using i64 = long long; constexpr int N = 1e5 + 7; int n, g; int a[N]; void solve() { std::cin >> n; g = 0; for (int i = 1; i <= n; i++) { std::cin >> a[i]; g = std::__gcd(g, a[i]); } if (g == 1) { std::cout << "0\n"; } else if (std::__gcd(g, std::__g...
ALGO
0.999864
4.35746
{ "github_metadata": { "branch": "master", "commit_count": 205, "repo_created_at": "2024-07-30T05:57:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6f688c6...
80d2c5ea-67d5-421a-8b96-8728dafbc0d5
lnugentgibson/oalpha-battlesnakes
express/native/battlesnake/heap.cc
#include "heap.h" template <typename K, typename V> size_t MinHeap<K, V>::left(size_t i) { return 2 * (i + 1) - 1; } template <typename K, typename V> size_t MinHeap<K, V>::right(size_t i) { return 2 * (i + 1); } template <typename K, typename V> size_t MinHeap<K, V>::parent(size_t i) { return ::floor((i + 1) / ...
ALGO
0.999004
5.422068
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2021-06-15T15:54:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35443dbae0d...
c1358b37-74d7-4be7-86eb-497089d97a3f
ibayashi-hikaru/allegro-legato
lammps/src/EXTRA-COMPUTE/compute_gyration_shape.h
/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories <NAME>, <EMAIL> Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sand...
ALGO
0.967993
6.609189
{ "github_metadata": { "branch": "main", "commit_count": 82, "repo_created_at": "2023-01-17T19:46:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d143cb5678...
a92ba168-36e1-40cf-89c8-0c1b3675c779
ndhfrayyan/codeforces
CF Round 925 (Div 3)/F.cpp
#include <bits/stdc++.h> #define ll long long #define pb push_back using namespace std; bool same(vector<ll> &real, vector<ll> &seen){ ll pivot = seen[0], now = 0; for(int i = 1; i < seen.size(); i++){ if(pivot == real[now]) now++; if(seen[i] == real[now]) now++; else return false; ...
ALGO
0.999968
4.011852
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2024-02-09T07:38: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": "c9b2e880ec8...
5e93c952-2158-4816-b6ab-81026940a633
crackersamdjam/DMOJ-Solutions
Uncategorized/gcc16p3.cpp
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() using namespace std; using ll = long long; const int MM = 1e5+5; #define lc (rt<<1) #define rc (rt<<1|1) #define nm ((nl+nr)>>1) struct node{ ll val, lp; void apply(ll a){ val += a; lp += a; } } tree[MM*4]; void pull(int rt){ tree[rt].val = max(...
ALGO
0.999825
4.077358
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2021-08-08T18:36: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": "78d89d669...
b1ecf8e7-edc3-4215-8117-1907bbf7c1a6
douglascraigschmidt/CPlusPlus
STL/S-02/2.2/2.2d/main.cpp
#include <iostream> using namespace std; /** * A function template can be overloaded either by a non-template * function or by another function template. * * If a program invokes an overloaded function template, the compiler * will try to deduce its template arguments and check its explicitly * declared templat...
ALGO
0.985797
5.96181
{ "github_metadata": { "branch": "master", "commit_count": 197, "repo_created_at": "2020-03-31T19:16:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 139, "forks": 65, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "cbc38...
6eea11ff-bac3-4a17-8b4f-ed3e870574f6
networkit/networkit
networkit/cpp/centrality/EstimateBetweenness.cpp
/* * EstimateBetweenness.cpp * * Created on: 13.06.2014 * Author: <NAME>, <NAME> */ #include <networkit/auxiliary/Parallelism.hpp> #include <networkit/auxiliary/SignalHandling.hpp> #include <networkit/centrality/EstimateBetweenness.hpp> #include <networkit/distance/BFS.hpp> #include <networkit/distance/Dij...
ALGO
0.999497
7.197284
{ "github_metadata": { "branch": "master", "commit_count": 9146, "repo_created_at": "2017-02-04T13:04:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 811, "forks": 235, "issues": 23, "pull_requests": 24 }, "file_meta": { "content_id": "69...
69313b46-5057-4fa8-b4a7-a15f3e577ce1
realAYAYA/UnrealEngine-ToonLit
UnrealEngine/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/Character/CharacterGroundConstraintContainerSolver.h
// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "Chaos/Evolution/SolverConstraintContainer.h" #include "Chaos/Character/CharacterGroundConstraintContainer.h" #include "CharacterGroundConstraintSolver.h" namespace Chaos { namespace Private { class FCharacterGroundConstraintContainerSolver ...
ALGO
0.947765
5.954424
{ "github_metadata": { "branch": "5.4", "commit_count": 164, "repo_created_at": "2023-03-14T06:10:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 66, "forks": 9, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c91252f66c...
0f86128f-a33a-4fc2-8bce-5ac33e9c8942
zzzmfps/LeetCode
801 - 1000/827. Making A Large Island.cc
// 20ms, 84.15%; 13.1MB, 60.78% #include <bits/stdc++.h> using namespace std; auto x = []() { ios_base::sync_with_stdio(false); cin.tie(nullptr); return 0; }(); class Solution { public: int largestIsland(vector<vector<int>> &grid) { if (grid.empty()) return 0; int id = 2; unord...
ALGO
0.999724
5.757777
{ "github_metadata": { "branch": "master", "commit_count": 1417, "repo_created_at": "2018-02-19T06:38: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": "fc10a8e...
14812f66-e76c-45b7-a20a-b7c6d81f4f89
Sanchitgoyal2000/Heap-Sort
Minimum Cost of ropes.cpp
#include <iostream> using namespace std; void heapify(int arr[], int n, int i); int main() { //code int t; cin>>t; while(t-->0) { int n; cin>>n; int a[n]; for(int i=0;i<n;i++) { cin>>a[i]; } for (int i = n / 2 ; i >= 0; i--) heapify(a, i, n); long int...
ALGO
0.999928
3.949052
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-12-11T06:14: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": "8bfeb9831d...
411ca611-b786-4271-9d95-602c03820965
ZhouZihan-jf/CodeCraftSDK
main.cpp
#include <iostream> #include <fstream> #include <cstdlib> #include <string.h> #include <stdio.h> #include <sstream> #include "workshop.cpp" using namespace std; int framenum = 1,totalmoney = 0,workshopnum = 0; int initialization(int count,char *line) { const char *d = " "; const char *e = "\n"; char *p,*q;...
TOOL
0.972633
3.358227
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2023-03-16T09:11:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "eaae9458ce...
9942070c-7ef8-47fe-bcec-5c3a871a4c39
yuvraj0502/DSA
Sorting Algorithms/InbuiltMethod.cpp
//! It take 2 parameter,first one being the point of array/vectoe from where the sorting need to begin //! second being the length up to which we want the array/vector to get sorted //! The third parameter is optional and can be used in cases such as if we want to sort the element //! lexicographically //! By default...
ALGO
0.99979
5.025497
{ "github_metadata": { "branch": "main", "commit_count": 500, "repo_created_at": "2024-07-28T07:23: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": "2ed58d9e5d...
3f4482fd-3584-43b6-ad93-f6753ef386a8
bbaJay749/Algorithm
BOJ_2631_줄세우기.cpp
#include <cstdio> #include <iostream> #include <vector> #include <stdlib.h> using namespace std; int cal(vector<int> children, int N); int main() { int N = 0, counter = 0; cin >> N; vector<int> children(N, 0); for (int i = 0; i < N; i++) { scanf("%d", &children[i]); } cout << N - cal(children, N) << endl; ...
ALGO
0.99994
3.607913
{ "github_metadata": { "branch": "master", "commit_count": 213, "repo_created_at": "2020-02-14T13:04:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "becf4e0f...
01657046-f27a-471e-800a-ad9ef5e07869
Brandoxx/Parallel_programming
ejercicios/OpenMP/odd_even_sort_serial/src/odd_even_sort_serial.cpp
// Copyright 2022 <NAME> GNU GENERAL PUBLIC LICENSE #include <iostream> #include "UniformRandom.hpp" /** * @brief Generates pseudorandom numbers using a uniform distribution * @param amount is the amount of numbers to generate * @param numbers is the array where the numbers will be stored */ void genRandNumbers(int...
ALGO
0.999867
5.395126
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-01-12T03:31: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": "d2c29965a351...
8cc77b49-773c-4a75-8e2b-1e7dadf311c0
shahaneshantanu/memphys
header_files/solidification.cpp
//Author: Dr. <NAME> #include <stdio.h> #include <math.h> #include <stdlib.h> #include <time.h> #include <float.h> #include <string.h> #include <iostream> #include <vector> #include <algorithm> #include "class.hpp" #include "coefficient_computations.hpp" #include <unistd.h> #include <limits.h> #include <Eigen/Dense> #i...
ALGO
0.999325
4.419413
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2021-01-20T15:51:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7e487b4f0f...
f89ac2fc-9838-4b81-ae78-556524faf9be
rolandjansky/athena
Reconstruction/egamma/egammaUtils/Root/egammaqweta2c.cxx
/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "egammaUtils/egammaqweta2c.h" #include "xAODCaloEvent/CaloCluster.h" #include <cmath> namespace { constexpr float P0A[3] = {0.0045, 0.005375, -0.0562}; constexpr float P1A[3] = {-0.0016, -0.0215, 0.114}; constexpr float P2A[3] =...
ALGO
0.960424
6.458747
{ "github_metadata": { "branch": "master", "commit_count": 100549, "repo_created_at": "2022-08-07T05:54:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "14679...
b8bc6905-d9e2-4143-a7ae-d6f0c915aba6
TheBoje/Headache_Engine
src/3D/Voronoi3D.cpp
#include "Voronoi3D.h" #include "Asserts.h" #include "Logger.h" #include <voro++/voro++.hh> namespace ift3100 { void Voronoi3D::setup(std::vector<ofVec3f> _points, ofBoxPrimitive _bounds) { bounds = _bounds; points = _points; compute(); } void Voronoi3D::update() { // TODO: check if input points changed, if so u...
ALGO
0.944804
6.548812
{ "github_metadata": { "branch": "main", "commit_count": 358, "repo_created_at": "2022-01-13T19:05: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": "7e63c4bcc8...
a6151a64-aa76-4aab-9be5-86a0479f1c76
humbleshashi8104/CP-Solutions
CodeForces/GNU C++17/230B/156245686.cpp
#include <bits/stdc++.h> #include <algorithm> typedef long long ll; typedef long long ll; #define PB push_back #define REP(i, a, b) for(int i = a; i<b; i++) using namespace std; void solve(){ } int main(){ ios::sync_with_stdio(0); cin.tie(0); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); fre...
ALGO
0.999279
5.111385
{ "github_metadata": { "branch": "main", "commit_count": 83, "repo_created_at": "2022-06-09T06:28: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": "f4579daafb5...
31d5429b-bb5e-4fb2-9540-3fb4a8d9d21f
rmtheis/tess-two
tess-two/jni/com_googlecode_tesseract_android/src/ccmain/par_control.cpp
/////////////////////////////////////////////////////////////////////// // File: par_control.cpp // Description: Control code for parallel implementation. // Author: <NAME> // Created: Mon Nov 04 13:23:15 PST 2013 // // (C) Copyright 2013, Google Inc. // Licensed under the Apache License, Version 2.0 (t...
DATA
0.916521
6.632565
{ "github_metadata": { "branch": "master", "commit_count": 375, "repo_created_at": "2011-10-15T11:14:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3775, "forks": 1375, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f...
0d375168-78ef-463a-a51f-3bb77f85bb01
JayQuantRise20/My_Projects
TwoFactorOption.cpp
#ifndef __TWOFACTOROPTION_CPP #define __TWOFACTOROPTION_CPP #include "TwoFactorOption.h" #include "PseudoFactory.h" #include "Ade.h" #include <stdexcept> #include <math.h> #include <iostream> BSTwoFactor::BSTwoFactor(PseudoFactory & fac) : r_(fac.Getr()),T_(fac.GetT()) , K_(fac.GetK()), a_(fac.Geta()), b_(fac.Ge...
ALGO
0.998156
6.219469
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-03-18T12:42:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b0d9e7e0af...
058d71ef-3958-4b04-a4db-e800a47cfe35
rogervdo/CppAlgoritmosRedo
Noviembre/haash.cpp
#include <iostream> #include <sstream> #include <cstring> #include <string> using namespace std; // Una clase para un elemento de la tabla template<class T> class Element { public: string str_key; // Llave string, como "Ana" int int_key; // Llave entera, resultante de la llave string ...
ALGO
0.999561
5.298328
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2025-01-17T06:16:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf76e2f1476...
5e97a8a1-743c-4fc7-af0d-eeb798e45ee7
Dytchem/OI-Notes
Dytchem-ac/Gym/100739B/44634320_AC_218ms_16204kB.cpp
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> using namespace std; const int ma = 2000; int n; int a[100000]; int ans[ma + 1][ma + 1]; int dfs(const int q, const int p) { if (q >= n) return 0; if (q <= ma && ans[q][p]) return ans[q][p]; const int re = a[q] + dfs(q + p, p); if (q <= ma) ans[q][p] = re;...
ALGO
0.999754
3.851911
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-01-14T12:54: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": "2844d4834fc...
ea84221a-3b1e-4ac6-84c0-03d888336d19
thilio/Competitive-programming-team
Trainings/2018 ICPC Asia Jakarta Regional Contest/a.cpp
#include "bits/stdc++.h" using namespace std; #define pb push_back #define mp make_pair #define fst first #define snd second #define fr(i,n) for(int i=0;i<n;i++) #define frr(i,n) for(int i=1;i<=n;i++) #define ms(x,i) memset(x,i,sizeof(x)) #define dbg(x) cout << #x << " = " << x << endl #define all(x) x.begin(),x.en...
ALGO
0.999997
3.184731
{ "github_metadata": { "branch": "main", "commit_count": 391, "repo_created_at": "2021-01-09T16:55:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0b6f7eb1f...
d2289d19-e2f3-408b-b942-e670b471c5f8
ishandutta2007/codeforces-k
krk/normal/1620/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int T; int n, k; ll x; string s; vector <int> V; void Solve(int ind, ll x) { if (ind < 0) return; if (V[ind] == -1) { Solve(ind - 1, x); printf("a"); } else { int wr = x % (V[ind] + 1); Solve(ind - 1, x / ...
ALGO
0.99955
3.505247
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06: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": "fbf9c9703132...
88ef3341-a08a-4601-87f6-9a74dceb83d2
shagunlamba/Competitive-Programming
Trouble Sort.cpp
//https://codeforces.com/contest/1365/problem/B #include<iostream> #include<limits> #include<bits/stdc++.h> #include<algorithm> #include<vector> #include<cmath> #include<math.h> #include<iomanip> #include<deque> #include<string> #include<string.h> #include<unordered_map> #include<utility> #define ll long long #defi...
ALGO
0.999917
3.339664
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-06-26T16:21: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": "5570b600ee...
d7a803b0-9346-47cd-8fd3-9e36c36e8440
CGAL/cgal
Cartesian_kernel/include/CGAL/Cartesian/ft_constructions_2.h
// Copyright (c) 2000 // Utrecht University (The Netherlands), // ETH Zurich (Switzerland), // INRIA Sophia-Antipolis (France), // Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org) // // $URL$ // $Id$ // SPDX-License-Id...
ALGO
0.924604
6.726791
{ "github_metadata": { "branch": "master", "commit_count": 113659, "repo_created_at": "2014-10-01T12:22:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5443, "forks": 1475, "issues": 511, "pull_requests": 136 }, "file_meta": { "content_id...
79bf60a9-e238-4a09-8abc-d89b9436d525
kenkrak/Topcoder
trie.c++
#include<iostream> #include<map> #include<set> #include<string> #include<algorithm> using namespace std; #define ALPHABET_SIZE (26) class TrieNode { public: TrieNode(): suffixes(0),currStr(""),word(false) {} //initializer lists void setIsWord() { word = true; } bool hasWord() { ...
ALGO
0.97043
3.973331
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-02-11T02:38: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": "63a0be9f12...
b5005a44-b9f6-436b-9097-743e8b0c94d6
micmacIGN/micmac
MMVII/include/MMVII_2Include_Tiling.h
#ifndef _MMVII_Tiling_H_ #define _MMVII_Tiling_H_ #include "MMVII_Geom2D.h" #include "MMVII_Geom3D.h" namespace MMVII { template <const int Dim> class cTilingIndex; template <class Type> class cTiling ; /* **************************************** */ /* */ /* ...
ALGO
0.953297
4.005982
{ "github_metadata": { "branch": "master", "commit_count": 10879, "repo_created_at": "2016-11-24T22:09:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 785, "forks": 163, "issues": 83, "pull_requests": 30 }, "file_meta": { "content_id": "3...
8b381d4e-104d-47e1-b67a-3116f2cee196
SHHIOT/attendance_system
AI_make.cpp
// The code can be improved in several ways to make it cleaner, more efficient, and maintainable. Here's a refined version: // ### Improvements: // 1. **Remove unnecessary global variables.** // 2. **Refactor duplicate code into reusable functions** (e.g., the similar logic in `doAction_H()`, `doAction_A()`, etc.). //...
TOOL
0.960095
5.304226
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2024-05-17T17:38:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "05939526e63...
e9016f92-48ba-4502-89b3-363aaabd9c12
Rupert-WLLP-Bai/data_structure_homework
Q3-Win-Make/include/Union_Set.h
//并查集实现 #pragma once class Union_Set { private: int* pre; //存储每个结点的前驱结点 int* rank; //树的高度 int n; //元素个数 public: Union_Set(int N) { n = N; pre = new int[N]; rank = new int[N]; init(N); }; ~Union_Set() { delete[] rank; delete[] pre; ...
ALGO
0.999526
3.636298
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2021-10-12T09:48: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": "7f092bf26...
c883b18d-b92d-4fae-8527-e512a86361cd
ABDElRAHMAN-2003/Problem-Solving
prime_theory.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double lf; #define pp pair<int,int> #define dbg printf("in"); #define NL cout<<'\n'; #define MAX_INT 1000000 #define pi 3.1416 #define Size 100010 #define inf 1000000000000 #define max2(a,b) ((a<b)?b:a) #define max3(a,b,c) max2(max2(...
ALGO
0.9999
3.284525
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-07-23T11:43: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": "ed63b3486b40...
5c767546-d8ee-403a-b581-87e12fe6d091
nmhienbn/Competitive-Programming
Mr.Minh/$History/20210825200053769_063765591466829[BNMINHHIEN][dip].cpp
#include <bits/stdc++.h> #define fi(i, a, b) for(int i = a; i <= b; i++) #define fid(i, a, b) for(int i = a; i >= b; i--) #define pii pair<int,int> #define pb push_back #define ll long long #define faster ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); #define Seraphine "dip" const int maxn = 1e5+5; using...
ALGO
0.999979
4.420095
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2023-02-11T14:40: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": "9264c49efb3...
a14625ad-ef15-4e67-af33-5babb170f8ec
zpcore/ME_557_2016_peizhang
Homework_4/p1/souce_code/HW4.cpp
// HW4.cpp : Defines the entry point for the console application. // // // main.cpp // Texture template for Homework 4 // // Created by <NAME> on 5/28/15. // Copyright (c) 2015 -. All rights reserved. // /*--------------------------------------------------------------------------------- Note, - The code gives ...
TOOL
0.913486
3.587755
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2016-09-05T15:16:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cb5fe4c03...
2e25b0a3-1a8e-4aef-8820-1aa5029059c7
shishir94/CompetitveProgramming
c++newtopics/Graphs/Dijkstrasalgorithm.cpp
// Dijkstra's Algorithm Shortest Path :: /* This algorithm is used to find the shortest path between the nodes. first we will create adjacecny list. Now lets take an example :: 0 --> [1,5] , [2,8] 1 --> [0,5] , [2,9] , [3,2] 2 --> [0,8] , [1,9] , [3,6] 3 --> [1,2] , [2,6] */ // Code :: #include<iostream> #include<b...
ALGO
0.999888
4.688621
{ "github_metadata": { "branch": "main", "commit_count": 120, "repo_created_at": "2022-12-19T10:33: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": "a08051d2a0...
0927baba-fc54-4267-b31f-1a6e7699c1c5
HuangQiang/SAH
kmips/srp_lsh.cc
#include "srp_lsh.h" namespace ip { // ----------------------------------------------------------------------------- SRP_LSH::SRP_LSH( // constructor int n, // cardinality of dataset int d, // dimensionality of dataset int K) ...
ALGO
0.999437
4.343713
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2022-05-22T06:49:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "494b142b8...
efd4f38f-e2f3-451a-99e9-8ee3bf9bdaf6
mmitss/mmitss-az
include/common/LinkedList.h
#pragma once #include "ReqNode.h" using namespace std; template <class T> class LinkedList { private: // pointers maintain access to front and rear of list ReqNode<T> *front, *rear; // used for data retrieval, insertion and deletion ReqNode<T> *prevPtr, *currPtr; // number of elements ...
TOOL
0.990302
5.497925
{ "github_metadata": { "branch": "master", "commit_count": 2450, "repo_created_at": "2018-08-16T16:16:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13, "forks": 5, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "2842637...
d3e13f2b-1cb7-45bd-b430-e7ae6ad95c46
ShahdMohammedSamir/Data-Structures
sort.cpp
#include <iostream> # include <vector> #include <algorithm> using namespace std; bool f = true;//to check if the array is sorted if it already sorted we will terminate the loop void buble_s(vector<int>& s, int n) { for (int i = 0; i < n - 1; i++) { for (int j = 0; j < n - i - 1; j++) { if (s[j] > s[j + 1]) { ...
ALGO
0.999969
3.92082
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-11-29T10:58: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": "6dd6ba136bc...
c9bd0679-08d7-4b20-bc13-c6f285f3772f
balajiofficial/CompetitiveProgramming
Codeforces/519A.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int main() { ios::sync_with_stdio(0); cin.tie(0); int b= 0, w= 0; for(int i = 0; i < 8; ++i) { for(int j = 0; j < 8; ++j) { char a; cin >> a; if (a >= 'A' && a <= 'Z') { if (a == 'Q') w += 9; else if (a == 'R') w += 5;...
ALGO
0.999461
3.917966
{ "github_metadata": { "branch": "main", "commit_count": 135, "repo_created_at": "2020-12-14T09:57: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": "7267dfcb6a...
a446a1a5-f774-497e-995d-56003bd56b38
mateobencek/DSA
Lists/List.cc
#include <iostream> template <class T> class List { template <class X> struct ListElement { X data; ListElement<X> *next; }; ListElement<T> *head = nullptr; public: bool insert(T data) { ListElement<T> *element = new (std::nothrow) ListElement<T>; if (n...
TOOL
0.953887
4.871312
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2021-10-06T14:31: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": "167c9508bef...