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
a029fa65-d83a-49e9-9be0-3634e5bb2cf9
blue-stone-j/geometry
modules/arc/min_arc/min_arc.h
// File: min_arc.h // Input angles and find the minimum arc to cover all the angles. Angles are in radians and in the range of [0, 2*pi) // 1. define a class MinArc // 2. define public methods: setInputAngles, process, getStartAngle, getEndAngle, getArcAngles // 3. define private members: angles_, start_angle_, end_ang...
ALGO
0.995042
6.896849
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2024-03-04T03:25: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": "eb77be620e4...
e05f2647-07f4-459c-ac5d-b6c29cd68044
lanl/dfnWorks
DFNGen/readInput.cpp
#include <iostream> #include <fstream> #include <vector> #include <math.h> #include <cstdlib> #include <string> #include "input.h" #include "readInputFunctions.h" #include "generatingPoints.h" #include "structures.h" #include "logFile.h" using std::cout; using std::endl; using std::string; /*! DFN generation stop con...
ALGO
0.990538
3.995357
{ "github_metadata": { "branch": "master", "commit_count": 1451, "repo_created_at": "2018-04-03T18:50:03.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 85, "forks": 49, "issues": 24, "pull_requests": 0 }, "file_meta": { "content_id": "2a93b...
17a3f2de-6cd6-4e29-a2ee-30327bbdf1b1
neil0306/Cpp_Prime_Learning
Chapter7/example_code/9.cpp
/* 写一个函数, 返回一个字符串中出现了多少个指定的字符. */ #include <iostream> using namespace std; unsigned int c_in_str(const char *str, char ch); int main(void) { char mmm[15] = "minimum"; // char *wail = "ululate"; // 这样写会报错的, 因为"ululate"此时是 const 类型, 如果允许的话, 就会存在 wail 指针修改了常量的风险 const char *wail = "ululate"; // 还可以写成...
ALGO
0.997902
3.962701
{ "github_metadata": { "branch": "master", "commit_count": 226, "repo_created_at": "2023-04-21T05:45:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f63aed9...
b3b31647-c69b-41bb-98ef-92b83fb78c9a
Dayala212005/20-05-2024
ejercicio2-20-05-2024.cpp
#include <iostream> #include <cstdlib> // rad()%3 using namespace std; int main() { int jugador = 0, maquina, puntoj = 0, puntom = 0; cout << "Juguemos piedra, papel o tijera\n"; for (int i = 0; i < 3; i++) { do { cout << "Elije entre piedra papel o tijera\n" ...
ALGO
0.997038
3.797832
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-05-20T18:41: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": "ea4d7f23d02a...
3f638e15-3ddd-4617-ab64-00f872d633ec
Shin-723/Algolab
Algolab/PowerValue.cpp
#include<iostream> using namespace std; /*int main() { int chnum; // 차수를 나타낼 변수 int num; // 계수를 나타낼 변수 int gop=1; // 결과를 나타낼 변수 .. 선언과 동시에 초기화함 int repeat=0; cout << "n^i의 반복 알고리즘입니다."<<endl; cout << "계수를 입력해주세요 "; cin >> num ; // 계수 입력 cout << "차수...
ALGO
0.999523
4.483807
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-05-07T06:24:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8f98bc0fe410...
22f61ed6-c726-4d83-bc32-5ac2e93660f0
B-ki/CPP
Mod08/ex01/srcs/Span.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Span.cpp :+: :+: :+: ...
ALGO
0.92785
5.092197
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2022-09-21T13:15: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": "05d9858f6cc...
78622cf6-ade5-4192-bf06-bc8f0d3667e7
LuoHou99/ACM_Solution
[kuangbin带你飞]专题十三 基础计算几何 + 模板计算几何综合/FZU1393.cpp
#include <cstdio> #include <cmath> using namespace std; const double eps = 1e-6; int dcmp(double x){ if (fabs(x)<eps) return 0; return x<0?-1:1; } struct Point3{ double x,y,z; Point3(double x=0, double y=0,double z=0):x(x),y(y),z(z){} }; typedef Point3 Vector3; Vector3 operator +(Vector3 A, Vector3 B)...
ALGO
0.997311
4.114157
{ "github_metadata": { "branch": "master", "commit_count": 270, "repo_created_at": "2018-01-28T02:38:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c31d744...
7bef3aa7-9e2f-453e-9f0d-2cd4c8fb5a78
cheerconi/online-judge
codeforces/Educational Codeforces Round 86/D. Multiple Testcases/main.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <ctime> #include <deque> #include <iostream> #include <list> #include <map> #include <memory.h> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <vector> #include <unordere...
ALGO
0.999989
3.134131
{ "github_metadata": { "branch": "master", "commit_count": 407, "repo_created_at": "2017-07-19T16:20:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba2deaf3...
548f20aa-6504-46e8-8fe0-5bf48e0b1852
ldcduc/leetcode-training
cpp/house-robber-ii.cpp
/* Problem url: https://leetcode.com/problems/house-robber-ii * Code by: ldcduc * */ class Solution { public: int rob(vector<int>& nums) { int n = nums.size(); if (n > 0) { vector<int> dp[2]; dp[0].resize(n); // dp nums[0] is not chosen dp[1].resize(n); // dp ch...
ALGO
0.999976
5.351964
{ "github_metadata": { "branch": "master", "commit_count": 321, "repo_created_at": "2020-06-12T07:25:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dfc8e8e1...
796446cc-58ac-4a42-89b3-71790b6c70f9
zee7985/LeetCode
Random/15. 3Sum.cpp
15. 3Sum Medium Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Notice that the solution set must not contain duplicate triplets. Example 1: Input: nums = [-1,0,1,2,-1,-4] Output: [[-1,-1,2],[-1,0,1]]...
ALGO
0.99992
5.844819
{ "github_metadata": { "branch": "master", "commit_count": 245, "repo_created_at": "2020-05-22T16:40:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d66c373d...
b3ab73da-b26e-4598-8b8f-b27780a6fe85
ishandutta2007/codeforces-r
rniya/normal/528/B.cpp
#include <bits/stdc++.h> using namespace std; #define LOCAL #pragma region Macros typedef long long ll; #define ALL(x) (x).begin(),(x).end() const long long MOD=1000000007; // const long long MOD=998244353; const int INF=1e9; const long long IINF=1e18; const int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1}; const char dir[4]={'D'...
ALGO
0.999992
4.392692
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:58: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": "4f0c0f4631e4...
573076d3-0744-4f8f-aad3-7589200702da
opencv/opencv
hal/carotene/src/opticalflow.cpp
/* * By downloading, copying, installing or using the software you agree to this license. * If you do not agree to this license, do not download, install, * copy or use the software. * * * License Agreement * For Open Source Computer Vision Library * ...
ALGO
0.999194
4.468989
{ "github_metadata": { "branch": "4.x", "commit_count": 35401, "repo_created_at": "2012-07-19T09:40:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 83079, "forks": 56217, "issues": 2595, "pull_requests": 138 }, "file_meta": { "content_id"...
c0a3b31d-8951-477d-91f1-70e18644feea
tsnest/xray-2-2011
sources/xray/ai/search/search_restrictor_planner_forward_inline.h
//////////////////////////////////////////////////////////////////////////// // Created : 15.07.2011 // Author : <NAME> // Copyright (C) GSC Game World - 2011 //////////////////////////////////////////////////////////////////////////// #ifndef XRAY_AI_SEARCH_SEARCH_RESTRICTOR_PLANNER_FORWARD_INLINE_H_INCLUDED #defin...
ALGO
0.995993
6.283016
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-06-02T17:30:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 26, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bce03a7534...
d0462c1d-bea3-4362-89e8-ccb7577a9614
geebaa/DS_and_ALGO
problems/dp/string-interleave-1.cpp
#include <bits/stdc++.h> using namespace std; /* * Complete the 'doStringsInterleave' function below. * * The function is expected to return a BOOLEAN. * The function accepts following parameters: * 1. STRING a * 2. STRING b * 3. STRING i */ bool doStringsInterleave(string a, string b, string i) { // ...
ALGO
0.998108
4.006185
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2020-05-29T17:48: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": "b00733885...
3552ba87-df51-44db-94dd-39762cb9e540
gagan1147/geeksforgeeks
tree/burn_leave.cpp
#include<bits/stdc++.h> using namespace std; struct tree{ int data; struct tree *left; struct tree *right; tree(int x){ data = x; left = NULL; right = NULL; } }; int res = 0; int burn_time(struct tree *root,int key,int &dist){ if(!root){ return 0; } i...
ALGO
0.999954
3.92044
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2021-08-19T11:30: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": "1d338838c01...
28fb95d9-5ae1-4678-ad8e-19a2e02e55e5
ShadmanSakib44/data_structures
CSE 4304-Data Structures Lab. Winter 2022/Lab_2/Task1.cpp
#include<iostream> using namespace std; class Dynamic_Array { public: int Size; int Capacity; int *arr; Dynamic_Array() { Size = 0; Capacity = 1; arr = new int[Capacity]; } int Get(int i) { if ((i < 0 ) or (i >= Size)) { cout << "In...
ALGO
0.996336
4.6281
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-11-23T14:05: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": "b3a3eb1d39e4...
0ec5ad12-7651-46c3-853c-a5748eac2be7
zwbgap/MyCode
Code/C++/SublimeCode/DemoDesign/test1_algorithm.cpp
#include<iostream> #include<vector> #include<algorithm> #include<ctime> using namespace std; vector<int> a; int main() { vector<int>::iterator it; srand((unsigned)time(NULL)); //创建时间随机种子 for (int i = 0; i < 10; i++) { a.push_back(rand() % 100); } cout << "已随机插入10个数为:"; for (it = a.begin(); it !=...
ALGO
0.998568
3.554448
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-06-21T02:47: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": "1bda0d7ca631...
91acaa26-3990-4e6a-b250-60efa79f891b
jayulkim/BOJ
백준/Silver/23029. 시식 코너는 나의 것/시식 코너는 나의 것.cc
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef tuple<ll, ll, ll> tp; typedef pair<ll, ll> pll; ll n = 0, m = 0, k = 0; vector<vector<ll>>dp(100001, vector<ll>(3, -1)); vector<ll>v; ll dfs(ll temp, ll count) { if (temp >= n) { return 0; } if (count >= 2) { retu...
ALGO
0.99996
3.941917
{ "github_metadata": { "branch": "main", "commit_count": 1983, "repo_created_at": "2023-09-19T10: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": "190ef29aa...
682b6e6a-8525-495f-904d-39d0ebad26ca
PFCal-dev/cmssw
L1Trigger/Phase2L1ParticleFlow/src/LinearizedPuppiAlgo.cc
#include "L1Trigger/Phase2L1ParticleFlow/interface/LinearizedPuppiAlgo.h" #include "DataFormats/L1TParticleFlow/interface/PFCandidate.h" #include "FWCore/Utilities/interface/Exception.h" #include "DataFormats/Math/interface/deltaR.h" #include "L1Trigger/Phase2L1ParticleFlow/src/dbgPrintf.h" #include "Math/ProbFunc.h" ...
DATA
0.90944
6.087969
{ "github_metadata": { "branch": "hgc-tpg-devel-CMSSW_12_0_0_pre3", "commit_count": 222280, "repo_created_at": "2013-11-18T16:34:32.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "cms-sw/cmssw", "stars": 4, "forks": 2, "issues": 4, "pull_requests": 0 }, "file_...
4589c85c-17b3-4342-8e1b-63628cd87de8
mari625/shad_algorithms
Algorithms/board_with_coins.cpp
#include <cmath> #include <iostream> #include <queue> #include <vector> struct Vertex { int board; int number; }; int Solution(int first, int string_number, int column_number) { int answer = 0; for (int i = 0; i < string_number; ++i) { for (int j = 0; j < column_number; ++j) { int ...
ALGO
0.999928
5.36918
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-02-02T18:35:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "41afc6754ad4...
e16f7bd4-2dfe-4c92-975d-dadd7741e312
lmontigny/MPI
MPI_Scan.cpp
//Source: https://cvw.cac.cornell.edu/MPIcc/scan // Modified #include "mpi.h" #include <math.h> #define WCOMM MPI_COMM_WORLD #define NUMPTS 10 main(int argc, char **argv){ int mype, ierr; ierr = MPI_Init(&argc, &argv); ierr = MPI_Comm_rank(WCOMM, &mype); double l = 0.5; double exp_sum = 0; double exp_pdf_...
ALGO
0.999359
4.244637
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2017-10-29T13:19:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4894d23c...
e691aed1-d549-4c9f-9933-6723adc0dfe7
rmdcarney/CMBS4_darkTestAna
exec/convertTempUnits.cxx
//Local, project #include "num.h" #include "util.h" //std lib #include <algorithm> #include <iostream> #include <numeric> #include <string> #include <vector> //TODO: maybe make the temperature calibration curve a compile-time choice? //Read in data file, calculate mean values. int main(int argc, char *argv[]){ // ...
TOOL
0.902124
4.054957
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-01-18T17:22: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": "8357b0177d6...
69a8ddde-e795-4a14-a5bd-38b4ac5979b9
EduardoDavilaZ/Ejercicios_Arrays
Ejercicios arrays/Ejercicio14.cpp
/*Crear aleatoriamente una lista unidimensional de 50 elementos con números aleatorios comprendidos entre 1 y 100, de tal forma que no se repita ningún elemento, y no puede haber ningún elemento que sea múltiplo de la posición que ocupa.*/ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <stdbool.h> ...
ALGO
0.99814
3.589089
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-01-22T22:57: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": "2376c3fc8a54...
cf581f9c-3a7b-418f-8a4f-a8f351d322c0
sunyue89/LeetCodePractice
June_20/ReconsItinerary.cpp
/* Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order. All of the tickets belong to a man who departs from JFK. Thus, the itinerary must begin with JFK. Note: If there are multiple valid itineraries, you should return the itinerary tha...
ALGO
0.999994
6.307129
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-07-07T04:07: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": "db0a0155b...
fa681768-fea0-4747-8cd5-dcdc3fd55e95
SoumyadipOjha/LeetCode_Problems
523-continuous-subarray-sum/continuous-subarray-sum.cpp
class Solution { public: bool checkSubarraySum(vector<int>& nums, int k) { int n = nums.size(); // Unordered Map for finding sum of subarrays unordered_map<int, int> mp; // This is used to handle cases whne subarray starts with index 0 mp[0] = -1; int sum = 0; ...
ALGO
0.999888
6.318915
{ "github_metadata": { "branch": "main", "commit_count": 1153, "repo_created_at": "2024-01-18T16:38: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": "d7217ba1e...
01fd9b66-5219-4fb3-94f1-36f0e065d2bf
Sajttam/mBotICWSproject
mBotFirmware/lineSensors.ino
/* * lineCounter: * counts dashedlines, changes states and updates positions * sets systemStepCounter += 75; to update state */ void lineCounter() { int sensorState; sensorState = dashed.readSensors(); switch (currentLineState) { case LINESTATE_OUTSIDE: switch (sensorState) { case S1_OUT_...
ALGO
0.960778
4.857322
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2020-04-30T07:59: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": "fdb14286c...
42a4ba5a-4cdf-48a6-99eb-2c3a72310452
Kitware/VTK
Common/Core/vtkPriorityQueue.h
// SPDX-FileCopyrightText: Copyright (c) <NAME>, <NAME>, <NAME> // SPDX-License-Identifier: BSD-3-Clause /** * @class vtkPriorityQueue * @brief a list of ids arranged in priority order * * vtkPriorityQueue is a general object for creating and manipulating lists * of object ids (e.g., point or cell ids). Object...
ALGO
0.9948
5.87322
{ "github_metadata": { "branch": "master", "commit_count": 94968, "repo_created_at": "2010-04-27T15:12:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2910, "forks": 1246, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f...
59a4497c-8111-456d-8e91-7524067d233b
lingjiankong/leetcode
283. Move Zeroes.cpp
// *** // // Given an array nums, write a function to move all 0's to the end of it while // maintaining the relative order of the non-zero elements. // // Example: // Input: [0,1,0,3,12] // Output: [1,3,12,0,0] // // Note: // You must do this in-place without making a copy of the array. // Minimize the total number of...
ALGO
0.999844
7.258659
{ "github_metadata": { "branch": "master", "commit_count": 391, "repo_created_at": "2018-07-20T00:36: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": "026cd2d4...
7d551f40-5b75-49b7-b8d0-ae2c219403b1
watab0shi/on-your-palm
ony-your-palm-render/src/boid.cpp
#include "boid.h" // EffectPoint //-------------------------------------------------------------- EffectPoint::EffectPoint() { } EffectPoint::EffectPoint( ofVec3f _pos, float _radius ) : pos( _pos ) , radius( _radius ) { } // Boid //-------------------------------------------------------------- Boid::Boid( floa...
ALGO
0.994872
4.8941
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-09-28T07:55:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b51d341884...
4f6b63d1-4a69-41b7-b68d-d7dd38b143af
raincross7/code-similarity
codes/train_code/problem033/problem033_319.cpp
#include <bits/stdc++.h> using namespace std; using VI = vector<int>; using VVI = vector<VI>; using PII = pair<int, int>; using LL = long long; using VL = vector<LL>; using VVL = vector<VL>; using PLL = pair<LL, LL>; using VS = vector<string>; #define ALL(a) begin((a)),end((a)) #define RALL(a) (a).rbegin(),(a).rend(...
ALGO
0.999761
3.763128
{ "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": "485fb4af74ad...
62d6db48-5071-4620-a09d-e58ede28a79c
Sarvesh1990/Coding-Practise
C++-Practise/CreateBTPostOrderInOrderGiven.cpp
#include <iostream> using namespace std; struct Node{ char value; Node * left; Node * right; }; Node * CreateNode(char value){ Node * root = new Node(); root->value = value; root->left=root->right = NULL; return root; } Node * CreateBinaryTree(char * postOrder, char * inOrder, int low1, i...
ALGO
0.999973
4.678389
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2015-11-30T11:51:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a6d824a5...
e6def2ea-9440-41df-9592-f41ca32894df
chengxuyuan1213866/study_cpp
disorderly/practice/Demo1/NameSpace.cpp
// // Created by Administrator on 2023/8/15. // /*namespace NameSpace1 { int a; int f1(); float f2(); } namespace ns1 = NameSpace1; NameSpace1::a = NameSpace1::f1();*/ #include <iostream> using namespace std; //1.域运算符 **" ::"** /*namespace ns1 { int fun(int x,int y); } namespace ns2 { int fun(i...
TOOL
0.9811
3.143232
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2023-08-28T11:06: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": "665df1965...
031ed051-d697-462b-86fc-2181ef03b64f
Elibay/Algo
Data Structures/Segment_Tree_upd.cpp
#include <map> #include <set> #include <list> #include <cmath> #include <ctime> #include <deque> #include <queue> #include <stack> #include <string> #include <bitset> #include <cstdio> #include <limits> #include <vector> #include <climits> #include <cstring> #include <cstdlib> #include <fstream> #include <numeric> #inc...
ALGO
0.999807
3.66784
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2017-07-19T09:28: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": "aa6b4ba3e...
11f24ac0-c22d-4f01-ae43-391fa62702b9
manikantag2233/CD
cp lab 8.cpp
#include <stdio.h> #include <string.h> #include <stdlib.h> #define MAX_SYMBOLS 100 #define MAX_SYMBOL_LEN 32 typedef struct { char name[MAX_SYMBOL_LEN]; int value; } Symbol; Symbol symbolTable[MAX_SYMBOLS]; int symbolCount = 0; int lookupSymbol(const char *name) { for (int i = 0; i < symbolCount; i++) {...
TOOL
0.990679
5.283864
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-02-12T05:44: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": "7316249fb293...
d820fa64-3d0b-4e1b-aa1b-fed9b89b8414
Ujjwalkr983/LeetCode
0893-all-nodes-distance-k-in-binary-tree/0893-all-nodes-distance-k-in-binary-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: void markParent(TreeNode* root, unordered_map<TreeNode*, TreeNode*>& parent, TreeNode* target){...
ALGO
0.999994
6.188832
{ "github_metadata": { "branch": "main", "commit_count": 516, "repo_created_at": "2023-11-30T16:52: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": "43a03a3d84...
6ffbc442-75e8-4b6a-9674-87a62d6494c5
naveenrawat99/aditya_verma
Stack/Nearest_Greater_to_Right_0.cpp
/* Problem: Find Nearest Greater to right (next largest element) e.g IP = {1,3,2,4} OP = {3,4,4,-1} IP = {1,3,0,0,1,2,4} OP = {3,4,1,1,2,4,-1} Solution 1: Use 2 for loop and for each element seach largest element till end, Solution 1: Use stack 1) Push element in stack from R to L in stack 2) If stac...
ALGO
0.99999
4.781093
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-03-03T19:10: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": "16b876ca876b...
dddb3ac1-8942-4f03-bab9-44b57f76f562
snap-stanford/snap
glib-adv/bix.h
#ifndef bix_h #define bix_h ///////////////////////////////////////////////// // Includes #include "net.h" #include "stopword.h" #include "tql.h" ///////////////////////////////////////////////// // Forward class TBix; typedef TPt<TBix> PBix; class TBook; typedef TPt<TBook> PBook; //////////////////////////////////...
TOOL
0.981755
4.280711
{ "github_metadata": { "branch": "master", "commit_count": 1991, "repo_created_at": "2012-05-10T18:43:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2233, "forks": 803, "issues": 83, "pull_requests": 11 }, "file_meta": { "content_id": "c...
028b93e8-e3b6-4d72-b7ae-55eba110f02f
mohammad-majoony/codeForces-submits
C. Two Movies/main.cpp
// When i wrote this code, only me and God knew how it works. Now only God knows... // https://codeforces.com/problemset/problem/1989/C #include <bits/stdc++.h> #define MAJOONI ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); #define ONLINE_JUDGE #define _MOD (1000000007) #define MOD(n) (((n % _MOD) + _MOD) % _M...
ALGO
0.99999
4.770138
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2023-04-27T10:13:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "63218d0a0...
790ab2b7-eb6a-4417-b25b-cbdfc824fb44
emilyju0314/gpt_code_plagiarism
dataset/code_content_classifier/allpro_train/1_7352_10.cpp
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld= long double; ld eps=1e-9; /* 幾何の基本 */ #include <complex> typedef complex<ld> Point; // 外積 ld cross(const Point& a, const Point& b) { return imag(conj(a) * b); } // 直線の定義 class Li...
ALGO
0.999886
4.978024
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2024-04-28T03:59: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": "b5d89d00851...
335d05b1-3da3-4f69-90c6-a9cd4a787e5c
SGU-winter-study/CodingTestStudy
week1/JunSeongPark/quasar0204_210101_BOJ5582.cpp
/* https://www.acmicpc.net/problem/5582 풀이 : 다이나믹 프로그래밍 dp[0 ~ idx1 - 1][0 ~ idx2 - 1] 선언 후 str1[idx1] == str2[idx2] 면 이전 매칭값 + 1 아니면 0 */ #include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <queue> #include <stack> #include <string> #include <map> #include <set> #include <deque> #inc...
ALGO
0.999996
4.658885
{ "github_metadata": { "branch": "main", "commit_count": 261, "repo_created_at": "2020-12-26T09:10:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b02b09a75c...
37fa0c54-20fe-4613-96dd-2de2a1c8912d
Kuro-orzz/Leetcode_sol
0130-surrounded-regions/dfs.cpp
#define pii pair<int, int> #define fi first #define se second class Solution { public: int dx[4] = {-1, 0, 0, 1}; int dy[4] = {0, -1, 1, 0}; vector<vector<int>> vis; bool isValid(int n, int m, pii u){ return u.fi >= 0 && u.fi < n && u.se >= 0 && u.se < m; } void dfs(pii u, int n, int m, ...
ALGO
0.999936
5.433095
{ "github_metadata": { "branch": "main", "commit_count": 1494, "repo_created_at": "2024-03-23T15:03: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": "134a3090f...
41445ae6-3b7b-4fbd-8d59-20f0d74684ba
MaxElectron/Algorithms_Course_Archive
11C.cpp
/*Дан массив чисел a1,…,an . За одну операцию можно выбрать любые два соседних числа в массиве и заменить одно из них их наибольшим общим делителем. Какое минимальное число операций необходимо, чтобы сделать все элементы массива равными 1 ? Входные данные Первая строка содержит одно целое число n (1≤n≤2000 ) — колич...
ALGO
0.999972
3.990688
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2024-01-29T16:37: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": "ce7a310f60e...
345a04ba-e6df-461c-a1f5-0e48ae9f4aab
parteek10/450DSA
Dynamic Programming/7_subsetSumProblem.cpp
// Problem Link: https://www.geeksforgeeks.org/subset-sum-problem-dp-25/ #include <iostream> using namespace std; bool isSubsetSum(int set[], int n, int sum) { // The value of subset[i][j] will be true if there is a subset of set[0..j-1] with sum equal to i bool subset[n + 1][sum + 1]; // If sum is 0, t...
ALGO
0.999862
5.59804
{ "github_metadata": { "branch": "main", "commit_count": 289, "repo_created_at": "2021-09-30T16:55:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 48, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b9e6ba7a...
1cbf370a-a8ee-4dd1-bd7a-7f79e3567bf4
w-ymir/PAT
Basic/1019/Source.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <functional> #include <iomanip> using namespace std; int vectorToInteger(vector<int> vi) { int result = 0; for (vector<int>::const_iterator it = vi.cbegin(); it != vi.cend(); ++it) result = result * 10 + *it; return result; } ...
ALGO
0.999811
3.991974
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-03-02T06:14: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": "06d1a622bd...
0587c561-5040-4d1b-855c-8c76f9184eef
abhibansal530/Codes
codeforces/580C.cpp
//<NAME> #include<bits/stdc++.h> #define PB push_back #define MP make_pair #define F first #define S second #define SZ(a) (int)(a.size()) #define SET(a,b) memset(a,b,sizeof(a)) #define LET(x,a) __typeof(a) x(a) #define TR(v,it) for( LET(it,v.begin()) ; it != v.end() ; it++) #define loop(a,b) for(int i=a;i<b;i++) #defin...
ALGO
0.999867
3.244167
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2016-03-22T19:52: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": "a3b6fbc5d...
f6504a67-2492-43d9-ab3a-c3b175355539
dbHu/dbHuMouse_2017
dbMouse_FreeRTOS/action/correction.cpp
/* * CorrYawBySide.cc * * Created on: Oct 8, 2017 * Author: loywong */ #include <stdio.h> #include <math.h> #include "Correction.h" #include "../TskIr/TskIr.h" #include "../TskMotor/TskMotor.h" #include "action/action.h" #include "action/motion.h" #include "Physparams.h" #include "TskTop/DbgUart.h" #include...
ALGO
0.99171
4.638227
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2017-09-11T14:02: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": "eae504c68...
4c2ca606-920a-43eb-85d4-a201d68523a4
fahadzafar/DepthEstimator
src/input/OCVInputs.cpp
#include <opencv/cv.h> #include "OCVInputs.h" using namespace cv; int In::NUM_THREADS = 8; int In::IMAGES_USED_FOR_DEPTH_CALCULATION = 4; // Resolution of each image read from the camera .RAW file. // These resolution parameters are also used as dimensions for // output images from the depth estimation engine. int...
TOOL
0.911683
5.494247
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-02-22T21:44: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": "73ca0b4bb9...
d74d7aef-0c48-4314-91ff-3e29e1a6e89f
YatharthKumarSaxena/DSA_Lab_By_College
Day-8/isomorphicGraph.cpp
#include <iostream> #include <fstream> using namespace std; class Graph{ int **adj; int vertices; public: Graph(int vertices){ this->vertices = vertices; adj = new int*[vertices]; for(int i=0;i<vertices;i++){ adj[i] = new int[vertices]; } } void addEdge(i...
ALGO
0.999297
4.586807
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2025-01-21T12:35: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": "407af622420...
469e349f-4872-4ca4-b23b-f46ce326429b
bvquoc/CP-Trainning-2021
0 - Contest 2020/PreVOI2019/PreVOI2019-Day1/Contestants/Ti131/mine.cpp
#include<bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define pu push #define pii pair<long long,long long> #define TASKNAME "mine" #define ll long long const long long mod=1e6+3; ll f[500009]; long long dq(long long so) { long long res=0; if (f[so]!=-1) return...
ALGO
0.999991
3.624887
{ "github_metadata": { "branch": "master", "commit_count": 611, "repo_created_at": "2020-06-03T07:47:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8df4565...
bdec3354-705c-4dd1-b276-780fe497c9ea
tomekniedzia/Wifi-and-radar-symulation
magiterka/WeatherRadar.h
#pragma once #include <cmath> class WeatherRadar { public: WeatherRadar() = default; ~WeatherRadar(); void MoveRadar(double move_x, double move_y); double GetXRadar(); double GetYRadar(); void SetXRadar(double x_radar); void SetYRadar(double y_radar); int GetIndexPRF(); void SetIndexPRF(int index); void Dec...
ALGO
0.985235
5.871472
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2021-01-13T22:34: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": "0360db9004a...
caf50097-6555-4ce5-b9e6-54b13f8e293e
akrabulislam/Light-Oj
Light-oj-1175.cpp
#include <bits/stdc++.h> using namespace std; #define pii pair<int,int> #define MAX 100000 int dx[] = {0, 0, -1, 1}; int dy[] = {-1, 1, 0, 0}; char matrix[1010][1010]; int dis[1010][1010]; int f[1010][1010]; int r,c; void clean(){ for(int i=0; i<1010; i++){ for(int j=0; j<1010; j++){ dis[i][...
ALGO
0.999921
3.92028
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-04-21T08: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": "f2c6820273...
13de0788-2ff8-48f7-8928-e177ac51b2fb
wzx54321/AndroidLearnTips
java-leetcode/code/scramble-string-3.cpp
// Scramble String // 递归+剪枝 // 时间复杂度O(n^6),空间复杂度O(1) class Solution { public: bool isScramble(const string& s1, const string& s2) { return isScramble(s1.begin(), s1.end(), s2.begin()); } private: typedef string::const_iterator Iterator; bool isScramble(Iterator first1, Iterator last1, Iterator f...
ALGO
0.99999
5.889442
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2018-05-31T01:56:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fcc935fa8...
b23667dd-8fe1-4026-a919-2d5c950deedd
dylanhdy/codebase
Contest_ACM/ICPC2020 南京/H.cpp
#include <bits/stdc++.h> #define LL long long #define LD long double #define MAXN #define MAXM #define P 1000000007 #define MP make_pair #define PB push_back #define INF 0x3f3f3f3f #define dbg(a...) fprintf(stderr, a) using namespace std; int T, n, m, val[10][10]; int ksm(int x, int y) { int num=1; while(y) {...
ALGO
0.999925
4.175477
{ "github_metadata": { "branch": "master", "commit_count": 235, "repo_created_at": "2019-02-15T12:37:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "020dc19a...
d601c327-fb4c-48cb-930d-23ded63c05dd
vishwash-soni/DSA-Neetcode-150-questions.
LinkedList/Hard/Reverse Nodes in k-Group.cpp
# Reverse Nodes in k-Group (LeetCode 25) ## Problem Description Given a linked list, reverse the nodes of the list `k` at a time and return its modified list. `k` is a positive integer, and it's given that `k` is less than or equal to the length of the linked list. If the number of nodes is not a multiple of `k`, the...
ALGO
0.999997
6.94364
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2024-09-02T17: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": "020b575cf7a...
605d4d50-431f-458e-8c9d-d5ec38629d5f
naman-verma755/Solved-LeedCode-Problems-Solution
701-insert-into-a-binary-search-tree/701-insert-into-a-binary-search-tree.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.999988
6.119606
{ "github_metadata": { "branch": "main", "commit_count": 1059, "repo_created_at": "2022-03-24T09:27: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": "43f93e20c...
d985c545-b93d-4d75-b5f6-39c13ff03e67
tanish35/C
B_Progressive_Square.cpp
#include <iostream> #include <vector> #include <set> #include <algorithm> using namespace std; int main() { int t; cin >> t; for (int case_num = 1; case_num <= t; case_num++) { long long n, c, d; cin >> n >> c >> d; vector<long long> v(n * n); multiset<long long> s; ...
ALGO
0.999909
3.691943
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2023-10-07T15:38:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "147a24b2f1b...
455fd059-b6d9-43fd-b88e-3e1550e4de91
chochocho/CS106L
Lectures/16-Functors/Words/words-lambda.cpp
#include <string> #include <vector> #include <algorithm> #include <iostream> #include <fstream> #include <sstream> using namespace std; int GetInteger(); int main() { ifstream input("dictionary.txt"); vector<string> words; string line; while (getline(input, line)) words.push_back(line); cout << "...
TOOL
0.949159
4.762916
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-08-28T17: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": "1d0a5cf612...
a90289db-c3cf-4100-9095-71b082d10e4b
Kimjisue/Computer-Vision
opencv-setup/22100194.cpp
#include <opencv2/opencv.hpp> #include <iostream> #include <vector> using namespace cv; using namespace std; Mat combineImages(Mat firstImage, Mat secondImage) { if (firstImage.empty() || secondImage.empty()) { cout << "image empty!" << endl; return Mat(); } Ptr<ORB> orbF = ORB::create(10...
ALGO
0.982348
5.757853
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-12-30T00:40: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": "26dfcab9fc1b...
1e4464ac-6aea-4df9-a46b-801641bbba35
freezer-glp/leetcode-submit
src/Search for a Range.cpp
/*Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in the array, return [-1, -1]. For example, Given [5, 7, 7, 8, 8, 10] and target value 8, return [3, 4]. Array Binary Se...
ALGO
0.999985
6.098399
{ "github_metadata": { "branch": "master", "commit_count": 199, "repo_created_at": "2014-11-12T04:30: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": "49b13234...
d5396189-358a-4ef1-a03b-f26b984ede32
AhTOhGH/LeetCode
sortArrayByParity.cpp
#include <vector> #include <assert.h> #include <iostream> class Solution { public: std::vector<int> sortArrayByParity(std::vector<int>& nums) { for (size_t i = 0; i < nums.size()-1; i++) { if (nums[i]%2 != 0) { for (size_t j = i+1; j < nums.size(); j++...
ALGO
0.999974
5.396116
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-02-16T06:15:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "af1efe884b5f...
74c3b310-a2fc-4940-b8da-3c5f91e0d1bb
sphexa-org/sphexa
domain/include/cstone/traversal/boxoverlap.hpp
/* * Cornerstone octree * * Copyright (c) 2024 CSCS, ETH Zurich * * Please, refer to the LICENSE file in the root directory. * SPDX-License-Identifier: MIT License */ /*! @file * @brief (halo-)box overlap functionality * * @author <NAME> <<EMAIL>> */ #pragma once #include "cstone/sfc/box.hpp" #include "cs...
ALGO
0.993562
7.405919
{ "github_metadata": { "branch": "develop", "commit_count": 3017, "repo_created_at": "2018-12-19T14:05:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 93, "forks": 31, "issues": 3, "pull_requests": 8 }, "file_meta": { "content_id": "d4220...
76cbc369-869c-4d39-8223-dcdbaf8b2ddb
a-wesole/VertexCP_2023_PbPb_D0_production
VertexCompositeProducer/src/D0Fitter.cc
// -*- C++ -*- // // Package: VertexCompositeProducer // Class: D0Fitter // /**\class D0Fitter D0Fitter.cc VertexCompositeAnalysis/VertexCompositeProducer/src/D0Fitter.cc Description: <one line class summary> Implementation: <Notes on implementation> */ // // // #include "VertexCompositeAnalysis/Verte...
ALGO
0.997603
5.71208
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2025-05-17T00: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": "25cbd19a884...
df852f6a-f16b-42da-9bc4-ec62bf320585
arangodb/arangodb
3rdParty/boost/1.78.0/boost/geometry/index/detail/rtree/visitors/children_box.hpp
// Boost.Geometry Index // // R-tree node children box calculating visitor implementation // // Copyright (c) 2011-2015 <NAME>, <NAME>. // // This file was modified by Oracle on 2019. // Modifications copyright (c) 2019 Oracle and/or its affiliates. // Contributed and/or modified by <NAME>, on behalf of Oracle // // Us...
ALGO
0.998174
7.292331
{ "github_metadata": { "branch": "devel", "commit_count": 51986, "repo_created_at": "2011-10-26T06:42:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13878, "forks": 857, "issues": 743, "pull_requests": 38 }, "file_meta": { "content_id": ...
67b7b0ae-5760-43a4-ab9a-da3ebbc05df5
root-project/root
math/mathcore/inc/Math/SpecFuncMathCore.h
// @(#)root/mathcore:$Id$ // Authors: <NAME> & <NAME> 06/2005 /********************************************************************** * * * Copyright (c) 2005 , LCG ROOT MathLib Team * * ...
TOOL
0.926792
5.599139
{ "github_metadata": { "branch": "master", "commit_count": 93033, "repo_created_at": "2013-06-27T10:46:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2899, "forks": 1363, "issues": 467, "pull_requests": 269 }, "file_meta": { "content_id"...
94321c14-e454-490c-b380-3116a2503a3b
AdamFilipowicz/C
ALGLista2Zad3.cpp
#include <cstddef> #include <iostream> #include <stdlib.h> #include <time.h> //Modyfikacja z Zad1. Sortowanie przy wkładaniu elementu. using namespace std; class Element { private: int value; Element* next; Element* prev; public: Element (int v ) { value = v; next = prev = NULL; } ...
ALGO
0.999696
3.958027
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2017-03-24T09:40: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": "acf7ad072...
233fa88c-40c1-448d-a1fa-a16ff4b385a3
QuickSorting/Codeforces
Round 712/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e5 + 3; int n; pair<int, int> p[N]; multiset<int> ms; ll dp[N]; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); cin >> n; for(int i = 0; i < n; ++i) cin >> p[i].first >> p[i].second; sort(p, p + n); f...
ALGO
0.999896
3.51543
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-12-13T18:02: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": "f0cd98019d84...
444253ae-e4ec-4e1d-b7f6-b0378d05e058
jovid18/problem_solving
ps/2025/0215/D.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define pii pair<int, int> // https://atcoder.jp/contests/abc393/tasks/abc393_d int32_t main() { cin.tie(0)->sync_with_stdio(0); int n; string s; cin >> n >> s; int cnt = 0; for (int i = 0; i < n; ++i) { if (s[i] == '1'...
ALGO
0.999996
4.170694
{ "github_metadata": { "branch": "main", "commit_count": 841, "repo_created_at": "2024-01-14T07:53: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": "2a064750cd...
88eac001-584f-4304-9ab7-918ae2fcebb3
ComradeMohan/CSA5153_Cryptography
Q39.cpp
#include <stdio.h> #include <string.h> void frequency_analysis(char *ciphertext, int *freq) { int len = strlen(ciphertext); for (int i = 0; i < len; i++) { if (ciphertext[i] >= 'A' && ciphertext[i] <= 'Z') { freq[ciphertext[i] - 'A']++; } } } void decrypt_additive_cipher(char *...
ALGO
0.999932
5.137343
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-07-17T07:11: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": "b2fbc6e87f51...
28af5ea9-0489-4aa3-92e1-f8891929d980
mylinh030203/CTDL-GT
Assignment 2/bt1.cpp
#include<bits/stdc++.h> using namespace std; double arr[1000]; double A(double arr[], int n){ double sum = 0.0; int dem = 0; for(int i=0; i<n;i++){ if (arr[i]>0){ sum=sum+arr[i]; dem++; } } if(dem==0) return 0; else{ double average = sum / ...
ALGO
0.999803
4.076234
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-04-30T12:31:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f6b3da04e10...
ad022c06-e702-4db0-890c-76b74e28e7c6
tch0/CppPrimer
10Algorithm/P342.ReorderElementsAlgotithms.cpp
#include <vector> #include <array> #include <deque> #include <list> #include <string> #include <numeric> #include <algorithm> #include <iostream> using namespace std; // auxiliary functions template<typename IterType> void printElements(IterType b, IterType e) { cout << "elements: "; for (auto iter = b; iter !...
ALGO
0.998412
5.739933
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2022-04-28T05:02: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": "e1fdafb71...
17dab693-3d1b-4254-8da9-65ba1706db78
yash3001/Competitve-Programming
Algorithms/Dynamic Programming/1. 01 Knapsack/7. Target Sum/taget_sum_top_down.cpp
/* @author -> gamma30 */ #include <bits/stdc++.h> using namespace std; int count_subset_partition_difference(int *, int, int); //int dp[n][sum] int dp[1001][1001]; int main(){ memset(dp, -1, sizeof(dp)); cout<<"Enter the size of the set: "; int n; cin>>n; cout<<"Enter the set: "; int arr[n]; ...
ALGO
0.99999
4.104632
{ "github_metadata": { "branch": "master", "commit_count": 402, "repo_created_at": "2021-02-02T10:13:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1c7bb6ce...
bfeef2f2-d3fa-42b9-91c6-9b6e20bcc352
misals/Leetcode
0054-spiral-matrix/0054-spiral-matrix.cpp
class Solution { public: vector<int> spiralOrder(vector<vector<int>>& mat) { int n = mat.size(); int m = mat[0].size(); int left = 0; int right = m - 1; int up = 0; int down = n - 1; vector<int> ans; int dir = 0; ...
ALGO
0.999999
6.551726
{ "github_metadata": { "branch": "main", "commit_count": 2368, "repo_created_at": "2022-04-27T12: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": "8737661e0...
d7ed3194-e82c-4dfd-af33-d89ea64b5865
PrajwalHD58/competative_coding
Code Forces/round#724/B_Prinzessin_der_Verurteilung.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i,a,b) for(long long i=a;i<b;i++) #define RREP(i,a,b) for(long long i=a;i>b;i--) #define pb push_back #define popb pop_back #define google(T) typedef vector<int> vi; typedef pair<int, int> pii; typedef pair<int , pii> piii ; const int N =...
ALGO
0.99999
3.65076
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-08-17T18:25: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": "755d03c756...
191154bc-8228-4208-a475-7fcd4fd41bd0
whoown/Leetcode
Leetcode/19.cpp
// // Leetcode // // Created by <NAME> on 15/4/8. // Copyright (c) 2015年 <NAME>. All rights reserved. // #include <stdio.h> #include "tools.h" //#include "run.h" using namespace std; #ifdef __RUN__ struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; Li...
ALGO
0.999751
4.516042
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2015-07-02T06:55: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": "d55964968...
1efdbce3-3608-4522-a4ff-f99a75738499
dudhat1/flutter_application_1
fringmarge.cpp
#include <iostream> using namespace std; class loc { int longitude, latitude; public: loc() {} loc(int lg, int lt) { longitude = lg; latitude = lt; } void show() { cout << "\n " << longitude << " "; cout << latitude << "\n"; } friend lo...
TOOL
0.901492
4.187193
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-07-06T13:15: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": "f99915afbb...
21945657-8121-40d2-8f01-c37b87e2dddb
Aadi0509/CipherSchoolDSA
LEC 15/Q.cpp
#include<bits/stdc++.h> using namespace std; class ListNode { public: 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) {} }; ListNode * addTwoNumbers(ListNode* a, ListNod...
ALGO
0.999648
4.874628
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2023-07-02T06:32:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "98e5de0d3a0...
83086f4e-b395-4ab4-a506-03574dd2c4c3
YezzuzBruno/CC2-LAB---20211822
Laboratorio 10/ejercicio 3/main.cpp
#include <iostream> #include "Nodo.h" //<NAME> using namespace std; int main(){ int tam; int num; int pos; Nodo* inicio=nullptr; cout<<"LISTA ENLAZADA (INGRESANDO ELEMENTOS EN EL MEDIO DE DOS ELEMENTOS)"<<endl; cout<<"Cual es el tamanio de la lista: "; cin>>tam; while(tam<2){ cout<...
ALGO
0.995409
4.376793
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-04-27T23:07: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": "d0ea9c20ef6...
7509ae27-7cc8-4504-a692-4579a07ef52f
GaoGuangyong/LC
剑指Offer(专项突击版)/剑指Offer II 070.【Medium】【二分】排序数组中只出现一次的数字.cpp
// 二分 // 把相邻 2 个数看成一组,不论数组中元素的个数是多少,都先补一个 // 那我们就会发现,可以找到一个分界点,分界点左边的每组数相同,分界点右边每组数不同 // [1, 1] [2, 3] [3, 4] [4, 8] [9, ] // 在数组最后补一个 9 // n = 9,l = 0; r = 9 / 2 - 1 = 3 // 即 l -> [1, 1],r -> [4, 8] // [1, 1] [2, 2] [3, 3] [4, 5] [5, 6] [6, 7] // 在数组最后一个 6 后面补一个 7 // n = 12,l = 0; r = 12 / 2 - 1 = 5 // 即 l -> [1, ...
ALGO
0.999993
5.665874
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2023-03-29T06:24:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "139dc398f3...
3edc6c69-9ee7-486f-acf0-62c2f8bc26bd
Solidbush/Algorithms-and-data-structures
second term/lab_11/B/main.cpp
#include <vector> #include <iostream> using namespace std; void fill_graph(vector<vector<long long>> &graph, long long &count_edge) { int start_vert, end_vert, cost; for (long long i = 0; i < count_edge; ++i) { cin >> start_vert >> end_vert >> cost; graph[start_vert - 1][end_vert - 1] = cost;...
ALGO
0.99998
4.177307
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-06-09T19:33:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3750ce6286...
8f9be324-36e2-4d73-8d96-7b78a0281f65
lucasb-eyer/pydensecrf
pydensecrf/densecrf/src/objective.cpp
/* Copyright (c) 2013, <NAME> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditi...
ALGO
0.979383
4.590583
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2015-11-13T18:15:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1987, "forks": 424, "issues": 42, "pull_requests": 0 }, "file_meta": { "content_id": "fd9...
edd02988-c219-4a98-a46a-c495b58c6baa
SCIInstitute/ShapeWorks
ExternalLibs/trimesh2/include/lineqn.h
#ifndef LINEQN_H #define LINEQN_H /* <NAME> Princeton University lineqn.h Solution of systems of linear equations and eigenvalue decomposition. */ #include "mathutil.h" // GCC generates (painstakingly-verified-to-be) bogus warnings in this file #if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) # pr...
ALGO
0.999573
5.748571
{ "github_metadata": { "branch": "master", "commit_count": 11241, "repo_created_at": "2013-05-21T18:43:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 119, "forks": 34, "issues": 206, "pull_requests": 5 }, "file_meta": { "content_id": "f2...
a59f1a90-a3a1-49c1-aca0-9e951a48047c
kholboevfozilbek/challange
HackerRank/Migratory birds/solution.cpp
#include <iostream> #include <string> #include <vector> using namespace std; class Type_bird { private: int type_number=0; int number_appearance=0; public: Type_bird(int type_num): type_number{type_num} { } void set_typenum(int typenum){ type_number = typenum; } int get...
ALGO
0.999986
4.662195
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-01-26T11:29: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": "b054126863c2...
d6bcf124-269e-482c-a2a0-fe1c2e90fd57
05ankit/problem
tries1/sumofprefixscoresofstrings.cpp
struct Node{ Node *links[26]; int score=0; bool containskey(char ch) { return (links[ch-'a']!=NULL); } void put(char ch,Node* node) { links[ch-'a']=node; node->score+=1; } Node *get(char ch) { return links[ch-'a']; } }; class Solution ...
ALGO
0.99999
5.19016
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2024-03-09T19:10: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": "53470523753...
6e6d71c0-74cd-4d63-8fdb-ef694469973b
rjbaldwin/PPP_Study_Assignments
Stroustrup C++ Chapter 3 - ObjectsTypesandValues/Tasks/task 4 chapter 3/chap 3 task 4.cpp
// chap 3 task 4.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include "std_lib_facilities.h" int main() { double var1 = (0); double var2 = (0); cout << "Please enter floating-point value 1\n"; cin >> var1; cout << "Please enter floating-point value 2\n...
ALGO
0.968061
3.855348
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-12-03T10:24: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": "a1c7d8bc9c...
b0e7489e-7461-422d-a132-77d6ba23d3de
inauman/learncpp
ch7/control_flow_if/main.cpp
#include <iostream> void printDigitName(int x); int calculate(int op1, int op2, char op); int main() { //printDigitName(2); std::cout << calculate(20, 5, '+') << "\n"; std::cout << calculate(20, 5, '-') << "\n"; std::cout << calculate(20, 5, '*') << "\n"; std::cout << calculate(20, 5, '/') << "\n...
TOOL
0.994735
4.165297
{ "github_metadata": { "branch": "master", "commit_count": 243, "repo_created_at": "2022-06-09T16:14: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": "50f62936...
f8c018fd-0b34-4188-ba3d-d828bbdbcb35
batman-hassaan/DSA-Cpp
sort_selection_sort.cpp
#include <iostream> #include <algorithm> using namespace std; // Function to perform selection sort void selectionSort(int arr[], int n) { for (int i = 0; i < n - 1; i++) { // Assume the first element of the unsorted part is the minimum int minIndex = i; // Find the minimum element in the ...
ALGO
0.999988
5.788911
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-02-01T06:38: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": "cb591b34ac5...
66494d9d-1d4f-4349-ad7f-a1c1041d1c45
dycoke/USACO
2018-2019/December/gold2.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); freopen("cowpatibility.in", "r", stdin); freopen("cowpatibility.out", "w", stdout); int n; cin >> n; vector<array<int, 5>> choices(n); map<int, ll> sub1; m...
ALGO
0.999948
4.239299
{ "github_metadata": { "branch": "master", "commit_count": 193, "repo_created_at": "2022-07-09T16:45:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad9e7460...
9e80182c-58d8-4ba8-af4d-be0b9b7e9ef3
OpenFOAM/OpenFOAM-dev
src/finiteVolume/fvMatrices/solvers/GAMGSymSolver/GAMGAgglomerations/faceAreaPairGAMGAgglomeration/faceAreaPairGAMGAgglomeration.H
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\...
TOOL
0.986257
6.267243
{ "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": "19...
95eeb7c4-bea8-4631-874f-27b5fbc7b567
ji-one/algorithm-study
baekjoon_study_wook/브루트포스/18111._dw.cpp
//18111 마인크래프트 #include <iostream> #include <algorithm> #include <limits.h> using namespace std; int n,m,b; int map[511][511]; int main(){ ios::sync_with_stdio(0); cin.tie(0); cin >> n >> m >> b; int maxh=0; int minh=300; for(int i=0; i<n; i++){ for(int j=0; j<m; j++){ cin...
ALGO
0.999893
3.430046
{ "github_metadata": { "branch": "main", "commit_count": 100, "repo_created_at": "2021-01-03T10:00: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": "698e004b6f...
7c23e515-f319-4f05-89df-13360e5a078e
Coding-Le/SE-Error-Control-Coding
hw1/src/main.cpp
#include"RandNum.h" #include<iostream> #include<stdlib.h> #include<time.h> #include<math.h> #include<stdlib.h> #include<fstream> #include<cstdlib> using namespace std; #define L 1000 int source_arr[L]; int encode_arr[L]; double total_arr[L]; int decode_arr[L]; /*int* generator() { int length = 10000000; int *my_arr ...
ALGO
0.999466
3.799376
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-11-08T16:28: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": "8480926086...
aa662d76-1fae-421d-b3b8-5dd229a00d03
dalanlan/algo
rotate.cpp
/* LintCode: rotate image http://www.jiuzhang.com/solutions/rotate-image/ */ class Solution { public: /** * @param matrix: A list of lists of integers * @return: Void */ void rotate(vector<vector<int> > &matrix) { // write your code here int count = 0; int n=mat...
ALGO
0.999948
6.087403
{ "github_metadata": { "branch": "master", "commit_count": 149, "repo_created_at": "2015-07-12T23:53:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15cc2301...
1c8408b7-9a89-4761-b831-1929b3fd10d8
makio93/competitive-atcoder
arc151/arc151_c/0/main0.cpp
// 本番WA #include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; #define rep(i, n) for (int i=0; i<(int)(n); ++(i)) #define rep3(i, m, n) for (int i=(m); (i)<(int)(n); ++(i)) #define repr(i, n) for (int i=(int)(n)-1; (i)>=0; --(i)) #define rep3r(i, m, n) for...
ALGO
0.999987
3.948529
{ "github_metadata": { "branch": "main", "commit_count": 925, "repo_created_at": "2021-04-23T16:25: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": "9b42e75870...
1f5cbc54-cf46-4809-a73e-49c00df441ea
100RAV-AGGARWAL/Final-450
Graphs/Journey to the moon.cpp
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); vector<string> split(const string &); typedef unsigned long long int lli /* * Complete the 'journeyToMoon' function below. * * The function is expected to return an INTEGER. * The function accepts following p...
ALGO
0.999941
4.996472
{ "github_metadata": { "branch": "main", "commit_count": 178, "repo_created_at": "2022-06-13T04:50: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": "7f1b8e5e10...
c2c18c54-c719-4bb6-bc1e-60d20fca8728
cpprhtn/Cpp_BaekJoon
4716.cpp
#include <bits/stdc++.h> #define MAX 1011 #define INF 0x3f3f3f3f using namespace std; struct edge{ int v, f, c; edge *rvs; edge(int _v, int _f, int _c) : v(_v), f(_f), c(_c), rvs(0){} }; int n, a, b, S, A, B, E; vector<edge*> adj[MAX]; int p[MAX], d[MAX]; edge *path[MAX]; bool inQ[MAX]; void connect_edge(int s, int...
ALGO
0.999788
3.421412
{ "github_metadata": { "branch": "master", "commit_count": 216, "repo_created_at": "2020-05-06T09:03:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ec6336b9...
96c1d18c-f47a-4b73-91da-9f539713c82a
arangodb/arangodb
3rdParty/boost/1.78.0/boost/compute/algorithm/search_n.hpp
//---------------------------------------------------------------------------// // Copyright (c) 2014 Roshan <<EMAIL>> // // Distributed under the Boost Software License, Version 1.0 // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // See http://boostorg.github.com/compute ...
ALGO
0.999435
7.092562
{ "github_metadata": { "branch": "devel", "commit_count": 51986, "repo_created_at": "2011-10-26T06:42:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13878, "forks": 857, "issues": 743, "pull_requests": 38 }, "file_meta": { "content_id": ...
0a493b14-f91a-4afb-8607-c14dc9e988f3
TheIncredibleVee/leetcode-solutions
61-rotate-list/61-rotate-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { private: int getSize(ListNode...
ALGO
0.999962
6.032404
{ "github_metadata": { "branch": "main", "commit_count": 826, "repo_created_at": "2022-07-27T13:58:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "065027f84b...
6ad5f0f9-7d49-4d1b-8fa7-ec840f27de35
khitishpanigrahi98/codes
GFG_Remove_every_k_th_node.cpp
{ // C program to find n'th Node in linked list #include <stdio.h> #include <stdlib.h> #include<iostream> using namespace std; /* Link list Node */ struct Node { int data; struct Node* next; }; Node *deleteK(Node *,int); void append(struct Node** head_ref, struct Node **tail_ref, int new_data) { struct Node...
ALGO
0.999991
5.043692
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-10-20T07:06:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8a7a7ebe09...
5677ca9a-6096-4dad-aeed-650f19cd60d8
Shahab-Ghouri/Mean-of-all-nodes-from-the-list-whose-data-value-is-an-odd-Fibonacci
Mean of Linked List.cpp
// CODE BY <NAME> // BS-CS ( FAST NUCES ) #include <iostream> #define size 20 // defined the size of fibonacci series using namespace std; // creating node class of linked list class node{ public: int data; node *next; }; // creating class for List class LinkedList{ public: node *head,*tail; // head = ...
ALGO
0.999768
4.373148
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-03-21T19:33:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "93c60e7f74c1...
4297f4f6-873e-4f4a-87a9-13febb3eabba
zhuli19901106/careercup
google-6283958983589888_2.cpp
// http://www.careercup.com/question?id=6283958983589888 #include <algorithm> #include <climits> #include <cstdio> #include <vector> using namespace std; int findKthSmallest(vector<int> &a, vector<int> &b, int na, int nb, int ia, int d, int k) { int ib = k - 1 - ia; int pre_a = ia == 0 ? INT_MIN : a[ia - 1]; int ...
ALGO
0.999739
3.225983
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2014-03-18T12:03:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d27d0926...
aa9493fa-8fcc-4931-8b97-96995d563854
tanishq6818/DSA
POTD July 16th/Leetcode POTD.cpp
// 1125. Smallest Sufficient Team // In a project, you have a list of required skills req_skills, and a list of people. The ith person people[i] contains a list of skills that the person has. // Consider a sufficient team: a set of people such that for every required skill in req_skills, there is at least one person ...
ALGO
0.999881
6.179266
{ "github_metadata": { "branch": "main", "commit_count": 919, "repo_created_at": "2023-07-01T16: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": "e7f818ba9d...