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
1ae4c8aa-4eeb-4129-aa36-b54b0d792054
rikuTanide/atcoder_endeavor
abc080/abc080_d.cpp
#include <bits/stdc++.h> #include <cmath> const double PI = 3.14159265358979323846; using namespace std; typedef long long ll; const double EPS = 1e-9; #define rep(i, n) for (int i = 0; i < (n); ++i) //typedef pair<ll, ll> P; typedef pair<ll, ll> P; const ll INF = 10e17; #define cmin(x, y) x = min(x, y) #define cmax(x...
ALGO
0.999752
3.824114
{ "github_metadata": { "branch": "master", "commit_count": 4423, "repo_created_at": "2020-12-05T04:36: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": "6d8e819...
ca298f21-3d8e-4dc5-aa9d-c0d466e338a6
tarunluthra123/Competitive-Programming
Codechef/2020 Contests/May 2020 Long Challenge/Coronavirus Spread.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define SZ(x) ((int)(x.size())) #define FOI(i, a, n) for( i = int(a); i <= int(n); i++) #define FOD(i, a, n) for( i = int(a); i >= int(n); i--) #define IN(x, y) ((y).find(x) != (y).end()) #define ALL(t) t.begin(),t.end() #define MS...
ALGO
0.99971
3.357166
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2020-10-29T17:27:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "80477b1ac...
7e74afec-900e-420a-a3e5-cc27abe83621
ginobilinie/codeBook
scanArray/subarraysDivByK_tle.cpp
class Solution { public: // int res = 0; int subarraysDivByK(vector<int>& A, int K) { //sort(A.begin(),A.end()); // for (int i=0; i<A.size(); i++) // { // dfs(A,i,A[i],K); // } int res = 0; int currSum = 0; for (int i=0; i<A.size(); i++) ...
ALGO
0.998826
5.636414
{ "github_metadata": { "branch": "master", "commit_count": 686, "repo_created_at": "2016-12-20T04:00:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d7f4a567...
74defdc0-eb54-44e2-a24d-392833989a74
astro2049/LeetCode-2023
71/main.cpp
#include <iostream> #include "deque" using namespace std; int main() { std::cout << "Hello, World!" << std::endl; return 0; } class Solution { public: string simplifyPath(string path) { deque<string> q; for (int i = 0, j = 0; i < path.length() && j < path.length();) { if (path...
ALGO
0.999358
5.389522
{ "github_metadata": { "branch": "main", "commit_count": 307, "repo_created_at": "2023-03-13T04:06: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": "de359873db...
567e2493-b52f-4fdc-b942-ea2f62825133
jimin-0415/beakjoon
C++/프로그래머스/2/1844. 게임 맵 최단거리/게임 맵 최단거리.cpp
#include<vector> #include<queue> using namespace std; int solution(vector<vector<int> > maps) { // 격자 이동 + BFS // queue 를 이용하여 BFS 처리. // dist 배열의 통해서 지나온 거리중 최단거리 갱신. // n m 도닥하면 값 리턴. // 만약 도달 못했다면 -1 int answer = 0; int n = maps.size(); int m = maps[0].size(); vector<ve...
ALGO
0.999975
4.816329
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-03-19T08:33: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": "37c5499eef5...
82f9b962-aa70-437c-85cb-e74c25f62ef4
Commando16/DataStructureInCPP
1_Array/1_2_Array.cpp
#include<iostream> #include<stdio.h> #include<vector> using namespace std; /* Topic - array addressing */ int main(){ int arr[] = {20,30,45,10}; // The name of array gives the base address if the array. // The following line will prove the above statement by printing ...
ALGO
0.931708
3.50906
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2021-04-21T16:16:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51c753452a3...
eb9cc08d-138a-4e97-8385-52f3e2feafdd
kd1995-max/Data-Structure-and-algos
LinkedList/compute.cpp
class Solution { public: struct Node* reverseList(struct Node *head) { // code here // return head of reversed list Node *first, *second, *third; first = NULL; second = third = head; third = head; while(second) { ...
ALGO
0.999998
5.307527
{ "github_metadata": { "branch": "master", "commit_count": 708, "repo_created_at": "2021-07-04T16:50:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96b58056...
d87588d1-1087-4bfd-9eb2-4aad6161cdcd
JorisSAN/TDsEngine
Engine/Doom/CollisionFunctions.h
#pragma once #include "CollisionComponent.h" #include <iostream> namespace Collisions { inline bool IsColliding(CollisionComponent* colisionA, CollisionComponent* colisionB) { //Need to rework everything except aabb aabb if (colisionA->colType ==CollisionType::point || colisionB->colType == CollisionType::point) { ...
ALGO
0.996433
4.287611
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2021-06-30T13:32: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": "4b833de291d...
41302821-edc2-43b3-a326-db473c6e9794
wxnn08/RepLord
uva/524_primeringproblem.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mk make_pair #define fi first #define sec second #define fori(i, a, b) for(int i = int(a); i < int(b); i++) typedef long long ll; const int INF = 0x3f3f3f3f; const double PI = acos(-1.0); vector <int> fazPrimo[20]; vector <int> caminho; int pe...
ALGO
0.999766
3.785539
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2018-03-09T02:21:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60d1cfb36...
65adb496-8a75-47ae-b8d3-36da3a046119
noopur0210/DSA-self-paced-GFG
04.Arrays/MaxAndSecondMax.cpp
//Given an array arr[] of size N of positive integers which may have duplicates. The task is to find the maximum and second maximum from the array, and both of them should be distinct, so If no second max exists, then the second max will be -1. /* Expected Time Complexity: O(N). Expected Auxiliary Space: O(1). ...
ALGO
0.999974
4.637199
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2022-02-20T13:52:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d71a7a39fb5...
4bcfb0d8-f4f9-45c8-bd1a-aeefb485fa73
helloojo/Practice
cpp/5721/5721.cpp
#include <cstdio> #include <cstring> //BOJ #5721 typedef long long ll; typedef unsigned long long ull; int memo[100001][2]; //memo[i][0] -> 이걸 안주웠을때 최대값 = max(memo[i-1][1],memo[i-2][0] int memo2[100001][2]; //memo[i][0] -> 이걸 안주웠을때 최대값 = max(memo[i-1][1],memo[i-2][0] static int max(int a, int b) { return (a > b ? a : ...
ALGO
0.999764
3.240976
{ "github_metadata": { "branch": "master", "commit_count": 428, "repo_created_at": "2018-01-26T07:29:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4669e83e...
b5bd1b7a-04e8-4da1-b426-81ebba63c4b1
D-T-666/AoC-2024
09/09-2-1.cpp
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; if (s.size() % 2 == 1) s += "0"; const int n = s.size() / 2; int len[n], ind[n]; int empty[n], ind_empty[n]; int c = 0; for (int i = 0; i < n; i++) { len[i] = s[i * 2] - '0'; empty[i] = s[i * 2 + 1] - '0...
ALGO
0.999917
4.086524
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-12-09T17:54: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": "c880873a58ee...
7286a4f7-4b0c-4e5c-86c7-fb50a1284cf9
theneuronarc/LeetCodeAlgorithms
src/regular_expression_matching.cpp
/* https://leetcode.com/problems/regular-expression-matching/ Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the preceding element. The matching should cover the entire input string (not partial). The function prototype should be: bo...
ALGO
0.999275
5.27276
{ "github_metadata": { "branch": "master", "commit_count": 153, "repo_created_at": "2015-11-16T09:31: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": "be4be8a7...
ff3471bd-4a46-45f0-aa23-2cb76867fa5a
colmap/glomap
glomap/math/two_view_geometry.cc
#include "glomap/math/two_view_geometry.h" namespace glomap { // Code from PoseLib by <NAME> bool CheckCheirality(const Rigid3d& pose, const Eigen::Vector3d& x1, const Eigen::Vector3d& x2, double min_depth, double max_depth) { // Thi...
ALGO
0.997761
6.470081
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2024-05-29T14:56:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1845, "forks": 136, "issues": 58, "pull_requests": 14 }, "file_meta": { "content_id": "4d939...
9c9a7345-9dfc-4f90-bcd2-231236db4282
tgxworld/CS1020E
lab4/ex3-alice/skeleton/Main.cpp
#include <iostream> #include <stack> #include <queue> #include "Pancake.h" using namespace std; int main() { int N, Q; cin >> N >> Q; stack<Pancake*> pancakeStack; for(int i = 0; i < N; ++i) { Pancake* ptr = new Pancake(); pancakeStack.push(ptr); } for(int i = 0; i < Q; ++i) { string operatio...
ALGO
0.997699
5.190272
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2015-01-15T12:46:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eec25ab42...
d37a1aec-cdbd-4f92-bb99-40c603e655db
madomigo/programacion-competitiva
AceptaElReto/p576.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main () { int t; while (true) { cin >> t; if (t == 0) break; int d, ans = 0; while (true) { cin >> d; if (d == 0) break; ans += t * d; } int h = 0, ...
ALGO
0.994058
3.753197
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-01-13T18:28: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": "e7a1313273b...
97f448be-a7f8-4fb5-b3ef-ea11048057cf
vilve-aman/DataStructuresAndAlgorithms
Backtracking/permutationsOfString(ip-op).cpp
#include "bits/stdc++.h" using namespace std; void solve(vector<char> &input, vector<char> &taken, vector<vector<char>> &ans) { // base condition if (input.size()==0){ ans.push_back(taken); return; } // normal condition for (int i = 0; i < input.size(); i++) { char t...
ALGO
0.999985
4.700772
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2021-09-05T19:06: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": "eaec83c5405...
a03d1ba0-7daf-4564-839c-febe881fb818
sentinel-wrex/code_cpp
equal_stacks_hackerrank.cpp
#include<iostream> using namespace std; class stack{ public: int *arr; int size; int top; stack(int size){ //passing size this -> size = size; // arr = new int[size]; top = -1; } void push(int element){ if(size - top > 1){ top...
ALGO
0.998932
4.202066
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2023-08-06T09:27: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": "8d4b13d6b78...
585fea51-f8c8-4682-a105-70ac021fabc5
pranshu-17/DSA
CODES for revision/basic/vector_2_.cpp
/* Write a program to calculates the grade of a student based on the marks entered by user in each subject. Program prints the grade based on this logic. If the average of marks is >= 80 then prints Grade ‘A’ If the average is <80 and >=60 then prints Grade ‘B’ If the average is <60 and >=40 then prints Grade ‘C’ ...
ALGO
0.998293
5.745434
{ "github_metadata": { "branch": "main", "commit_count": 1121, "repo_created_at": "2023-08-15T20:50: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": "f42d2050b...
886bb09b-5ef1-491b-b6c6-0de01139b543
REV-Elec/arduino2016
TSramp/TSramp.ino
const int N_TS = 2; const int TS_IN[] = {1, 2}; const int TS_OUT[] = {5, 6}; const unsigned long NEVER_TRANSITION = -1; unsigned long transitionTime[N_TS]; int state[N_TS]; // states: 0 totally off b/c switch off // 1 ramping on // 2 totally on // 3 ramping off // 4 totally off (but wi...
ALGO
0.967479
5.424164
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2016-03-14T21:06:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "be0461bcb0...
cb2e0ff7-07a8-47c9-b2c3-bfd6045b89ad
Prakashkayastha/CPP-DSA
output/output/output/clonerandomlinklist.cpp
#include<iostream> using namespace std; #include<map> class node { public: int data; node* next; node* arbit; node(int data) { this->data=data; this->next=NULL; this->arbit=NULL; } }; void print(node* head) { while (head != NULL) { cout << head...
ALGO
0.999681
4.777981
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-08T04:45: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": "0e597524e625...
91cdc495-f4f1-4bc6-94bb-f4570075fd98
AgrimVerma11/OOP-UTA018-LAB-SOLUTIONS
Assignment 5/q6.cpp
#include <bits/stdc++.h> using namespace std; class shape { public: virtual void area() = 0; virtual void display() = 0; virtual ~shape() {} }; class circle : public shape { private: float radius; public: circle(float r) { radius = r; } void area() { float a = 3.14 * radiu...
TOOL
0.927142
4.886472
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-06-22T18: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": "4bbd86d2b1d4...
ec6e3179-9fb9-496d-9d95-a8918e1954bd
7hokerz/bakjoon
bakjoonmoeum(C++)/중요유형(잘 모르는)/그래프/깊이우선탐색/골드2/15559(16724).cpp
#include <iostream> #include <stack> #include <queue> #include <vector> #include <string> #include <cstring> #include <algorithm> #include <cmath> #include <math.h> #include <stdlib.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef pair<ll, ll> pll; int dx[] = {-1, 0, 1, 0}; int dy[] = {...
ALGO
0.999986
3.844272
{ "github_metadata": { "branch": "main", "commit_count": 84, "repo_created_at": "2024-05-02T12:50: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": "34081ed93e3...
767eb925-d163-4fce-963c-42ca4de465c3
awkv/cloudstorageapi
include/cloudstorageapi/internal/algorithm.h
// Copyright 2021 <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writi...
TOOL
0.945176
6.913202
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2019-11-09T07:47:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00e81e528...
c411fb35-8d80-4793-a3e4-a3de65fee493
czhanjin/EC327-Project
main.cpp
// Copyright 2022 <NAME> <EMAIL> // Copyright 2022 <NAME> <EMAIL> // Copyright 2022 <NAME> <EMAIL> // Copyright 2022 <NAME> <EMAIL> #include <algorithm> #include <cstdlib> #include <cmath> #include <iomanip> #include <iostream> #include <SFML/Graphics.hpp> #include <SFML/Audio.hpp> #include <SFML/System/String.hpp> #i...
TOOL
0.99787
4.944664
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-06-27T16:16: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": "ee24cbf8f79...
fc96093a-606f-4da8-ad12-dc18ffcc53f8
ClickHouse/ClickHouse
src/Functions/PolygonUtils.h
#pragma once #include <base/types.h> #include <Core/Defines.h> #include <base/TypeLists.h> #include <Columns/IColumn.h> #include <Columns/ColumnVector.h> #include <Common/typeid_cast.h> #include <Common/NaNUtils.h> #include <base/range.h> /// Warning in boost::geometry during template strategy substitution. #pragma c...
ALGO
0.993782
6.934064
{ "github_metadata": { "branch": "master", "commit_count": 183246, "repo_created_at": "2016-06-02T08:28:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 41764, "forks": 7471, "issues": 4250, "pull_requests": 622 }, "file_meta": { "content_...
8bf342f7-5194-47ee-8f5d-c1e2a795ff30
royalpranjal/Interview-Bit
Binary-Search/CountElementOccurence.cpp
// https://www.interviewbit.com/problems/count-element-occurence/ int binarySearch(const vector<int> &A, int start, int end, int key, bool searchFirst){ int result = -1; int mid; while(start <= end){ mid = start + (end-start)/2; if(A[mid] == key){ result = mid; if(se...
ALGO
0.999929
5.377193
{ "github_metadata": { "branch": "master", "commit_count": 356, "repo_created_at": "2016-04-11T09:21:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 545, "forks": 451, "issues": 2, "pull_requests": 24 }, "file_meta": { "content_id": "c44...
b18399f0-5ac7-4253-a893-edfef29cd503
gh0st-ryder/Hacking
leetcode/1-500/_000416_partitionEqualSubsetSum_TopDown_DP_accepted.cpp
class Solution { // possible says whether it is possible to partition array nums[0..i] // into 2 arrays with difference of k // // possible(i, k) = possible(i-1, abs(k-nums[i])) || possible(i-1, k+nums[i]) unordered_map<int, bool> cache; vector<int> csum; int signature(int i, int k...
ALGO
0.999949
5.73841
{ "github_metadata": { "branch": "master", "commit_count": 618, "repo_created_at": "2015-03-30T22:33: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": "95f6f567...
e5aa3d6a-7989-487b-b941-68d47474253b
himadajin/competitive-programmiing
examples/extended-euclidean-algorithm/main.cpp
#include <iostream> #include <tuple> using namespace std; tuple<int, int, int> extended_euclid(int a, int b) { // q[k-2], q[k-1], q[k] int q_2, q_1, q; // r[k-2], r[k-1], r[k] int r_2, r_1, r; // u[k-2], u[k-1], u[k] int u_2, u_1, u; // v[k-2], v[k-1], v[k] int v_2, v_1, v; r_2 ...
ALGO
0.999989
5.426165
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2022-06-16T01:06: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": "7c95c5daa...
260902d1-1648-4696-be40-6b83c2680438
XyeHyin/vscode
acm/PTAAA/致敬.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define double long double #define PII pair<int, int> #define dbg(x) std::cout << #x << ":" << x << " " #define MP make_pair #define PB push_back #define rep(i,x,n) for(int i=x;i<=n;i++) #define dep(i,x,n) for(int i=x;i>=n;i--) #define arrout(a,n) rep...
ALGO
0.997194
4.939896
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-07-02T00:53: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": "624e7a35fb78...
03d0e15c-cf91-42de-b54b-a523b4699d3c
LuisEnilton/Maratona
Codeforces/977D - Divide by three, multiply by two/solution.cpp
// // Created by Luis on 14/09/2023. // //Template By eduardocesb #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define optimize ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) #define INF 1000000010 #define INFLL 1000000000000000010LL #define ALL(x) x...
ALGO
0.999994
3.987027
{ "github_metadata": { "branch": "main", "commit_count": 204, "repo_created_at": "2023-06-20T00:39:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a767a9714d...
efef2038-fd95-4db9-a336-35c2e4ce1e04
doraemonho/athena-df_20230521
src/pgen/planet2D_coag.cpp
//======================================================================================== // Athena++ astrophysical MHD code // Copyright(C) 2014 <NAME> <<EMAIL>> and other code contributors // Licensed under the 3-clause BSD License, see LICENSE file for details //=====================================================...
ALGO
0.935842
4.301641
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-07-05T23:33: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": "e6f2f397ca65...
31d1c248-7327-4d3d-a8f1-141dd70d223c
kimhaingvan/source-code-C-
nam1/1000BT/254,255,256_sapxepTangGiam.cpp
#include<iostream> using namespace std; void nhap(int a[], int n) { for (int i=0; i < n; i++) { cout << "a[" << i << "]="; cin >> a[i]; } } void sapxepTang(int a[], int n) { for (int i = 0; i < n; i++) { for (int j = i+1; j < n; j++) { if (a[i] > a[j])swap(a[i], a[j]); } } } void xuat(int a[], int n) {...
ALGO
0.999944
3.698308
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2018-09-04T16:23: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": "a95a81d72...
a338e49c-0b3d-46d9-a410-7647de1c2d88
hsnavarro/imepp
notebook/strings/aho.cpp
// Aho-Corasick - <O(sum(m)), O(n + #matches)> // number of nodes const int N = 1e5 + 5; // number of strings const int S = 2e3 + 5; int nxt[N][26], ch[N], p[N], f[N], szt = 1, cnt[N]; bitset<S> elem[N]; void add(string &pt, int x) { int u = 1; for(auto c : pt) { int j = c - 'a'; if(!nxt[u][j]) { ...
ALGO
0.999826
4.076342
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2018-08-22T02:40:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50570599...
49f81744-42ca-4fda-93ca-989aa124fe7e
moble/Triton
Test/TestRealFFT.cpp
#include "NumericalRecipes.hpp" #include "fft.hpp" namespace WU = WaveformUtilities; using std::cout; using std::flush; using std::endl; using std::vector; using std::ofstream; using std::setprecision; using std::complex; inline Complex* Cmplx(VecDoub &d) {return (Complex *)&d[0];} int main() { const unsigned int N...
ALGO
0.952218
5.38729
{ "github_metadata": { "branch": "master", "commit_count": 538, "repo_created_at": "2014-03-18T20:12:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69382741...
ba9eed7d-fda5-49e4-ba8a-a980eeb5c81e
anhttran/3dmm_basic
src/RenderModel.cpp
/* Copyright (c) 2015 USC, IRIS, Computer vision Lab */ #include "RenderModel.h" bool RenderServices::estimateFaceNormals(cv::Mat shape, cv::Mat faces, cv::Mat &normals){ if (normals.cols == 0) normals = cv::Mat::zeros(faces.rows,shape.cols,shape.type()); float nx, ny, nz; for (int i=0;i<faces.rows;i++){ triangle...
ALGO
0.959649
5.879038
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2017-12-16T00:55:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 118, "forks": 31, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "c83de4...
aa974ed1-77fd-4131-868f-7dff345d514d
Prabhu260902/leetcode
Maximum Path Sum between 2 Leaf Nodes - GFG/maximum-path-sum-between-2-leaf-nodes.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // Tree Node struct Node { int data; Node *left; Node *right; Node(int val) { data = val; left = right = NULL; } }; // Function to Build Tree Node *buildTree(string str) { // Corner Case if (str.length() ...
ALGO
0.999752
6.393795
{ "github_metadata": { "branch": "main", "commit_count": 1338, "repo_created_at": "2022-07-29T05:17:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "23b5369bd...
aed87f70-daff-4a5f-bbab-91819940edb6
joearossetti/Rrcgev
inst/src_07_31_18/UnobsvHetero.cpp
#include <Rcpp.h> //#include <stan/math.hpp> #include "UnobsvHetero.hpp" #include <RcppEigen.h> // [[Rcpp::depends(RcppEigen)]] using namespace Rcpp; UnobsvHetero::UnobsvHetero(Rcpp::NumericMatrix rand_mat_, Rcpp::LogicalVector which_nln_parmtrs_, int num_draws_,...
ALGO
0.961386
5.317839
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-07-12T19:04: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": "35ba05b74b...
6cf32585-7a79-40f5-bc93-3387ebd21394
AyanPahari/Must-Do-Coding-Questions-for-Top-Product-Based-Companies
Trees/23. boundry traversal.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; #define MAX_HEIGHT 100000 // Tree Node struct Node { int data; Node *left; Node *right; }; // Utility function to create a new Tree Node Node *newNode(int val) { Node *temp = new Node; temp->data = val; temp->left = NULL; ...
ALGO
0.999954
5.599548
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2021-12-28T11:51:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dae831531...
94d38ecb-9194-4401-9ba3-f9c5e794a0ff
ek8203/CarND-PID-Control-Project
src/PID.h
#ifndef PID_H #define PID_H class PID { public: /* * Errors */ double p_error; double i_error; double d_error; /* * Coefficients */ double Kp_; double Ki_; double Kd_; // error update step number int n_step; // square average error double best_error; double sum_error; // twiddl...
ALGO
0.977888
6.667928
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2018-02-26T03:31: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": "e93329d1a...
49e88033-d59b-4bfa-b8ea-a17acb0da4ff
namwoam/pd
week8/hw03.cpp
#include <iostream> #include <cstring> #define maxProductCount 30 #define maxNameLength 200 #define maxRecordCount 30 #define traceRecord 3 #define maxCustomerCount 120 class Customer { public: char name[maxNameLength]; int purchaseRecord[maxProductCount] = {0}; int purchaseHistory[traceRecord] = {0}; ...
DATA
0.997857
3.615017
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-09-13T07:27: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": "ff6220d681bb...
0fcedd84-a2fb-4baf-bd8c-69ea07f3f281
Sabiha322/LeetCode-Problems
DAY 02/merge_two_sorted_lists_recursive.cpp.cpp
#include <iostream> using namespace std; struct ListNode { int val; ListNode* next; ListNode(int x) : val(x), next(nullptr) {} }; ListNode* mergeTwoLists(ListNode* l1, ListNode* l2) { if (!l1) return l2; if (!l2) return l1; if (l1->val < l2->val) { l1->next = mergeTwoLists(l1->next, l...
ALGO
0.999886
5.914314
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2025-04-19T16:50: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": "abbacc9bef6...
9800c52e-4259-441e-b8f8-93f0afd7ddf7
iHhx/Algorithms
Search/TernarySearch.cpp
#include <iostream> #include <cassert> #include <vector> int ternarySearchMax(const std::vector<int>& data) { if (data.empty()) return -1; int left = 0; int right = data.size() - 1u; while (left != right) { const int m1 = left + (right - left) / 3; const int m2 = right - (...
ALGO
0.999845
5.611171
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2025-03-20T03:51:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b473f7c8...
aed79ed7-0c07-447a-b2d3-5ddfef5ae581
positivepeng/CCF
201703/201703-4地铁修建.cpp
#include<iostream> #include<vector> #include<algorithm> #include<cstring> #include<queue> using namespace std; typedef struct edge { int u,v,len; edge(int u,int v,int len) { u = u;v = v;len = len; } edge(){} }edge; int n,m; int par[100004]; vector<edge> edges; void init() { for(int i = 1;i <= n; i++) pa...
ALGO
0.999957
3.416498
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-01-09T01:55: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": "817eae53a5...
b7552370-dc03-48b6-b60e-c48333a2bbe2
PS-OZ/solved.ac
C++/Class1/10871.cpp
/* * 문제: 백준 10871번 - X보다 작은 수 * 링크: https://www.acmicpc.net/problem/10871 * 분류: 구현, 반복문 * * 문제 설명: * - 정수 N개로 이루어진 수열 A와 정수 X가 주어진다. * - A에서 X보다 작은 수를 입력받은 순서대로 공백으로 구분해 출력한다. * * 입력: * - 첫째 줄에 N과 X가 주어진다. (1 ≤ N, X ≤ 10,000) * - 둘째 줄에 수열 A를 이루는 정수 N개가 주어진다. (각 정수는 1 이상 10,000 이하) * * 출력: * - X보다 작은 수...
ALGO
0.999963
5.192331
{ "github_metadata": { "branch": "main", "commit_count": 146, "repo_created_at": "2025-04-25T05:15:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0b197dbf07...
455f967a-694a-4aa4-9dc8-8f5d36d17464
mendlin/SIMD-libgen
cpp2c/test_data/p2s.hpp
/* p2s - Serial to Parallel Bit Stream Transposition Copyright (c) 2007, 2008, 2010, <NAME>. Licensed to the public under the Open Software License 3.0. Licensed to International Characters Inc. under the Academic Free License version 3.0. */ #ifndef P2S_HPP #define P2S_HPP #include "idisa128.hpp...
ALGO
0.997846
6.527347
{ "github_metadata": { "branch": "master", "commit_count": 84, "repo_created_at": "2013-01-04T22:27:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e15a84615...
de9effea-7a60-468d-b08f-e58936d6fa77
argosmaia/Algorithms
Buscas/Binária/buscabinaria.cpp
#include <iostream> #include <stdlib.h> int buscabinaria(int vet[], int esq, int dir, int x) { if(dir >= esq){ int meio = (esq + dir) / 2; if(vet[meio] == x) return meio; if (vet[meio] >= x) return buscabinaria(vet, esq, meio - 1, x); return buscabinaria(v...
ALGO
0.999757
5.252022
{ "github_metadata": { "branch": "main", "commit_count": 147, "repo_created_at": "2022-08-16T18:47:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "740bdd12ad...
60cdbbf6-0f90-4fa8-8027-ef694db009e5
parag290/leetcode
2055.Plates_Between_Candles.cpp
/* This question was given in Amazon interview Leetcode : https://leetcode.com/problems/plates-between-candles/description/ There is a long table with a line of plates and candles arranged on top of it. You are given a 0-indexed string s consisting of characters '*' and '|' only, where a '*' represents a plate and a...
ALGO
0.999802
5.854143
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-03-09T00:09: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": "6819c215368b...
3428fb5e-0077-4c4b-b318-fdb0cd9daa14
ayush06092002/GfG-Solutions
Easy/Recursive sequence/recursive-sequence.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: long long sequence(int n){ int mod = 1e9 + 7; long long ans = 0; long long curr = 1; for(int i = 1; i <= n...
ALGO
0.999956
5.847657
{ "github_metadata": { "branch": "main", "commit_count": 458, "repo_created_at": "2023-11-14T11:42:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c06546e622...
8362c804-a0d3-40b0-aa76-e5c5f01db841
LovkashGarg/Leetcode
2179-most-beautiful-item-for-each-query/2179-most-beautiful-item-for-each-query.cpp
class Solution { public: vector<int> maximumBeauty(vector<vector<int>>& items, vector<int>& queries) { sort(items.begin(), items.end()); vector<pair<int, int>> v; for (int i = 0; i < queries.size(); i++) { v.push_back({queries[i], i}); } ...
ALGO
0.999938
5.869449
{ "github_metadata": { "branch": "main", "commit_count": 2065, "repo_created_at": "2024-08-06T09:27:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73cf4a37f...
bcdd978c-6b88-4dde-bab8-69c86a4fd28a
Gansito144/competitive-programming
weekly-training/week11/coj_2963/main.cpp
#include <iostream> #include <algorithm> #include <stdio.h> #include <memory.h> using namespace std; const int kMaxN = 1000006; const int kInf = 2e9; bool prv[kMaxN], now[kMaxN]; int N; int solve(bool ini, bool par) { int cnt = 0, n=N-1; memset(now, 0, sizeof now); now[0] = ini; for(int i=0; i<=N; ++i) { ...
ALGO
0.999862
3.337226
{ "github_metadata": { "branch": "master", "commit_count": 149, "repo_created_at": "2016-07-13T23:59:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d8d12fd...
c922bf51-f99e-45b4-a555-d516597ebb24
UltraProton/PlacementPrep
Map/LRUCache.cpp
#include<bits/stdc++.h> using namespace std; typedef struct node{ int key; int val; node *left; node *right; node(int k,int v): key(k), val(v),left(NULL), right(NULL) {}; } Node; class LRU_Cache{ public: Node *dummy_head; Node *dummy_tail; int size; int curr_size; unorde...
ALGO
0.999429
4.078012
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2019-09-30T20:44: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": "b83ce2e91...
22b710ca-4af6-4377-afb0-ab3854c73937
ColfaxResearch/HOW-Series-Labs
5/5.02-vtune/main-offload.cc
#pragma offload_attribute(push, target(mic)) #include <cstdio> #pragma offload_attribute(pop) #include <cstdlib> #include <omp.h> #include <cmath> #include <mkl_vsl.h> __attribute__((target(mic))) int IterativeSolver(const int n, const double* M, const double* b, double* x, const double minAccuracy); __attribute__((t...
ALGO
0.999799
5.474105
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2016-12-29T00:15:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 33, "forks": 16, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6777e205...
ccaa759e-9871-4ab8-9cc0-94f9de3b484e
hydroo/coding-and-math-exercises
project-euler/179/main.cpp
#include <cassert> #include <cmath> #include <QtDebug> using s64 = int64_t; using namespace std; int divisorCount(s64 n) { int ret = 0; s64 sqrtn = (s64) floor(sqrt(n)); for (auto d = 1; d <= sqrtn; d += 1) { if (n % d == 0) { ret += 2; } } if (sqrtn*sqrtn == n) { ...
ALGO
0.998422
4.638354
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2011-04-03T09:04:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3829619...
ab4c990c-069e-42bc-a871-d577540a0eef
ekera/qunundrum
src/lattice_algebra.h
/*! * \file lattice_algebra.h * \ingroup lattice * * \brief The declaration of functions for basic lattice basis matrix algebra. */ #ifndef LATTICE_ALGEBRA_H #define LATTICE_ALGEBRA_H #include <gmp.h> #include <mpfr.h> #include <fplll/fplll.h> #include <stdint.h> #include <vector> using namespace fplll;...
ALGO
0.998859
6.29142
{ "github_metadata": { "branch": "master", "commit_count": 153, "repo_created_at": "2020-04-25T11:46:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e378d556...
7b10d49e-9d95-4c08-9a9d-b6bda0471c6e
kStasya/Distributed_computing
OpenMP/tasks No. 1-2.cpp
#include <iostream> #include <omp.h> using namespace std; void task1(int number_of_threads) { #pragma omp parallel num_threads(number_of_threads) { int id = omp_get_thread_num(); // идентификатор int count = omp_get_num_threads(); // количество потоков всего //cout << "thread number...
ALGO
0.995865
3.637178
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-03-15T19:15: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": "45c693b177aa...
54801add-60b6-4ec9-b803-aec4b2659d94
Nhinlee/Leet-Code-Training
sorting/1833. Maximum Ice Cream Bars .cpp
#include "../stdc++.h" class Solution { public: // C1: Sorting O(n.log(n)), memory O(1) int maxIceCream(vector<int> &costs, int coins) { std::sort(costs.begin(), costs.end()); int c = 0; for (auto co: costs) { coins -= co; if (coins >= 0) { c++; ...
ALGO
0.999641
5.769387
{ "github_metadata": { "branch": "main", "commit_count": 131, "repo_created_at": "2022-06-22T00:46: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": "4807ba7172...
40a68875-d636-4a10-8fcc-bc8b162d179d
SitaoZ/Cpp-Program
Cpp_primer_plus/第03章/code/practice3_4.cpp
// Created by <NAME> on 09/01/2024 #include <iostream> using namespace std; const int hourPerDay = 24; const int minutePerHour = 60; const int secondPerMinute = 60; int main() { long seconds; cout << "Enter the numbers of seconds:"; cin >> seconds; int second, minute, hour, day; int secondsPerDay = ho...
ALGO
0.9564
4.365747
{ "github_metadata": { "branch": "main", "commit_count": 107, "repo_created_at": "2022-12-03T01:40: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": "b6e3057927...
43ceaf6c-b118-4259-8c32-864e7d8f674b
zahardzhan/aima
c++/mydean/07.Planning/C++Code/RefinePlans/Heuristic.H
/****************************************************************/ /* NAME: <NAME> */ /* ACCT: knr */ /* FILE: Heuristic.H */ /* ASGN: Final */...
ALGO
0.999403
5.929041
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2010-06-03T03:27:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c719c9c06a...
be44f41a-884e-4b63-ba34-25d2f8eeee46
Manish19509/DSA
5CharArrayString.cpp/2string.cpp
// // LEETCODE - 1047 Removal ALL ADJACENT DUPLICATES IN STRING // #include <iostream> // // #include <string> // using namespace std; // string removeDuplicates(string s) // { // string ans = ""; // int index = 0; // while (index < s.length()) // { // // same // // ans ka rightmost cha...
ALGO
0.997766
4.0372
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-02-23T05:05:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "72d58f8dcd2...
9647c061-c8dd-4669-8be7-f300c7593a33
makio93/atcoder
ABC/ABC168/E/main0.cpp
#include <bits/stdc++.h> using namespace std; // 総数を1000000007(素数)で割った余り const long long mod = 1e9 + 7; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; #define ull unsigned long long #define ld long double #define vi vector<int> #define vll vector<ll> #define vc vector<char> #define vs ve...
ALGO
0.999944
4.256324
{ "github_metadata": { "branch": "master", "commit_count": 780, "repo_created_at": "2020-03-06T12:05: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": "054db8ec...
1afb9293-fc46-41f6-bcff-286f7764c97d
jrmart12/compi1Examen1Full
Parser/gramatica.cpp
#include <vector> enum class Symbol: unsigned { input = 0, stmlist = 1, expr = 2, stmlistp = 3, term = 4, exprp = 5, factor = 6, termp = 7, Eof = 8, Semicolon = 9, stmp = 10, OpAdd = 11, OpSub = 12, OpMul = 13, OpDiv = 14, Number = 15, Ident = 16, ...
ALGO
0.998711
5.26294
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-05-15T23:47:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a80f1e74d2...
ae77a87e-487d-4453-8850-2a6f9b258f31
StevenTan123/competitive_programming_public
ICPC/circular_caramel_cookie.cpp
#include <bits/stdc++.h> using namespace std; const double epsilon = 1e-10; const int MAXR = 500005; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int s; cin >> s; double l = 1; double r = MAXR; while (r - l > epsilon) { double m = (l + r) / 2; long long co...
ALGO
0.999899
3.942523
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-01-07T20:58: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": "2795a38dbc67...
e63608d5-f7bc-4966-970f-76d7f328f5fb
memo735/e-olymp
2000-2999/2157 - Sum - Сумма - Cəm - Сума.cpp
#include <iostream> #include <vector> using namespace std; #define MOD 1000000000; vector<vector<pair<int, int>>> g; int d, i, n, u, v; long res; //Поиск в глубину из вершины v. Функция dfs возвращает количество вершин в поддереве //с корнем v (включая саму вершину v). Подсчет этих вершин происходит в переменной cn...
ALGO
0.999945
4.164607
{ "github_metadata": { "branch": "master", "commit_count": 4186, "repo_created_at": "2015-06-14T13:00:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 112, "forks": 70, "issues": 1, "pull_requests": 4 }, "file_meta": { "content_id": "d65b...
76a817b4-6c26-4ea5-bde5-76f2e872a309
hblee12294/cpp-primer-plus
sample/4.1/4.1.cpp
#include <iostream> int main() { using namespace std; int yams[3]; yams[0] = 7; yams[1] = 8; yams[2] = 6; int yamcosts[3] = {20, 30, 5}; cout << "Total yams = "; cout << yams[0] + yams[1] + yams[2] <<endl; cout << "The package with " << yams[1] << " yams costs " << yamcosts[1] << ...
TOOL
0.921402
3.361973
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-08-24T13:13: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": "3fbc68da58...
dc6105dd-00b6-4e31-b773-62d810372152
pm-mth/Competitive-Programming
LeetCode/Shortest_Path/ford_bellman.cpp
#include <iostream> #include <vector> #include <climits> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n, m; cin >> n >> m; vector<vector<int>> graph; for (int i = 0; i < m; i++) { int u, v, w; cin >> u >> v >> w; graph.push_ba...
ALGO
0.999973
4.624674
{ "github_metadata": { "branch": "main", "commit_count": 906, "repo_created_at": "2022-03-17T11:17:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b5d7b0f11d...
5e96b9a2-d7f6-4d1a-a9c2-cd4f04d8ea00
theankushrai/Competitive-programming-Cpp
SDE Sheet/DAY 6 Linked List/Palindrome_Linked_List.cpp
/*Given the head of a singly linked list, return true if it is a palindrome. Example 1: Input: head = [1,2,2,1] Output: true Example 2: Input: head = [1,2] Output: false Constraints: The number of nodes in the list is in the range [1, 105]. 0 <= Node.val <= 9 */ // 1.brute force - add all elements in vect...
ALGO
0.999874
5.819422
{ "github_metadata": { "branch": "master", "commit_count": 62, "repo_created_at": "2021-02-08T09:13: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": "ca5389f3c...
b0cf1a8c-76de-4b1b-90ce-6a269dec0bb2
reisoftware/ap2d
Geometry/global.cpp
#include "StdAfx.h" #include "global.h" #include <algorithm> #include "Point.h" #include "isin2d.h" #include "SLine.h" #include "Arc.h" #include "Circle.h" #include "Point.h" #include "Plane.h" #include "calculate.h" #include "getrace.h" namespace geo{ //globle functions define ////*******************************...
ALGO
0.980678
3.362241
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2018-12-20T02:23:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e6eb7148d6...
447af00d-a298-4f24-89e1-8758d268a68f
gem5/gem5
src/mem/cache/prefetch/signature_path_v2.hh
/** * Copyright (c) 2018 Metempsy Technology Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: redistributions of source code must retain the above copyright * notice, this list ...
TOOL
0.902343
7.641478
{ "github_metadata": { "branch": "stable", "commit_count": 22975, "repo_created_at": "2014-12-02T09:46:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2105, "forks": 1470, "issues": 88, "pull_requests": 56 }, "file_meta": { "content_id": ...
9be59685-d09f-4112-af27-f66a0edf1a62
GAStudyGroup/vrp
src/base/sources/Fitness.cpp
#include <cmath> #include "Fitness.hpp" #include "Configs.hpp" #include "TourUtils.hpp" using std::ceil; using std::pow; //OurFitness double OurFitness::ourFitness(vector<int>& tour){ vector<vector<int>> subs = Tour(tour).explodeSubTours(); double fitness=0; for(vector<int> sub : subs){ doubl...
ALGO
0.999882
4.846025
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2018-03-17T18:10:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56469a8d3...
d42681a8-50f7-497b-b355-7e4bc22900ee
moritzmoser/PPM-KOE
arduino_pwm.ino
#define led1 3 #define led2 4 #define right 5 #define left 6 #define s1 A1 #define s2 A2 #define s3 A3 #define s4 A4 int drehzahl1 = 0; int drehzahl2 = 0; int arr1[4]; int arr2[4]; int arr3[4]; int arr4[4]; int x1 = 0; int x2 = 0; int x3 = 0; int x4 = 0; void setup() //S5 &S6 wird als OUTPUT definiert und auf LOW ge...
ALGO
0.965829
3.520579
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2014-09-25T13:49:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f7be27f0...
ba7bf9e4-0c71-47ea-86ab-62f2aad0651a
kaoru-528/atcorder_archive
326/a.cpp
/** * programmer: Kaoru * created: 28.10.2023 20:26:17 **/ #include <bits/stdc++.h> using namespace std; #define OVERLOAD_REP(_1, _2, _3, name, ...) name #define REP1(i, n) for (auto i = std::decay_t<decltype(n)>{}; (i) != (n); ++(i)) #define REP2(i, l, r) for (auto i = (l); (i) != (r); ++(i)) #define rep(...)...
ALGO
0.999944
3.690048
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2022-07-15T15:18: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": "0e6c67527a9...
b3e35e54-31f1-4388-b80d-c70dc1004935
rudalsd/Algorithm-Study
백준/dp/09252. LCS 2.cpp
#include <iostream> #include <string> using namespace std; string str1; string str2; int dp[1001][1001]; //최장 수열의 길이를 저장하기 위한 dp배열 char ans[1001]; //정답을 저장할 배열 int main() { cin >> str1 >> str2; str1 = "0" + str1; //dp[0][0]을 0으로 초기화하기 위해서 앞에 0을 붙여준다. str2 = "0" + str2; int a =...
ALGO
0.999998
3.908339
{ "github_metadata": { "branch": "main", "commit_count": 1325, "repo_created_at": "2022-02-27T02:01:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c126d25ad...
7771dfa8-1fab-41b1-8287-16663354d9a0
Tatraa/Applied-CS-Master
sem-1/prog-row-i-rozp/zestaw-1/SequentialSwarm.h
/* SEQUENTIAL_SWARM.h */ #ifndef SEQUENTIAL_SWARM_H_ #define SEQUENTIAL_SWARM_H_ #include "Antenna.h" #include "Function.h" #include "Swarm.h" class SequentialSwarm: public Swarm { private: int best_id; int step; double best_function_value; double my_antenna_range_sq; double *my_po...
ALGO
0.999349
4.149176
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2024-09-29T17:25: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": "66e37e6a898...
f917b8f0-701d-4358-b82f-bdfd0dfb21b5
AadityaAwasthy/Competitive-Coding
CSES-Problem-Set/sortingAndSearching/ferrisWheel.cpp
#include<bits/stdc++.h> using namespace std; #define iterate(i,n) for(int i = 0 ; i < n ; i++) #define INF 1e9 #define MOD 1000000007 #define MAXN 1000001 #define endl "\n" #define deb(x) cout << #x << " = " << x << "\n"; #define arrout(a) for(auto itr : a) cout << itr << " " #define arrin(a) for(auto& itr : a) cin >> ...
ALGO
0.999939
4.453895
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2022-10-15T10:59: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": "cfab7aef2...
4af6b502-b797-48bb-958e-32b036663213
CodeBreakerX101/cpp
Puzzle Solvers/Wordle Solver/Algorithms.h
#pragma once #include <vector> class Algorithms { private: public: int BinarySearch(std::vector<int>& data, int l, int r, int value); /* template doesn't work with declaration in .cpp file */ template<typename t1> void QuickSortInAscendingOrder(t1& data, int left, int right) { if ...
ALGO
0.999865
5.103858
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2023-05-21T12: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": "f20db9ae9...
4cbee048-5982-40fe-9678-ea0a910a6c75
faisal1025/CP
Codeforces ProblemSet/B/william_and_vigilant.cpp
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update #define ll long long #define vvi vector<vector<int>> #define vvll vector<vector<long long>> #define vvb vector<vector<bool>> #define FAST_IO ios_base::sync...
ALGO
0.999762
3.942487
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-07-25T05:16: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": "84c90497fe...
b0def27f-b323-481c-a978-804cc62daa94
swarupSikder/phitron_v2
AL-w1/visit_country_or_not.cpp
// author: <NAME> // judge: ... // problem: ... #include <bits/stdc++.h> using namespace std; char grid[100][100]; bool vis[100][100]; vector<pair<int, int>> d = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}}; int n, m; bool valid(int i, int j) { if (i < 0 || i >= n || j < 0 || j >= m) { return false; } ...
ALGO
0.999966
4.798586
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-12-18T02: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": "80ec1a8a41b...
3b588305-d882-4755-bf96-aafcfb29eaf2
ithsarasak/Programming
Compettitive programming/ComO/o60/may/o60_may10_mafiameeting.cpp
#include <bits/stdc++.h> #define pii pair<int, int> #define x first #define y second #define vi vector<int> using namespace std; const int N = 2e5 + 10; int n, m, q; int lca[19][N], low[N], pre[N], block[N], id[N], lv[N]; bool art[N], cut[N]; vector<vi> g, ccs; vi sz; void find_component( int u, int p ) { static ...
ALGO
0.999766
3.828944
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2019-04-03T08:43:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ed6028ba6...
f3696be2-dee2-4636-bbe9-78fe320a9292
vbonnici/grafe-sim
analysis/data/p01140/s893880705.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <cfloat> #include <ctime> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include...
ALGO
0.999916
3.271189
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-07-10T13:21: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": "1f3f9fd4618...
f844efdd-08eb-41fe-81af-f72c52712e7e
hal9000universe/tqla
matrix.h
// // Created by <NAME> on 11.09.24. // #ifndef MATRICOM_MATRIX_H #define MATRICOM_MATRIX_H #include <iostream> #include <vector> #include <cassert> #include <cmath> #include "helper.h" using namespace std; class matrix { private: vector<double> mValues; tuple<int, int> mShape; public: matrix(vector<d...
ALGO
0.99386
6.421406
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-09-22T12:26: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": "1b4c4f6790ed...
1cc8eb1a-c21d-4ea5-97b4-69a08f21ffc8
Crowndev/crown
src/consensus/tx_verify.cpp
// Copyright (c) 2017-2019 The Crown Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <consensus/tx_verify.h> #include <consensus/consensus.h> #include <chainparams.h> #include <primitives/transaction.h...
ALGO
0.934859
7.435936
{ "github_metadata": { "branch": "main", "commit_count": 398, "repo_created_at": "2021-10-11T10:57:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 6, "issues": 13, "pull_requests": 0 }, "file_meta": { "content_id": "881869c5d2...
10422043-46e8-4d53-8a68-f65dcef2d6eb
imulan/procon
csacademy/round-57/distinct-palindromes.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define all(x) (x).begin(),(x).end() #define pb push_back #define fi first #define se second #define dbg(x) cout<<#x" = "<<((x))<<endl template<class T,class U> ostream& operator<<(ostream& o, const pa...
ALGO
0.999996
4.356763
{ "github_metadata": { "branch": "master", "commit_count": 2571, "repo_created_at": "2015-11-25T03:18:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 27, "pull_requests": 0 }, "file_meta": { "content_id": "98f63c...
cf8b7aa7-71c2-4019-b2fb-48df406b174c
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/07/0712/personal_submission/cf992b_alwaysce.cpp
#include <bits/stdc++.h> using i64 = long long; i64 mod = 1000000007; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); std::cout.tie(nullptr); int l, r, x, y; std::cin >> l >> r >> x >> y; // (k1,k2)互质且 k1k2=y/x的数量求解 // k1,k2 属于 [l/x, r/x] if (y % x != 0) { std::cout << 0 << '\n'; ...
ALGO
0.999783
4.987376
{ "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": "7602...
80bf9a32-2f40-4b92-ac64-d1071fb05860
SHUKLA-KUSHAGRA/Leetcode_solved
Strongly Connected Components (Kosaraju's Algo) - GFG/strongly-connected-components-kosarajus-algo.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: void dfs(vector<int>& vis,int node,vector<vector<int>>& adj,stack<int>& st) { vis[node]=1; for(auto it:adj[node]) { if(vis[it]==0) { dfs(vis,it,adj,st); ...
ALGO
0.99989
6.180526
{ "github_metadata": { "branch": "main", "commit_count": 185, "repo_created_at": "2022-02-18T07:46:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4061fbf748...
d2a098f2-c809-4d40-b985-486bf22757c4
Altu-Bitu/AlgorithmStudy_LYJ
9월 14일 - 우선순위 큐/2493.cpp
// // https://iagreebut.tistory.com/204 // #include <iostream> #include <vector> #include <stack> using namespace std; // 샘플코드 // 1. 답의 높이를 저장하는 벡터 / 탑의 인덱스는 따로 stack vector<int> transTop1(int n, vector<int> &num) { stack<int> st; vector<int> ans(n + 1, 0); //정답 배열은 이미 전부 0으로 초기화 (송신하는 탑이 전부 없다고 가정됨) fo...
ALGO
0.999996
5.263934
{ "github_metadata": { "branch": "main", "commit_count": 295, "repo_created_at": "2021-08-26T08:09:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c03c3742a1c...
8ec12a8c-7aaa-4ffd-8926-b5a0c271b10d
v2v3v4/BigWorld-Engine-14.4.1
programming/bigworld/third_party/mongodb/boost/build/include/boost/geometry/multi/algorithms/intersection.hpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2012 <NAME>, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST...
ALGO
0.997747
6.813674
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-01-09T19:54:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 225, "forks": 106, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc12de2...
00c69e42-53d0-48e2-ad13-34006bb24d85
core-code/MiscApps
CoreLS/Foreign Code/cml/tests/timing/matrix_main1.cpp
/* -*- C++ -*- ------------------------------------------------------------ @@COPYRIGHT@@ *-----------------------------------------------------------------------*/ /** @file * @brief */ #include "timing.cpp" int main(int argc, char** argv) { using std::cin; /* For external_vec_et1.cpp and external_c1.cp...
ALGO
0.996493
5.180863
{ "github_metadata": { "branch": "master", "commit_count": 304, "repo_created_at": "2012-06-22T16:10:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 58, "forks": 6, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "2e9f39e...
ede05ad9-b5a5-4bfb-91c8-16c6ed238064
dadeba/posit_gpu
libRpack/util.cpp
#include <cstdio> #include <cstdlib> #include <cstdint> #include <iostream> #include <random> #include <cstring> #include <malloc.h> #include "softposit_cpp.h" #include "def.h" posit32 abs(posit32 x) { posit32 tmp = x; if (tmp < 0.0) tmp = -tmp; return tmp; } double N1_norm_diff(float *cc, float *dd, const int...
ALGO
0.998259
4.432817
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-06-24T09:43: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": "55dd6024cb77...
ef6bf1a1-d889-43a7-9965-acd6fbdcaab4
koide3/monocular_people_tracking
include/monocular_people_tracking/track_system.hpp
#ifndef MONOCULAR_PEOPLE_TRACKING_TRACKSYSTEM_HPP #define MONOCULAR_PEOPLE_TRACKING_TRACKSYSTEM_HPP #include <Eigen/Dense> #include <ros/node_handle.h> #include <tf/transform_listener.h> #include <tf_conversions/tf_eigen.h> #include <sensor_msgs/CameraInfo.h> namespace monocular_people_tracking { class TrackSystem {...
ALGO
0.947929
6.917197
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-01-22T11:28:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 10, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3262b2c...
cf076020-35bf-4680-a684-0bb0c499c65d
ApolloAuto/apollo
modules/perception/lidar_detection/detector/point_pillars_detection/nms_cuda.h
/****************************************************************************** * Copyright 2020 The Apollo Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ...
ALGO
0.903027
6.884605
{ "github_metadata": { "branch": "master", "commit_count": 19341, "repo_created_at": "2017-07-04T19:03:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25847, "forks": 9793, "issues": 895, "pull_requests": 104 }, "file_meta": { "content_id...
530adee0-c91b-49d7-862a-30b8b825563a
modelscope/FunASR
runtime/onnxruntime/third_party/openfst/src/extensions/mpdt/mpdtexpand.cc
// See www.openfst.org for extensive documentation on this weighted // finite-state transducer library. // // Expands a (bounded-stack) MPDT as an FST. #include <cstring> #include <memory> #include <string> #include <vector> #include <fst/flags.h> #include <fst/log.h> #include <fst/extensions/mpdt/mpdtscript.h> #in...
TOOL
0.912117
6.332779
{ "github_metadata": { "branch": "main", "commit_count": 4793, "repo_created_at": "2022-11-24T02:28:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11593, "forks": 1172, "issues": 381, "pull_requests": 9 }, "file_meta": { "content_id": "1...
27a49c16-f87c-4288-8b85-e5b04a1cb1be
wenqiangwangsustech/FP16-LSRK
compGRTM/src/src_willimson_wave_con/src_willimson_con/freeSurface.cpp
/*================================================================ * ESS, Southern University of Science and Technology * * File Name:propagate.cpp * Author: <NAME>, <EMAIL> * Created Time:2021-11-03 * Discription: * ================================================================*/ #include "header.h" #i...
ALGO
0.999014
3.901192
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-08-23T14:52:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 4, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "147ab332d549...
69f6715e-ef9d-443f-9286-cec45840f87c
JLworkbook/Portfolio
UVaOnlineJudge/acm_111/acm_111.cpp
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <algorithm> using namespace std; #define STRINGMAX 100 #define MAXN 24 int LCS (int n, int correct_list[MAXN], int reply_list[MAXN]); int main () { int i; char input_string[STRINGMAX]; int n; int correct_list[MAXN]; int reply_list[MAXN], sc...
ALGO
0.999643
3.2277
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2018-10-27T03:20: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": "91bc499cc...
dc288a2e-e084-4c04-b68e-81268db3dd11
ManharanKaur/DSA-and-Competitive-Programming
C++/Trees/Binary Search Tree/BST.cpp
#include <iostream> #include <queue> using namespace std; class Node{ public: int data; Node* left; // Pointer to left node Node* right; // Pointer to right node Node(int d){ data = d; left = NULL; right = NULL; } }; // Inorder Traversal (DFS) void Inorder(Node *root){ ...
ALGO
0.999989
3.798751
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2024-08-07T14:51: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": "7c831a3ff...
a538aaa8-270a-42fa-8133-dfef141aedb3
yutarchery/GitCoder
ABC/351-400/abc372/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> Pii; typedef pair<int, ll> Pil; typedef pair<ll, ll> Pll; typedef pair<ll, int> Pli; typedef vector<vector<ll>> Mat; #define fi first #define se second const ll MOD = 1e9 + 7; const ll MOD2 = 998244353; c...
ALGO
0.999887
4.252875
{ "github_metadata": { "branch": "main", "commit_count": 1429, "repo_created_at": "2021-04-20T14:39: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": "afc017217...
774c456c-ec85-4d21-9a0e-14d5a14aeb05
gitleej/DataStructureCpp
String/58_02_LeftRotateString.cpp
// // Created by AILEE on 2023/2/16. // 题目58_02:左旋转字符串 // 题目:字符串的左旋转操作是把字符串前面的若干个字符串转移到字符串的尾部,请定义一个函数实现字符串左旋转的功能。如输入“adcdefg”和数字2,则输出“cdefgab” // #include <iostream> #include <string> using namespace std; void ReverseSentence(string &str, int start, int end) { if (str.empty()) { return; } if (st...
ALGO
0.987458
5.816861
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2023-01-29T09:37:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9126a8bf6...
8d5b2593-11a9-4cf8-a8e0-02c39c810f71
vikassalgude/ROHIT-NEGI-S-DSA-SERIES
DAY120.cpp
#include <iostream> #include<bits/stdc++.h> using namespace std; class person{ public: int age; string name; //for sorting bool operator<(const person &other)const{ return age<other.age; } }; int main() { //pair<string,int>p; // p=make_pair("rohit",30); // cout<<p.first<<" "...
ALGO
0.995061
3.079688
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2024-12-22T14:23: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": "8e21abebc93...
76ea514b-a890-461c-9dca-f2382def930a
vietnux/CodeEditorMobile
examples/cpp/average-arrays.cpp
// C++ Program to Calculate Average of Numbers Using Arrays // This program takes n number of element from user (where, n is specified by user), stores data in an array and calculates the average of those numbers. #include <iostream> using namespace std; int main() { int n, i; float num[100], sum=0.0, averag...
ALGO
0.999104
5.22021
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2022-03-01T10:08:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7d628c41b1...
ac419f8b-d120-4a90-8ccb-b2c3c5337546
avigautam-329/Interview-Preparation
Arrays/ArraySubsetOfAnotherArray.cpp
#include <bits/stdc++.h> using namespace std; string isSubset(int a1[], int a2[], int n, int m) ; int main() { int t; cin >> t; while (t--) { int n, m; cin >> n >> m; int a1[n], a2[m]; for (int i = 0; i < n; i++) { cin >> a1[i]; } for (int i = ...
ALGO
0.999954
5.700243
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2021-06-07T22:19:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c16d5f9b11...