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
62ba3264-0f41-400a-9ffe-7d4311ec2824
kripken/ammo.js
bullet/Extras/CDTestFramework/Opcode/OPC_SphereCollider.h
/* * OPCODE - Optimized Collision Detection * http://www.codercorner.com/Opcode.htm * * Copyright (c) 2001-2008 <NAME>, <EMAIL> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission...
ALGO
0.991075
7.328615
{ "github_metadata": { "branch": "main", "commit_count": 434, "repo_created_at": "2011-05-28T23:08:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4355, "forks": 574, "issues": 161, "pull_requests": 14 }, "file_meta": { "content_id": "52...
c09ad8fe-0b03-486a-9357-22b969c348af
nautilus-audio/terminalKeyboard
terminalKeyboard.cpp
//<NAME> //TERMINAL KEYBOARD // // // //to compile: make terminalKeyboard //to run: ./terminalKeyboard // // // #include <iostream> #include <string> #include <stdlib.h> #include <cstdio> #include <string.h> #include <cstdlib> using namespace std; #define NEWLINE '\n' #define LINE "___________________________________...
TOOL
0.905356
3.116469
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-09-11T19:26: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": "0a6ec2965b...
44a60870-dae7-4183-918f-6c30e0b3d53a
A1aM0/DataStructure-and-Algorithm
Leetcode/706-Design_HashMap/main.cpp
/*! * @brief 设计哈希映射 * * 不使用任何内建的哈希表库设计一个哈希映射 * 具体地说,你的设计应该包含以下的功能 * put(key, value):向哈希映射中插入(键,值)的数值对。如果键对应的值已经存在,更新这个值。 * get(key):返回给定的键所对应的值,如果映射中不包含这个键,返回-1。 * remove(key):如果映射中存在这个键,删除这个数值对。 */ #include <iostream> #include <vector> using namespace std; class MyHashMap { public: /** Initialize your da...
ALGO
0.999763
5.549623
{ "github_metadata": { "branch": "master", "commit_count": 267, "repo_created_at": "2019-09-11T06:32: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": "edaa9102...
17f7c0df-cfb8-4c92-92a2-c2c1b1d86a3d
88pramodbhat/solivita-city
bfs.cpp
#include <iostream> using namespace std; void bfs(int m[10][10], int v, int source) { int queue[20]; int front = 0, rear = 0, u, i; int visited[10] = {0}; // Initialize visited array to 0 queue[rear] = source; visited[source] = 1; cout << "The BFS Traversal is:\n"; while (front <= rear) ...
ALGO
0.999971
5.92427
{ "github_metadata": { "branch": "main", "commit_count": 422, "repo_created_at": "2024-12-08T04:07:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e337a7e3f0...
6ac0e626-0382-47ca-a240-d47423f57bf7
jomael/artool
ART/include/art/inline.hpp
/******************************************************************************\ * _____ _ ____ _____ * |_ _|/ \ | _ \ __ _|___ / * | | / _ \ | |_) | \ \ / / |_ \ * | |/ ___ \| __/ \ V / ___) | * ...
TOOL
0.94051
5.534912
{ "github_metadata": { "branch": "master", "commit_count": 168, "repo_created_at": "2018-09-10T22:39:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b71c5e83...
49f63807-f04f-4eb6-a373-48e6ec24e468
GVoronova/IDE_task1
Задание 1.cpp
#include <iostream> #include <fstream> int main() { int count1; int count2; int num; std::ifstream fin("in.txt"); if (fin.is_open()) { fin >> count1; const int size1 = count1; int* arr1 = new int[size1]; for (int i = 0; i < size1; ++i) { fin >> num; arr1[i] = num; } fin >> count2; ...
ALGO
0.999866
3.286282
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-07-22T18:44: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": "078a1bed93b3...
01666cb6-fbc4-492f-a51e-a1e9573b4742
0x0cqq/Codes
codeforces/problem/cf540d.cpp
#include <cstdio> using namespace std; const int MAXN = 110; int TAR = 0; struct Node{ int a[3]; int &operator [](const int n){return a[n];} Node(int x = 0,int y = 0,int z = 0){a[0] = x,a[1] = y,a[2] = z;} }; double dp[MAXN][MAXN][MAXN]; double c(int x){ return x*(x-1)/2; } double dfs(Node x){ int sum =...
ALGO
0.999186
4.356967
{ "github_metadata": { "branch": "master", "commit_count": 330, "repo_created_at": "2018-01-26T02:51:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "66482bb9...
e3473cf4-b935-4377-9c4b-cc4de15a679b
perilouswithadollarsign/cstrike15_src
mathlib/sphere.cpp
//========= Copyright İ Valve Corporation, All rights reserved. ============// #include "sphere.h" //#include "body.h" //#include "gjk.h" //#include "toi.h" //-------------------------------------------------------------------------------------------------- // Local utilities //--------------------------------------...
ALGO
0.997619
6.726464
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2020-04-22T23:35:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1543, "forks": 729, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "bc32...
9a43c316-2742-4003-b6e2-5a99072ec90a
matthewshang/competitive-programming
cf/1341/E.cpp
#include "bits/stdc++.h" using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vector<int>>; using vll = vector<long long>; using pii = pair<int, int>; using pll = pair<long long, long long>; using vpi = vector<pair<int, int>>; #define F first #define S second #define pb push_back #defi...
ALGO
0.999965
3.184558
{ "github_metadata": { "branch": "master", "commit_count": 163, "repo_created_at": "2019-02-08T04: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": "8141051e...
2ebde4dd-cd96-4fca-9896-1a3d994e5d98
g1257/dmrgpp
src/Engine/TimeVectorsKrylov.h
/* Copyright (c) 2009-2012, UT-Battelle, LLC All rights reserved [DMRG++, Version 2.0.0] [by G.A., Oak Ridge National Laboratory] UT Battelle Open Source Software License 11242008 OPEN SOURCE LICENSE Subject to the conditions of this License, each contributor to this software hereby grants, free of charge, to any p...
ALGO
0.991102
5.930365
{ "github_metadata": { "branch": "master", "commit_count": 4290, "repo_created_at": "2010-06-02T17:01:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 43, "forks": 21, "issues": 20, "pull_requests": 0 }, "file_meta": { "content_id": "5fb5...
9a820fc3-f9e4-4661-b0ff-63cc9da4e0a7
TechnicalAmanjeet/Data-Structure-and-Agorithm-in-Cpp
linklist/Doubly_linkedlist.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: Node *prev,*next; int data; }; class dublin{ public: Node *Start=NULL; Node *End=NULL; int count=0; dublin(); bool isempty(); void display(); void totalMember(); voi...
ALGO
0.998519
4.506181
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2021-07-11T16:51: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": "fb2374696...
8dca9223-3c0c-4e3f-843d-be3bdd27fb1e
klevcsoo/deik-bevprog
Drillek/CH04/variant3.cpp
#include <iostream> #include <math.h> #include <vector> #include <map> #include <algorithm> #include <numeric> using namespace std; const map<string, double> m_mappings = { { "cm", 1.0 / 100.0 }, { "m", 1.0 }, { "in", 2.54 / 100.0 }, { "ft", (12.0 * 2.54) / 100 } }; int main() { vector<double> values = {};...
TOOL
0.962587
4.323298
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2021-09-16T12:41: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": "9d79a0724...
57d99e84-b7c2-4efd-a7c4-94c3e44d0a66
rupav/cp
competitive_coding/countDiffWaysToSum.cpp
#include<bits/stdc++.h> using namespace std; #define fr(i,n) for(int i=0; i<n; i++) #define rep(i, st, en) for(int i=st; i<=en; i++) #define repn(i, st, en) for(int i=st; i>=en; i--) #define sq(a) (a*a) typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; ll mod = 1e9+7; ll gcdll(ll a, ll b){ ...
ALGO
0.999952
3.661328
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-01-30T05:56:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "100eef8646e0...
e1302e81-179d-49de-9c1b-6dd7cd39216e
Artemiksss/Algorithms
Lab_06/C. Inserting_into_the_AVL_tree.cpp
#include <iostream> #include <vector> using namespace std; struct Node { int data; int left; int right; Node() = default; Node(int data, int left, int right) : data(data), left(), right(right) {} }; struct AVLTree { struct node { int value; node *left_new; node *righ...
ALGO
0.999809
4.320734
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-06-08T13:07: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": "e17797a43eda...
582d65cb-43f5-41bd-9a77-0e3b123c48ad
luxleo/algorithm-vault
big-stone/week2/problem/2-C.cpp
// // Created by 이동한 on 2025. 1. 16.. // #include <bits/stdc++.h> using namespace std; int dx[4] = {-1, 1, 0, 0}; int dy[4] = {0, 0, -1, 1}; int N, arr[101][101],x,y,nx,ny,ret=0; bool visited[101][101]; void bfs(int iy, int ix,int target) { queue<pair<int,int>> q; q.push(make_pair(iy, ix)); visited[iy][ix] ...
ALGO
0.999844
5.081582
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2025-01-09T16:40: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": "296eaacd513...
67c9d8e4-c89a-4c22-82d8-9098baab2e73
IT-Cotato/9th-Algorithm-Study
dongyoung/chap5/boj/12851.cpp
/** * 12 : 30 start * 13 : 30 end * * BOJ 12851 숨바꼭질 2 골드 4 */ #include <bits/stdc++.h> using namespace std; int n, k; pair<bool, int> vis[100001]; // { 점 도착 여부 , timeCnt } //int vis[100001]; queue<int> q; int main() { ios::sync_with_stdio(0); cin.tie(0); cin >> n >> k; if (n == k) { // 같은 곳에...
ALGO
0.999977
3.78536
{ "github_metadata": { "branch": "main", "commit_count": 124, "repo_created_at": "2024-03-25T14:50:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 6, "issues": 0, "pull_requests": 5 }, "file_meta": { "content_id": "0e3d197b57d...
2d78d75c-74e9-45a7-834a-f5c558a260cb
tiodragon/Codeforces
A_Polycarp_and_the_Day_of_Pi.cpp
#include <bits/stdc++.h> #define ar array #define endl '\n' #define all(z) z.begin(),z.end() #define read(a) for(auto &it:a)cin>>it; #define vi vector<int> #define mii map<int, int> #define vvi vector<vector<int>> using namespace std; using ll = int_fast64_t; const int MAX_N = 1e5 + 1; const ll MOD = 1e9 + 7; const...
ALGO
0.999578
4.110986
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-12-27T11:41:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "41f8e2345071...
4d73f2ad-2cb3-4dd1-b8d7-a0d46b6a91f3
lucastarche/entrenamientou
UC - Universal Cup/UC0329 - Metropolis/UC0329C.cpp
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = (int)(a); i < (int)(b); ++i) #define sz(x) (int)(x.size()) #define all(x) x.begin(), x.end() using namespace std; using ll = long long; using pii = pair<int, int>; using vi = vector<int>; using vii = vector<pii>; using vb = vector<bool>; using vl = vector<ll>;...
ALGO
0.999968
3.38922
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2025-04-23T01:15: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": "6598c521014...
d41ec69e-1165-45cb-8572-a9e261e56edd
Don-cecilia/OOP1
Exercise/Structures/If Set II/number_three.cpp
#include<iostream> using namespace std; struct TAX { float earnings, gender, choice, tax, salary; }; int main() { struct TAX payer1; cout<<"\nChoice Gender\n"; cout<<"\n1. Female\n"; cout<<"\n2. Male\n "; cout<<"\nEnter you...
TOOL
0.984346
3.709273
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-01-11T11:52:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0881544d9b1b...
53f1f48b-040a-4de1-9d4f-8edf252cd0eb
akotadi/Competitive-Programming
Interview/Reference/mergeIntervals.cpp
/** * Merge Intervals algorithm, efficient technique to deal with * overlapping intervals. In a lot of problems involving intervals, * you either need to find overlapping intervals or merge intervals * if they overlap. * * @Complexity * Time O(n) * Space O(n) * * @Identify: * - If ...
ALGO
0.999881
6.443575
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2019-03-21T19:12:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "841603d77...
e05d36b5-5104-4c92-b7b2-5d3477b74e3d
tmedicci/esp-idf-ansic1218
include/ansic1218/crc.hpp
// Copyright 2021 Time Energy Industria e Comercio Ltda // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ap...
ALGO
0.970721
6.484458
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2021-08-28T17:05:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7e56a85ed...
d385bdf8-2fa9-47e4-9dd4-e15d4f67abf9
Chinesezjc/Solved-Problems
CodeForces/CF1562F.cpp
// This Code was made by Chinese_zjc_. #include <bits/stdc++.h> // #define debug unsigned long long seed = std::chrono::system_clock::now().time_since_epoch().count(); std::mt19937 Rand(seed); int T, n, from[200005], ans[100005]; std::vector<int> p; #ifdef debug int val[100005], tim; long long query(int x, int y) { ret...
ALGO
0.999864
3.688641
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2020-12-29T10:37:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c8420e950...
b591e8b3-9ca4-49a5-a0bf-0ba1f974f7c7
goodname427/CPP
algorithm_study/exp5.2/1.cpp
#include <bits/stdc++.h> using namespace std; #define MAX 1000 #define INF 10000 class edge { public: int from; int to; int distance; edge(int from, int to, int distance) : from(from), to(to), distance(distance) {} }; int mat[MAX][MAX]; int m; int n; vector<edge> mat_edge; void init(int inf = INF) {...
ALGO
0.999905
3.051613
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2023-09-14T05:25:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a0ce5d47...
ffb278a6-caf7-4dc4-9e84-e50eb9583af1
AdityaDeore25/LP
4_01KS.cpp
#include<iostream> #include<algorithm> #include<vector> using namespace std; int knapsack(int w, const vector<int>& weights,const vector<int>& profits,int n) { vector<vector<int>> dp(n+1,vector<int>(w+1,0)); for(int i=1;i<=n;i++) { for(int j=0;j<=w;j++) { if(weights[i-1]<=j) ...
ALGO
0.999998
4.996187
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-05T17:58: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": "3fff3cfe1ed1...
390358c6-6993-4805-85fd-987283c085dd
L4plAcEee/TheWayofCode
solution/luogu.com.cn/P1591.cpp
// P1591 阶乘数码 // https://www.luogu.com.cn/problem/P1591 #include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(), (x).end() #ifdef LOCAL #define dbg(x) cerr << #x << " = " << x << '\n' #else #define dbg(x) #endif struct fastio { fastio() { ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);...
ALGO
0.999709
4.577081
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2025-07-13T12:36: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": "35c833c6e6...
2cc07bf0-32eb-4895-a07d-1a68fc53a601
christianbrugger/logiksim
src/core/line_tree.h
#ifndef LOGICSIM_LINE_TREE_H #define LOGICSIM_LINE_TREE_H #include "core/algorithm/range_extended.h" #include "core/component/line_tree/line_store.h" #include "core/format/struct.h" #include "core/vocabulary/connection_id.h" #include "core/vocabulary/length_vector.h" #include "core/vocabulary/orientation.h" #include ...
ALGO
0.931931
7.303031
{ "github_metadata": { "branch": "master", "commit_count": 2050, "repo_created_at": "2022-12-13T13:02:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b2b475...
a8daa0e9-96a2-4088-8f82-96afb074a772
hiroshi-maybe/atcoder
solutions/NegativeDoubling.cpp
#include <bits/stdc++.h> using namespace std; // type alias typedef long long LL; typedef pair<int,int> II; typedef tuple<int,int,int> III; typedef vector<int> VI; typedef vector<string> VS; typedef unordered_map<int,int> MAPII; typedef unordered_set<int> SETI; template<class T> using VV=vector<vector<T>>; // minmax te...
ALGO
0.999966
3.847983
{ "github_metadata": { "branch": "master", "commit_count": 1406, "repo_created_at": "2018-04-21T07:34: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": "18ef200...
06e7dc5f-3162-49b7-8fda-5235c90267ae
antusaha970/My-source-code-DSA
leetcode/gasstation.cpp
#include <iostream> #include <vector> using namespace std; int canCompleteCircuit(vector<int> &gas, vector<int> &cost) { // Frist we will make variable for dificit balance and starting index int dificit = 0; int balance = 0; int start = 0; for (int i = 0; i < gas.size(); i++) { balance...
ALGO
0.99999
5.342606
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2022-09-26T19:01:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5512c5412...
ac5d5d87-63bc-4d55-8b91-e789c256a464
mdarikrayhan/Competitive-Programming
codeforces/333/E.cpp
#include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> #define endl "\n" #define Amgad ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); typedef long long ll; using namespace std; using namespace __gnu_pbds; const double EPS=1e-9; struct point { double x, y; poi...
ALGO
0.999849
4.421974
{ "github_metadata": { "branch": "master", "commit_count": 8052, "repo_created_at": "2022-05-15T11:22:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e6dc7e...
0f241a50-5566-4596-95e6-d39ce7d9c970
qijiezhao/OpticalFlow-SpeedTest
dense_flow/src/dense_warp_flow_gpu.cpp
#include "common.h" #include "dense_flow.h" #include "opencv2/video/tracking.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/calib3d/calib3d.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/features2d/features2d.hp...
DATA
0.980327
4.164626
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-11-23T08:39:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 9, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "8490fed8...
f7dd3000-4bb7-4ca8-96f7-e86079a2a6d7
SAMIUL98SIAM/C-
CPLUSCODES/EXTENSION/main.cpp
/*#include <iostream> using namespace std; void InsertionSort(int arr[], int n) { int i, j, key; for (i = 1; i < n; i++) { key = arr[i]; j = i - 1; while (j >= 0 && arr[j] > key) { arr[j + 1] = arr[j]; j = j + 1; } arr[j + 1] = key; } } void print(int arr[], int n) { cout << "ARRAY: [ "; for ...
ALGO
0.9999
4.92147
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-06-21T18:33: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": "1ce9f534e4...
c87f3bd6-3c48-49c0-bfad-927f0fbaf5f7
flaxinger/BOJAutoPush
백준/Bronze/1924.2007년/2007년.cc
#include <iostream> #include <string.h> using namespace std; int func(int *num, int month){ int result = 0; for(int i = 0; i < month; i++){ result+=num[i]; } return result; } main(){ int a, b; cin >> a >> b; int arr[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; ...
ALGO
0.999865
3.162468
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2022-01-14T07:37: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": "6dbe8166b9c...
77f7b5b9-8c8b-4618-a4f8-110151fc0077
wingerboy/dynamicQR_project
Wiener_filter.cpp
#include "Wiener_filter.h" using namespace cv; using namespace std; Wiener_filter::Wiener_filter(void) { } Wiener_filter::~Wiener_filter(void) { } Mat Wiener_filter::get_recov_mat(const Mat &src,int len,float snr){ if(len<=0)return Mat::zeros(1,1,CV_32F); if(snr<=0)return Mat::zeros(1,1,CV_32F); ori_rows = src....
ALGO
0.983912
4.397465
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-10-10T06:41:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9de7d1ecb9...
565a6c7c-c52f-4e23-b676-2c21de03ded5
vamsi2702/Coa_Assignments
Assignments_ES-215/Assignment1/q2/matrix_multiplication.cpp
#include <iostream> #include <vector> #include <ctime> #include <iomanip> using namespace std; // Function to multiply integer matrices void multiplyIntegerMatrices(const vector<vector<int>>& mat1, const vector<vector<int>>& mat2, vector<vector<int>>& result, int size) { for (int i = 0; i < size; ++i) { f...
ALGO
0.991172
5.976005
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-08-16T17:49: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": "4dd962060ddf...
7d22f9a4-5bb8-46c3-9440-215f7b44aecd
milmillin/comp-prog
UVA/478_PointInFigure.cpp
#include <cstdio> #include <vector> #include <cmath> #include <algorithm> using namespace std; struct r { int i; double xmin,ymax,xmax,ymin; }; struct cc{ int i; double x,y,r; }; struct t{ int i; double x1,y1,x2,y2,x3,y3; }; vector<r> rect; vector<cc> cir; vector<t> tri; double addAng(double x1,double y1, d...
ALGO
0.995329
3.148603
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2022-02-28T08:15: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": "db377b69c60...
f2707dfc-b243-41c2-8417-c308cb545b8b
Llanyro/Distribui2
Distribuidos2/Herramientas/Diccionario.h
#pragma once #include "LineaDiccionario.h" template <class T, class T1> class Diccionario { private: LineaDiccionario<T, T1>* raiz; size_t count; LineaDiccionario<T, T1>* ultimoNodoAccedido; size_t posicionUltimoNodoAccedido; // Complejidad espacial y temporal peor O(n/2) // Complejidad espacial y tempora...
TOOL
0.912696
3.863137
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2019-11-13T15:02: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": "b7bda3fc5...
732b6811-8475-44b1-8136-95268bcc6f59
PandeyAditya14/APS2020
cses/Sorting/Room_Allocation.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> pii; typedef pair<pii,int> p2i3; typedef pair<ll,ll> p64; typedef pair<double,double> pdd; #define mp make_pair #define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) bool comp...
ALGO
0.999988
3.968178
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2020-01-25T06:47:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dadb113de...
eef63c45-594d-49fa-8b65-67c9957d92c1
kiranchaudhary18/C-Que-solution
Que 1.c++
// 1. Write a function to check the grade of a student based on the score: // 90-100: A // 80-89: B // 70-79: C // 60-69: D // Below 60: F // first approach: #include <iostream> #include <string> using namespace std; string checkGrade(int score){ if(score>=90 && score<=100){ ...
ALGO
0.951893
4.162001
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-12-27T05:28: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": "b80af696b859...
8cff492b-9b0f-4672-b9e4-fca872182c0c
tenick/cp
Codeforces/Div3/935/c.cpp
#include <iomanip> #include <iostream> #include <vector> #include <string> #include <cstring> #include <algorithm> #include <numeric> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <cmath> #include <stack> #include <queue> using namespace std; #include <ext/pb_ds/assoc_contai...
ALGO
0.999989
4.294282
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2024-10-10T14:34:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "442c01ec...
42b13af5-ed5d-4d53-a3e5-e0067d82683b
osmtug/PPMSense
PPMSense/NeuralNetwork .cpp
#include "NeuralNetwork.hpp" #include <cmath> #include <cstdlib> #include <ctime> #include <fstream> NeuralNetwork::NeuralNetwork() : learningRate(0.1f) { // initialisation vide ou par défaut } NeuralNetwork::NeuralNetwork(const std::vector<int>& layersSizes, float lr) : layers(layersSizes), learningRate(lr) ...
ALGO
0.903616
4.790168
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2025-06-24T12:42:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "719f02efe...
ef5f5103-aa7c-4302-97c1-1e269d8a4bf3
iiiinfo/faraway
Calcul.cpp
#include "Calcul.h" /* Calcul de position: Prendre en compte les valeurs d'une carte: nombre de ressources, conditions etc Et déduire à partir de ça une valeur "priorité" qui nous dit que devrait être la position de la carte */ uint nbsanctuaires(tabR ER) { uint nb=0; for(uint i=0;i<ER.size()-1;i++) { ...
ALGO
0.916427
3.331317
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-05-12T13:21: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": "c8fc64d407c7...
eb90693e-593e-47c1-8386-87f8aab74614
nafur/adventofcode
2016/4.h
#pragma once #include "../utils/parser.h" #include <algorithm> #include <numeric> #include <regex> #include <tuple> #include <vector> template<> struct solve<4> { static auto solution() { return std::make_pair(245102, 324); } const std::string input = "2016/4.input"; using Room = std::tuple<std::string, int,...
ALGO
0.990077
4.857811
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2017-12-01T09:14: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": "28310e287...
4f38f464-4560-437d-9982-0174bf5900a3
george-radu-cs/y2s2-tema2-alg-genetici
knapsack/src/GeneticAlgorithm.h
#ifndef GENETIC_ALGORITHM_H #define GENETIC_ALGORITHM_H #include <iomanip> #include <fstream> #include <string> #include <limits> #include <sstream> #include <iostream> #include "Chromosome.h" #define OUTPUT_PRECISION 20 class GeneticAlgorithm { private: // settings for the algorithm int population_size{}; ...
ALGO
0.998807
6.376212
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-04-06T08:24: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": "8c93ec3dbe...
9a87beeb-e10f-4a8b-afb7-7fa0acefce9a
JacobDDoS/Competitive_Programming
LeetCode/Hard/1931-Painting.cpp
class Solution { public: int colorTheGrid(int m, int n) { int MOD = 1'000'000'007; map<int, vector<vector<int>>> mp; mp[1].push_back({1}); mp[1].push_back({2}); mp[1].push_back({3}); for (int i=2;i<=m;i++) { for (vector<int>& elm : mp[i-1]) { ...
ALGO
0.999997
4.931011
{ "github_metadata": { "branch": "main", "commit_count": 169, "repo_created_at": "2022-01-02T05:05: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": "491cbe2305...
bb055641-83ab-43cf-bb11-d3dd0197b8f0
visionthinking/OnlineJudge
kAriOJ/bupt-2016-warmming-2/D.cpp.bak.cpp
#include <stdio.h> #include <string.h> #include <math.h> const int MAX = 2001; int numlen(long long x){ char t[20]; sprintf(t, "%lld", x); return strlen(t); } void num2str(long long x, char * c){ sprintf(c, "%010lld", x); int len = strlen(c); for(int i=0;i<len;i+=1){ c[i] -= '0'; } } inline int calc_diff(c...
ALGO
0.996951
3.095944
{ "github_metadata": { "branch": "master", "commit_count": 109, "repo_created_at": "2015-03-29T15:12:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "aef0bb97...
b05e1f35-c208-429f-b1fc-693ed22a030f
luoshunchong/Cplusplus-Leetcode
cppTest/LCP51.cpp
#include <iostream> #include <vector> #include <string> using namespace std; class Solution { public: int res = 0; int perfectMenu(vector<int>& materials, vector<vector<int>>& cookbooks, vector<vector<int>>& attribute, int limit) { backtracking(materials, cookbooks, attribute, limit, 0, 0, 0); ...
ALGO
0.999918
4.402363
{ "github_metadata": { "branch": "main", "commit_count": 152, "repo_created_at": "2021-06-17T02:48: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": "2cd832e45b...
06231761-4072-4b2d-b90e-dcc1cf4b9328
claytonjwong/leetcode
stack_sorted_min_stack/stack_sorted_min_stack/stack_sorted_min_stack.cpp
/* Write a program to sort a stack such that smallest items are on the top. You can use an additional temporary stack, but you may not copy the elements into any other data structure (such as an array). The stack supports the following operations: push, pop, peek, and isEmpty */ #include <iostream> using name...
ALGO
0.999904
5.767932
{ "github_metadata": { "branch": "master", "commit_count": 892, "repo_created_at": "2018-12-28T22:57:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76ada795...
bcad6319-4517-4c44-994e-159dd7ce6c51
u-noob-i/Junior-Training-Sheet
E_Guess_the_Cycle_Size.cpp
#include <iostream> #include <string> #include <vector> #include <set> #include <map> #include <utility> #include <algorithm> #include <math.h> #include <cmath> #include <iomanip> #include <numeric> #include <queue> #include <climits> #include <cfloat> #include <sstream> #include <stack> #include <unordered_set> #inclu...
ALGO
0.998423
3.320521
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-07-22T07: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": "026a755b3099...
9747a77d-ee2e-4df0-b4fb-d0338477f2be
vxl/vxl
contrib/rpl/rgrl/rgrl_est_homography2d.h
#ifndef rgrl_est_homography2d_h_ #define rgrl_est_homography2d_h_ //: // \file // \author <NAME> // \date Oct 2004 #include <rgrl/rgrl_estimator.h> //: homography2D transform estimator // class rgrl_est_homography2d : public rgrl_linear_estimator { public: //: Default constructor // rgrl_est_homography2d(...
ALGO
0.996549
6.706831
{ "github_metadata": { "branch": "master", "commit_count": 42154, "repo_created_at": "2013-05-02T18:32:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 250, "forks": 157, "issues": 49, "pull_requests": 0 }, "file_meta": { "content_id": "38...
8dc13b3f-b197-4e54-bf8b-03d362464e65
FusionSid/aoc2024
src/day01/p1.cpp
#include <fstream> #include <iostream> #include <sstream> #include <stdexcept> #include <string> #include <vector> #include "../utils/utils.h" using std::cin, std::cout, std::string, std::vector; void solve(const vector<string>& input) { vector<int> list1, list2; int lines = 0; for (const string& line :...
ALGO
0.999342
5.295966
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-12-01T08:04:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e03ae44b942...
4f19ab8c-87d0-44f8-8b42-1760327011f2
Diusrex/UVA-Solutions
1586 Molar mass.cpp
#include <iostream> #include <string> #include <iomanip> #include <cstdlib> using namespace std; double weights[128]; int main() { weights['C'] = 12.01; weights['H'] = 1.008; weights['O'] = 16; weights['N'] = 14.01; int T; cin >> T; while (T--) { string str; ...
ALGO
0.983759
3.934293
{ "github_metadata": { "branch": "master", "commit_count": 188, "repo_created_at": "2013-12-15T19:00:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 96, "forks": 66, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "274a05...
283f0025-f45f-4442-9375-59eadf1bef55
SR-Sunny-Raj/Hacktoberfest2021-DSA
29. Codeforces Problems/1579_E1.cpp
// Link for Problem->https://codeforces.com/contest/1579/problem/E1 //We'll process the permutation elements one by one. //For the first element, it doesn't matter which side of the deque we add it to, the result of its addition will be the same — //there will be a sequence of one element (equal to the first permuta...
ALGO
0.999985
4.859781
{ "github_metadata": { "branch": "master", "commit_count": 2783, "repo_created_at": "2020-05-08T05:36:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 236, "forks": 982, "issues": 3, "pull_requests": 161 }, "file_meta": { "content_id": "3...
9cf20903-518f-48bb-beab-f69cbeb4e072
knaeeim/XPSC
week-4/Day-4/B_Petr_and_a_Combination_Lock.cpp
#include<bits/stdc++.h> using namespace std; #define yes cout << "YES\n" #define no cout << "NO\n" #define endl "\n" #define ll long long int #define pub push_back #define pob pop_back #define puf push_front #define pof pop_front #define vi vector<int> #define vll vector<ll> #define vp vector<pair<ll,ll>> #define sorta...
ALGO
0.999939
3.873539
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-11-28T04:09:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc2e79204b13...
efe7fef4-44ff-4c9a-a238-8a6a1bc3037d
harshk461/Practice
Maximum_Value_at_a_Given_Index_in_a_Bounded_Array.cpp
#include <bits/stdc++.h> using namespace std; class Solution { private: long getSum(int n, int index, int x) { int l = min(index, x - 1); int r = min(n - index, x); long lSum = ((x - 1) + (x - 1 - l + 1)) * l / 2; long rSum = (x + (x - r + 1)) * r / 2; return lSum + rSum...
ALGO
0.999857
4.220135
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2022-09-15T08:17:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b5c0e52d3...
e3e37e16-a42e-4a72-974b-b86987df90b2
Pranav10903/LeetCode
Connecting the graph - GFG/connecting-the-graph.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { private: int findPar(int node,vector<int> &parent) { if(node==parent[node]) return node; return parent[node]=findPar(parent[node],parent); } publ...
ALGO
0.999967
6.029877
{ "github_metadata": { "branch": "main", "commit_count": 1445, "repo_created_at": "2022-09-22T13:27:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a87500312...
bb40d5ed-ca14-40f8-a899-431dd1ac7df3
mattjr/structured
re_vision/include/re_vision/STL.h
/* * File: STL.h * Project: DUtils library * Author: <NAME> * Date: November 2010 * Description: STL-related functions * * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, eith...
ALGO
0.9216
6.817401
{ "github_metadata": { "branch": "master", "commit_count": 1457, "repo_created_at": "2013-06-16T23:23:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 15, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "a8a78...
3c09d7f0-2090-4392-944f-1295ae45071a
Lexario-Filini/BSU
Гит 1 курс/2 семестр/Лаб 3 РКПП/Лаб 3 РКПП.cpp
#include <iostream> #include <fstream> #include <regex> #include <string> using namespace std; bool isValidDate(const string& date) { regex dateRegex(R"(^(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/0[0-9]{3}$)"); if (!regex_match(date, dateRegex)) { return false; } int day = stoi(date.substr(0, 2...
ALGO
0.998953
4.620232
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-06-30T09:58: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": "60768f5ee3d8...
094183db-c8de-4f32-8643-25e2272434ba
DanteNardo/Nardo-Chess-Engine
Nardo-Chess-Engine/Nardo-Chess-Engine/Rules.cpp
// Author: <NAME> // Last Modified: 10/20/16 // Purpose: Contains functions to check for game rules such as check. #include "stdafx.h" // This array stores the incremental updaters for diagonals int cdiagonal[4] = { NW, NE, SW, SE }; // This array stores the incremental updaters for rows/cols int crowcol[4] = { N,...
ALGO
0.987154
4.825177
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-10-20T19: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": "c96afd0fa4...
6ec213e0-de75-4586-99d6-32389b20d3a5
jackschuld/Leet_Code
2.add-two-numbers.cpp
/* * @lc app=leetcode id=2 lang=cpp * * [2] Add Two Numbers */ // @lc code=start // 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) {} // }; #include...
ALGO
0.999899
6.744678
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2023-03-30T16:59:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7cb467458c...
9a5b41cf-71f8-49e9-9209-b3e7431b8dd4
rsln-s/aggregative-coarsening-for-multilevel-hypergraph-partitioning
packages/shylu/tacho/refactor/src/Tacho_IncompleteSymbolicFactorization.hpp
#ifndef __TACHO_INCOMPLETE_SYMBOLIC_FACTORIZATION_HPP__ #define __TACHO_INCOMPLETE_SYMBOLIC_FACTORIZATION_HPP__ /// \file symbolic_factor_helper.hpp /// \brief The class compute a nonzero pattern with a given level of fills /// \author <NAME> (<EMAIL>) #include "Tacho_Util.hpp" namespace Tacho { template<typename...
ALGO
0.96059
5.332199
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-04-04T20:05:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f91efd9b8...
01f559af-670e-4310-8cfa-0062cc756314
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/09/0919/personal_submission/cf309a_dinghc.cpp
#include <bits/stdc++.h> using namespace std; constexpr int N = 1'000'000; int a[N * 2]; int main() { int n, l, t; scanf("%d%d%d", &n, &l, &t); for (int i = 0; i < n; i++) { scanf("%d", &a[i]); a[i + n] = a[i] + l; } double ans = 1LL * (n - 1) * n / 2 * (t / l); t %= l; lon...
ALGO
0.999171
4.440149
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "8291...
8fb9caf3-fa7b-440a-82c5-62691dfb90ff
VakaReshma/All-My-Learning-Tech-Skills
learn programming/5.bubblesort,selectionsort,insertionsort.cpp
// bubble sort // remember three things // assanding ordwe // takes flag element // loops countunie up to n-i this decreses the space complexity //stable sorting //how many total no of swaps required to sorted arrays n elements // formula: (n(n-1))/2 // ex=(5*(5-1))/2=10 10 swaps required. // bubble sort alorithm...
ALGO
0.999264
4.940466
{ "github_metadata": { "branch": "main", "commit_count": 90, "repo_created_at": "2023-03-14T07:05: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": "18ab53c34cf...
d3c4b08b-fe86-4889-a333-bbe68de4bbde
niyaznigmatullin/nncontests
utils/IdeaProject/archive/unsorted/2014.11/2014.11.02 - Siberian Grand Prix/88.cpp
#include <set> #include <cstdio> using namespace std; int n; int const N = 2222; double D[2222 * 2222]; int id[N]; int g[N]; int was[N]; inline double & d(int x, int y) { if (x < y) std::swap(x, y); return D[x * n + y]; } inline int mp(int i, int j) { if (i < j) std::swap(i, j); return i * n + j; } struct...
ALGO
0.999859
3.165692
{ "github_metadata": { "branch": "master", "commit_count": 149, "repo_created_at": "2015-06-05T12:48:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "20cc274c...
91a5b683-08fc-4066-a015-432116c0388a
hiroshi-maybe/atcoder
solutions/Ki.cpp
#include <bits/stdc++.h> using namespace std; // type alias typedef long long LL; typedef pair<int,int> II; typedef tuple<int,int,int> III; typedef vector<int> VI; typedef vector<string> VS; typedef unordered_map<int,int> MAPII; typedef unordered_set<int> SETI; template<class T> using VV=vector<vector<T>>; // minmax te...
ALGO
0.999936
4.448791
{ "github_metadata": { "branch": "master", "commit_count": 1406, "repo_created_at": "2018-04-21T07:34: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": "90ef7d5...
0ffba9f1-49cb-4da8-bc03-60ae33bea277
Nwon2464/cpp
atcoder192/c.cpp
#include <algorithm> #include <array> #include <cassert> #include <chrono> #include <cmath> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <vector> using namespace std; using ll = long long; #...
ALGO
0.999977
4.230438
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2021-03-14T14:54:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f633292d...
2e4503de-7ae5-47bb-95c2-7df074e00177
lieahau/Online-Judge-Solution
Codeforces/950B_Intercepted Message.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; int x[n+5], y[m+5], rsqX[n+5], rsqY[m+5]; cin >> x[0]; rsqX[0] = x[0]; for(int i = 1; i < n; i ++) { cin >> x[i]; rsqX[i] = rsqX[i-1] + x[i]; } cin >> y[0]; rsqY[0] = y[0]; ...
ALGO
0.999982
3.31295
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-04-13T10:07:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fc5ad5fe0a...
25478a80-99e8-43d1-995a-f77e509a3064
bamboohiko/problemSolve
swjtu/e20150526/pe.cpp
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> using namespace std; double const pi = acos(-1); struct point { double x,y; }; struct line { double k,b; b...
ALGO
0.999555
4.070143
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2015-12-13T17:03: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": "17df07f75...
a2d4f18b-95fc-4254-84cc-1faef7410a1d
devclub-iitd/SDE-Prep
problem-of-the-day/day05/LRU Cache.cpp
class LRUCache { public: class Node{ public: int key; int val; Node* prev; Node* next; Node(int key, int val){ this->key = key; this->val = val; } }; Node* head = new Node(-1, -1); Node* ta...
ALGO
0.999466
5.736375
{ "github_metadata": { "branch": "main", "commit_count": 153, "repo_created_at": "2024-05-23T03:36:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 89, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e4c4b350...
2342f221-5d48-4181-a363-b3c4be31c148
saaras-io/yastack
ev/source/common/http/http2/conn_pool.h
#pragma once #include <cstdint> #include <list> #include <memory> #include "envoy/event/timer.h" #include "envoy/http/conn_pool.h" #include "envoy/network/connection.h" #include "envoy/stats/timespan.h" #include "envoy/upstream/upstream.h" #include "common/http/codec_client.h" namespace Envoy { namespace Http { nam...
WEB
0.906072
7.377007
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2018-11-21T01:41:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 103, "forks": 19, "issues": 7, "pull_requests": 4 }, "file_meta": { "content_id": "42044a7...
7af8365a-9b5d-4166-acd8-478515e3e497
ethz-adrl/control-toolbox
ct_core/examples/src/DampedOscillator.cpp
/*! * \brief This is a very basic example showing how to instantiate a system (an oscillator in this case) * and forward integrate it over time. * * \example DampedOscillator.cpp */ #include <ct/core/core.h> int main(int argc, char** argv) { // a damped oscillator has two states, position and velocity co...
ALGO
0.938508
6.061218
{ "github_metadata": { "branch": "v3.0.2", "commit_count": 1871, "repo_created_at": "2019-04-25T21:55:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1596, "forks": 332, "issues": 59, "pull_requests": 4 }, "file_meta": { "content_id": "40...
0b6dbeaf-75cb-40a3-b870-d74e95f01db3
Jay7221/competitve-programming
codechef/starters/Starters68/D.cpp
#include<iostream> #include<algorithm> using namespace std; void solve(){ int n; cin >> n; int a[n], ans[n]; for(int i = 0; i < n; ++i) { cin >> a[i]; } sort(a, a + n); for(int i = 0, j = 1; i < n / 2; ++i, j += 2) { ans[j] = a[i]; } for(int i = n / 2, j = 0; i < n; ++i, j += 2) { ans[j] = a[i]; } b...
ALGO
0.999931
3.890452
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-12-20T15:54:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0dcf93573ea...
06e456bc-a4af-46ef-9798-6201afd0ce58
hamzaarif12345/Compiler_Construction
CC_lab_2_ver_2.cpp
#include <bits/stdc++.h> #include <typeinfo> using namespace std; class sol(){ public: string result; stack<int> st2; string result1; int prec(char c); int op(char c); void infixToPostfix(string s); void sol::infixToPostfix2(string s); string infix_to_...
ALGO
0.999849
4.91804
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-01-31T17:23:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "762c8aed9aed...
2e885bc2-5d09-4602-9bea-633360322e3d
jorgep4/RobotCuadrupedo
main/robotfunctions.cpp
#include <math.h> #include "stdio.h" #include <robotfunctions.hpp> #include "PCA9685.hpp" #include "MPU6050.hpp" #include "globals.hpp" float pitch_data; float roll_data; float yaw_data; long int last_time; long int current_time; long int elapsed_time; float last_error_pitch; float last_error_roll; float last_error_ya...
ALGO
0.989819
3.204024
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-01-23T13:13:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c4e2058dc47a...
dcc01c8e-9973-4362-b444-fc90635eb68e
mbellman/ramen-cat
gamma/math/utilities.h
#pragma once #include <cmath> constexpr float Gm_PI = 3.141592f; constexpr float Gm_TAU = Gm_PI * 2.f; constexpr float Gm_HALF_PI = Gm_PI / 2.f; constexpr float Gm_FLOAT_MAX = 3.402823466e+38F; inline float Gm_Absf(float value) { return value < 0.f ? -value : value; } inline float Gm_Minf(float value, float min) ...
TOOL
0.930179
6.952339
{ "github_metadata": { "branch": "master", "commit_count": 912, "repo_created_at": "2022-09-13T00:18:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f5e1b3af...
0fc48d6b-0cb0-4221-8cbb-fea3e2f34db7
residentevil35/CPPExercises
Ch.2 Part 12 Land Calculation.cpp
/******************************************************************************** * <NAME> * * Starting Out with C++ From Control Structures Through Objects 8th Edition * * Programming Challenges - Chapter 2 ...
TOOL
0.994736
4.133722
{ "github_metadata": { "branch": "main", "commit_count": 71, "repo_created_at": "2020-11-06T16:46:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04ceeb3b2c0...
b4c598c8-0ea7-43ae-b832-89d8199d5fb7
baewoojin514/algorithm
floydWarshall/1956-c++.cpp
//운동(1956) //플로이드 와샬 알고리즘으로 해결할 수 있다. //skill.1 - 플로이드 와샬 알고리즘을 통해 이차원 distance 배열을 갱신한다. //skill.2 - i,j == j,i 인 경로의 합의 최소값을 구하면 된다. #include <iostream> #include <algorithm> #include <cstdio> #include <vector> #include <cstring> #define MAX 400 #define INF 1e9 using namespace std; int dist[MAX][MAX]; int result; ...
ALGO
0.999944
4.144229
{ "github_metadata": { "branch": "master", "commit_count": 702, "repo_created_at": "2020-10-25T04:23:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60020950...
5597b9eb-7ad9-4d4c-9f99-8df68ce051ac
SatvikTripathi/DSA-notes-and-vsc-
map.cpp
// #include <iostream> // #include <map> #include <bits/stdc++.h> using namespace std; // *** Maps *** /* 1. Data is stored in key value pairs 2. Keys are always unique and can only point at one value 3. A number of keys can point at the same value 4. Maps are also sorted automatcially, unordered maps are not */ int...
TOOL
0.977528
4.221987
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-09-18T12:41: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": "04d703b39643...
e6d67c22-0ce3-466b-8ceb-b31d0d792069
callaby/clickhouse-gpu
clickhouse-gpu/libs/libconsistent-hashing/mailru/sumbur.cpp
//Copyright (c) 2011-2012 Mail.RU //Copyright (c) 2011-2012 <NAME> //Copyright (c) 2012 <NAME> aka funny-falcon // //MIT License // //Permission is hereby granted, free of charge, to any person obtaining //a copy of this software and associated documentation files (the //"Software"), to deal in the Software without res...
ALGO
0.987274
5.291825
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-02-11T02:02:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 4, "issues": 1, "pull_requests": 7 }, "file_meta": { "content_id": "936587173...
0242362f-ece5-4e05-b5fe-87cdfc9f5322
haunt98/HCMUS-Lectures
3_OOP/ThucHanh-T4/Bai01/SortAlgorithm.h
#include "HOCSINH.H" #include <stdlib.h> template <class T> class SortAlgorithm { private: static SortAlgorithm *_algorithm; void (*currentAlgorithm)(T *, int); SortAlgorithm(); public: static SortAlgorithm *getObject(void (*pAlg)(T *, int)); static void InsertionSort(T *, int); static void Intercha...
ALGO
0.998059
3.905813
{ "github_metadata": { "branch": "master", "commit_count": 270, "repo_created_at": "2017-03-21T02:22:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68f9390...
1dd8afee-e925-4d94-880a-83b49363c071
PlugFox/fuchsia
src/ui/scenic/lib/flatland/link_system.h
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SRC_UI_SCENIC_LIB_FLATLAND_LINK_SYSTEM_H_ #define SRC_UI_SCENIC_LIB_FLATLAND_LINK_SYSTEM_H_ #include <fuchsia/ui/composition/cpp/fidl.h> #include ...
TOOL
0.910629
4.888665
{ "github_metadata": { "branch": "main", "commit_count": 120081, "repo_created_at": "2021-12-29T09:59:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "16bef7a...
ad32c69b-03f8-4c54-8065-8c99a1bbb9f1
jaredhoberock/thrust-workshop
fun_with_points/thrust/system/omp/detail/copy.inl
/* * Copyright 2008-2012 NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
ALGO
0.986965
7.577529
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2013-02-13T01:04:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 44, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82e07a3...
26f5c397-561a-4af8-8f5a-1159f539bb6c
ishandutta2007/codeforces-a
avinashkartik/normal/1367/E.cpp
#pragma optimization_level 3 #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx") #include<bits/stdc++.h> using namespace std; #define fastio ios:: sync_with_stdio(0);cin.tie(0);cout.tie(0);cout<<fixed;cout<<setprecision...
ALGO
0.999921
3.808413
{ "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": "22c1080acd58...
d2dfa0a6-1051-44bf-a797-46fadc8fbca1
KGChristensen/Advent-of-Code-2024
AdventOfCode/Day06GuardGallivant2/Day06GuardGallivant2.cpp
// Day06GuardGallivant2.cpp : This file contains the 'main' function. Program execution begins and ends there. // #if defined(__GNUC__) ||defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wc++98-compat" #pragma GCC diagnostic ignored "-Wc++98-compat-pedantic" #endif #include <chrono> #in...
ALGO
0.999865
5.164979
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2024-12-06T09:18:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc75fee376d...
db54a57b-4917-45d1-8afa-07bbb8fd0ef6
SufBit/CSCE2110
Project1_SimCity/main.cpp
#include <vector> #include <iostream> #include "operations.h" using namespace std; int main() { Config config; State state; string configFileName = "config1.txt"; cout << "Enter config file name : "; //cin >> configFileName; //Loading config loadConfig(configFileName, confi...
ALGO
0.965398
4.620492
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-16T23:24: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": "749b30c85e1a...
f1d115e1-39a1-4d02-aeb6-89137e8b2175
postusername/nn-benchmark
hnsw/hnsw.cpp
#include <algorithm> #include <chrono> #include <cmath> #include "hnsw.hpp" HNSW::HNSW( std::shared_ptr<DistanceMetric> metric, size_t max_connections, size_t max_connections_layer0, size_t ef_construction, size_t ef_search, double ml ) : NearestNeighborAlgorithm(std::move(metric)) ...
ALGO
0.999571
6.260668
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-05-25T10:09:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f990f414499...
5a0baa00-72ed-4111-bbcf-6bdb39e9d343
belanasaikiran/DSA-OS-Others
LeetCode/6_ZigZag.cpp
#include <iostream> #include <string> #include <vector> using namespace std; // Zig Zag Conversion class Solution { public: string convert(string s, int numRows) { if(s.length() <= 1) return s; vector<vector<char>> rows(numRows); int j = 0; int k = 0; int i = 0; wh...
ALGO
0.999999
5.3146
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2024-08-28T18:40: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": "8d1de6af0aa...
15aebc09-f345-4237-b7b2-73eea2e772f6
LambdaRan/online-programming
leetcode/prob100.cpp
#include <iostream> #include <algorithm> #include <sstream> #include <functional> #include <utility> #include <vector> #include <string> #include <stack> //#include <stdio.h> using namespace std; /* * Name: 100. Same Tree * Website: https://leetcode.com/problems/same-tree/description/ * Description: * */ struct ...
ALGO
0.999779
5.868852
{ "github_metadata": { "branch": "master", "commit_count": 218, "repo_created_at": "2018-01-18T13:17: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": "70838696...
f6708e2e-c978-4a8c-9840-59f0d04ed5ef
Blackfury7/LeetCode
622-design-circular-queue/622-design-circular-queue.cpp
class MyCircularQueue { // queue - // frontIndex - head/front of queue // qSize - current size of queue // k - max capacity of queue vector<int> queue; int frontIndex, qSize, k; public: MyCircularQueue(int _k) : queue(vector<int>(_k)), frontIndex(0), qSize(0), k(_k) { } ...
ALGO
0.998851
5.698152
{ "github_metadata": { "branch": "main", "commit_count": 3592, "repo_created_at": "2022-02-25T14:59:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a9c436a29...
19b428d5-f276-4947-8274-e6714a9186f4
mauriciovillalobos05/DataStructure-Algorythms
AVLTrees/AVLTrees.cpp
// // Created by maugv on 31/10/2024. // #include "AVLTrees.h" // Constructor de la clase AVLTree, inicializa la raíz como nullptr. template <typename T> AVLTree<T>::AVLTree() : root(nullptr) {} // Calcula la altura de un nodo dado. Si el nodo es nullptr, devuelve 0. template <typename T> int AVLTree<T>::height(AVLN...
ALGO
0.999675
5.908385
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-08-10T00:26: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": "4c827aa70932...
bc848f6e-854d-419b-ad5b-693471df8860
rainbow-auto/rainbow-codes
Luogu/CF2014H.cpp
#include <bits/stdc++.h> // #pragma GCC optimize(2) using i64 = long long; using u64 = unsigned long long; using f64 = long double; #define fastread std::ios::sync_with_stdio (false); std::cin.tie(nullptr); #define rep(QWQ, qwq, qaq) for (i64 QWQ = (qwq); (QWQ) <= (qaq); QWQ++) #define per(QWQ, qwq, qaq) for (i64 QW...
ALGO
0.999983
4.794789
{ "github_metadata": { "branch": "master", "commit_count": 749, "repo_created_at": "2024-09-07T02:10:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "37ba3ffa...
47cf6c13-9f7e-4256-bc49-bcd2010ab511
fpdjsns/Algorithm
BOJ/DP/5502. 팰린드롬.cpp
/* * 문제 : https://www.acmicpc.net/problem/5502 * 시간복잡도 : O(N^2) * 알고리즘 : DP, LCS(Longest Common Subsequence) */ #include <vector> #include <algorithm> #include <iostream> #include <string> using namespace std; int N; string s; // dp[i][j] = s[~i] reverse_s[~j] 최장 공통 subsequence 길이 vector<vector<int>> dp; int g...
ALGO
0.999982
4.852751
{ "github_metadata": { "branch": "master", "commit_count": 766, "repo_created_at": "2018-03-20T14:36:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c3ecc7f...
f8b300da-b1a1-4469-9d4c-107450c038a6
meysamaghighi/Kattis
The SetStack Computer/a.cpp
// <NAME> #include <iostream> #include <cstdio> #include <stack> #include <cstring> #include <set> #include <map> #include <vector> #include <algorithm> using namespace std; typedef set <int> SET; map <SET,int> keys; vector <SET> sets; int getKey(SET x){ if (keys.count(x)) return keys[x]; sets.push_back(x); ...
ALGO
0.998574
4.368373
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2016-04-06T09:04:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fc3f9362d...
6cdbe694-5d70-4e27-a7ec-c3d007e087cd
AlessandroConti11/Sorting_Network
odd-even_mergesort/odd_even_mergesort.cpp
#include "odd_even_mergesort.h" /** * Odd-even mergesort algorithm. * * @warning work only with array.size() divisible by 2^k. * * @param array the unsorted array. */ void Odd_Even_Mergesort::odd_even_mergesort(vector<int>& array) { mergesort_odd_even(array, 0, static_cast<int>(array.size())); } /** * Th...
ALGO
0.999988
5.859584
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2025-03-19T15:12: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": "fe0144d80...
3535ff98-5199-4ed8-bf11-9b35430b89fb
Vizroi/Engine56
Engine/Source/Runtime/Core/Private/Math/UnrealMath.cpp
// Copyright Epic Games, Inc. All Rights Reserved. /*============================================================================= UnMath.cpp: Unreal math routines =============================================================================*/ #include "Math/UnrealMath.h" #include "Stats/Stats.h" #include "Math/Rand...
TOOL
0.974165
5.853834
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-23T09:47: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": "1a75e2a5d560...
a12681ec-7ef6-4bce-808d-59cab3a913bf
yunruowu/LeetCode
useforme.h
/* * @Description: 文件用来包含所有解题头文件,结构 * @Version: 2.0 * @Author: yunruowu * @Date: 2020-02-02 10:30:03 * @LastEditors: yunruowu * @LastEditTime: 2020-03-14 10:54:14 */ #include <iostream> #include<vector> #include<stack> #include<map> #include<queue> #include<string> #include<algorithm> #include<ctype.h> #includ...
ALGO
0.999679
3.044557
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2019-12-28T00:10:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e01269abe...
18d09c97-349c-4c1a-a02a-18455f3adae0
wldn143/ProblemSolving
백준/그래프이론, DFS, BFS/boj7569.cpp
#include <iostream> #include <algorithm> #include <queue> #include <tuple> using namespace std; int m, n, h; int box[101][101][101]; int visited[101][101][101]; int dy[4] = {0, 1, 0, -1}, dx[4] = {1, 0, -1, 0}; int res; queue<tuple<int, int, int>> q; int main() { ios::sync_with_stdio(false); cin.tie(NULL); ...
ALGO
0.999944
3.936366
{ "github_metadata": { "branch": "main", "commit_count": 256, "repo_created_at": "2022-02-08T13:56: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": "80b68df45d...
9306190e-9a83-4150-8c20-8bb9ef4e217c
mwy3055/Algorithm-codes
baekjoon/cpp/c++/13141.cpp
#include <bits/stdc++.h> using pii = std::pair<int, int>; // cost, dest int n, m; std::vector<pii> graph[201]; void getinput() { std::cin >> n >> m; for (int i = 0; i < m; i++) { int a, b, c; std::cin >> a >> b >> c; graph[a].emplace_back(c, b); graph[b].emplace_back(c, a)...
ALGO
0.999344
3.937164
{ "github_metadata": { "branch": "main", "commit_count": 1073, "repo_created_at": "2022-01-08T11:18:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "67cca17c7...
c39edb3a-5a7d-4f01-afd6-e1da783021ef
t-crest/s4noc
noc-sched/include/heuristic.h
// // This file is part of the s4NoC's noc-sched. // noc-sched is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // noc-sched...
ALGO
0.973703
5.892143
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2011-12-07T08:52:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0bedb2ef9...
d27884fe-577a-4c39-afeb-86e60c891de0
kmjp/procon
srm/811-850/847/NoQuickGrowth.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<to;x++) #define FORR(x,arr) for(auto& x:arr) #define FORR2(x,y,arr) for(auto& [x,y]:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #defin...
ALGO
0.999758
4.234164
{ "github_metadata": { "branch": "master", "commit_count": 3966, "repo_created_at": "2015-02-15T11:25:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 2, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "b0494b...
bfc6bacc-f3da-43e8-86ae-a10c9102f66c
shriramkv/SYCLwithIDC
RenderingToolkit/Tutorial/IntroToRayTracingWithEmbree/cpu/src/rkRayTracer.cpp
#ifdef _MSC_VER #ifndef NOMINMAX /* use the c++ library min and max instead of the MSVS macros */ /* rkcommon will define this macro upon CMake import */ #define NOMINMAX #endif #endif #include <embree4/rtcore.h> #include <rkcommon/math/vec.h> #include <rkcommon/memory/malloc.h> #include <tbb/parallel_for.h> #define S...
ALGO
0.949949
5.982486
{ "github_metadata": { "branch": "master", "commit_count": 1561, "repo_created_at": "2023-08-30T10:10: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": "9bdab04...