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
27f1884a-99c1-4625-8769-cb5059b81d9e
Janak-Rajpurohit/DSA
24_longest_consecutive_seq.cpp
// GOOGLE #include<bits/stdc++.h> using namespace std; // longest consecutive sequence - [100,102,103,1,1,2,3,4] - {1,2,3,4}longest one // BETTER // Tc - O(n), Sc - sorting the array making change in input O(N) // int lonegestConsecutive(vector<int> arr){ // int n = arr.size(); // sort(arr.begin(),arr.end()); // ...
ALGO
0.999876
4.796371
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-10T13:13: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": "c65121f01e38...
6711affc-3f49-4f44-b61e-0451696e1344
MohammadSajjadHossain9648/Basic-of-Cplusplus
array of int, char, string/array math function/copy_an_array_to_another.cpp
#include<iostream> #include<iomanip> #include<algorithm> using namespace std; /* to know more: https://www.techiedelight.com/create-a-copy-of-an-array-in-cpp/ https://cplusplus.com/forum/general/199358/ */ int main() { int arr[] = {1,2,3,4,5}; int len = sizeof(arr)/sizeof(int); //meth...
ALGO
0.988267
4.743547
{ "github_metadata": { "branch": "main", "commit_count": 377, "repo_created_at": "2022-09-18T16:48:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "67c2cbf10f...
de9a3884-18f6-499c-85b5-089e27040901
pseong/ProgramSolving
Baekjoon Online Judge/16197.cpp
#include <iostream> using namespace std; char map[21][21]{0}; int start1[2]{0}; int start2[2]{0}; int visit[21][21][21][21]{0}; int n, m; int dx[4]{-1, 1, 0, 0}; int dy[4]{0, 0, -1, 1}; bool check(int x, int y) { if(x>=1 && x<=n && y>=1 && y<=m) return true; else return false; } int ans=-1; void func(int n...
ALGO
0.999708
3.534991
{ "github_metadata": { "branch": "main", "commit_count": 2105, "repo_created_at": "2021-01-25T02:47: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": "9c80a2d8f...
7fd7884b-5df4-43a4-a2c4-97bcc32fa6b3
StephenGuanqi/leetcode
cpp/bfs/SurroundedRegion.cpp
// // Created by <NAME> on 1/31/18. // #include <unordered_map> #include <unordered_set> #include <vector> #include <queue> using namespace std; class Solution { public: /* * @param board: board a 2D board containing 'X' and 'O' * @return: nothing */ void surroundedRegions(vector<vector<char>> &board) { if...
ALGO
0.998609
5.67594
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2017-07-09T11:00: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": "1656698c3f...
9af2a724-1ffe-4257-a017-51059921acce
vishaljbhandari/LearnC
Pending/example/stl/algorithms/stablesort.cpp
// gcc -lstdc++ -lm stablesort.cpp #include <iostream> #include <algorithm> #include <vector> using namespace std; template<typename T> bool mycomp(const T &lh, const T &rh) { return int(lh) < int(rh); } template<typename T> void display(const T &v) { if (!v.size()) return; for (auto e : v) { cout << e << " "...
ALGO
0.999852
5.903677
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-11-28T10:37:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "4a6184fa8d34...
8b32e0fd-ab67-41f1-bef4-f3996a90fa3d
Magikarp4000/comp-prog
Codeforces/2020B.cpp
#include <bits/stdc++.h> using namespace std; #define OPTM ios_base::sync_with_stdio(0); cin.tie(0); #define INF int(1e9+7) #define ln '\n' #define ll long long #define ull unsigned long long #define ui unsigned int #define us unsigned short #define FOR(i,s,n) for (int i = s; i < n; i++) #define FORR(i,n,s) for (int i...
ALGO
0.999961
3.926622
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-11-18T21:12: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": "26d5baef1898...
e416719b-e800-43e1-80c3-bb0fe85f993a
mi-g-alex/G_Alex-IiTP-Labs
Sem1/OAiP/L5_LIBS/Task1.cpp
void fillArrayByRules(long long **a, long long n) { for (int i = 1; i <= n; ++i) { for (int j = 1; j <= n; ++j) { if(i <= 5) a[i - 1][j - 1] = 2 * i * j * j - 2 * j; else a[i - 1][j - 1] = 3 * i * j - 3; } } } void transArray(long long **a, long long **b, long long n) { ...
ALGO
0.998942
3.307604
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2023-04-15T07:05:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d0b3b6bb...
6c35aa46-cb87-479f-9a0a-d6a0d3abf08f
SOURABH358/DSA
Graphs/Topological Sort/DFS.cpp
// https://www.geeksforgeeks.org/topological-sorting/ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to return list containing vertices in Topological order. void dfs(vector<int>adj[], int i, stack<int>&s, vector<bool>&vis) { if(vis[i]) return ; ...
ALGO
0.999929
6.213037
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2023-05-07T15:37: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": "13ee931e4...
8225c8d5-7615-4b47-990c-671b1a6ebea3
GreyBoxTester/Algo
Tree/SplayTree/SplayTree.cpp
#include <cstdint> #include <utility> using i64 = int64_t; struct SplayTreeNode { SplayTreeNode* l = nullptr; SplayTreeNode* r = nullptr; SplayTreeNode* p = nullptr; i64 val = 0; }; void rotl(SplayTreeNode* x) { SplayTreeNode* p = x->p; SplayTreeNode* g = p->p; SplayTreeNode* b = x->l; ...
ALGO
0.999911
5.073847
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2024-03-23T09:05: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": "61fd8d663...
9d82073f-a883-453e-b8fe-94e6851d4604
concl/algorithms
data_structures/avl_tree.cpp
#include <bits/stdc++.h> using namespace std; template <typename T> struct Node { int8_t balance; Node* left; Node* right; T val; Node(const T& value, Node* l = nullptr, Node* r = nullptr, int8_t bal = 0) : val(value), left(l), right(r), balance(bal) {} }; template <typename T> class AVL...
ALGO
0.999838
5.472383
{ "github_metadata": { "branch": "main", "commit_count": 174, "repo_created_at": "2023-07-22T08:21: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": "f3158d4cff...
1bb7e806-a337-4714-bf28-2c4b6a22af26
Dyablo-HPC/Dyablo
core/src/hyperbolic/HydroUpdate_gravity.cpp
#include "scheme/HyperbolicUpdate_base.h" namespace dyablo { // Should we keep that name ? class HydroUpdate_gravity : public HyperbolicUpdate { private: ForeachCell& foreach_cell; Timers& timers; int ndim; GravityType gravity_type; real_t gx, gy, gz; public: HydroUpdate_gravity( ConfigMap&...
ALGO
0.951858
4.872165
{ "github_metadata": { "branch": "dev", "commit_count": 2006, "repo_created_at": "2024-06-18T09:19:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 27, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51218a9bd3...
0a361b09-d01e-4c09-9288-f276c81fd991
dudgh9661/algorithmPractice
2진수8진수/main.cpp
#include <iostream> #include <string> #include <cmath> #include <vector> #include <stack> using namespace std; long long sum = 0; stack<string> st; string toEight(string input){ int total = 0; int idx = 0; int num = 0; for(int i = input.length() - 1; i >= 0; i--) { num = input[i]-'0'; ...
ALGO
0.999881
3.75659
{ "github_metadata": { "branch": "master", "commit_count": 456, "repo_created_at": "2020-01-21T01:36: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": "4aed867b...
2d37c898-2dd3-4b19-a011-ca3adb4ab60b
ishandutta2007/codeforces-l
lzr_010506/normal/607/C.cpp
#include <bits/stdc++.h> using namespace std; const int N=1e6+10; int n; char a[N], b[N]; int nxt[N]; void getnxt() { int j = 0; nxt[1] = 0; for(int i = 2; i <= n; i ++) { while(j && b[j + 1] != b[i]) j = nxt[j]; if(b[j + 1] == b[i]) j ++; nxt[i] = j; } } void kmp() { int...
ALGO
0.999985
3.508602
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:17: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": "6d92ee632204...
2742cded-dc06-4f6a-be9b-7d41ec43356e
ChMno2/Codeforces
Codeforces Round 725 (Div. 3)/C. Number of Pairs.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n, l, r; cin >> n >> l >> r; int a[n + 1]; for (int i = 1; i <= n; i++) { cin >> a[i]; } long long ans = 0; sort(a + 1, a + n + 1)...
ALGO
0.999969
4.930706
{ "github_metadata": { "branch": "main", "commit_count": 65, "repo_created_at": "2024-04-26T14:27: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": "04c19d678ac...
67eb0f91-692f-4a10-add2-7712e4d9b0cb
ilpincy/argos3-examples
loop_functions/trajectory_loop_functions/trajectory_loop_functions.cpp
#include "trajectory_loop_functions.h" /****************************************/ /****************************************/ /* * To reduce the number of waypoints stored in memory, * consider two robot positions distinct if they are * at least MIN_DISTANCE away from each other * This constant is expressed in met...
ALGO
0.998596
7.346767
{ "github_metadata": { "branch": "master", "commit_count": 87, "repo_created_at": "2013-07-31T16:06:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 45, "forks": 42, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "c49668c...
4f75dfe0-46b7-4950-8dfa-3b47a8b40e6d
20171193/CodingTest
08. Recursion/Baekjoon/Baekjoon2630.cpp
// 백준 2630번 색종이 만들기 // 1줄 : 잘린 하얀색 색종이 개수 // 2줄 : 잘린 파란색 색종이 개수 // 분할정복, 재귀 풀이 #include <iostream> #include <math.h> using namespace std; int n, white = 0, blue = 0, a[129][129]; int dx[4] = { 1,0,0,1 }; void go(int x, int y, int _n) { int blueCount = 0; for (int i = y; i < y + _n; i++) { for (int j = x; j < x...
ALGO
0.999716
4.326584
{ "github_metadata": { "branch": "Jaechun", "commit_count": 214, "repo_created_at": "2023-12-11T07:41: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": "1b00752...
23a2941c-3bb9-4bf3-b38c-54c1fa00cb27
sai-sreekhar/Competitive-Coding
2556.cpp
/* Author: <NAME> Created: 2023/02/05 23:07:37 Last Modified: 2023/02/06 00:46:12 */ #include <bits/stdc++.h> using namespace std; // typedefs typedef long long int ll; typedef unsigned long long int ull; typedef long double lld; typedef vector<ll> vll; typedef vector<pair<ll, ll>> vpll; typedef pair<ll,...
ALGO
0.999722
5.473039
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2022-04-03T07:14:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ebcf56903...
6bdad93e-8acb-4162-b685-8a6cea219e48
MuhirsanDev/Tutorial-C
06. Operator Logika/main.cpp
#include <iostream> using namespace std; /* Operator logika adalah operator yang digunakan untuk membandingkan dua atau lebih ekspresi boolean dan menghasilkan nilai boolean baru berdasarkan hasil evaluasi logika dari ekspresi tersebut. Operator logika umumnya digunakan untuk membuat ekspresi logika yang kompleks da...
ALGO
0.945944
5.522131
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2024-03-14T16:04:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "362f3020f24...
0a9965db-4ae6-4d3c-bfbc-4fe619ef127b
AutumnKite/Codes
LibreOJ/2541 「PKUWC2018」猎人杀/容斥,生成函数/std.cpp
#include <cstdio> #include <cctype> #include <ctime> #include <cstring> #include <algorithm> #include <vector> char buf[1 << 23], *ps = buf, *pt = buf; #define getchar() (ps == pt && (pt = (ps = buf) + fread(buf, 1, 1 << 23, stdin), ps == pt) ? EOF : *ps++) int read(){ register int x = 0; register char f = 1, ch = ge...
ALGO
0.999969
4.281516
{ "github_metadata": { "branch": "master", "commit_count": 683, "repo_created_at": "2019-08-18T00:53:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "78590d45...
fb23b083-f29a-43ff-98f3-90e19c1e665c
mthu02/phan-tich-thiet-ke-giai-thuat
660C1.cpp
#include<iostream> using namespace std; const int N = 1200300; int n, k; int a[N]; void solve() { int ansl = 0, ansr = 0; int j = 0, cnt = 0; for(int i=0; i< n;i++) { if (j < i) { j = i; cnt = 0; } while (j < n) { int ncnt = cnt + !a[j]; if (ncnt > k) break; cnt += !a[j]; j++; } if ...
ALGO
0.999994
3.254459
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-01-11T16:19: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": "ce9929e4a667...
50b6b86f-4c4f-4981-b0a8-a1d66d913d2f
maksle/slonikai
position.cpp
#include <vector> #include <string> #include <iostream> // #include <iomanip> #include <sstream> #include "types.h" #include "bb.h" #include "zobrist.h" #include "movegen.h" #include "position.h" Position::Position() { set("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"); } Position::Position(std::stri...
ALGO
0.954198
4.502076
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2017-06-27T02:54:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "195682a1c...
b5b14170-4b03-4d66-9e5f-013d090de4e5
ScrewedUP/Leetcode
2182-find-the-minimum-and-maximum-number-of-nodes-between-critical-points/find-the-minimum-and-maximum-number-of-nodes-between-critical-points.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: vector<int> nodesBetw...
ALGO
0.999942
5.221047
{ "github_metadata": { "branch": "main", "commit_count": 1783, "repo_created_at": "2023-11-29T05:44: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": "085ece196...
bbb22c34-9c7d-4cee-b3bc-66b6538f63c1
RosettaCommons/rosetta
source/src/protocols/motifs/LigandMotifSearch.hh
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the co...
ALGO
0.993124
5.142571
{ "github_metadata": { "branch": "main", "commit_count": 11737, "repo_created_at": "2023-11-17T16:42:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 296, "forks": 100, "issues": 27, "pull_requests": 9 }, "file_meta": { "content_id": "097e...
512fa16e-a37c-4103-95bd-d742ac574eec
qbolec/c
bignumy_zwykle.cpp
#include<iostream> #include<iomanip> #include<cstdlib> #include<string> #include<vector> #include<algorithm> #include<cmath> #define USE_DIV_TRICK #define USE_FFT //#define OLDSKUL //#define DZIEL_NA_CZTERY using namespace std; template<class T> bool operator ==(const T & a,const T & b){ return !memcmp(&a,&b,sizeof(T...
ALGO
0.998869
3.096934
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2009-09-30T07:30: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": "ce6324a3dd...
8dfedb91-2009-4da3-98fe-3ada647e3366
NenadGvozdenac/Operativni-Sistemi
termin_02/06_Slucajno_Zadatak_2/main.cpp
/* Koristeći konzolu i nasumično generisane slučajne brojeve po normalnoj distribuciji, vizuelizovati Gausovu krivu koristeći zvezdice. Gausova kriva po X osi ima moguće vrednosti koje su generisane, a po Y osi koliko su vrednosti u tom delu X ose zastupljene, procentualno, u svim generisanim vr...
ALGO
0.999452
4.714616
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2023-03-01T09:33: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": "c5ebc2d5ec1...
13ca58cf-457f-428e-8097-b547ffbc5a4e
H0Kyun/CodingTest
SWExpertAcademy/D3/2805(농작물 수확하기).cpp
// 문제 출처: https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV7GLXqKAWYDFAXB #include<iostream> #include<vector> using namespace std; int main(int argc, char** argv) { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int testCase, T; cin >> T; for...
ALGO
0.999911
4.858268
{ "github_metadata": { "branch": "master", "commit_count": 522, "repo_created_at": "2021-01-16T17:12: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": "e9d45108...
52ad5252-a7a9-4cb2-bece-978b97de509e
0qinghao/VTM_RMED
.history/source/Lib/EncoderLib/IntraSearch_20210314230610.cpp
/* The copyright in this software is being made available under the BSD * License, included below. This software may be subject to other third party * and contributor rights, including patent rights, and no such rights are * granted under this license. * * Copyright (c) 2010-2021, ITU/ISO/IEC * All rights reserve...
ALGO
0.999133
6.851433
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-05-25T02: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": "04d9a6c7c887...
a09fe2be-ec96-4edc-a0b3-73ab29fd64c5
tienanhnguyen191999/FinalContest_CTDL_GT
13/main.cpp
#include <iostream> #include <cstring> using namespace std; // Trầu bò: Tìm full hoán vị => min int cx[100],n = 5,minn =100000; char mang[10][30] = {"ABC","ABEF","DEF","ABCDE","FGH"}; char save[10][30]; void init(){ for (int i = 0 ; i < n ; i++){ cx[i] = 1; } } void solve(){ int c = 0; for (int ...
ALGO
0.999947
3.176852
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-05-23T00:27: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": "8562d76a2...
f72d8e57-e98c-4677-ba67-431b16702af5
DaniDiazTech/notebook
Graphs/General Graphs/dijkstra (distance list).cpp
// This algorithm returns a list with minimum distances from start to all nodes // Time complexity: O(|E| log |V|) // Space complexity: O(|V| + |E|) // E = edges, V = vertices // Requires: inf // Edges should be represented as: pair<node, dist> template<typename DT> vector<ll> dijkstra(vector<vector<pair<int, DT>>> &...
ALGO
0.999892
6.329633
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2024-04-05T05:21: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": "b3db894738f...
66f6a13a-310d-4761-bbff-0227ad426470
shurik111333/spbu
olympic/classwork/02.10.15_dp/ProjectF/ProjectF/ProjectF.cpp
// ProjectF.cpp: определяет точку входа для консольного приложения. // #include <fstream> using namespace std; long long max(long long a, long long b) { if (a > b) return a; return b; } int main() { ifstream fin("lcs.in"); ofstream fout("lcs.out"); int n = 0, m = 0; fin >> n; int *a = new int[n + 1]; for ...
ALGO
0.99995
3.898569
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2015-10-01T20:55: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": "260f078e...
22a9c209-772e-495e-8985-72bd9d75c2e8
johnnyoh555/Baekjoon
24.04-2/2138_전구와 스위치.cpp
// https://www.acmicpc.net/problem/2138 #include <iostream> #include <cmath> using namespace std; string be0, be1, af; int N, a, b = 1; void ft0(int i) { be0[i - 1] = be0[i - 1] == '0' ? '1' : '0'; be0[i] = be0[i] == '0' ? '1' : '0'; if (i != N - 1) be0[i + 1] = be0[i + 1] == '0' ? '1' : '0'; } void ft1(int i) { ...
ALGO
0.999971
3.8126
{ "github_metadata": { "branch": "main", "commit_count": 278, "repo_created_at": "2024-01-18T08:04: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": "3f9f945ea8...
8a4a2320-9db1-4e69-834e-2105a7848683
ljanyst/udacity-particle-filter
src/main.cc
//------------------------------------------------------------------------------ // Author: <NAME> <<EMAIL>> // Date: 11.05.2017 //------------------------------------------------------------------------------ #include <iostream> #include <ctime> #include <iomanip> #include <random> #include <sstream> #include <arra...
ALGO
0.986441
6.231141
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-05-12T09:48: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": "0ecc464284...
0a62a446-92bd-4be6-8374-c9a7ad8e8121
kylemcdonald/ofxAssignment
example-3d/src/main.cpp
#include "ofMain.h" #include "ofxAssignment.h" class ofApp : public ofBaseApp { public: ofEasyCam cam; ofxAssignment solver; vector<ofVec3f> initial, grid; void setup() { int side = 12; int n = side * side * side; // first, generate some data on a random walk modulo one...
ALGO
0.999385
5.385743
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-01-24T00:27:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 64, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60ec3766...
4f5e2d26-04fc-4fb0-8f7e-7f425484980f
JoshIQui/3DRenderer
AABB.cpp
#include "AABB.h" #include <iostream> AABB::AABB(Transform* transform, std::vector<Vertex> verts, int numVerts, bool isActive) { this->isActive = isActive; min = verts[0].Position; max = verts[0].Position; for (int i = 1; i < numVerts; i++) { min.x = fmin(verts[i].Position.x, min.x); max.x = fmax(verts[i].P...
ALGO
0.980224
5.431348
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-03-22T01:09: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": "29df71f9bb92...
a1593280-7411-4ed5-81fa-06f287c5d35e
prabhjotSingh2002/DSA
stack/narsimha/prog3.cpp
//postfix evaluation using stack #include<iostream> using namespace std; class Stack { typedef struct Node { int data; struct Node *next; } Node; Node *top; public: Stack() { top=NULL; } void push(int data) { Node *n=new Node(); ...
ALGO
0.999885
4.055502
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-10-24T07:12: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": "c6323d1a41a...
df4ddd71-da51-4d18-a4d6-3ada152707a8
KishoreKarikalan/KLA_Workshop
Milestone2/milestone2.cpp
#include <iostream> #include <vector> #include <cmath> #include <queue> #include <set> #include <utility> #include <fstream> using namespace std; #define ll long long int #define vi vector<int> float extract(string s){ auto pos = s.find(':'); s = s.substr(pos+1); return stof(s); } vector<float> extract...
ALGO
0.999244
4.348957
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-01-11T17:09: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": "b96b244590d7...
184c2a11-83aa-4398-9362-aa53a99ab253
singharpit94/SAS
C++_Files/rearrangealternate.cpp
// C++ program to rearrange an array in minimum maximum form // using O(1) space. #include <bits/stdc++.h> using namespace std; // Puts max at first position, min at second position // second max at third position, second min at fourth // position and so on. void rearrange(int arr[], int n) { // Traverse through ...
ALGO
0.999995
5.26761
{ "github_metadata": { "branch": "master", "commit_count": 208, "repo_created_at": "2015-10-21T07:28:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "334f531...
ea8ac880-4a2a-4281-acab-5fa9e317621b
tmichi/sdt
include/GMatrix.h
/* Copyright (C) 1997,1998,1999,2000,2002 <NAME>, Eiwa System Management, Inc. <NAME>, The University of Tokyo This program is free software. Implemented by <NAME>(<EMAIL>) and <NAME>(<EMAIL>) conforming to the Java(TM) 3D API specification by Sun Microsystems. Permission to use...
ALGO
0.9942
4.442754
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2018-04-10T00:45: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": "531c23cfe...
beebd586-9276-4a21-a110-487ea93fadf4
FellipePatrick/CPPDOC
algoritmos/Lista 3 - Alessandra/exe2.cpp
#include <iostream> using namespace std; int main() { int numero, soma = 0; cout << "Digite um número inteiro maior do que zero: "; cin >> numero; if (numero <= 0 || numero > 99999) { cout << "Número inválido." << endl; return 0; } // seguindo o exemplo com 281 o resultad...
ALGO
0.999422
4.879216
{ "github_metadata": { "branch": "main", "commit_count": 72, "repo_created_at": "2023-03-20T14:57:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb876e3ec84...
2f85faf7-4e55-41ec-a19b-bde1ec8af79b
cseshamim47/competitive-programming
2024/Platform Wise/LightOJ/Searching/Get the Containers.cpp
#include <bits/stdc++.h> using namespace std; #define endl "\n" bool f(int mid, vector<int> &v, int m) { int sum = 0; for(auto x : v) { if(mid < x) return false; if(sum + x <= mid) { sum += x; }else { m--; sum = x; } }...
ALGO
0.99997
4.275626
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-10-03T10: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": "dcff5517a2...
d79c99f0-8196-40af-9a9b-77b90605c8a1
TechGeek3/GDSC_DSA
Trees_week9/print_all_nodes_without_sibling.cpp
//Given a Binary Tree of size N, find all the nodes which don't have any sibling. You need to return a list of integers containing all //the nodes that don't have a sibling in sorted order. //Note: Root node can not have a sibling so it cannot be included in our answer. #include<bits/stdc++.h> using namespace std; s...
ALGO
0.999549
4.437458
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2021-10-01T19:34: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": "9b28e4736bd...
f6323f75-c252-42b7-92e2-021a7d0ccdf7
MyCodeBattle/LeetCode
Minimum Window Substring/solution.cpp
/* * 先统计一下t里面各种字符的个数,然后用两个指针在s里找。 * 当l指针的个数超过原本的个数时,我们接下来的串都是非法的,所以我们就一直推进l指针,直到再次和原本的个数相等。然后推进r指针,以此类推。 */ class Solution { public: string minWindow(string s, string t) { int cnt[200] = {0}, cur[200] = {0}; if (s.empty()) return ""; int all_num = 0, cur_num = 0; for ...
ALGO
0.999997
6.258926
{ "github_metadata": { "branch": "master", "commit_count": 305, "repo_created_at": "2015-11-07T15:45:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f5b548e5...
13f57f68-769a-4a19-be34-2291c48be673
hcmlab/ssi
libs/build/openSMILE-2.2rc1/src/other/maxIndex.cpp
/*F*************************************************************************** * openSMILE - the open-Source Multimedia Interpretation by Large-scale * feature Extraction toolkit * * (c) 2008-2011, <NAME>, <NAME>, <NAME>: TUM-MMK * * (c) 2012-2013, <NAME>, <NAME>, <NAME>: TUM-MMK * * (c) 2013-2014 audEERING ...
ALGO
0.924684
6.455359
{ "github_metadata": { "branch": "master", "commit_count": 342, "repo_created_at": "2017-02-22T10:17:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 62, "forks": 26, "issues": 7, "pull_requests": 1 }, "file_meta": { "content_id": "f529e3d...
09823f72-90aa-4b0a-8e08-00a744215d58
CSUwangj/LeetCode
Range Sum Query - Mutable.second.cpp
#include<bits/stdc++.h> #define LL long long #define mk(a,b) make_pair(a,b) #define ULL unsigned long long #define mem(a,n) memset(a,n,sizeof(a)) #define lowbit(x) ((x)&(-x)) using namespace std; class NumArray { vector<int> val; vector<int> lazy; int operation_begin; int operation_end; int size; void buil...
ALGO
0.99997
6.063597
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2020-10-10T01:43: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": "f55bbcf2d...
21246af7-ffe4-4114-be2e-380e85164611
ducanhkl/algorithm
codeforces/583/D/main.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 101; const long long maxc = INT_MAX; int n, t; int a[maxn]; struct matrix { long long a[maxn][maxn]; void reset() { for (int i = 0; i < maxn; i++) for (int j = 0; j < maxn; j++) a[i][j] = -maxc; } }; ...
ALGO
0.99997
3.696994
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2019-05-27T16:26:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "718519050...
db4fc859-3c06-43a9-914a-5ba3589ea656
wangxianghust/leetcode
220ContainDup3.cpp
/* 给定一个数组,问是否存在两个数的值差最多为t,下标距离最大为k * Solution:借助桶排序的思想,设置桶的大小为 t+1,同时维护一个map的大小为k, * 判定条件是在相同的桶内,或者旁边的桶内同时差值不超过k。 */ #include <iostream> #include <vector> #include <unordered_map> using namespace std; class Solution { public: bool containsNearbyAlmostDuplicate(vector<int>& nums, int k, int t) { if(t<...
ALGO
0.999733
5.503463
{ "github_metadata": { "branch": "master", "commit_count": 268, "repo_created_at": "2017-03-05T08:48:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "948a04da...
0d5f3877-a049-4884-b429-f795ab652465
Mujahid2923/Leetcode
17_BinaryTree_1.cpp
Problem_1 : ----------- https://leetcode.com/problems/binary-tree-inorder-traversal/ class Solution { void Fun( vector< int >& v, TreeNode* root ) { if( root == NULL ) return ; Fun( v, root -> left ) ; v.push_back( root -> val ) ; Fun( v, root -> right ) ; } public: ve...
ALGO
0.999989
6.381667
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2020-11-07T13:23:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "52323d4a1b1...
a8635289-5ee6-429c-8a37-47a39c40d9d7
Ryman9/Conversion-of-Context-Free-Grammar-to-Push-Down-Automata
pushdown.cpp
#include "pushdown.hpp" using namespace std; // Function to read grammar from file. void pushdown::read_input(string filename) { fstream input(filename); if(!input.is_open()) { cout << "No file found!" << endl << endl; } char variable; string temp, production; while (get...
ALGO
0.997391
3.723685
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-08-30T18:06: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": "20a09b13956d...
d04669c1-74ef-4733-8a77-d5e0dc5ec9fb
stdcyanout/online-judge
NCOJ/854.cpp
#pragma GCC optimize("O3,unroll-loops") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define fastio ios_base::sync_with_stdio(false),cin.tie(0); #define safe cerr << "\e[1;31m" << __PRETTY_FUNCTION__ << " line " << __LINE__ << " safe\e[0m\n"; #define int int64_t...
ALGO
0.999459
4.631219
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-01-10T16:16:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "25ae2d4f1d2...
d1aed3fb-6712-4d1a-8e36-fa20b981f22a
DevM4rk/algorithm-Baekjoon-OJ
programmers/2022_10/블록 이동하기.cpp
#include <bits/stdc++.h> using namespace std; struct Node{ int cnt; int x; int y; int dir; }; int n; int vis[101][101][4]; //0상,1우,2하,3좌 시계방향 int dx[] = {-1, 0, 1, 0}; //위에 맞춰서 시계방향으로 int dy[] = {0, 1, 0, -1}; int solution(vector<vector<int>> board) { n = board.size(); queue<Node> q...
ALGO
0.999985
5.024629
{ "github_metadata": { "branch": "master", "commit_count": 303, "repo_created_at": "2020-07-04T23:12: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": "a35999ed...
04946f27-aed8-426f-8927-015431ad3b3b
jmand626/Multithreaded-WebServer
HttpConnection.cc
/* * Copyright ©2024 <NAME>. All rights reserved. Permission is * hereby granted to students registered for University of Washington * CSE 333 for use solely during Autumn Quarter 2024 for purposes of * the course. No other use, copying, distribution, or modification * is permitted without prior written consent...
WEB
0.970975
5.94691
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-07-13T06:10: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": "c196f66f65bb...
5b14eb95-124e-4a06-ab41-2785190b1f64
ishandutta2007/codeforces-b
beyondheaven/normal/1019/E.cpp
#include <bits/stdc++.h> const int MaxN = 2e5 + 5; using ll = long long; using data = std::pair<ll, ll>; data operator + (const data &a, const data &b) { return { a.first + b.first, a.second + b.second }; } data operator - (const data &a, const data &b) { return { a.first - b.first, a.second - b.second }; } bool comp(...
ALGO
0.999923
4.12542
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a10767cbfa3f...
5b55aa43-b1d6-4c24-bed7-ac4cc352bff6
cucumbar/Programming
Practice/38/c++/38/main.cpp
#include <iostream> #include <set> #include <sstream> #include <istream> #include <vector> #include <string> #include <algorithm> class Rational { public: Rational() { num = 0; den = 1; } Rational(int numerator, int denominator) { num = numerator; den = (num == 0) ? 1 : den...
ALGO
0.997126
4.939241
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2020-09-20T10:22:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1042cb1f8...
b3d74894-27c6-432e-b55a-55e9a021a482
Azad88101/DSA_Practice
inCppByLov/7 Basic_Mathemetics_for_Dsa/Optimisezed_PrintAllPrimes_LikeFinding.cpp
// #include <iostream> // #include <vector> // using namespace std; // vector<bool> Sieve(int n) // { // vector<bool> sieve(n + 1, true); // sieve[0] = sieve[1] = false; // int i = 2; // while (i <= n) // { // if (sieve[i] == true) // { // int j = i * 2; // ...
ALGO
0.999307
5.310232
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2024-11-10T02: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": "60042f5d546...
24fb66c9-ea2b-40ab-9be4-eebd0a342200
kothariji/competitive-programming
A2OJ/B/B_Little_Girl_and_Game.cpp
#include <bits/stdc++.h> #define mod 1000000007 #define lli long long int #define endl '\n' #define deb(x) cout << #x << '=' << x << '\n' #define deb2(x, y) cout << #x << '=' << x << ',' << #y << '=' << y << '\n' #define deb3(x, y, z) cout << #x << '=' << x << ',' << #y << '=' << y << ',' << #z << '=' << z << '\n' #def...
ALGO
0.999995
3.957579
{ "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": "71c...
c94a83a3-2ac3-4afd-b23a-6912db084654
chrisyjwai/cmpsc121
workspace/tutorial/refFunc.cpp
// Practice with Functions // <NAME> Fall 2013 // // This tutorial assignment will practice the declaration // and inplementation of simple functions with reference parameters. // For simplicity, and to remove the extra time to define function prototypes, // the main() function will be left at the bottom of this progr...
ALGO
0.99745
5.496577
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-11-02T00:41: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": "6ece0e7912...
b47d0a4f-634f-47c0-bd1f-c66882f40684
ankivStar/Data-Structure-and-Algorithms
14_Assignment_Trees/1_count_nodes_greater_thanX.cpp
#include<iostream> using namespace std; #include<queue> #include <vector> #include "..\14__Trees\02__Tree_Node.h" TreeNode<int> *takeInput(){ int rootData; cin >> rootData; TreeNode<int> *root = new TreeNode<int>(rootData); queue<TreeNode<int> *> pendingNodes; pendingNodes.push(root); while(!...
ALGO
0.999931
4.404475
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-05-09T19:45: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": "ad36e0c39c...
7f31131a-8335-4147-a213-01a200dc7989
Pepephant/GRMDB
src/index/ix_index_handle.cpp
/* Copyright (c) 2023 Renmin University of China RMDB is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRAN...
ALGO
0.996933
4.620381
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2024-09-04T06:13: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": "15b5b3f79c7...
63e706fa-3af3-4415-b0ea-8fc2fa6241a9
JumHorn/leetcode
Cplus/CountofIntegers.cpp
#include <algorithm> #include <string> using namespace std; class Solution { public: int count(string s1, string s2, int min_sum, int max_sum) { int dp[410][24][2][2] = {0}; int size = max(s1.size(), s2.size()); // add prefix zero to s1,s2 s1 = string(size - s1.size(), '0') + s1; s2 = string(size - s2.size...
ALGO
0.999888
5.636471
{ "github_metadata": { "branch": "master", "commit_count": 4156, "repo_created_at": "2016-11-25T07:28:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c30c61a...
345d3d9d-e250-48f4-9cc8-6edb6fe05ebd
swri-robotics/marti_common
swri_geometry_util/src/polygon.cpp
// ***************************************************************************** // // Copyright (c) 2014, Southwest Research Institute® (SwRI®) // 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.99745
6.584567
{ "github_metadata": { "branch": "ros2-devel", "commit_count": 721, "repo_created_at": "2014-12-04T15:29:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 55, "forks": 70, "issues": 9, "pull_requests": 1 }, "file_meta": { "content_id": "356...
68981d2c-440e-4700-8324-3919f691505c
kwh950724/lidar_lane_detector
src/lidar_lane_detector.cpp
#include "lidar_lane_detector.h" LaneDetector::LaneDetector(void): private_nh_("~") { initParams(); init(); std::cout<<"INITIALIZING LIDAR LANE DETECTOR NODE."<<std::endl; } void LaneDetector::init(void) { cloud_sub_ = nh_.subscribe("/points", 1, &LaneDetector::cloudCallback, this); cloud_pub_ = nh_.advertise<s...
TOOL
0.912944
5.542479
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-02-18T12:42:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 44, "forks": 9, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "e292f1a77...
77017c75-dec9-4880-a9e8-f5672e9b39bc
kitsas151/siemens_poc
syntaxhelloworld/a47mapexample.cpp
#include <iostream> #include <map> #include <string> int main() { std::map<std::string, int> wordFrequency; wordFrequency["this"] = 5; wordFrequency["is"] = 3; wordFrequency["a"] = 2; // Accessing values using [] int value = wordFrequency["this"]; std::cout << "Value of key \"this\": " << ...
TOOL
0.996864
4.761926
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2024-05-27T04:36:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8bf175760e7...
9fb2ed7a-959d-49b3-90b3-e753f0bf51d4
SaatoruGojo/DSA-GFG
Recursion/quickSort.cpp
#include <iostream> using namespace std; int partition(int a[], int s, int e) { // Let Pivot int pivot = a[s]; // count element smaller than pivot int count = 0; for (int i = s + 1; i <= e; ++i) { if (a[i] <= pivot) ++count; } // swap pivot after that number of sm...
ALGO
0.999973
5.280702
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2022-08-25T06:51:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b19b60309...
48750bf3-9759-42e7-82be-9c1db98f6e62
EmelyanovAlexey/Paralel
task_3/paralel3.cpp
#include <iostream> #include <cstring> #include <cmath> #include <chrono> #include <iomanip> #include <stdlib.h> #include <openacc.h> #include <cublas_v2.h> // края рамок constexpr double ANGLE1 = 10; constexpr double ANGLE2 = 20; constexpr double ANGLE3 = 30; constexpr double ANGLE4 = 20; constexpr double negOne = -1...
ALGO
0.999554
4.385077
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2023-02-10T04:41: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": "83bc7b979...
754f7fd7-9c65-40fb-8539-db2601574860
rajatkhanna1999/CompetitiveCoding
Codechef/CCData&AlgoProgramme/BIGOF01.cpp
#include <bits/stdc++.h> #include <vector> #include <set> #include <map> #include <string> #include <cstdio> #include <cstdlib> #include <climits> #include <utility> #include <algorithm> #include <cmath> #include <queue> #include <stack> #include <iomanip> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tr...
ALGO
0.999977
4.007389
{ "github_metadata": { "branch": "master", "commit_count": 100, "repo_created_at": "2019-06-01T10:39:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f0d3d84...
437a2594-16d4-473d-b3dd-5de526648319
shichaog/WebRTC-audio-processing
webrtc-audio-processing/webrtc/modules/audio_processing/beamformer/array_util.cc
/* * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
ALGO
0.998623
6.468135
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2017-09-01T11:27:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 398, "forks": 140, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "ad4ec...
a2f56097-b43c-4e9c-9dcb-e2d434128022
mitsiu-carreno/le_jeu_de_la_vie
src/grid.cpp
#include "cell.hpp" #include "windowLength.hpp" #include "grid.hpp" #include <iostream> #include <vector> namespace Grid { std::vector<std::vector<cell::Cell>> Initialize_Grid (){ std::array<int,2> tamanio_grid=GetGridSize ( ); int side_grid = tamanio_grid[0]; //int size_grid = side_grid * side_grid; std::ve...
ALGO
0.984993
4.619073
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2020-08-08T00:27:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "4d0136a7a...
c82d2262-e6b4-41a1-8f98-a3c3b51e7da5
tyabus/xray-2.0
xray/editor/world/sources/terrain_modifier_raise_lower.cpp
//////////////////////////////////////////////////////////////////////////// // Created : 23.12.2009 // Author : <NAME> // Copyright (C) GSC Game World - 2009 //////////////////////////////////////////////////////////////////////////// #include "pch.h" #include "terrain_modifier_raise_lower.h" #include "collision_ob...
TOOL
0.920199
5.864385
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-05-23T16:00:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8ee6bcbcc8...
34136caf-6633-4685-a876-7444a31de1a7
M-Awwab-Khan/Competitive-Programming
kattis-gamerank.cpp
#include <bits/stdc++.h> using namespace std; #define f first #define s second #define ll long long #define pii pair<int, int> #define pll pair<long long, long long> #define vi vector<int> #define vll vector<long long> #define vc vector<char> #define vs vector<string> #define mii map<int, int> #define si set<int> #defi...
ALGO
0.999985
3.826435
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2025-01-20T03:57:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb16785d1b7...
ff0fbcc6-6462-4326-a970-92949cc18fa9
SeanXunX/DS-PJ-Map
src/KDTree.h
#pragma once #include <algorithm> #include <vector> #include <array> #include "Node.h" #include <memory> #include <limits> #include <fstream> class KDNode { friend bool operator==(const KDNode &n1, const KDNode &n2); using node_t = KDNode; using node_ptr_t = std::shared_ptr<node_t>; public: std::arra...
ALGO
0.995876
5.549468
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2024-11-07T06:32: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": "ef676185071...
69987a85-19c9-43dd-9beb-9cee1b473e45
checkoutb/LeetCodeCCpp
daily_challenge/2022/LT_2022-06-26_1423._Maximum_Points_You_Can_Obtain_from_Cards.cpp
#include "../../header/myheader.h" class LT { public: // D D //Runtime: 54 ms, faster than 98.82 % of C++ online submissions for Maximum Points You Can Obtain from Cards. //Memory Usage : 42.4 MB, less than 80.56 % of C++ online submissions for Maximum Points You Can Obtain from Cards. int lta(vector<in...
ALGO
0.999979
5.213683
{ "github_metadata": { "branch": "master", "commit_count": 285, "repo_created_at": "2019-04-22T09:20: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": "1ffce4ed...
d5b9cc46-7822-4007-973c-94c33a5e8c35
Volverman/procon-archive
atcoder.jp/arc019/arc019_2/Main.cpp
#include <bits/stdc++.h> #define REP(i, n) for(int i = 0; i < n; i++) #define REPR(i, n) for(int i = n; i >= 0; i--) #define FOR(i, m, n) for(int i = m; i < n; i++) #define INF 2e9 #define MOD 1000000007 #define ALL(v) v.begin(), v.end() #define sz(x) int(x.size()) using namespace std; typedef long long ll; using P = p...
ALGO
0.999927
3.239642
{ "github_metadata": { "branch": "master", "commit_count": 652, "repo_created_at": "2020-09-10T00:09: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": "f138ec4a...
7af5dc43-34b1-43ef-aa48-c604d8b1d122
jucanik/CycleInGraph
CYCLEDIRECTEDGRAPH.cpp
// CYCLEDIRECTEDGRAPH.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> using namespace std; #include<list> struct Edge { int src; int dest; }; void addedge(list<int>* adj, int v1, int v2) { adj[v1].push_back(v2); adj[v2].push_back(v1); } bool cycle(list<i...
ALGO
0.999901
4.440325
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-11-08T17:40:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e3a80e938...
2443b56a-0fa7-42eb-9394-55947606ff4c
Danny246/Flaming-Robot-Battle-Nuke-Car
smarter_anticrash/smarter_anticrash.ino
#include <NeoPixelAnimator.h> #include <NeoPixelBrightnessBus.h> #include <NeoPixelBus.h> #include <Servo.h> //servo library Servo myservo; // create servo object to control servo #define colorSaturation 128 const uint16_t pixelCount = 24; const uint8_t pixelPin = 2; int pixelBrightness = 20; //scale from 0 to 128 N...
ALGO
0.972795
4.625835
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-07-04T14:02:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b81baa82ee...
29194301-f007-4bff-a78a-44b8554b771b
The-OpenROAD-Project/OpenROAD
src/drt/src/gr/FlexGRWavefront.h
// SPDX-License-Identifier: BSD-3-Clause // Copyright (c) 2019-2025, The OpenROAD Authors #pragma once #include <bitset> #include <memory> #include <queue> #include <vector> #include "dr/FlexMazeTypes.h" #include "frBaseTypes.h" #include "global.h" namespace drt { class FlexGRWavefrontGrid { public: FlexGRWavefr...
ALGO
0.995256
6.73628
{ "github_metadata": { "branch": "master", "commit_count": 31212, "repo_created_at": "2019-10-28T17:48:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2056, "forks": 696, "issues": 386, "pull_requests": 61 }, "file_meta": { "content_id": ...
e12f8dc3-0b75-49fa-92fd-9f3497a9b698
niuxu18/logSurvey
data/crawl/make/old_hunk_743.cpp
FILENAME and LINENO are the filename and line number in the current makefile. They are used for error messages. Value is -1 if the line is invalid, 0 if following text should be interpreted, 1 if following text should be ignored. */ static int conditional_line (char *line, const struct floc *flocp) {...
TOOL
0.957244
3.552882
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2018-02-25T03:10:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de2cb605a...
5a5de879-fbb7-4f44-bbc0-c3ab96ed0bc8
AdnanMuzavor/PDS
Graph/Breadth First Search/BFS.cpp
/* BFS trversal using STRIVER's sheet */ #include <iostream> #include <bits/stdc++.h> using namespace std; vector<int> dfsfn(vector<int> adj[], int n) { cout << "Inside fn" << endl; vector<int> vis(n + 1, 0); vector<int> dfs; for (int i = 1; i <= n; i++) { // Visiting node only if not vis...
ALGO
0.999938
5.002149
{ "github_metadata": { "branch": "master", "commit_count": 126, "repo_created_at": "2022-01-11T06:39:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b1aa25c4...
cf5eca00-8d34-4afb-a866-1bdeac520c65
Rfinazzo4/Intro-to-Comp-Sci-II
HW9 recursion/main.cpp
/* * File: main.cpp * Author: <NAME> * Created on January 5th 2017 * */ //System Libraries #include <iostream>//Input output stream library using namespace std; //iostream uses standard namespace // User libraries // Global constants // Function prototypes bool isMember(int[], int, int); // Execution begin...
ALGO
0.999223
3.790377
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-11-20T23:41: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": "cb720ff6fd...
03a14d42-cb2c-4f6a-8bc4-3b01fc39d8ff
kamyu104/LeetCode-Solutions
C++/process-restricted-friend-requests.cpp
// Time: O(n * (alpha(n) + r)) = O(n * r) // Space: O(n) class Solution { public: vector<bool> friendRequests(int n, vector<vector<int>>& restrictions, vector<vector<int>>& requests) { vector<bool> result; UnionFind uf(n); for (const auto& request : requests) { int pu = uf.find...
ALGO
0.999889
6.02364
{ "github_metadata": { "branch": "master", "commit_count": 19395, "repo_created_at": "2018-10-11T17:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4939, "forks": 1616, "issues": 1, "pull_requests": 55 }, "file_meta": { "content_id": ...
4c35901f-5583-4aaa-96e4-94bdbfc12651
Tencent/TencentKona-8
hotspot/src/os/posix/vm/os_posix.cpp
/* * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free S...
TOOL
0.939554
5.780313
{ "github_metadata": { "branch": "master", "commit_count": 49841, "repo_created_at": "2019-11-01T05:02:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 982, "forks": 148, "issues": 7, "pull_requests": 7 }, "file_meta": { "content_id": "d68...
e4d5bab0-c3c3-424d-80fb-aad720b88164
morukutsu/theabyss
mkengine/generic/MathTools.cpp
// mkengine // by morukutsu (<EMAIL>) #include "MathTools.h" #include <assert.h> void Vec_normalize(vec3_t v) { float mag = sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]); if(mag > 0.0f) { v[0] = v[0]/mag; v[1] = v[1]/mag; v[2] = v[2]/mag; } } void Quat_computeW (quat4_t q) { float t = 1.0f - (q[X] * q[X]) - (q...
ALGO
0.995937
5.982119
{ "github_metadata": { "branch": "master", "commit_count": 101, "repo_created_at": "2013-02-22T09:18: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": "01f483f6...
02dc325b-d464-47ae-8085-e318cc11fceb
alexandraback/datacollection
solutions_1485490_0/C++/PlutoShe/C.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <memory> #include <cstring> #include <string.h> using namespace std; const int maxn = 110; long long int a[maxn], b[maxn], c[maxn], d[maxn]; long long int cost[maxn][maxn], now,f[maxn][maxn][maxn], g[maxn][maxn], ff[maxn][maxn]; int test, n, m; long l...
ALGO
0.999862
3.020967
{ "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": "766c2806c...
530ebdce-ca46-4106-b09d-5b1157180434
ishandutta2007/codeforces-n
natsugiri/normal/1182/D.cpp
#include<map> #include<stdio.h> #include<iostream> #include<vector> #include<algorithm> #include<string> #include<string.h> #ifdef LOCAL #define eprintf(...) fprintf(stderr, __VA_ARGS__) #else #define NDEBUG #define eprintf(...) do {} while (0) #endif #include<cassert> using namespace std; typedef long long LL; type...
ALGO
0.999141
3.976506
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:35: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": "8275f10508a8...
1fe9e0e6-277d-429c-9e1d-174aed29bdcd
ayushinegi/DAA-
Week 1/Problem 1/Problem1.cpp
#include <bits/stdc++.h> using namespace std; int main() { freopen("input.txt", "r", stdin); // input will be taken from input.txt file; freopen("output.txt", "w", stdout); // output will be stored in output.txt file. int t; cin >> t; while (t--) { int n, x, count; cin >> n; ...
ALGO
0.999743
3.93523
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-07-28T13:13: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": "fe1141d09e34...
b2289e87-b8f3-4306-8448-c07b48ccc346
STRUKTUR-DATA-SE-07-02/Modul-5
2311104060_Aulia Jasifa Br Ginting/Unguided/singlelist.cpp
#include "singlelist.h" #include <iostream> using namespace std; void createList(List& L) { L.first = NULL; } address alokasi(int x) { address P = new elmlist; P->info = x; P->next = NULL; return P; } void insertFirst(List& L, address P) { P->next = L.first; L.first = P; } void deleteFir...
ALGO
0.930691
4.236985
{ "github_metadata": { "branch": "main", "commit_count": 312, "repo_created_at": "2024-10-24T13:08:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "67106c3c834...
40c2df83-f384-40f6-aa58-0a1cd291be49
Hunterdii/GeeksforGeeks-POTD
March 2025 GFG SOLUTION/March-11.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: long long countWays(int n) { long long a = 1, b = 1; for (int i = 2; i <= n; i++) tie(a, b) = make_tuple(b, a + b); return b; } }; 2) class Solution { publ...
ALGO
0.999934
5.638158
{ "github_metadata": { "branch": "main", "commit_count": 3732, "repo_created_at": "2024-03-09T09:48:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 202, "forks": 54, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "72177a...
5db8ce4f-98ee-49be-a8f5-6b4a952a5a54
hust220/nsp
src/jnc/dca/dca_mf.cpp
#include "dca_mf.hpp" namespace jian { namespace dca { REG_DCA_FAC("mf", MfDca); MfDca::MfDca() : Dca() {} MfDca::MfDca(S mol_type, float pw) : Dca(mol_type, pw) {} void MfDca::calculate_C() { int i, j, k, l; C = Matf::Zero(M * (q - 1), M * (q - 1)); for (i = 0; i < M; i++)...
ALGO
0.999658
4.868411
{ "github_metadata": { "branch": "master", "commit_count": 318, "repo_created_at": "2015-07-22T07:34:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 3, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "29af863...
951372e9-0d58-4286-9c0f-92f2f8a64b88
paulmedeiros92/Advent-Of-Code-2020
Day 11/Day 11/Day 11.cpp
#include <string> #include <vector> #include <iostream> #include <fstream> #include <chrono> #include <regex> #include <algorithm> using namespace std; const int PADDING = 100; int countAdjacentSeats(vector<string> rows, int row, int col, int range, char ch) { string adjacent = rows[row].substr(col - range, range) ...
ALGO
0.999463
6.322825
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2020-12-02T16:42: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": "2c2ef3a934a...
47fce089-bde8-4c6e-b20f-f42f6c5913f1
agublazer/Discretas-3
vallas.h
#include<iostream> #include<string> using namespace std; class vallas{ private: int clave; public: vallas(int c) { clave=c; } string cifrar(string &msj1) { while(msj1.size()<clave) { msj1+="w"; } int n = clave; while(msj1.size()>n) ...
ALGO
0.999771
3.374906
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2016-04-01T22:04: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": "f69021e68...
2ddac9cb-b43d-43b0-87b9-892bb9b3f577
Simple-Robotics/proxsuite
include/proxsuite/proxqp/sparse/helpers.hpp
// // Copyright (c) 2022 INRIA // /** \file */ #ifndef PROXSUITE_PROXQP_SPARSE_HELPERS_HPP #define PROXSUITE_PROXQP_SPARSE_HELPERS_HPP #include <Eigen/Sparse> #include <proxsuite/helpers/optional.hpp> #include <proxsuite/linalg/veg/vec.hpp> #include <proxsuite/proxqp/sparse/fwd.hpp> #include <iostream> namespace prox...
ALGO
0.999847
6.575107
{ "github_metadata": { "branch": "devel", "commit_count": 2050, "repo_created_at": "2022-05-05T16:01:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 479, "forks": 61, "issues": 17, "pull_requests": 1 }, "file_meta": { "content_id": "5c386...
552ecda5-cfaa-4aae-b23b-3977e58100c4
ishandutta2007/codeforces-f
flashmt/normal/1718/B.cpp
#include <bits/stdc++.h> #ifdef LOCAL #include "Debug.h" #else #define debug(...) 42 #endif using namespace std; const int N = 44; int main() { vector<long long> fib(N), sumFib(N); fib[0] = fib[1] = 1; sumFib[0] = 1; sumFib[1] = 2; for (int i = 2; i < N; i++) { fib[i] = fib[i - 1] + fib[i - 2]; sum...
ALGO
0.999956
4.270387
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c7cb281e0ea...
f5fe385a-d116-4a34-a8b8-321ee9a3d405
arangodb/arangodb
3rdParty/boost/1.78.0/boost/compute/algorithm/stable_sort.hpp
//---------------------------------------------------------------------------// // Copyright (c) 2013 <NAME> <<EMAIL>> // // Distributed under 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 // // See http://boostorg.github.com/compute ...
ALGO
0.9999
7.550598
{ "github_metadata": { "branch": "devel", "commit_count": 51986, "repo_created_at": "2011-10-26T06:42:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13878, "forks": 857, "issues": 743, "pull_requests": 38 }, "file_meta": { "content_id": ...
42c9e109-9ef4-478a-839f-5299531e9a72
rk42745417/codebook
codes/Geometry/Minkowski_Sum.cpp
// If we want to calculate the minkowski sum of vectors, // sort <v_i, -v_i, v_{i + 1}, -v_{i + 1}, ...> by polar angle order // The prefiex sum of vectors is a convex polygon and is the minkowski sum // To get the new origin, compare the max (x, y) of the convex and the sum of positive (x, y) of the vectors // A, B a...
ALGO
0.999658
4.991961
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2023-08-05T10:42:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d080bd53...
b48ed253-c525-43b5-9fe1-101af03315c7
RohanSoni-02/Leetcode
regExp.cpp
class Solution { public: bool isMatch(string s, string p) { int m = s.size(), n = p.size(); vector<vector<bool>> dp(m + 1, vector<bool>(n + 1, false)); dp[0][0] = true; for (int i = 0; i <= m; i++) { for (int j = 1; j <= n; j++) { if (p[j - 1] == '*') { ...
ALGO
0.999945
5.380284
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2025-02-27T06:42: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": "9771cb9ddca...
cb425629-743f-436c-977c-87430ea0715e
T1vz/cpp-itmo-labs
lab07/ex02_quad_eq/ex02_quad_eq/main.cpp
#include <iostream> using namespace std; struct QuadEqSolution { float x1, x2; }; QuadEqSolution quEqRoots(float a, float b, float c) { float d = b * b - 4 * a * c; float x1 = (-b + sqrt(d)) / 2 / a; float x2 = (-b - sqrt(d)) / 2 / a; return QuadEqSolution {x1, x2}; } int main() { float a, ...
ALGO
0.997783
4.402108
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2022-10-01T07:34:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7b55e547...
ef9e2e8d-cd29-4102-a6a9-f2678931542a
barkhayadav12/Striver-SDE-Sheet-Challenge
Day 8 Greedy Algorithm/q4_minimum_platforms.cpp
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <map> #include <stack> #include <utility> #include <queue> #include <unordered_map> #include <math.h> using namespace std; /* Intuition: Firstly we sort the arrival and departure time independently, uske baad we compare the arrival and...
ALGO
0.999979
4.329889
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2024-06-24T16: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": "3b14476cd40...
71beb1eb-1bdb-4a6c-98ce-3fe169d258e5
Tuanpluss02/DSA-PTIT
WA_SCTDL009.cpp
#include <bits/stdc++.h> #define faster() \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define clean() cin.ignore(numeric_limits<streamsize>::max(), '\n'); #define pb push_back #define fi first #define se second #define Mod 1000000007 #define ld long double #defin...
ALGO
0.999961
3.891033
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2023-03-04T18:17:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "43d90f76034...
fd58a458-7c2b-4466-be63-c5e69bed5e03
mrpawan-gupta/DSA-inNout
1]. Data Structures./02]. 2D Arrays/Cpp/_11]_2DArray_Search.cpp
#include <bits/stdc++.h> using namespace std; int main(){ cout << "Enter the no of Row :" ; int row ; cin >> row ; cout << "Enter the no of columns :" ; int column ; cin >> column ; int arr[row][column] ; cout << "Enter the values :" ; for(int i =0 ; i < row ; i++){ for(int j=0 ;...
ALGO
0.999651
4.614625
{ "github_metadata": { "branch": "main", "commit_count": 297, "repo_created_at": "2021-08-31T18:44:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d7a546456...
aed15794-19b7-4e48-aae2-1848f1f54ff2
Shivam-2309/Coding
Codeforces/1500/PalindromeBasis.cpp
#include <bits/stdc++.h> typedef long long ll; using namespace std; #pragma GCC optimize("O3") #pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt") #ifndef ONLINE_JUDGE #define debug(x) cout<<"errr---- "<< #x <<" " <<x<<endl #define print(v) do { \ cout << "vect--" << #v << " = [ "; \ ...
ALGO
0.999905
5.038193
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-05-31T16:29: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": "8381eb505b1...
0c70de56-f9e4-4403-9725-94f14a3fd214
EnnSou/ooss-paddle2.3
paddle/phi/kernels/impl/compare_kernel_impl.h
// Copyright (c) 2022 PaddlePaddle 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
ALGO
0.961251
7.32022
{ "github_metadata": { "branch": "air", "commit_count": 35433, "repo_created_at": "2022-07-29T08:29:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56e6f123d...