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
6b4613dc-d469-4e49-bbee-df60de4eca35
openmm/openmm
plugins/drude/openmmapi/src/DrudeLangevinIntegrator.cpp
/* -------------------------------------------------------------------------- * * OpenMM * * -------------------------------------------------------------------------- * * This is part of the OpenMM molecular simulation toolkit originating from * ...
ALGO
0.963988
6.046525
{ "github_metadata": { "branch": "master", "commit_count": 7207, "repo_created_at": "2013-05-20T17:42:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1644, "forks": 558, "issues": 408, "pull_requests": 22 }, "file_meta": { "content_id": "...
c3f83ed0-932d-4131-8496-d658a7690afd
GentleMadness/TUB-WS16-17
Compiler Design/Compiler_lab3/lab3_files/lab_3.cpp
/* TODO: Algorithm we use: Forward Must Flow Analysis In forward flow analysis, the exit state of a block is a function of the block's entry state. This function (that will be applied on the entry state) is the composition of the effects of the statements in the block. The entry state of a block is a function of the ...
ALGO
0.988055
3.181238
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2017-03-12T18:07: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": "33a9ea035...
dade98ed-2b4a-4da5-bbae-3fdc99239023
upupming/algorithm
leetcode/contest-259/2014. Longest Subsequence Repeated k Times.cpp
class Solution { int k; unordered_map<char, int> cnt; string s, t, ans; void dfs() { unordered_map<char, int> cnt2(cnt); for (auto [ch, freq] : cnt2) { // 排列方式 t 给定了,判断是否出现了 k 次 t.push_back(ch); if (t.size() > ans.size() || (t.size() == ans.size() && ...
ALGO
0.999996
5.19629
{ "github_metadata": { "branch": "master", "commit_count": 1248, "repo_created_at": "2019-10-25T07:41:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 328, "forks": 38, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f520...
1e06a972-024c-4296-8a4d-5744508ff8ef
MichalBialek01/university-data-structures-project-3
Fibonacci_open_addressing.cpp
#include <iostream> #include <vector> #include <optional> #include <cmath> #include <functional> using namespace std; template <typename K, typename V> class Fibonacci_open_addressing { private: struct HashNode { K key; V value; bool occupied; HashNode(const K& key, const V& value)...
ALGO
0.999209
6.255031
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2024-05-29T20:44: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": "d50addba1a...
f913018e-4263-4a49-b9e3-6948f38bafc7
gleisonsdm/DawnCC-Compiler
ArrayInference/Coalescing/Coalescing.h
//===--------------------------- Coalescing.h ----------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the Universidade Federal de Minas Gerais - // UFMG Open Source License. See LICENSE.TXT for details. // // Copyright (C) 2016 <NAME> // //===-...
TOOL
0.980643
6.103121
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2016-10-16T20:57:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 62, "forks": 8, "issues": 13, "pull_requests": 0 }, "file_meta": { "content_id": "4dce927...
e9c0d6b8-d57f-4820-9573-fbd4d5250cfe
codenuri/ssdp
DAY1/5_도형편집기3.cpp
#include <iostream> #include <vector> // #3-1. 해결책1 // => Rect* 나 Circle* 로 캐스팅 한후 사용 // => 문법적으로는 문제 없지만 // 단점 // => Triangle 이라는 새로운 클래스가 추가되면 // => main 함수의 캐스팅하는 if 문이 추가되어야 한다. // => OCP 를 만족할수 없는 나쁜 디자인!!! // => "타입을 조사" 하는 것은 나쁜 디자인을 만들게 된다. class Shape { int color = 0; public: virtual ~Shape() {} }; clas...
TOOL
0.923279
4.531588
{ "github_metadata": { "branch": "main", "commit_count": 403, "repo_created_at": "2025-03-30T08:16:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "58fa2dc757...
efb6ce9d-f82c-4bbb-9e09-d21aab90df54
LoSk-p/esp-robonomics-client
src/address.cpp
#include "blake/blake2.h" #include "address.h" #include <cstring> #include <Ed25519.h> const char *const ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; const int ALPHABET_MAP[128] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ...
TOOL
0.942037
6.887514
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-12-10T20:15: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": "a7fa17e86b3...
9b737d3a-53a8-4d78-96cb-8c025ca7643c
ulgal/Algorithm
A/[4012]cook.cpp
#include<iostream> using namespace std; int N; int num[16][16] = {0}; int arr1[8] = {0}; int arr2[8] = {0}; int arr_cnt, min_dif; int abs(int a){ if(a<0) return -1*a; else return a; } int min(int a, int b){ if(a<b) return a; else return b; } void fill_dif(){ int ans...
ALGO
0.999864
4.018765
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2020-01-02T13:21:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a6e32d08...
d3c2fdbe-f554-4bf8-ba19-0ffdf259995a
liwei330249526/my-hw-oj
oj300/278关联子串.cpp
/* * 题目描述 给定两个字符串str1和str2,str1进行排列组合只要有一个str2的子串则认为str1和str2是关联子串 请返回子串在str2的起始位置,若不是关联子串则返回-1 两个字符串的长度范围[1,100000] 之间 样例1 输入 abc efghicbaiii 输出 5 样例2 输入 abc efghiccaiii 输出 -1 * * */ #include "string" #include "iostream" #include "vector" #include "algorithm" using namespace std; int main(){ string str; ...
ALGO
0.999983
4.232525
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-11-14T17:08: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": "04c027ba306...
167429fc-d0de-4376-b1c2-516103b40ede
andrea-fel/natural-numbers
arrayofT.h
#include <iostream> template <typename T> class arrayof { protected: int nelem; T* adr; public: arrayof(int); ~arrayof(); arrayof(const arrayof &); arrayof & operator = (const arrayof &); bool operator > (const arrayof &) const; bool operator >= (const arr...
TOOL
0.956816
4.499765
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2020-10-01T20:33:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dcf665b3c222...
91460d3c-b477-481e-a4fd-e1f70d752618
InvincibleSarthak/Competitive-Programming
Graphs/Find whether path exists.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; bool isValid(int a, int n){ return (a>=0 && a<n); } int main() { int t; cin>>t; while(t--){ int n; cin>>n; int arr[n][n]; pair<int,int>source, destination; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ ...
ALGO
0.999849
3.833118
{ "github_metadata": { "branch": "master", "commit_count": 265, "repo_created_at": "2019-06-15T17:25:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91a6bf82...
3f2fe91a-74d7-4265-94be-7c98c1fff6fa
wascode93/Algorithms
Algorithms/KosarajuSCC.cpp
//#include <iostream> //#include <vector> // //using namespace std; // //vector < vector < int > > ReverseGraph ( vector < vector < int > > & graph ){ // // vector < vector < int > > reversed_graph = graph; // // for ( int i = 0; i < graph.size(); i++ ){ // for ( int j = i+1; j < graph.size(); j++ ){ /...
ALGO
0.999935
4.952396
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-05-19T19: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": "29ba57ab48...
4b30b931-4ad1-4aac-87e6-ec4623b54e11
theodore/olympiads
HOJ/1583/main.cpp
#include <cstdio> #include <cassert> #ifdef unix # define lld "%lld" #else # define lld "%I64d" #endif const int N(4000010); const long long INF(-1llu>>1); int a[2], b[2], d[2]; long long l[2][N]; int h[2], t[2]; long long f(long long c, int x) { return a[x] * c / d[x] + b[x]; } int main() { int s, n; scanf("%d%d...
ALGO
0.9999
3.910446
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-06-11T08:19: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": "cf8de855f0...
e3291bcf-4874-460b-b22b-6a92a95ced73
zhanxw/rvtests
vcfUtils/vcf2kinship.cpp
#include <algorithm> #include <cassert> #include <map> #include <set> #include <string> #include <vector> #include "third/eigen/Eigen/Core" #include "third/eigen/Eigen/Eigenvalues" #include "third/tabix/tabix.h" #include "base/Argument.h" #include "base/IO.h" #include "base/Indexer.h" #include "base/Kinship.h" #inclu...
ALGO
0.996689
4.685306
{ "github_metadata": { "branch": "master", "commit_count": 1204, "repo_created_at": "2013-01-09T20:58:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 139, "forks": 43, "issues": 100, "pull_requests": 5 }, "file_meta": { "content_id": "e8...
52001427-f46f-439a-8636-1cb38d42b568
ZihanYuanCN/C
最短路练习-F-Wormholes/最短路练习-F-Wormholes/main.cpp
// // main.cpp // 最短路练习-F-Wormholes // // Created by 袁子涵 on 15/10/11. // Copyright (c) 2015年 袁子涵. All rights reserved. // #include <iostream> #include <string.h> #include <stdio.h> #include <stdlib.h> #define INF 999999999 using namespace std; typedef struct edge { int S,E; long long int T; }Edge; int ...
ALGO
0.999701
4.058286
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2015-10-10T04:46: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": "07f58ff5c...
f6d1baf2-ba6d-4059-8b60-b4300e9c8a2f
jcosentino/Fit-Algorithms-CSC305Lab2
Fit Algorithms - CSC305Lab2/main.cpp
/* This is Lab 2 of Operating Systems The purpose of this lab is to demonstrate the algorithms for: First fit, Best Fit, Worst Fit, and Next Fit. The user will input the number of jobs and partitions, and the sizes of each. The user will also input the total space. The program will print out which partitions are taken ...
ALGO
0.998727
4.414964
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2017-12-02T21:36: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": "27d6283d27eb...
91084c9e-138e-4e8c-8d23-29a4f1a629d2
Not-Mostafa/CP
A_Just_Calc_Degree.cpp
//****************************************************** //* 3MK The GOAT * //****************************************************** #include <bits/stdc++.h> using namespace std; #define FIO ios ::sync_with_stdio(false), cin.tie(nullptr), cout.tie(NULL) ...
ALGO
0.999924
4.582799
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-05-13T19:15: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": "3201c049e10a...
e2e6a314-d3d8-4f0a-8a5c-5c9dda8e618d
Komalbachhraj/dsa_problems
day_20.cpp
Q1. sol: class Solution { public: static bool st(pair<char,int>& a,pair<char,int>& b) { if (a.second == b.second) return a.first < b.first; return a.second > b.second; } string frequencySort(string s) { unordered_map<char,int> mp; for(char c:s) mp[c]++; vector<...
ALGO
0.999954
4.743431
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2025-03-05T12:06:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8dc486bd033...
259587a2-d0e2-4db9-baaf-909c18cf36ae
VINAYAKBENI/DSA-Codes-Apna-College
Sorting Techniques/DNF Sort.cpp
#include <bits/stdc++.h> #define e cout << endl; using namespace std; // DNF Sort(For 0,1,2) void dnfsort(int arr[], int n) { int low = 0, mid = 0, high = n - 1; while (mid != high) { if (arr[mid] == 0) { swap(arr[low], arr[mid]); mid++; low++; }...
ALGO
0.999982
4.340515
{ "github_metadata": { "branch": "main", "commit_count": 156, "repo_created_at": "2021-10-28T05:57: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": "5f75a050a5...
36aaf17e-c5c2-4e8d-866e-b8cc1d0a3c55
tubo-tubo/roll_and_walk
mdl4/main.cpp
//#include <ode/ode.h> // ODE用ヘッダーファイル #include <drawstuff/drawstuff.h> // 描画用ヘッダーファイル #include <stdio.h> //#include "lib/new/setdraw.cpp" // 描画関数 //#include "create.h" //#include "control.h" #include "control.h" #include "makebody.h" //#include "lib/new/makebody.cpp" #ifdef _MSC_VER #prag...
ALGO
0.99184
3.01584
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2017-03-10T07:50: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": "b4ae06c867...
5d0fc3bd-c8d3-47e1-86c9-12082f732bb9
mostainRifat/AlgorithmsP
BFS Graph.cpp
#include <bits/stdc++.h> using namespace std; const int edge = 7; const int vertex = 6; vector<int> adjlist[vertex]; bool visited[vertex]; void bfs(int sourc_node); int main() { for (int i = 0; i < edge; i++) { int u, v; cin >> u >> v; adjlist[v].push_back(u); adjlist[u].push_bac...
ALGO
0.999836
4.696101
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-07-12T12:14: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": "51fccbb42a15...
c1906371-0910-471f-a6c9-92774b2ec221
krunalmbhatt/algoForRobots
src/all_algo/src/dijkstra.cpp
#include <ros/ros.h> #include <nav_msgs/OccupancyGrid.h> #include <visualization_msgs/Marker.h> #include <queue> #include <vector> #include <unordered_map> struct Node { int x, y; double cost; Node* parent; Node(int x, int y, double cost, Node* parent = nullptr) : x(x), y(y), cost(cost), p...
ALGO
0.998649
5.852549
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-07-19T05:43:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e53acd7acb95...
44a0ed10-a97d-44ed-8059-db90bca0a9f1
aseemarora1995/OnlineJudges
Leetcode/206. Reverse Linked List.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: // Recursive solution ListNode* reverseListUtil(ListNode *curr, ListNode *nexter){ ListNode* head = curr; if(!ne...
ALGO
0.999865
5.93153
{ "github_metadata": { "branch": "master", "commit_count": 106, "repo_created_at": "2017-06-01T18:38:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c8a8409...
240e530b-af82-4c7f-a374-8479eae314f5
Surajv311/myProgramming_Interview-Prep
Coding/[IMP] INTERN-PLACEMENTS-PREP/DS-ALGO_QUESTIONS_[SOLVED]/stack&queue/other/rotten oranges.cpp
/* ////////////////////////////////////////////////////// //Question/Info Rotten Oranges Medium Accuracy: 50.57% Submissions: 15993 Points: 4 Given a grid of dimension nxm where each cell in the grid can have values 0, 1 or 2 which has the following meaning: 0 : Empty cell 1 : Cells have fresh oranges 2 : Cells have r...
ALGO
0.99991
5.274462
{ "github_metadata": { "branch": "master", "commit_count": 958, "repo_created_at": "2020-07-31T07:27:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8f4e7688...
f02b15ce-35dc-474f-8be2-a9ca7f85a62b
TKishioru/KMITL.CE
Year2019_1/01076001 INTRODUCTION TO COMPUTER ENGINEERING/Arduino/Robot_Car/Robot_Car.ino
//เป็นโค้ดที่อาจไม่สามารถรันได้อย่างถูกต้อง เนื่องจากเป็นโค้ดที่ไม่สมบูรณ์ที่เกิดจากแนวคิด PID ในการทำ int sensorsValue[5]; // do not use 0 index int lineV = 0; int groundV = 0; int meanV = 500; int N = 5; int motorSpeed; int baseSpeed = 100; int rightSpeed, leftSpeed; int maxSpeed = 100; int sum_error = 0; // PID in...
ALGO
0.997953
4.32863
{ "github_metadata": { "branch": "main", "commit_count": 327, "repo_created_at": "2021-06-07T13:11:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5451682ebd...
64df6994-4dee-49d2-bd3f-6ecec512af85
ThijsVlaeyen/3DCG-Raytracer
raytracer/raytracer/raytracers/ray-tracer-v6.cpp
#include "ray-tracer-v6.h" #include "ray-tracer-v5.h" #include "raytracers/ray-tracers.h" using namespace imaging; using namespace math; using namespace raytracer; RayTracer raytracer::raytracers::v6() { return raytracer::RayTracer(std::make_shared<raytracer::raytracers::_private_::RayTracerV6>()); } imaging::Colo...
ALGO
0.993109
5.815044
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2020-09-29T17:57:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d47299a82...
99aa3f1a-80ec-4f56-b4cb-a822cdc4d64e
AdarshDaftari/Artificial-Intelligence
tictac_mapping.cpp
#include <iostream> #include <vector> #include <map> using namespace std; vector<int> play_board(10, 2); // 2 indicates empty int human = 5; // human marker int AI = 3; // AI marker bool humanTurn = true; // track whose turn it is map<int, char> mapping = {{2, '-'}, {5, 'X'}, {3, 'O'}}; // map values to symbols /...
ALGO
0.999824
7.144156
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-18T07:36:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "02600e8aa96b...
834a3664-b78b-4b29-b747-693fcfdb75aa
debnatkh/mosinf-setcov
files/gen.cpp
// #include "testlib.h" #include <iostream> using namespace std; #include <iostream> #include <string> #include <algorithm> #include <random> std::default_random_engine generator; void gen(int n, int m, int k) {; std::normal_distribution<double> distribution(k, rand() % 10); cout << n << " " << m << endl; ...
TEST
0.958499
3.634788
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-02-02T10:28:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "178d160ff...
f75d141b-442c-4e9b-8ebf-0e44b37e242c
MethEthPro/DSA
stiver_dsa/step_6/lec1/insert.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; class Node{ public: int data; Node* next; public: Node(int data1, Node* next1){ data = data1; next = next1; } Node(int data1){ data = data1; next = nullptr; } }; Node* arrtoLL(vector<int...
ALGO
0.99997
5.481597
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2024-10-02T20:08: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": "0e2b8cc334f...
19f314da-93dd-4852-8978-027113b10195
rodyherrera/LeetCode
reverseLinkedList2.cpp
struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(nullptr) {} }; class Solution{ public: ListNode* reverseBetween(ListNode* head, int left, int right){ if(!head || left == right) return head; ListNode dummy(0); dummy.next = head; ...
ALGO
0.999997
5.7806
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2024-05-21T20:17:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ade1ee352e2...
e5ff332e-70ca-4a9d-b94a-facc4ba15a52
Kwask/CS2-Labs
testing/treeTest.cpp
#include <iostream> #include <stdlib.h> #include <time.h> #include <getopt.h> #include "BinaryTree.h" using namespace std; int main( int argc, char* argv[] ){ int node_number = 100; int value_range = 100; int c; opterr = 0; while(( c = getopt( argc, argv, "n:r:" )) != -1 ){ switch( c ){ case 'n'...
TOOL
0.911719
4.322058
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-06-16T13:58:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "173b79db6b...
f7e0f2fc-9ecf-40a8-9672-6198465ae771
abhimanu/ThreadStructureMMSBmodel
MMSBTensorLDA/MmsbPoissonTensorLda.cpp
/* * MmsbPoissonTensorLda.cpp * * Created on: Feb 23, 2013 * Author: abhimank */ #include "armadillo" #include <iostream> #include <string> #include <boost/math/special_functions/gamma.hpp> #include <boost/random/uniform_01.hpp> #include <boost/generator_iterator.hpp> #include <boost/random.hpp> using name...
ALGO
0.998591
3.990202
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2013-06-05T04: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": "6a01df9c5...
ec73f8c6-3f3c-43ae-8a9b-bc7b0c9919f1
bsumirak/AoC
AoC2019/day12.h
/* * day12.h * * Created on: 2019-12-12 * Author: mbreit */ template <typename T> T ggt(T a, T b) { if (b > a) std::swap(a, b); T tmp; while (b) { tmp = b; b = a % b; a = tmp; } return a; } template <typename T> T kgv(T a, T b) { T g = ggt(a, b); return a*b/g; } template <> void executeDa...
ALGO
0.999777
4.047834
{ "github_metadata": { "branch": "master", "commit_count": 235, "repo_created_at": "2019-12-06T18:14:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ef352ed6...
cf1cf8ab-cc5d-49d2-b1c8-d41a7c4b5312
lee-honey/CodingTest-Study
09주차/H-Index/hyeonjun.cpp
#include <string> #include <vector> #include <algorithm> #include <iostream> using namespace std; int solution(vector<int> citations) { int answer = 0; sort(citations.begin(), citations.end()); int s = 0, e = 10000; while(s <= e) { int mid = (s + e) / 2; int cnt = 0; ...
ALGO
0.999968
5.667085
{ "github_metadata": { "branch": "master", "commit_count": 471, "repo_created_at": "2023-05-19T06:10:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a387c47...
745e27ae-70f4-4724-8225-35e61e11ce93
Ironvzla/Desafio-Final
Ejercicio 1 Desafio Final.cpp
#include <iostream> #include <cstdlib> #include <ctime> // Función para verificar si un número es primo bool esPrimo(int num) { if (num <= 1) { return false; } for (int i = 2; i * i <= num; ++i) { if (num % i == 0) { return false; } } return true; } int main() {...
ALGO
0.998346
5.307584
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-08-03T23:23: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": "cca849ec1eb2...
93c14d6b-316f-4ced-a742-f26d3a67fdf0
youxxxx/Competitive_Programming
Codeforces/misc/1266/E/E/source.cpp
#include<cstdio> #include<cmath> #include<string> #include<vector> #include<algorithm> #include<map> using namespace std; int main() { long long n; long long arr[200001]; scanf("%lld", &n); for (long long i = 1; i <= n; i++) { scanf("%lld", &arr[i]); } long long add[200001] = { 0, }; map<pair<long long,...
ALGO
0.999852
4.742087
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-11-05T04:42: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": "d8664457f...
38e4f1a5-e468-4a6d-90e5-eda2d16cb0aa
dpcomp-org/dpcomp_core
dpcomp_core/algorithm/thirdparty/xiaokui/main.cpp
// Implemented by <NAME> // 2011-05 // Please contact use: // <EMAIL> #include "Utilities.h" #include "DP.h" #include "M_DP.h" //*************Function Declarations************** //Laplacian Mechanism (Dwork) void dwork (vector<double>& counts, double epsilon, ofstream& o_file); //Mean-NoiseFirst void noiseFirst (ve...
ALGO
0.99739
4.107923
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2016-11-21T22:04:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 43, "forks": 12, "issues": 4, "pull_requests": 1 }, "file_meta": { "content_id": "a5bcb9bb...
50a8a96b-0c44-4f9c-980a-f19cce2fb2cb
AbiDev2003/CPP-learning-abdul-bari-Udemy
STL/Student_exercise_map_15.cpp
// Problem : Write a program to store and retrive list of item in a file Using vector classes // Classes should have 1. Name 2. Price 3. Quantity #include <iostream> #include <vector> #include <fstream> using namespace std; class Items{ private: string name; int price; int quantity; public: ...
TOOL
0.933856
3.955157
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-04-11T14:05:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12a5f8438b80...
5c17e452-1c78-4d3f-be31-d4ca348e0d03
bhupkas/Spoj
spoj/PON.cpp
/* bhupkas */ #include "iostream" #include "stdio.h" #include "algorithm" using namespace std; long long mulmod(long long a,long long b,long long c){ long long x = 0,y=a%c; while(b > 0){ if(b%2 == 1){ x = (x+y)%c; } y = (y*2)%c; b /= 2; } return x%c; } l...
ALGO
0.99964
4.242661
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-02-24T16:53:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8461bef029...
d28c9499-e213-40fc-a8d9-cd9bf3f7f18e
xa6xa6/metaOthello
classifier/src/others/general/sortKmerBin_info.h
// This file is provided as a part of MetaOthello. Please refer to LICENSE.TXT for the 'License' #ifndef SORTKMERBIN_INFO_H #define SORTKMERBIN_INFO_H #include <stdio.h> #include <stdlib.h> #include <math.h> #include <malloc.h> #include <string.h> #include <iostream> #include <fstream> #include <stack> #include <vector...
ALGO
0.990898
4.180697
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2016-11-01T21:07:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 7, "issues": 10, "pull_requests": 1 }, "file_meta": { "content_id": "93517ad...
19badd11-45d9-4937-9ddf-ff522adee395
ruachang/Digital-Image-Processing
thresh_split/thresh_split.cpp
#include <iostream> #include <fstream> #include <opencv4/opencv2/opencv.hpp> #include <opencv4/opencv2/core.hpp> #include <opencv4/opencv2/highgui.hpp> #include "bmphdr.h" using namespace std; using namespace cv; /* 输出 bmp 图片头部信息 */ void bmpFileInfo(ifstream &fpbmp, int &Offset, int &rows, int &cols); /* 将 bmp图片读入 Ma...
DATA
0.993892
3.510087
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2022-09-15T07:44:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8564d386...
22fd9642-51fc-4aa5-a272-2f8217f26005
mikeethanh/AlgorithmAndDataStructure
vector/vector/vector.cpp
#include<iostream> #include<vector> #include<string> #include<sstream> using namespace std; //vector nhu la mot mang dong //vector<kieu du lieu> ten vector //push_back() //size() : kich thuoc cua vector //truy cap cac phan tu thong qua chi so //duyet //duyet bang iterator //vector <int> v //vector <int> v(n) //vec...
TOOL
0.986321
3.309516
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2023-10-29T08:58:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca0572feb...
0915e3fb-f995-4c07-b047-b73eb332205d
bvanessen/lbann_distconv
include/lbann/layers/transform/in_top_k.hpp
//////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2014-2019, Lawrence Livermore National Security, LLC. // Produced at the Lawrence Livermore National Laboratory. // Written by the LBANN Research Team (<NAME>, et al.) listed in // the CONTRIBUTORS file. <<EMAIL>> // // LL...
ALGO
0.983649
7.064628
{ "github_metadata": { "branch": "distconv", "commit_count": 7437, "repo_created_at": "2019-10-13T05:53:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5eb1d...
dfe51db2-df1c-470d-882b-a44ca232832d
degustaf/AdventOfCode2022
src/day1.cpp
#include "day1.hpp" #include <algorithm> #include <numeric> #include <functional> #include <sstream> #include <thread> #include "channels.hpp" using std::ostream; using std::string; /* Single threaded. Day1::Day1(const std::string &filename) : data(filename) { best.fill(0); string s; int current = 0; ...
ALGO
0.989191
5.716355
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-12-01T22:12:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e4ac24592da...
6500a4e4-9549-4e5a-b530-0a4ee8b2ec0b
Student9876/dsa
Tree/binary_tree/construct_BT_inorder_preorder.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define f(i,m,n) for(ll i=m;i<n;i++) #define fi(i,m,n) for(ll i=m;i>=n;i--) #define fa(i,j) for(auto i:j) #define nl cout<<endl; #define ump(a,b) unordered_map<a,b> #define omp(a,b) map<a,b> const int MOD = 1e9+7; ll power(ll x, ll y){ll res = 1;while(y...
ALGO
0.999998
5.796762
{ "github_metadata": { "branch": "main", "commit_count": 137, "repo_created_at": "2024-02-15T05:29: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": "0e7ce47282...
b107988b-eedd-4cd3-822c-da183f9ccdfa
gismo/shapeopt
gsOptPotWavesWithReg2nd.cpp
#include <gismo.h> #include "gsWinslowPow.h" #include "gsWinslowG0Pow.h" #include "gsDetJacConstraint.h" #include "gsOptPotWavesWithReg2nd.h" #include "gsDetJacConstraint.h" gsOptPotWavesWithReg2nd::gsOptPotWavesWithReg2nd(gsMultiPatch<>::Ptr mp, gsMultiPatch<>::Ptr center, gsShapeOptProblem::Ptr sopt, index_t numRe...
ALGO
0.990756
3.87209
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2019-03-25T09:09:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "252f470e5...
7cbb5991-f1d9-4ad2-b0f4-968a11869b06
Matos221/Actividades-TP
ACT Guia/PRACTICA10.cpp
//ACT 100 --> K-1145 #include<iostream> #include<conio.h> #include <stdlib.h> using namespace std; struct Nodo{ int numero; Nodo *siguiente; }; //PROTIPOS DE FUNC void AgregarPila(Nodo *&, int); void SacarPila(Nodo *&, int &); //FUNC MAIN int main(){ Nodo *Pila = NULL; int numero; cout<...
ALGO
0.983258
3.758588
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-07-17T18:29: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": "f1fc94c3b332...
fba63a38-f7b4-4819-9906-bf4fc77705e9
aditya-mukherjee-127/Concepts_DSA_CP
Number Theory/Euler_Phi.cpp
#include <bits/stdc++.h> #define ll long long int #define mod 1000000007 #define inf (long long int)1e18 #define log(args...) { std::string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); std::stringstream _ss(_s); std::istream_iterator<std::string> _it(_ss); err(_it, args); } #define logarr(arr,a,b) for(int z=...
ALGO
0.999736
4.609229
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2022-06-29T03:41:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4a112182...
c5be8dfd-8a70-4e56-bb8c-6b7115fa4679
MihaJjDa/scmodel
2hw/mpiwaves_comm.cpp
#include <mpi.h> #include <omp.h> #include <iomanip> #include <iostream> #include <vector> #include <cmath> #include <cstdlib> /********************************************************************************* Класс MPIGridFunc этот класс отвечает за хранение сетки численного метода на узлах MPI Содержимое: N[x,...
ALGO
0.998773
4.351677
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-02-24T18:48: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": "f622c03243...
598c0eda-4f09-47b2-bc8f-f8c39fadd73b
M-o-C-u-i-s-h-l-e/SPOJ
PIE.cpp
#include <bits/stdc++.h> using namespace std; #define endl "\n" int n, f; vector<double> arr; bool check(double x) { int total = 0; if (x == 0) return false; for (int i = 0; i < n; i++) total += (int)(arr[i] / x); return total >= f; } double solve() { double l = 0, r = arr[n-1]; while (r - l >= 1e-3) { dou...
ALGO
0.999856
4.366636
{ "github_metadata": { "branch": "master", "commit_count": 129, "repo_created_at": "2019-04-27T12:18: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": "a86b5ad5...
b227e737-da84-4de5-81dc-63e1ddaa6490
williamjy/leetcode_2025
cpp/432.cc
class AllOne { private: map<string, int> key_map; map<int, set<string>> count_map; public: AllOne() { } void inc(string key) { if (key_map.count(key) == 0) { key_map[key] = 1; if (count_map.count(1) == 0) { set<string> new_set; ...
ALGO
0.999941
6.317912
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2024-12-29T13:01: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": "4ec02515b...
5212d0f0-5035-45fb-aaa9-400309aca69e
iamtasir/Competitive-programming
2021/September/A_Vacations.cpp
///* ***<NAME>*** */ /* Algorithm Used: */ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double dl; typedef unsigned long long ull; #define pb push_back #define eb emplace_back #define PB pop_back #define nn "\n" #define O_O \ ios_base::sync_with_...
ALGO
0.999986
3.856292
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2022-01-09T20:26: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": "8993bf72913...
0d81ef8b-7cc9-40ea-9068-b8428c55f752
RydKrm/Competitive_Program
Codeforces/331C1 The great julya calender.cpp
/// S -> 10:25AM E-> 10:45AM //#include <bits/stdc++.h> #include<iostream> #include<stdio.h> #include<stdlib.h> #include<math.h> #include<cstring> #include<vector> #include<string> #include<stack> #include<queue> #include<map> #include<unordered_map> #include<set> #include<unordered_set> #include<iterator> #include<a...
ALGO
0.999939
3.826647
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-11-15T14:36:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c3066c9db950...
33a0999b-720d-4c8d-b81a-cc71cabcaeae
henrybear327/Sandbox
UVa/Data Structures and Libraries/Linear Data Structures with Built-in Libraries/C++ STL queue and deque (Java Queue and Deque)/540 Team Queue/main.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; int index = 1; while(scanf("%d", &t) == 1 && t) { printf("Scenario #%d\n", index++); map<int, int> team_table; for(int i = 0; i < t; i++) { int n; scanf("%d", &n); for(int j = 0; j < n; j++) { int tmp; scanf("%d", &tmp...
ALGO
0.999821
3.40626
{ "github_metadata": { "branch": "master", "commit_count": 1136, "repo_created_at": "2016-03-14T01:30: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": "66c471b...
b542a313-7721-4cde-92ab-ee75626fe4c9
kiabrekke/devomed
src/threads/source/solver_thread.cpp
#include "utils.hpp" #include "pd_vec3d.hpp" #include "pd_quat.hpp" #include "qp_control.hpp" #include "solver_thread.hpp" #include "robot_structs.hpp" #include <fstream> #include <vector> // CVXGEN solver globals Vars vars; Params params; Workspace work; Settings settings; void* SolverThread(void* arg) { printf...
ALGO
0.997507
4.387064
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2019-03-08T08:40:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c0e100edf...
de15b1c3-a5c0-4339-a18a-9c55a13afc67
windystrife/UnrealEngine_NVIDIAGameWorks
Engine/Source/ThirdParty/IntelEmbree/Embree270/src/kernels/xeon/bvh8/bvh8_intersector16_chunk.cpp
// ======================================================================== // // Copyright 2009-2015 Intel Corporation // // // // Licensed under the Apache License, Version 2.0 (the "License"); // // y...
ALGO
0.998546
5.735676
{ "github_metadata": { "branch": "4.18-GameWorks", "commit_count": 14, "repo_created_at": "2018-03-06T15:44:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 284, "forks": 176, "issues": 4, "pull_requests": 2 }, "file_meta": { "content_id"...
46645bf8-58a1-4434-9b6a-8bf9a26bf30e
kevinrjt/leetcode
flatten-nested-list-iterator/flatten-nested-list-iterator.cpp
#include <iostream> #include <stack> #include <utility> #include <vector> #include "../definitions.h" using namespace std; #define SOLUTION_3 #ifdef SOLUTION_1 class NestedIterator { public: NestedIterator(vector<NestedInteger> &nestedList) { for (auto &nestedInt : nestedList) { ...
ALGO
0.999838
5.49834
{ "github_metadata": { "branch": "main", "commit_count": 161, "repo_created_at": "2020-11-21T09:55: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": "2ad871459a...
cb6d4483-6c89-430f-97de-5a757500f350
uncle-lu/surf-the-internet
luogu/7910.cpp
#include <algorithm> #include <cstdio> using namespace std; const int N = 8010; struct node { int val, sit; }; int now[N]; node line[N]; bool cmp(node a, node b) { return a.val < b.val || (a.val == b.val && a.sit < b.sit); } int main() { int n, T, model, x, v; scanf("%d %d", &n, &T); for (int i =...
ALGO
0.999986
4.30617
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-07-05T06:55: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": "8521c541a0e6...
4904cc85-7c85-4ed2-8231-079634ce4130
MakerJun46/Study_BaekJoon
src/10828_스택.cpp
#include <iostream> #include <algorithm> #include <vector> #include <stack> #include <stdio.h> using namespace std; int N; int main() { cin >> N; int inputNum; stack<int> s; string input; for (int i = 0; i < N; i++) { cin >> input; if (input == "push") { ...
ALGO
0.993208
4.244043
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2021-12-23T16:28: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": "7cd55ded2...
f65a66ec-dea1-4300-9f40-7d5e276466bd
mushkul/Vanderbilt-CP
solutions/gpt-4/1642.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n, x; cin >> n >> x; pair<int,int> arr[n]; for(int i = 0; i < n; i++){ cin >> arr[i].first; arr[i].second = i+1; } sort(arr, arr+n); for(int...
ALGO
0.999967
4.096627
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-09-18T17:07: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": "d3ef28fb3c7...
61008edb-4687-43bd-bea3-b4221f356cb7
Fulim13/OpenGL-Learn
Exercise1/Source.cpp
#include <Windows.h> // window class #include <gl/GL.h> // openGL class #include <math.h> // math class #pragma comment (lib, "OpenGL32.lib") #define WINDOW_TITLE "Practical Exercise 1" int questionNumber = 1; //Question number float x = 0.0, y = 0.0; // Origin of circle float radius = 0.2; // Radius o...
TOOL
0.982834
4.344692
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2024-11-20T08:35: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": "8319eeaf2c7...
90e9c9eb-73d3-43cd-a40e-3598b9f1c7cc
gershnik/wsdd-native
src/config.h
// Copyright (c) 2022, <NAME> // SPDX-License-Identifier: BSD-3-Clause #ifndef HEADER_CONFIG_H_INCLUDED #define HEADER_CONFIG_H_INCLUDED #include "sys_util.h" #include "util.h" #include "xml_wrapper.h" constexpr uint16_t g_WsdUdpPort = 3702; constexpr uint16_t g_WsdHttpPort = 5357; constexpr const char * g_WsdMulti...
CONFIG
0.960407
6.480147
{ "github_metadata": { "branch": "master", "commit_count": 300, "repo_created_at": "2022-07-14T08:58:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 50, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0765c10...
f9a95aec-1fa2-424f-8e74-221e7fdd776d
bluepine/topcoder
topcoder-master-3/TableSeating/TableSeating.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
ALGO
0.998908
5.039955
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2014-04-02T21:11:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd39aabb64...
6ac520e9-1e74-4667-bc50-7c55913d3fe3
Simarjeet06/DSA-Progress
Daily/ConvertBinaryNumberLLintoInt.cpp
#include <iostream> #include <cmath> using namespace std; // Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; class Solutio...
ALGO
0.999984
4.905333
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2025-06-23T05:27: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": "7ffb4d8264e...
8cb32ece-24f6-4581-8d06-455813b88e1b
energia/Energia
build/shared/examples/02.Digital/toneMelody/toneMelody.ino
/* Melody Plays a melody circuit: * 8-ohm speaker on digital pin 8 created 21 Jan 2010 modified 30 Aug 2011 by <NAME> This example code is in the public domain. http://arduino.cc/en/Tutorial/Tone */ #include "pitches.h" // notes in the melody: int melody[] = { NOTE_C4, NOTE_G3,NOTE_G3, NOTE_A...
ALGO
0.975835
5.846627
{ "github_metadata": { "branch": "master", "commit_count": 3161, "repo_created_at": "2012-03-24T03:31:40.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "arduino/Arduino", "stars": 801, "forks": 668, "issues": 211, "pull_requests": 36 }, "file_meta": { "con...
590309f5-5ff7-438f-aed2-bd1c7a98ed26
algorithm-cpp-study/code-repository
기초 코드 작성 요령 2/codes/B10804.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; //-2^63 ~ 2^63-1 typedef unsigned long long llu; typedef pair<int, int> pii; typedef pair<double, double> pdd; typedef pair<int, pii> piii; typedef pair<ll, ll> pll; typedef pair<ll, int> pli; typedef pair<int, ll> pil; typedef pair<string, int> psi;...
ALGO
0.999539
3.548925
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-03-14T06:08:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bbcd9328242f...
4fbef7c1-250b-4e8f-842e-a5079111e096
prembansod1999/41310_LP3
ICS/Assignment 1/Sdes.cpp
#include<bits/stdc++.h> using namespace std; class Sdes { public: map<int,int> key,key1,key2,p10,p8,p4,pt,expanded,ct; int *Larr,*Rarr,*IPLarr,*IPRarr,*S0L,*S1R; int s0[4][4] = {{1,0,3,2},{3,2,1,0},{0,2,1,3},{3,1,3,2}}; int s1[4][4] = {{0,1,2,3},{2,0,1,3},{3,0,1,0},{2,1,0,3}}; //S0 and S1 are two sboxes //Simpli...
ALGO
0.999981
4.024071
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-03-10T07:51: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": "8853472834e8...
089e4c6c-9acb-4bdf-a55e-193ff52a3e65
leocaodou/first
mari_and_shiny.cpp
#include <stdio.h> #include <iostream> #include <string> #include <math.h> #include <algorithm> using namespace std;160 140 30 20 10 int main() { int n,i,x = 0,y = 0; cin >> n; char a[n + 1]; getchar(); for(i = 0;i < n;i++) { a[i] = getchar(); if(a[i] == 's') x++; if(a[i] == 'h') y++; } int Y[y] =...
ALGO
0.993294
3.040911
{ "github_metadata": { "branch": "master", "commit_count": 247, "repo_created_at": "2018-11-14T13:59:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 24 }, "file_meta": { "content_id": "df823f8...
b66be17c-f6e4-435b-b9ba-b4f1b98afed9
blue-stone-j/concave_hull
pcl/surface/include/pcl/surface/impl/concave_hull.hpp
#include <pcl/pcl_config.h> #ifdef HAVE_QHULL #ifndef PCL_SURFACE_IMPL_CONCAVE_HULL_H_ #define PCL_SURFACE_IMPL_CONCAVE_HULL_H_ #include <map> #include <pcl/surface/concave_hull.h> #include <pcl/common/common.h> #include <pcl/common/eigen.h> #include <pcl/common/centroid.h> #include <pcl/common/transforms.h> #includ...
ALGO
0.998079
6.045759
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-02-28T09:38: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": "ed41206a569f...
94ca3abf-0c2e-4cf0-81cb-509099ee19dd
xjtju/PinT
src/include/PNewtonSolver.h
#ifndef _PinT_NEWTONSOLVER_H_ #define _PinT_NEWTONSOLVER_H_ 1 #include "Solver.h" /** * * The class is a template of pipelined Newton-Raphson method for nonlinear system * * The idea is similar with DC/RIDC * * It is not easy to be implemented, not yet finished */ class PNewtonSolver : public Solver ...
ALGO
0.999376
5.319464
{ "github_metadata": { "branch": "master", "commit_count": 122, "repo_created_at": "2017-12-26T07:12:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "afb71895...
3cf364eb-59f2-42df-b555-234f4a8001c5
vnk8071/inference-ai-with-cpp
lite-ai-toolkit/lite/ort/cv/faceboxesv2.cpp
// // Created by DefTruth on 2022/3/19. // #include "faceboxesv2.h" #include "lite/ort/core/ort_utils.h" #include "lite/utils.h" using ortcv::FaceBoxesV2; Ort::Value FaceBoxesV2::transform(const cv::Mat &mat) { cv::Mat canvas; cv::resize(mat, canvas, cv::Size(input_node_dims.at(3), ...
ALGO
0.984463
5.717147
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2022-01-22T12:35:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0de8ac5d246...
142798cd-be40-42e0-a0b8-9043292b620b
m-messiah/diskrette_optimization
DO4/main.cpp
#include <iostream> #include <vector> #include <fstream> #define MAX 32767 using namespace std; vector<int> G2B( MAX, 0 ); // G2B[g] — мальчик, который назначен девочке "g" vector< vector<int> > W( MAX ); // W[b] — список смежных девочек мальчика "b" int k; // мальчик, начиная с которого мы ищем улучшающий п...
ALGO
0.999982
3.194679
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2013-10-04T08:45: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": "9337a3b749...
a07de3e5-f777-48e5-94e5-c496a108f211
ROCm/OpenFOAM_HMM
src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/SphereDrag/SphereDragForce.H
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | -----------------------------------...
ALGO
0.996291
7.232376
{ "github_metadata": { "branch": "suyash/hmm", "commit_count": 25733, "repo_created_at": "2022-10-27T12:31:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25, "forks": 4, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "ee...
bfb361e0-0249-4b90-825c-0b97f43f6f00
yancouto/maratona-sua-mae
SuaMae/contests/Acampinas2016/S02/E02/J/J.cpp
#include <bits/stdc++.h> using namespace std; #define fst first #define snd second typedef unsigned long long ull; typedef long long ll; typedef pair<int, int> pii; #define pb push_back #define for_tests(t, tt) int t; scanf("%d", &t); for(int tt = 1; tt <= t; tt++) template<typename T> inline T abs(T t) { return t < 0?...
ALGO
0.999977
3.768297
{ "github_metadata": { "branch": "master", "commit_count": 490, "repo_created_at": "2015-06-27T20:54:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "212fd693...
3f736f6d-d6f0-44d9-8e27-db50e4e519eb
tkmiogw/atcoder
old/AGC011/a.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; const ll INF = 100000000; #define rep1(i, n) for (ll i=0; i<(n); i++) #define rep2(i, k, n) for (ll i=k; i<(n); i++) template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T>...
ALGO
0.999982
3.254571
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2024-01-21T11:51:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d1372801c11...
3e5fb054-3a99-42e7-8729-fff8a10ffc5b
Atik203/C_and_CPP
DSA/Problem Solving/Greedy/minimum_stops.cpp
#include <bits/stdc++.h> using namespace std; int main() { int D, m, n; cin >> D >> m >> n; vector<int> stations(n + 2); stations[0] = 0; for (int i = 1; i <= n; ++i) { cin >> stations[i]; } stations[n + 1] = D; vector<int> stops; int curr = 0; while (curr <= n) ...
ALGO
0.99996
3.645192
{ "github_metadata": { "branch": "master", "commit_count": 100, "repo_created_at": "2023-04-04T13:32:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7fecba0...
d9a80c99-236b-4f79-b8f4-e5b1280d3466
Preebie/CSCE_121
Labs/Lab 9 - Dungeon Crawler/main.cpp
#include <iostream> #include <fstream> #include <string> #include "helper.h" using std::cin; using std::cout;using std::endl;using std::string;using std::ifstream; int numUps, numDowns, numLefts, numRights, Moves = 0; /** * Creates internal representation of dungeon map. * @param fileName File name of dungeon ma...
ALGO
0.966419
4.074615
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-09-13T00:57: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": "a757b1f08936...
9aaf6330-58b3-45a4-88ad-2fbaa3e815e4
dahlia52/Altu-Bitu-4
10_이분 탐색/필수/16401.cpp
// 과자 나눠주기 #include <iostream> #include <vector> #include <algorithm> using namespace std; // target 길이일 때 나누어 줄 수 있는 수 int sharingSnack(int target, vector<int> &ln){ int cnt = 0; for (int i = 0; i<ln.size(); i++){ cnt += (ln[i] / target); } return cnt; } // m명에게 나누어 줄 수 있는 최대 길이 탐색 int binar...
ALGO
0.999997
5.082122
{ "github_metadata": { "branch": "main", "commit_count": 120, "repo_created_at": "2023-02-17T10:54:29.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "Altu-Bitu-Official/Altu-Bitu-4", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { ...
0fb93319-ae3f-4226-8e05-5754124a6368
Sean-Lan/leetcode
algorithms/combinationSumIII/combinationSumIII.cpp
/** * * Sean * 2016-05-04 * * https://leetcode.com/problems/combination-sum-iii/ * * Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 * can be used and each combination should be a unique set of numbers. * * Ensure that numbers within the set are sorte...
ALGO
0.999969
6.773705
{ "github_metadata": { "branch": "master", "commit_count": 754, "repo_created_at": "2015-04-08T02:27:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8fcc8360...
ec6fa2fa-310a-4c3a-a154-7f9256c89ff7
minhhuy24072002/LeetCode
5-longest-palindromic-substring/5-longest-palindromic-substring.cpp
class Solution { public: string longestPalindrome(string s) { int start, end, resLength = 0, resStart, resEnd; string result = ""; for (int i = 0; i < s.length(); i++){ if (i > 0 && i < s.length() - 1 && s[i - 1] == s[i + 1]) { start = i - 1; ...
ALGO
0.999992
5.982965
{ "github_metadata": { "branch": "main", "commit_count": 405, "repo_created_at": "2021-12-07T00:32:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48710a9dcc...
7f3218cd-7a61-4332-a534-c0d8b70589d6
ishandutta2007/codeforces-m
mrkastep/normal/140/C.cpp
#include <stdio.h> #include <math.h> #include <algorithm> #include <vector> #include <utility> #include <map> #include <queue> #include <time.h> using namespace std; #define For(i,n) for(i=0;i<(n);i++) #define FOR(i,a,b) for(i=(a);i<(b);i++) #define pb push_back #define mp make_pair #define ll long long int #define x...
ALGO
0.999761
3.164114
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03: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": "6fe0246eda0b...
1d0818bd-1b34-4205-803b-bb96292dc827
ShuyangUni/countdown-timer-traffic-light-estimation
countdown_timer_estimator/include/hsmm/hsmm_worker.h
/* * * Copyright (c) [2022] <<NAME>>, All Rights Reserved. * @Author: <NAME> * @Date: 2022-09-14 23:34:45 * @LastEditors: <NAME> * @LastEditTime: 2022-09-14 23:38:55 * @Description: */ #pragma once #include <Eigen/Dense> #include <Eigen/Sparse> #include <chrono> // NOLINT #include <iostream> #include <limi...
ALGO
0.990226
6.914466
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2022-09-12T16:53:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c30a292da...
a8162b82-369d-46fb-8585-59a16c52b57b
drguigui1/Tetravex-Solver
src/solver.hh
#pragma once #include "board.hh" #include "cooling.hh" class Solver { public: Solver(Board board); void solve(); void save(std::string path); // Getters / Setters Board get_board() const { return this->_board; } void set_verbose() { this->_verbose = true; } void display_log(bool first_lo...
ALGO
0.999774
5.300738
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2021-12-03T09:46: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": "a01c81a81af...
084fde68-57b8-44db-b16c-1a37d7a0bd83
Deepanshurathore01/CoderArmy180Days_DSA
Bnary_Searchtree/DeletioninbST/Delte.cpp
Node *deleteNode(Node *root, int target) { if(!root) return NULL; if(root->data > target) { root->left=deleteNode(root->left,target); return root; } else if(root->data < target) { root->right =deleteNode(root->right,target); return root; } else ...
ALGO
0.999544
3.074362
{ "github_metadata": { "branch": "main", "commit_count": 79, "repo_created_at": "2023-09-21T09:30:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4802f916040...
e190ece7-fcb7-4e7b-82a3-ad6b32ec77cd
Alex2305802003/Projet-Developpement-efficace
dev.cpp
#include <iostream> #include <stack> #include <string> using namespace std; stack<int> nombres; void push(int num) { nombres.push(num); } int pop() { int num = nombres.top(); nombres.pop(); return num; } int top() { return nombres.top(); } int calcul(char operateur) { int num1, num2; nu...
ALGO
0.999451
4.35318
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-01-11T10:25: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": "66d8ab066e39...
e7e87509-2155-4b2d-9036-fc4ed5a610e6
Gongsta/competitive-programming
codeforces/972div2/A.cpp
#include <stdio.h> #include <string.h> #include <algorithm> #include <bitset> #include <cmath> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <map> #include <memory> #include <mutex> #include <new> #include <numeric> #include <ostream> #include <queue> #include <set> #include <st...
ALGO
0.999821
4.128058
{ "github_metadata": { "branch": "main", "commit_count": 116, "repo_created_at": "2021-03-06T16:56: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": "cfe88ef1b5...
5243e5b7-903d-43b5-99a6-417a53a23400
ilboglions/AlgoLab-2023
Week3/AntChallenge/src/main.cpp
#include <iostream> #include <vector> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/dijkstra_shortest_paths.hpp> #include <boost/graph/kruskal_min_spanning_tree.hpp> using std::vector; typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, ...
ALGO
0.999657
3.782124
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2023-10-14T17:23: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": "bc668dcb487...
fdb1f58b-ee63-473a-9c49-1b09f912a555
koyoluk/stack_Implimentations
hash_tables/LinearProbing.cpp
#include "LinearProbing.h" using namespace std; int LinearProbing::binarySearch(vector<int> &sortedArray, int target) { int right = sortedArray.size() - 1; int mid=0; int left = 0; while (left <= right) { mid = left + (right - left) / 2; if (sortedArray[mid] == target) { re...
ALGO
0.948113
4.063826
{ "github_metadata": { "branch": "codespace-urban-space-garbanzo-x5wx7j5rpqjghprqg", "commit_count": 2, "repo_created_at": "2023-12-24T04:57:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "f...
125f1e10-e896-49ac-866a-93283b927677
DeKasperRuys/MedicalTracker-Copy
src/Communication/byteS_receiver_v4.4/byteS_receiver_v4.4.ino
/* pins: D4 - D7 && A0 - A3 D8 receives interrupt */ // could disable all other interrupts with PCMSK0 after data was sent // (to disable LoRa) and only enable after data was received const byte bytes = 4; // aantal bytes per number const byte numbersToReceive = 5; volatile byte res[bytes]; ...
TOOL
0.93114
4.37322
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-04-07T16:19:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "df94e82999a4...
a64529f8-366f-4dca-9094-e6cd3ad1f224
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/04/0426/personal_submission/cf1525e_lu1no.cpp
int n, m; // 离点i距离为j的个数 int cnt[N][30]; void solve() { cin >> n >> m; for (int k = 1; k <= n; k ++) { for (int i = 1; i <= m; i ++) { int d; cin >> d; cnt[i][d] ++; } } LL all = 1; for (LL i = 1; i <= n; i ++) all = all * i % mod; LL ans = 0; for (int ...
ALGO
0.999985
4.102352
{ "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": "8803...
607c5a15-0852-4c9e-996b-f7271dd0f62d
Chen-Carl/QM-Quine-McCluskey-algorithm
src/logicalExpr.cpp
#include <algorithm> #include "logicalExpr.h" #include "util.h" using namespace std; /* 首先按照二进制码中1的个数分类,每一类是一个vector 每一类中有很多项,组成一个set(丢弃重复项) 一些项是进行合并的,合并成一个set(有序排列) 表格形式为vector<set<set<int>>> */ LogicalExpr::Karnaugh LogicalExpr::create_table(const string &str) { // 单个项单独成为一个set int bit = lo...
ALGO
0.999449
4.145504
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-04-12T15:33: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": "243d1859f08b...
e64c038d-02a2-41e8-82b8-7ebda3afbf23
seventeenw17/Algorithm-board
第1章——基础算法/7.高精度除法.cpp
#include <bits/stdc++.h> using namespace std; vector<int> div(vector<int> &a, int b, int &r) { vector<int> ans; r = 0; for (int i = a.size() - 1; i>=0; i--) { r = r * 10 + a[i]; ans.push_back(r / b); r %= b; } reverse(ans.begin(), ans.end()); while (ans.size() > 1 && ans.back() == 0) { ...
ALGO
0.999717
3.751649
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-06-24T07:13:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4736577ef8...
b0cdc1e0-c70b-4dee-b469-9081478d90f2
VietHoang1512/CP_3idiots
applied_algorithm/6/BIPARTIE GRAPH.cpp
#include <bits/stdc++.h> using namespace std; const int mx = 2e5; int N, M; int u, v; vector<int> adj[mx]; int side[mx]; // int visited[mx]; // int id, order[mx]; // void dfs(int u) // { // id++; // order[u] = id; // visited[u] = 1; // // cout << " -> " << u << " (" << id << ") "; // for (int v :...
ALGO
0.9997
3.800546
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2020-08-29T03:41:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dcccfbac5...
284af565-44c6-4862-8304-8798fe67a910
k0michi/atcoder
abc144/abc144_b.cc
#include <algorithm> #include <cstdint> #include <iostream> #include <limits> #include <string> #include <string_view> #include <type_traits> #include <unordered_set> #include <vector> using i8 = int8_t; using i16 = int16_t; using i32 = int32_t; using i64 = int64_t; using isize = std::make_signed<size_t>::type; using ...
ALGO
0.999673
5.30793
{ "github_metadata": { "branch": "main", "commit_count": 104, "repo_created_at": "2024-11-19T14:27: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": "ec2f504819...
a62e1976-5d4a-46da-96a8-ec6f0b9c711c
ExCaVI-Ulm/3D-XGuide
src/algorithms/filters/SimpleBiplaneFilter.cxx
#include "SimpleBiplaneFilter.h" #include "CrosscorrelationFilterWidget.h" #include "OverlayScene.h" #include "highgui.h" #include <opencv2/imgproc.hpp> using namespace std; SimpleBiplaneFilter::SimpleBiplaneFilter() :CrosscorrelationFilter(2), PointListBasedFilter(2) { motionPositionSetManually = false; pointUsed...
ALGO
0.926365
5.179749
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2020-04-08T09:14:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3868385eb...
b7df292b-4295-4438-ab71-1f781f7ee358
MohitJain617/CPFolder
Basics/gcd.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <set> #include <utility> #include <climits> using namespace std; typedef long long ll; #define F first #define S second #define PB push_back #define MP make_pair #define REP(i,a,b) for(int i = a; i < b; i++) class Triplet{ public: ...
ALGO
0.999949
3.354581
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2021-11-07T01:52:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6b1e3ec865d...
2ac41492-1315-43a2-a196-be16fa97f418
RamazanFIT/algorithms
someTO/t3.cpp
/* Bismillah لا إله إلا الله محمد رسول الله Al'-Phatixa بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ ٱلْحَمْدُ لِلَّهِ رَبِّ ٱلْعَٰلَمِينَ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ مَٰلِكِ يَوْمِ ٱلدِّينِ إِيَّاكَ نَعْبُدُ وَإِيَّاكَ نَسْتَعِينُ ٱهْدِنَا ٱلصِّرَٰطَ ٱلْمُسْتَقِيمَ صِرَٰطَ ٱلَّذِينَ أَنْعَمْتَ عَلَيْهِمْ غَيْرِ ٱ...
ALGO
0.999796
4.309991
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-12-29T18:05:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a245d9a1bb...
d82b9300-9bc0-4104-bea6-82e12b030a66
ipc2023-classical/planner17
planners/symk/src/search/landmarks/util.cc
#include "util.h" #include "landmark.h" #include "landmark_graph.h" #include "../task_proxy.h" #include "../utils/logging.h" #include <limits> using namespace std; namespace landmarks { bool _possibly_fires(const EffectConditionsProxy &conditions, const vector<vector<bool>> &reached) { for (FactProxy cond : co...
ALGO
0.982603
4.886094
{ "github_metadata": { "branch": "latest", "commit_count": 149, "repo_created_at": "2023-02-07T11:08:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4b3dbfbc...
215e5554-e924-4bfe-baba-841d202c34bd
AndreiCostinescu/AndreiUtils
include/AndreiUtils/classes/PriorityQueue.hpp
// // Created by <NAME> (<EMAIL>) on 18.03.2021. // #ifndef ANDREIUTILS_CLASSES_PRIORITYQUEUE_HPP #define ANDREIUTILS_CLASSES_PRIORITYQUEUE_HPP #include <AndreiUtils/classes/CircularArray.hpp> #include <AndreiUtils/utils.hpp> #include <iostream> #include <map> #include <stdexcept> #include <vector> namespace AndreiU...
ALGO
0.996036
6.932884
{ "github_metadata": { "branch": "main", "commit_count": 326, "repo_created_at": "2021-08-27T15:16: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": "46c64b2232...
33cf4925-d06d-4439-b3c7-52436ba99d68
Satyam3002/placementprep
3july/LLRandomNode.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { ListNode* head; public: S...
ALGO
0.999876
5.547535
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2025-06-17T05:47:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86b4b7d8934...