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
ae078e83-120c-4e37-b398-e36ee55d7a5e
dimitris-chatz/personal
include/smartplus/Libraries/Maths/lagrange.hpp
/* This file is part of SMART+. SMART+ is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. SMART+ is distributed in the hope that it wil...
ALGO
0.998072
5.924888
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2015-06-24T14:09: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": "5c6b0fc3c...
e62544f1-adc9-4675-b55e-a992d3a5b8e2
spad1e/competitive-programming
Olympiads/TOI/TOI18_gecko/gecko.cpp
#pragma once #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double db; typedef long double ld; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<ld, ld> pld; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<ld> vld; typedef vector<pii> vpii; typedef vector<pl...
ALGO
0.999989
3.84628
{ "github_metadata": { "branch": "master", "commit_count": 220, "repo_created_at": "2024-04-05T12:40: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": "f1650ec0...
f83e9ea2-8acd-43fc-be60-14115bec2b2d
Abhishek-Pant/Data_Structure
Binary Search/13.Minimum Difference Element in a Sorted Array/13.Minimum Difference Element in a Sorted Array.cpp
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; #define ll long long int #define llu long long unsigned int #define ld long double #define ff first #define ss second #define mp(x,y) make_pair(x,y) #define pll pair<ll,ll> #define pb push_back #define sz size #defi...
ALGO
0.999389
4.058809
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-05-05T12:47:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bfa03c7c51d9...
9edae2a2-7ed9-42ae-b547-438f0d00ce5e
Lroral/lhy_first_repository
third term/dfs/maze2.cpp
#include<iostream> #include<stack> using namespace std; struct zuobiao { int x; int y; }; int p,q,minl=1000; int n=0; int sx,sy; int dx[4]={0,1,0,-1}; int dy[4]={1,0,-1,0}; int a[100][100];//1空地,2障碍 int v[100][100];//0未访问,1已访问 void dfs(int x,int y,int step) { if(x>n+1 || x<0|| y<0||y>n+1) { //i...
ALGO
0.99967
3.997847
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-06-08T12:30: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": "024bab1fc4c0...
f76a591b-b7be-47a8-b795-b150773c2c2f
olethrosdc/beliefbox
src/models/tests/transition_distribution_test.cc
// -*- Mode: c++ -*- #include "TransitionDistribution.h" #include "real.h" #include "Random.h" void DisplayTransitions(const DiscreteTransitionDistribution& kernel); int main () { int n_states = 4; int n_actions = 1; real C = 0.1; DiscreteTransitionDistribution kernel(n_states, n_actions); printf("Adding trans...
ALGO
0.915445
4.983561
{ "github_metadata": { "branch": "master", "commit_count": 1611, "repo_created_at": "2015-03-20T15:15:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 5, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "89ffd69...
625281b0-0bc7-4018-bf6b-51dc37e88221
abhishek18124/SampoornaJan2025
08 - 18th Mar/nextgreaterelementIV.cpp
class Solution { public: vector<int> secondGreaterElement(vector<int>& arr) { int n = arr.size(); vector<int> ans(n, -1); // ans[i] stores 2nd greater element to the right of arr[i] stack<int> stk1; // to track elements for which we are yet to find 1st greater stack<int> stk2; // to ...
ALGO
0.999974
5.833827
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-02-18T15:23:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1596c27d1fa...
2d755795-975d-4ced-aed0-f85e76a80ba4
bvquoc/CP-Trainning-2021
Ngay 2020-11-30/signal.cpp
/* 𝙰𝚞𝚝𝚑𝚘𝚛: 𝙱𝚞𝚒 𝚅𝚒 𝚀𝚞𝚘𝚌 */ #include <bits/stdc++.h> #define FastIO ios::sync_with_stdio(0); cin.tie(nullptr); cout.tie(nullptr); #define fi first #define se second #define FOR(i, a, b) for(int i=(a); i<=(b); i++) #define FORD(i, a, b) for(int i=(a); i>=(b); i--) #define REP(i, n) for(int i=0, _n=(n); i<_n...
ALGO
0.99978
3.69716
{ "github_metadata": { "branch": "master", "commit_count": 611, "repo_created_at": "2020-06-03T07:47:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9faebf8...
700cc1ee-2cbd-42f1-9b5f-6ff394f5f00e
ishandutta2007/codeforces-z
z18/normal/1237/D.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 3e5, inf = 1e9; int n, a[maxn + 3], top, st[maxn + 3], num[maxn + 3], b[maxn + 3], ans[maxn + 3]; int main() { scanf("%d", &n); for (int i = 1; i <= n; i++) { scanf("%d", &a[i]), a[n + i] = a[i]; } for (int i = n * 2; i > n; i--) { while (top && a...
ALGO
0.999947
3.127071
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:43: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": "3fd0963ea26d...
854f8951-07c3-47e0-9bc0-b6e99cdcf0d1
rohit236c/LEET_CODE_CHALLENGE
single_element.cpp
#include<bits/stdc++.h> using namespace std; #define MEM(a, b) memset(a, (b), sizeof(a)) #define FOR(i, j, k, in) for (int i=j ; i<k ; i+=in) #define RFOR(i, j, k, in) for (int i=j ; i>=k ; i-=in) #define REP(i, j) FOR(i, 0, j, 1) #define RREP(i, j) RFOR(i, j, 0, 1) #define MP make_pair #define PB push_back #define INF...
ALGO
0.999945
4.121586
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2020-04-02T08:24: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": "21f17fb4d...
5c95d12c-40bd-4ad8-877a-86cddbc4fa2c
BeyondCC/LeetCode
SumRootToLeaf.cpp
// Source : https://oj.leetcode.com/problems/sum-root-to-leaf-numbers/ // Author : <NAME> // Date : 2015-01-31 /********************************************************************************** * *Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An exa...
ALGO
0.99998
4.513311
{ "github_metadata": { "branch": "master", "commit_count": 215, "repo_created_at": "2014-11-01T15:57:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19d2ba92...
2f858073-a9b7-411b-a44b-859b283e894e
victhorio/dtvm
src/vm.cpp
// Copyright (c) 2017 <NAME>. All rights reserved. // Licensed under the MIT License. See LICENSE file in the project root. #include "vm.hpp" #include <iostream> #include <stack> #include <limits> #include "args.hpp" #include "error.hpp" enum state_flag { VM_FLAG_GT = 0b0100, VM_FLAG_EQ = 0b0010, VM_FL...
TOOL
0.94257
5.92476
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2017-02-07T01:06: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": "b2392c29d...
f1ce7f7e-3b15-4f93-8fab-f92ff371e29b
Rafaherrero/AED
Practica 2/vector_t.cpp
//Practica 2 AED //Vector disperso //<NAME> //vector_t.cpp #include "vector_t.hpp" #include <cstdio> #include <cmath> #include <iomanip> vector_t::vector_t(void): base_(NULL), n_(0) {} vector_t::vector_t(int n): base_(NULL), n_(n) { crea_vector(n_); } vector_t::vector_t(const vector_t& v): base_(NULL), n_(v.g...
ALGO
0.967827
4.072329
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-02-24T12:19:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "273bac6038...
48b0425b-b95e-4e33-878a-1c4ab6fadac9
gaoxiang007/chapter_nine
chapter_6/N_Queens_I.cpp
// https://oj.leetcode.com/problems/n-queens/ class Solution { public: vector<string> drawChessBoard(const vector<int>& C) { vector<string> res; int N = C.size(); // square matrix for(int i = 0; i < N; ++i) { res.push_back(""); // init the ith row for(int j = 0; j <...
ALGO
0.999979
5.727488
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2014-09-13T17:37:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eda203727...
d99479ca-0500-4743-b375-4ecaa712918c
diesuki4/Algorithm_Learn
프로그래머스/Level 2/가장 큰 정사각형 찾기/main2.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int solution(vector<vector<int>> board); int main(int argc, char* argv[]) { cout << solution({{0, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {0, 0, 1, 0}}) << endl; co...
ALGO
0.999818
5.000115
{ "github_metadata": { "branch": "main", "commit_count": 458, "repo_created_at": "2022-07-11T22:39:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b2cee73d8...
aba94feb-fd44-4e39-b878-0d8bf692c8a8
suchkow/itop-hws-rep1
c2/code/h/main.cpp
//////////////////////////////////////////////////////////////////////////////// /// \file /// \brief Main module for Contest X Problem Y /// \author Student's Name /// \version 0.1.0 /// \date 25.01.2021 /// /// Copy the task description here. /// /////////////////////////////////////////////////////...
ALGO
0.999923
4.880536
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2021-01-25T16:07:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b36f4a01f38...
1502418a-41b4-4249-af91-bad6c5026d11
liuyubobobo/Play-Leetcode
2001-2500/2406-Divide-Intervals-Into-Minimum-Number-of-Groups/cpp-2406/main.cpp
/// Source : https://leetcode.com/problems/divide-intervals-into-minimum-number-of-groups/ /// Author : liuyubobobo /// Time : 2022-09-10 #include <iostream> #include <vector> #include <algorithm> #include <set> using namespace std; /// Greedy and Using Set /// Time Complexity: O(nlogn) /// Space Complexity: O(n)...
ALGO
0.999985
5.931505
{ "github_metadata": { "branch": "master", "commit_count": 2592, "repo_created_at": "2016-12-01T17:08:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2732, "forks": 718, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "44...
2b38cdc2-5c98-4c3e-b68e-57bd293f70d6
ggyool/study-alone
ps/boj_cpp/11779.cpp
#include <iostream> #include <vector> #include <algorithm> #include <queue> #include <stack> using namespace std; struct Node{ int idx,val; Node(int _idx, int _val){ idx = _idx; val = _val; } bool operator<(const Node &ref) const{ return val>ref.val; } }; struct Edge{ i...
ALGO
0.999981
4.57311
{ "github_metadata": { "branch": "master", "commit_count": 441, "repo_created_at": "2019-12-07T12:33:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 57 }, "file_meta": { "content_id": "08057d1...
ddd4b655-314f-4914-9e6a-7d9dfab797f1
libmv/libmv
src/libmv/image/derivative.h
// Copyright (c) 2007, 2008, 2009 libmv authors. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, me...
ALGO
0.907998
7.342219
{ "github_metadata": { "branch": "master", "commit_count": 859, "repo_created_at": "2011-05-17T07:35:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 318, "forks": 83, "issues": 5, "pull_requests": 2 }, "file_meta": { "content_id": "104053...
9d68c4dc-e846-46fc-9490-c832dff2b7e8
EyciaZhou/acm-fake
Regionals 2015 Online/Asia - Changchun/Hdu5438.B-Ponds/Hdu5438.B-Ponds/main.cpp
// // main.cpp // a2 // // Created by eycia on 13/9/15. // Copyright (c) 2015 eycia. All rights reserved. // #include <set> #include <map> #include <list> #include <tuple> #include <ratio> #include <cmath> #include <queue> #include <stack> #include <deque> #include <cstdio> #include <string> #include <vector> #inc...
ALGO
0.999884
4.000465
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2016-02-29T10:04: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": "d466322f02...
6db0ede8-0bfd-4f5d-a282-de5b03214c5f
kmjp/procon
srm/601-620/606/EllysNumberGuessing.cpp
#include <cstdlib> #include <cstring> #include <memory> #include <cstdio> #include <fstream> #include <iostream> #include <cmath> #include <string> #include <sstream> #include <stack> #include <queue> #include <vector> #include <set> #include <map> #include <algorithm> #include <numeric> using namespace std; #include ...
ALGO
0.999623
3.693427
{ "github_metadata": { "branch": "master", "commit_count": 3966, "repo_created_at": "2015-02-15T11:25:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 2, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "7f898f...
9941bd1c-940a-4bfc-a931-069e858037be
pooreumjung/Solve-BOJ
백준/Gold/9252. LCS 2/LCS 2.cc
#include<iostream> #include<vector> #include<cmath> using namespace std; int N; int dp[1001][1001]; string A, B; vector<char>path; void getText(int r, int c); int main() { cin >> A >> B; for (int i = 1; i <= A.size(); i++) { for (int j = 1; j <= B.size(); j++) { if (A[i - 1] == B[j - 1]) dp[i][j] = dp[i...
ALGO
0.999989
3.880168
{ "github_metadata": { "branch": "main", "commit_count": 681, "repo_created_at": "2023-07-11T02:51: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": "d77063df03...
fd6bb2b2-0599-4f7e-a5ed-1b1c83649a7c
Teapok/Practice
Lab_2/Lab_2_1/Matrix.cpp
#include "stdafx.h" #include "Matrix.h" #include <iostream> #include <iomanip> int fact(int N) { if (N < 0) // если пользователь ввел отрицательное число return 0; // возвращаем ноль if (N == 0) // если пользователь ввел ноль, return 1; // возвращаем факториал от нуля - это 1 =) else // Во всех остальных случа...
ALGO
0.930928
3.504087
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-12-04T14:56: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": "25bdfda37d...
03da571c-59d0-48c0-a7fd-40238e4774c0
spacemen0/TNM096
Lab1/main.cpp
#include <iostream> #include <vector> #include <queue> #include <utility> #include <chrono> #include <cmath> #include <unordered_set> using namespace std; class Board { private: vector<vector<int>> state; public: Board(const vector<vector<int>> &initialState) : state(initialState) {} vector<vector<int>>...
ALGO
0.999995
6.777355
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-05-15T09:22: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": "7e333a952ed...
0e94e880-13a9-40c2-8c0f-198a1c0f4ea4
yrenelapin/Data_Structures_and_Algorithms-1
Competitive_Programming/Codeforces/Educational-110-2/B_Array_Reodering.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; typedef vector<vi> vvi; typedef vector<vl> vvl; typedef priority_queue<ll> prq; ...
ALGO
0.999802
3.913253
{ "github_metadata": { "branch": "master", "commit_count": 228, "repo_created_at": "2021-07-20T02:19:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7070e61d...
ee90b94f-4e88-4a72-8fc7-85c23c3001cd
zxylvlp/MyLeetCode
surroundedRegions.cc
#include <iostream> #include <vector> #include <utility> #include <queue> #include "printHelper.hh" using namespace std; class Solution { public: void solve(vector<vector<char>>& board) { int m = board.size(); if (m<=2) return; int n = board.back().size();...
ALGO
0.999823
5.273532
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2015-09-27T13:37: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": "09a0f3d71...
f4e4f6bc-edcf-4c87-8ec6-f5878f5d3d10
shagkur/irrlichtPS3
source/physics/rigidbody/common/boxspheredistance.cpp
/* * boxspheredistance.cpp * * Created on: Jun 3, 2013 * Author: mike */ #include "rigidbody/common/box.h" #include "rigidbody/common/sphere.h" //--------------------------------------------------------------------------- // lenSqrTol: minimum square of length for safe normalize. //------------------------...
ALGO
0.999197
6.090047
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-07-16T14:41:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b270d4b044...
f9e99834-ce24-4025-bc89-e5777e563d66
Minacor/ACM_Practice
TopCoder/SMR 495/ColorfulCards.cpp
/* * 正向构造一个序列,反向构造一个序列,相应位置相同的就是确定的 */ #line 2 "ColorfulCards.cpp" #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <iostream> #include <vector> #include <map> #include <set> #include <algorithm> #include <string> #include <sstream> #define OUT(x) cerr << #x << ": " << (x) << endl #d...
ALGO
0.999798
3.995539
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2014-01-11T09:16:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d8af96df1...
ade2bff6-4abf-4243-8e1a-dc5e57bb2d5c
bjbjkidrock/LeetCode-1
Algorithms/is-graph-bipartite.cpp
785. Is Graph Bipartite? https://leetcode.com/problems/is-graph-bipartite/ Given a graph, return true if and only if it is bipartite. Recall that a graph is bipartite if we can split it's set of nodes into two independent subsets A and B such that every edge in the graph has one node in A and another node in B. The ...
ALGO
0.999888
6.678377
{ "github_metadata": { "branch": "master", "commit_count": 2420, "repo_created_at": "2019-04-03T19:49:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a90eb76...
6986dba7-b13a-4e82-a340-e2a006a0478b
ecto0310/procon_submission
atcoder/abc140/abc140_b/7383313.cpp
// Date: Sat, 07 Sep 2019 12:04:14 +0000 // Language: C++14 (GCC 5.4.1) #include <bits/stdc++.h> #include <assert.h> using namespace std; using i64 = long long; int main() { i64 n; cin >> n; vector<i64> a(n), b(n), c(n - 1); for (i64 i = 0; i < n; i++) cin >> a[i]; for (i64 i = 0; i < n; i++) cin >> ...
ALGO
0.99963
4.128348
{ "github_metadata": { "branch": "main", "commit_count": 2101, "repo_created_at": "2022-12-07T13:10: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": "dde216468...
5b1ecb2b-8f05-44c4-ab52-8d7884b88672
garyellow/LC-GFG-solution
2462-total-cost-to-hire-k-workers/2462-total-cost-to-hire-k-workers.cpp
class Solution { public: long long totalCost(vector<int>& costs, int k, int candidates) { long long cost = 0; int cnt = 0, l = 0, r = costs.size() - 1; priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> lh, rh; for(; lh.size() < candidat...
ALGO
0.99988
5.995083
{ "github_metadata": { "branch": "master", "commit_count": 2398, "repo_created_at": "2022-07-03T16:00: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": "0120892...
1aab884f-88da-48ae-af72-bbf158782b04
anishjain1201/SUDOKU-MAZE-SOLVER
Source code.cpp
#include <iostream> #include<cmath> #include<conio.h> using namespace std; char dimension = 9, sub_dimension = sqrt(dimension); void print_matrix(char matrix[][16], int dimension) { for(char row = 0; row < dimension; ++row) { if(row % sub_dimension == 0 && dimension == 9) cout << "+-------...
ALGO
0.999398
4.397475
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-07-02T11:20: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": "c0b2543eb4eb...
3ad55348-b593-4f72-abaa-75ab18fc3b6e
AyushKoul00/Desktop-Files
C and C++/C++/Competitive Coding/LCS.cpp
#include <bits/stdc++.h> using namespace std; //https://www.hackerrank.com/challenges/common-child/problem void print(const vector<size_t> & v, const int& r, const int&c) { cout << endl; int i = 0; for(auto x : v) { cout << x << ' '; i++; if(i==c) cout << endl, i=0; } } stri...
ALGO
0.999921
5.187278
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-01-27T13:24:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "39c55a4c3d...
3517108d-1ec8-49ba-a95b-18aa5d4d4da6
strengthen/LeetCode
C++/876.cpp
__________________________________________________________________________________________________ sample 4 ms submission /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* ...
ALGO
0.999906
6.231081
{ "github_metadata": { "branch": "master", "commit_count": 518, "repo_created_at": "2018-11-03T06:47:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 883, "forks": 297, "issues": 19, "pull_requests": 0 }, "file_meta": { "content_id": "427...
0f4aa375-8dc7-4b45-a0dd-85b63244d67f
kahowang/sensor-fusion-for-localization-and-mapping
第一章 概述/lidar_localization/third_part/g2o-20170730_git/g2o/apps/g2o_hierarchical/star.cpp
#include "star.h" #include "g2o/core/optimization_algorithm_with_hessian.h" namespace g2o { using namespace std; Star::Star(int level, SparseOptimizer* optimizer): _level(level), _optimizer(optimizer) {} bool Star::labelStarEdges(int iterations, EdgeLabeler* labeler){ // mark all vertices in the lowLevelEd...
ALGO
0.957287
4.44784
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2021-08-15T10:36:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 747, "forks": 256, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a666dc5...
8e8793c0-4824-4162-a970-bba0a61dbb71
LoggIT2001/Data_Structure_And_Algorithms_PTIT_2021
Graph/kiemtracophaiTreehaykhong.cpp
/******<CODE NEVER DIE>******/ #include<bits/stdc++.h> using namespace std; #define ll long long #define FastIO ios_base::sync_with_stdio(0) #define IN cin.tie(0) #define OUT cout.tie(0) #define CIG cin.ignore() #define FOR(i,n,m) for(int i=n;i<m;i++) #define FORD(i,n,m) for(int i=m;i>=n;i--) #define reset(A) memset(A...
ALGO
0.999923
4.067388
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-07-12T15:40:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "21babaa5ab...
c174be8c-d886-46d6-9d2d-b6e17383eafd
AkshatRauthan/Decode-DSA-2.0-With-Cpp
21. Problems on Sorting/Leetcode169_MajorityElements.cpp
#include "iostream" #include "vector" #include "algorithm" using namespace std; // Given an array nums of size n, return the majority element. // The majority element is the element that appears more than ⌊n / 2⌋ times. // You may assume that the majority element always exists in the array. vector<int> initialize(...
ALGO
0.999803
4.876388
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2024-01-04T16:33:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30246cf7a69...
642ff34a-8c1f-440d-9a9f-44d52284b7aa
cliu268/cs300
final/qb.cpp
// B. <NAME> // https://www.xinyoudui.com/contest?courses=519&books=255&pages=6457&fragments=12042&problemId=15249 /* <NAME> cow has designed what she thinks will be the next big hit video game: "Angry Cows". The premise, which she believes is completely original, is that the player shoots cows with a slingshot into a...
ALGO
0.999984
4.901591
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-06-18T02:12:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "348670aa3983...
13ab3fdb-0747-4a23-acfe-3e4719ac22a2
tbindi/hackerrank
merge_sorted.cpp
/* You’re given the pointer to the head nodes of two sorted linked lists. The data in both lists will be sorted in ascending order. Change the next pointers to obtain a single, merged linked list which also has data in ascending order. Either head pointer given may be null meaning that the corresponding list is empty. ...
ALGO
0.999977
3.884092
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-01-10T12:52: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": "4b18f993be...
58dbd500-a8e4-4527-b90b-df6163d71a9f
Brahmaraj/lowleveldesign
Snake&Ladder.cpp
#include<iostream> #include<vector> #include<set> #include <unordered_set> using namespace std; class Snake{ private: int Head; int Tail; public: Snake(int head, int tail){ this->Head = head; this->Tail = tail; }; int getHead(){ return...
ALGO
0.998794
3.760729
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-05-19T15:46: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": "0d24a736ba4b...
591429be-0dc4-45d6-bfed-779615957212
olinguyen/ece650
project/src/producer.cpp
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <stdbool.h> #include <sys/time.h> #include <sys/ipc.h> #include <sys/msg.h> #include <sys/types.h> #include "types.h" #include "consume_produce.h" #include "random_distribution.h" #define MSQID 1337 #define DEBUG 0 struct timeval transmit_start, tra...
TEST
0.972497
4.577787
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2016-09-29T18:09: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": "ac12d9504...
e202add1-1258-44bb-a6b6-d30be3b8079b
nachiketkanore/CP-Trash
practice/12969.cpp
#include "bits/stdc++.h" #define sz(x) (int)(x.size()) #define FOR(i, L, R) for (int i = L; i <= R; i++) using namespace std; int n, k; bool dp[30][31][31][30 * 15]; bool vis[30][31][31][30 * 15]; int go(int id, int a, int b, int rem) { if (rem < 0) return 0; if (id == n) return rem == 0; if (vis[id][a][b][r...
ALGO
0.999935
3.447963
{ "github_metadata": { "branch": "main", "commit_count": 370, "repo_created_at": "2021-08-04T18:15:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f841f192a9...
e21f693f-9d0f-41e0-a486-485138d1c971
Chanchal2125/Dynamic_Programming
LCSLength.cpp
#include <iostream> #include <string> #include <cmath> #include <climits> #include <vector> #include <set> #include <algorithm> using namespace std; #define ll long long int #define ld long double #define mod 1000000007 #define endl "\n" #define vi vector<ll> #de...
ALGO
0.999965
4.197999
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2020-11-13T16:44: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": "c1b69b91f68...
6d277ea1-3b83-4c37-883b-4e90853ddfa3
vancegroup-mirrors/sofa-framework
Sofa/extlibs/CGoGN/include/Algo/Decimation/geometryApproximator.hpp
/******************************************************************************* * CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps * * version 0.1 * * Copyright (C) 2009-2013, IGG Team, ICube, University of Strasbourg ...
ALGO
0.999607
4.543992
{ "github_metadata": { "branch": "master", "commit_count": 2616, "repo_created_at": "2013-03-26T20:22:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a963b1db...
a3cfacdc-15d9-4684-9775-5f81e44de511
1804054Miraz/Codeforces-solutions
A. Dense Array.cpp
//<NAME> //<NAME> ///A lot of mistakes is happened without understanding questions clearly.\ Please,make sure that understand question clearly.Think from every possible output.\ Make different algorithm to answer the question.Don't think that you have tried all possible ways.\ There is always simple and tricky way to s...
ALGO
0.999234
3.733868
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2020-11-15T06:17: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": "77b0b6de4478...
914a0fbd-8e9b-4eda-8c3b-b26d44dd5db0
madog/planb
software/Alfa_V0_05_Megatronics_V3/Homing.ino
/* The homing tab is resonsible for all homing motions. Homing is a moving command but has its own tab because it moves without keeping track of position. It homes all axis and determines what coordinates tha axis are at. */ //All homing commands behave the same //Once executed, move said axis toward the endstop a...
ALGO
0.997261
5.878527
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2017-08-25T16:21:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c648d4e960...
ecc7d74f-e4c3-4782-bac6-3c36fd924977
inrittik/DSA_Problems
Dynamic Programming/0-1Knapsack.cpp
// { Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends // Geeksforgeeks - 0-1 knapsack class Solution { public: int max(int a, int b){ if(a>b) return a; else return b; } public: //Function to return max value that can be put in knapsack of cap...
ALGO
0.999999
4.980882
{ "github_metadata": { "branch": "master", "commit_count": 1483, "repo_created_at": "2022-02-06T15:35:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a9d86b...
a393dc57-65f4-4682-9ff9-e4404b1853d6
Pabs44/PROJ515_Dummy_Repo
Stepper Motor Arduino Code/Backlog/Improved_File_Code/simple_stepper_motor/simple_stepper_motor.ino
//******************************************************************************************************************************************** //INFORMATION //200 pulses for making one full cycle rotation. //Rotating clockwise moves track towards the centre. //Rotating anti-clockwise moves track away from the centre. /...
ALGO
0.996432
6.108444
{ "github_metadata": { "branch": "main", "commit_count": 81, "repo_created_at": "2022-10-17T13:57: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": "01220ec4aca...
62fca2df-df97-4d3a-b206-2930471b77ac
Drone-Banks/ACM
AtCoder/Beginner/Beginner Contest 051/D.cpp
/************************************************************************* > File Name: test.cpp > Author: Akira > Mail: <EMAIL> ************************************************************************/ #include<bits/stdc++.h> typedef long long LL; typedef unsigned long long ULL; typedef long double LD;...
ALGO
0.999985
3.848478
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2018-03-24T10:06: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": "181d9db6c...
3a5e5abd-6181-49b1-88d1-d709a57415bc
sparsh-1/Codeforces-Problem-solutions
Yet Another String Game.cpp
// https://codeforces.com/contest/1480/problem/A #include <bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define mp make_pair #define all(x) x.begin(), x.end() #define ll long long #define pll pair<long, long> #def...
ALGO
0.99979
3.806467
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-08-01T20:38:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "41f7a4ff493...
d3bd596f-7db7-4b67-ac98-a9428e9d32eb
caochao39/tare_planner
src/tare_planner/or-tools/include/coin/ClpSimplex.hpp
/* $Id$ */ // Copyright (C) 2002, International Business Machines // Corporation and others. All Rights Reserved. // This code is licensed under the terms of the Eclipse Public License (EPL). /* Authors <NAME> */ #ifndef ClpSimplex_H #define ClpSimplex_H #include <iostream> #include <cfloat> #include "ClpMod...
ALGO
0.990657
4.531528
{ "github_metadata": { "branch": "melodic-noetic", "commit_count": 189, "repo_created_at": "2021-05-08T14:30:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 544, "forks": 116, "issues": 12, "pull_requests": 0 }, "file_meta": { "content_i...
78c7c063-5a91-41b9-aca2-70339226519f
MasterHoracio/Club-de-Algoritmos-UPAEP
Heaps/min-heap.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 1e3 + 10; int heap[maxn]; int sz = 0; int getParent(int index){ return (index - 1)/2;} int getLeftChild(int index){ return (index * 2) + 1;} int getRightChild(int index){ return (index * 2) + 2;} bool hasParent(int index){ return getParent(index) >= 0;}...
ALGO
0.999626
4.044274
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2017-04-05T03:16:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e40d5e4e5...
63ced035-e9fe-4346-adf4-f596854d7676
0xEbrahim/LeetCode-Grind
5-Longest-Palindromic-Substring.cpp
const static auto _ = [] { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); std::cout.tie(nullptr); return nullptr; }(); class Solution { public: std::string longestPalindrome(std::string s) { int n = s.size(); vector<vector<bool>>dp(n + 1, vector<bool>(n + 1, 0)); for(int i = 0 ; i ...
ALGO
0.999985
5.796745
{ "github_metadata": { "branch": "main", "commit_count": 335, "repo_created_at": "2024-05-11T15:33: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": "3e3a68c12b...
350cc185-4d1e-461d-93ca-3cad23f5796f
raincross7/code-similarity
codes/train_code/problem346/problem346_267.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define fi first #define se second #define pb push_back #define pr pair<int,int> #define mod 1000000007 #define endl "\n" int power(int a,int b,int m=mod) { if(b==0) return 1; if(b==1) return a; int res=power(a,b/2,m); res=(res*res)%m; if(b&1) res...
ALGO
0.999948
3.606008
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07: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": "550f3bdcdbae...
dc9ed34e-b891-4c90-8e27-018f125ab8c1
KrzysztofSZCZ/ProjektyCpp
Zadania/Lesson14/MinMaxDivision.cpp
#include<iostream> #include<vector> #include<algorithm> //algorytm wyszukiwania binarnego bool compareNumbers(int middle, int K, std::vector<int> &A){ int sum = 0; for(int i = 0; i < A.size(); i++){ sum += A[i]; if(sum > middle){ sum = A[i]; K--; } if(...
ALGO
0.999934
5.07197
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2023-03-20T13:09:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90d46334a65...
c7b099ce-af06-475e-8d4e-14620c351f91
xiexixie/cplusplus-learning
leetcode/15.cpp
#include <algorithm> #include <vector> using namespace std; class Solution { public: vector<vector<int>> threeSum(vector<int> &nums) { sort(nums.begin(), nums.end()); vector<vector<int>> result; for (int i = 0; i < nums.size(); i++) { int left = i + 1; int right = nums.size() - 1; ...
ALGO
0.999956
6.065738
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2023-06-19T14:11: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": "2751d02f4af...
4cf1869c-93dd-447e-bb0a-33e4e53effb5
openearth/hydro-model-generator-wflow
build/_CPack_Packages/Linux/DEB/pcraster_4.2.0/usr/local/pcraster/include/fern/algorithm/algebra/elementary/detail/divide.h
// ----------------------------------------------------------------------------- // Fern © Geoneric // // This file is part of Geoneric Fern which is available under the terms of // the GNU General Public License (GPL), version 2. If you do not want to // be bound by the terms of the GPL, you may purchase a proprietary...
ALGO
0.975921
7.272962
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2018-06-25T14:38:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "e087b4f78d...
95c248fc-7415-48a6-8782-322bab68a2a9
danishshariff/problem_solving
0002-add-two-numbers/0002-add-two-numbers.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: // ListNode* ad...
ALGO
0.999961
6.223813
{ "github_metadata": { "branch": "main", "commit_count": 1211, "repo_created_at": "2024-10-12T07:08:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51bee209c...
1a658ff3-6e8d-4c4b-8121-942c12f8d97d
julihuber0/PlanarityEvaluation
algorithms/BoyerMyrvoldEdgeAddition/BMStart.cpp
#include <ogdf/fileformats/GraphIO.h> #include <ogdf/layered/OptimalHierarchyLayout.h> #include <ogdf/basic/graph_generators.h> #include <iostream> #include "BoyerMyrvoldEdgeAddition.h" #include <ogdf/planarity/BoothLueker.h> #include <chrono> using namespace ogdf; using namespace std; typedef std::chrono::high_resol...
ALGO
0.90094
5.192193
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2023-10-19T15:47:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5e5236ffa3b...
6364d252-2baf-468c-a43a-08187a68fdf9
agudeloandres/C_Struct_Files
C_Tutorships/some_Cpp_functions/CAP5/P105.CPP
#include "stdio.h" #include "math.h" #include "stdlib.h" #include "conio.h" void main() { char a[15],*p,*q; long x,n; unsigned int i,R; printf ("De un numero unsigned int..\n"); gets (a); x = strtol (a, &p,0); while (*p != '\0' || x < 0L || x > 65535L) { printf ("Cifra errada. Rectifique... %c\n",7); gets ...
ALGO
0.990839
3.469035
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2015-10-22T02:49: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": "478c61c99...
e9cfad64-174f-4df5-85c0-2bd7eb303793
TheRealAnonymous008/MathLibrary
LinearAlgebra/src/LU/PartialLU.h
#pragma once #include "../Objects/MatrixBase.h" #include "../Objects/Matrix.h" #include "../MatrixStructure/SpecialMatrices/SquareOps.h" #include "LUResult.h" #include <utility> namespace MathLib { namespace LinearAlgebra{ namespace implementation { namespace LU { template<typename T, size_type _Rows, si...
ALGO
0.997528
7.018016
{ "github_metadata": { "branch": "master", "commit_count": 331, "repo_created_at": "2022-09-24T21:18:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "41b9b65e...
2f0f82fe-6782-4294-b724-6a21b8e64a17
IEIAuto/AutoDRRT
src/autodrrt.application/planning/sampling_based_planner/path_sampler/src/utils/trajectory_utils.cpp
// Copyright 2023 TIER IV, Inc. // // 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 i...
ALGO
0.994872
6.651922
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-08-11T02:20:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 14, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "992fab9f7...
12e64eda-b63e-4a37-bbbd-4f91fac887ac
luck2901/Algorithm
2116.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <queue> #include <string.h> using namespace std; #define endl "\n" int N, answer = 0; int result[6]; vector<int> v[10001]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> N; ...
ALGO
0.999917
4.069921
{ "github_metadata": { "branch": "main", "commit_count": 140, "repo_created_at": "2021-02-15T14:30: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": "c156a8cfa4...
e91eef97-5235-4829-a21b-e676a3fb8da5
jodyxha/QHG4
QHG4/core/occtest2.cpp
#include <cstdio> #include "xPopBase.h" #include "xPopLooper.h" #include "OccHistory.h" #include "OccAnalyzer.h" #include "OccTracker.h" #define NUM_CELLS 5 #define NUM_TIMES 6 int gaga1[NUM_TIMES][NUM_CELLS] = { {1,0,0,0,0}, {1,1,0,0,0}, {1,0,0,0,0}, {0,0,0,0,0}, {0,0,0,0,0}, {0,0,0,0,0} }; ...
ALGO
0.956254
4.318132
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2022-10-18T15:24:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "14af85fb98f...
27f496e8-436a-4e73-8d5b-79143e71e026
connornguyxn/competitive-programming
archive/cpp/lqdoj_c23_paint.cpp
#if DEBUG #include "lib/debug.h" #define TASK "test" #else #include <bits/stdc++.h> #define TASK "paint" #endif using namespace std; using ll = long long; using ull = unsigned long long; using str = string; using pii = pair<int, int>; using pll = pair<ll, ll>; #define fi first #define se second #define ...
ALGO
0.999835
3.935782
{ "github_metadata": { "branch": "main", "commit_count": 151, "repo_created_at": "2021-08-26T07:42:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de7d7be632...
3c508de3-d9ab-470e-ae66-842c6f3fce51
TanzimRusho/OLD-MATERIALS
Online_Judge/UVA_Solutions/10986 - Sending Email.cpp
// Program to find Dijkstra's shortest path using // priority_queue in STL #include<bits/stdc++.h> using namespace std; # define INF 0x3f3f3f3f // iPair ==> Integer Pair typedef pair<int, int> iPair; // This class represents a directed graph using // adjacency list representation class Graph { int V; // No. of ve...
ALGO
0.999962
4.32908
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2021-08-11T20:01:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "84a7725dc9...
cb3b32cc-9f2a-4f87-b9f0-12fd1e71256d
guisongchen/leetcode_try
201-250/232_Implement Queue using Stacks.cpp
/* Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue. pop() -- Removes the element from in front of queue. peek() -- Get the front element. empty() -- Return whether the queue is empty. Example: MyQueue queue = new MyQueue(); queue.push(1); queue.push(2); q...
ALGO
0.995776
6.103983
{ "github_metadata": { "branch": "master", "commit_count": 384, "repo_created_at": "2019-12-22T16:00: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": "003dd484...
b5c4bc48-818a-464f-972e-aa4611b4b219
Nirav1424/basic-c-
hello.cpp/squareRoot.cpp
#include<iostream> using namespace std; int root(int n){ int s = 0; int e = n; int mid = s + (e - s) / 2; int ans = -1; while (s <= e) { int square = mid * mid; if (square == n) { return mid; } if (square < n) { ans = mid;...
ALGO
0.99996
3.982982
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-06-22T04:36:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8cc3a13198c6...
db1f78c3-abc5-4968-9ff2-59a58a3a4030
rst0070/problem-solving-practice
ucpc2020준비/19기출예선/우유가넘어지면.cpp
#include <iostream> #include <stdlib.h> int main(){ int m, n, i, j; std::cin >> n >> m; char **data;//data[n][m] data = (char **)malloc(sizeof(char *)*n); for(i = 0; i < n; i++){ data[i] = (char *)malloc(sizeof(char *)*m); std::cin >> data[i]; for(j = 0; j < m; j++){ ...
ALGO
0.996319
3.297683
{ "github_metadata": { "branch": "master", "commit_count": 161, "repo_created_at": "2020-07-13T05:37:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e406ae8d...
3d52ce05-ad8f-4ba6-80aa-b2ffd1085564
maximyuss/LeeCode
code/cpp/1754.cpp
// https://leetcode.com/problems/largest-merge-of-two-strings/ class Solution { public: string largestMerge(string word1, string word2) { size_t i1 = 0, i2 = 0, n1 = word1.size(), n2 = word2.size(); string res; while (i1 < n1 and i2 < n2) { if (word1[i1] > word2[i2]) ...
ALGO
0.999992
5.940687
{ "github_metadata": { "branch": "master", "commit_count": 715, "repo_created_at": "2024-02-08T08:04: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": "0ae93e0e...
ca89ec39-4784-4686-b2b7-cc64430331f8
ganekasar/leetcode
solutions/92. Reverse Linked List II.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:    ListNode* reverseBetw...
ALGO
0.999999
5.807819
{ "github_metadata": { "branch": "main", "commit_count": 241, "repo_created_at": "2021-12-25T06:51:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c3d35bd2f2...
67947970-5a27-4603-85e4-0a7d070673d1
micklevast/CrackMyPlacement-with-ArshSir
Day8/Q2.cpp
#include <iostream> #include <vector> #include <string> #include <unordered_map> #include <set> #include <unordered_set> #include <cmath> #include <algorithm> #include <map> #define ll long long int using namespace std; void swap(int &a, int &b) { int temp = a; a = b; b = temp; } int main() { int t; ...
ALGO
0.999918
3.408368
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2023-01-10T09:31: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": "af0f124a9c3...
beced05a-4ecd-4f8c-b5be-5d7d984b9539
julianferres/Competitive-Programming
CSES/Sorting and Searching/sum_of_four_values.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vi; typedef vector<bool> vb; typedef tuple<ll,ll,ll> iii; typedef vector<iii> viii; #define FIN ios::sync_with_stdio(0);cin.tie(0);cout.tie(0) #define fore(i, a, b) for(ll i = (a); i < (ll) (b); i++) #define forn(i, n) fore(i, 0, n) ...
ALGO
0.999963
3.676979
{ "github_metadata": { "branch": "master", "commit_count": 84, "repo_created_at": "2018-08-31T18:53:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "962244311...
a43f31b9-ca1d-47ad-8286-fcde7a873367
simbadSid/os_projectNACHOS
src/code/threads/synch.cc
// synch.cc // Routines for synchronizing threads. Three kinds of // synchronization routines are defined here: semaphores, locks // and condition variables (the implementation of the last two // are left to the reader). // // Any implementation of a synchronization routine needs some // primitiv...
TOOL
0.924996
5.545191
{ "github_metadata": { "branch": "master", "commit_count": 243, "repo_created_at": "2016-01-04T15:52:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d414e9b7...
96edde96-d431-40fa-8878-9341aa983852
Haribala-09/hyprdots
User/History/39800447/lzPd.cpp
#include <bits/stdc++.h> using namespace std; #define rev(ans) reverse(ans.begin(), ans.end()) #define mems(a, n) memset(a, n, sizeof(a)) #define pb push_back #define fst first #define scd second #define int long long using pii = pair<int, int>; using pci = pair<char, int>; void dbg_out() { cerr << endl; } template ...
ALGO
0.999895
4.632071
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-17T14:25: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": "40a612b0871a...
bec6b41a-9952-4dc1-ba0d-ba28650005ba
MohammadElsharqawy/CompetitiveProgramming
codeforces/1471/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll ; const int N = 3e5 + 5, INF = 2e9; ll gcd(ll a, ll b){ return b == 0 ? a : gcd(b,a%b); } ll lcm(ll a, ll b) { return a/gcd(a,b)*b; } void solve() { int n, k; cin >> n >> k; vector<int> num(n, 0); vector<int> p(k, 0); ll ans = 0; ...
ALGO
0.999914
3.891699
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-04-04T20:56: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": "89c4d7d1fa04...
add985ec-a406-49c3-8f0f-faea0612dbfc
wyrover/book-code
The C++ Standard Library - A Tutorial and Reference/cont/sortvec.cpp
/* The following code example is taken from the book * "The C++ Standard Library - A Tutorial and Reference" * by <NAME>, Addison-Wesley, 1999 * * (C) Copyright <NAME> 1999. * Permission to copy, use, modify, sell and distribute this software * is granted provided this copyright notice appears in all copies. * T...
ALGO
0.999335
6.000052
{ "github_metadata": { "branch": "master", "commit_count": 192, "repo_created_at": "2016-07-24T07:29:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 388, "forks": 248, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "448f...
387feb7e-9b1e-413b-ab26-12402d340b08
JiangZhixu0319/JiangZhixu-luogu-code
P11559.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a[3]; cin >> a[0] >> a[1] >> a[2]; sort(a, a + 3); if (a[0] > 0 && a[0] < 25 && a[1] >= 25 && a[1] <= 44 && a[2] <= 84 & a[2] >= 45) cout << "Yes\n"; else if (a[0] >= ...
ALGO
0.99984
3.028881
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-01-21T14:13: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": "5b012461e2e9...
cee7a8e6-83de-4566-8073-9347447bf870
flxf/codeforces
234/c.cpp
#include <iostream> #include <fstream> using namespace std; int t[100000]; int dp[100000][2]; int main() { ifstream fin("input.txt"); int n; fin >> n; for (int i = 0; i < n; i++) { fin >> t[i]; } fin.close(); if (t[0] == 0) { dp[0][0] = 1; dp[0][1] = 1; } else if (t[0] < 0) { dp[0]...
ALGO
0.999973
4.126952
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2014-01-27T22:55:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fdd1d45c9...
a4b32763-2fca-4293-9092-a3e896001cf5
UM-ARM-Lab/escher_openrave_cpp
include/ContactSpacePlanning.hpp
#ifndef CONTACTSPACEPLANNING_HPP #define CONTACTSPACEPLANNING_HPP void getAllContactPoseCombinations(std::vector< std::vector<RPYTF> >& all_contact_pose_combinations, const std::vector<std::vector<RPYTF> >& possible_contact_pose_representation, size_t vec_index, std::vector<RPYTF>& contact_pose_combination); std::vect...
ALGO
0.990168
5.250028
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2017-08-19T14:54:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "46a63a0cbe...
eb753aca-c307-4b5f-85cb-3abf1fe44f9d
donaldmusgrove/ngspatial
src/msglmmGaussian.cpp
#include "msglmmGaussian.h" #include "msglmmutil.h" #include <RcppArmadillo.h> #include <iostream> using namespace Rcpp; using namespace RcppArmadillo; using namespace std; using namespace arma; // Density of the multivariate SSGLMM for Gaussian data double dGaussMulti(const mat& Y, const List& X, const List& M, co...
ALGO
0.995331
6.694242
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2016-04-09T13: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": "b912dce83...
a7f1faaa-e9ac-4de9-a5f2-3152c66978e3
mdbekkouche/LocFaultsTool
core/Include/Ibex/IbexNewton.h
/*--------------------------------------------------------------------------------- * * Multivariate Newton operator * ---------------------------- * * Copyright (C) 2007-2009 <NAME> * * This file is part of IBEX. * * IBEX is free software; you can redistribute it and/or modify it under the terms of * the ...
ALGO
0.997156
6.226025
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-05-19T13:23:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7d27e3053...
ac14e051-1d57-4d75-bde4-1badbdafd838
Sonak0930/ClothSimulation
main.cpp
// // main.cpp // IK // // Created by <NAME> on 2021/06/09. // #include <iostream> #include <JGL/JGL_Window.hpp> #include "AnimView.hpp" #include <glm/gtx/quaternion.hpp> #include <glm/gtc/random.hpp> #include <Eigen/dense> #include <stdlib.h> AnimView* animView; using namespace std; using namespace glm; //damp...
ALGO
0.988469
4.352682
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-09-07T08:39: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": "8b5ef02d92da...
11a5a4a0-732d-4095-a2fc-eeb163f91a35
woowacourse-study/2022-lv3-algorithm-study
2주차/12789/12789_cpp_케이.cpp
#include <bits/stdc++.h> #define sz(v) (int)v.size() #define int long long #define all(v) (v).begin(), (v).end() #define press(v) (v).erase(unique(all(v)), (v).end()) using namespace std; typedef pair<int, int> pi; typedef pair<int,pi> pii; const int MAX = 5e5+7; const int INF = 0x3f3f3f3f3f3f3f3f; const int MOD = 1e9 ...
ALGO
0.999894
4.132586
{ "github_metadata": { "branch": "main", "commit_count": 400, "repo_created_at": "2022-06-26T10:45:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25, "forks": 40, "issues": 0, "pull_requests": 23 }, "file_meta": { "content_id": "f139642c...
bb4ebd5a-3709-4a2c-aa5b-42f49168534e
itsrohan2003/Data-Structures-and-Algorithm
basic c++/arrayasparameter.cpp
#include <iostream> using namespace std; void fun(int a[], int n) { for (int i = 0; i < n; i++) { cout << a[i] << " "; } cout << endl; } int main() { int arr[] = {1, 2, 3, 4, 5}; int n = 5; for (int x : arr) { cout << x << " "; } ...
ALGO
0.99922
4.711321
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2022-09-24T11:11: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": "386b4c498b4...
b2941b7c-01ff-4208-bfb1-efef09fcb110
nimendoza/noi-2023
training/week-4/hackables/T/DidYouWriteABruteForcer/207412809.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll INF = 1LL << 61; void solve() { int n, q; cin >> n >> q; vector<ll> vs(n), sm = {0LL}; for (ll& v: vs) { cin >> v; sm.push_back(sm.back() + v); } for (int qq = 1; qq <= q; qq++) { int k; cin >> k; ...
ALGO
0.999769
4.040227
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2023-02-17T04:26:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a724fb58c04...
3b43a54c-79e7-47bf-a7f0-7cdb52efa4a9
LinkClinton/AlgDatDemo
Demos/SortDemo/competition_tree.hpp
#pragma once #include <algorithm> #include <vector> template <typename T, typename Compare = std::less<T>> class competition_tree final { public: using value_type = T; using identity = int; public: explicit competition_tree(const std::vector<value_type>& values); void replay(const value_type& value = std::numeri...
ALGO
0.99734
5.99071
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-03-14T13:53:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b586ba442...
e917b000-7c49-4c7b-b640-ccdbfd8f0674
rmdhnz/Prologue
TIC TAC TOE.cpp
/*Written by <NAME> * INSTITUT TEKNOLOGI SEPULUH NOPEMBER*/ #include <bits/stdc++.h> using namespace std;// O = 79, X = 88 #define go cout<<'\n' typedef char matrix[3][3]; void displayMatrix(matrix m){ for(int i = 1; i <=3;++i){ for(int j = 1; j <=3;++j){ printf("[%c] ", m[i][j]); } ...
ALGO
0.999734
3.71245
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2021-12-21T13:40:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5d907e24bb...
6af64fc3-e8f0-40a8-b9a2-5ba9549d9d69
AllanXu00/Competitive-Programming
CCC/2006/stage-1/ccc06j3.cpp
#include <iostream> #include <queue> #include <utility> #include <algorithm> #include <map> #include <string> #include <algorithm> #pragma warning(disable:4996) using std::cin; using std::endl; using std::cout; using std::vector; typedef std::pair<int, int> intpair; //first is category, second is num seconds std::m...
ALGO
0.999717
3.746834
{ "github_metadata": { "branch": "master", "commit_count": 286, "repo_created_at": "2016-11-09T01:05: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": "fb6902fa...
2561dafd-dcba-4638-821f-6ab1d46d05d0
ZEUSRPA/CompetitiveProgramming
Training/Codeforces/ParityShuffleSorting.cpp
#include <bits/stdc++.h> #define ENDL '\n' #define deb(u) cout << #u " : " << (u) << ENDL; #define deba(alias, u) cout << alias << ": " << (u) << ENDL; #define debp(u, v) cout << u << " : " << v << ENDL; #define pb push_back #define F first #define S second #define lli long long #define ld long double #define pii pair<...
ALGO
0.999331
3.712386
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-02-17T17:25: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": "6bd9f61c2feb...
d2f922b1-c961-47be-915a-b727eafa0568
jmolloy/pedigree
src/user/applications/chess/BoardState.cc
#include "BoardState.h" #include "moves.h" #include "SearchAlgorithm.h" #include "hashes.h" #include "StateStore.h" long g_nHashes=0; long g_nIsLegal = 0; long g_nInCheck = 0; BoardState::BoardState() : whiteInCheck(false), whiteCheckStateCalculated(false), blackInCheck(false), blackCheckStateCalculated(false), ...
ALGO
0.998815
5.636647
{ "github_metadata": { "branch": "master", "commit_count": 2620, "repo_created_at": "2009-04-10T22:25:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 90, "forks": 5, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "1784fa...
48c5e6c0-f4b0-4885-900b-737d7bbd67a3
inputhacker/ai_generated_code
vectorDB/optimized_vector_main.cpp
int main() { // VectorDB 초기화 (임베딩 차원 128, 최대 5000개 항목) VectorDB db(128, 5000); // 캐시 크기 설정 db.set_cache_size(500); // 배치로 데이터 추가 std::vector<std::string> texts = { "라즈베리파이는 저비용 소형 컴퓨터입니다.", "벡터 데이터베이스는 임베딩을 저장하고 검색하는데 사용됩니다.", "C++은 성능이 중요한 응용 프로그램에 적합합니다.", ...
ALGO
0.983707
7.306929
{ "github_metadata": { "branch": "main", "commit_count": 58, "repo_created_at": "2025-05-28T05:43: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": "a7099acdbb6...
735e32db-1a45-4d42-86e6-e6f9244e8f4e
BaconatorWithFries27/Huffman-encoding
makeBitstream.cpp
#include <iostream> #include "huffman.cpp" //#include <omp.h> using namespace std; struct bitmap { vector<char> chars; // Store array of chars vector<string> binaryValues; // Store binary representations as strings }; struct uintStream { vector<uint64_t> vec; // actual value int len; // lengt...
ALGO
0.999856
4.151796
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2024-11-09T15:03:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d9b15fa44d9...
fbb0208d-b1e1-4dcd-be45-5d5800334841
huanghongxun/ACM
vijos/p1066.cpp
#include <iostream> using namespace std; #define N 32005 inline int lowbit(int t) { return t&(-t); } inline int sum(int *c, int end) { int s = 0; while(end > 0) { s += c[end]; end -= lowbit(end); } return s; } inline int sum(int *c, int from, int to) { return sum(c, to) - s...
ALGO
0.999929
3.398283
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-08-26T05:28:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33fa47a65c...
ce18f0b1-d761-47bd-978d-477d853b6578
pooyaww/Intel_HLS_Samples
tutorials/system_of_tasks/resource_sharing/part_1_direct_computing.cpp
#include "HLS/hls.h" #include "HLS/task.h" #include <iostream> #include "HLS/math.h" #include "HLS/extendedmath.h" #define N 3 struct D3Vector { float d[3]; }; ihc::stream_in<D3Vector> inputs; hls_max_concurrency(0) component float dut() { D3Vector new_item, coef, coef1; coef.d[0] = .2;coef.d[1] = .3;coef.d[2]...
ALGO
0.998008
5.260807
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-05-03T16:46: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": "3f367701c8...
d54d0c99-7c22-4a86-a7e4-e691fef47eb7
simonizerlol/Kattis-Programming-Practice
RestaurantOrders.cpp
// COMP 321 A4 Q1 Restaurant Orders // Name: <NAME> // ID: 260610820 // Date: 2017.02.21 #include <bits/stdc++.h> using namespace std; // initialize the input variables int n, c[100], m; // given 1 <= n <= 100 int counter, caseNumber; int ordersMemory[100][300000], sVisit[100][300000]; // given 1 <= m <= 1000, given...
ALGO
0.999906
3.809115
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-03-29T04:20: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": "c5fbc74ea7...
80ec2142-41f3-465d-a082-70f1bca725c3
bendem/InpresPFM
cpp-commons/src/utils/StringUtils.cpp
#include "utils/StringUtils.hpp" bool StringUtils::startsWith(const std::string& string, const std::string& search) { if(search.length() > string.length()) { return false; } return memcmp(string.data(), search.data(), search.length()) == 0; } bool StringUtils::endsWith(const std::string& string, ...
TOOL
0.975871
6.272483
{ "github_metadata": { "branch": "master", "commit_count": 401, "repo_created_at": "2015-09-21T14:34:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "db986bec...
ed09ebfc-49bd-4528-8b90-39737898a755
ap9891/Leetcode-Practice
leetcodespiralmatrixII.cpp
// class Solution { // public: // vector<vector<int>> generateMatrix(int n) { // vector<vector<int>> v(n, vector<int> (n)); // int count=1; // int sr=0,er=n-1,sc=0,ec=n-1; // while(sc <= ec && sr <= er) // { // for(int j=sc; j<= ec ;j++) // { // v[sr][j] = co...
ALGO
0.999956
4.034373
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-08-02T17:07: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": "92b0f993ea...
83b85d60-04b8-4587-baac-b5e28c083004
ishassan/ProblemSolving
TopCoder/Div 2/498-950 NinePuzzle.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
ALGO
0.999799
4.138314
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-03-11T10:04:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1180de2369...
7cf6a3a2-58b8-4d6e-8b14-2a5a677f2810
cohortfsllc/cohortfs-ceph
src/mds/Locker.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2004-2006 <NAME> <<EMAIL>> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Lic...
TOOL
0.900147
5.397696
{ "github_metadata": { "branch": "ali-upstream-matt", "commit_count": 29769, "repo_created_at": "2015-06-17T20:53:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id...
2cc0dd33-537d-43ab-839a-da3bea1cf2ec
sipeed/MaixCDK
components/vision/src/maix_image_find_blobs.cpp
/** * @author lx<EMAIL> * @copyright Sipeed Ltd 2023- * @license Apache 2.0 * @update 2023.9.8: Add framework, create this file. */ #include "maix_image.hpp" #include "maix_image_util.hpp" namespace maix::image { void _convert_to_lab_thresholds(std::vector<std::vector<int>> &in, list_t *out) { fo...
ALGO
0.928995
5.89873
{ "github_metadata": { "branch": "main", "commit_count": 627, "repo_created_at": "2023-12-20T01:20:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 85, "forks": 27, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "97f4b0820...