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 |
|---|---|---|---|---|---|---|---|
bf34dc2c-2c70-4fc5-b16b-1d2e76941f19 | rafaelGuasselli/exercicios | judges/codeforces/practice/221d.cpp | #include<bits/stdc++.h>
//#define int long long
using namespace std;
int valores[100005];
int freq[100005];
int answer[100005];
int qr[100005];
int ql[100005];
int count;
signed main() {
cin.tie(0);
cout.tie(0);
ios_base::sync_with_stdio(0);
int n, m; cin>>n>>m;
int sqrtWidth = floor(sqrt(n));
freq[0] = -1e... | ALGO | 0.999949 | 4.390448 | {
"github_metadata": {
"branch": "main",
"commit_count": 347,
"repo_created_at": "2023-08-12T16:11:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "022102ef1a... |
fd686abf-d284-44f6-aab6-df4a0d9e0475 | gaetano-7/FDP2 | Esercitazioni Avolio/Esercitazione 7 - 12.11.2021/Per casa/310/materiale_esercizio2/Atletica.cpp |
#include "Atletica.h"
/*
Restituire l'atleta piu` pagato tra quelli che hanno partecipato ad almeno una gara di CENTO.
Lo stipendio di un atleta e` dato dalla somma dei premi ricevuti in tutte le gare vinte.
In caso di piu` atleti con lo stesso stipendio restituire il primo in ordine alfabetico.
Se non sono present... | ALGO | 0.986681 | 3.603558 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-05-30T15:47: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": "49a3b7e9b7ed... |
61be90a3-3d76-4af9-add1-8f6ec19083e3 | kaikai581/graduate-svn-repo | Simulation/MeanMuonEnergyWithCylinderAndRpcCoverage/meanenergy.cpp | /*
* This program is to calculate the mean muon energies for each AD in each hall.
* First partition the IAV into predefined number of pixels.
* Second for each pixel take the center of the pixel and draw a line according
* to each MUSIC muon and extrapolate to the RPC plane. It requires 2
* conditions to keep the... | ALGO | 0.915634 | 5.036717 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-01-08T08:12: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": "37657bc5a4... |
e2642e1a-2772-44b6-a079-b8330ce30a7e | DmitriCojocari/BazeleProgramarii1 | Programe/Unitatea10/String.cpp | #include <iostream>
#include <ctype.h>
using namespace std;
unsigned countDigits(string);
unsigned countVowels(string);
void printReversedString(string);
bool haveA(string);
bool isSentence(string);
unsigned countConsonants(string);
unsigned countCapitals(string);
unsigned countLowers(string);
string upperToLower(str... | TOOL | 0.987026 | 3.695415 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-05-08T09:27: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": "bf3848366114... |
b9682e13-e138-4ed5-9d1a-f971e389165a | ahmedgamalelazab/c-Container | AVLtREE.h | /*
today is 6/9/2020
i'm still in the damn army
this is avl tree which is a node clollection and this is the best container to contain and search for the data even if u entered 1 ,2 ,3
tested on Visual Code using c++ extensions
tested on Visual studio c++ too
tested on all text editors and ... | ALGO | 0.983438 | 3.366187 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2020-09-06T03:11:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4b72913c7f... |
54c16042-60e0-4906-981b-e4e5c81d8fff | ffs97/iitk-courses | sem5/cs345/assignments/special-assign/leda/test/core/misc/order.cpp | /*******************************************************************************
+
+ LEDA 6.3
+
+
+ order.c
+
+
+ Copyright (c) 1995-2010
+ by Algorithmic Solutions Software GmbH
+ All rights reserved.
+
*******************************************************************************/
// This programs is usin... | TOOL | 0.930979 | 4.720462 | {
"github_metadata": {
"branch": "master",
"commit_count": 86,
"repo_created_at": "2017-09-12T18:48:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 91,
"forks": 88,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "89e026a... |
b8df1402-0194-483b-9d03-96ffbace602d | aYangYa/sortByThreads | common/common.h | //
// Created by dilu on 23-11-22.
//
#ifndef SORTBYTHREADS_COMMON_H
#define SORTBYTHREADS_COMMON_H
//
// Created by dilu on 23-11-20.
//
#include <iostream>
#include <random>
#include <fstream>
#include <iomanip>
#include <climits>
#include <dirent.h>
#include <string>
#include <sstream>
#include <algorithm>
#inclu... | TOOL | 0.973162 | 4.471544 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-11-21T12:14: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": "d97ccb31d2f6... |
fb77b7f2-88ff-4eb7-a29c-90c3bc31e54b | ArutoriaWhite/Competitive-programming | tioj1084.cpp | #include <bits/stdc++.h>
#define rep(i,j,k) for (int i=j; i<=k; i++)
#define de(x) cout << #x << '=' << x << ", "
#define dd cout << '\n';
#define ff first
#define ss second
#define pb push_back
#define pui ios::sync_with_stdio(0), cin.tie(0);
using namespace std;
typedef pair<int,int> pii;
const int N = 2050;
vector<... | ALGO | 0.999944 | 4.613703 | {
"github_metadata": {
"branch": "master",
"commit_count": 254,
"repo_created_at": "2019-10-18T17:51:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7fe09885... |
c17adb60-ab9f-4b82-9422-d9a220a06a90 | raincross7/code-similarity | codes/train_code/problem486/problem486_152.cpp | #include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include<map>
using namespace std;
int main()
{
int N, P;
string S;
vector<int> mod, dmod;
cin >> N >> P;
cin >> S;
reverse(S.begin(), S.end());
if(P != 2 && P != 5){
mod.resize(S.size());
dmod.res... | ALGO | 0.99989 | 4.329079 | {
"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": "4bda551a70f3... |
4cab65c4-7f3c-49e3-81d2-36a52d05eb70 | morris821028/UVa | OnlineJudge/ZEROJUDGE/a141. 柏森想要學妹!!!.cpp | #include<stdio.h>
#define MaxV 1000000
void MergeSort(int, int);
void Merge(int, int, int);
struct Link {
short x, y, w;
}Data[1001], X[1001];
int NodeT[1001], NodeL[1001];
void Print_Path(int now, int L[], int flag) {
if(L[now] != -1) Print_Path(L[now], L, 0);
printf("%d%s", now, flag == 0 ? "->": "\n");
}
int S... | ALGO | 0.999964 | 3.79579 | {
"github_metadata": {
"branch": "master",
"commit_count": 1197,
"repo_created_at": "2013-06-14T12:34:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 571,
"forks": 269,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "934... |
150194e6-3f23-4eda-a97f-417748737150 | SwagatG/HackerRank_Solutions | Project Euler/Project Euler [029] - Distinct Powers.cpp | /*
PROBLEM:
Consider all integer combinations of a^b for 2 <= a <= 5 and 2 <= a <= 5:
2^2=4 2^3 = 8 2^4 = 16 2^5 = 32
3^2=9 3^3 = 27 3^4 = 81 3^5 = 243
4^2=16 4^3 = 64 4^4 = 256 4^5 = 1024
5^2=25 5^3 = 125 5^4 = 625 5^5 = 3125
If they are then placed in numerical order, with any repeats removed, we get the f... | ALGO | 0.999874 | 5.415287 | {
"github_metadata": {
"branch": "master",
"commit_count": 83,
"repo_created_at": "2016-08-10T03:41: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": "92e0f2a66... |
b6718bb0-6645-4c63-8953-2b6cef7517e9 | tmoutinh/Cpp_Modules | Cpp module 09/ex02/PmergeMe.hpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* PmergeMe.hpp :+: :+: :+: ... | ALGO | 0.981894 | 5.570594 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2023-12-23T19:14: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": "7442a2d4f78... |
067a66fa-31bd-4a18-b182-1b192047cd4a | windystrife/UnrealEngine_NVIDIAGameWorks | Engine/Source/ThirdParty/PhysX/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactSphereBox.cpp | // This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation... | ALGO | 0.996992 | 5.286379 | {
"github_metadata": {
"branch": "4.18-GameWorks",
"commit_count": 14,
"repo_created_at": "2018-03-06T15:44:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 284,
"forks": 176,
"issues": 4,
"pull_requests": 2
},
"file_meta": {
"content_id"... |
1008f639-1308-494b-a3f8-62ca74c993f9 | hrudai2002/GEEKSFORGEEKS-POD-FEBRUARY | Feb-19/Find the number of islands.cpp | https://practice.geeksforgeeks.org/problems/find-the-number-of-islands/1#
vector<int> d1{-1,1,0,0,-1,-1,1,1};
vector<int> d2{0,0,-1,1,-1,1,-1,1};
vector<vector<bool>> vis;
void islands(vector<vector<char>> &grid, int i, int j) {
if(i < 0 || i >= grid.size() || j < 0 || j >= grid[0].size()) return;
... | ALGO | 0.999967 | 6.281784 | {
"github_metadata": {
"branch": "main",
"commit_count": 39,
"repo_created_at": "2022-01-31T13:31: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": "ad2c2a4bb5a... |
94af5f1e-3f8b-4a26-843b-04dd07cd4e72 | acodefall/algCpp | algCpp/algCpp/LinkedList/BuildDLL.h | #pragma once
#pragma once
#include <iostream>
using namespace std;
namespace BuildDbLLNM
{
class NodeDbLL
{
public:
int d;
NodeDbLL* next;
NodeDbLL* prev;
NodeDbLL()
{
next = 0;
prev = 0;
}
NodeDbLL(int x)
{
d = x;
next = 0;
prev = 0;
}
};
class BuildDbLL
{
pu... | ALGO | 0.99657 | 4.473546 | {
"github_metadata": {
"branch": "master",
"commit_count": 124,
"repo_created_at": "2017-03-23T04:11: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": "f5c293ab... |
32eb687a-cc28-46c0-aa62-18c74eead929 | LuisG94/2D-Game-Programming | New folder/Bouncing_Boxes_2.cpp | //include SDL header
#include "SDL2-2.0.8\include\SDL.h"
#include "SDL2-2.0.8\include\SDL_image.h"
//load libraries
#pragma comment(lib,"SDL2-2.0.8\\lib\\x86\\SDL2.lib")
#pragma comment(lib,"SDL2-2.0.8\\lib\\x86\\SDL2main.lib")
#pragma comment(lib,"SDL2-2.0.8\\lib\\x86\\SDL2_image.lib")
#pragma comment(linker,"/subsyst... | ALGO | 0.997862 | 4.348821 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2019-01-15T14: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": "a8d1a075f... |
b4c416dc-22ba-48a4-9bf2-f5be3fc67c6c | peter-rich/nebula | src/graph/executor/query/TraverseExecutor.h | // Copyright (c) 2020 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.
#ifndef EXECUTOR_QUERY_TRAVERSEEXECUTOR_H_
#define EXECUTOR_QUERY_TRAVERSEEXECUTOR_H_
#include <robin_hood.h>
#include "graph/executor/StorageAccessExecutor.h"
#include "graph/planner/plan/Query.h"
#in... | ALGO | 0.929312 | 7.582206 | {
"github_metadata": {
"branch": "master",
"commit_count": 3066,
"repo_created_at": "2022-07-18T23:08:31.000Z",
"is_fork": true,
"is_org_owned": false,
"forked_from": "vesoft-inc/nebula",
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content... |
785b7889-2f9d-4331-bb00-a8770159eaf1 | toggled/Relcomp | ProbabilityFactory.cpp | #include "ProbabilityFactory.h"
ProbabilityFactory::ProbabilityFactory()
{
}
ProbabilityFactory::~ProbabilityFactory()
{
}
std::list<Mapping> ProbabilityFactory::uniformProbabilty(std::list<Mapping> mapping_list)
{
int size;
double probability;
std::cout << "Number of probabilities to input: ";
std::cin >> si... | ALGO | 0.977882 | 4.830225 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2022-08-08T13:06: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": "0e70d30ac677... |
49452440-bbd5-4345-99a7-3dfa520c6b17 | sandialabs/limeext | LIME/unit_tests/fixtures/ThreeNonlinEQsRes.hpp | #ifndef THREE_NONLINEAR_EQUATIONS_W_RESIDUALS_HPP
#define THREE_NONLINEAR_EQUATIONS_W_RESIDUALS_HPP
// Relevant headers
#include <LIME_Hierarchy_Problem_Manager.hpp>
#include <LIME_Model_Evaluator.hpp>
#include <LIME_Data_Transfer_Operator.hpp>
namespace LIME
{
namespace Three_Nonlinear_Equations_w_Resid
{
/... | ALGO | 0.954026 | 6.568789 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2020-11-12T15:28:08.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "d175fdf6e253a... |
4444f410-1475-4a29-b292-87e9a86dc57e | dawe100/sortowanie | main.cpp | #include <iostream>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include "przezScalanie.h"
#include "quicksort.h"
#include "przezKopcowanie.h"
#include "introspek.h"
template <typename TYP>
void Generuj_losowo(SLista<TYP> &Lista, int wymiar, float procent = 0){
Lista.wyczyscListe();
int wybor = r... | ALGO | 0.998224 | 4.812945 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-01-04T11:46:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "031e048aea37... |
9cccae0b-2ac1-4ef5-904b-584aa5fe4665 | ujjwalprakash17/Striver-A2Z-DSA-Series-Solutions | 09 Stacks & Queue/01 Learning/04_ImplementQueueUsingStack.cpp | #include <bits/stdc++.h>
using namespace std;
class MyQueue
{
private:
stack<int> st1;
stack<int> st2;
void transfer() {
while (!st1.empty()) {
st2.push(st1.top());
st1.pop();
}
}
public:
MyQueue()
{
}
void push(int x)
{
st1.push(x)... | ALGO | 0.998123 | 4.663631 | {
"github_metadata": {
"branch": "main",
"commit_count": 115,
"repo_created_at": "2024-08-11T15:15: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": "56bb555edd... |
bd4a93c3-d2b4-4d0b-a555-b123409528f3 | Heeks/heekscad-old | src/RegularShapesDrawing.cpp | // RegularShapesDrawing.cpp
// Copyright (c) 2009, <NAME>
// This program is released under the BSD license. See the file COPYING for details.
#include "stdafx.h"
#include "RegularShapesDrawing.h"
#include "Sketch.h"
#include "HLine.h"
#include "HArc.h"
#include "../interface/PropertyChoice.h"
#include "../interface/P... | TOOL | 0.921282 | 6.001134 | {
"github_metadata": {
"branch": "master",
"commit_count": 1351,
"repo_created_at": "2011-07-07T18:14:24.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 111,
"forks": 45,
"issues": 13,
"pull_requests": 2
},
"file_meta": {
"content_id": "f799... |
907b4188-ddec-4d82-91a3-ef40daca799f | ONGOING-Z/Learn-Algorithm-and-DataStructure | OJ/LeetCode/leetcode/problems/204.cpp | #include <iostream>
#include <stdio.h>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include <set>
#include <stack>
#include <cmath>
using namespace std;
/* Leetcode */
/* Type: */
/* 题目信息 */
/*
*204. Count Primes
Count the number of prime numbers less than a non-negative... | ALGO | 0.999924 | 5.137978 | {
"github_metadata": {
"branch": "dev",
"commit_count": 713,
"repo_created_at": "2019-06-03T06:46:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "068f90cea11... |
208b9fe9-0197-45a8-b85d-9fdfb946cac8 | ayush-62/file_system | question_1.cpp | #include <bits/stdc++.h>
#include "Contiguous.cpp"
#include "linked.cpp"
#include "indexed.cpp"
#include "modified.cpp"
using namespace std;
struct input_file
{
string filename;
int size;
string data;
};
int main()
{
vector<input_file> file_list(10);
for (auto &it : file_list)
{
cin >> ... | TOOL | 0.944838 | 3.597191 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-08-23T08:24: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": "3c32bbaf13... |
16f5ad2e-9572-4441-94a0-39b505909a25 | jetyey/M2-Camera_Calibration | Calib.cpp | #include <sstream>
#include <iostream>
#include <fstream>
#include "opencv2/opencv.hpp"
using namespace cv;
using namespace std;
const float calibrationSquareDimension = 0.0280f; // meters
const Size chessboardDimensions = Size(9,6);
void createKnownBoardPosition(Size boardSize, float squareEdgeLength, vector<Point3... | TOOL | 0.900221 | 4.56878 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-11-16T11:39:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "50a6b7e5b6... |
f8ee74c5-2f76-475e-93f0-71cd72d7ac2a | perezrangel/P2-Official- | RBTree.cpp | //==============================================================
// Names: <NAME>, <NAME>, <NAME>
// Class: CS 271-01
// Date: 11/07/2024
// About: RBTree.cpp contains the implementations for
// the RBTree class. Handling tree-wide structure and management
//=============================================================... | ALGO | 0.995608 | 3.437639 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2024-11-08T00:40: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": "b8b8a610062... |
89b41472-cee2-4ac1-a908-4826bfb73e15 | YSW0630/TOI_beginner | Night_Market.cpp | #include <bits/stdc++.h>
using namespace std;
struct Night_Market {
int point;
bool state;
int timer;
bool is_hitted;
} arr[9];
void solve() {
bool flag;
int n, hit, flag_count = 0, total = 0;
for (int i = 1; i < 10; ++i) {
arr[i - 1].point = i;
arr[i - 1].state = 1;
arr[i - 1].timer = 12;
... | ALGO | 0.999496 | 3.79465 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-01-18T14:53:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "133ebb9d94e7... |
a19a9610-682b-480c-be0e-fa062b9ff292 | pseudo-programmer42/push_swap_tester | random_numbers.cpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* random_numbers.cpp :+: :+: :+: ... | TOOL | 0.949563 | 4.364476 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2021-03-14T08:56:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 24,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "78faa11467... |
cc21fb85-2e93-4f50-970b-1367ba0e9d7e | willthree123/10162042 | Program2042/Tutorial Exercise/T4/tempCodeRunnerFile.cpp | #include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
double PI;
int terms = 1;
int low, high;
int perviousPI = 0;
int runTime = 0;
bool reverse = true; //true is +
void firstColumnPrint(String x){
cout << right << setw(10) << x ;
}
void secondeColumnPrint(String x){
cout << right << se... | ALGO | 0.999813 | 4.032985 | {
"github_metadata": {
"branch": "main",
"commit_count": 132,
"repo_created_at": "2021-02-04T09: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": "702daacb23... |
fce75c51-3fe6-4c6e-a2b8-360fc1d28a57 | bisqwit/nandcombinator | radixtree/RadixTree-Vector.hh | #include "endian.hh" /* For Rn, Wn */
#include "vectorstorage.hh"
#include "templates.hh"
#undef bytecode
#define bytecode VectorStorage::Buf
#include <array>
/*
Structure:
Each node of the radix tree has an address.
The address is called an "ID", and it is a key to VectorStorage.
Using the ID, the... | ALGO | 0.996231 | 5.30804 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2018-02-24T17:08:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 17,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "859c53e5... |
2b40d61a-1f61-4d16-9256-431c83878c09 | wws2003/StudyProjectL2.1 | BitonicSortOpenCL/BitonicSortOpenCL/implement/sorter/int/IntHybridBitonicVerticalArraySolver.h | //
// IntHybridBitonicVerticalArraySolver.h
// BitonicSortOpenCL
//
// Created by wws2003 on 4/14/18.
// Copyright © 2018 tbg. All rights reserved.
//
#ifndef IntHybridBitonicVerticalArraySolver_h
#define IntHybridBitonicVerticalArraySolver_h
#include "IBitonicVerticalArraySolver.h"
class IntHybridBitonicVertica... | ALGO | 0.980355 | 6.677215 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2018-02-19T07:57: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": "1838221fc... |
069ee254-86f3-4ef0-b17d-7f7005832fa4 | L1r0gn/code_Share | C/Algorithum_Problem_Set/codeForces/round_995(Div.3)/A.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int n;
cin >> n;
vector<int> v1(n, 0);
vector<int> v2(n, 0);
vector<int> v3;
int tmp;
for (int i = 0; i < n; i++)
{
cin >> tmp;
... | ALGO | 0.999933 | 3.599148 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2024-09-27T17:48: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": "c08d0b3326f... |
34167e4c-1fe8-46c3-bab4-15769efa7a9f | Oo1Insane1oO/VMC | source/src/wavefunctions/harmonicoscillator.cpp | #ifdef HARMONICOSCILLATOR
#include "harmonicoscillator.h"
#include "../methods.h"
#include "../hermite/hermite.h"
#include "../slater.h"
#include <iostream>
Quantumdot::Quantumdot(Slater* sIn) : QuantumdotBasis::QuantumdotBasis() {
/* set Slater(parent) object and switch interaction on by default and push
*... | ALGO | 0.963578 | 5.012448 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2018-05-10T13:17:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b482bf931... |
f15b6a4c-429b-4837-a737-a46ce791f88a | KuanyuPhy/Background_Estimate | fake_rate/top_emu/ee_Top_emu_half.cpp | #include <iostream>
#include <sstream>
#include <TTree.h>
#include <TMath.h>
#include <TFile.h>
#include <TH3D.h>
#include <TROOT.h>
#include <TCanvas.h>
#include <TString.h>
#include <TLegend.h>
#include <TLatex.h>
#include <TAxis.h>
#include <TLine.h>
#include <TError.h>
#include "TLegend.h"
#include <cstring>
#inclu... | DATA | 0.90204 | 4.53471 | {
"github_metadata": {
"branch": "main",
"commit_count": 42,
"repo_created_at": "2022-07-17T06:54: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": "424d0b9e3e6... |
03a29b6c-db4a-4f38-a6c6-1c6c1f2f60f0 | fodorpe/kupac-keres-s-tesztel-se | kupac keresés tesztelése/kupac keresés tesztelése.cpp | #include <iostream>
#include <vector>
#include <cstdlib>
using namespace std;
class kupac
{
public:
vector<int> t;
kupac()
{
t.push_back(0);
}
int size()
{
return t.size() - 1;
}
~kupac()
{
}
int peek()
{
return t[1];
}
void push(int e)
{
t.push_back(e);
fellebegtet(size());
}
void re... | ALGO | 0.993341 | 3.768513 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2023-12-08T16:48: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": "564c38ce19... |
644fab32-c601-4879-8866-a8d1ef8bcac7 | oosquare/OI-Codes | Storage/Luogu/P4842-城市旅行.cpp | #include <iostream>
#include <vector>
using namespace std;
constexpr int maxn = 5e4 + 10;
class LinkCutTree {
public:
void init(int x, int key) {
tree[x].key = tree[x].sum = tree[x].ans = tree[x].lans = tree[x].rans = key;
tree[x].size = tree[x].cnt = tree[x].lcnt = tree[x].rcnt = 1;
}
vo... | ALGO | 0.99994 | 5.262219 | {
"github_metadata": {
"branch": "master",
"commit_count": 81,
"repo_created_at": "2020-01-15T14:44:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b61914087... |
12834147-8abb-489f-8fb4-0ca7617f7df2 | bdhxxnix/PLABench | include/swingFTree.hpp | #pragma once
#include <vector>
#include <utility>
#include <cstdint>
#include <memory>
#include <stx/btree_map.h>
#include "swing.hpp"
namespace Swing{
template<typename KeyType>
struct LeafNode {
using Segment = typename Swing::internal::SwingPiecewiseLinearModel<KeyType, int>::CanonicalSegment::Segment;
s... | ALGO | 0.993505 | 5.603538 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2025-05-19T05:42: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": "ba721e2271a... |
1b1463f1-8e94-46cd-bf4a-0d61b738a8fd | Jackson-Yuan/Algorithm | Dawn-Blossoms-Plucked-At-Dusk/hdoj-master/exercise/ExamSort.cpp | /**
* hdoj 2093
* */
#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <algorithm>
#include <queue>
using namespace std;
struct person {
string name;
int accepted;
int time;
};
struct data {
int base;
int extra;
};
struct data stringToVal(string str) {
int index... | ALGO | 0.99535 | 3.703972 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2020-10-28T14:09: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": "5e210cd88... |
a33af90b-b04b-4cc9-ab38-aa01445ee99d | ohseil/Algorithm_Problems | Programmers/Programmers_Algorithm_Problems/GPS.cpp | #include "GPS.h"
#include <iostream>
#include <vector>
#include <limits.h>
using namespace std;
GPS_BEGIN
int solution(int n, int m, vector<vector<int>> edge_list, int k, vector<int> gps_log) {
// dp 사용.
// dp[i][j] = 경로의 i번째 경로에 j번 위치가 왔을 때 최소 수정 횟수
// 첫 번째 경로는 무조건 gps_log[0]이어야 하기 때문에
// dp[0]... | ALGO | 0.999819 | 4.373553 | {
"github_metadata": {
"branch": "main",
"commit_count": 582,
"repo_created_at": "2022-05-18T12:37: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": "db3b833725... |
df9da8b9-bbe7-4bcd-9729-12cf39811b45 | VeerAbhimanyuCSVASCn/GRPHICAL-GAMING-SYSTEM | GRAPHICA.CPP | #include<iostream.h>
#include<conio.h>
#include<dos.h>
#include<graphics.h>
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
static int a[3][3];
int check(int i)
{ if((a[i/3][1]==a[i/3][2]&&a[i/3][2]==a[i/3][0])||(a[1][i%3]==a[2][i%3]&&a[1][i%3]==a[0][i%3]) )
return 0;
if((a[1][1]==a[2][2]&&a[2][... | ALGO | 0.997869 | 3.002123 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2017-09-01T13:01:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d75be7e2cb... |
b931e8eb-8a49-4e6e-9ea8-6b392d06ba9f | rorydriscoll/RayTracer | Source/Math/Matrix.cpp | #include <Math/Matrix.h>
float3x3 operator*(const float3x3& lhs, const float3x3& rhs)
{
float3x3 result;
result.xx = lhs.xx * rhs.xx + lhs.xy * rhs.yx + lhs.xz * rhs.zx;
result.xy = lhs.xx * rhs.xy + lhs.xy * rhs.yy + lhs.xz * rhs.zy;
result.xz = lhs.xx * rhs.xz + lhs.xy * rhs.yz + lhs.xz * rhs.zz;
result.yx = l... | ALGO | 0.996212 | 6.712461 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2018-06-28T15:42:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 132,
"forks": 8,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d563fa21... |
9295396b-aeb7-4a66-bd5f-4f56535928f9 | kmjp/procon | 2012-2016/2013/croc/r2/a.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>
using namespace std;
#include <stdio.h>
#include ... | ALGO | 0.999984 | 3.211522 | {
"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": "bfa7a9... |
ac5a296f-d6d5-4592-bb9c-15ab1108d6b5 | OpenFOAM/OpenFOAM-dev | tutorials/multiphaseEuler/wallBoilingPolydisperse/0/nut.liquid | /*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*-----... | TOOL | 0.993451 | 3.510455 | {
"github_metadata": {
"branch": "master",
"commit_count": 8589,
"repo_created_at": "2014-12-10T15:47:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1770,
"forks": 642,
"issues": 0,
"pull_requests": 3
},
"file_meta": {
"content_id": "0c... |
38e1eaca-fbc8-41df-851b-c92b913581e9 | Syed-Muslim-19/Cpp | deep copy from obj1 to obj2 and obj3.cpp | #include<iostream>
using namespace std;
class MyBigInt
{
int* big_int;
int int_length;
public:
MyBigInt()
{
big_int = nullptr;
int_length = 0;
}
MyBigInt(int size)
{
int_length = size;
big_int = new int[int_length];
for (int i = 0; i < int_length; i++) {
cin >> big_int[i];
}
}
MyBigInt(const M... | ALGO | 0.971984 | 3.710292 | {
"github_metadata": {
"branch": "main",
"commit_count": 115,
"repo_created_at": "2022-12-28T09:07:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2cf6a314db... |
c485f142-a512-4474-9f3b-7a21e73e135f | nsikanikpoh/dev_cpp | LambdasCapaturingByReferenceCountSort/main.cpp | #include <algorithm>
#include <array>
#include <iostream>
#include <string>
struct Car
{
std::string make{};
std::string model{};
};
int main()
{
std::array<Car, 3> cars{ { { "Volkswagen", "Golf" },
{ "Toyota", "Corolla" },
{ "Honda", "Civic" } } };
i... | ALGO | 0.998306 | 6.194875 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2020-03-27T22:33:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "735f346f5... |
04af26f3-825b-4400-bbd8-b9a6af4bd7e3 | BinomialSheep/CompetitiveC-- | AtCoderE8_LightBlue/059_タクシー2.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<long long>;
using vs = vector<string>;
using vc = vector<char>;
using vb = vector<bool>;
using vpii = vector<pair<int, int>>;
using vpll = vector<pair<long long, long long>>;
using vvi = vector<vector<int>>;
us... | ALGO | 0.999859 | 3.883157 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2023-12-12T17:45:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0ed23e62f... |
97c37240-32b0-4808-a05b-77bef5489b80 | DysonHoang/Tin-Hoc | time-skip/season 2/HDA_LQD_1-3-2025/water.cpp | // Good wine must be aged for a long time...
// <NAME>
#include <bits/stdc++.h>
#define Mx 10000000
#define ll long long
using namespace std;
int max1 = INT_MIN;
int min1 = INT_MAX;
int l[100000], r[100000], res[100000];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int t, ... | ALGO | 0.999997 | 4.439298 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-01-14T09:21: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": "f8806a638558... |
3a54c59e-0677-428a-b318-f226d76edd5d | marioyc/Online-Judge-Solutions | Codeforces/292B.cpp | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
#define MAXN 100005
int d[MAXN];
int parent[MAXN];
int comp;
int Find(int x){
if(parent[x] != x) parent[x] = Find(parent[x]);
return parent[x];
}
void Union(int x, int y){
x = Find(x); y = Find(y);
if(x != y){
p... | ALGO | 0.999869 | 3.847217 | {
"github_metadata": {
"branch": "master",
"commit_count": 364,
"repo_created_at": "2010-09-24T16:07:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 603,
"forks": 359,
"issues": 1,
"pull_requests": 9
},
"file_meta": {
"content_id": "46aa... |
da574b4e-c251-4086-aee6-a23041d72a0d | NouemanKHAL/Competitive-Programming | Codeforces/1073/B [Vasya and Books].cpp | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define csize(x) (int)((x).size())
#define debug(x) cout << #x << ":" << x << ' ';
#define debugg(x) cout << #x << ":" << x << ' ' << "\n";
#define endl "\n"
using namespace std;
typedef unsigned long long ull;
type... | ALGO | 0.999976 | 3.203152 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2018-08-28T21:46: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": "4f6cd3030... |
af58f836-a84c-42b7-a449-7a214b2e15a1 | godotengine/godot | thirdparty/jolt_physics/Jolt/Core/StringTools.cpp | // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
// SPDX-FileCopyrightText: 2021 <NAME>
// SPDX-License-Identifier: MIT
#include <Jolt/Jolt.h>
#include <Jolt/Core/StringTools.h>
JPH_SUPPRESS_WARNINGS_STD_BEGIN
#include <cstdarg>
JPH_SUPPRESS_WARNINGS_STD_END
JPH_NAMESPACE_BEGIN
String StringFormat(c... | TOOL | 0.90264 | 7.37264 | {
"github_metadata": {
"branch": "master",
"commit_count": 76043,
"repo_created_at": "2014-01-04T16:05:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 98972,
"forks": 22820,
"issues": 5000,
"pull_requests": 3866
},
"file_meta": {
"content... |
0db143d8-8f21-488f-a202-c60998db9f9c | Zach417/laundry-robot | src/robot/getThetaDesiredAvoidObstacle.cpp | #include "robot/robot.h"
#include "utils/utils.h"
float Robot::getThetaDesiredAvoidObstacle(float enterDistance) {
float robotTheta = theta;
// create vectors {{ magnitude, direction }}
int sensorCount = 5;
float vectors[sensorCount][2];
vectors[0][0] = sensorLeftLeft.getPreviousRead();
vectors[0][1] = ro... | ALGO | 0.998553 | 4.615478 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2017-04-03T03:54:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8cbdefc5f... |
2cc03347-f9fa-4a34-843d-ef4f3d4d9ff4 | Tarunagg1/Ds_Alog_notes | Last_Digit_of_Nth_Fibonacci_Number/Last_Digit_of_Nth_Fibonacci_Number.cpp | //C++ Program to find last digit of nth fibonacci numbers
#include<iostream>
using namespace std;
int main() {
int a[60], n, i;
a[0] = 0;
a[1] = 1;
//Using the concept that after 60 numbers in a fibonacci numbers the last digit repeats itself again and again
for(i = 2 ; i < 60 ; i++ ){ //for... | ALGO | 0.999596 | 4.049191 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-01-19T04:18:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fafdeb39c8... |
50dfbb19-2ba8-4070-bf74-c18ada9e5cf5 | ishandutta2007/codeforces-l | lucaperju/normal/998/C.cpp | #include <iostream>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <vector>
using namespace std;
long long cmmdc(long long a,long long b)
{
long long r;
while(b)
{
r=a%b;
a=b;
b=r;
}
return a;
}
long long lgput (long long cnt, long long mod,long long put)
{... | ALGO | 0.999873 | 3.191737 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:17:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f772ca06c3f2... |
ca9d0225-9fa8-4918-a32f-be80d5f0a5d1 | rak3xh/DSA-Practice-in-CPP | DSA Resources/Cplusplus/leetcode/2.cpp | #include <bits/stdc++.h>
using namespace std;
// 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:
Li... | ALGO | 0.99995 | 6.452807 | {
"github_metadata": {
"branch": "main",
"commit_count": 1873,
"repo_created_at": "2023-12-01T19:23:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "20690dc14... |
c7ee24d1-65ab-4075-a12c-b379e60e489c | ishandutta2007/codeforces-p | papa3/normal/1428/E.cpp | #include <bits/stdc++.h>
using namespace std;
#define ALL(x) (x).begin(), (x).end()
#ifdef LOCAL
const bool debug = true;
#else
const bool debug = false;
#define cerr if (true) {} else cout
#endif
#define int long long
#define double long double
const int INF = 1e18;
const int mod = 1e9 + 7;
const int MAX_N = 1e6... | ALGO | 0.999634 | 3.792998 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:49: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": "f4a434cebed1... |
00b7cc77-e9a9-47fc-a918-5b43357646c6 | TianyuFan0504/ZJUCS2022optimization | src/CD.cpp | #include <iostream>
#include <Eigen\Dense>
#include <sstream>
#include <fstream>
#include "CD.h"
using namespace std;
using namespace Eigen;
double Linear_search(MatrixXd Y,MatrixXd X,MatrixXd W_input,MatrixXd d,double lambda){
double a = -1;
double min =1e5;
double output = 0.;
double temp_loss =0 ;
int nums = X... | ALGO | 0.999608 | 3.774537 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-10-15T06:18:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "774d6be4d55b... |
74c4b1f1-65d9-4df0-ac7f-1798c368c752 | Mai-icy/learn-algorithm-note | code/graph/weighted-digraph/MST/prim.cpp | #include "MST.hpp"
class PrimMST
{
public:
PrimMST(WeightedGraph G);
~PrimMST() { delete[] marked, distTo; }
Bag<Edge> edges() const { return mst; }
double weight() const;
private:
point_pq pq;
bool *marked;
double *distTo;
Edge *edgeTo;
Bag<Edge> mst;
void visit(WeightedGraph... | ALGO | 0.999504 | 5.19912 | {
"github_metadata": {
"branch": "main",
"commit_count": 34,
"repo_created_at": "2022-04-10T04:13:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9a8a868994a... |
28f9dac8-72d6-41f7-8754-d0533ec5cfb3 | LYJ0126/Problem-Solving-Courses-OJ | 第三学期/问题求解III-HW07/B/[特殊二分图]万圣节舞会(树形dp)/[特殊二分图]万圣节舞会(树形dp)/dp_on_tree.cpp | #define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int n, r[100009], l, k, root;
vector<vector<int>>graph;
vector<vector<int>>ans;
vector<int>pa;
int findpa(int x)
{
if (pa[x] == x) return x;
return pa[x] = findpa(pa[x]);
}
void merge(int x, int y)
{
... | ALGO | 0.999932 | 3.602051 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2024-02-29T17:01:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8400251f8... |
8502aa96-d7ed-41b0-933c-0893212c03c2 | Kushal997-das/Project-Guidance | Desktop Application/Intermediate/C++/B-Tree File Indexing/main.cpp | #include<iostream>
#include<fstream>
#include<vector>
#include<iomanip>
using namespace std;
void createFile(string fileName, int numRecord);
int deleteRecord(string fileName, int recordNo);
void displayContent(string fileName, int numRecord);
void defaultArray(int** arr, int numRecord);
void printArr(int** arr, int n... | ALGO | 0.994178 | 3.031062 | {
"github_metadata": {
"branch": "main",
"commit_count": 2997,
"repo_created_at": "2020-12-26T14:46:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 557,
"forks": 404,
"issues": 16,
"pull_requests": 0
},
"file_meta": {
"content_id": "b62d... |
63fe7799-34f9-4856-9c0d-f8336868b9a4 | baeharam/PS | 이전 디렉토리별 정리/DFS&BFS/1012번(유기농 배추).cpp | #include <cstdio>
using namespace std;
int c[50][50];
bool visited[50][50];
int tc, n, m, k, x, y, ji;
void dfs(int x, int y)
{
if (x - 1 >= 0 && !visited[x - 1][y] && c[x - 1][y] == 1) {
visited[x - 1][y] = true;
dfs(x - 1, y);
}
if (x + 1 <= n-1 && !visited[x + 1][y] && c[x + 1][y] == 1) {
visited[x + 1][y... | ALGO | 0.999879 | 3.659177 | {
"github_metadata": {
"branch": "master",
"commit_count": 245,
"repo_created_at": "2018-01-22T13:00:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 19,
"forks": 10,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "76213f... |
b2a4eaa8-0059-46de-88bc-4439e52f9e3c | corganhejijun/Win32_gpb | gpb/include/math/matrices/cmatrix.hh | /*
* Complex matrix (thread-safe).
*/
#ifndef MATH__MATRICES__CMATRIX_HH
#define MATH__MATRICES__CMATRIX_HH
#include "concurrent/threads/synchronization/locks/auto_read_lock.hh"
#include "concurrent/threads/synchronization/locks/auto_read_read_lock.hh"
#include "concurrent/threads/synchronization/locks/auto_write_lo... | TOOL | 0.971969 | 7.327306 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2015-11-05T05:29:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "225b38cb8... |
82cf8d44-8be5-45d0-8294-b0f6413468c6 | ambrosia63/IP3 | car_route.cpp | #include "route.h"
#include <iostream>
#include <set>
#include <iomanip>
using namespace std;
CarRoute::CarRoute() {
totalDistance = 0;
}
CarRoute::~CarRoute() {}
void CarRoute::findRoute(const string& from, const string& to, const vector<Segment>& segments) {
set<string> allowedTerrains = {"road", "highway... | ALGO | 0.993173 | 5.203354 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2025-05-09T10:33: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": "344e970f7e0... |
019186e8-3a90-4896-ad6c-7eb3cabbd0b7 | SanskarKansal/Code | CP/A_Counting_Orders.cpp | #include<bits/stdc++.h>
using namespace std;
#define fastIO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
// Modular Exponentiation (a^b % mod)
long long modPow(long long base, long long exp, long long mod) {
long long result = 1;
while (exp > 0) {
if (exp % 2 == 1) result = (result * base) % mod;... | ALGO | 0.999982 | 5.268241 | {
"github_metadata": {
"branch": "main",
"commit_count": 47,
"repo_created_at": "2024-12-18T07:24: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": "7c5f33b41f1... |
ebcd05e1-6397-4c0b-9870-1237c86b3b6a | cgarreau/rbush-cpp | RBush.hpp | #ifndef RBUSH_HPP
#define RBUSH_HPP
//
// RBush is a high-performance library for 2D spatial indexing of points and rectangles. It's based on an optimized R-tree data structure with bulk insertion support.
//
// See https://github.com/mourner/rbush for original javascript version
// See also this article from the aut... | ALGO | 0.998004 | 5.608428 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-02-17T10:06:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "56b48a46fe... |
2e09b93d-4851-4ce8-87f0-eafef62bf273 | SaiHarshaK/Assignments | 7th sem/pcp/assgn4/MCS-CS17BTECH11036.cpp | /*
author: <NAME>
About: assignment for Parallel and Concurrent Program. Check ReadMe for instructions.
*/
#include <atomic>
#include <iostream>
#include <cstdlib> // EXIT_FAILURE
#include <ctime>
#include <fstream>
#include <random>
#include <string>
#include <thread>
#include <unistd.h>
using namespace std;
// out... | ALGO | 0.996428 | 5.029388 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2018-12-03T17:44:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0a2e99d7b... |
0a71d743-a8a1-47cf-87f6-725b841883f4 | openhpc/ohpc | tests/libs/mfem/tests/parallel/ex1p.cpp | // MFEM Example 1 - Parallel Version
//
// Compile with: make ex1p
//
// Sample runs: mpirun -np 4 ex1p -m ../data/square-disc.mesh
// mpirun -np 4 ex1p -m ../data/star.mesh
// mpirun -np 4 ex1p -m ../data/escher.mesh
// mpirun -np 4 ex1p -m ../data/fiche... | ALGO | 0.995718 | 5.539552 | {
"github_metadata": {
"branch": "3.x",
"commit_count": 12766,
"repo_created_at": "2015-09-28T18:20:29.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 917,
"forks": 199,
"issues": 9,
"pull_requests": 2
},
"file_meta": {
"content_id": "058cfc... |
a61aa1d8-f0db-492b-9aca-a447499fb7e8 | batherit/Algorithm | Study20200330/15663_N과M(9)_4.cpp | #include <string>
#include <vector>
#include <set>
#include <algorithm>
#include <iostream>
using namespace std;
set<vector<int>> MakeCombination(int M, int index, vector<int> combination, vector<int> numbers) {
set<vector<int>> result;
if (M == combination.size()) {
result.insert(combination);
return result;
... | ALGO | 0.999916 | 4.403965 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2020-03-30T07:58: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": "78114714e... |
b1058dbe-8667-434c-abb3-b642dfad9fe5 | shaihitdin/CP | Olymp/csacademy/IOI_train/4/A.cpp | /// Stupido del problemo
#include <cstring>
#include <vector>
#include <map>
#include <set>
#include <bitset>
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cassert>
#include <cstdlib>
#include <ctime>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
... | ALGO | 0.999981 | 3.611875 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2017-01-22T16:38:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0e29692eb... |
d731d0c8-b38b-4969-a9fb-dbf4c5e7ab77 | AkshayAnand2002/FILES-2 | TCS_NQT_PRODUCT_OF_DIGITS.CPP | A supermarket maintains a pricing format for all its products. A value N is printed on each product. When the scanner reads the value N on the item, the product of all the digits in the value N is the price of the item. The task here is to design the software such that given the code of any item N the product (multipli... | ALGO | 0.999957 | 5.39152 | {
"github_metadata": {
"branch": "main",
"commit_count": 90,
"repo_created_at": "2023-03-19T00:56:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eee331dc63a... |
94468e41-a413-483e-a0c3-08475bdf8bf0 | hd1534/algorithm | 백준/골드/DSLR/DSLR.cpp | // https://www.acmicpc.net/problem/9019
// 틀림...
#include<queue>
#include<string>
#include<iostream>
using namespace std;
// d1 = n / 1000;
// d2 = n / 100 % 10;
// d3 = n / 10 % 10;
// d4 = n % 10;
inline int D(int n) {
return (n*2)%10000;
}
inline int S(int n ) {
return n-1 < 0 ? 9999 : n-1;
}
inline ... | ALGO | 0.999764 | 4.998873 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2022-01-10T07:24: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": "67a76dabc... |
f02145c3-c08d-47f1-99bb-398d539a84ba | LadityaGogoi/dsa | day 2/coutInversion.cpp | #include <bits/stdc++.h>
using namespace std;
bool isIdealPermutation(vector<int> &nums)
{
int n = nums.size();
int localCount = 0;
for (int i = 0; i < n - 1; i++) {
if (nums[i] > nums[i + 1]) {
localCount++;
}
}
cout << localCount << endl;
int globalCount = 0;
... | ALGO | 0.999951 | 4.454141 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-06-27T13:23: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": "dafcaa5e5783... |
59d36283-9d8c-4f09-b4e3-44fbf1b3e8cf | minsu20/algorithm | 10주차/intersectiion.cpp | // -----------------------------------------------------------
// 컴퓨터알고리즘과 실습-02
// 10주차 과제
// 1번- Intersection.cpp
// 2020112377 김민수
// -----------------------------------------------------------
#include <iostream>
using namespace std;
struct point { //점 구조체
float x; //x좌표
float y; //y좌표
};
struct line { //선분 구... | ALGO | 0.998466 | 4.965669 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2022-07-20T15:04: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": "d8f97fdfb7... |
5b80c350-82d4-4e36-a071-ad0989ea42f6 | jplewa/Project-Euler | 23/main.cpp | #include <iostream>
using namespace std;
int sumofproper (int n){
int sum=1;
int i=2;
for (; i*i<n; i++){
if (n%i == 0){
sum+=i;
sum+=(n/i);
}
}
if (i*i == n) sum+=i;
return sum;
}
bool abundant (int n){
if (sumofproper(n) > n) return true;
else... | ALGO | 0.999907 | 4.476968 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2018-05-30T14:29: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": "748f6d6e5e... |
7205dc0b-732d-4b4b-a811-152a5e14d5af | ddajt-CE/Back_Tracking | 3.cpp | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
int n, a[100][100], vst[100];
vector<string> v;
string s = "";
bool check = 0;
void Try(int i,int j){
a[1][1] = 0;
if(i == n && j == n){
v.push_back(s);
check = 1;
}
if(i+1 <= n && a[i+1][j]){
s += 'D';
a[i+1][j] = 0;
Try(i+1,j);
... | ALGO | 0.999861 | 4.241498 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2025-05-01T07:39: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": "57c3020ba2... |
050b4486-da1f-47cb-9b11-de9a9c71b004 | anuragpratap05/DSA | ARRAY AND STRING/array and string revision_2/class4/239_Sliding_Window_Maximum.cpp | #include <bits/stdc++.h>
using namespace std;
class TreeNode
{
public:
int val = 0;
TreeNode *left = nullptr;
TreeNode *right = nullptr;
TreeNode(int val)
{
this->val = val;
}
};
vector<int> maxSlidingWindow(vector<int> &nums, int k)
{
int i = 0;
int tempk = k;
priority_que... | ALGO | 0.999973 | 6.013854 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-28T18:04: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": "8f6e8c752ede... |
3050f5da-4167-450f-9a41-5cdcbc7677d5 | dsc-sookmyung/2023-02-Algorithm-Study | 02-Linear_DS-BFS-DFS/sop0327/A-9012.cpp | #include <iostream>
#include <stack>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int num;
cin >> num;
for (int i = 0; i < num; i++)
{
string str;
cin >> str;
stack<char> arr;
int temp = 0;
for (int j = 0; j < str.... | ALGO | 0.999943 | 4.945339 | {
"github_metadata": {
"branch": "main",
"commit_count": 170,
"repo_created_at": "2023-10-31T18:23:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0c9e5dd03fa... |
71cbd8f3-4899-4d83-a2be-d49c19ccdc23 | klay9502/highschool | 학교수업/고등학교 2학년/5_19_2/소스코드/main.cpp | //#include <iostream>
//using namespace std;
//
//class CPerson
//{
//public:
// void Sleep(void)
// {
// cout << "Sleep.." << endl;
// }
//};
//
//class CStudent : public CPerson
//{
//public:
// void Study(void)
// {
// cout << "Study..." << endl;
// }
//};
//
//class CPartTimeStudent : public CStudent
//{
//public... | TOOL | 0.932629 | 4.716325 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-10-08T13:57:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "112232733142... |
4fe311d5-49fd-49ee-bea0-b1c8ef663a26 | jElhamm/Semaphore-MultiTasking | Implementation Of Semaphore/Source Code/main.cpp | /**
* The main purpose of this code is to demonstrate the usage of a Semaphore class and the Process class.
**/
#include <iostream>
#include <vector>
#include <thread>
#include <algorithm>
#include "Semaphore.h"
#include "Process.h"
int main() {
// Create a counting semaphore with an initial count of 1
Se... | ALGO | 0.999945 | 5.754155 | {
"github_metadata": {
"branch": "main",
"commit_count": 53,
"repo_created_at": "2023-10-26T17:23:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bfe9028b159... |
87f8e4cf-8716-4dd4-b593-38a128e77be1 | bibaev/algo-spring | contest2/src/e.cpp | #include <iostream>
#include <vector>
using b_graph_t = std::vector<std::vector<int>>;
struct order {
order(int time, std::pair<int, int> const& from, std::pair<int, int> const& to)
: time(time),
from(from),
to(to) {}
int time;
std::pair<int, int> from;
std::pair<int, int>... | ALGO | 0.998961 | 4.339458 | {
"github_metadata": {
"branch": "master",
"commit_count": 169,
"repo_created_at": "2016-02-10T20:01:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f15d05df... |
27717cff-97c3-48e2-99dd-3d3150fe581b | EraEKV/ADS | 5/maxheap.cpp | #include <iostream>
using namespace std;
struct heap {
private:
int* val;
int size;
void sift_down() {
val[0] = val[--size];
int pos = 0;
while(2 * pos + 1 < size) {
int p1 = 2 * pos + 1;
int p2 = 2 * pos + 2;
... | ALGO | 0.999902 | 4.48353 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2024-09-15T17:07: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": "ef59877be2a... |
2121ffed-d3d8-4c64-8bcb-08c4d2c03c57 | shanerbo/leetcode | C++/53.maximum-subarray.cpp | /*
* @lc app=leetcode id=53 lang=cpp
*
* [53] Maximum Subarray
*
* https://leetcode.com/problems/maximum-subarray/description/
*
* algorithms
* Easy (44.69%)
* Likes: 5204
* Dislikes: 206
* Total Accepted: 647.3K
* Total Submissions: 1.4M
* Testcase Example: '[-2,1,-3,4,-1,2,1,-5,4]'
*
* Given an ... | ALGO | 0.999878 | 6.311263 | {
"github_metadata": {
"branch": "master",
"commit_count": 398,
"repo_created_at": "2019-09-27T03:03:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "cabfe6cd... |
08207efa-77e4-4696-8543-b7ee0705a7a2 | filosofisto/CppMasterClass | Challenges/linspace/main.cpp | #include <iostream>
#include <array>
#include <concepts>
#include <type_traits>
#include <stdexcept>
using std::array, std::cout, std::endl, std::is_arithmetic_v, std::runtime_error, std::cerr;
template<typename T>
concept Arithmetic = is_arithmetic_v<T>;
template<Arithmetic T, size_t N>
array<double, N> linspace(T ... | TOOL | 0.960116 | 6.216691 | {
"github_metadata": {
"branch": "main",
"commit_count": 61,
"repo_created_at": "2024-06-29T08:09: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": "509dca6eed1... |
39626ab3-e131-46b9-a46c-74a965a72b15 | ouster-lidar/ouster-sdk | ouster_client/include/ouster/metadata.h | /**
* Copyright (c) 2024, Ouster, Inc.
* All rights reserved.
*
* @file
* @brief Ouster metadata processing
*/
#pragma once
#include <iostream>
#include <memory>
#include <string>
#include <unordered_map>
#include "nonstd/optional.hpp"
#include "ouster/types.h"
#include "ouster/visibility.h"
namespace ouster {... | TOOL | 0.923267 | 7.624779 | {
"github_metadata": {
"branch": "master",
"commit_count": 99,
"repo_created_at": "2018-05-08T03:42:01.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 493,
"forks": 449,
"issues": 53,
"pull_requests": 12
},
"file_meta": {
"content_id": "6e5f... |
0ee62922-35ee-48cf-b9b6-3d1d9f96c8b8 | leandrovianna/programming_contests | Codeforces/Rounds/998/A.cpp | // Codeforces - Ballons - 998A Div2
#include <bits/stdc++.h>
using namespace std;
int main() {
const int N = 100;
int n, a[N];
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int mask = 1; mask < (1 << n)-1; mask++) {
int sum1 = 0, sum2 = 0, cnt = 0;
for ... | ALGO | 0.999883 | 3.633022 | {
"github_metadata": {
"branch": "master",
"commit_count": 231,
"repo_created_at": "2016-12-31T23:22:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "557a3038... |
c92447b8-9ad5-498f-b159-a9ac9c9addb5 | jianningzhuang/CS2040C-Data_Structures_and_Algorithms | Mock PE/kindsofpeople.cpp | #include <bits/stdc++.h>
using namespace std;
//start 1025 to
vector<vector<int>> board;
int deci1 = 3;
int bina1 = 2;
vector<pair<int, int>> adj = {{1,0}, {-1, 0}, {0, 1}, {0, -1}};
void decimalfill(int i, int j, int r, int c){
board[i][j] = deci1;
queue<pair<int, int>> q;
q.push({i, j});
while (!q.empty(... | ALGO | 0.999846 | 4.79774 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-07-03T13:56:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "810d5702b5af... |
ab457070-2fe9-4147-bfcf-6dad4fc9b5f6 | sanjeetboora/CppLiveAugust2020 | Lecture36/maxXorPair.cpp | /* Problem - */
/* By <NAME> */
#include<bits/stdc++.h>
using namespace std;
class node {
public:
int data;
node* zero;
node* one;
node(int d) {
data = d;
zero = NULL;
one = NULL;
}
};
class trie
{
public:
node* root;
trie() {
root = new node('\0');
}
void insert(int num) {
node* temp = root;
... | ALGO | 0.999949 | 4.666506 | {
"github_metadata": {
"branch": "master",
"commit_count": 36,
"repo_created_at": "2020-08-27T12:34:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cdb2ecc31... |
72668901-331d-43bc-b5e9-951efada2ef0 | pranaynagpure321/dsa_algo | SlidingWindow/1234. Replace the Substring for Balanced String.cpp | class Solution {
public:
/* collect all the R , E , W , Q and interate over string to find the length where all four character has <= n/4 count
if that is found then take window length and increment left pointer while taking the window size in to account
*/
int balancedString(string s) {
map <char, int> mp... | ALGO | 0.999973 | 4.713888 | {
"github_metadata": {
"branch": "main",
"commit_count": 563,
"repo_created_at": "2022-02-09T06:06:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6debbce838... |
b478e58d-6a65-4df8-a38f-178a7231f869 | blackberry/OpenTTD | src/pathfinder/yapf/yapf_node_rail.hpp | /* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD 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, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without... | TOOL | 0.970032 | 6.879746 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2011-10-13T05:48:39.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 17,
"forks": 10,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "7eae8a368... |
0cb3c7a7-cb5d-4a06-bd93-aa304728e66a | Oxygonalrs/competitive-programming-oxygonal | Competitive Programming/42. Graph - Disjoint Union Set/3. unionByRank.cpp | //Attach smaller tree to bigger tree
//O(1) -> almost
//Research is necessary
#include<iostream>
#include<list>
using namespace std;
class Graph{
int V;
list<pair<int, int>> l;
int findSet(int* parent, int i)
{
if(parent[i] == -1)
{
return i;
}
parent[i]... | ALGO | 0.999731 | 4.350323 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2022-07-27T01:50: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": "33feefb723... |
bce377bd-7c65-4492-a7c0-5b7a84e5d8fa | LuizHRF/compiladores | parser/parser.cpp | #include <vector>
#include <map>
#include <iostream>
#include <any>
#include "parser.h"
#include "semActions.h"
SLR_Table::SLR_Table() {
initializeParserTable("utils/parserv1.xml");
}
using namespace tinyxml2;
int SLR_Table::initializeParserTable(const char* filename) {
//std::cout << "Initializing parser ... | ALGO | 0.969483 | 4.660257 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2024-08-30T20:30: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": "deb043f59a2... |
fbb68087-46d1-43fe-8960-47a2ac70c685 | johnbuddhaking/dataStructure | c/13_bitree/main_bitree.cpp | #define CHAR 1 // 字符型
//#define CHAR 0
#include "c1.h"
#if CHAR
typedef char TElemType;
TElemType Nil = '#';
#define form "%c"
#else
typedef int TElemType;
TElemType Nil = 0;
#define form "%d"
#endif
void visit(TElemType e) {
printf(form" ", e);
}
#include "bitree.h"
#include "bitree_bo.h... | ALGO | 0.999444 | 3.208894 | {
"github_metadata": {
"branch": "master",
"commit_count": 59,
"repo_created_at": "2017-01-23T10:01:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f80ac6dfb... |
cee6dab2-e67d-4a88-8ec1-5b5a8a84dbda | chychen/leetcode_cpp | easy/21. Merge Two Sorted Lists.cpp | // Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.
// input
// [1,3,5]
// [2,4,6,9]
// output
// [1,2,3,4,5,6,9]
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* Lis... | ALGO | 0.999902 | 6.49446 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2017-07-20T02:10: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": "ced2bd127... |
5ccc898a-8fbb-4856-9e52-ebff51164a9a | wamor17/computerVision | 7_Medium_and_average_filters/smoothing.cpp | #include <iostream>
#include <cstdlib>
#include <cmath>
#include <opencv2/opencv.hpp>
using namespace std;
using namespace cv;
void averageFilter(Mat img);
void medianFilter(Mat img);
int median(int neighbors[], int length);
void plot(Mat image, Mat newImage);
int main(int argc, char **argv){
if(argc != 2){
cout... | ALGO | 0.983519 | 4.67051 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2018-04-08T04:27: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": "c1198673e6... |
5d3d3797-d9c4-4311-8234-b4c7b628c102 | ini050/OMOM-AI | omokai.h | #ifndef __COMOKAI_H__
#define __COMOKAI_H__
#include "omokrule.h"
struct Point
{
int x, y;
};
class COMOKAI
{
protected :
int nBoard[SIZE + 2][SIZE + 2];
int nWeight[SIZE + 2][SIZE + 2];
bool isOpenFour;
Point l, r; //left top, right bottom;
COMOKRULE *pRule;
public :
COMOKAI();
virtual ~COMOKAI()... | ALGO | 0.952212 | 4.733973 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2018-01-10T16:50:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "95690f010... |
a2c9dd7e-c6c8-4a67-a5e4-b934da3f91f0 | tajwarul23/DSA | Bit/CF_223339_knapsak.cpp | #include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define ll long long
#define pb push_back
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL);
#define arrin(arr, n) for (ll i = 0; i < n; i++) cin >> arr[i];
#define arrout(arr, n) for (ll i = 0; i < n; i++) ... | ALGO | 0.999997 | 4.1558 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-12-18T16:28:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "60e3f51e0a7c... |
ce34097e-677d-4c42-8d9d-f530b18f5afc | akazad13/competitive-programming | Online Judges/LightOJ/1291 - Real Life Traffic.cpp | #include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define lld long long int
#define rep(i,a,b) for(i=a;i<b;i++)
#define read(a) scanf("%d",&a)
#define Clear(a,b) memset(a,b,sizeof(a))
#define Max 10005
vector<int> G[Max];
int node,edge;
bool visited[Max];
int d[Max];
int cnt[Max];
int low[Max];
vector... | ALGO | 0.999556 | 4.712099 | {
"github_metadata": {
"branch": "main",
"commit_count": 45,
"repo_created_at": "2021-04-06T17:28: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": "26bc7956a1a... |
385255b9-1f24-4c48-a64a-e859668fa450 | Iman-Howlader/Competitive-Programming | Codeforces/B_Vlad_and_Shapes.cpp | /**
* Author : iman321
* Created: 2024-02-19 20:39:25
**/
#include <bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define nl '\n'
#define ll long long
#define all(x) x.begin(), x.end()
#define prec(n) fixed << setprecision(n)
#define yes cout << "YES\n... | ALGO | 0.999311 | 5.145219 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-09-05T14:42: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": "cded7a9aa562... |
d9f97b97-e7a9-4051-9b93-ddb7969205af | BrianHorner-School-Work/CS341_ExtraCredit | StudentLinkedList.cpp | // Student Linked List Class Implementation
//
// Author: <NAME>
// Edit History:
// 5/10/2022 - Initial Version modified from CS341 HW4
// --- Standard Library Includes ---
#include <string>
#include <iostream>
// --- User Defined Includes ---
#include "StudentNode.h"
#include "StudentLinkedList.h"
// --- Constructo... | ALGO | 0.907793 | 4.715494 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2022-05-10T22:50:49.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "526d95c7a26... |
11cf07a0-c7ec-48bb-833c-510566a236cb | kishanrajput23/Coding-Buddies-Community-Contributions | Love_Babbar_DSA_busted.c/binary_search_tree/deletion_node_in_a_binary_serach_tree.cpp | #include <bits/stdc++.h>
using namespace std;
// I have done three problems here before doing lca question before this approach helps to traverse through all the paths from the root to any node of the binary tree.
struct Node
{
public:
int data;
struct Node *left;
struct Node *right;
// Node(char val)... | ALGO | 0.999983 | 4.467957 | {
"github_metadata": {
"branch": "main",
"commit_count": 923,
"repo_created_at": "2022-10-08T17:18:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 53,
"forks": 166,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "f582175... |
89c3a70c-6b34-4d3b-8241-728b0b47e4cd | dfdfg42/Algorithm_Solve | 백준/Silver/18870. 좌표 압축/좌표 압축.cc | #include <iostream>
#include <stack>
#include <cctype>
#include <vector>
#include <algorithm>
#include <climits>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int n; cin >> n;
vector<pair<int,int>> inputs(n);
for (int i = 0; i < n; i++) {
int i... | ALGO | 0.999991 | 4.902463 | {
"github_metadata": {
"branch": "main",
"commit_count": 663,
"repo_created_at": "2023-03-29T00:14: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": "1e48d646ab... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.