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
403286ef-353f-4f35-8d7e-9d50fa7d6eab
UPenn-RoboCup/UPennDev2
Modules/ImageProcRobocup/lua_field_goals2.cpp
#ifdef __cplusplus extern "C" { #endif #include "lua.h" #include "lualib.h" #include "lauxlib.h" #ifdef __cplusplus } #endif #include <stdint.h> #include <math.h> #include <vector> static uint8_t colorLine = 0x10; static uint8_t colorField = 0x08; static int widthMin = 1; static int widthMax = 10; /* Simple stat...
ALGO
0.990777
4.560967
{ "github_metadata": { "branch": "master", "commit_count": 14909, "repo_created_at": "2015-01-13T21:23:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2342168...
18266a1d-e75d-4f8e-b9ac-fa3c8440e6ec
alifakahr186/Data-Structures-and-Algorithms
Stack/Expressions/ConstructExpressionTree/ConstructTreeFrompostfix.cpp
#include <iostream> #include <stack> #include <memory> #include <string> #include <limits> using namespace std; class Node { public: char data; unique_ptr<Node> left, right; Node(char value) : data(value), left(nullptr), right(nullptr) {} }; class BinaryTree { public: bool isOperator(char c) { ...
ALGO
0.999979
6.517067
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2025-02-05T13:17: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": "f4cc7b44c4e...
5c1fa15b-7c52-4a7a-a2a7-c56084e1b549
uddhav542/DAA_Programs
Extra/Naive_String_Matching.cpp
// C++ program for Naive Pattern // Searching algorithm #include <bits/stdc++.h> using namespace std; void search(string pat, string txt) { int M = pat.length(); int N = txt.length(); /* A loop to slide pat[] one by one */ for (int i = 0; i <= N - M; i++) { int j; /* For cur...
ALGO
0.999761
5.734158
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-04-27T17:20: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": "a8e296f0b2c0...
1ca20798-4b50-49b0-b33b-7ddd8f1f0eea
morrischen890717/Leetcode
C++/1124.cpp
class Solution { public: int longestWPI(vector<int>& hours) { // using unordered_map and prefix sum // time complexity: O(N), space complexity: O(N) // reference: https://leetcode.com/problems/longest-well-performing-interval/solutions/334565/java-c-python-o-n-solution-life-needs-996-and-669...
ALGO
0.999924
5.714092
{ "github_metadata": { "branch": "master", "commit_count": 1286, "repo_created_at": "2023-03-19T13:24:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "83e941c...
963ad42f-c994-4ffa-a19b-287509e5a314
md-sharif-45/DSA-cpp-
LINKLIST/addTWOnum.c++
#include<iostream> using namespace std; class node { public: int data; node* next; node(int val) { this->data=val; this->next=NULL; } }; void insert(node* &head, int val) { node* n=new node(val); if (head==NULL) { head=n; return; } node* ...
ALGO
0.999883
4.957932
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-01-14T10:32: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": "9a60b30dd191...
061d3e9e-2d3d-426a-9ccd-ff2a6bedde64
peanut-buttermilk/fun-run
Facebook/3Sum.cc
/** 15. 3Sum My Submissions QuestionEditorial Solution Total Accepted: 112936 Total Submissions: 603100 Difficulty: Medium Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: Elements in a triplet (a,b,c) mu...
ALGO
0.9996
6.136985
{ "github_metadata": { "branch": "master", "commit_count": 166, "repo_created_at": "2016-03-03T19:10: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": "c4faf1fb...
0e98d270-b6d5-441b-8867-4b46a19d0bf8
pawarrahul1002/cppSTL
Queue/CircularQueue.cpp
#include <iostream> using namespace std; class Queue { public: int n; int front; int rear; int *arr; Queue(int n) { // cout << this->n << endl; this->n = n; arr = new int[n]; front = -1; rear = -1; } void Enqueue(int x) { if (front...
ALGO
0.989417
3.72395
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-07-14T18:34:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "319c50f4c750...
50b7b60e-c1e8-4746-a475-9f9ec0ac54ed
GunJu0415/BaekJoon_LGJ
백준/Gold/17396. 백도어/백도어.cc
#include<iostream> #include<vector> #include<algorithm> #include<queue> using namespace std; typedef long long int ll; ll n, m; queue<ll>clip; vector<pair<ll, ll>>v[100004]; ll dist[100004]; ll en[100004]; void dijkstra() { priority_queue<pair<ll, ll>, vector<pair<ll, ll>>, greater<pair<ll, ll>>>pq; pq.push({...
ALGO
0.999936
3.962298
{ "github_metadata": { "branch": "main", "commit_count": 146, "repo_created_at": "2025-04-01T03:10: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": "b7bf3454d4...
a8971ef1-d566-4ab3-b67f-fff1d95c7c1a
deepsea-inria/pasl
tools/pbbs/geometry.hpp
#include <iostream> #include <algorithm> #include <math.h> #include <iomanip> #ifndef _BENCH_GEOM_INCLUDED #define _BENCH_GEOM_INCLUDED namespace pbbs { using namespace std; // ************************************************************* // POINTS AND VECTORS (3d), 2d is below // *****************************...
ALGO
0.941322
5.219575
{ "github_metadata": { "branch": "master", "commit_count": 221, "repo_created_at": "2014-10-07T12:44:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 106, "forks": 19, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "aa29a6...
b491d893-6b98-44c0-8024-5f6985e22045
XlynumTah/PBL2---JobSearch-OOP-
List.h
#include <iostream> #include <assert.h> #pragma once using namespace std; template <class T> struct Node { T data; struct Node<T> *next; }; template <class T> Node<T> *createNode(T x) { Node<T> *t = new Node<T>; t->next = nullptr; t->data = x; return t; } template <class T> class List; template ...
ALGO
0.984723
4.990121
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-10-23T18:04: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": "0000a705a519...
5700d201-dc7a-4089-a270-62f30591edb5
mehranagh20/acm_cheat_sheet
handy-algorithms/mo-algorithms.cpp
// Answers offline range query problems in N * sqrt(N) int BLOCK = sqrt(n); // set in main or somewhere :) struct node { int L, R, i; }; bool cmp(node x, node y) { if(x.L/BLOCK != y.L/BLOCK) return x.L/BLOCK < y.L/BLOCK; return x.R < y.R; } void add(int position) { // implement here } void ...
ALGO
0.99992
4.235641
{ "github_metadata": { "branch": "master", "commit_count": 142, "repo_created_at": "2016-12-28T17:38:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 6, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "89ad73f...
30aab7bc-2f48-4033-9034-5bc3a034d705
introlab/rtabmap
corelib/src/imufilter/MadgwickFilter.cpp
/* * Copyright (C) 2010, CCNY Robotics Lab * <NAME> <<EMAIL>> * * http://robotics.ccny.cuny.edu * * Based on implementation of Madgwick's IMU and AHRS algorithms. * http://www.x-io.co.uk/node/8#open_source_ahrs_and_imu_algorithms * * * This program is free software: you can redistribute it and/or modif...
ALGO
0.936643
6.623521
{ "github_metadata": { "branch": "master", "commit_count": 3531, "repo_created_at": "2014-08-11T18:38:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3232, "forks": 839, "issues": 525, "pull_requests": 7 }, "file_meta": { "content_id": "9...
2fe79d52-81c4-4373-a46d-66f608c73832
hyejooLim/TIL
C++/그래프 탐색/2638번 치즈.cpp
#include <bits/stdc++.h> #define MAX 100 using namespace std; int N, M; int paper[MAX][MAX]; int visited[MAX][MAX]; // 방문 횟수 typedef struct { int x, y; }box; box moveD[4] = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}}; void init_visit() { for(int i=0; i<N; i++) for(int j=0; j<M; j++) visited[i][j] = 0; } int remai...
ALGO
0.999942
3.839181
{ "github_metadata": { "branch": "main", "commit_count": 319, "repo_created_at": "2020-12-27T13:42: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": "dc74e4bb34...
ec8aa914-548a-4d99-bf13-a09750e725bc
sxs-collaboration/spectre
src/Evolution/Systems/Burgers/FiniteDifference/MonotonisedCentral.hpp
// Distributed under the MIT License. // See LICENSE.txt for details. #pragma once #include <array> #include <cstddef> #include <memory> #include <utility> #include "DataStructures/DataBox/Prefixes.hpp" #include "DataStructures/Tensor/TypeAliases.hpp" #include "DataStructures/VariablesTag.hpp" #include "Domain/Struc...
ALGO
0.988991
6.712244
{ "github_metadata": { "branch": "develop", "commit_count": 17103, "repo_created_at": "2017-04-07T17:28:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 168, "forks": 202, "issues": 530, "pull_requests": 57 }, "file_meta": { "content_id": ...
3b993545-cb94-4832-b334-21daa9ccdcb6
Gocoderunav/LeetCode-Questions
678-valid-parenthesis-string/valid-parenthesis-string.cpp
class Solution { public: bool checkValidString(string s) { int n = s.size(); int openCount = 0, asteriskCount = 0; for (int i = 0; i < n; ++i) { if (s[i] == '(' || s[i] == '*') { openCount++; } else if (s[i] == ')') { if (open...
ALGO
0.999337
5.385859
{ "github_metadata": { "branch": "main", "commit_count": 565, "repo_created_at": "2023-06-08T12:10: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": "573f5d00ad...
96d6be47-4df4-441d-be4f-273d9a624d9d
Kartik-Mathur/CPP-MayBatch
L33-DP/3_Knapsack.cpp
#include <iostream> using namespace std; int solve(int *price, int *weight, int capacity, int n) { // base case if (capacity == 0 || n == 0) { return 0; } // recursive case int op1 = INT_MIN, op2 = INT_MIN; if (capacity >= weight[n - 1]) { op1 = price[n - 1] + solve(price, weight, capacity - weight[n - 1], n...
ALGO
0.999988
5.008039
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2024-06-08T09:32: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": "41eccea4227...
ed4f39d1-a1ea-43d5-95bb-bee3639bf445
lukasmoen/MADAEP
madaep/catkin_ws/src/aeplanner/aeplanner/include/aeplanner/agentExplorationMap_list.h
#ifndef AGENT_EXPLORATION_MAP_H #define AGENT_EXPLORATION_MAP_H #include <ros/ros.h> #include <Eigen/Dense> #include <vector> #include <visualization_msgs/MarkerArray.h> #include <aeplanner/Goals.h> namespace aeplanner { /** * @brief Structure representing a 3D Gaussian blob used to model agent exploration areas *...
ALGO
0.937374
7.293379
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-05-26T13:32: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": "956fb9e199da...
2b9dd6ce-c4ee-4d28-a91c-988d4d7e2e89
Bazina/Problem-Solving
Level-D/Sage's Birthday (easy)/main.cpp
#include <iostream> #include <string> #include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mp make_pair #define vi vector<int> #define vll vector<ll> #define vc vector<char> #define pi pair<int,int> #define pll pair<ll,ll> #define vpi vector<pi> #define all(v) ((v...
ALGO
0.999964
3.598679
{ "github_metadata": { "branch": "main", "commit_count": 1082, "repo_created_at": "2021-08-02T21:56:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1c23ab8d0...
ce24f6da-7e5e-48d6-a131-6fc0e168bb67
hazelguo/Computer-Network-Practicum
MachineLearning/k-nearest.cc
#include "StudentInfo.h" #include "BPNeuralNet.h" #include "../Cluster/k_to_schools.h" #include <queue> #include <vector> //#include <unordered_set> #include <set> const int k = 3; const int max_rec = 7; using namespace std; BPNeuralNet BP_neural_net; class StudentSimilarity{ public: double similarity; int stude...
ALGO
0.99637
3.610163
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2016-04-12T13:05:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cbb97413d...
473aa2c0-57c0-4e9e-b8e3-cedac6097ba9
ethz-asl/segmap
segmatch/include/segmatch/local_map.hpp
#ifndef SEGMATCH_LOCAL_MAP_HPP_ #define SEGMATCH_LOCAL_MAP_HPP_ #include <laser_slam/common.hpp> #include <pcl/filters/voxel_grid.h> #include <pcl/io/io.h> #include <pcl/point_cloud.h> #include "segmatch/common.hpp" #include "segmatch/dynamic_voxel_grid.hpp" #include "segmatch/normal_estimators/normal_estimator.hpp" ...
ALGO
0.951603
7.403896
{ "github_metadata": { "branch": "master", "commit_count": 229, "repo_created_at": "2016-09-20T15:42:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1095, "forks": 392, "issues": 63, "pull_requests": 3 }, "file_meta": { "content_id": "cc5...
af3c4562-5b9c-45da-b967-ec27f59dc3d1
camkisailus/fetch_SFM
grasploc_wrapper/src/grasploc2.0/include/grasploc.h
#ifndef INCLUDE_GRASPLOC_H_ #define INCLUDE_GRASPLOC_H_ #include <unsupported/Eigen/MatrixFunctions> #include <stdint.h> #include <math.h> #include <iostream> #include <string> #include <vector> #include <memory> #include <set> #include "pcl/point_types.h" #include "pcl/features/normal_3d.h" #include "pcl/filters/ran...
ALGO
0.949401
6.476781
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2022-06-18T21:18:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "32c2914b8...
ef766b0b-7ce4-4cb3-af9a-d957eaf87e98
ITIS-Kien/Data-structure-and-algorithm-2025
DSAKT012.cpp
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize("Ofast") #define BOOST ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define ll long long #define endl '\n' const int MOD = 1e9 + 7; int n, k, a[35], res = INT_MAX; void BackTrack(int idx = 0, int cnt = 0, int sum = 0){ if(idx == n){ ...
ALGO
0.999954
4.23484
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2025-03-01T00:39:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b66ddd6926e...
b961ddbe-2f98-4e94-992f-a8f5f5e7d0bc
wangshankun/mnn_npu
source/backend/cpu/compute/CommonOptFunction.h
// // CommonOptFunction.h // MNN // // Created by MNN on 2018/07/16. // Copyright © 2018, Alibaba Group Holding Limited // #ifndef CommonOptFunction_h #define CommonOptFunction_h #include <stdint.h> #include <stdio.h> #include <string.h> #include "core/Macro.h" extern "C" { void MNNReluWithSlope(float* dst, co...
TOOL
0.989478
5.634154
{ "github_metadata": { "branch": "master", "commit_count": 975, "repo_created_at": "2021-04-29T11:56: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": "0a99d8f7...
0b34ec58-8241-4e78-be3c-f7fcacf0e6d1
shubham242/LeetCode
N meetings in one room - GFG/n-meetings-in-one-room.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find the maximum number of meetings that can //be performed in a meeting room. int maxMeetings(int start[], int end[], int n) { vector<pair<int, int>> arr; ...
ALGO
0.999958
5.419453
{ "github_metadata": { "branch": "main", "commit_count": 1785, "repo_created_at": "2021-03-20T12:08:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "43fd6a2eb...
110a6661-205f-402f-807a-561ca8629757
ZiDXie/learing
computer science/数据结构/src/linear_list.cpp
#include "linear_list.h" /* 创建一个空的顺序表 */ bool Init(SqList& L) { //分配内存 L.elem = (int*)malloc(MAXSIZE * sizeof(int)); if (!L.elem) { printf("malloc failed"); exit(0); } L.length = 0; L.list_size = MAXSIZE; return true; } /* 插入元素 */ bool Insert(SqList& L,int i,int e) { if (i<1 || i>L.length+1) { return ...
ALGO
0.994232
3.935955
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2024-12-06T09:11: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": "046744cdf...
d2350ed5-4fb3-499a-a0a5-83adf7a93fa6
wwwwodddd/Zukunft
CF/3A.cpp
#include <bits/stdc++.h> using namespace std; char s[3], e[3]; int d[9][9]; int px[9][9]; int py[9][9]; int pd[9][9]; int dx[] = {1, 1, 0, -1, -1, -1, 0, 1}; int dy[] = {0, 1, 1, 1, 0, -1, -1, -1}; string ds[] = {"R", "RU", "U", "LU", "L", "LD", "D", "RD"}; queue<pair<int, int> > q; bool in(int x, int y) { return 0 <=...
ALGO
0.999987
3.367119
{ "github_metadata": { "branch": "master", "commit_count": 206, "repo_created_at": "2018-12-31T17:17:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b158a5b...
647f0703-ba93-46cd-acf4-cf02e39fb8e4
lavieAll/Algorithm-Questions
1-leetcode/0018-4sum/main.cpp
// 0018 四数之和 // Created by liupan on 2021/1/6. // #include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: vector<vector<int>> fourSum(vector<int>& nums, int target) { vector<vector<int>> ret; sort(nums.begin(), nums.end()); int len = nums.si...
ALGO
0.999949
5.514422
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2020-12-20T07:30: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": "042034b79...
a1b34f8b-1eda-4d6d-b6ee-9e1ae115c472
singhnir/C-Plus-Plus-Robert-Lafore
Progs/Exercises/Chap11/Ex11_2.cpp
// ex11_2.cpp // friend square() function for Distance #include <iostream> using namespace std; //////////////////////////////////////////////////////////////// class Distance //English Distance class { private: int feet; float inches; public: Distance() //...
TOOL
0.912243
6.355052
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2020-08-19T17:10:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 11, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "a53c6af...
6f265b5e-a6ae-41e1-977b-edf14a0a85bf
ARM-software/ComputeLibrary
src/core/NEON/kernels/arm_conv/depthwise/kernels/a64_fp16_nhwc_3x3_s2_output2x2_mla_depthfirst/generic_indirect.cpp
/* * Copyright (c) 2021, 2023-2024 Arm Limited. * * SPDX-License-Identifier: MIT * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the...
ALGO
0.949457
5.43027
{ "github_metadata": { "branch": "main", "commit_count": 4770, "repo_created_at": "2017-03-10T14:51:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3008, "forks": 795, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "ff3e5...
f0fc43d1-0325-4fa4-af36-1548a7c8307a
geckods/CodeForces
596/b.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define MAXN 100001 // stores smallest prime factor for every number ll spf[MAXN]; // Calculating SPF (Smallest Prime Factor) for every // number till MAXN. // Time Complexity : O(nloglogn) void sieve() { spf[1] = 1; for (ll i=...
ALGO
0.999948
4.271179
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-03-24T04:23: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": "62c76182fd...
c784d32a-11c7-44de-a4be-0e25ed445441
tmyksj/atcoder
SOMPO HD プログラミングコンテスト2021(AtCoder Beginner Contest 192)/E - Train/main.cpp
#include <iostream> #include <queue> #include <tuple> #include <vector> using namespace std; int main() { int n, m, x, y; cin >> n >> m >> x >> y; vector<int> a(m), b(m), t(m), k(m); for (int i = 0; i < m; i++) { cin >> a[i] >> b[i] >> t[i] >> k[i]; } long long inf = 1LL << 61; ...
ALGO
0.999963
4.221299
{ "github_metadata": { "branch": "master", "commit_count": 1304, "repo_created_at": "2019-07-03T10:43: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": "e434d3d...
4bc65687-eef0-4857-9bc0-3b366ed22cbb
alexandraback/datacollection
solutions_2751486_1/C++/SebP/A.cpp
///<NAME>. #include <iostream> #include<vector> #include<string> #include<algorithm> #include<cmath> #include<set> #include<list> #include<cstdlib> #include<cstdio> #include<iomanip> #include<stack> #include<queue> #include<stdio.h> #include<string.h> #include<map> #include<sstream> using namespace std; #define all(c...
ALGO
0.99859
3.598605
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c9cdef0d...
85c1d107-9d9c-4d23-9567-fffef072cdb7
anuragakella/OSLab
mid1jan3/paging_algorithms/optimal.cpp
#include<iostream> using namespace std; int replaceNext(int stack[], int slen, int refs[], int curpos, int rlen){ int recent = -1, max = -1; int st2[10]; for(int i = 0; i < slen; i++){ for(int j = curpos; j<= rlen; j++){ if(stack[i] == refs[j]){ st2[i] = j; ...
ALGO
0.99958
4.039811
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2019-12-14T04:45: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": "846e56197...
0d5015e3-d4c1-46f4-8635-b5918c8dd3f9
SharafatKarim/pstu-cse-academic
semester 3/cit (dsa)/chapter 6/codes/postfix.cpp
#include<iostream> #include <stack> #include <queue> #include <math.h> using namespace std; string solvePostfix(queue<string> input_list) { stack<string> st; while (!input_list.empty()) { string token = input_list.front(); input_list.pop(); if (token == "+" || token == "-" || token == ...
ALGO
0.999964
4.841946
{ "github_metadata": { "branch": "main", "commit_count": 475, "repo_created_at": "2024-01-01T15:44:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "c607ed36da...
8f171a35-5b91-4624-8d79-30ba115cf4be
joshuamitchell192/N-Queens
C/simulatedannealing.cpp
#include <iostream> #include <array> //#include <dynarray> #include <ctime> #include <cstdlib> #include <math.h> #include <thread> using namespace std; // TOOD - Use array<> instead of builtin array // TODO - Fix print statements class SimulatedAnnealing { std::array<int, 50> queens; int n; public: ...
ALGO
0.99981
3.158266
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2018-03-13T02:43:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "1499cb2e3...
23d740a8-4de8-4afa-9434-a7c8a27ce62f
FelixHartmann/vlab_models
Fig3-CP_4L_nosink/solvergraph_drawer.h
#ifndef SOLVERGRAPH_DRAWER_H #define SOLVERGRAPH_DRAWER_H #include <drawing/drawable.h> #include <util/palette.h> #include <util/assert.h> #include <QMutex> #include <QMutexLocker> #include <limits> #include "structure.h" using cellflips::out; using util::Palette; typedef util::Palette::Color Colorf; namespace st...
TOOL
0.918713
5.310306
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-01-04T13:13: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": "daf55ceb37...
84fe9059-7527-45ba-9fbf-ea27757ae8a3
tiankonguse/leetcode-solutions
problemset-new/001/00153-find-minimum-in-rotated-sorted-array/find-minimum-in-rotated-sorted-array-smp.cpp
/************************************************************************* > File Name: find-minimum-in-rotated-sorted-array-smp.cpp > Author: tiankonguse > Mail: <EMAIL> > Created Time: Sat Apr 27 11:56:31 2019 > link: https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/ > No: 15...
ALGO
0.999984
6.087685
{ "github_metadata": { "branch": "master", "commit_count": 1037, "repo_created_at": "2015-04-11T09:31:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 81, "forks": 26, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "9299a...
bd3427b5-b4e0-4c5e-ad6d-26d4957a220f
ishandutta2007/codeforces-k
kostroma/normal/756/B.cpp
#pragma comment(linker, "/STACK:512000000") #define _CRT_SECURE_NO_WARNINGS //#include "testlib.h" #include <bits/stdc++.h> using namespace std; #define all(a) a.begin(), a.end() typedef long long li; typedef long double ld; void solve(bool); void precalc(); clock_t start; //int timer = 1; int testNumber = 1; bool t...
ALGO
0.999869
3.829572
{ "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": "8cf5ea2f3327...
6ede51ec-2d49-47cf-a3f1-ddb880043ece
ChromiumWebApps/chromium
chrome/browser/thumbnails/content_analysis.cc
// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/thumbnails/content_analysis.h" #include <algorithm> #include <cmath> #include <deque> #include <functional> #include <limits...
ALGO
0.99868
4.145849
{ "github_metadata": { "branch": "master", "commit_count": 260366, "repo_created_at": "2014-02-21T14:19:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 231, "forks": 307, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "bd...
cdcb0405-c495-494d-9441-e3f05bcd92ff
SegoleneLazarus/algoprog2
imac_algoprog_2-master/TP5/exo1.cpp
#include <iostream> #include <time.h> #include <vector> #include <string> std::vector<std::string> names( { "Yolo", "Anastasiya", "Clement", "Sirine", "Julien", "Sacha", "Leo", "Margot", "JoLeClodo", "Anais", "Jolan", "Marie", "Cindy", "Flavien", "Tanguy", "Audrey", "Mr.PeanutButter", "Bojack", "Mugiwara",...
ALGO
0.955354
4.180165
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-02-10T10:30: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": "e648078d71f...
94fff7f4-5b73-43ee-97ae-9cdabb129274
Fariba-Diya-Ahmed/Solved-problems
Two frogs game.cpp
/* There are n lilypads arranged in a row, numbered from 1 to n from left to right. Alice and Bob are frogs initially positioned on distinct lilypads, a and b, respectively. They take turns jumping, starting with Alice. During a frog's turn, it can jump either one space to the left or one space to the right, as long a...
ALGO
0.999964
4.753299
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-01-10T17:36: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": "4562aa908a33...
e85c603a-5717-48e4-bb98-dca5d62d5fb2
RobotLocomotion/drake
examples/simple_mixed_continuous_and_discrete_time_system.cc
// Simple Mixed Continuous-Time/Discrete-Time System Example // // This is meant to be a sort of "hello world" example for the // drake::system classes. It defines a very simple system with both continuous // and discrete time dynamics, simulates it from a given initial condition, and // checks the result. #include "...
ALGO
0.998915
6.842618
{ "github_metadata": { "branch": "master", "commit_count": 33726, "repo_created_at": "2014-01-26T16:11:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3630, "forks": 1305, "issues": 690, "pull_requests": 46 }, "file_meta": { "content_id":...
cab717b0-bd20-4f41-9be5-7e44ee0cf589
orb1t-ua/parallel
prog1/pi4.cpp
#include <pthread.h> #include "stdlib.h" #include "stdio.h" #include <chrono> #include <iostream> #include <iomanip> long num_threads; long iterations; long flag; double sum; void* pi(void* rank); using namespace std; int main(int argc, char* argv[]){ if(argc != 3){ cout << "Usage: ./progname <threads> <iterat...
ALGO
0.999405
5.253198
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2021-06-24T16:16: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": "743688e8b...
9b24af30-7e0a-4686-8375-1a7106f31d8b
Leaves333/cs491-cap
rabin_karp/a.cpp
#pragma optimize("O3") #include <bits/stdc++.h> using namespace std; #define all(x) begin(x), end(x) typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vll; typedef vector<vll> vvll; // constants for hashing const int MOD = 1...
ALGO
0.999957
4.562779
{ "github_metadata": { "branch": "master", "commit_count": 130, "repo_created_at": "2025-02-20T15:14: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": "ff7b363e...
8f7c0174-8c89-4e16-808b-cf5136efc522
nKadykov/leetcode
846.cpp
#include <iostream> #include <vector> #include <algorithm> class Solution { public: bool isNStraightHand(std::vector<int>& hand, int group_size) { int n = hand.size(); if(n % group_size) { return false; } std::sort(hand.begin(), hand.end()); std::vector<int> inde...
ALGO
0.99998
6.161425
{ "github_metadata": { "branch": "main", "commit_count": 399, "repo_created_at": "2023-11-10T15:04: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": "ba7e1ebc92...
f4c692f4-ce39-4080-af43-153c67bbc984
Andrew-Velox/DSA
Linked List/Doubly Linked LIst/delete_oparation.cpp
#include <bits/stdc++.h> using namespace std; class Node{ public: int val; Node *next; Node *prev; Node(int val){ this->val=val; this->next=NULL; this->prev=NULL; } }; // void in_at_head(Node *&head,Node *&tail,int val){ // Node *newNode = new Node(val...
ALGO
0.999808
3.884007
{ "github_metadata": { "branch": "main", "commit_count": 94, "repo_created_at": "2023-08-22T12:50:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7642463c8d0...
6bef0221-25bd-45d3-b6d6-73e994bcf3d9
kengonakajima/snippets
cpp/clx/sha1.h
/* ------------------------------------------------------------------------- */ /* * sha1.h * * Copyright (c) 2004 - 2008, clown. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * ...
ALGO
0.911003
6.770267
{ "github_metadata": { "branch": "master", "commit_count": 1310, "repo_created_at": "2012-01-20T05:13:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 1, "issues": 0, "pull_requests": 8 }, "file_meta": { "content_id": "d906c3...
eb77a5e2-f53b-4f10-985a-dc50ab7501f6
AryaGupta01/DSA-Solution
Difficulty: Medium/Maximum Product Subarray/maximum-product-subarray.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: // Function to find maximum product subarray int maxProduct(vector<int> &arr) { // Your Code Here int n=arr.size(); int maxProd=INT_MIN; int ...
ALGO
0.998017
6.069477
{ "github_metadata": { "branch": "main", "commit_count": 852, "repo_created_at": "2024-07-18T16:56: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": "31e6acf6b0...
dc36c3f2-4671-4a40-81cc-a79a697273f7
naman-ked/codeit
potd/2023-06-22_Lemonade_Change.cpp
/* You are an owner of lemonade island, each lemonade costs $5. Customers are standing in a queue to buy from you and order one at a time (in the order specified by given array bills[]). Each customer will only buy one lemonade and pay with either a $5, $10, or $20 bill. You must provide the correct change to each c...
ALGO
0.99972
5.735369
{ "github_metadata": { "branch": "master", "commit_count": 524, "repo_created_at": "2020-09-25T16:30:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9187fc9d...
95626815-ed49-4afa-b1d4-5490c5260fd7
dip122/Data-structures-and-algorithms
performance comparison of MST algorithms/main.cpp
#include <bits/stdc++.h> #include "kruskal.h" #include "prime.h" using namespace std; using namespace std::chrono; int main() { int n; cin >> n; vector<vector<int>> edges; int E; cin >> E; for (int i = 0; i < E; i++) { int x, y, z; cin >> x >> y >> z; edges.push_back({x...
ALGO
0.999221
4.786458
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-20T15:23: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": "ef29c69393f9...
4d21cb3b-1abe-4a7b-b5fc-066ee0308c2c
gcielniak/OpenCL-Tutorials
Tutorial 4/Tutorial 4.cpp
#include "Utils.h" #include <iostream> #include <vector> #include <algorithm> #include <boost/compute.hpp> namespace compute = boost::compute; using namespace std; int main() { typedef int mytype; // create vectors on the host vector<mytype> A = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; vector<mytype> B = { 0, 1, 2, 0, ...
ALGO
0.99918
5.816952
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2015-05-31T19:37:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 53, "forks": 35, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "7808231...
5fd556eb-f77f-4a81-aa44-60c3d64b4fe3
peter4549/problems
Baekjoon Online Judge/2589.cpp
#include <cstdio> #include <queue> #include <cstring> #define MAX(a, b) (a > b ? a : b) using namespace std; const int dy[4] = { -1, 0, 1, 0 }; const int dx[4] = { 0, -1, 0, 1 }; int N, M; char map[50][51]; int visited[50][51] = { 0, }; int bfs(int y, int x) { queue<pair<int, int>> q; q.push(make_pair(y, x)); v...
ALGO
0.999623
3.602039
{ "github_metadata": { "branch": "master", "commit_count": 242, "repo_created_at": "2020-09-29T14:42: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": "88315caf...
862ffbd2-c1f8-441d-bb18-dafbf8666876
heyuhhh/ACM
oj/codeforces/contests/1304/F1.cpp
/* * Author: heyuhhh * Created Time: 2020/2/15 22:47:35 */ #include <iostream> #include <algorithm> #include <cstring> #include <vector> #include <cmath> #include <set> #include <map> #include <queue> #include <iomanip> #define MP make_pair #define fi first #define se second #define sz(x) (int)(x).size() #define a...
ALGO
0.999917
3.353157
{ "github_metadata": { "branch": "master", "commit_count": 693, "repo_created_at": "2019-11-25T06:31:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "32c0f492...
9849cbc1-500d-4640-824b-39650a9f849d
sunbanett40/Cpp_Programming
P2_Adders_&_subtractors/3.2_8-bit/8-bit.cpp
/* Project: Adders and Subtractors Author: <NAME> License: This work is licensed under the Creative Commons Attribution-ShareAlike License. View this license at https://creativecommons.org/licenses/ */ #include <iostream> #include <math.h> #include "8-bit.h" using namespace std; bool bin[REG_SIZ...
ALGO
0.999367
4.853479
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-04-06T14:32: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": "0a23c8004a...
58317b8d-2baf-4761-a04f-5d9a58dd28c5
jufusong/BoringLife
2017-10/2017-10-12 - Educational Codeforces Round 30/E-Awards For Contestants.cc
#include <bits/stdc++.h> using namespace std; int main(int argc, char *argv[]) { int n; cin >> n; vector<pair<int, int>> a(n + 1); for (int i = 0, t; i < n; i++) { cin >> t; a[i] = {t, i}; } sort(a.begin(), a.end(), greater<pair<int, int>>()); vector<int> b(n); for (int i = 1; i < n; i++) { ...
ALGO
0.999992
3.465977
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2017-09-05T14:53: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": "51b94bb12...
16b37fc4-8787-4c69-ae38-7a2c294726eb
Mugdha-Hazra/180-Questions-Striver-SDE-sheet-in-CPP
Lemonade Change - GFG/lemonade-change.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: bool lemonadeChange(int n, vector<int> &bills) { // code here int five=0,ten=0; for(int i=0;i<n;i++){ if(bills[i]==20){ if(ten && five){ ...
ALGO
0.998829
5.500169
{ "github_metadata": { "branch": "main", "commit_count": 1760, "repo_created_at": "2020-11-19T06:26:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 243, "forks": 77, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ffa764...
c1d3268d-122a-4b34-b5fb-f21f06c9bd99
inhoekim/algorithm
baekjoon/greedy/2457.cpp
#include <iostream> #include <vector> #include <algorithm> #include <utility> #define MONTH first #define DAY second using namespace std; int ret; class flower { public: pair<int, int> start, end; flower(pair<int, int> start, pair<int, int> end) { this->start = start; this->end = end; } flower() { start = ...
ALGO
0.999944
4.019659
{ "github_metadata": { "branch": "main", "commit_count": 252, "repo_created_at": "2021-09-16T02:15:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "52ee6229f4...
d8d7d951-8f5b-43ed-8215-0af615ec0a6f
shj0306/Baekjoon_Algo
Mario_floyd/1613.cpp
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define fast_io ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) using namespace std; using pii = pair<int,int>; using ll = long long; int N, K, S, u, v, dist[401][401]; int main() { fast_io; cin >> N >> K; for (int i = 1; i <= K; i++) { ...
ALGO
0.999919
4.344655
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2022-03-22T05:12: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": "79392b92b...
7d79bc2c-0406-4c9f-8c52-5feeaf2a0e15
shariarhossain17/Algorithm
LCS_Algorithm/exam/exam2.cpp
#include <iostream> #include <vector> using namespace std; const int MOD = 1e9 + 7; long long int maxWays(vector<int> &A, int N, int M) { vector<int> dp(M + 1, 0); dp[0] = 1; for (int i = 0; i < N; ++i) { for (int j = A[i]; j <= M; ++j) { dp[j] = (dp[j] + dp[j - A[i]]) % ...
ALGO
0.999935
4.658165
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-08-05T14:18: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": "6fb17d8398d...
9ba95b13-a046-4a01-ad57-f09706e0a804
adprocas/cpp-HackerRankSolutions
CrackTheCodingInterview/Stacks Balanced Brackets/source.cpp
#include <map> #include <set> #include <list> #include <cmath> #include <ctime> #include <deque> #include <queue> #include <stack> #include <string> #include <bitset> #include <cstdio> #include <limits> #include <vector> #include <climits> #include <cstring> #include <cstdlib> #include <fstream> #include <numeric> #inc...
ALGO
0.999747
4.689645
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2017-07-26T16:57: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": "cedc0db5b...
417c14b9-3901-45e1-baa9-cc41817f4028
yujqiao/acm-code
CodeArchieve/Contest/mcode/pri/c.cpp
#include <cstdio> #include <algorithm> #include <vector> const int N = 2e5 + 10; typedef long long ll; int n, p, val; bool vis[N]; std::vector<int> to[N]; struct Edge{int u, v, a, b, c;}st[N]; struct Exp{int k, c;}ans[N]; int qpow(int x, int r) { x%=p; if (!x) return 0; int y = 1; for (; r; r>>=1, x = (ll)x*x%p) i...
ALGO
0.999835
3.896224
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2019-08-24T02:53:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ee8f80ca...
1f587da5-bb4d-4ce6-8986-5e8926f145c5
Pksinha12/DSA-Code
0542-01-matrix/0542-01-matrix.cpp
class Solution { public: vector<vector<int>> updateMatrix(vector<vector<int>>& mat) { int n = mat.size(); int m = mat[0].size(); queue<pair<pair<int, int>, int>> q; vector<vector<int>> vis(n, vector<int>(m, 0)); for (int i = 0; i < n; i++) { for (int j = 0...
ALGO
0.999935
6.19418
{ "github_metadata": { "branch": "main", "commit_count": 686, "repo_created_at": "2022-12-14T10:03: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": "87b2008348...
f1172e48-3558-464f-abbe-916f7b95df68
whitearmorq/test
semaphore3.cpp
#include <pthread.h> #include <iostream> #include <iomanip> #include <stdlib.h> #include <signal.h> int FLAG = 0; int iter = 10000; int c_thr; double pi = 0.0; pthread_mutex_t pi_lock = PTHREAD_MUTEX_INITIALIZER; typedef struct Parts {         double n1;         double n2;         int step;         double partial_su...
ALGO
0.999934
5.159897
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2022-06-14T18:21: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": "62a131f5b6b...
4dac317d-6c21-4c96-8409-1017863da510
GoGradually/PS-Saved-Repository
Edu #102/1473D.cpp
#include <bits/stdc++.h> #define ll long long #define INF (int)1e9 + 10 #define lINF (ll)1e18 + 10LL const ll MOD = 1000000007LL; // #include <atcoder/modint.hpp> // using mint = atcoder::modint998244353; using namespace std; void Solve() { int n, q; cin >> n >> q; string str; cin >> str; int now ...
ALGO
0.999993
4.320423
{ "github_metadata": { "branch": "main", "commit_count": 457, "repo_created_at": "2023-08-11T17:26: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": "1c1d2ada20...
d313f53d-e474-483d-a4b3-6f85f9ef8b65
cescgina/AdventOfCode
2018/day16/pr2/pr2.cpp
#include <map> #include <vector> #include <string> #include <fstream> #include <iostream> #include <algorithm> #include <unordered_set> #include <unistd.h> #include <boost/algorithm/string/split.hpp> #include <boost/algorithm/string/classification.hpp> typedef std::vector<int> registers; typedef std::vector<std::strin...
ALGO
0.975055
4.328619
{ "github_metadata": { "branch": "master", "commit_count": 166, "repo_created_at": "2019-11-30T15:52: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": "cfc5c5a8...
19ec61a4-463f-41f1-acfd-400b7e1f3b31
DorotaNowicka/CPP
Metody_numeryczne/17_szablon.cpp
#include <iostream> #include <fstream> #include <cmath> #include <iomanip> #include <cstdlib> #include <vector> #include <ctime> using namespace std; double pierwbis(double (*func)(double), double x1, double x2, double xacc){ if((*func)(x1)*(*func)(x2)>0){ cout << "przedział nie zapewnia pierwiastka" << endl; ...
ALGO
0.999826
4.589767
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-04-19T12:51: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": "a8e0bbc4e37...
81dafc02-b7a2-4a14-b7ed-ff8bad4e972c
feishuoshuo/STLofZFW
STL/priority_queue.h
#ifndef ZFWSTL_PRIO_QUEUE_H_ #define ZFWSTL_PRIO_QUEUE_H_ /** * 优先级队列(权值高先出) * 属于container adapter */ #include <cstddef> //for size_t, ptrdiff_t #include "vector.h" #include "../src/functional.h" //for less #include "../src/algorithms/heap_algo.h" //for push_heap, pop_heap, sort_heap, make_heap #include "....
ALGO
0.990108
5.544424
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2024-11-24T00:47: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": "19d89972a...
88b88710-2e05-4b45-ac3a-e966897e9dbb
NotMickey/AIProject
src/AILogic/Dynamic/DynamicWander/dynamicWander.cpp
#include "dynamicWander.h" #include "../DynamicFace/dynamicFace.h" #include "../dynamicLYURG/dynamicLYURG.h" #include "../DynamicSeek/dynamicSeek.h" AIProject::DynamicWander::DynamicWander(Boid & i_character, const float & i_wanderOffset, const float & i_wanderRadius, const float & i_wanderRate, const float & i_maxA...
TOOL
0.950929
5.793875
{ "github_metadata": { "branch": "master", "commit_count": 147, "repo_created_at": "2019-01-24T13:21: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": "cd325b60...
addf00f6-d33b-4918-8713-73d35ae1f283
ViniciusHenriqueB/Programacao_Competitiva
CIC10169-Programacao_Competitiva/problemas_extras/04-CF-1703D-Double-Strings.cpp
#include <bits/stdc++.h> using namespace std; #define fast_io ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); #define pb push_back #define ff first #define ss second typedef long long ll; int main() { fast_io int t, n; cin >> t; while(t--) { cin >> n; vector<set<string>> ha...
ALGO
0.999879
3.875779
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2024-11-27T12:38:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "860d5d962...
95287b2a-ad0a-4dd0-aaf1-980963e2d81e
BhaswatiRoy/Datastructures-Algorithms
Algorithms/Dynamic Programming/KnapSack Type/0 1 Knapsack.cpp
#include<bits/stdc++.h> using namespace std; /* 0/1 Knapsack - We have to find maximum profit we can make from given elements if we can pick the element only once */ //starting from n-1 index we reach up to n index int knapsacksolverecursion(int W,vector<int>&wt,vector<int>&val, int n) { //starting from last in...
ALGO
1
5.386625
{ "github_metadata": { "branch": "main", "commit_count": 420, "repo_created_at": "2021-10-24T14:44:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f04c00508a...
8ac01066-076c-4ff8-93c2-7a1e018ef3af
sunjw/some-learning
SomePractice/reverse-linked-list-ii/reverse-linked-list-ii/reverse-linked-list-ii.cpp
// reverse-linked-list-ii.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include "pch.h" #include <iostream> class ListNode { public: int val; ListNode *next; ListNode(int val) { this->val = val; this->next = NULL; } }; class ListNodeEx : public ListNode { publi...
ALGO
0.999759
5.784487
{ "github_metadata": { "branch": "master", "commit_count": 1087, "repo_created_at": "2020-01-26T09:00:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "deb2d7a...
9cfa1503-1197-4967-94b9-ccfd58908152
Bicuti05/B-i-t-p-CTDL-DT-c-Hu-
BTVN.cpp
#include <iostream> using namespace std; //Tim so nam co so dan giong nhau void findsamePopulation(int a[], int m) { int dem = 0; int mang[100]; int tanso[100]; mang[0] = a[0]; tanso[0] = 1; for (int i = 1; i < m; i++) { bool found = false; for (int j = 0; j <= dem; j++) { if (a[i] == mang[j]) { tan...
ALGO
0.999588
3.350994
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-10-13T14:58: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": "1b17a12c613b...
2ad6925e-75fa-4e4d-9f53-e683707e7478
psi-cmd/Defense-Design
main.cpp
/* // * 进度: // * 窗口就绪,塔位置就绪,正在进行图片刷新机制。 // * 刷新ok,开始放置 // */ //总启动文件,统筹所有.cpp文件,完成初始化,窗口载入和各类图片载入功能。即游戏底层。 #include <SDL_image.h> #include <SDL.h> #include <string> #include "main.h" #include "enemy.cpp" #include "tower.cpp" #include "game_logic.cpp" #include "Game.cpp" #include "bullet.cpp" #include "shell.cpp" //#inc...
TOOL
0.979697
3.656476
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-12-08T09:17: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": "e3f5abeb2...
462e38a4-21bd-45cc-ab07-d1817cecb6f5
ibab/lhcb-software
LHCb/Event/TrackEvent/src/Track.cpp
// $: Track.cpp,v 1.39 2007/05/15 06:57:34 wouter Exp $ // Include files #include <functional> #include <string> #include <map> #include <array> #include <algorithm> // from gsl #include "gsl/gsl_cdf.h" // local #include "Event/Track.h" #include "Event/TrackFunctor.h" #include "Event/TrackFitResult.h" #include "Eve...
ALGO
0.963593
6.235056
{ "github_metadata": { "branch": "master", "commit_count": 91578, "repo_created_at": "2015-12-10T14:42:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d53be...
982b2d88-af23-4243-ac98-e1cc26e16a00
OpenSees/OpenSees
SRC/analysis/algorithm/equiSolnAlgo/accelerator/KrylovAccelerator.cpp
/* ****************************************************************** ** ** OpenSees - Open System for Earthquake Engineering Simulation ** ** Pacific Earthquake Engineering Research Center ** ** ** ** ...
ALGO
0.914493
4.577162
{ "github_metadata": { "branch": "master", "commit_count": 8721, "repo_created_at": "2018-09-12T00:49:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 667, "forks": 719, "issues": 42, "pull_requests": 23 }, "file_meta": { "content_id": "0c...
6e7ce479-adb5-47ae-b297-4cb7bd3fd718
AliOsm/CompetitiveProgramming
CodeForces/803A. Maximal Binary Matrix.cpp
#include <stdio.h> using namespace std; int const N = 101; bool grid[N][N]; int main() { int n, k; scanf("%d%d", &n, &k); if(n * n < k) { puts("-1"); } else if(n * n == k) { for(int i = 0; i < n; ++i) { for(int j = 0; j < n; ++j) { if(j) putchar(' '); putchar('1'); } ...
ALGO
0.999787
3.677782
{ "github_metadata": { "branch": "master", "commit_count": 595, "repo_created_at": "2016-10-14T11:29:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 138, "forks": 49, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb9a4...
b0a250b3-0130-42ab-bba9-4d7673f7752a
Gracesta/C-Primer-practice
Screen.cc
#include <cstdio> #include <iostream> #include <algorithm> #include <string> #include <vector> #include <numeric> using namespace std; class Screen{ friend class Window_mgr; public: using pos = string::size_type; Screen &move(pos, pos); Screen &set(char); Screen &set(pos, pos, char); Screen() = de...
TOOL
0.925583
3.318368
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-09-05T07:37:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7bce155348...
ee79035c-7a1b-4cde-8422-3cd4dfcb64f3
saurabhh-svg/DSA-Practice
Sorting/InsertionSort.cpp
//insert the element at sorted position //O(1)-O(n^2) -> no. of passes = (n-1) mo.of comparisons=n*(n-1)/2 //Best method is to use with LinkedList because we dont have to shift elements in it just insert #include<iostream> using namespace std; //For Array Increasing order void Isertionsort(int a[],int n){ for (...
ALGO
0.99997
5.393953
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2021-12-10T15:51:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1fc560026f3...
52c07c7a-9294-4975-85ad-a8673643f94a
MuVen/DP
Edit Distance DP - 10.cpp
// function calling.cpp : Defines the entry point for the console application. // #include "stdafx.h" //edit distance, #include <iostream> #include <string> using namespace std; string str1 = "SUNDAYSUNDAYSUNDAYSUNDAYSUNDAYSUNDAYSUNDAYSUNDAYSUNDAY"; string str2 = "SATURDAYSATURDAYSATURDAYSATURDAYSATURDAYSATURDAYSAT...
ALGO
0.99988
4.216897
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2017-12-23T13:19:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa01e29f2...
2be9d76b-4e0a-4bae-86cd-2cfcc18966b6
israkul9/May-2020-LeetCoding-Challenge
Day30.cpp
class Solution { double fun(int x, int y) { double xx = (double)x; double yy = (double)y; double ans = abs((xx-0)*(xx-0) + (yy-0)*(yy-0)); ans = sqrt(ans); return ans; } public: vector<vector<int>> kClosest(vector<vector<int>>& points, int k) { ...
ALGO
1
5.815149
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2020-05-03T09:13:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "680a9fab3...
60b5cd25-98e2-4e12-a557-296f2e6c2036
LokeshBolisetty/DSA
LinkedList/ReverseLLII.cpp
#include<iostream> using namespace std; struct ListNode{ int val; struct ListNode *next; }; class LinkedList{ public: struct ListNode *head; int size; //LinkedList(ListNode* x) : head(x),size(1); //LinkedList():head(NULL),size(0); ListNode* addNode(int value); ListNode* addBegin(in...
ALGO
0.999995
4.557498
{ "github_metadata": { "branch": "main", "commit_count": 82, "repo_created_at": "2021-06-19T05:11: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": "dbed4d097cb...
6afc5a5c-c2e8-40b0-8e84-0ff369910590
atharva1554/Leetcode-question-solution-
Difficulty: Medium/Partition Equal Subset Sum/partition-equal-subset-sum.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { int rec(int i,vector<int> &a,int k,int s,vector<vector<int>> &dp){ if(s==k) return dp[i][s]=1; if(i>=a.size() || s>k) return dp[i][k]=0; if(dp[i][s]!=-1) return dp[i][s]; r...
ALGO
0.981119
5.682782
{ "github_metadata": { "branch": "main", "commit_count": 2929, "repo_created_at": "2024-05-26T16:07:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96c98ffbe...
6f2aa404-f64a-4f5b-b253-75f1b5c14082
ompl/ompl
demos/RigidBodyPlanningWithIK.cpp
/********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2010, Rice University * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions...
ALGO
0.974831
6.826876
{ "github_metadata": { "branch": "main", "commit_count": 4948, "repo_created_at": "2014-05-20T14:22:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1776, "forks": 636, "issues": 80, "pull_requests": 28 }, "file_meta": { "content_id": "977...
6ec07ba8-c73a-49db-b9a8-9fbf4641ddc3
hdu-xsy/Cpp
stand/6.2 有理数类 -- 运算符重载.cpp
#include <iostream> using namespace std; class CYls; //向前声明 CYls operator + (int x, const CYls &rhs); //整数+有理数 ostream & operator << (ostream &os, const CYls &rhs); //有理数输出 class CYls { friend CYls operator + (int x, const CYls &rhs); friend ostream & operator << (ostream &os, const CYls &rhs); private : int m...
ALGO
0.999247
4.113298
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2017-10-23T08:19:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2bdd00453...
080a6b6c-8b50-46c3-ae21-9eb2d347b372
rexa0310/Leet_Ques
513-find-bottom-left-tree-value/513-find-bottom-left-tree-value.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.999995
5.191724
{ "github_metadata": { "branch": "main", "commit_count": 1236, "repo_created_at": "2021-07-04T15:42:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7dd2665b...
2276ada4-c5ea-4f70-a3a4-c642c14c4a8b
AryanGanotra07/AlgorithmsToolBox-Coursera
AlgorithmToolBox/sumFiboLast.cpp
#include <iostream> long long get_fibonacci_sum_last(long long n) { long long remainder = n % 60; long long first = 0; long long second = 1; long long res = remainder; long long int sum = 1; for (int i = 1; i <remainder; i++) { res = (first + second)%10; first = second; ...
ALGO
0.999807
3.502993
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2020-06-16T14:52: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": "34a3fec41...
c2fe184a-d7c0-49f0-ad50-062f557e6a14
littlesam95/AlgorithmPractice
백준/Platinum/6515. Frequent values/Frequent values.cc
#include <iostream> #include <vector> #include <string> #include <cmath> #include <algorithm> #define MAX 200005 #define FASTIO cin.tie(0); cout.tie(0); ios::sync_with_stdio(false); using namespace std; struct QUERY { int Left, Right, Index; }; int N, Q, S, X, Y; int P[MAX]; vector<QUERY> Query; int Value, Left, ...
ALGO
0.999958
4.256963
{ "github_metadata": { "branch": "main", "commit_count": 933, "repo_created_at": "2024-08-28T00:09:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae72e6a656...
6be50226-9a74-4176-a942-e47348af4ef4
spcl/probgraph
src/src/mc.cc
// Copyright (c) 2015, The Regents of the University of California (Regents) // See LICENSE.txt for license details #include <algorithm> #include <cinttypes> #include <iostream> #include <vector> #include <cstdio> #include <cmath> #include "benchmark.h" #include "builder.h" #include "command_line.h" #include "graph.h...
ALGO
0.997682
5.187559
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-08-26T23:09:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ba687ff06747...
fb9d634e-2350-422c-b181-05c68a7eb881
Blackpeace72/ooa-praktikum-2
main.cpp
// // Created by <NAME> on 3.05.2019. // #include <iostream> #include "pqueue.h" #include <ctime> using namespace std; char* randomString(int size){ int i; char* str = (char*) malloc((size+1)*sizeof(char)); for(i = 0 ; i < size ; ++i) { str[i] = (rand() % 26) + 'A'; } str[size] = '\0'; ...
ALGO
0.98237
4.696242
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-05-09T22:01: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": "9b16bd2fd3...
4416806d-776b-471e-8483-d3a7b6e1f419
viaSSH/catkin_ws
src/camera_on/src/camera_on_node.cpp
#define ROS //#define CAMERA_SHOW //#define CAMERA_SHOW_MORE #ifdef ROS #include <ros/ros.h> #include <cv_bridge/cv_bridge.h> #include <sys/wait.h> #include <termio.h> #include <unistd.h> #include "std_msgs/Int16.h" #endif #include <cv.hpp> #include <iostream> #include <stdio.h> #include <fcntl.h> #include <time.h> ...
ALGO
0.985342
4.054156
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2019-06-20T06:47:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b39f4db6d...
b843fe04-7ed1-4c07-b9b2-bfc6abcc2c34
h3xadecima1/ENCE_3210_Ali_G
Lab1/2/sketch_jan10b/sketch_jan10b.ino
// includes the header library that contains the cos() function #include<math.h> //float type array variable to store the results from 0-360 of cos() function float gCosArray[360]; void setup() { //starts the serial protocol Serial.begin(9600); // this loop with increase the value of i from 0 - 360 for (int i ...
ALGO
0.942744
4.002634
{ "github_metadata": { "branch": "main", "commit_count": 71, "repo_created_at": "2025-01-10T17:19: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": "39a1c3fd1d1...
6b5f437c-26ea-4ca0-a0fc-3ac9fe0765be
kothariji/competitive-programming
CSES/Odd Even Sort.cpp
//------ AI Programming --------- // Odd Even Sort Algorithm // Join our underground coding movement @freecodecs (c) June, 2019. #include <iostream> #include <vector> using namespace std; void oddEven(vector<int> &arr, int size) { bool sorted = false; while( ! sorted ) { sorted = true; for(int i = 1; i < size...
ALGO
0.999868
5.594105
{ "github_metadata": { "branch": "master", "commit_count": 1881, "repo_created_at": "2020-08-27T07:08:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 680, "forks": 501, "issues": 2, "pull_requests": 2 }, "file_meta": { "content_id": "488...
44a2d47e-6180-4d7a-8d35-bc7773aa36bb
Darren2340/local_gnuradio
gnuradio/gr-fft/lib/goertzel.cc
/* -*- c++ -*- */ /* * Copyright 2002,2011,2012 Free Software Foundation, Inc. * * This file is part of GNU Radio * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at y...
ALGO
0.997601
5.85554
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-07-14T23:30: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": "ec99eabccb...
294ca1b4-e8ad-4ea4-821b-01c0837b19de
Jiaoyang-Li/CBSH2-RTC
inc/MDD.h
#pragma once #include "SingleAgentSolver.h" class MDDNode { public: MDDNode(int currloc, MDDNode* parent) { location = currloc; if (parent == nullptr) level = 0; else { level = parent->level + 1; parents.push_back(parent); } } int location; int level; int cost=0; // minimum cost of path tra...
ALGO
0.999684
5.063765
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2021-03-15T05:11:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 121, "forks": 50, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "d0b15849...
d730f278-f06c-4dd1-92ae-cac1a067a124
BjChacha/MyLeetCode
LeetCode/StudyPlan/剑指Offer/剑指 Offer 53 - I. 在排序数组中查找数字/Solution1.cpp
// Binary search (left & right) class Solution { private: int biSearchLeft(vector<int>& nums, int target) { int left = 0, right = nums.size() - 1, mid; while (left <= right) { mid = (left + right) >> 1; if (nums[mid] < target) left = mid + 1; else right = mid - 1;...
ALGO
0.999987
6.082096
{ "github_metadata": { "branch": "main", "commit_count": 234, "repo_created_at": "2022-04-04T02:39: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": "ff06eb7f54...
e4059b77-cd39-4dbe-8b31-c93fe886ee62
Chaitanya980/lpv
parallel_quicksort.cpp
#include<iostream> #include<bits/stdc++.h> #include<iomanip> #include<omp.h> using namespace std; void quicksort(int arr[], int st, int end) { if(st < end) { int pivot = arr[end]; int i = st-1; int j = st; for(int var = j; var<end; var++) { if(arr[var] < piv...
ALGO
0.999775
4.815429
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-25T04:20: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": "819c08c6f513...
fe20ac33-4f61-4abb-9a9d-a36e26827b7a
1032234755/zadachi-na-c-
zadachi na c++/11.3.cpp
#include <iostream> #include <random> #include <vector> std::vector<double> generate_random_array(int count, double low, double high) { std::random_device rd; std::mt19937 gen(rd()); std::uniform_real_distribution<> dis(low, high); std::vector<double> array; for (int i = 0; i < count; i++) { ...
TOOL
0.919781
5.296673
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-05-09T19:19: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": "6746705f69...
a04b581e-6cab-4e0a-9f7e-18431062f6f9
OmeletWithoutEgg/CompetitiveProgramming
TIOJ/1085.cpp
#include <bits/stdc++.h> using namespace std; int blocked[52][52][52] = {}; struct pos{ int x, y, z;//previous point pos(int x = 0,int y = 0,int z = 0):x(x),y(y),z(z){}; } prevp[52][52][52]; int x, y, z; int i, j, k; int main(){ cin >> x >> y >> z; for(k = 1;k <= z;k++) for(j = 1;j <= y;j++) ...
ALGO
0.999964
4.043508
{ "github_metadata": { "branch": "master", "commit_count": 262, "repo_created_at": "2020-08-18T02:18:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee778851...
f04b914a-a5de-4c4a-b3b3-1bbc0a56ebbd
zhangxin23/leetcode
linear-list/list/add_two_numbers.cpp
#include "list.h" /** * You are given two linked lists representing two non-negative numbers. * The digits are stored in reverse order and each of their nodes contain a single digit. * Add the two numbers and return it as a linked list. * Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) * Output: 7 -> 0 -> 8 * */ ...
ALGO
0.99986
6.148899
{ "github_metadata": { "branch": "master", "commit_count": 175, "repo_created_at": "2015-07-15T05:41: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": "9a661328...
c6b8329c-7ff1-4841-8fa8-4de3e84b5d00
SooinPark1019/PS
백준/Diamond/33544. 사격/사격.cc
#include <ext/rope> #include <bits/stdc++.h> #define _USE_MATH_DEFINES //#pragma GCC optimize ("O3") //#pragma GCC optimize ("Ofast") //#pragma GCC optimize ("unroll-loops") #define pii pair<int,int> #define pll pair<ll,ll> #define PB push_back #define fi first #define se second #define all(v) (v).begin(), (v).end() #d...
ALGO
0.999922
4.211067
{ "github_metadata": { "branch": "main", "commit_count": 483, "repo_created_at": "2024-09-01T15:38: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": "e0268b9091...