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
4e4d5cf9-eda1-4054-9e3a-1a0ef49b2546
sasobadovinac/Nektar
library/LocalRegions/Expansion.cpp
/////////////////////////////////////////////////////////////////////////////// // // File: Expansion.cpp // // For more information, please see: http://www.nektar.info // // The MIT License // // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA), // Department of Aeronautics, Imperial College ...
ALGO
0.968973
6.47323
{ "github_metadata": { "branch": "master", "commit_count": 17085, "repo_created_at": "2023-08-25T12:15: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": "bd1dfc...
f28b19bf-b9f0-486c-8f4f-1fb3eddd5264
cseruhul/problem_solving_journey
Phitron/05. XPSC Journey/01. XPSC 06 Newbie Problem Solvers Zone/05. Week 05/05. Day 04/B_Segment_with_Big_Sum.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int class Ruhul_Amin { public: void solve() { int n; ll k; cin >> n >> k; vector<ll> arr(n); for (auto &item : arr) cin >> item; ll ans = LLONG_MAX, sum = 0; ll l = 0, r = 0;...
ALGO
0.999966
4.330447
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2025-04-14T09:09: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": "4a9cc3495d6...
55b4636e-08f8-42a8-85b4-14c7019ea30d
duram21/baekjoon
백준/Gold/11567. 선진이의 겨울 왕국/선진이의 겨울 왕국.cc
#include <bits/stdc++.h> using namespace std; using ll = long long; ll n, q, a, b, c, m1, m2, tc, d, k, m, l, r, x; char arr[505][505]; string str; ll dx[] = { -1, 0, 0, 1 }; ll dy[] = { 0, -1, 1, 0 }; bool visited[505][505]; ll ans = 0; ll ax, ay, bx, by; void bfs(ll x, ll y) { queue<pair<ll, ll>>q; q.push({ x, y...
ALGO
0.999959
4.381842
{ "github_metadata": { "branch": "main", "commit_count": 358, "repo_created_at": "2024-12-02T00:07: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": "6f18f95bea...
29f0e47b-cc64-46fa-a01a-c7025a934ea1
baibolatovads/work
lab 7/h.cpp
/*Даны два числа n и m. Создайте двумерный массив A[n][m], заполните его таблицей умножения A[i][j]=i*j и выведите на экран. При этом нельзя использовать вложенные циклы, все заполнение массива должно производиться одним циклом. Входные данные Программа получает на вход два числа n и m – количество строк и столбцов,...
ALGO
0.999569
4.249111
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-09-24T19:45: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": "b4a786a059...
d5a3dc86-1b7e-4ebc-b0be-d0f13ebf9268
0000duck/Cloud
lateral_rolling_gait.cpp
/** * @file lateral_rolling.cpp * @brief * @author Hiroki_SUHARA * @date 2016/09/13 * @detail */ #include <ros/ros.h> #include <cmath> #include "lateral_rolling_gait.h" /** @fn * @brief * @param double A * @detail * */ void LateralRollingGait::set_A(double A){ A_ = A; } /** @fn * @brief * @param...
TOOL
0.968131
4.944308
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2021-07-21T07: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": "83dc59f26...
9f05c3ba-9361-4f61-94ea-cfb9f7d35ed6
qiweiyang2018/Tic-Tac-Toe
Agent.h
// // Created by qiwei on 4/26/2019. // #ifndef TTT_AGENT_H #define TTT_AGENT_H #include <string> using namespace std; class Agent { friend class Board; //in order to change the board class member public: Agent(); //default constructor static int count; //static variable to record how many instance objects hav...
ALGO
0.957315
4.70627
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-04-26T19:28: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": "058e61dda...
fc5c14c5-0ba6-415a-bac8-29a35536f87f
SumitM28/Cpp
26_heaps/05_BstToMinHeap.cpp
#include <iostream> #include <queue> using namespace std; class Node { public: int data; Node *left; Node *right; Node(int data) { this->data = data; this->left = NULL; this->right = NULL; } }; void insertInBST(Node *&root, int data) { if (root == NULL) { ...
ALGO
0.999986
4.680563
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2022-10-02T14:09: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": "918b0a23769...
bebb8563-af83-46da-a5e6-ce8e2ce6c1a3
SyncShinee/ACM-ICPC
ACMContest/2015Multi-UniversityTraining/Contest8/1007.cpp
#include <cstdio> #include <queue> #include <cstring> #include <vector> #include <stack> using namespace std; int b[128][128], h[128][128], l[128][128]; bool usedh[128], usedl[128], used[512]; stack <int> sta; int n, m; int main() { //freopen("in.txt", "r", stdin); int T, x, y, sum; char s[2]; scanf("%d", &T); whi...
ALGO
0.999529
3.028805
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2015-05-07T06:24:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b09206e0...
5758a51c-574a-415e-94e1-8d7488b0c3c5
BazukaOC/SpeechProcessing-HW2-HMM
HMM.cpp
#include "HMM.h" double LogAdd(double x, double y) { double temp, diff, z; if (x < y) { temp = x; x = y; y = temp; } diff = y-x; // notice that diff <= 0 if (diff < minLogExp) // if y' is far smaller than x' return (x < LSMALL) ? LZERO : x; else { z = exp(diff)...
ALGO
0.999269
3.914337
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2015-05-02T08:19:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65259568e9...
94d872da-fc4f-44ab-bfce-cbecbbe13ae0
Thevizin/CK0180---ESTRUTURAS-DE-DADOS
P1/exe-05/dictionary.cpp
#include <iostream> using namespace std; struct Pair{ int key; char valor; }; struct Dictionary{ Pair vector[100]; int size; }; void boot(Dictionary &d){ d.size = 0; } int search(Dictionary dictionary, int key){ for(int i = 0; i < dictionary.size; i++){ if(dictionary.vector[i].key == key){ ret...
ALGO
0.985069
3.959617
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2024-03-17T15:28: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": "25d08c18d3f...
a6789e3a-0429-4299-9b1a-a0b2df67d38d
carlosmanri/AdventOfCode2022
05/2/main.cpp
#include <iostream> #include <stack> #include <fstream> #include <string> #include <assert.h> using namespace std; void populate(stack<char> (&stacks)[9]); int main() { stack<char> stacks[9]; stack<char> tmp_stack; populate(stacks); ifstream file("input.txt"); string line; int crates, from, ...
ALGO
0.999312
5.098388
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2022-12-02T10:44:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b898e7b6...
a905f760-abd9-404b-a03a-ead9972e4c2b
milkyway20021012/Code
CPP/vector/main.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; void test01() { vector<int> v; v.push_back(1); v.push_back(2); v.push_back(3); v.push_back(4); v.push_back(5); v.push_back(6); for (size_t i = 0; i < v.size(); ++i) { cout << ...
ALGO
0.997231
4.08896
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2025-05-25T10:24: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": "a66c9d830bc...
a5a56e89-f685-4a45-9b28-41ae39bdbe13
bobrik/bsuir
3rd semester/mois/lab1/3 variant/collections.cpp
/* Calculates symmetric difference of any sets. Input from file "collections.in". Copyright 2009 <NAME> (email : <EMAIL>) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the lic...
ALGO
0.995827
5.179585
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2009-09-20T21:36:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19ba5dfd2...
8d70d9c2-c241-422a-a5df-c20f3069aca8
nishgpt/competitive_programming
facebook/hackercup2021/round1/QB/B_validator.cpp
/* Author : <NAME> 2.0 */ #include<bits/stdc++.h> using namespace std; #define LL long long int #define getcx getchar_unlocked #define X first #define Y second #define PB push_back #define MP make_pair #define MAX 100005 #define LOG_MAX 20 #define MOD 1000000007 #define INF 0x3f3f3f3f #define INFL (LL(1e18)) #define ...
ALGO
0.998878
3.210468
{ "github_metadata": { "branch": "master", "commit_count": 229, "repo_created_at": "2018-10-06T09:24:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0970c03...
3cd92aa9-5c29-4a3b-8eaf-bb6515574625
Mohammad-Omar-Khan/CPP_Projects
Tic-Tac-Toe using ANN/Matrix.h
/** * @file Matrix.hame * @brief created a matrix data type to make calculations easier * @date 2022-05-26 * */ #pragma once #include <vector> #include <cmath> #include <functional> class Matrix { int rows; int cols; std::vector<float> values; public: Matrix() : rows(0), cols(0), values({}) {} ...
TOOL
0.910876
5.178975
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-01-20T10:52: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": "1fa43ea4434...
52c83f8d-1956-4c25-9b93-91909e1056d0
vectorch9/baekjoon
16100/16197.cpp
#include <iostream> #include <queue> #include <string> // 두 동전 // BFS using namespace std; struct Coord{ int ax,ay,bx,by; Coord(int a, int b,int c, int d){ ay = a; ax = b; by = c; bx = d; } Coord(){ Coord(-1,-1,-1,-1); } }; int n,m; bool check(int y, int x){ ...
ALGO
0.999871
3.505677
{ "github_metadata": { "branch": "main", "commit_count": 248, "repo_created_at": "2021-01-18T06:56:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5699c21f92...
588e33c4-6bb3-44fd-897c-d6d1a162f1ef
ishandutta2007/codeforces-k
kawatea/normal/113/B.cpp
#include <cstdio> #include <cstring> #include <vector> #include <set> using namespace std; int a[2001], b[2002], c[2002], d[2002]; int n; int hash(int x, int y) { return (b[x + y] - b[x]) * a[n - x - 1]; } int hash1(int x, int y) { return (c[x + y] - c[x]) * a[n - x - 1]; } int hash2(int x, int y) { re...
ALGO
0.999608
3.52042
{ "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": "a27f45105f84...
271834c7-0f2c-454d-85d4-6273ead41230
WilliamQiufeng/CPPCode
CodeForces/1843/E.cpp
/* ID: william234 TASK: E LANG: C++ */ #define PROGRAM_NAME "E" #include <algorithm> #include <bitset> #include <cmath> #include <cstring> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <memory> #include <queue> #include <set> #include <stack> #...
ALGO
0.999516
4.296704
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-12-09T02:02: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": "b32f1a7b012...
b88c30da-d7ca-41b0-867b-72cd7800f66a
captainys/public
src/ysgebl/src/kernelutil/ysshellext_constedgeutil.cpp
/* //////////////////////////////////////////////////////////// File Name: ysshellext_constedgeutil.cpp Copyright (c) 2017 <NAME>. All rights reserved. http://www.ysflight.com Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are me...
ALGO
0.99849
5.786264
{ "github_metadata": { "branch": "master", "commit_count": 527, "repo_created_at": "2018-12-18T22:09:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 35, "forks": 10, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "014199...
1a742f84-c943-4fe4-83f3-76043d5036ed
SamarthPandya/DSA-Codes
Curated problems/viewsAndTraversals/bottomView.cpp
// https://practice.geeksforgeeks.org/problems/bottom-view-of-binary-tree/1 /* todo: Return the bottom view of a given tree IDEA: For any horizontal distance from the root, save the latest element in level order traversal. Sort these values based on horizontal distances and return them. */ #include <bits...
ALGO
0.999997
5.458422
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2022-05-27T07:20: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": "3cbb907b0...
daa9be7a-df8d-47ac-8950-d14e15566773
ap-hynninen/gpu_nonbond
CpuMultiNodeMatrix3d.cpp
#include <mpi.h> #include <iostream> #include <cassert> #include <stdlib.h> #include "mpi_utils.h" #include "cpu_utils.h" //#define use_onesided #include "CpuMultiNodeMatrix3d.h" #define max(a,b) ((a) > (b) ? (a) : (b)) #define min(a,b) ((a) < (b) ? (a) : (b)) void get_inode_xyz(const int nnodex, const int nnodey, co...
TOOL
0.959648
4.897213
{ "github_metadata": { "branch": "master", "commit_count": 200, "repo_created_at": "2013-12-03T03:26: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": "868104f0...
dd86cb7c-0b9a-4b10-88f7-8e05c1816479
justicezyx/puzzles
buildtree_preinorder.cc
#include "common/common.h" struct TreeNode { TreeNode* left; TreeNode* right; int data; TreeNode(int v) { data = v; left = NULL; right = NULL; } }; TreeNode* build_tree_recursive(const std::vector<int>& preorder, int pre_b, int pre_e, const st...
ALGO
0.999976
6.083629
{ "github_metadata": { "branch": "main", "commit_count": 97, "repo_created_at": "2013-05-18T01:49:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01a69ea0e11...
b9f87762-6c95-407c-825c-4bd2fa5ae0ec
kungwahcheung/leetcode
81_search_in_rotated_sorted_array_ii.cc
#include <vector> #include <iostream> using std::vector; using std::cout; using std::endl; class Solution { public: bool search(vector<int>& nums, int target) { int left = 0, middle = 0, right = nums.size()-1; while (left <= right) { middle = left + (right-left)/2; if (target == nums[middle]) {...
ALGO
0.999992
5.625468
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2018-11-16T02:11: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": "1727996fa...
582f4285-53bc-4b1e-8131-3b389344f383
movingpictures83/KMM
CModel.cpp
/* * Author: <NAME> * Postdoctoral Research Associate * Bioinformatics Research Group (BioRG) * Florida International University (FIU) * Miami, FL, USA * * Contact: <EMAIL> or <EMAIL> */ #include "CModel.h" #include "CSequences.h" CModel::CModel(int order) { this-...
ALGO
0.998763
4.210044
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-07-31T17:01: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": "114aa7fb4b...
fddc42be-a8f1-4155-ab42-496c60136320
anastasiya0304/Structures
Skiplist/Skiplist.cpp
#include "Skiplist.h" skiplist_node::skiplist_node(int searchKey) { data.first=searchKey; for ( int i=1; i<=MAXLEVEL; i++ ) { forwards[i] = nullptr; } } skiplist_node::skiplist_node(std::pair<int,int>newdata):data(newdata) { for ( int i=1; i<=MAXLEVEL; i++ ) { forwards[i] = nullptr; } } skiplist:...
TOOL
0.995577
3.075562
{ "github_metadata": { "branch": "master", "commit_count": 160, "repo_created_at": "2017-11-02T10:59: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": "bfa0ff19...
744f0155-53af-4b13-bc29-7904eb106f77
Eqno/ACM
temp/basic/hash/hash pair.cpp
#include <iostream> #include <utility> #include <vector> #include <algorithm> #include <unordered_map> #include <cmath> using namespace std; #define int long long struct HashPair { template <class T1, class T2> size_t operator()(const pair<T1, T2>& p) const { auto hash1 = hash<T1>{}(p.first); ...
ALGO
0.999879
4.533139
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-03-22T01:28:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56ad290e27a...
d2a4cb6d-c5fb-44eb-850d-bda46367f8a5
LeeRitholtz/SproSim
src/PhysicsSolver.cpp
#include "sprosim/PhysicsSolver.h" #include "sprosim/interfaces/IFlowModel.h" #include "sprosim/models/flow/DarcyFlowModel.h" #include "sprosim/models/permeability/ConstantPermeabilityModel.h" #include "sprosim/models/transport/LinearExtractionModel.h" #include <cmath> namespace sprosim { PhysicsSolver::PhysicsSolver...
ALGO
0.999676
6.923457
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2025-06-25T14:40:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ea3d145be57...
ffbf568e-0652-4fa8-9b66-6090d286b847
vahsek300501/Leetcode-Question
convert-sorted-array-to-binary-search-tree/convert-sorted-array-to-binary-search-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999982
6.543344
{ "github_metadata": { "branch": "main", "commit_count": 2165, "repo_created_at": "2021-05-13T13:58:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a81e3fedd...
873d835b-5388-41c4-b037-03bf624afbf5
xahiru/CPP_YNU_SPRING_2025
RABBY42/Lab-5/Q7.cpp
#include <iostream> #include <cmath> using namespace std; int main() { double X, sum = 0; int n; cout << "Input the value of X: "; cin >> X; cout << "Input the value for nth term: "; cin >> n; for (int k = 1; k <= n; ++k) { int exponent = 2 * (k - 1); double sign = (k %...
ALGO
0.999813
4.525652
{ "github_metadata": { "branch": "main", "commit_count": 1337, "repo_created_at": "2025-02-26T02:25:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 21, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "d9f86e09...
87a86685-cc64-403c-9652-9511ce2ea978
blender/blender
intern/cycles/bvh/split.h
/* SPDX-FileCopyrightText: 2009-2010 NVIDIA Corporation * SPDX-FileCopyrightText: 2011-2022 Blender Foundation * * SPDX-License-Identifier: Apache-2.0 * * Adapted code from NVIDIA Corporation. */ #pragma once #include "bvh/build.h" #include "bvh/params.h" CCL_NAMESPACE_BEGIN class BVHBuild; class Hair; class M...
ALGO
0.927119
7.157238
{ "github_metadata": { "branch": "main", "commit_count": 152123, "repo_created_at": "2019-10-09T12:47:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 15670, "forks": 2395, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9...
3f5afd07-4970-4d0b-bf68-897d6b9a0f28
zzerross/algorithm
geometry/ccw/main.cpp
#include <stdio.h> template <typename T> struct Vector2D { T x, y; Vector2D(): x(0), y(0) { } Vector2D(T x, T y): x(x), y(y) { } T cross(const Vector2D& o) const { return x * o.y - y * o.x; } T ccw(const Vector2D& o) const { return cross(o); } T ccw(const Ve...
ALGO
0.99958
5.164161
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2020-06-12T06:02:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3230dca72...
72d911d5-6014-4fea-aa47-667652b5b0e7
HH-LG/Leetcode-exercise
exercise/others/150.RPN.cpp
#include <vector> #include <string> #include <stack> using namespace std; class Solution { bool isOp(string s) { return s.length() == 1 && (s == "+" || s == "-" || s == "*" || s == "/"); } int calcu(int a, string op, int b) { if (op == "+") { return a + b; ...
ALGO
0.999981
5.605508
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2024-05-07T02:48: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": "0f3583db38...
ac78c4b7-0e55-43b4-b64f-ddc4c6fe332a
chubillkelvin/leetcode
solutions/c++/biweekly-contest/67/Find Good Days to Rob the Bank.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: vector<int> goodDaysToRobBank(vector<int> &security, int time) { int n = security.size(); vector<int> decreasing = vector<int>(n, 1); vector<int> increasing = vector<int>(n, 1); for (int i = 1; i < n; i++) { ...
ALGO
0.999987
5.345089
{ "github_metadata": { "branch": "master", "commit_count": 454, "repo_created_at": "2021-02-20T12:11:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a42294fc...
18134842-888c-4621-9e74-1e0f66197c15
Taimo-Dam/CodeForcesC-
2B.cpp
#include <iostream> #include <algorithm> #include <string> #include <vector> using namespace std; const int maxn = 1000; int a[maxn][maxn]; char prv[2][maxn][maxn]; short int dp[2][maxn][maxn]; int main() { ios::sync_with_stdio(false); int n; cin >> n; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j+...
ALGO
0.999968
3.544511
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-09-15T11:37:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "235c256ce7a3...
ecda88da-dd4d-4702-b037-677838450204
jmichelstl/network_relaxation
src/axial_contribution.cpp
/* * Given an initial network configuration, a set of displacements, and a * spring stiffness, this code finds the energy of deformation assoicated * with the stretching and compression of fibers. */ #include <fstream> #include <iostream> #include <string> #include <vector> #include <tuple> #include <stdio.h> #inc...
ALGO
0.992369
3.874296
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-02-06T21:52: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": "ac0e69d9de1...
ac8887f0-7e74-4173-9c2c-d072daf0c712
pmvr/cpp-hsslms
lmots.cpp
// // Created by mvr on 05.01.22. // #include "lmots.h" //LMOTS Algorithm Types according to Table 1 in RFC 8554 const LMOTS_ALGORITHM_TYPE LMOTS_SHA256_N32_W1 = {std::string("\000\000\000\001",4), 1, 265, 7}; const LMOTS_ALGORITHM_TYPE LMOTS_SHA256_N32_W2 = {std::string("\000\000\000\002",4), 2, 133, 6}; const LMOTS_...
ALGO
0.985083
7.179751
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2022-01-27T11:38:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c6ec0c3b4...
955a64a2-ae0d-41a8-b9f6-be365d3c8028
xc-fighting/download-tool
algorithm/lintcode/lintcode-573.cpp
class Solution { public: /** * @param grid: a 2D grid * @return: An integer */ void markDistance(vector<vector<int>>& grid,int r, int c, vector<vector<int>>& distanceMap, vector<vector<int>>& counterMap) { int numRows = grid.size(); int numCols = grid[0].size(); int d...
ALGO
0.999799
5.443545
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2021-07-24T21:59: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": "8ee1fd9b9...
2f27fa85-005b-4477-b925-8d71a433e7b9
Thalivar/NodeNexus
NodeNexus/cpp files/cpp src/bst.cpp
#include "bst.h" #include <iostream> #include <iomanip> BST::BST() : root(nullptr){} BST::~BST() { destroyTree(root); } void BST::insert(int key){ root = insert(root, key); } TreeNode* BST::insert(TreeNode* node, int key){ if (!node) return new TreeNode(key); if (key < node->key){ node->lef...
ALGO
0.998425
4.432516
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2025-06-07T22:54: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": "7a891eea1c9...
f1e72193-c047-42df-bd4f-71d445beaf2c
satyajit-patel/CrackYourInternship
Tree/Easy/108. Convert Sorted Array to Binary Search Tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999994
6.423009
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2024-07-21T12:35: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": "47c265241...
7457cb19-8f25-435b-bd84-06f48ddc77b2
m-ngr/computer-science
courses/dsa-cpp/mcs-solutions/algorithms-1/section-05-sorting.cpp
/** * <NAME> - 06/01/2023 */ #include <iostream> #include <vector> #include <algorithm> #include<map> using namespace std; #pragma region MCS: Problem Set 1 Solutions //Problem #1: Insertion Sort v2 void insertion_sort(vector<int>& v) { for (int i = 1; i < v.size(); ++i) { for (int j = i; (j > 0) && (v[j - 1] < v[j...
ALGO
0.999854
4.539268
{ "github_metadata": { "branch": "main", "commit_count": 198, "repo_created_at": "2022-05-26T07:49: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": "fb5166eb32...
6fac795c-23d0-4763-90c8-b72c0889eef0
fishy15/competitive_programming
online/cf/868/random_walk.cpp
#include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <array> #include <algorithm> #include <utility> #include <map> #include <queue> #include <set> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <numeric> #define ll long long #define ld long double ...
ALGO
0.99996
5.047977
{ "github_metadata": { "branch": "master", "commit_count": 1058, "repo_created_at": "2019-02-21T11:46:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "16fbce...
aa4b2648-b062-408f-accd-76a7e0ba6f35
frisinacho/UMA
FundamentalsOfProgramming/Practica1/ejer-11.cpp
/* * ejer1-11.cpp * * Created on: 04/10/2010 * Author: <NAME> * 11. Escriba un programa que calcule la nota final de una asignatura. * Éste habrá de leer por teclado la nota de la parte de teoría y * la nota de la parte de problemas, y habrá de calcular la nota final * considerando...
ALGO
0.997341
3.93179
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2013-12-04T17:32: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": "374ccca2f...
5a2af021-1e2b-437d-a1f9-80a483b2061b
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/03/0326/personal_submission/cf1012b_k423.cpp
/** * Created by 5cm/s on 2024/03/26 14:53:06. * 诸天神佛,佑我上分! **/ #include <bits/stdc++.h> using namespace std; #define itr(it) begin(it), end(it) #define endl '\n' #define YES() void(cout << "YES\n") #define NO() void(cout << "NO\n") class DSU { vector<int> fa, sz; public: explicit DSU(int n) : fa(n), sz(n,...
ALGO
0.999821
4.095476
{ "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": "1adf...
0280ade9-a65a-447d-aaf5-8df8ec46afb2
UmangBarbhaya/Competitive_Programming_DSA-_in_CPP
BinaryTrees/Traversal.cpp
/*input */ #include<bits/stdc++.h> using namespace std; class TreeNode { public: int data; TreeNode* left; TreeNode* right; TreeNode(int data1) { data = data1; left = nullptr; right = nullptr; } }; class Traversal { public: void preOrderTraversalMorris(TreeNode *root, vector<int> &preorderTMorris) { Tre...
ALGO
0.999998
5.139704
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-06-22T18:16: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": "384a12ca77e...
58aed9a8-8d6c-4b1e-928d-8c1d2a71e788
jasper-zheng/resonance-suppressor
Source/Compressor.cpp
/* Compressor contains four dynamic filters working in a circular mode, It controls these four filter's gain and frequencies in response to the detected resonance The pointed filter is applied to the resonance The timing function calculateGain() borrowed from the tutorial https://github.com/joshreiss/Audio-progra...
ALGO
0.996099
5.459052
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-04-02T12:14: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": "8fa35e85de57...
88cdd30a-6b48-4111-844b-6d881b27808b
akhikolla/InformationHouse
cenROC/src/jointDis.h
#ifndef __JOINTDIS_H__ #define __JOINTDIS_H__ #include <RcppEigen.h> #include <iostream> #include "Ispline.h" #include "Mspline.h" using Eigen::VectorXd; using Eigen::MatrixXd; using namespace std; static double jointDis(VectorXd &theta, double t, double m,VectorXd &knot1, VectorXd &knot2 ) { int pn = floor(sqrt(t...
ALGO
0.982579
5.705354
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-12-30T15:51:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd6fa741c...
2bad7f2b-e999-4ac4-8967-78f81811b4e2
ishandutta2007/codeforces-p
plasmatic/normal/1394/B.cpp
// ./b-boboniu-walks-on-graph.yml #include "bits/stdc++.h" using namespace std; // Defines #define fs first #define sn second #define pb push_back #define eb emplace_back #define mpr make_pair #define mtp make_tuple #define all(x) (x).begin(), (x).end() // Basic type definitions using ll = long long; using ull = unsig...
ALGO
0.999947
3.840848
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:49:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "03d9c4c48906...
85b10854-8443-481d-91ed-1f31fa840f96
BIT-zhaoyang/competitive_programming
uva11060.cpp
#include <iostream> #include <vector> #include <cstring> #include <string> #include <algorithm> #include <map> #include <climits> #include <cmath> #include <set> #include <bitset> #include <sstream> #include <iomanip> #include <queue> #include <stack> #include <tuple> #define _ ios_base::sync_with_stdio(0), cin.tie(0)...
ALGO
0.999957
4.300657
{ "github_metadata": { "branch": "master", "commit_count": 120, "repo_created_at": "2016-02-07T23:17:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f48047d...
933cf08c-b6b6-457d-a776-5e6da2a3d2fe
mfshen66/CAM5
CAM5_mmSTL625/Model/DCurve.cpp
/* 2021/6/29 nt * implementation file of discrete curve */ #include "StdAfx.h" #include "DCurve.h" //////////////////////////////////////////////////////////////// // nt add 2021/7/1 : 要求A,B,C不能重合 /* 1995/1 nt * 两条线段交点,IDNOINT无交,IDINT交一点,IDOVERL有重合段,IDDEGE线退化为点 */ void dctrimInit(DCTRIM* dctrim) { dctrim->error...
ALGO
0.954531
3.702627
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2022-11-04T01:06:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "333665f94a5...
2fc9c9d1-2373-4253-acc8-6a8d029878e0
davisking/dlib
dlib/entropy_decoder_model/entropy_decoder_model_kernel_2.h
// Copyright (C) 2004 <NAME> (<EMAIL>) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_ENTROPY_DECODER_MODEL_KERNEl_2_ #define DLIB_ENTROPY_DECODER_MODEL_KERNEl_2_ #include "../algs.h" #include "entropy_decoder_model_kernel_abstract.h" #include "../assert.h" namespace dlib { ...
ALGO
0.987223
6.795261
{ "github_metadata": { "branch": "master", "commit_count": 8325, "repo_created_at": "2014-01-29T00:45:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14068, "forks": 3436, "issues": 41, "pull_requests": 5 }, "file_meta": { "content_id": ...
1f94460d-792d-410f-87e7-03f188b76f11
devangrajarora/competitive-programming
Codeforces/div 2/#717/2.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define MOD 1000000007 #define fi first #define se second #define rep(i,n) for(ll i = 0 ; i < n ; i++) #define repe(i,n) for(ll i = 0 ; i <= n ; i++) #define repb(i,a,b) for(ll i = a ; i < b ; i++) #define repeb(i,a,b) for(ll i = a...
ALGO
0.999852
3.970865
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2021-03-18T09:47:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "e24a5cd1717...
79ecbc1f-e2b6-49b1-b9aa-d399c356697c
saifullah-talukder/Competitive_Programming
Codes/Codeforces/Accepted/CF_914_D.cpp
/*بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم*/ #include <bits/stdc++.h> using namespace std; typedef pair<int, int> PII; typedef pair<PII, int> xxx; const int maxn = (1 << 20); const int mx = 5e5 + 5; int ara[mx], tree[maxn]; int GCD(int a, int b) { int t; while (b > 0) { t = b; b = a % b; ...
ALGO
0.999952
4.530717
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-05-10T06:16: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": "81cb09519fe7...
2af6d11e-b50f-49e6-91db-a637dee1a24b
revenant899/moruk
moruk.cpp
//#include <iostream> //#include <algorithm> //#include <numeric> // //using namespace std; // //int findMax(int* arr, int size) { // return *max_element(arr, arr + size); //} // //int findMin(int* arr, int size) { // return *min_element(arr, arr + size); //} // //double findAvg(int* arr, int size) { // return...
ALGO
0.998981
5.691414
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-11-01T12: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": "869828b58a...
4186086c-e28f-4a52-bb31-0a529175c1d5
ltecheroffical/LTCore
src/ai/astar_pathfinding.cpp
#include <set> #include <LTEngine/ai/astar_pathfinding.hpp> using namespace LTEngine; using namespace LTEngine::AI; AStarPathfinding::AStarPathfinding() { resetCalculateHeristic(); } void AStarPathfinding::setPath(Math::Vec2i start, Math::Vec2i end) { m_start = start; m_end = end; // Initialize grid dimensi...
ALGO
0.999344
5.987124
{ "github_metadata": { "branch": "main", "commit_count": 157, "repo_created_at": "2024-10-21T15:56:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4de8001ff1...
211b1308-1e3b-4112-8acb-e7f178f9e95c
TCGBench/TCGBench
data/human_performance_code/human_performance_code_canonical/P5490/ac_2.cpp
// !!!!!!!!!!!!!!!!!!!!!!!!!!!计算几何不要使用abs 使用fabs!!!!!! //本题是一道简单的扫描线 #include <bits/stdc++.h> typedef long long ll; typedef double db; const ll mod=1e9+7; const int maxn=3e5; using namespace std; int t,n,m,l,r,num,q,x,y; ll ans; int a[maxn]; vector<int >vx; vector<array<int,4>>event; // 扫描线的事件 struct info{ int minv...
ALGO
0.999838
4.255642
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-16T11:23:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5cddafb763979...
8d537897-fe19-4902-906d-ed2a485cf874
ShakilRahman768/XPSC-Solve
Week 7/Day 1/B_Preparing_Olympiad.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); int n, l, r, x; cin >> n >> l >> r >> x; int arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; } int cnt, mn, mx, sum, ans = 0; for (int i = 0; i < (1 << n); i++) ...
ALGO
0.999972
5.044423
{ "github_metadata": { "branch": "main", "commit_count": 169, "repo_created_at": "2024-03-16T14:23: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": "fa988a9473...
2b15ba16-3011-4d78-a7ed-120dd2945cc2
ghost1998/codes
cf/526/b.cpp
#include <bits/stdc++.h> using namespace std; long long int bsearch(vector<long long int> &v, long long int lo, long long int hi, long long int s) { // cout<<lo <<" "<<hi<<endl; if(lo == hi) return lo; int mid = (hi+lo)/2 + 1; long long int sum= 0; for(int i = 0 ; i < v.size() ; i ++) if(v[i] > mid) sum += (...
ALGO
0.999993
3.573067
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-02-27T04:10: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": "4a41c85726...
bd3e0d1e-8d32-41b8-8350-84b5b1a7d98d
ishandutta2007/codeforces-f
flashmt/normal/1715/D.cpp
#include <bits/stdc++.h> #ifdef LOCAL #include "Debug.h" #else #define debug(...) 42 #endif using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, q; cin >> n >> q; vector<vector<int>> bits(n, vector<int>(30, -1)); vector<pair<int, int>> queries[30]; while (q--) { int i,...
ALGO
0.999598
4.796649
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43: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": "1be5046c05a6...
fa18e5ba-c3a7-433e-8d74-f760c9438608
wangyongliang/nova
codeforces/320/D.cc
#include <iostream> #include <algorithm> #include <vector> #include <list> #include <queue> #include <string> #include <cstring> #include <cmath> #include <cstdio> #include <cstdlib> #include <stack> #include <climits> using namespace std; #define maxn 100100 int a[maxn]; int ans[maxn]; int main() { int n; cin >>...
ALGO
0.999867
4.004543
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2013-05-23T15:49:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ff6a927...
4a465c41-0b53-46d3-aa9b-64b9cc046e72
mohitkumaragrawal/cpp-algo
bitwise/apollo-versus-pan.cpp
#include <bits/stdc++.h> using namespace std; #define all(x) begin(x), end(x) #define OUT(T) cout << "Case #" << T << ": " using ll = long long; using ull = unsigned long long; const ll MOD = 1e9 + 7; ll n; ll arr[500005]; ll freq[65]; ll calc_and(ll c) { ll res = 0; for (ll j = 0; j < 60; ++j) { if ((c >>...
ALGO
0.999887
4.812037
{ "github_metadata": { "branch": "master", "commit_count": 128, "repo_created_at": "2022-02-23T08:44:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b039d964...
be199cbd-bbf5-49ae-b462-187a35beb4df
side-projects-all/works
Leetcodes/hash_map_set/q_2501.cpp
/* You are given an integer array nums. A subsequence of nums is called a square streak if: The length of the subsequence is at least 2, and after sorting the subsequence, each element (except the first element) is the square of the previous number. Return the length of the longest square streak in nums, or r...
ALGO
0.999933
5.258344
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2025-01-03T05:24: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": "46934f7c829...
213059f5-a612-4a3d-b886-774b9a19a9f1
tontechio/pow-miner-gpu
crypto/ellcurve/TwEdwards.cpp
/* This file is part of TON Blockchain Library. TON Blockchain Library 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, either version 2 of the License, or (at your option) any later ver...
ALGO
0.983818
7.488929
{ "github_metadata": { "branch": "main", "commit_count": 215, "repo_created_at": "2021-08-30T11:45:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 149, "forks": 67, "issues": 20, "pull_requests": 2 }, "file_meta": { "content_id": "4cc891...
743fa3b7-58ce-4259-883c-19d2a5e6f364
Dinesh-RDY/DailyCoding
DailyPractice/Week4/medianOfTwoSortedArrays.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: // Naive Method O(m + n) time and space complexity double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) { int n1 = nums1.size() , n2 = nums2.size(); vector<int> nums3(n1+n2); int i = 0 , j = 0 , k = 0;...
ALGO
0.999994
5.964295
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2022-05-15T14:10:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a49d05077...
d6857ddc-84e3-412c-b763-53e0ca00f001
kira1433/User-Snippets
Snippets/Data Structures/Segment Tree.cpp
template<class Info> struct SegmentTree { int n; vector<Info> info; SegmentTree() : n(0) {} SegmentTree(int n_, Info v_ = Info()) { init(n_, v_); } template<class T> SegmentTree(vector<T> init_) { init(init_); } void init(int n_, Info v_ = Info()) { init(vecto...
ALGO
0.999965
5.618909
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-11-19T12:51: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": "041e46d8474f...
0ab14070-8f7b-4153-a02e-acb8ff696ee5
Hasil-Sharma/leet-code
all-nodes-distance-k-in-binary-tree-1.cpp
// https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/description/ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: vector<...
ALGO
0.999985
6.349089
{ "github_metadata": { "branch": "master", "commit_count": 1080, "repo_created_at": "2017-10-12T20:59:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "74eab6...
aaef6ce7-d0a6-4d6a-af2a-ffe17f905761
MAXASSASSINS/LeetCode-Solutions-by-me
2140-solving-questions-with-brainpower/2140-solving-questions-with-brainpower.cpp
class Solution { public: long long solve(vector<vector<int>> &questions, int index){ if(index >= questions.size()){ return 0; } long long excl = solve(questions, index + 1); long long incl = questions[index][0] + solve(questions, index + questions[index][1] +...
ALGO
0.999969
5.427843
{ "github_metadata": { "branch": "main", "commit_count": 4954, "repo_created_at": "2022-05-23T14:47: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": "182ca2ed0...
4d06f6ff-0ba4-4ffd-bb2c-e69493e0294d
luluwu516/DataStructures
Sort/BubbleSort.cpp
#include <iostream> // preprocessor directive #include <vector> using std::cin; // using declaration using std::cout; // function prototypes template <typename T> void printArray(const std::vector<T>&); template <typename T> void bubbleSort(std::vector<T>&); /* Bubble sort is a sorting algorithm that repeatedly st...
ALGO
0.99981
6.250454
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2024-08-27T04:20: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": "b37caadf8ae...
6cd1e50f-5f7a-46f9-ab96-d7e537e6f8e3
fastmachinelearning/hls4ml
hls4ml/templates/oneapi/firmware/nnet_utils/nnet_activation.h
#ifndef NNET_ACTIVATION_H_ #define NNET_ACTIVATION_H_ #include "nnet_common.h" namespace nnet { struct activ_config { // IO size static constexpr unsigned n_in = 10; // Internal info static constexpr unsigned table_size = 512; // Resource reuse info static constexpr unsigned io_type = io_pa...
ALGO
0.911796
3.961235
{ "github_metadata": { "branch": "main", "commit_count": 2570, "repo_created_at": "2017-10-25T21:43:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1549, "forks": 471, "issues": 183, "pull_requests": 36 }, "file_meta": { "content_id": "eb...
d82a3409-a481-42e5-b3a5-991d8272b7c5
edmondium/LUMI-Intensive-Comprehensive-Intro-and-Advanced-Workshop
Exercises/HPE/day1/libsci_acc/pdgemm.cpp
#include "mpi.h" #include <cassert> #include <iostream> #include <numeric> #include <chrono> #ifdef USE_GPU_DATA #define LIBSCI_FCN(name) name##_acc_ #else #define LIBSCI_FCN(name) name##_ #endif extern "C" { /* Cblacs declarations */ void Cblacs_pinfo(int*, int*); void Cblacs_get(int, int, int*); void Cblacs...
ALGO
0.999172
5.067695
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-03-10T01:10: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": "13b6ef4de8a8...
82031e1d-d153-40dd-992f-de2843113477
leverimmy/Codes
比赛/学校/2019-11-11测试1/source/Mickey-snow/escape.cpp
#include<bits/stdc++.h> enum{ pt,en,start,end }; int ReadChar(void){ char in; do in = getchar(); while(in!='V' && in!='.' && in!='+' && in!='J'); switch(in){ case '.': return pt; break; case '+': return en; break; case 'V': return start; break; case 'J': return end; break; } return -1;...
ALGO
0.999868
3.310345
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2019-11-04T09:43: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": "1244a4739...
7b532b05-ce6c-42b1-b5ad-a2e57dde29c4
mzry1992/workspace
OJ/USACO/SRM498_DIV1_500.CPP
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <c...
ALGO
0.999547
3.786922
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2012-11-03T05:40: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": "e0f435068...
11cc8d4b-4b54-482c-8cef-7ddf3449575a
iaikkrypto/lineartrails
tool/configparser.cpp
/* This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copy...
CONFIG
0.927545
5.676162
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2014-05-06T15:52:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 39, "forks": 12, "issues": 3, "pull_requests": 2 }, "file_meta": { "content_id": "c01b49c59...
2a6091e6-baa4-4904-aaa0-3e9a0f72acba
leonardoaraujodf/dsa
solutions/cpp/547/solution.cpp
class Solution { public: unordered_map<int, vector<int>> graph; vector<bool> seen; int N; int findCircleNum(vector<vector<int>>& isConnected) { N = isConnected.size(); seen = vector(N, false); // Create unidirect graph for (int i = 0; i < N; i++) { for (int j ...
ALGO
0.999984
6.010517
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2024-05-01T23:01: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": "afbfb7422a3...
f3ec7603-8dda-4a1d-9830-43b046f57064
ryanf323/ISTE100P1
main.cpp
/***************** * ISTE-101 * Project 1 * Sort Wireshark Log * <NAME> * <NAME> * Purpose: Read CSV file from * Wireshark and sort the * destination ip addresses in * a output file. ******************/ #include <iostream> #include <fstream> #include <algorithm> #include <vector> #include <iterator> #include <cstdlib> ...
TOOL
0.991825
4.215617
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-02-24T17:12:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0b8dc5eaf...
5d25eb21-5b76-4234-b72c-ea77816666cc
cp-study/leetcode-study
LC_1449.cpp
#include <iostream> #include <string> #include <algorithm> #include <math.h> #include <vector> #include <queue> #include <stack> #include <set> #include <map> #include <functional> #include <cstdlib> #include <list> #include <iomanip> #include <unordered_map> #include <chrono> #define ll long long #define ull unsigned ...
ALGO
0.999816
4.961247
{ "github_metadata": { "branch": "master", "commit_count": 229, "repo_created_at": "2021-11-06T10:50:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8bcda62ad...
168dca14-519f-4c56-b511-103c820ec759
LajnaLegenden/misc
AdventOfCode/2020/2.1/2.cpp
#include <iostream> #include <fstream> #include <ios> #include <string> #include <vector> using namespace std; class Policy { public: Policy(string wholeString) { whole = wholeString; //Find password int passPos = (int)whole.find(":"); password = whole.substr(passPos + 2, whol...
ALGO
0.985562
4.296145
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-05-07T12:08: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": "1ffcd4c62e...
789431c5-6a0f-4b23-bc75-d2fc2fb5599a
bytesArchitect/CPP09-journey
Module 09/ex01/RPN.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* RPN.cpp :+: :+: :+: ...
ALGO
0.987754
4.858412
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2024-01-25T14:19: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": "d2b687c1a...
fee2bf4e-c798-4feb-9650-daf323242efe
haywood/Vision3
p5.cpp
/** * p5.cpp */ #include <cassert> #include <iostream> #include <cstdlib> #include <fstream> #include <vector> #include <limits> #include "vision_utilities.h" using namespace std; int main(int argc, char *argv[]) { if (argc < 5) { cerr << "usage: " << *argv << " <input gradinet file> <seed point file>...
DATA
0.962576
5.00075
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2011-11-02T01:51:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c772b29ac...
74bb6cbc-0949-4ff9-9259-120b40b7e0cb
IA-Fuad/LeetCode-Solutions
59-spiral-matrix-ii/59-spiral-matrix-ii.cpp
class Solution { int dx[4] = {0, 1, 0, -1}; int dy[4] = {1, 0, -1, 0}; bool isNotValid(int i, int j, int n, const vector<vector<int>>& sm) { return i < 0 or j < 0 or i == n or j == n or sm[i][j] != 0; } public: vector<vector<int>> generateMatrix(int n) { vector<vector<int>>...
ALGO
0.999974
6.244669
{ "github_metadata": { "branch": "main", "commit_count": 1937, "repo_created_at": "2021-12-24T20:13: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": "019bd5b8d...
047646d7-15f5-4505-8bc2-7d400de5bb14
mchirico/chirico
c++/simple_but_common_cpp/list3b.cc
/* Copyright (c) GPL <EMAIL> Example if list using sort on a class with user defined comparison "cmp_t". You will want to take a look at list3c.cc for how all of this can be done with vectors. */ #include <iostream> #include <string> #include <list> #include <iterator> #include <cmath> #define NUMPTS ...
ALGO
0.999118
5.166979
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2011-04-27T22:28:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "52e9d2ff4...
63829287-ac87-4a04-b22b-e9aba8cfbcfb
TouwaErioH/Algorithm
2018summer/8 14/poj1655.cpp
#include<iostream> #include<cstdio> #include<cstring> using namespace std; const int MAXN = 20010; struct Edge { int to,next; }edge[MAXN*2]; int head[MAXN],tot; void init() { memset(head,-1,sizeof(head)); tot = 0; } void addedge(int u,int v) { edge[tot].to = v; edge[tot].next = head[u]; head[u] ...
ALGO
0.999842
3.521047
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2018-05-28T04:33: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": "8d2d47324...
27eb436c-bd9f-4a95-b759-1552718d33ca
VietNguyen2004/BaiTapAgain
Tree.cpp
#include<iostream> #include<fstream> using namespace std; #define nmax 1000 int T, n; int pos[nmax];//vị trí int width[nmax];//độ dài void QuickSort(int l, int r)//Quick_Sort { int mid = pos[(l+r)/2]; int i = l; int j = r; while(i < j) { while(pos[i] < mid) i ++; while(pos[j] > mid) j--; if(i <= j) {...
ALGO
0.999885
3.185845
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2021-08-06T07: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": "feee042a9c8...
73584be8-1038-4e50-9bc6-deaf88503753
fernandesitalo/Faculdade
DATA STRUCTURE /ARVORE BALANCEAMENTO AVL/ArvoreAVL/Rotation.h
#ifndef ROTATION_H #define ROTATION_H #include "Node.h" template<class type> class Rotation { public: static void RSE( Node<type> ** R); // ROTACAO SIMPLES A ESQUERDA static void RSD( Node<type> ** R); // ROTACAO SIMPLES A DIREREITA static void RDE( Node<type> ** R); // ROTACAO DUPLA A ESQUERDA static ...
ALGO
0.994008
4.556835
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-02-16T02:16:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "572a173952...
4fc98966-a92b-4c18-ab00-943d73561f3f
jeete121/Coding
Programs/Practice/Prac/GraphAlgorithms/DCP7.cpp
#include <bits/stdc++.h> using namespace std; int numDecodings(string s) { //find the size of string int n = s.size(); //if first character is 0 if (s[0] == '0') return 0; //if size is 1 then return 1 if (n == 1) return 1; int dp[n + 1]; int x; dp[0] = 1; dp[1...
ALGO
0.999786
4.401621
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2023-05-06T10:00: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": "24d403a54...
149f01bb-2785-438b-a4ea-270b869e3243
ddtBeppu/meikaicpp_beppu
e12_01/src/e12_01.cpp
//============================================================================ // Name : e12_01.cpp // Author : <NAME> // Version : // Copyright : Your copyright notice // Description : 演習12-1 // 前置演算子と後置演算子は行うことがほぼ同じため、似たようなコードが各演算子関数に散らばっている // (例えば、増分演算子中のif文は前置版と後置版で同一で...
TOOL
0.966708
5.160965
{ "github_metadata": { "branch": "master", "commit_count": 212, "repo_created_at": "2018-02-18T04:08: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": "402c99f9...
a951d2c1-9733-4736-8f74-e251e5ca93c5
drew-gross/ThreesAI
ThreesAI/AdaptiveDepthAI.cpp
// // AdaptiveDepthAI.cpp // ThreesAI // // Created by <NAME> on 1/16/16. // Copyright © 2016 DrewGross. All rights reserved. // #include "AdaptiveDepthAI.hpp" #include <stdio.h> #include <iostream> #include <stdint.h> #include "Debug.h" #include "Logging.h" using namespace std; AdaptiveDepthAI::AdaptiveDepthA...
ALGO
0.99917
4.726754
{ "github_metadata": { "branch": "master", "commit_count": 347, "repo_created_at": "2015-01-24T07:37:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9fb991d3...
dc39c241-e317-4083-a9b9-8bd33ec284cf
killian-bernacchia/Kart-Elec
filter.cpp
#include "filter.h" #include <stdlib.h> #include <string.h> static int uint16_compare(const void *a, const void *b); void Filter_init(Filter *filter, int size, int window_size, adc_sample_t *array1, adc_sample_t *array2, adc_sample_t initial_value){ filter->size = size; filter->window_size = window_size; ...
ALGO
0.997786
5.390581
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2025-01-22T00:45: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": "06484de33ba...
c2f3780b-21f4-4427-bbab-1279a733505e
akuligowski101/KnapsackProtectionRules
knapsack.cpp
#include <iostream> #include <vector> #include <time.h> #include <queue> #include <stdlib.h> #include <iomanip> using namespace std; struct item { int weight; int value; float ratio; item(int x, int y) { weight = x; value = y; ratio = float(y) / float(x); } }; struct sortweight { bool operator () (const i...
ALGO
0.999116
3.639287
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-05-23T14:09: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": "34dedaffca...
66a61f42-b858-4007-99fa-32e856e045cd
alitvintsev/IntCALC
intcalc2c/myexample/include/simatrix.hpp
/* ** CXSC is a C++ library for eXtended Scientific Computing (V 2.5.0) ** ** Copyright (C) 1990-2000 Institut fuer Angewandte Mathematik, ** Universitaet Karlsruhe, Germany ** (C) 2000-2010 <NAME>/Softwaretechnologie ** Universitaet Wuppertal, Germany *...
TOOL
0.912032
4.400917
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-06-20T06:53: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": "a35c6adf02...
a0dcd383-2ede-44a8-ae96-81390fb88d00
pmoulon/groupsac
cpp/thirdParty/armadillo/include/armadillo_bits/glue_join_meat.hpp
// Copyright (C) 2010 NICTA and the authors listed below // http://nicta.com.au // // Authors: // - <NAME> (conradsand at ieee dot org) // // This file is part of the Armadillo C++ library. // It is provided without any warranty of fitness // for any purpose. You can redistribute this file // and/or modify it under t...
ALGO
0.981156
6.083571
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2015-04-07T06:59:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57830cbd4...
c999df70-6c7a-4150-b419-93f8ac247920
LEGEND-LXM/RM_A
Vision/Angle/angle.cpp
#include"Angle.h" void Angle::angle_col(cv::Point &p,double &x_angle, double &y_angle) { cv::Mat cam = cv::Mat::eye(3, 3, CV_64F); cam.at<double>(0, 0) = 5.342326e+02; cam.at<double>(0, 1) = 0; cam.at<double>(0, 2) = 3.150241e+02; cam.at<double>(1, 1) = 5.342136e+02; cam.at<double>(1, 2) = 2.47014e+02; cv::Mat...
ALGO
0.967123
3.836167
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-08-02T08:00:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c802bc8825...
aaabb042-b092-4b1f-8b8f-a02b6d7b803c
multiney/cpp
c.cpp
#include <climits> #include <malloc.h> #include <stdbool.h> #include <memory.h> #include <stdlib.h> #include <algorithm> #include <string> #include <iostream> #include <vector> #include <unordered_map> #include <bits/stdc++.h> using std::string; using std::cout; using std::endl; using std::vector; using std::unordere...
ALGO
0.999868
4.603874
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2022-11-02T09:33: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": "76efd483ca3...
73f00a1c-c779-4fc3-b8e1-4848dbc9c14a
kashee337/problems
arc118/b.cpp
#include <algorithm> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define pb push_back #define rep(i, n) for (int i = 0; i < (n); i++) #define reps(i, n, s) for (int i = (s...
ALGO
0.999992
3.01678
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2021-09-29T10:37: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": "ce09bea632...
70028f1d-8ca5-43c4-89b2-6068741331c9
saurhub49/coding
08_binary_search/08_18_allocate_books/allocate_books.cpp
#include <iostream> #include <vector> #include <algorithm> #include <numeric> using namespace std; int calculateNoOfStudents(const vector<int> &arr, int maxPages) { int noOfStudents = 1; int currentStudentPages = 0; for (int i = 0; i < arr.size(); i++) { if (currentStudentPages + arr[i] <= max...
ALGO
0.999975
6.080788
{ "github_metadata": { "branch": "main", "commit_count": 296, "repo_created_at": "2024-01-04T19:52:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c706707dbf...
63714f95-e4a9-4bef-82cf-a26666c7e9ea
timkaler/cilk-ML
Graph.cpp
// Copyright 2019 <NAME> MIT License #include <random> #include <vector> #include "./Graph.hpp" #include "./activations.hpp" void Graph::setup_embeddings(std::vector<int> _embedding_dim_list) { weights.clear(); skip_weights.clear(); this->embedding_dim_list = _embedding_dim_list; for (int i = 0; i < embedd...
ALGO
0.999036
4.175575
{ "github_metadata": { "branch": "parad", "commit_count": 22, "repo_created_at": "2019-05-09T19:16:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8bf5f8f868...
ae362f5e-57f4-4a5d-91a7-cbb5f9e0d853
WeibingChen17/MegaProjects
Pi2Nth/pi2nth.cc
#include "pi2nth.h" void print_mpf_t(int n, mpf_t x){ gmp_printf("%.*Ff \n", n, x); } PiCalculator::PiCalculator(){ } PiCalculator::~PiCalculator(){ } size_t PiCalculator::calculateUpTo(unsigned int m, mpf_t res){ int n = int(m * 3.33) ; // log_2(10) = 3.323 < 3.33, which is enough according to error estim...
ALGO
0.998441
4.473439
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2018-11-30T21:48: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": "eecc296c9...
b9352738-265d-4c26-a366-f75f88e46031
yhshu/POJ
数论/2917. Diophantus of Alexandria.cpp
#include <cstdio> #include <cstring> using namespace std; int num[64]; int main() { int cases; scanf("%d", &cases); for (int c = 1; c <= cases; c++) { int n, p = 0; memset(num, 0, sizeof(num)); scanf("%d", &n); // 找出所有使得 a*b = n^2 的整数对(a, b),即求 n^2 的约数个数 // 约数个数是奇数...
ALGO
0.99983
4.523039
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2018-03-16T00:37:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7539b5b8...
53123fa3-298a-41de-b607-8d373e068e78
tsnest/xray-2-2011
sources/WildMagic/SDK/Include/Wm4IntpSphere2.h
// Wild Magic Source Code // <NAME> // http://www.geometrictools.com // Copyright (c) 1998-2009 // // This library 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; either version 2.1 of the License, or...
ALGO
0.911113
6.287034
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-06-02T17:30:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 26, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7829d4ae79...
404028b3-b9db-4a90-bc52-02095b93a18e
AlgoLeadMe/AlgoLeadMe-1
Munbin-Lee/중간에서만나기/세 수의 합.cpp
#include <iostream> #include <vector> #include <unordered_map> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; vector<int> U(N); for (int &u: U) { cin >> u; } unordered_map<int, bool> sum; for (int x = 0; x < N; x++...
ALGO
0.999978
4.01689
{ "github_metadata": { "branch": "main", "commit_count": 809, "repo_created_at": "2023-10-06T11:43:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "540c1196e22...
237629b9-b51a-4317-b0fc-a6e447d70c61
egelja/caelus-cml
src/libraries/waves/waves/waveTheories/irregular/bichromaticSecond/bichromaticSecond.cpp
/*---------------------------------------------------------------------------*\ Copyright <NAME>, Technical University of Denmark. ------------------------------------------------------------------------------- License This file is part of Caelus. CAELUS is free software: you can redistribute it and/or modify ...
ALGO
0.99755
5.486127
{ "github_metadata": { "branch": "master", "commit_count": 156, "repo_created_at": "2021-06-14T18:42:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "330d66cd...