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
06f53c8a-ca0a-4530-be5e-c2e3faf65761
mdpham/paramathics_triangular_solve
src/main.cpp
#include <fstream> #include <iostream> #include <vector> #include <bits/stdc++.h> #include <cmath> #include <omp.h> #include "ccs_matrix.h" #include "graph.h" #include "residuals.h" #include "spmv_csc.h" #include "lsolve.h" using namespace std; /* * Reads matrix and vector files given from first two path arguments ...
ALGO
0.999045
3.955653
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-01-22T13:15:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96009606f14f...
0867d374-9172-4445-92cd-4c0ca2593794
kandersk/CS1
Schoolwork/seq.cpp
/* Program that takes two integers (one low and one high and outputs the sum, the square the amount of even numbers, the amount of numbers that end with a 0 (i.e. 10, 100, 1000) of all integers from the lowest to the highest. <NAME> <EMAIL> */ #include <iostream> using namespace std; int main () { int low = 0; ...
ALGO
0.993812
4.491818
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2016-09-23T16:50:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26f5da021...
d75b1a5b-916e-4d3e-871e-b473602d3172
UniMelbHumanRoboticsLab/CANOpenRobotController
src/hardware/platforms/M3/SignalProcessing.h
/** * * \file SignalProcessing.h * \author <NAME> * \version 0.1 * \date 2021-05-06 * \copyright Copyright (c) 2021 * * \brief Signal processing: A basic IIR filtering class and differentiator. * */ #ifndef SIGNALPROCESSING_H #define SIGNALPROCESSING_H #include <vector> #include <iostream> #include <Eigen/D...
ALGO
0.985322
6.117478
{ "github_metadata": { "branch": "master", "commit_count": 583, "repo_created_at": "2020-05-11T07:05:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 34, "forks": 38, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "0d1ce21...
95b2fc40-4ca8-4472-9143-1fe6248e248a
komkanit/problem-solving
week3/ic.cpp
#include<iostream> #include<stdlib.h> #include<cstring> using namespace std; typedef struct _NODE { int value; struct _NODE *next; struct _NODE *prev; } NODE; NODE *head = NULL; NODE *tail = NULL; void insert_right(int data) { NODE *ptr = (NODE*)malloc(sizeof(NODE)); ptr->value = data; ptr->n...
ALGO
0.999953
4.553716
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-02-22T11:07: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": "121280e976...
0a5d42d6-0fda-41df-9b74-0f06cb5db2d0
rafaelcorsi/Intel-FPGA-hls-examples-18.01
tutorials/best_practices/swap_vs_copy/1_ptr_swap_mem.cpp
#include "HLS/hls.h" #include "HLS/math.h" #include <stdio.h> // printf #define NUM_ROWS 4 #define NUM_COLS 4 #define NUM_ELEMENTS 16 #define NUM_MATRICES 5 // result = A * B, where A and B are both n x n matrices void matrix_multiply(float A[NUM_ROWS][NUM_COLS], float B[NUM_ROWS][NUM_COLS], float result[NUM_ROWS]...
ALGO
0.997573
4.855224
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-06-29T11:10:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e65662f89...
d555d235-dfd3-49d2-8a9e-eee407831e01
Rishabh96M/IK_FK_Model_3R
forward_kinematics.cpp
// Forward and Inverse Kinematics for 3R manipulator #include <iostream> #include <cmath> #include <vector> using namespace std; class Forward_kinematics { private: std::vector<float> theta {0.0,0.0,0.0}; std::vector<float> d {0.0,0.0,0.0}; std::vector<float> a {10.0,5.0,5.0}; std::vector<float> alpha {M_PI/2...
ALGO
0.997101
4.76949
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2020-05-06T10:43: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": "ccf1d390a...
976d3cb7-72b8-40c3-a0c0-0765964c044b
frozenbeanxxx/CppProject
CppPrimerPlus/Chapter03/c3_2_exceed.cpp
#include <iostream> #include <climits> #define ZERO 0 int main() { using namespace std; short sam = SHRT_MAX; unsigned short sue = sam; cout << "Sam has " << sam << "dollars and Sue has " << sue << "dollars deposited." << endl; cout << "Add $1 to each account." << endl; sam = sam + 1; sue ...
ALGO
0.961456
3.440339
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2019-06-19T06:55: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": "5ee941548...
823d037a-4a54-45f1-8d58-083890e232dc
RouteInPeace/CurbYourEmissions
benchmark/ga_bench.cpp
#include <benchmark/benchmark.h> #include <memory> #include <random> #include <utility> #include "cye/individual.hpp" #include "cye/init_heuristics.hpp" #include "cye/instance.hpp" #include "meta/common.hpp" #include "meta/ga/local_search.hpp" #include "meta/ga/ssga.hpp" #include "serial/json_archive.hpp" static void ...
ALGO
0.998619
6.53636
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2025-04-13T09:20:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "54a0b10bd78b...
3d16a9cb-577b-4f74-ae35-6e5120e5be74
RyuYiHyun/AlgorithmStudys
MergeSort/main.cpp
#include <string> #include <vector> #include <iostream> using namespace std; template <typename T> class CMergeSort // 2-way 병합 정렬 { public: static void MergeSortFunction(vector<T>& SortArray) { /* reserve( size ) => array의 capacity값이 size 값보다 크면 동작 X, 작으면 공간을 만들고 모든 iterator와 원소가 invalidate resize( rsize ...
ALGO
0.999965
5.472173
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2022-05-09T14:03: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": "b610eb155...
d1c96e1f-27da-483e-82a4-529dca27643e
enzogl25/Competitive-Programing
Codeforces/A. Arrival of the General.cpp
#include <bits/stdc++.h> using namespace std; #define _ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define f first #define s second #define pb push_back #define ppb pop_back using ll = long long; int main() { _ int n; cin >> n; vector<int> v(n); vector<int> v1(n); cin >> v[0]...
ALGO
0.999965
3.695334
{ "github_metadata": { "branch": "main", "commit_count": 166, "repo_created_at": "2025-02-13T22:39: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": "bc927e3adb...
7dc6eeee-873a-448e-9936-63a1147bfa9c
czczup/PAT-Advanced-Level-Practise
1025. PAT Ranking (25).cpp
#include <iostream> #include <algorithm> using namespace std; struct Testee { long long regNumber; int finalRank; int locNumber; int localRank; int score; }; int N, K; Testee testee[30010]; bool cmp(Testee testee1, Testee testee2) { if (testee1.score == testee2.score) { return testee1....
ALGO
0.999684
3.721432
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2017-05-21T04:50: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": "39d9bc98b...
755b61c1-022d-48ce-a9c1-23b604d253c1
tongzx/nt5src
Source/XPSP1/NT/admin/wmi/wbem/common/containers/basictree.cpp
#ifndef __BasicTREE_CPP #define __BasicTREE_CPP /* * Class: * * WmiAllocator * * Description: * * Provides abstraction above heap allocation functions * * Version: * * Initial * * Last Changed: * * See Source Depot for change history * */ #if 0 #include <precomp.h> #include <windows.h> #include...
TOOL
0.989995
5.64519
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-10-12T04:28:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1012, "forks": 555, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "8d540...
d2ed8369-28a1-4316-b31e-42fefab33b57
JaneKorelskaya/Figures
polygon.cpp
#include "polygon.h" #include <cmath> Polygon::Polygon( vector<Point> points) { for (auto it : points) vertices.push_back(it); for (int i = 0; i < vertices.size(); ++i) { if (i == vertices.size() - 1) sides.push_back(Line(vertices[i], vertices[0])); else sides.push_back(Line(vertices[i], vertices[i + 1])...
ALGO
0.991725
4.422043
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-03-25T19:48: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": "4243197d78...
b08f020f-5281-4436-9ed5-38e87ffed764
bluesadi/Pluto
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
//===- SelectionDAGISel.cpp - Implement the SelectionDAGISel class --------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
TOOL
0.967107
4.109345
{ "github_metadata": { "branch": "main", "commit_count": 206, "repo_created_at": "2021-07-20T09:55:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 874, "forks": 189, "issues": 27, "pull_requests": 3 }, "file_meta": { "content_id": "09c2f...
eb6053fb-84c6-4d72-af6d-41c4fec9915f
anika235/LLMs-Performance-in-ICPC-Problems
Solution-Codes/2020/O1-Preview/N.cpp
#include <bits/stdc++.h> using namespace std; /* Solve the system: For i=2..n: sum_j (x_{i,j}-x_{1,j}) * z_j = rhs_i where rhs_i = ( (e_i^2 - ||x_i||^2) - (e_1^2 - ||x_1||^2 ) )/2. That yields (n-1) linear equations in d unknowns. Then impose the first sphere equation: ||z||^2 - 2 z·x_1 + ||x...
ALGO
0.999972
4.385746
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2025-01-05T17:27: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": "dfaaeacbcb8...
ee7bc3b0-5e79-49cb-be85-8b1a10972b12
gaoxiang12/slambook2
ch12/dense_mono/dense_mapping.cpp
#include <iostream> #include <vector> #include <fstream> using namespace std; #include <boost/timer.hpp> // for sophus #include <sophus/se3.hpp> using Sophus::SE3d; // for eigen #include <Eigen/Core> #include <Eigen/Geometry> using namespace Eigen; #include <opencv2/core/core.hpp> #include <opencv2/highgui/highg...
ALGO
0.998124
5.647459
{ "github_metadata": { "branch": "master", "commit_count": 119, "repo_created_at": "2018-08-19T05:21:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6004, "forks": 2097, "issues": 197, "pull_requests": 8 }, "file_meta": { "content_id": "...
b390bca7-5c59-492b-a4ed-b223f69590ce
WyNotRepax/Studi_Legacy
Programmieren 2/Praktikum/Blatt 3/A2/A2.cpp
#include <iostream> using namespace std; int eingabeanalyse(double &, double &, double &); int main() { double max = -100; double min = 100; double avg = 0; int n = eingabeanalyse(max, min, avg); return 0; } int eingabeanalyse(double &max, double &min, double &avg) { int n = 0; while (tru...
TOOL
0.931333
3.384495
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-03-29T16:35:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e2a0778391...
b792bad2-0081-4d79-a330-abbd4a0851da
subokita/Sandbox
NonRigidFaceTracking/NonRigidFaceTracking/FaceTracker.cpp
// // FaceTracker.cpp // NonRigidFaceTracking // // Created by <NAME> on 18/04/14. // Copyright (c) 2014 <NAME>. All rights reserved. // #include "FaceTracker.h" /** * If the histogram is similar, then it's probably the same scene */ double FaceTracker::probSameScene( Mat& gray ) { static int histSize = 256...
ALGO
0.992872
5.904464
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2014-03-04T12:34:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 98, "forks": 70, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "048a06c...
cd126cda-282e-47fb-b756-c2136aa7ca62
rose-compiler/rose
src/midend/programTransformation/loopProcessing/computation/DepCompTransform.h
#ifndef DEP_COMP_TRANSFORM_H #define DEP_COMP_TRANSFORM_H #include <LoopTreeLocality.h> #include <LoopTreeTransform.h> #include <GraphScope.h> #include <DoublyLinkedList.h> class DepCompDistributeLoop { public: //selective distribution struct Result { LoopTreeNode* node; SelectPtrSet<LoopTreeNode> sel; ...
ALGO
0.959611
6.018618
{ "github_metadata": { "branch": "weekly", "commit_count": 23355, "repo_created_at": "2015-04-24T20:54:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 644, "forks": 136, "issues": 59, "pull_requests": 0 }, "file_meta": { "content_id": "66...
fe8e1d22-68f5-4755-bbf5-ad1bd0406b2e
RyanPioneer/Leetcode
1001~1500/1172. Dinner Plate Stacks/main.cpp
/** * Source: https://rb.gy/45iag * Date: 2023/9/15 * Skill: * Runtime: 1184 ms, faster than 25.98% of C++ online submissions * Memory Usage: 619.04 MB, less than 11.02% of C++ online submissions * Time complexity: O(n) * Space complexity: O(n) * Constraints: * */ #include <vector> #include <iostream> #inclu...
ALGO
0.999728
5.442754
{ "github_metadata": { "branch": "main", "commit_count": 504, "repo_created_at": "2021-05-09T23:57: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": "5424815004...
4d0a5224-43a4-4d0c-b59a-718a374f5a32
214514875/Tut4-SpecialCounter
Source.cpp
#include <iostream> using namespace std; class Counter { public: Counter obj(); int c1 = 0; int c2; int stop1 = 0; int incr, decr; Counter(){ } Counter(int val) { incr = val; } Counter& operator+(Counter& inc) { Counter in; in.c1 += 20; return in; } Counter& operator-(Counter& inc) { Coun...
TOOL
0.975898
3.625689
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-03-16T10:49: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": "56803146a2...
90845f6a-c6b6-4b45-8680-6a3a7516d51e
JUNK-CHUAN/Data-Structure-and-Algorithms
Graph/main.cpp
#include "Graphm.h" #include "Method.h" #define UNVISITED 0 #define VISITED 1 #define INFINITY 999999 using namespace std; bool judgeall(Graph *G); void init(Graph* G); int main() { int vertex, edge; cin >> vertex >> edge; Graphm* G = new Graphm(vertex); int v1, v2, wt; for (int i = 0; i < edge...
ALGO
0.999978
3.608684
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-12-01T07:08: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": "9fb34885b9...
ebe36065-b0b9-4467-9cb4-794942001b15
danielmtzbarba/winapi-consultorio
Consultorio/search.h
#pragma once #include "data.h" #include "sort.h" // GENERIC **BINARY SEARCH** FOR A VECTOR OF NODEPOINTERS** template<typename NodeType, typename KeyType, typename Compare, typename Extractor> inline std::vector<NodeType*> binarySearchNodes( const std::vector<NodeType*>& sortedList, const KeyType& target, ...
ALGO
0.999438
5.333837
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2025-05-14T17:02:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "633fcaff3...
07399aa7-de0e-43bf-8af2-a7da8c51254d
scryver/experiments
src/salesman.cpp
#include "interface.h" DRAW_IMAGE(draw_image); #include "main.cpp" #include "../libberdip/drawing.cpp" struct City { s32 x; s32 y; }; struct SalesmanState { RandomSeriesPCG randomizer; u32 ticks; b32 doneSearching; u32 cityCount; City *cities; u32 *currentPath; u32 *bestEver; ...
ALGO
0.999374
4.291978
{ "github_metadata": { "branch": "master", "commit_count": 62, "repo_created_at": "2018-09-26T00:32: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": "dc6c0ddcd...
8543d899-9081-40f7-a5e7-f019b28dce5f
hacch141/Coding-Practice
LeetCode/2360.Longest-Cycle-in-a-Graph.cpp
// 2360. Longest Cycle in a Graph // dfs class Solution { public: void dfs(int u, vector<int>& edges, vector<bool>& vis, vector<bool>& path_vis, vector<int>& cnt, int& ans) { vis[u] = true; path_vis[u] = true; int v = edges[u]; if(v != -1) { if(!vis[v]) { ...
ALGO
0.999804
5.051745
{ "github_metadata": { "branch": "main", "commit_count": 2278, "repo_created_at": "2022-06-25T10:16: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": "a894949a7...
6f930945-9da0-405f-b834-13ab901e9e0a
MiraclesinWang/ACM_exercise
动态规划/树形dp/POJ3585module.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxn = 200100; struct Edge { int to, nxt, len; Edge() {} Edge(int _to, int _nxt, int _len) : to(_to), nxt(_nxt), len(_len) {} }E[maxn*2]; int h[maxn], cnt, f[maxn], d[maxn], val[maxn], deg[maxn]; int n, T; void addedge(int...
ALGO
0.999841
4.298156
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-10-10T07:16: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": "8041c1c48f5a...
ea0f8a48-45ac-423c-9659-300a78ced077
xPedrol/beecrowd
1277.cpp
#include <iostream> using namespace std; struct Aluno { string nome, aulas; }; bool nao_pode_fazer_teste(Aluno aluno) { int presenca = 0; int total = aluno.aulas.size(); for (char aula : aluno.aulas) { if (aula == 'P') presenca++; if (aula == 'M') total--; ...
ALGO
0.995928
3.979156
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2025-01-12T11:33:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3fd0847f76...
93f580ff-e188-41d3-b765-cf4cb3fa9007
amchiri/Traitement_Image
src/tpConnectedComponents.h
#pragma once #include <opencv2/opencv.hpp> cv::Mat ccLabel(cv::Mat image); cv::Mat ccAreaFilter(cv::Mat image, int size); cv::Mat ccTwoPassLabel(cv::Mat image); class UnionFind { private: std::vector<int> parent; std::vector<int> rank; public: UnionFind(int n) { parent.resize(n); ran...
ALGO
0.990198
5.241344
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-04-05T20:17:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "be13b2f41a...
5abe85d0-d783-4af6-a3ec-b884dde74819
jgerschler/ArduinoArcade
Bean Bag Game/BeanBagSensorless/BeanBagSensorless.ino
#include "MeOrion.h" Me7SegmentDisplay disp(PORT_6); MeRGBLed led(PORT_3);// can't combine with switch! MeLimitSwitch switch1(PORT_4,SLOT1); unsigned long previousMillis = 0; unsigned long previousBeepMillis = 0; unsigned long currentMillis; unsigned long currentBeepMillis; int interval = 1000; int beepInterval = 500...
TOOL
0.948338
4.874492
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2018-01-03T18:21: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": "c76cad853...
16ee4a5a-ca07-414b-84db-9b6a0aa87145
jpdotcom/comp_prog-archive
Auto_Upload_Codeforces/Good_Bye_2021_2022_is_NEAR/D_Keep_the_Average_High.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define pb push_back #define FOR(b) for(int i=0;i<(int)b;i++) #define mp(a,b) make_pair(a,b) typedef std::vector<long long> vi; typedef std::pair<int,int> pi; typedef long long ll; #define F first #define S second #...
ALGO
0.99984
4.72477
{ "github_metadata": { "branch": "main", "commit_count": 3908, "repo_created_at": "2022-09-25T03:06:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b482b8d3a...
8aa0e80e-3d50-40a7-b2b7-c2702532fb49
himanshugupta09/LEETCODE_SOLUTIONS
GFG_Problems/maximum-length.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: int solve(int a, int b, int c) { // code here int mini=max(a,max(b,c)); if(mini==a){ if(a<=2*(b+c+1...
ALGO
0.99964
5.88673
{ "github_metadata": { "branch": "main", "commit_count": 2882, "repo_created_at": "2022-06-14T15:17:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "3f4a23d7c...
dee2b16a-d528-4dd9-8d87-4efa7097416f
FerranMartinezVives/PRO1
P64555.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct Point { int x, y, dist; }; int distance(const Point& a, const Point& b) { int x_dist = a.x - b.x; if (x_dist < 0) x_dist *= -1; int y_dist = a.y - b.y; if (y_dist < 0) y_dist *= -1; return x_dist + y_dist; } bool sorting(con...
ALGO
0.999988
4.252447
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-11-30T12:05:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c769c7511c6f...
693f92f3-b831-4bf9-ab4a-4026444e30d9
MiftikCZ/falling_sand
main.cpp
#include <raylib.h> #include <iostream> #include <math.h> #include <random> #define GRID_WIDTH 128 #define GRID_HEIGHT 128 #define WINDOW_WIDTH 512 #define WINDOW_HEIGHT 512 #define FRAME_RATE 60 float randomFloat(float min, float max) { static std::random_device rd; static std::mt19937 gen(rd()); std::un...
ALGO
0.995965
5.806495
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-05-18T13:33: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": "a2e8e0efce12...
ccd2f390-d0ac-41c2-a93c-6d1655d4aed5
sanchit-sinha/CP
Contests/Google/CodeJam2021-IA/B/sol.cpp
#include "bits/stdc++.h" using namespace std; #define IOS {ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);} #define pb push_back #define ll long long #define ld long double #define all(c) (c).begin(),(c).end() #define sz(c) (int)(c.size()) #define mp make_pair #define mt make_tuple #define get(x,c) get<x>(c) #defin...
ALGO
0.99983
3.931629
{ "github_metadata": { "branch": "master", "commit_count": 383, "repo_created_at": "2020-07-18T07:42:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9fb2fcd...
3139d49b-6847-4a81-b006-42a8ecc9c5db
imtiyazMohammed/Leetcode-Problems
1048-longest-string-chain/1048-longest-string-chain.cpp
class Solution { public: static bool comp(string s1, string s2){ return s1.length() < s2.length(); } bool compare(string a,string b){ int count = 0; int index = 0; for(int i = 0 ; i < a.size() and index < b.size(); i++,index++){ if(a[i] != b[index]){ ...
ALGO
0.999996
5.446839
{ "github_metadata": { "branch": "main", "commit_count": 194, "repo_created_at": "2022-05-20T13:16:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a14bb009d9...
3f377a92-0332-48d7-ab2a-daed7699f984
seomoon/sw_expert_academy
탈주범검거.cpp
#include "pch.h" #include <iostream> #include <vector> #include <queue> using namespace std; int n, m, s_x, s_y, l; int result; vector<vector<int>> map; vector<vector<bool>> visit; int direction[4][2] = { {-1, 0}, {1, 0}, {0, -1}, {0, 1} }; //»ó ÇÏ ÁÂ ¿ì int pipe[8][4] = { {0, 0, 0, 0}, {1, 1, 1, 1}, {1, 1, 0, 0}, ...
ALGO
0.999806
5.327154
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-01-18T03:02:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7e3c436527...
92ed13c8-f37b-48d2-8e4a-3fc31d393915
kmjp/procon
yuki/0001-1000/501-600/529.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
ALGO
0.999967
4.203746
{ "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": "621875...
3d70bddd-3e5a-4270-8aac-f89a52c5ee16
walker2/dfcipher
DFC.cpp
#include <iostream> #include "DFC.h" #define swapEndian(x) __cpu_to_be32(x) #define right4(x) ((x) & 0x0000ffff) #define left4(x) ((x) >> 16) #define bit(x, n) ((1 << n) & x) != 0 #define CORRELATION static const u32 ks[8] = { 0xda06c80a, 0xbb1185eb, 0x4f7c7b57, 0x57f59584, ...
ALGO
0.997919
5.01897
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-12-03T22:21: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": "fe9ce6c716...
456cea6d-a9d7-4896-8533-c8d32dda332c
willemvanv/Classes
classes.cpp
#include <iostream> #include <vector> #include <string.h> #include "music.h" #include "movie.h" #include "videoGame.h" using namespace std; //Declaring Functions void add(media **a); void search(int b, media **a); void delet(int b, media **a); //Variables media *list[99]; int place = 0; //Main int main() { bool r...
TOOL
0.930237
3.037751
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2020-10-18T22:47: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": "76d91a0aa3ee...
31db55b9-9554-44cd-9376-38ee311f3a83
CristopherVanegas/University
Programming_1-OOP/Third_Partial/Practices/multiplosDeDos/main.cpp
#include <iostream> #include <stdlib.h> #include <conio.h> #include <windows.h> #include <time.h> using namespace std; int matrix[10][20]; int r = 10, c = 20; struct Cursor { int posX = rand() % 20; int posY = rand() % 10; }; Cursor cursor; void gotoxy(int x,int y); void show(); void llenar(); void mover()...
ALGO
0.932241
3.2683
{ "github_metadata": { "branch": "main", "commit_count": 262, "repo_created_at": "2022-09-20T12:35: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": "041f80ab2f...
80e6f49f-4746-4794-9142-ed13ee408ce4
Techie-TM/Hacktoberfest-2022
ALGORITHMS/Prims_Minimum_Spanning_Tree.cpp.cpp
// Implementation of Prim's algorithm for MST #include<bits/stdc++.h> using namespace std; # define INF 0x3f3f3f3f int main() { int n = 6; vector<pair<int, int >> graph[n];// undirected graph graph[0].push_back({1,3}); graph[1].push_back({0,3}); graph[0].push_back({2,1}); graph[2].push_back({0,1}); graph[1].p...
ALGO
0.999989
4.604731
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2022-10-06T12:56:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "feda85ff819...
a918563e-d55a-4199-b49a-bea5e91a5b1c
SalgueroRoci/Algorithm-Engineering
Project3/NearestNeighbor.cpp
// Assignment 3: Euclidean traveling salesperson problem: improved nearest neighbor algorithm // XX YY ( YOU NEED TO COMPLETE YOUR NAME ) // A special case of the classical traveling salesman problem (TSP) where the input is a Euclidean graph // INPUT: a positive integer n and a list P of n distinct points representing...
ALGO
0.999986
5.242661
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2017-01-20T01:13: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": "56678fa06...
fac22365-6e4c-4886-83b1-6bd526e56404
deeaion/ubb_cs
Year_1/Semester_2/Data Structures and Algorithms/labs/lab_7/MDO.h
#pragma once #include <vector> typedef int TCheie; typedef int TValoare; #include <utility> typedef std::pair<TCheie, TValoare> TElem; #define cap 2 #define null -1111111 #define nullValue std::make_pair(-1111111,-1111111) using namespace std; class IteratorMDO; typedef bool(*Relatie)(TCheie, TCheie); class MDO {...
TOOL
0.975035
3.24422
{ "github_metadata": { "branch": "main", "commit_count": 103, "repo_created_at": "2022-11-08T17:41:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "057f80d32...
3335e046-daf8-4561-87be-1dc5fdd1079a
liumu96/Incremental-Fluids
1-matrixless/Fluid.cpp
#include <algorithm> #include <math.h> #include <iostream> #include "../loadpng/lodepng.h" #include "FluidQuantity.h" #include "FluidSolver.h" using namespace std; int main() { const int sizeX = 128; const int sizeY = 128; const double density = 0.1; const double timestep = 0.005; unsigned ch...
ALGO
0.978081
4.304156
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2023-10-05T08:22: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": "01864e04bd4...
c80149a4-f984-4d1f-858a-7b57142bf35d
ShortTailLab/ph-open
Classes/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2012 <NAME>, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST...
ALGO
0.973636
7.359606
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2014-08-20T03:23:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 518, "forks": 332, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "10f32d...
ac4dfeaf-10b3-4964-8940-4f5ffb46e079
jihunparkme/Problem-Solving
PS_Study/BOJ/2167.cpp
#include <cstdio> #include <vector> #include <queue> #include <algorithm> using namespace std; int A[301][301], DP[301][301]; int main(void) { int N, M, i, j; freopen("input.txt", "rt", stdin); scanf("%d %d", &N, &M); for (i = 1; i <= N; i++) { for (j = 1; j <= M; j++) { scanf("%d", &A[i][j]); } } // (...
ALGO
0.999354
3.782125
{ "github_metadata": { "branch": "master", "commit_count": 186, "repo_created_at": "2019-08-07T14:09:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "31399890...
714ca5a7-98c4-46c3-91e3-00ac172b8c91
binbin-t/Wrap-Complex
Wrap Complex/sos/size.cpp
/* * size.C -- Method Implementations for the SizeEvaluator classes. * * author -- <NAME> * * date -- 12/17/96 */ #include "sos/size.h" #include "li/lipoints.h" #include "li/liminor.h" #include "li/listack.h" // static ofstream os("loglog.txt"); static double hidden1Bound = 1.0e-14; static double hidden2Bound = 1.0e...
TOOL
0.972594
3.805468
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2015-01-15T00:22: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": "e096120885...
6dbfa100-af05-4e5c-8cd0-68caadb92b3e
Danielvargas04/Curso-metodos-simulacion
Orbitas/orbits.cpp
#include <iostream> #include <cmath> //constantes const double g=9.8; const double GM=1.0; //Declaracion de la clase class planet; class planet { private: // posicion, velocidad, fuerza, masa, tamaño double r[3], v[3], f[3]; double mass, radius; public: void init(double x0, double y0, double z0, doub...
ALGO
0.999325
4.456898
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2024-02-13T00:48: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": "b0f9b3087ee...
19cf5dab-75ce-48d5-b944-fcfa42a75315
cksquf98/practice
자료구조/LinkedList.cpp
#include<iostream> using namespace std; // 주말 미션! // 링크드리스트 구현 // C++ : NULL은 0과 같다 class Node { public: Node* next = nullptr; int data; }; class LinkedList { private: int LinkedListSize = 0; public: Node* head = nullptr; Node* tail = nullptr; void printAllNode...
ALGO
0.999375
4.553233
{ "github_metadata": { "branch": "main", "commit_count": 214, "repo_created_at": "2024-04-16T13:21:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "67be2d2a0a...
947a0243-0164-4e66-987e-1970e554735c
cry999/AtCoder
beginner/129/E.cpp
#include <cstdint> #include <iostream> #include <string> #define MOD 1000000007 #define MAX_LOG_L 100001 using namespace std; namespace mod { template <uint_fast64_t mod> struct Modint { private: uint_fast64_t val; public: constexpr Modint( const uint_fast64_t val = 0 ) : val( val % mod ) {} constexpr ...
ALGO
0.999993
4.538284
{ "github_metadata": { "branch": "master", "commit_count": 229, "repo_created_at": "2019-02-18T04:24: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": "3bf20d61...
19bd836b-44a6-4a65-b379-34d574794b7e
bobbys-dev/fast_enet
csmacd.h
#ifndef CSMACD_H #define CSMACD_H #include <cstdlib> #include <string> #include <deque> #include <fstream> #define MAX_QUEUE_SIZE 15 //#define MAX_STATIONS 10 // do no use. do not hardcode the SP limit #define MAX_COLLISIONS 16 namespace CS5310 { typedef size_t time_slot; /** The CSP maintains two queues: a data ...
TOOL
0.934062
3.063419
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-01-03T09:23:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ef2153320...
1447bc95-f06a-433e-82df-37f2f0603a0f
anthonybazelle/Projet-Blender-Conf
C++/ProjetBlenderConf/ProjetBlenderConf/QRReader.cpp
#pragma once #include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" #include <opencv2/imgproc/imgproc.hpp> #include <stdio.h> using namespace cv; class CQRReader { public: CQRReader(void) { } ~CQRReader(void) { } bool CQRReader::Find(Mat img) { //This function takes in an image to sc...
ALGO
0.988808
4.021757
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-06-21T15:24: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": "e45a48b413...
81fc3211-6b06-4e8c-9d02-6cd20cbb4015
MaksimFomov/Zendel-s-algorithm-for-solving-systems-of-linear-algebraic-equations
KursovayaRapota/main.cpp
#include <iostream> #include <cmath> #include <vector> #include <cstdlib> #include <ctime> using namespace std; // Функция для решения системы линейных алгебраических уравнений методом Зейделя vector<double> solveSystem(vector<vector<double>>& A, vector<double>& b, double epsilon, int maxIterations) { int n = A.s...
ALGO
0.999961
4.551078
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-05-14T17:21:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "504ed65e8228...
56194bea-a96f-478c-8ac0-6268f108e7bb
xtf0214/CPP
Contest/ZZUIL/郑轻新生赛/2.cpp
#include<bits/stdc++.h> using namespace std; int n, r, score, combo; double Ox[1000005], Oy[1000005], Cx, Cy; int main() { cin >> n >> r; for (int i = 0; i < n; i++) scanf("%lf %lf", &Ox[i], &Oy[i]); for (int i = 0; i < n; i++) { scanf("%lf %lf", &Cx, &Cy); double d = sqrt((Ox[i]...
ALGO
0.999386
3.799266
{ "github_metadata": { "branch": "main", "commit_count": 552, "repo_created_at": "2021-12-15T11:11:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "907c10bea9...
d76f7790-9a15-4bc6-a02a-c5e055b68065
haow1990/algorithms
leetcode-oj/first-missing-positive.cc
#include <iostream> #include <cstdlib> using namespace std; class Solution { public: void swap(int A[], int i, int j) { int tmp = A[i]; A[i] = A[j]; A[j] = tmp; } int firstMissingPositive(int A[], int n) { int iPosMax = 0; // partition positives and non-positives...
ALGO
0.999898
4.062338
{ "github_metadata": { "branch": "master", "commit_count": 177, "repo_created_at": "2013-03-02T05:39: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": "b25530b4...
88ee8aa5-08dc-45cc-8323-d11b36ed18f0
mizmorr/clabs
lab8/task2.cpp
#include <iostream> #include <vector> #include <set> #include <string.h> #include <string> #include <algorithm> #include <iterator> using namespace std; vector<set<int>> firm; vector<set<int>> conflicts; vector<vector<pair<int, string>>> ash; vector<vector<pair<int, string>>> ach; bool IsContain(set<int>& s, int elt...
TOOL
0.982255
4.06427
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-09-11T23:04: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": "003813852ff...
97282962-12a6-492c-9e1e-93e51efc74c4
camil0palacios/Competitive-programming
solutions/uri/paradigms/2106 Assembling/solution.cpp
#include <bits/stdc++.h> #define endl '\n' using namespace std; const int INF = 1e9; const int Mxn = 18; int c[Mxn][Mxn]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n; while(cin >> n, n) { for(int i = 0; i < n; i++) { for(int j = 0; j < n; j++) { ...
ALGO
0.999968
4.665119
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2018-10-30T16:26: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": "6584d1bd3...
59316c9f-df19-45dd-a2ad-8c9514d9432f
tensorflow/tensorflow
tensorflow/core/kernels/scan_ops.cc
/* Copyright 2016 The TensorFlow 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 by applicable law or a...
ALGO
0.963054
7.66791
{ "github_metadata": { "branch": "master", "commit_count": 182413, "repo_created_at": "2015-11-07T01:19:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 190773, "forks": 74758, "issues": 873, "pull_requests": 553 }, "file_meta": { "content...
09096918-4e31-4149-9c7b-218fc64b6b09
electrobot-fr/coupe2025
pami/src/pami.ino
#include <Servo.h> #include <Arduino.h> #include <AccelStepper.h> // parametres pour moteurs pas à pas #define CAM_DEBUG_LEVEL_ERROR 1 AccelStepper stepper2(1, 2, 5); AccelStepper stepper3(1, 3, 6); #define PERIMETRE_ROUE 188 // 6 * 3.14 mm #define PAS_DANS_TOUR 1600 #define COEF_PAS_PAR_MM 8.5 // parametres pour s...
TOOL
0.986185
4.123601
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2024-11-15T19:57:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 1, "issues": 12, "pull_requests": 2 }, "file_meta": { "content_id": "84353412bad...
0ee7a2d4-cec6-4876-9678-2aa9410f36bc
sabasarwar/Coding_Practice
Leetcode/Leetcode June Challenge/06_Queue_Reconstruction_by_Height/main.cpp
/* ---------------------------------------- Problem Statement ------------------------------------ Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the person and k is the number of people in front of this person who have a h...
ALGO
0.999993
5.523878
{ "github_metadata": { "branch": "master", "commit_count": 84, "repo_created_at": "2020-04-21T14:14:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "42b5fe4c1...
8e006ec0-76d4-4e28-8da1-c3a0bd3324db
HawDinh/CodePTIT
Code_CPP/ds_nhan_vien.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; int stt=1; struct NhanVien{ string mnv; string ten; string gioitinh; string date; string diachi; string thue; string datehd; }; void chuanhoama(string &s,int i){ if (i<10) s="0000"+to_string(i); else s="000"+to_st...
ALGO
0.980637
3.711426
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2023-05-26T12:41: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": "69f7ff2df50...
facd7b78-728c-476d-8340-31df59119633
Rajan1902/cpp-practice
day83.cpp
// Day 83 coding Statement : // Given a complete binary tree with the height of H, we index the nodes respectively top-down and left-right from 1. The i-th node stores a positive integer Vi. Define Pi as follows: Pi=Vi if the i-th node is a leaf, otherwise Pi=max(Vi*PL, Vi*PR), where L and R are the indices of the le...
ALGO
0.999883
3.519644
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2023-07-16T13:31: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": "66abb894eda...
1f45d7d4-8d04-4190-8544-142c6b3ea638
hieu-ln/IT82-03
CodeC2/PhamDuongHoa_C2_Bai1.cpp
//#include <iostream> //using namespace std; // //const int maxx=100; //int a[maxx],n,x; // //bool input(int a[],int &n) //{ // cout<<"Nhap do dai mang "; // cin>>n; // if (n>0 && n<=100) // { // for (int i=0;i<n;i++) // { // cout<<"nhap phan tu a["<<i<<"] ="; // cin>>a[i]; // } // return true; // } // else //...
TOOL
0.98932
3.596402
{ "github_metadata": { "branch": "master", "commit_count": 132, "repo_created_at": "2019-06-26T10:11:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1b798116...
f5ff4ef2-fdae-41c2-b29b-8e5c19b30456
longruiliu/Personal-Work
leetcode/balanced_bt.cpp
#include<iostream> #include<stdlib.h> using namespace std; typedef struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }*Tree; class Solution { public: bool isBalanced(TreeNode *root) { if (NULL == root) ...
ALGO
0.999963
4.003349
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2012-07-19T02:38: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": "00ccee339...
b1e79a42-d48a-402d-ad6a-fcda530eafe5
DikshantBadawadagi/DSA
kSHort.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main() { int n, m, k; cin >> n >> m >> k; vector<vector<pair<int, int>>> adj(n + 1); for (int i = 0; i < m; i++) { int u, v, w; cin >> u >> v >> w; adj[u].push_back({v, w}); } priority_q...
ALGO
0.999995
4.717297
{ "github_metadata": { "branch": "main", "commit_count": 413, "repo_created_at": "2024-09-15T05:31: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": "4f571916cf...
335a85e2-c28a-4aff-9a08-0c0568177c32
vino-jasuba/data-structures-tuts
tree.h
#ifndef TREE_H #define TREE_H #include "tree_node.h" #include <iostream> template <typename T> class Tree { public: Tree() :rootNode(nullptr) {} void insertNode(const T& value) { insert_node(&rootNode, value); } void removeNode(const T& value) { ...
ALGO
0.981332
4.747719
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-12-12T14: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": "70158839f7...
148eb736-15e4-4323-99a4-7b449623cf04
yitati/LCProject
Lcode/2Sum2Arrays.cpp
/* * 2Sum2Arrays.cpp * Given two arrays A and B, determine whether or not there exists a pair of elements, one drawn from each array, that sums to the given target number. Assumptions The two given arrays are not null and have length of at least 1 Examples A = {3, 1, 5}, B = {2, 8}, target = 7, return true(pick 5...
ALGO
0.999505
5.860765
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2016-07-29T22:19:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3886911e3...
4e482977-826f-4e58-8fb3-e02f733c8cc6
dev-jaemin/BOJ_Study
legacy/210315_210321/4963.cpp
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <queue> using namespace std; int w, h, cnt; int matrix[55][55]; bool visited[55][55]; vector<int> answer; vector<pair<int, int>> make_adj(int i, int j){ vector<pair<int, int>> ret; if(i > 1 && matrix[i-1][j] == 1){ ...
ALGO
0.999836
4.237203
{ "github_metadata": { "branch": "main", "commit_count": 100, "repo_created_at": "2021-02-07T00:39: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": "6089b78700...
7ee21554-f55f-4410-99a9-24a92b16e6db
ecoon/ats-columns
src/constitutive_relations/ewc/permafrost_model.cc
/* -*- mode: c++; indent-tabs-mode: nil -*- */ /* Ugly hackjob to enable direct evaluation of the full model, on a single WRM/region. This is bypassing much of the "niceness" of the framework, but seems necessary for solving a cell-wise correction equation. Uses intensive, not extensive, forms. Authors: ...
ALGO
0.977598
6.727813
{ "github_metadata": { "branch": "master", "commit_count": 2750, "repo_created_at": "2017-07-06T11:51:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60467fe...
4c902adf-0f07-4c04-80b8-228d5586c051
Rodrigo61/GUAXINIM
URI/2233/main.cpp
#include "bits/stdc++.h" using namespace std; #define db(x) //err << #x << " == " << x << endl #define all(container) container.begin(), container.end() #define mp(i,j) make_pair(i,j) #define pb push_back typedef pair<int,int> pii; typedef long long ll; typedef vector<ll> vll; typedef vector<int> vi; typedef vector<p...
ALGO
0.999532
3.595037
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2018-03-16T13:30: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": "4b320abca...
1a4decb9-aa5d-423d-8654-f9a9cd1a5cea
Nexisato/LeetCodeDiary
LeetCode/0120-Triangle/120.cpp
/* * @Date: 2024-01-11 11:56:37 * @Author: nexisato * @FilePath: /LeetCodeDiary/LeetCode/0120_Triangle/120.cpp * @Description: */ #include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; // 正常的多维 DP class Solution { public: int minimumTotal(vector<vector<int>>& triangle) ...
ALGO
0.999977
5.933621
{ "github_metadata": { "branch": "main", "commit_count": 161, "repo_created_at": "2020-11-12T09:15:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4cb6764f05...
1e4fa30c-23d0-4b05-b73a-742287b0b8a0
Danee-wawawa/coding-for-interview
FindMinRotateArray.cpp
#include <iostream> #include <stdexcept> #include <cstdio> using namespace std; int MinInOrder(int a[], int length){ int min = 0; for(int i = 1;i < length;i++){ if(a[min] > a[i]){ min = i; } } return a[min]; } int Min(int a[], int length){ if(a == NULL || length <= 0){ ...
ALGO
0.999931
3.716224
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2018-06-21T07:39: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": "20ee8b2ed...
0bf90083-8d42-41c6-9142-02129794893f
pjakwert/gwell3d
libQGLViewer-1.3.7/QGLViewer/EPSRender/EPSRender.cpp
/**************************************************************************** This file is part of the QGLViewer library Copyright (C) 2002-2004 <NAME> (<EMAIL>) Version 1.3.7 Release 1. Packaged on Friday April 30, 2004. http://artis.imag.fr/Members/Gilles.Debunne/QGLViewer libQGLViewer is free software; you ...
TOOL
0.922427
5.26866
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-08-10T21:28: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": "35556ddc4e...
0f7ac41a-12b4-4b72-b627-ca1da07abfa8
google/highway
hwy/contrib/sort/vqsort_i16a.cc
// Copyright 2021 Google LLC // SPDX-License-Identifier: Apache-2.0 // // 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 requ...
ALGO
0.999404
7.54512
{ "github_metadata": { "branch": "master", "commit_count": 3016, "repo_created_at": "2019-09-06T12:41:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4745, "forks": 358, "issues": 32, "pull_requests": 9 }, "file_meta": { "content_id": "f2...
7f6c29db-d1d2-4f5e-b2e7-f95aaba667eb
Kushagra-Gupta-2607/Dynamice-Programming-Theory-Questions
25. LCS(LC 1143).cpp
// Problem Link: // Leetcode 1143. Longest Common Subsequence: https://leetcode.com/problems/longest-common-subsequence/ // Recursion + Memoization DP class Solution { public: using vi = vector<int>; using vvi = vector<vi>; int lcs(string& text1, string& text2, vvi& dp, int idx1, int idx2){ i...
ALGO
0.999979
6.496313
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-07-23T13:32: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": "db85379eb88...
90a8b379-b481-423e-8412-ef7cf37bbf1f
Shikhar-S/Analysis-of-Competitive-Codebase
Data/Contest1236/all/29086337_62797953.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const int INF = 0x3c3c3c3c; const ll INF_L = 0x3c3c3c3c3c3c3c3c; const int MAX_N = 309; int arr[MAX_N][MAX_N]; int main(){ cin.sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; int c = 1; ...
ALGO
0.999982
4.076561
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2019-11-22T14:40: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": "c9eba2b60...
a9a421d5-0fd0-4f04-8050-d8d0c5707584
bg2b/aoc24
03/doit.cc
// -*- C++ -*- // g++ -std=c++20 -Wall -g -o doit doit.cc // ./doit 1 < input # part 1 // ./doit 2 < input # part 2 #include <iostream> #include <string> #include <optional> #include <cctype> #include <cassert> using namespace std; // I was tempted to use std::regex, but couldn't bring myself to face // the horror...
ALGO
0.996369
5.706307
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2024-11-27T01:16:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab4b59090c4...
d87ace98-c1a9-45a4-be19-7bedf9aaf737
kth-competitive-programming/tinykactl
test/tinystl/10354.cpp
/****************************************** * * @JUDGE_ID: 25719RJ 10354 C++ * * Problem 10354 "Avoiding the Boss" * * <NAME>, <<EMAIL>> * POPUP Tävling 3 (Valladolid), 2002-09-13 *****************************************/ #include <iostream> //#include <cstdio> //#include <algorithm> //#include <vector> //#in...
ALGO
0.999532
3.54734
{ "github_metadata": { "branch": "master", "commit_count": 494, "repo_created_at": "2017-06-05T15:42:03.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 20, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cb64ffb3...
b7db80d9-cf6f-4697-857f-d16af5858ad8
txxxxc/competitive-programming
ABC_237/b/first/index.cpp
#include <bits/stdc++.h> using namespace std; #define debug(arg) std::cerr << #arg << ": " << (arg) << '\n' #define INF ((1LL << 62) - (1LL << 31)) #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() using ll = long long; using P = pair<int, int>; using Graph = vector<vector<int>>...
ALGO
0.999932
4.15033
{ "github_metadata": { "branch": "master", "commit_count": 263, "repo_created_at": "2022-05-02T08:48: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": "777ab9ca...
c4411281-4dd3-477f-b3d5-98fe051a3884
ashishch164/DTU-SE-Subjects-work
Software Testing Lab/robustness.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int find_min(int nums[] , int len){ int max = INT_MIN; for (int i = 0; i < len; ++i) { if (nums[i] > max) { max = nums[i]; } } return max; } struct Testcase { int num_vars, output ,*variables; Testcase(int num_vars , int* variables){ this->num_vars = num...
ALGO
0.999864
3.604759
{ "github_metadata": { "branch": "main", "commit_count": 142, "repo_created_at": "2021-06-20T07:04:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8e2936b1a...
70efc318-7518-4c2a-b102-236342ca2737
gc5k/gear2
include/xLDgrm.hpp
#ifndef XLDGRM_HPP_ #define XLDGRM_HPP_ #include <vector> #include <math.h> #include <Eigen/Dense> #include <Eigen/Core> #include <Eigen/LU> #include <Eigen/SVD> #include <Eigen/QR> #include <boost/math/distributions/students_t.hpp> #include "genotype.h" #include "Goptions.hpp" #include "global.h" #include "plinkNum....
ALGO
0.998106
3.614682
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-06-18T14:18:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "6ef5dc65ac9...
8c66b7bc-4315-4620-a10e-646736e84be5
alejandroastudillo/urdf2modelcasadi
urdf2model/src/functions/robot_expressions.cpp
#include "robot_expressions.hpp" namespace mecali { casadi::Function get_robot_expressions(CasadiModel &cas_model, CasadiData &cas_data, std::vector<std::string> frame_names, bool AUGMENT_ODE) { std::vector<CasadiScalar> func_outputs; std::vector<std::string> output_names; int n_req_frames = frame_na...
ALGO
0.98444
6.082157
{ "github_metadata": { "branch": "master", "commit_count": 178, "repo_created_at": "2019-05-23T13:48:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 10, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "4329b1...
f42cf27d-884c-4fb4-a936-7bd8f518d71c
Fengdalu/acm-icpc
Hdu/4052.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <map> #include <set> using namespace std; const int Maxn = 100010; map<long long, int>base; typedef map<long long, int>::iterator mit; struct node{ long long l, r, h; long long v; node() {} node(long long l, long lon...
ALGO
0.999768
3.432532
{ "github_metadata": { "branch": "master", "commit_count": 772, "repo_created_at": "2014-12-24T15:25:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "849191c4...
ec71351c-4e9b-455a-b86b-4e3f61fadb13
soumik9876/Lightoj-solutions
Lightoj 1148 - Mad Counting.cpp
#include<bits/stdc++.h> #define endl '\n' #define time clock_t tStart = clock(); #define show printf("Time taken: %.6fs\n", (double)(clock() - tStart)/CLOCKS_PER_SEC); #define ll long long int #define loop(a,b) for(int i=a;i<=b;++i) #define count_1(n) __builtin_popcountll(n) #define pb ...
ALGO
0.99982
3.270894
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2020-07-02T17: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": "7c9f0cb68...
91a60ccc-2da3-478e-b3b9-c0ed09a61950
G4tLan/customhandovealgorithms
model/songMoonAlgorithm.h
/* * This algorithm is developed based on the work by: * <NAME> et al. from the paper: * Efficient Handover in LTE-A by Using Mobility * Pattern and User Trajectory Prediction * */ #ifndef SCRATCH_SONG_MOON_ALGORITHM_H #define SCRATCH_SONG_MOON_ALGORITHM_H #include <ns3/lte-handover-algorithm.h> #include <ns3...
ALGO
0.999165
6.399212
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2019-07-21T18:18: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": "08115f898...
d90b39b4-21ae-4c0a-a7c2-b060412c133e
github-pmp/CompetitiveProgramming
Trapping rain water/Trapping_rain_water.cpp
/*COMPLEXITY*/ /*To compute the time complexity of this algorithm we have to cosider the costruction of two ausiliary data structures and the time for compute the amount of water. The first step is to calculate the maximum element of the array and this costs ϴ(N). The second step is to create 2 array: MR and ML, with s...
ALGO
0.999968
5.625397
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2020-09-21T14:58: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": "713c16a2e...
ded22af3-101c-43b9-a049-c76186930fad
DuanYaQi/leetcode
DS_Tree/513+findBottomLeftValue_DFS.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999994
5.909558
{ "github_metadata": { "branch": "master", "commit_count": 309, "repo_created_at": "2021-03-15T10:04:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e100ee2...
ef48795e-6c47-4f9b-aaf6-24433ae5d20a
Marcus-Davi/Cpp-OpenCV
src/vo.cpp
#include <iostream> #include <vector> #include "opencv2/opencv.hpp" #include <unistd.h> #include <Eigen/Dense> #define FRAMES_PATH "/home/marcus/Workspace/Coding/Python/bm_frames/" using namespace cv; using namespace std; // camera int FOCAL_LENGTH = 460; const int ROW = 720; const int COL = 1280; // default cam inf...
ALGO
0.980882
5.003416
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-04-08T15:35: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": "823d9c1977...
d816b1a1-9d76-4824-a61a-c5880259c156
NerdPotatoo/Problem-Solving
Toph/AryasCounting.cpp
#include<bits/stdc++.h> #define ll long long using namespace std; int main(){ int t; cin >> t; int i = 1; while(t--){ int A, B, C; cin >> A >> B >> C; if((A > B) && (A > C)){ cout << "Case " << i <<": "<< 'A' << "\n"; } else if((B > A) && (B > C)){ ...
ALGO
0.999806
3.984408
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2024-01-02T14:38: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": "f1abb5d6a13...
fa5f649b-4b65-4073-8041-b2bc06705809
bizkut/warz-client
External/NaturalMotion/common/NMNumerics/src/NMSolverLU_imp.cpp
// Copyright (c) 2010 NaturalMotion. All Rights Reserved. // Not to be copied, adapted, modified, used, distributed, sold, // licensed or commercially exploited in any manner without the // written consent of NaturalMotion. // // All non public elements of this software are the confidential // information of NaturalMo...
ALGO
0.974832
6.165819
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-12-20T14:48:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 17, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "523bed4f...
cb305465-fd56-4c1c-ac8b-58f385079d36
weirme/leetme
pat1007.maximum-subsequence-sum.cpp
#include <iostream> using namespace std; const int N = 10010; int main() { int n; cin >> n; int arr[N]; int max = -1; int temp = -1; int start = 0; int tempStart = 0; int end = n-1; for (int i = 0; i < n; i++) cin >> arr[i]; for (int i = 0; i < n; i++) { if (temp >= 0) ...
ALGO
0.999891
3.505482
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2019-08-20T01: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": "508664782...
6d08852c-d665-4cbb-8aa8-62645113beca
Desi9nerd/Programmers
백준/Silver/4396. 지뢰 찾기/지뢰 찾기.cc
#include <iostream> #include <vector> #include <string> using namespace std; int dirY[8] = { -1, 0, 1, 0, -1, -1, 1, 1 }; int dirX[8] = { 0, -1, 0, 1, -1, 1, 1, -1 }; int n; vector<string> v; vector<vector<char>> result; void Cal(int y, int x) { int cnt = 0; for (int i = 0; i < 8; i++) { int ny = y + dirY[i]; ...
ALGO
0.999948
4.203027
{ "github_metadata": { "branch": "main", "commit_count": 500, "repo_created_at": "2023-03-31T08:04: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": "4d5985abc2...
3ae611b2-738b-42f0-b543-a7de1a196df8
1297656202/algorithm
数据结构/主席树/主席树静态(可持久化权值线段树).cpp
给定 n个整数构成的序列 a,将对于指定的闭区间 [l, r] 查询其区间内的第 k 小值。(1≤n,m≤2×10^5) 使用主席树即可解决,也叫可持久化权值线段树,静态的意思是指整个序列不带修改 主席树维护的节点是权值,即这个权值的数共有多少个,然后因为权值可能很大,所以要加上离散化 总结:主席树很多时候,处理的是一个静态的序列,对序列进行多次询问 每次询问一个区间内的第k大值,或者是在权值在[x,y]之间的数的和,最大值,最小值什么的 前面的那个区间,意味着需要可持久化,后面那个对一段权值上的操作,意味着需要权值线段树 #include<bits/stdc++.h> #define ll long long #d...
ALGO
0.999989
4.188382
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2023-04-18T00:27:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7bacbee3d...
025a6ccb-cb05-442f-91cd-b59484cdca3c
fractalismx/programasVillanueva
MetodosNumericos/MNI/PosicionFalsa.cpp
#include<iostream> #include<cstdlib> #include<cmath> using namespace std; double Validar(void); double Funcion(double A); bool Bandera(double &A, double &B); void PF(double &A, double &B, const double &E); int main(void) { system("color 4F"); double a,b,e; char o; do { cout<<"Este Programa realiza la...
ALGO
0.998045
3.591713
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-02-28T01:35: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": "696bf4e2df...
b42550f1-6001-4b8f-9091-d2d4a9440abe
TheaZhuu/CS253
Linkedlist_Lab/ll.cc
#include "ll.h" #include <cstdlib> #include <bits/stdc++.h> #include<iostream> using namespace std; LinkedList::Link::Link(unsigned uiData, Link *pNext){ m_uiData = uiData; m_pNext = pNext; } LinkedList::LinkedList() { m_pHead = nullptr; // This linked list is empty. } bool LinkedList::insert(unsigned ...
ALGO
0.9991
4.035354
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2023-01-18T04:17:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d14261c5574...
eb470ee6-41dd-4156-82cd-09e02519777c
rcppmlpack/RcppMLPACK1
src/mlpack/core/arma_extend/glue_ccov_meat.hpp
// Copyright (C) 2010 NICTA and the authors listed below // http://nicta.com.au // // Authors: // - <NAME> (conradsand at ieee dot org) // - <NAME> (dimitris dot mpouzas at gmail dot com) // - <NAME> (ryan at igglybob dot com) // // This file is part of the Armadillo C++ library. // It is provided without any warrant...
ALGO
0.994135
6.30907
{ "github_metadata": { "branch": "master", "commit_count": 102, "repo_created_at": "2014-06-09T23:40:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 60, "forks": 14, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "d027ab0...
142131d8-f1dc-40ca-90a9-b545829418fe
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": ...
1113639c-2761-4392-9821-4e3ca9bd7403
eduardoyutaka/uri
beginner/2552.cpp
// CheeseBreadSweeper #include <iostream> using namespace std; int solve(int mtx[][100], int i, int j, int m, int n) { if (mtx[i][j]) return 9; int res = 0; if (i==0 && m==1) { ; } else if (i==0 && m>1) { res += mtx[i+1][j]; } else if (i==m-1 && m>1) { res += mtx[i-1][j]; } else { res ...
ALGO
0.999984
4.235881
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2020-04-03T20:55:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d079c6bc7...
19509dfc-0791-4d57-bcf9-239e16d0a811
kamyu104/LeetCode-Solutions
C++/minimum-number-of-days-to-make-m-bouquets.cpp
// Time: O(nlogd), d is the max day of bloomDay // Space: O(1) class Solution { public: int minDays(vector<int>& bloomDay, int m, int k) { if (m * k > bloomDay.size()) { return -1; } int left = 1, right = *max_element(cbegin(bloomDay), cend(bloomDay)); while (left <= ri...
ALGO
0.999992
5.948558
{ "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": ...
45b8a553-1b28-45d0-b3a6-ccaa7287dd71
krkartikay/CodeForces-solutions
codeforces/476/B.cpp
// kartikay26 #include <bits/stdc++.h> using namespace std; #define debug(x...) #ifdef LOCAL #include "prettyprint.hpp" #endif typedef long long int ll; typedef double db; typedef vector<ll> vi; typedef pair<ll, ll> pii; #define int ll #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define clr(...
ALGO
0.999982
3.8082
{ "github_metadata": { "branch": "master", "commit_count": 477, "repo_created_at": "2020-12-27T05:07: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": "5011d5af...