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
62a6be2a-2174-4e0e-ac8e-337ec2be8ba8
praneeth2212/Coding
neetcode/Graphs/min cost to connect all points.cpp
class dsu { vector<int> rank, parent, size; public: dsu(int n) { rank.resize(n + 1, 0); parent.resize(n + 1); size.resize(n + 1); for (int i = 0; i < n; i++) { parent[i] = i; size[i] = 1; } } int findupar(int node) { ...
ALGO
0.99998
5.588226
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2023-05-25T09:30: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": "3e3a68d8...
476de9b4-f0da-49b0-bae0-73c965cc5c01
arthurherbout/crypto_code_detection
data/code-jam/files/7214486_Kepnu4_5697089837203456_0_extracted_e2.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <vector> #include <algorithm> #include <set> #include <map> #include <ctime> #include <cassert> #include <cstring> using namespace std; #define sqr(a) ((a)*(a)) #define has(mask,a) (((mask) & (1 << (a))) ? 1 : 0) const int M = 10; long long n, a, b, ...
ALGO
0.999528
3.217153
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2019-09-20T18:35:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 4, "issues": 10, "pull_requests": 1 }, "file_meta": { "content_id": "6d35bdd7...
c92dc526-e4aa-4c08-a6b1-fc0db8e6db4b
SaladJack/ragdoll_simulator
Source/GeomUtils/src/pcm/GuPCMContactConvexHeightField.cpp
/* * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation * and any modifications thereto. Any use, reproduction, disclosure or * distribution of this so...
ALGO
0.991327
5.447168
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-04-11T07:25:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 28, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6962d931...
fdcce09e-92c2-4937-8389-4348d63c9067
apichlkostner/CarND-Extended-Kalman-Filter
src/RadarMeasurement.cpp
#include "RadarMeasurement.h" MatrixXd RadarMeasurement::CalculateJacobian(const VectorXd& x_state) { MatrixXd Hj(3,4); //recover state parameters float px = x_state(0); float py = x_state(1); float vx = x_state(2); float vy = x_state(3); float p_xy2 = (px * px) + (py * py); float p_xy2s = sqrt(p_xy2); floa...
ALGO
0.999706
6.051624
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2018-05-10T10:02:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5874b59...
375e2657-d34e-4970-b0e6-b8a0b5226cc9
daviduvalle/platte
src/linear_regression.cpp
#include "linear_regression.h" void LinearRegression::train() { int weightsCount = _dataset->getTrainingData()[0].size(); // Include the bias for (int i = 0; i < weightsCount + 1; i++) { _weights.emplace_back(0); } double loss = computeLoss(&_weights); int count = 0; while (los...
DATA
0.90658
5.386865
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2022-08-24T03:46: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": "86ec6d649...
13af7907-2013-47ae-9ba8-d258790da367
mahfuzsust/nextplay
library/draw.cpp
/************************************************************************************/ /* ABOUT: */ /* */ /* Name: NextPlay Game Engine ...
ALGO
0.906894
4.756346
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2013-06-03T18:39: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": "45e8980ca4...
bc230f19-f061-469e-ad7f-75005aa090cb
nilimsarma/MPC_Optimization
ip_trust_region/ip_formulate.cpp
#ifndef IP_FORMULATE_CPP #define IP_FORMULATE_CPP #include "ip_formulate.hpp" void Compute_objective_value(const struct_ip_vars &s_ip_vars, double &objective_value) { double objective_value = 0; double x = s_ip_vars.Optimization_variables[0]; double y = s_ip_vars.Optimization_variables[1]; objective_value = x*...
ALGO
0.999657
4.309329
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2016-07-19T09:14: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": "bf315c2a8...
aae02bea-46a3-44cb-b8cc-b1143d914d5b
pezy/LeetCode
132. Clone Graph/main.cpp
#include "solution.h" #include <iostream> #include <unordered_map> #include <unordered_set> #include <algorithm> #include <deque> #include <string> #include <sstream> void printUndirectedGraph(UndirectedGraphNode *node) { std::ostringstream out; std::unordered_map<int, std::unordered_set<int>> map{{0, std::uno...
ALGO
0.999951
5.579695
{ "github_metadata": { "branch": "master", "commit_count": 277, "repo_created_at": "2014-10-15T01:03:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3464, "forks": 974, "issues": 2, "pull_requests": 4 }, "file_meta": { "content_id": "0b5...
380a1ff1-3cdb-4b3f-b21a-adadcb48733d
faraflh/alsuda
prak1/nomor 4.1.cpp
#include <iostream> #include <cstring> using namespace std; int a,b; int main() { int P1[11] = {15,0,0,1,0,5,0,8,6,0,0}; int P2[11] = {10,0,2,2,3,0,0,4,0,3,0}; int P3[11] = {5,0,1,0,0,0,0,0,0,0,0}; int bilangan[12] = {0,0,0,0,0,0,0,0,0,0,0,0}; cout << "Aritmatika Polinomial\n" << endl; cout << "Diketahui : " ...
ALGO
0.998772
3.96534
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-06-08T15:45: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": "ef00cdda690d...
90806ba8-7a27-45fd-97d0-5fe52a841db9
Zobio/atCoder-works
work/abc270c.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; #define uint unsigned int #define ll long long #define ull unsigned long long #define ld long double #define rep(i, n) for (long long i = 0; i < n; i++) #define reps(i, n) for (long long i = 1; i <= n; i++) #define rrep(i, n) ...
ALGO
0.999986
4.779195
{ "github_metadata": { "branch": "master", "commit_count": 731, "repo_created_at": "2020-10-01T07:51:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "70326c6f...
3352caac-e742-4476-af3f-2ffac53bdfce
XeLader/AlgTrainings
1st_train/2h.cpp
#include <iostream> #include <limits> using namespace std; int main() { long long max1_pos = 0, max2_pos = 0, max3_pos = 0, max1_neg = 0, max2_neg = 0; long long min1_neg = numeric_limits<long long>::min(); long long min2_neg = numeric_limits<long long>::min(); long long min3_neg = numeric_limits<long long>::...
ALGO
0.999991
3.423821
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-10-22T23:41:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3121d66ce946...
1b01b312-d5bb-4128-9ba8-ed6829d480e5
xEdziu/pwr-sd-proj3
ClosedAddressingWithBST.hpp
#pragma once #include <iostream> #include "./HashTable.hpp" #include "./BST.hpp" template <typename K, typename V> class ClosedAddressingWithBST : public HashTable<K, V> { private: BST<K, V>** table; size_t tableSize; size_t numElements; /* * Hash function * @param key key to hash ...
TOOL
0.986276
5.668759
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2024-05-12T06:23: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": "98e90a786d1...
cba01d6e-4232-4357-8b8f-67b623df69bd
victorsenam/treinos-old
na2th/spoj/pontes09.cpp
#include<bits/stdc++.h> #define MV 1002 #define ME 20006 using namespace std; typedef int num; typedef int edge; typedef int node; num head[MV], dist[MV], anc[MV]; num to[ME], next[ME], cost[ME], es; node source, dest, n, m; void treeBuild( node s, node d ) { for( int i = 0; i < n; i++ ) dist[i] = INT_MAX...
ALGO
0.999963
3.377069
{ "github_metadata": { "branch": "master", "commit_count": 328, "repo_created_at": "2014-09-11T22:07: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": "c7d788b1...
a393f8d7-eb0d-43ad-81bf-a31326e5d2ce
yangboz/fuzzy-octo-archer
FaceFeature/CppWrapper/modules/comalgs/src/VO_HumanDetectionAlgs.cpp
/**************************************************************************** * * * IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. * * * * By d...
ALGO
0.98328
5.525276
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2014-06-26T14:54:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc9d0c94f...
3d87988d-42ab-437c-8eef-c470f81ea420
kevinscorzu/Tarea2_DL
src/logic/hamming.cpp
#include "hamming.h" int Hamming::arr[filas][columnas]={}; int Hamming::parity=0; QString Hamming::LastParity=""; QString Hamming::ActualParity=""; int Hamming::Error=0; void Hamming::init(int p,int valor) { Hamming::parity=p; int i, j; for (i = 0; i < filas; i++) { for (j = 0; j < columnas; j++)...
ALGO
0.993602
3.941717
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-09-13T16:03: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": "97f9eac88e...
b8b3262a-10bc-4b9e-a481-0f43370ef2f8
raincross7/code-similarity
codes/train_code/problem477/problem477_183.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) #define rep1(i,n) for(int i=1;i<=(n);i++) #define all(x) (x).begin(),(x).end() #define V vector typedef V<int> vi; typedef V<vi> vvi; typedef long long ll; typedef pair<int, int> P; typedef tuple<int, int, int> T; constexpr auto INF =...
ALGO
0.9998
4.324906
{ "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": "d6ebcf138f76...
4836a02a-189c-451c-839f-6eb3a6678eee
jimmyliu86/pifro
branches/natan/brkga/solution.h
// Copyright 2011 Universidade Federal de Minas Gerais // Autor: <NAME> // Projeto Orientado em Computação 2 // Classe de definição da solução do problema. #ifndef PIFRO_SOLUTION_H_ #define PIFRO_SOLUTION_H_ #include <list> #include "./graph.h" class Solution { public: // Contrutor inicializa lista de ro...
ALGO
0.984688
3.999382
{ "github_metadata": { "branch": "master", "commit_count": 112, "repo_created_at": "2015-03-30T06:17:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "8e00c532...
81211393-1c29-4baf-8ee7-89af3c3fae49
michal1000w/GPUSmoke
third_party/cuda_voxelizer/src/cpu_voxelizer.cpp
#include "cpu_voxelizer.h" #include <omp.h> #define float_error 0.000001 namespace cpu_voxelizer { // Set specific bit in voxel table void setBit(unsigned int* voxel_table, size_t index) { size_t int_location = index / size_t(32); uint32_t bit_pos = size_t(31) - (index % size_t(32)); // we count bit positions ...
ALGO
0.994126
5.603499
{ "github_metadata": { "branch": "master", "commit_count": 396, "repo_created_at": "2020-05-10T12:00:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 124, "forks": 10, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "b653d...
089377bc-3f5c-4bac-8f55-a21d720c2467
pseudo1996/denoise
image_denoise/image_denoise/main.cpp
#include "AdaBoost.h" #include <iostream> /* #include <vector> #include <algorithm> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> using std::vector; using cv::Mat; struct matched_patch { int xpos; int ypos; double distance; }; inline bool operator<(const matched_patch& mp1, const matched_p...
ALGO
0.998345
3.816352
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-03-24T15:14: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": "e17f53d902...
88ae6fd3-d15c-4c54-a3bf-bcc246266a6e
atomic0x90/programmers-challenges
lv2/[1차] 캐시(17680)/17680.cpp
#include <string> #include <vector> #include <cctype> #include <utility> #include <algorithm> using namespace std; bool compare(pair<string,int> a,pair<string,int> b){ return a.second < b.second; } int solution(int cacheSize, vector<string> cities) { int answer = 0; vector<pair<string,int> > v; for(in...
ALGO
0.999834
4.82807
{ "github_metadata": { "branch": "master", "commit_count": 188, "repo_created_at": "2021-05-29T04:46: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": "3bd03f88...
70c5f18e-de3b-4e8b-b5bf-a0e8f946b7b6
yu2000324/for-c-code
NonRecursive1.cpp
#include <stdio.h> #include <stdlib.h> #define MaxSize 10 typedef struct BinrayTree { char Mychar; BinrayTree *lchild, *rchild; } TreeNode, *Tree; typedef struct { Tree data[MaxSize]; int top; } Stack; void CreatBinrayTree(Tree *T) { char ch; scanf("%c", &ch); if (ch == '#') { (...
ALGO
0.999976
3.649279
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-06-08T15:33:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15c5c93de...
6f77ad63-0c6b-4839-81f7-08fc035b400c
Nilesh-0203/Daily-Codes
Easy/Winner of an election/winner-of-an-election.cpp
//{ Driver Code Starts #include <iostream> #include <map> #include <algorithm> #include <cstdlib> #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: //Function to return the name of candidate that received maximum votes. vector<string> winner(string arr[],int n) ...
ALGO
0.999932
5.275629
{ "github_metadata": { "branch": "main", "commit_count": 2152, "repo_created_at": "2023-09-19T19:01:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c72c7ef44...
c3b43cf0-ab6d-4162-9e0d-39f2f7b4406d
WardBeullens/BreakingATFE
minrank.cpp
#include "minrank.h" auto initialize_minor_table(){ std::array<size_t , N*N*N*N> table; size_t ctr = 0; for (size_t a = 0; a < N; a++) { for (size_t b = a+1; b < N; b++) { for (size_t c = b+1; c < N; c++) { for (size_t d = c+1; d < N; d++) ...
ALGO
0.999951
4.070354
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-11-04T14:51:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57477de351b6...
d39f7cb9-18ec-491a-afb9-9c7012495b0c
ArpitSingla/LeetCode
Dynamic Programming/1039.cpp
/*If we pick a side of our polygon, it can form n - 2 triangles. Each such triangle forms 2 sub-polygons. We can analyze n - 2 triangles, and get the minimum score for sub-polygons using the recursion. image This is how this procedure looks for a sub-polygon (filled with diagonal pattern above). image Top-Down Soluti...
ALGO
0.999985
5.581003
{ "github_metadata": { "branch": "master", "commit_count": 223, "repo_created_at": "2020-03-14T08:21: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": "c8fc5931...
3af4b763-7e54-4010-86df-622ccb5b7464
Mr-Phoebe/ACM-ICPC
比赛源码/2016 Multi-University Training Contest 03/1006.cpp
#include <stdio.h> #include <algorithm> #include <queue> #include <ctime> using namespace std; typedef long long ll; #define eprintf(...) fprintf(stderr,__VA_ARGS__) const int N=int(2e5)+5; const ll inf=ll(1e18); int n,m,k; struct number{ int sign; ll val; void read(){ char c=0; while(c==0){ switch(c=getc...
ALGO
0.999967
3.045206
{ "github_metadata": { "branch": "master", "commit_count": 421, "repo_created_at": "2015-11-16T08:47:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "913bdd3...
0ad7df7e-7a48-43e8-b88d-20527b087210
khu-kimjunseo/DPO_for_CodeGen
dpo_train/translation_output/java-cpp/HumanEval_112_reverse_delete.cpp
#include<assert.h> #include<bits/stdc++.h> #include<vector> #include<sstream> #include<regex> #include<map> #include<set> #include<unordered_map> #include<unordered_set> std::tuple<std::string, bool> reverse_delete(std::string s, std::string c) { std::stringstream ss; ss << s; std::stringstream ss2; ss2...
ALGO
0.999606
5.403565
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-12-12T11:58: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": "b5348c731620...
47aa28c2-b7de-4f35-a3b0-2c37be9deff7
OmarHassouna-PS/Problem-Solving-CPP
Hard/Decrease_Date_Problems.cpp
#include <iostream> using namespace std; struct stDate { short Year; short Month; short Day; }; bool IsLeapYear ( short Year ) { // if year is divisible by 4 AND not divisible by 100 // OR if year is divisible by 400 // then it is a leap year return (Year % 400 == 0) || (Year % 4 == ...
TOOL
0.995002
4.292867
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-05-27T12:06:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01fd1b2b856a...
1749b3d3-ced2-4b85-9504-9993ddc51dc6
AnkurSheel/codingame_old
c++/src/Common/Graph.cpp
#include "Graph.h" #include <algorithm> #include "MemoryUtils.h" using namespace std; using namespace Common; stGraphNode::stGraphNode(int data) : m_data(data) { } cGraph::cGraph(bool isDirected) : m_isDirected(isDirected) { } cGraph::~cGraph() { for (Nodes::iterator iter = m_vertices.begin(); iter != m_verti...
ALGO
0.994676
4.712118
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2017-04-09T02:45: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": "9e2fda338...
10f27f13-8147-4c62-af2c-a1fc3ed8b2da
alamgir65/XPSC-CP
Week 12/C_Game_with_Multiset.cpp
#include <iostream> #include <set> #include <vector> using namespace std; int main() { int m; cin >> m; multiset<int> elements; vector<int> prefixSums; while (m--) { int t, v; cin >> t >> v; if (t == 1) { elements.insert(2 * v); } else { /...
ALGO
0.999685
5.150383
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-11-07T14:33: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": "9d11ed55d11...
4b436418-569b-401b-997a-40db2d1f7b5c
Shikhar-S/Analysis-of-Competitive-Codebase
Data/Contest1236/all/29089863_62793266.cpp
#include<bits/stdc++.h> using namespace std; #define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define start_routine() int begtime = clock(); #define end_routine() int endtime = clock(); \ cerr << "\n\n" << "Time elapsed: " << \ (endtime - begtime)...
ALGO
0.999985
4.390991
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2019-11-22T14:40:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9fe75a233...
b1c862f8-248b-4232-b091-6585f587ce69
jnanliu/solves-for-PAT
Advanced Level/1149 Dangerous Goods Packaging/main.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <algorithm> #include <queue> #include <map> #include <set> #include <string> #include <iostream> #include <sstream> #define maxn 1010 #define maxe 1000000 using namespace std; typedef long long ll; int n, m, k, id1, id2, ids[maxn]; map<...
ALGO
0.999987
3.906748
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2020-07-28T17:14: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": "bf047b642...
ae54e57c-40d0-4a86-867b-dc60a4d4166f
blackhole6/algorithm-code
个人自用资料/ACM/线段树/楼兰图层(权值线段树).cpp
#include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #include<queue> #include<stack> #include<set> #include<map> #include<vector> #include<cmath> const int maxn=2e5+5; typedef long long ll; using namespace std; struct node { int l,r; int num; }tree[maxn<<2]; vector<int>v; int a[maxn]; void ...
ALGO
0.999764
3.560441
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2020-11-20T09:40: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": "c58c06b57b8e...
40e27ed0-b25d-4ef6-b310-61124c1c5ce5
MAbuzarH/learn_cpp
my c/cs2012nd.cpp
#include <iostream> #include <string> using namespace std; // Function to convert string to unsigned integer unsigned int convertToUnsignedInt(const std::string& barcode) { unsigned int number; for(int i=0; i<barcode.size(); i++){ if(barcode[i]>='0' && barcode[i]<='9'){ number=number*10+barcode[i]-'0'; ...
TOOL
0.974038
5.600324
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-09-04T12:08: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": "3b6f5f29128e...
9694fab3-b951-4304-9923-bcc40f48aa83
stushar12/CPP-272
two.cpp
#include <bits/stdc++.h> using namespace std; int matching(string bigstring, string smallstring) { unordered_map<char, int> smallmap; for (char ch : smallstring) smallmap[ch]++; int window = smallstring.size(); int len = smallmap.size(); int i = 0, j = 0, count = 0; while (j < bigstring.leng...
ALGO
0.999963
4.599114
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2020-10-04T17:11: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": "f49747be33d4...
ec7062ee-9c8c-41bd-9d29-1d2ba1163220
rishitsigotia/DSA
LeetCode/785. Is Graph Bipartite.cpp
class Solution { public: bool DFS(vector<vector<int>>& adj,vector<int>&color, int u , int currColor) { color[u] = currColor; for(int &v : adj[u]) { if(color[v] == color[u]) return false; if(color[v] == -1 && DFS(adj,color,v,1-currColor) == false) ...
ALGO
0.999953
6.284654
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2024-09-29T08:27: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": "08c3a7dfd21...
ad2ad9a2-363b-400c-b2cc-0a220777955e
psshri/Data-Structures-and-Algorithms
theory/Data Structures/Stack/stackImplementationArray.cpp
#include<bits/stdc++.h> using namespace std; void push(int arr[], int* top, int n, int a) { if(*top < n-1) { *top = *top + 1; arr[*top] = a; } else { cout<<"Stack is full, no space left for any element."<<endl; } } void printArr(int arr[], int* top, int n) { cout<<"The arra...
ALGO
0.997665
3.933794
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-01-27T05:16: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": "8589063f078...
8ef95220-f020-41c9-92eb-969ca49b1109
Corsair-cxs/HZOJ
516.奶牛碑文.cpp
/************************************************************************* > File Name: 516.奶牛碑文.cpp > Author: ChenXiansen > Mail: <EMAIL> > Created Time: Sunday, October 18, 2020 PM08:18:32 ************************************************************************/ #include <stdio.h> char lg[100005] = {0}; int ...
ALGO
0.999958
3.646164
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-02-18T06:45: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": "6e83eb86c2...
e7e4e5cb-d08d-4dd7-906d-872cc1fe1624
KiraPein/-6Companies30Days
2.Goldman Sachs/Day 7/593.valid-square.cpp
/* * @lc app=leetcode id=593 lang=cpp * * [593] Valid Square */ // @lc code=start class Solution { public: long long int l(vector<int> p1,vector<int> p2) { int x1=p1[0]; int y1=p1[1]; int x2=p2[0]; int y2=p2[1]; long long int xx=(long long int)(x2-x1); xx=xx*...
ALGO
0.999853
6.131561
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-01-04T11:26: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": "543a123425c6...
cfe491ae-b2c5-4272-be29-3af293092e6e
jensecj/code-challenges
common/merge_sort.cpp
#include <iostream> #include <vector> using namespace std; // merges two vectors in an ordered way vector<int> merge(const vector<int> a, const vector<int> b) { vector<int> v; int a_idx = 0; int b_idx = 0; while (a.size() > a_idx && b.size() > b_idx) { if (a[a_idx] < b[b_idx]) { v.push_back(a[a_id...
ALGO
0.99996
5.780248
{ "github_metadata": { "branch": "master", "commit_count": 100, "repo_created_at": "2018-02-02T15:52: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": "cde028ef...
35810a94-7755-4817-a95f-fd06c344e240
zhaiyuhan/HAODA
HAPPYPLAYER/common/Config.h
/****************************************************************************** QtAV Player Demo: this file is part of QtAV examples Copyright (C) 2012-2016 <NAME> <<EMAIL>> * This file is part of QtAV (from 2014) This program is free software: you can redistribute it and/or modify it under the ter...
CONFIG
0.904751
3.890205
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2017-04-15T04:32:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "fe6d3309...
675a3d40-0024-4112-bfa0-1d8d6e47705c
sujansarkar69/Data-Structure-
Lab Mid Term/3.1.cpp
#include <bits/stdc++.h> using namespace std; vector<int> quick_sort(vector<int> arr) { int n = arr.size(); if (n <= 1) { return arr; } int pivot = rand() % (n); vector<int> left; vector<int> right; for (int i = 0; i < n; i++) { if (i == pivot) { ...
ALGO
0.999984
5.42044
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2023-02-13T12:19: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": "77ac9ce1a...
d355bd55-3b07-4bd9-ae07-1a593e41c582
mariox03/cpp
test/prva_A.cpp
#include <iostream> #include <cmath> using namespace std; /*. a)Zapiši program, ki izračuna vrednosti funkcije y= 3x^3-2x+3 za vsa cela števila med 12 in 112. b) Izračunane vrednosti naj sproti shranjuje v tabelo z imenom vrednosti. c) Program naj izračuna in izpiše največjo vrednost izračunanih vrednosti v tabeli vred...
ALGO
0.999584
4.222517
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-12-08T11:26: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": "24b5e90e4aeb...
ab37dc57-2f79-4ad0-a73e-b2a25226b58d
Alanqwd/Project99
Project3/main.cpp
#include <iostream> /* //Задание 1 bool isLeapYear(int year) { if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) { return true; } return false; } int daysBetweenDates(int day1, int month1, int year1, int day2, int month2, int year2) { const int daysInMonth[] = { 31, 28, 31, 30,...
ALGO
0.976085
4.368498
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-03-29T15:59: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": "9b125960a9...
9365592f-e848-40db-9385-bfebbe374213
BedDaniel/CodeWars_Solutions
codewars-Tribonacci_sequence_6kyu.cpp
/* Well met with Fibonacci bigger brother, AKA Tribonacci. As the name may already reveal, it works basically like a Fibonacci, but summing the last 3 (instead of 2) numbers of the sequence to generate the next. And, worse part of it, regrettably I won't get to hear non-native Italian speakers trying to pronounce it ...
ALGO
0.99975
6.670037
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2023-11-30T09:03:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5e97e1339...
4f0b8d91-37e8-418e-9eae-a9f733c4b82d
kylehofer/advent_of_code_2024
src/day19/main.cpp
#include "../../inputs/day19.h" #include "string.h" #include "stdint.h" #include "stdio.h" #include "math.h" #include "memory.h" #include "stddef.h" #include <thread> #include <future> #include <vector> #include <set> #include "../../utilities/common.h" #define DAY 19 inline size_t nextTowel(const char *&position, c...
ALGO
0.978377
4.09764
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-20T01:33: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": "ccbd6a3996ad...
a9b0b2cd-39e9-4680-b14c-4876b0143bcd
vonfalk/storm-javavis
Gc/SMM/Util.h
#pragma once #if STORM_GC == STORM_GC_SMM namespace storm { namespace smm { // Insert an element into a sorted vector. This should be slightly better than using // lower_bound followed by insert, since we don't have to traverse the vector twice, but we // "resize" the vector as we're finding the proper locati...
ALGO
0.994862
6.395863
{ "github_metadata": { "branch": "javavis", "commit_count": 2586, "repo_created_at": "2022-01-11T20:48: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": "9f575e...
7478fc19-49e2-444c-b221-996eaccd1df3
abhiXsliet/Solved-DSA-Problems
Pratice Problems Topic Wise/Bit Manipulation/003-print-binary-representation-of-a-number.cpp
#include <bits/stdc++.h> using namespace std; // function to convert decial to binary void solve1(int num) { if (num > 1) solve1 (num / 2); cout << num % 2 ; } void solve2(int num) { if (num > 1) solve2(num >> 1); cout << (num & 1); } void solve3(int num) { // convert the ...
ALGO
0.999892
4.2757
{ "github_metadata": { "branch": "main", "commit_count": 2156, "repo_created_at": "2023-07-29T13:17:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a34a74c2c...
652133ec-4d37-47b8-af94-91844619e9a2
hunterkasa/codelibrary
RANGE QUERY/Mo(Sqrt decomposition)/cf_1514D.cpp
// https://codeforces.com/contest/1514/problem/D #include <bits/stdc++.h> using namespace std; #define io ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define endl "\n" void fast(){ io; #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin); // freope...
ALGO
0.999983
4.355277
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-10-12T20:45: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": "1f48e9cb9b4...
7cf5df52-0b8f-45e7-959c-f72889891242
Travis544/CompetitiveProgrammingProblems
graph/test.cpp
#include <vector> #include <cmath> #include <limits> #include <tuple> #include <bits/stdc++.h> using namespace std; // class SegmentTree { // public: // SegmentTree(const vector<int>& array) { // size = array.size(); // tree.resize(4 * size); // indexTree.resize(4 * size); // build_...
ALGO
0.999887
5.254908
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-01-07T22:43: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": "0188e7c70c69...
b90883c8-8d2b-4921-8cd1-f97c997e0c4c
gracygulati7/100DaysOfCode
Day 54/find_dist_critical_pt.cpp
//! leetcode question 2058. Find the Minimum and Maximum Number of Nodes Between Critical Points //? link: https://leetcode.com/problems/find-the-minimum-and-maximum-number-of-nodes-between-critical-points/description/ #include<iostream> #include<vector> #include<climits> using namespace std; struct ListNode { in...
ALGO
0.999996
5.542457
{ "github_metadata": { "branch": "main", "commit_count": 120, "repo_created_at": "2024-01-26T14:03: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": "5bb70bf625...
8861d9ff-caae-457a-930e-1f482c5bf8f4
3agwa/CompetitiveProgramming
TopCoder/SRM625-D2-500.cpp
/* modified bfs, if the current value is not visited, mark it as visited and continue else keep running bfs to reach all multiples of starting node */ #include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define vll vector<ll> #define pii pair<int, int> #define vii...
ALGO
0.999915
4.68917
{ "github_metadata": { "branch": "master", "commit_count": 603, "repo_created_at": "2017-04-19T19:59:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "673f4aaf...
9bfbd701-cafb-49b4-9f51-26f78d3a2190
rivasyafri/OOPHomework1WithoutSTL
Date/mDate.cpp
/** * @file * @brief Driver Date Class * */ #include <iostream> #include "Date.h" using namespace std; void Menu(); int main() { Date D1, D2; cin >> D1 >> D2; int option; do { cout << "D1 : " << D1 << endl << "D2 : " << D2 << endl; Menu(); cout << "<NAME> : "; cin >> option; switch (option) { ...
ALGO
0.978879
4.044234
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2014-03-27T02:59: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": "d54e9a8d7...
8943bf13-1606-4e38-859e-d1359c6739b7
KALI-UM/Programmers
백준/Gold/5213. 과외맨/과외맨.cc
#include <iostream> #include <string> #include <queue> #include <stack> using namespace std; int N; pair<int, pair<int, int>> Tile[502][502]; int Connection[250000][6]; //UL,UR,R,L,RL,RR int Memo[250000]; int Path[250000]; void SetConnection() { for (int i = 1; i <= N; i++) { for (int j = 1; j <= N - ((i + 1) % 2...
ALGO
0.999973
3.554766
{ "github_metadata": { "branch": "main", "commit_count": 202, "repo_created_at": "2023-06-20T11:24: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": "8aa69d4e53...
2c7e1670-b86f-41d8-8680-016faf06cb69
chinmaygarde/radar
Library/Layout/Headers/Layout/Constraint.h
/* * This source file is part of the Radar project. * Licensed under the MIT License. See LICENSE file for details. */ #pragma once #include <Core/Macros.h> #include <Expression/Expression.h> #include <Layout/Priority.h> namespace rl { namespace layout { class Constraint final : public core::ArchiveSerializabl...
TOOL
0.949593
7.434145
{ "github_metadata": { "branch": "master", "commit_count": 1521, "repo_created_at": "2015-07-21T23:21:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "8eb5082...
6b08dce3-0971-451b-bfea-d01f4c694e33
moondemon68/cp
ITEBE/Bootcamp/SelectionContest/M.cpp
#include <bits/stdc++.h> #define fi first #define se second #define pb push_back #define mp make_pair #define MOD 1000000007 #define pii pair<int,int> #define LL long long using namespace std; int main () { //clock_t start = clock(); ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ...
ALGO
0.999969
3.678384
{ "github_metadata": { "branch": "master", "commit_count": 184, "repo_created_at": "2018-09-17T12:29: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": "3ea766d7...
fa3dad84-ae47-4423-a501-d2e2562c396e
studouglas/GEANT4-GPU
geant4.10.02/source/processes/hadronic/models/lend/src/nf_polevl.cc
/* polevl.c * p1evl.c * * Evaluate polynomial * * * SYNOPSIS: * * int N; * double x, y, coef[N+1], nf_polevl[]; * * y = nf_polevl( x, coef, N ); * * * DESCRIPTION: * * Evaluates polynomial of degree N: * * 2 N * y = C + C x + C x +...+ C x * 0 1...
ALGO
0.999775
5.361555
{ "github_metadata": { "branch": "master", "commit_count": 518, "repo_created_at": "2015-09-13T23:36:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 40, "forks": 18, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12d9c7...
75e213d4-9fc6-4eff-932a-b3adfbecf40d
willwil1/OpenGL-render-pipeline
CG2 lab1/Matrix.h
#pragma once class matrix_4x4{ public: float M[16]; void setM(float x1, float x2, float x3, float x4, float y1, float y2, float y3, float y4, float z1, float z2, float z3, float z4, float w1, float w2, float w3, float w4) { this->M[0] = x1; this-> M[1] = x2; this->M[2] = x3; this->M[3] = x4; this->M[4] =...
ALGO
0.97167
3.740868
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-03-02T18: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": "b25af147d1...
0dce1990-3d0f-41ca-8d00-a6ad0bf65862
Guardian-Li/Pat_Advanced
B1095.cpp
#include<algorithm> #include<iostream> #include<string> #include<vector> #include<map> #include<unordered_map> using namespace std; typedef struct stu_ stu; typedef pair<int,int > pii; struct stu_{ string id; int g; }; vector<stu> s; vector<stu> adv; vector<stu> base; vector<stu> top; unordered_map<int , pii> ...
ALGO
0.99914
3.770913
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-09-11T11:10: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": "350b21185...
58e204ef-bf99-4445-968b-0fc0922142e2
yular/CC--InterviewProblem
LeetCode/leetcode_find-minimum-time-to-finish-all-jobs.cpp
/* * * Tag: DFS * Time: O(nlgn + k^(n - k)) * Space: O(k) * Can take a look at this solution: https://leetcode.com/problems/find-minimum-time-to-finish-all-jobs/discuss/1009768/C%2B%2B-0ms-Use-Greedy-to-Prune */ class Solution { public: int minimumTimeRequired(vector<int>& jobs, int k) { if(k == 0) { ...
ALGO
0.999991
5.92132
{ "github_metadata": { "branch": "master", "commit_count": 3377, "repo_created_at": "2014-03-07T01:45:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 35, "forks": 12, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "43600...
72164269-38a2-449f-96d5-33c5d32948f6
k7official/data-structures
Assignment 3/ass_3e.cpp
#include <iostream> using namespace std; class TreeNode; class Tree; class Header { public: Header() { data = {}; nextHeader = 0; nextOfType = 0; } int data; Header* nextHeader; TreeNode* nextOfType; }; class TreeNode { friend class Tree; friend int equal(TreeNode*...
ALGO
0.996427
3.66582
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-11-19T07:37: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": "c75ef2b90870...
72d17f5e-6fca-4460-bef3-9b0ccd2fc708
R3GNUM/GR4DE-10-COMPUTER.
unit 1/PROBLEM 1.cpp
//Writen by <NAME> Class 10. //Problem 1 page number 12. #include <iostream> using namespace std; main() { //int is for integer and I have assigned them values respectively. // int a to e are the one which have numeric values for arthimetic operations. int a = 1; int b = 2; int c = 3; int d = 4; int e = 5; int SUM ...
ALGO
0.989096
3.242546
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-12-16T10:07:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe3fbd8417b2...
faa85f82-19d5-4596-aaad-7b3a03a99704
Nedriia/Hacker_Rank_Solutions
HackerRank_Solutions/30_Days_of_Code/Day 12 - Inheritance/Solution.cpp
#include <iostream> #include <vector> using namespace std; class Person { protected: string firstName; string lastName; int id; public: Person(string firstName, string lastName, int identification) { this->firstName = firstName; this->lastName = lastName; this->id = identification; } void printPerson() {...
TOOL
0.965233
4.033222
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2019-07-30T12:21:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4418ad003...
5ba0172a-8702-41c8-902f-c2e07459ab3c
K0nnyaku/Code
Data/CSP-JS2021二轮提高组数据/SD-00340/airport/airport.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<queue> #include<cmath> using namespace std; const int N = 1e5 + 10; struct node { int a,b; }; bool cmp(node x,node y) { return x.a < y.a; } int n,m1,m2,ans = -1,maxans1 = -1; node gn[N],gw[N]; priority_queue <int,vector<int>,great...
ALGO
0.999814
3.153565
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-01-16T00:09: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": "4b39203377...
a8cdb12f-ac4e-4cb2-a7ae-45edaafb3cc4
YashveerSinghdsa/DSA
CPP/FOUR/BASIC RECURSION/ReverseArray.cpp
//use 5 as first input #include<iostream> #include<algorithm> using namespace std; void f(int i,int arr[],int n){ if(i>=n/2){ return; } swap(arr[i],arr[n-i-1]); f(i+1,arr,n); } int main(){ int n; cin>>n; int arr[]={5,4,3,1,2}; for(int i=0;i<n;i++){ cin>>arr[i]; } ...
ALGO
0.999992
4.164803
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-12-30T15:45:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "606bfc050ff...
94aba307-7752-415a-b028-a70acf048d12
alexandraback/datacollection
solutions_1485490_0/C++/Akai/C.cpp
/* Author : Akai Problem : C Time : */ #include<iostream> #include<cstdio> #include<fstream> #include<cstring> #include<cmath> #include<algorithm> #define PI acos(-1.0) using namespace std ; long long sb[1001] , sa[1001] ; int a[1001] , b[1001] ; int T , n , m ; long long get(long long s , int x , int...
ALGO
0.999913
3.021449
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04c162617...
fd48c845-8425-49ba-af7c-f9ab033434b0
iamkishan98/SortingAlgo
ksmall.cpp
#include<iostream> #include<algorithm> #include<climits> #include<time.h> using namespace std; void swap(int *a, int *b) { int temp = *a; *a = *b; *b = temp; } int partition(int a[], int l, int r, int x) { int i; for (i=l; i<r; i++) if (a[i] == x) break; swap(&a[i], &a[...
ALGO
0.99997
4.784162
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-11-04T11:15:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "51cd6c076b...
8ff29e3d-d0f8-4faf-914e-aecbee6749dd
alexandraback/datacollection
solutions_2645486_0/C++/danpol/main.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <algorithm> #include <vector> #include <stdio.h> #include <stdlib.h> #include <cmath> using namespace std; typedef long long lld; void solve() { lld e, r, n; cin >> e >> r >> n; vector <lld> v(n); for (int i = 0; i < n...
ALGO
0.999935
3.841072
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9466eb032...
202aa8d1-1567-4585-8123-bed58d90e4fc
Laurent-LLM/Junzi_Oeil
Junzi_Oeil.ino
/* * Animation de l'oeil de Junzi par une matrice de led * * Les mouvements de l'oeil sont contrôlés par le pavé numérique : * 8 => regard en haut, 4 => regard à gauche, 6 => regard à droite, 2 => regard en bas * Un clin d'oeil est généré toute les 10 à 30 secondes * * par LLM, le 21/07/2023 */ // F...
TOOL
0.994427
4.758275
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-08-17T15:55: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": "f316db7636f4...
97b0a949-b2a2-40ea-88b9-01a4f828149d
soloway2010/thesis
src/3dGeometryGeometricalPart.cpp
/* Predicates and functions needing SoS */ #include "tritri_isectline.c" array<int,3> MeshIntersectionGeometry::getGridCellContainingVertex(const int meshId, const int vertexId, const VertCoord &cellScale, TempVarsGetGridCellContainingVertex &tempVars ) const { VertCoord &tempVar = tempVars.tempVertCoords;//te...
ALGO
0.998775
4.734233
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-09-29T14:29: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": "526bef62dc...
640ee8e1-8602-47fd-a93f-18695e66e398
brpapa/algorithms
solutions/uva/750.cpp
/* brute force > iterative > all permutations difficulty: easy date: 12/Jan/2020 by: @brpapa */ #include <cstdio> #include <vector> #include <algorithm> #define abs(a) ((a) > 0 ? (a) : -(a)) using namespace std; struct Taux { int row[8]; // row[c] = linha da coluna c }; vector<Taux> validArrangements; ...
ALGO
0.999925
4.118002
{ "github_metadata": { "branch": "master", "commit_count": 197, "repo_created_at": "2019-01-25T20:40:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 35, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a18371...
28098f62-d171-40aa-b020-121b1e8834e9
pluveto/leet
2021-11-17/p581.cpp
#include <debug.h> class Solution { public: //寻找小区间,使得中间的数字都在两端的值之内,两端的数字都升序排列 int findUnsortedSubarray(vector<int> &nums) { int n = nums.size(); std::vector<int> sorted(nums); sort(sorted.begin(), sorted.end()); int l = 0, r = n - 1; while (l <= r && sorted[l] == nums[l]) { l++; } ...
ALGO
0.999965
5.45044
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2021-03-04T14:27: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": "17fc9f83d21...
0d67f970-5bc8-452f-b115-25994df3d1e4
wihobbs/advent-of-code
2022/day04/day04.cc
#include <iostream> #include <fstream> #include <sstream> #include <vector> #include <string> #include <algorithm> using std::cout; using std::endl; int main(int argc, char* argv[]) { // read input std::ifstream inputFile; inputFile.open("input.txt"); std::string line; std::string line2; int sc...
ALGO
0.99476
3.867408
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-12-02T01:35: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": "2e881930659...
c7db0d4e-fc76-482a-8913-617ed47ad466
Clqsin45/acmrec
doing/HDu 3605.cpp
#include <stdio.h> #include <string.h> #define MAX 100002 int f[MAX][11], g[11][MAX]; int ctain[11], now[11], v[11], n, m; inline int scan_d(void) { char c; int ret=0; while((c = getchar()) < '0' || c>'9'); while(c >= '0' && c<= '9') ret = ret * 10+(c-'0'), c=getchar(); return ret; } int dfs(int x) { ...
ALGO
0.999984
3.430592
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-11-28T03:37:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb6655f64e...
907c5416-5b46-4932-b5b2-eb5d040bf4fd
microsoft/DiskANN
apps/restapi/client.cpp
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. #include <ctime> #include <functional> #include <iomanip> // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. #include <string> #include <cstdlib> #include <codecvt> #include <bo...
WEB
0.902854
5.228087
{ "github_metadata": { "branch": "main", "commit_count": 283, "repo_created_at": "2020-06-18T06:18:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1411, "forks": 305, "issues": 136, "pull_requests": 70 }, "file_meta": { "content_id": "a17...
a268dd19-d74a-461b-b9bb-7590d8d3225a
dmprokhorov/DA
9/Dijkstra.h
#ifndef DIJKSTRA_H #define DIJKSTRA_H #include <vector> #include <set> class TEdgeDijkstra { public: long long distance; unsigned goal; }; bool operator < (const TEdgeDijkstra& left, const TEdgeDijkstra& right) { if (left.distance != right.distance) { return left.distance < right.distance; } ...
ALGO
0.999959
5.926299
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2022-04-18T16:23: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": "360cf43c313...
c199cabe-e561-466a-b84b-c2bf785933f6
anurag2204-k/CP
dp/1553B_Reverse_String.cpp
// 1553B Reverse String #include <bits/stdc++.h> typedef long long int ll; const unsigned int MOD = 1000000007; using namespace std; //first way ------------------------------------------------------------------------------------------- void solve(){ string s, t; cin >> s >> t; int n = s.length(), ...
ALGO
0.999996
5.494354
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2025-01-27T16:01: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": "84be1089c76...
4d0ca83b-a784-4fb7-9a7d-7e535f6be22a
Brinews/jacky
C/C-CACULATOR/rpn.h
#ifndef _RPN_H #define _RPN_H #include <ctype.h> #include <stack> #include <vector> #include <string> //template<typename T> class tokenstream { public: tokenstream() {} virtual bool process(const std::string& input, std::vector<std::string>& output) = 0; }; class tokenifier : public tokenstream { public: toke...
TOOL
0.915689
4.793931
{ "github_metadata": { "branch": "master", "commit_count": 201, "repo_created_at": "2013-11-16T09:35:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "14021de8...
65dcf95c-f639-43c6-b7b7-d0e0ed010702
Seeyou2000/Baekjoon-Algorithm
백준/Silver/17478. 재귀함수가 뭔가요?/재귀함수가 뭔가요?.cc
#include <iostream> using namespace std; int cnt; void func(int n) { if (n == 0) { for (int i = 0; i < 4 * cnt; i++) { cout << '_'; } cout << "\"재귀함수가 뭔가요?\"\n"; for (int i = 0; i < 4 * cnt; i++) { cout << '_'; } cout << "\"재귀함수는 자기 자신을 호출하는 함수라네\"\n"; while (cnt + 1) { for (int i = 0; ...
ALGO
0.999817
3.588002
{ "github_metadata": { "branch": "main", "commit_count": 357, "repo_created_at": "2022-03-07T05:42: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": "d7cdd04e89...
18440207-840d-4102-a398-5187f6f747da
LambdaRan/book
cppreference/algorithm/is_permutation.cpp
http://en.cppreference.com/w/cpp/algorithm/is_permutation std::is_permutation 定义于头文件 <algorithm> (1) (C++11 起) (C++20 前) template< class ForwardIt1, class ForwardIt2 > bool is_permutation( ForwardIt1 first1, ForwardIt1 last1, ForwardIt2 first2 ); (C++20 起) template< class For...
ALGO
0.999499
6.724395
{ "github_metadata": { "branch": "master", "commit_count": 106, "repo_created_at": "2018-04-04T01:05: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": "e328c030...
aac229ef-fff0-4dfa-b393-52c04e8406ec
wisdom-yzh/basic-training
src/132-pattern.cc
#include <vector> #include <string> #include <iostream> #include <sstream> #include <algorithm> using namespace std; class Solution { public: bool find132pattern(vector<int>& nums) { if (nums.size() < 3) { return false; } for (int i = 0; i < nums.size(); i++) { int m...
ALGO
0.998581
5.25015
{ "github_metadata": { "branch": "master", "commit_count": 424, "repo_created_at": "2018-07-25T15:59:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f256a61a...
cabf7616-05b2-4a0f-a834-666e45db6fd3
Menemi/IS-2020-algo-1-sem
Lab2/A/main.cpp
#include <fstream> using namespace std; int *Merge(int *start, int first, int *final, int last) { int *c = new int[(first + last) * 4]; int i = 0; int j = 0; int k = 0; while (i < first || j < last) { if (i == first || (j < last && start[i] >= final[j])) { c[k] = final[j]; ...
ALGO
0.999978
4.100162
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2021-03-25T22:52:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2614ad288a...
591de249-c62b-471a-b071-aee2050e9c0e
ehrazhasan/Competitive-Programming
Codeforces/Contests/Educational Round 114/test.cpp
#include <bits/stdc++.h> #define db1(x) cout<<#x<<"="<<x<<'\n' #define db2(x,y) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<'\n' #define db3(x,y,z) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<","<<#z<<"="<<z<<'\n' #define rep(i,n) for(int i=0;i<(n);++i) #define repA(i,a,n) for(int i=a;i<=(n);++i) #define repD(i,a,n) for(int i=a;i>=(n);...
ALGO
0.999436
3.365597
{ "github_metadata": { "branch": "main", "commit_count": 108, "repo_created_at": "2022-05-24T05:36: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": "6d41be16f5...
18928825-64ed-4f9e-9644-8109ef2615a1
navneetk2001/CPP_Programs
Topic Wise Coding Questions/23. DP Striver/56. Count Square Submatrices with all Ones.cpp
https://www.codingninjas.com/codestudio/problems/count-square-submatrices-with-all-ones_3751502?source=youtube&campaign=striver_dp_videos&utm_source=youtube&utm_medium=affiliate&utm_campaign=striver_dp_videos //First Solution :- Tabulation (Based on intuition) int countSquares(int n, int m, vector<vector<int>> &ma...
ALGO
0.999951
5.979197
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-02-14T06:01:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c14ff09717...
ea889a24-1056-43a6-a215-660bd684ee6d
t-highfill/project-euler
cpp/euler216.cpp
#include <iostream> #include <cstdint> #include <cmath> #include "bitwiseset.cpp" typedef uint64_t prime_t; typedef bitwiseset<prime_t> pmap_t; void sieve(pmap_t& pmap, prime_t limit){ prime_t end = floor(sqrt(limit)); for(prime_t i=2; i<=end; ++i){ if(pmap.get(i)){ for(prime_t j=i*i; j <= limit; j += ...
ALGO
0.998879
4.525552
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2016-09-21T14:35: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": "bab775b622...
7ca6a55b-1801-418d-9197-f00d05cf7cd6
Jatandeep/Thesis
source/constitutive.cpp
#include "../include/utilities.h" using namespace dealii; /*To get tensile/positive component of stress to be used in assembly of u*/ /*Gives stress_plus at particular quadrature point*//*Thesis_report:Equation 2.38*/ template<int dim> SymmetricTensor<2,dim> get_stress_plus(const double lambda ,const double...
ALGO
0.998429
4.33226
{ "github_metadata": { "branch": "master", "commit_count": 150, "repo_created_at": "2020-02-18T15:21:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04c71b21...
8a617f57-e26e-4a3c-a304-dc53f43321b6
Xi0131/Miru_can_sort
prac/week2/E.cpp
#include <bits/stdc++.h> #pragma GCC optimize("unroll-loops,no-stack-protector") #pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define watch(x) cout << (#x) << " is " << (x) << endl #define debug cout << "hi" << endl using namespace std; typedef long long ll; typedef long double ld; typedef ...
ALGO
0.999988
3.932405
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2023-06-27T14:16: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": "206240a3a29...
ce34aa6a-d5b8-4eab-8881-9f4fafee4f69
tiankonguse/ACM
contest/2013/ShanDong Muti-University Training Contest III/E The Great Cleanup.cpp
/************************************************************************* > File Name: E The Great Cleanup.cpp > Author: tiankonguse > Mail: <EMAIL> > Created Time: 2013/5/16 21:45:49 ************************************************************************/ #include<cstdio> #include<cstring> const i...
ALGO
0.997884
3.090386
{ "github_metadata": { "branch": "master", "commit_count": 185, "repo_created_at": "2013-03-25T04:04:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 69, "forks": 40, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "827176...
8f754f27-b5e9-4e7d-94a8-b7ff31683e8d
linhduongcute/homeworks
BT4.3.cpp
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); /* * Complete the 'palindromeIndex' function below. * * The function is expected to return an INTEGER. * The function accepts STRING s as parameter. */ int palindromeIndex(string a) { int index = -1; ...
ALGO
0.999755
4.959798
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2024-03-08T08:31:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9087574c87...
78272485-796b-4731-91b8-a59f3696b26f
knowgaurav/interview-prep
Striver/A2Z DSA/Graph/findEventualSafeState.cpp
#include "bits/stdc++.h" using namespace std; bool dfs(int node, vector<vector<int>> &adj, vector<int> &visited, vector<int> &pathVisited, vector<int> &check) { visited[node] = 1; pathVisited[node] = 1; for (int neighbour : adj[node]) { if (!visited[neighbour]) { if (dfs(ne...
ALGO
0.999937
5.669745
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-08-04T04:54: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": "891476b28de1...
68a6e6a6-eb82-4db5-a9ae-9d678111e4b7
StasKrivosheya/Univ-OOP-Refactoring-cpp
Labs/Lab_8_1_2(1).cpp
#include <iostream> class Stack { private: int* array; int* top; int size; public: Stack(int size) { if (size < 0) throw std::exception("Negative_Value"); this->size = size; array = new int[size]; top = array; } ~Stack() { delete[] array; } bool is_empty() { return top <= array; } bool i...
ALGO
0.988604
4.75697
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2019-12-08T13:04: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": "83f969ea5...
2ab84ab0-05f3-4b94-9585-d66e74d72dc4
Rohan-khanal11/dsa
simpleReverse.cpp
#include <iostream> #include <vector> using namespace std; /* Simple Reverse Function vector<int> reverse(vector<int> v) { size_t start = 0; size_t end = v.size() - 1; while (start <= end) { swap(v[start], v[end]); start++; end--; } return v; } void print(vector<int> v) { ...
ALGO
0.999921
5.633997
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-06-17T05:50: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": "af4ad7a4b126...
3f1095d2-10d1-4808-8fee-3f9fde11f1e6
mirceadino/CollegeAssignments
sem2/ag/labs/src/UndirectedGraph.cpp
#include "UndirectedGraph.h" UndirectedGraph::UndirectedGraph() { N_ = 0; M_ = 0; } UndirectedGraph::UndirectedGraph(int N) { N_ = N; M_ = 0; for (int i = 0; i < N; i++) { vertices_.insert(i); neighbours_[i] = std::vector<int>(); } } UndirectedGraph::UndirectedGraph(const UndirectedGraph& that) { N_ = in...
ALGO
0.972159
5.645632
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2016-10-26T14:54:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d6f21614...
44157edd-a664-418c-a161-e7404bbb78b7
thegamer1907/Code_Analysis
DP/2642.cpp
#include <bits/stdc++.h> using namespace std; #define fio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0) #define mem(x, y) memset(x, y, sizeof x); #define fi first #define se second #define pb push_back #define pii pair<int , int> #define asdfg y1 #define int long long #define double long doubl...
ALGO
0.998912
3.82125
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2019-05-24T10:35:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "98025b7cf...
246de2a5-8cf6-45bc-a522-a568884f7cf1
DavidMorano/system
src/libuc/cfx/cfroman.cc
/* cfroman SUPPORT */ /* charset=ISO8859-1 */ /* lang=C99 */ /* convert from a Roman-Numeral representation to its binary integer value */ /* version %I% last-modified %G% */ /* revision history: = 2017-09-20, <NAME>­D­ Morano For fun, really. Do not have a real use. */ /* Copyright © 2017 <NAME>­D­ Morano. Al...
ALGO
0.991976
5.198648
{ "github_metadata": { "branch": "main", "commit_count": 5251, "repo_created_at": "2023-12-09T10:46:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c62cc1da...
1508d2db-46cb-488f-b10c-ec03adb03c8e
jarrycf/408-----
chapter07_sort/p324/4题.快排_随机选择枢轴.cpp
#include <stdio.h> #include <stdlib.h> void swap(int &n, int &m) { int temp = n; n = m; m = temp; } // 分区函数 int Partition(int a[], int low, int high) { // begin int rand_index = low + rand() % (high - low + 1); swap(a[rand_index], a[low]); int x = a[low]; while (low < high) { while (low < high && ...
ALGO
0.999933
4.656693
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-09T10:24: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": "554bcc10c9d7...
58ba8e47-db5a-4fb6-b6c0-323e683954b4
shengren/magma-1.6.1
sparse-iter/control/magma_cmgenerator.cpp
/* -- MAGMA (version 1.6.1) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date January 2015 @generated from magma_zmgenerator.cpp normal z -> c, Fri Jan 30 19:00:32 2015 @author <NAME> */ #include <fstream> #include <stdlib.h> #i...
ALGO
0.959003
3.781113
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-03-25T18: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": "092d3448a9...
465a2eca-d433-444c-89f5-7cdc7924c483
tanyarajhans/LeetCode
number-of-matching-subsequences/number-of-matching-subsequences.cpp
class Solution { public:    int numMatchingSubseq(string S, vector<string>& words) {        map<string,int> m;        for(int i=0;i<words.size();i++)            m[words[i]]++;        int c=0;        map<string,int>::iterator it;        for(it=m.begin(); it!=m.end();it++){            int j=0;            string ...
ALGO
0.999926
5.435776
{ "github_metadata": { "branch": "main", "commit_count": 1801, "repo_created_at": "2021-01-10T12:56:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 944, "forks": 202, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "b1637...
c80a20a9-7f1a-4b00-be9f-1b0a2637b453
98andwin/Kattis_solutions
Problems/Secret Message/secretmessage.cpp
#include <iostream> #include <vector> #include <string> #include <math.h> #include <ios> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int amount; cin >> amount; string res = ""; for (int i=0; i<amount; i++){ string code; cin >> code; ...
ALGO
0.999833
3.923209
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-04-05T09:58: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": "43a7eceb23d...
3d6b2ec9-4ba4-455c-baab-6d3c44f6e586
migavv/dynamic-programming
edit_distance.cpp
#include <cstring> #include <iostream> using namespace std; // int main() { // char s1[100], s2[100]; // scanf("%s %s", (s1+1), (s2+1)); // int len1 = strlen(s1) - 1, len2 = strlen(s2) - 1; // int dp[100][100]; // for (int i = 0; i <= len1; i++) { dp[i][0] = i; } // for (int j = 0; j <= len2; ...
ALGO
0.999936
3.870302
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-23T21:01: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": "4a2b913ca035...
ad0ef718-bc8e-4b78-a090-4f8327dc12c3
HiitLee/algorithm_solving
programmers(moving blocks).cpp
#include <iostream> #include <vector> #include <algorithm> #include <queue> using namespace std; int N; int dx[4] = { 0,1,0,-1 }; int dy[4] = { 1,0,-1,0 }; int rdx[4] = { -1,1,1,-1 }; int rdy[4] = { 1,1,-1,-1 }; int visit[100][100][4]; bool isCheck(int nx, int ny, int nxx, int nyy) { if (nx < 0 || ny < 0 || nx >= N...
ALGO
0.999982
3.95161
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2020-04-29T05:27: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": "30637be43...