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
53e92e70-58e9-43b4-b752-c290b0fb4876
balagithubaccount/cpp-program-my-workout
array-programs/Even-small-odd-greater.cpp
// Write a Cpp program to rearrange an array such that even indx elements are smaller and odd index elements are greater than thir next... #include <iostream> using namespace std; int main() { int size, i, temp; cout << "Enter the array size: "; cin >> size; int arr[size]; cout << "Enter the " << size << " ...
ALGO
0.999943
5.127209
{ "github_metadata": { "branch": "master", "commit_count": 378, "repo_created_at": "2023-01-31T00:55:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "8416d6ab...
35aa1f9b-7bd5-48ec-a292-3b2e30b99577
yyytir777/Codes
C++/Baekjoon/1967.cpp
#include <bits/stdc++.h> #define MAX 10001 using namespace std; // graph[from].push_back({to, w}) vector<pair<int, int>> graph[MAX]; bool visited[MAX ]= {0,}; int max_dist = 0, max_node; void dfs(int start, int dist) { if(visited[start]) return; if(max_dist < dist) { max_dist = dist; ...
ALGO
0.999865
3.963631
{ "github_metadata": { "branch": "main", "commit_count": 343, "repo_created_at": "2023-01-13T17:49: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": "54927045c2...
3a00998d-2f1e-4c0d-8f6a-5936fd50c6a8
gccross/snippets
erase_remove.cpp
#include <iostream> #include <random> #include <vector> #include <utility> using namespace std; int main (int argc, char const * argv[]) { cout << "Hello World " __FILE__ << endl; { random_device rd; mt19937 mt(rd()); uniform_int_distribution<> gen(0,17); vector<int> v(50); for (int &i: v) i = gen(mt);...
ALGO
0.990695
4.993078
{ "github_metadata": { "branch": "master", "commit_count": 203, "repo_created_at": "2016-12-12T22: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": "449edd0b...
19f432ac-5bbc-4538-9556-db674c5a150f
Nimbusprogrammer/DSA
Minimize_the_maximum_distance_to_gasstation/Minimize_the_maximum_distance_to_gasstation.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: bool isitmax ( const vector<int> &stations, double mid , int k) { int count = 0; int n = stations.size(); for ( int i = 1 ;i < n ; i++) { if ( stations[i] - stations[i-1] > mid) count += ceil...
ALGO
0.999817
4.947258
{ "github_metadata": { "branch": "main", "commit_count": 162, "repo_created_at": "2025-05-14T15:14:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "3d06030a16...
903e1360-02ac-4c3b-805a-ef3d7f701692
sstarodubov/algorithm_research
C++/codeforces/800/1454B.cpp
#include <iostream> #include <vector> #include <algorithm> #include <unordered_set> #include <unordered_map> #include <array> using namespace std; bool contains(unordered_set<int> &set, int &val) { return set.find(val) != set.end(); } typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef long long ll;...
ALGO
0.999868
4.659865
{ "github_metadata": { "branch": "main", "commit_count": 1798, "repo_created_at": "2021-02-01T16:56:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a101de4a...
19c3cc46-7aaa-4e14-b9a0-9e6ffaf28867
tamasdzs/szakdolgozat
src/main.cpp
#include <iostream> #include <cstdlib> #include <vector> #include <stdlib.h> #include "MatchingPursuit.h" /* CONSTANTS */ const int ANIMATION_MODE = 1; const int COMPRESSION_MODE = 2; const int DECOMPRESSION_MODE = 3; const int MANUAL_MODE = 4; const unsigned int NUM_OF_LEADS = 2; const unsigned int NUM_OF...
DATA
0.979307
4.466039
{ "github_metadata": { "branch": "master", "commit_count": 144, "repo_created_at": "2016-05-05T13:35: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": "669314e7...
4f85ad04-20dd-42df-9c83-77c28f862e65
rolandjansky/athena
PhysicsAnalysis/ElectronPhotonID/PhotonVertexSelection/Root/PhotonVertexHelpers.cxx
/* Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // Local includes #include "PhotonVertexSelection/PhotonVertexHelpers.h" // EDM includes #include "xAODEgamma/EgammaContainer.h" #include "xAODEgamma/EgammaxAODHelpers.h" #include "xAODEgamma/PhotonContainer.h" #include "xAODTracking/Trac...
ALGO
0.965727
5.360341
{ "github_metadata": { "branch": "master", "commit_count": 100549, "repo_created_at": "2022-08-07T05:54:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bcebe...
17bec4d3-442d-44a3-9a22-53489059256b
Joraslav/STL-Distance
main.cpp
#include <iostream> #include "Vector.hpp" #include "ReadSTL.hpp" #include "Distance.hpp" #include <chrono> #include <iostream> #include <fstream> #include <string> #include <vector> using namespace math; using namespace dist; using namespace read_stl; using namespace std::literals; using namespace std::chrono; int ...
ALGO
0.97417
4.252669
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-04-24T15:11:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b41ce021b34b...
2d6972d4-267c-4104-9332-5d2636028578
varshikakamala/MissionRnD-C-Arrays-Worksheet
src/scoresDescendingSort.cpp
/* OVERVIEW: You are given scores for students of a class in alphabetical order. Write a function that sorts these scores in descending order. Input is array of structures of type student (each student has name and score). E.g.: If input is [ { "stud1", 20 }, { "stud2", 30 }, { "stud3", 40 } ] (three students with mar...
ALGO
0.998413
3.632489
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2015-11-21T17:13:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "17aba4f8f...
fb38cb3c-2dff-4b33-bf07-5fb749319548
ravidavi/OpenFrames
src/Utilities.cpp
/*********************************** Copyright 2023 <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ...
TOOL
0.947012
6.688768
{ "github_metadata": { "branch": "develop", "commit_count": 594, "repo_created_at": "2017-08-16T17:10:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 33, "forks": 14, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "472cf...
6baa77f7-77a5-4a41-b3f7-6ea88e4324dd
Andreas-Burkhalter-Lab/am_funcs
archive/holy_lab_multielectrode_funcs/holylab/Statistics/adaptive_meanshift_step.cpp
#include "mex.h" /* adaptive_meanshift_step: take one step of an adaptive meanshift * * Syntax: * [yout,R2,n] = adaptive_meanshift_step(x,y,factor,minN) * where * x is a d-by-N matrix of data points in d-dimensional space; * y is a d-by-q matrix of landmarks that will move up the density * defined by...
ALGO
0.999993
5.615591
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-08-04T01:04:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1e7d2c5bb5c...
70a8b6b7-3486-46de-8a0a-27e300efbd34
Kitware/burn-out
library/video_transforms/dual_rof_denoise.cxx
/*ckwg +5 * Copyright 2010-2015 by Kitware, Inc. All Rights Reserved. Please refer to * KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, * Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. */ #include "dual_rof_denoise.h" namespace vidtk { /// Apply several iterations of the d...
ALGO
0.998194
5.036857
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2017-01-20T20:46:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a953e7d27e...
579a5036-4aef-4c91-89d6-d96fbefe516b
Shikhar-S/Analysis-of-Competitive-Codebase
Data/Contest1248/all/29175750_62977662.cpp
#include <bits/stdc++.h> using namespace std; #define tani_nachi_ke ios_base::sync_with_stdio(false); cin.tie(NULL); #define M_PI 3.14159265358979323846 #define data data_ #define ff first #define ss second int main() { ...
ALGO
0.999906
4.153023
{ "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": "b82146c8b...
f925832d-c6d9-4762-9634-cf6ca62d3b2d
ericxl/LeetCode
src/604_DesignCompressedStringIterator/Solution.cpp
// // Created by <NAME> on 4/8/18. // #include <leetcode.h> class StringIterator { public: StringIterator(string cs) : cs(cs), i(0), rep(0), ch(' ') { } char next() { if (rep > 0) { rep--; return ch; } else if (i < cs.size()) { ch = cs[i]; ...
ALGO
0.942444
4.385031
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2018-01-25T19:34: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": "f0185cbde...
17e5a115-2bc9-4296-b72e-0137400c48aa
likun-stat/nonstat_Pareto1
p_inte.cpp
/* p_integrand.cpp */ //g++ -std=c++11 -Wall -pedantic p_inte.cpp -shared -fPIC -o p_inte.so -lgsl -lgslcblas #include <stdio.h> #include <math.h> #include <gsl/gsl_integration.h> #include <boost/math/constants/constants.hpp> #include <boost/math/special_functions/gamma.hpp> #include <gsl/gsl_errno.h> extern "C" { s...
ALGO
0.999701
4.856655
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2022-04-30T17:31:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ba546d69cd...
e86b06b7-c86c-44a2-bd37-1544acbf025e
ram-kp/CodingRepo
arrays-string-etc/arraysvectorsANDstring/waterTrap/watertrap/main.cpp
#include <bits/stdc++.h> using namespace std; int waterTrap(vector<int> &a) { int i=0, j=a.size()-1; int ctr=0; cout << "Operation begins\n" ; while(i<j) { cout << "show" << endl; if(a[i] == 0){ i++; continue; } cout << i << endl; if...
ALGO
0.999922
5.229523
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-10-10T04:12:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "afb23f827256...
73fc85be-ccb0-47dd-8d1d-0703883004fe
dfunke/ParDeTria
src/exe/Studies.cpp
// own #include "Geometry.h" #include "DCTriangulator.h" #include "Partitioner.h" #include "utils/Random.h" #include "utils/Generator.h" #include "utils/Logger.h" #include "utils/CSV.h" #include "utils/Timings.h" #include "utils/System.h" #include "utils/ASSERT.h" #include "utils/DBConnection.h" #include "utils/Serial...
ALGO
0.998379
5.656103
{ "github_metadata": { "branch": "master", "commit_count": 938, "repo_created_at": "2023-08-07T16:05:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75379eaf...
fc7883d4-cf31-4741-8124-7db1070d92f9
Miocbb/qe_dft
src/main.cpp
#include "matrix_io.h" #include "parser/OptionPrinter.hpp" #include "qe_dft.h" #include <Eigen/Dense> #include <algorithm> #include <boost/filesystem.hpp> #include <boost/program_options.hpp> #include <exception> #include <iostream> #include <memory> #include <stdio.h> #include <string> #include <unordered_set> #inclu...
TOOL
0.904607
6.614332
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-02-20T22:43: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": "13ccf41e68...
10b4254a-f4af-40f8-a34a-cb7a2a48fb4b
zap150/besthea
examples/uniform_tensor_neumann/run.cpp
/* Copyright (c) 2020, VSB - Technical University of Ostrava and Graz University of Technology 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 copyr...
ALGO
0.999751
5.376686
{ "github_metadata": { "branch": "master", "commit_count": 1170, "repo_created_at": "2020-11-06T09:48:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2aad6da...
dd3a57f7-4c81-4c6c-9573-2dec9799633a
Ponzel0106/CPP
cpa_lab_5_3_10_(6)-B.cpp
#include <iostream> #include <string> int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); } class Fraction { public: Fraction(int numerator = 1, int denominator = 1); std::string toString(); double toDouble(); // Operations Fraction plus(Fraction that); Fraction minus(Fraction that); Fraction times(Fra...
ALGO
0.9972
5.069396
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-12-01T16:28:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8cfb26ceb1...
4c1a96bc-7340-44fb-9d4a-b77d39d5c6e4
renan028/arm_3dof_control
src/control.cc
// remy #include <control.h> #include <utils.h> // std #include <fstream> #include <sstream> namespace remy_robot_control { Control::Control(const std::string& input) : connection(std::make_shared<Connection>()), stop_(false), clock(std::chrono::system_clock::now()), sleep_ms(20) { readInput(inpu...
TOOL
0.959308
6.135342
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2020-11-28T06:21:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cdd43a746...
4c896d86-cbb4-4882-a6fd-26d50575d949
ishandutta2007/codeforces-s
semiexp/normal/788/A.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <vector> #include <string> #include <algorithm> #include <cmath> #include <stack> #include <queue> #include <set> #include <map> using namespace std; #define MOD #define ADD(X,Y) ((X) = ((X) + (Y)%MOD) % MOD) typedef long long i64; typ...
ALGO
0.99994
3.999563
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07: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": "35ec3440e9f2...
c9b363fd-fcd2-4615-8396-b79faeeeaebd
Mahmoud-Abd-Elrazek/Programming-Problems
Graph/Problem solutions/Directed_Graph_Cycle.cpp
// لَنْ تَنَالُوا الْبِرَّ حَتَّى تُنْفِقُوا مِمَّا تُحِبُّونَ وَمَا تُنْفِقُوا مِنْ شَيْءٍ فَإِنَّ اللَّهَ بِهِ عَلِيمٌ [آل عمران:92]. // © M_Abrazeg // Problem Link: https://www.geeksforgeeks.org/problems/detect-cycle-in-a-directed-graph/1 #include <bits/stdc++.h> using namespace std; using i64 = long long ; cla...
ALGO
0.999823
4.871838
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2024-08-19T21:49: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": "be72fa50122...
1ff29a97-1523-4a05-a58b-0d1ab6cc0228
devanshmesson/Competitive-programming
Striver's SDE sheet/Day:5 Linked List/2. Middle of the Linked List.cpp
//Problem Link - https://leetcode.com/problems/middle-of-the-linked-list/ /** * 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),...
ALGO
0.999914
6.237185
{ "github_metadata": { "branch": "master", "commit_count": 1305, "repo_created_at": "2019-05-17T21:46:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "153044...
d4783599-7b83-4e6a-a97d-20c2bdbba8bb
seap-udea/SatPack
Exercise_4_2.cpp
//------------------------------------------------------------------------------ // // Exercise_4_2.cpp // // Purpose: // // Satellite Orbits - Models, Methods, and Applications // Exercise 4-2: Gauss-Jackson 4th-order predictor // // Notes: // // This software is protected by national and international copyri...
ALGO
0.999973
5.971371
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2020-10-06T21:10:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4cf5b069aca6...
2a87bcf5-b255-42ec-a186-aa49dcd945f9
Ok2610/eCP
src/eCP/Tree.cpp
#include <iostream> #include <cmath> #include <stdexcept> #include "containers/IContainer.h" using namespace ecp; using std::cout; using std::endl; template <class T> void Tree<T>::build_dynamic_tree() { if (_L < 1 || _L > 10) { throw std::invalid_argument(_L + " is not a valid index depth"); } ...
ALGO
0.998768
4.477353
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-01-05T16:24:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b845608d2f09...
7ee0bca5-0645-49f7-a065-5f02158fc5e6
ryanhaining/cppitertools
cppitertools/product.hpp
#ifndef ITER_PRODUCT_HPP_ #define ITER_PRODUCT_HPP_ #include "internal/iter_tuples.hpp" #include "internal/iterator_wrapper.hpp" #include "internal/iterbase.hpp" #include <array> #include <iterator> #include <tuple> #include <utility> namespace iter { namespace impl { template <typename TupleType, std::size_t....
TOOL
0.925341
7.109674
{ "github_metadata": { "branch": "master", "commit_count": 2105, "repo_created_at": "2013-09-13T14:37:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1418, "forks": 119, "issues": 13, "pull_requests": 4 }, "file_meta": { "content_id": "6...
d35af840-ea0d-4913-8ee4-c74fb876d553
Harshsngh07/DataStructures_and_Algorithms
CodeForces/A/EugeneArray.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++) cin >> arr[i]; int sum = 0; int count = 0; for (int i = 0; i < n - 1; i++) { sum += arr[i]; if (arr[i]) { count++; ...
ALGO
0.999525
3.161391
{ "github_metadata": { "branch": "master", "commit_count": 981, "repo_created_at": "2020-04-03T18:43: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": "29b6d0fd...
24c3882d-5d5d-4096-bf91-c83d743fccc9
yz1019117968/FSE-24-UniTrans
cleaned_data/transcoder_evaluation_gfg/cpp/GCD_ELEMENTS_GIVEN_RANGE.cpp
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // #include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include...
ALGO
0.999069
5.437953
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-04-06T11:00:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e287a4b38a0...
f24cd36f-f6f3-4571-8e52-ba14cefea7cd
tahaxtrex/algo-datastruct
ads homeworks solutions/week_6/comparison.cpp
#include <iostream> #include <vector> #include <algorithm> #include <chrono> using namespace std; using namespace std::chrono; void maxHeapify(vector<int>& arr, int n, int i) { int largest = i; int left = 2 * i + 1; int right = 2 * i + 2; if (left < n && arr[left] > arr[largest]) largest = lef...
ALGO
0.999911
5.896899
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-07-04T01:16: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": "ee4b510f4440...
3a11c836-15e7-433d-83bd-ac2eac127a3c
sksat/numerical
simple_vibration/main.cc
#include <iostream> #include <sksat/math/vector.hpp> #include <sksat/math/gnuplot.hpp> #define USE_GNUPLOT using sksat::math::vector; using sksat::math::gnuplot; const double k = 1.; const double m = 1.; const double x_init = 1.; const double v_init = 0.; const double dt = 0.001; const double t_limit= 20.; const...
ALGO
0.999617
4.783829
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-08-05T04:41: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": "0415780473...
3b828b7b-6715-476d-81b4-6d7da077534c
lablelan/CppPrimerNote
Code/demo/demo03/demo03_44.cpp
#include <iostream> #include <vector> // int(int_array)[4]; //using int_array = int[4]; typedef int int_array[4]; int main() { int ia[3][4] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11 }; // 版本1 范围for循环 for (int_array &i : ia) { for (int &a : i) { std::cout << a << std::endl; ...
ALGO
0.960297
4.226875
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2018-05-29T06:53: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": "dae72e53a...
d9058c2b-4e8a-4002-8b79-1ba9395c73ff
inte2000/play_with_algo
station_dp/station/DyPro.cpp
#include "stdafx.h" #include "DyPro.h" void fast_station_sequence(Program_T *para, Result_T *result) { //初始进站化边界值 result->f[0][0] = para->a[0][0] + para->e[0]; result->f[1][0] = para->a[1][0] + para->e[1]; //递推关系计算 for(int j = 1; j < STATIONS; j++) { if((result->f[0][j - 1] + para->a...
ALGO
0.999708
4.606825
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2018-09-03T15:39:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 68, "forks": 37, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b2de68...
c246e505-0026-4997-b66f-f9510e0590cd
raquibul-islam/Competitive_Programming
C_Ternary_XOR.cpp
//بسم الله الرحمن الرحيم //Author : <NAME> #include<bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(false);cin.tie(NULL) #define inn cin>>n #define ins cin>>s #define nl endl #define ll long long int #define ...
ALGO
0.999694
3.215835
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2023-09-25T18:29:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6fad7eab196...
eb120690-41b7-46c7-9b25-80837150e240
shubhamnegi9/MyLeetCodeSolutions
2479-meeting-rooms-iii/meeting-rooms-iii.cpp
class Solution { public: // Brute Force Approach // T.C. = O(mlogm) for sorting + O(m*n); m = no. of meetings, n = no. of rooms int mostBookedBrute(int n, vector<vector<int>>& meetings) { // Sort meetings based on their start times so that they can be given rooms early sort(meetings.begin(...
ALGO
0.999996
6.092243
{ "github_metadata": { "branch": "main", "commit_count": 1623, "repo_created_at": "2023-09-01T02:46: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": "42e1373f1...
66d87651-7f43-4302-aaca-d812d6693fa8
NitaiHalle/Sorts-Cpp
src/QuickSort.cpp
// // QuickSort.cpp // copterpix // // Created by <NAME> on 26/10/2020. // #include "QuickSort.hpp" //#include <stdlib.h> void QuickSort::sortArray(int arr[], int n) { quickSort(arr, 0, n-1); } int QuickSort::partition(int arr[], int low, int high) { // Select the pivot element int pivotIdx = rand() ...
ALGO
0.999801
5.870992
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2020-12-09T10:46:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1293ad184d7b...
ce024499-8208-462f-a773-c1d9abce9a93
google/sentencepiece
src/util.h
// Copyright 2016 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
TOOL
0.968478
7.220162
{ "github_metadata": { "branch": "master", "commit_count": 1009, "repo_created_at": "2017-03-07T10:03:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11097, "forks": 1266, "issues": 55, "pull_requests": 9 }, "file_meta": { "content_id": "...
cc1d1994-8256-4a61-b30f-eaa5982dbca5
yohei-yoshihara/GameOfLife3D
GameOfLife3DLib/graphics/filter/GaussFilter.cpp
#include "StdAfx.h" #include "Common.h" #include "graphics/D3DInteropHelper.h" #include "graphics/filter/GaussFilter.h" #include "graphics/filter/FilterCommon.h" graphics::filter::GaussFilter::GaussFilter(void) : m_gaussWeight() , m_tapOffsetX() , m_tapOffsetY() , m_pGaussEffect(nullptr) , m_pTechn...
TOOL
0.900349
5.839237
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2011-12-17T04:56:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5787e27c...
0cd53322-65f9-4288-8cdb-275e3d816d86
didw/coding
algospot/algosrc/problems/recipe/recipe.cpp
#include<cassert> #include<cstdio> #include<iostream> #include<string> #include<vector> using namespace std; int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); } // 분수 a/b 보다 같거나 큰 최소의 자연수를 반환한다 int ceil(int a, int b) { return (a + b - 1) / b; } // 마법의 약 레시피와 이미 넣은 재료의 양이 주어질 때, 더 넣을 재료의 양을 구한다 vector<int>...
ALGO
0.999878
4.394008
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2015-12-01T04:53:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "248b1bda7...
a24dbdf7-783f-4761-af52-6097d73f35e6
Hasan-Saju/Competitive-Programming
Codeforces/1337C.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mp make_pair #define ff first #define ss second #define vi vector<int> #define si set<int> #define FOR(i,n) for(int i=0;i<n;i++) #define fast ios_base::...
ALGO
0.999977
3.670537
{ "github_metadata": { "branch": "master", "commit_count": 253, "repo_created_at": "2020-03-28T07:20:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "c264f2d8...
7a2b343a-c317-4470-81b7-69f688ef9ff6
NG-Geeks/GeeksforGeeks_solution
Subarray with given sum.cpp
Subarray with given sum Given an unsorted array A of size N that contains only positive integers, find a continuous sub-array that adds to a given number S and return the left and right index(1-based indexing) of that subarray. In case of multiple subarrays, return the subarray indexes which come first on moving from...
ALGO
0.999937
5.737274
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-12-10T11:29: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": "b958c7efe08d...
9ea58a20-d6b9-40c1-9257-96c8c4ee78f5
CGAL/cgal
Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/bbox_diagonal.h
// Copyright (c) 2020 GeometryFactory (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). // // $URL$ // $Id$ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : <NAME> #ifndef CGAL_PSP_INTERNAL_BBOX_DIAGONAL_H #define CGAL_PSP_INTERNAL_BBOX_DIAGONAL_H ...
ALGO
0.963229
6.202101
{ "github_metadata": { "branch": "master", "commit_count": 113659, "repo_created_at": "2014-10-01T12:22:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5443, "forks": 1475, "issues": 511, "pull_requests": 136 }, "file_meta": { "content_id...
f34b8118-e961-4663-a806-b332e7d03cec
hlzz/libvot
src/examples/graph_partition.cpp
/* Copyright (c) 2015, <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 conditions and the following disclai...
ALGO
0.984105
5.557826
{ "github_metadata": { "branch": "master", "commit_count": 217, "repo_created_at": "2015-04-08T04:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 178, "forks": 53, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "76847...
5da96c28-04d2-45ab-a441-011548cf12ec
ishandutta2007/codeforces-f
fanache99/normal/1329/A.cpp
#include <iostream> #include <fstream> #include <vector> #include <algorithm> #include <stack> #include <cassert> #include <map> #include <numeric> #include <cstring> #include <set> #include <ctime> #include <queue> #include <cmath> #include <iomanip> #include <iterator> #include <bitset> #include <unordered_map> #incl...
ALGO
0.999918
3.51374
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a355e44153f...
bdd4672d-82db-44b7-8921-8b77e721bf6c
lmarceau/stereo-vision
src/main.cpp
#include "../inc/main.hpp" using namespace std; using namespace cv; cv::Mat top_view( 480, 640, CV_8UC1,cv::Scalar(0)); StereoVision::StereoVision(const int m,const string in,const string ex) { mode = m; //calibration of cameras if there is need if (mode == 1) { cl.calibrate(calibImagesPath,INTRINSICS,EXTRINS...
TOOL
0.950777
5.289512
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-04-08T20:22:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d727efcaa...
d98e50fe-e93f-4da4-a6da-8b1a98dc4fc5
rajprem4214/LeetCode
Count distinct elements in every window - GFG/count-distinct-elements-in-every-window.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: vector <int> countDistinct (int arr[], int n, int k) { //code here. unordered_map<int, int> f; vector<int> res; // create map for the first window o...
ALGO
0.999872
6.207939
{ "github_metadata": { "branch": "main", "commit_count": 2148, "repo_created_at": "2022-04-13T20:12: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": "425deedcb...
ec2964a2-4027-4825-b09f-e77f4fd62f12
joaodos3v/URI.CS16.UriOnlineJudge_Codes
1258.cpp
#include <iostream> #include <algorithm> #include <sstream> using namespace std; typedef struct { string Nome; string Cor; char Tamanho; } Camiseta; bool Ordena(Camiseta A, Camiseta B) { if(A.Cor == B.Cor) { if(A.Tamanho == B.Tamanho) { return A.Nome < B.Nome; } re...
ALGO
0.997117
3.919602
{ "github_metadata": { "branch": "master", "commit_count": 176, "repo_created_at": "2017-07-12T00:21:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b45edff...
63932f69-682f-4b11-ba02-34feef1995a7
JetBrains-Research/astminer
src/test/resources/fuzzy/test.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define form2(i, a, b) for (int i = (a); i < (b); ++i) #define ford2(i, a, b) for (int i = (a-1); i >= (b); --i) #define form(i, n) form2(i, 0, n) #define ford(i, n) ford2(i, n, 0) #define chmax(x, v) x = max(x, (v)) #define chmin(x, v) x = min(x, (v...
ALGO
0.99974
4.243188
{ "github_metadata": { "branch": "master", "commit_count": 1456, "repo_created_at": "2018-12-14T16:37:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 292, "forks": 82, "issues": 10, "pull_requests": 2 }, "file_meta": { "content_id": "292a...
377911ab-322e-4793-83dd-0117924beaa5
Dreamgoing/hihocode
1032.cpp
// // Created by 王若璇 on 16/3/2. // #include <algorithm> #include <iostream> #include <cstdio> #include <cstring> #include <string> /* * 最长回文子串问题: * 1.枚举字串中心位置 * f[i]表示以第i个字符为中心的最长回文子串的长度 * f[i]>=min{f[i-2],f[i-1]-2} * suffix * 后缀数组: 后缀数组 SA 是一个一维数组, * 它保存1..n 的某个排列 SA[1], SA[2],......,SA[n],并且保证 Suffix(SA[i]) < ...
ALGO
0.999934
3.911613
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-04-08T08:47:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b76b4e584...
2e180f25-10d8-4afe-b1ef-6a3679aef283
wakeupingear/junebug
src/components/PolygonCollider.cpp
#include <cfloat> #include "components/PolygonCollider.h" #include "Actors.h" #include "Utils.h" #include "Game.h" using namespace junebug; void PolygonCollisionBounds::LoadVertices(const VerticesPtr vertices) { this->vertices = vertices; } bool PolygonCollisionBounds::CheckAxes(const PolygonCollisionBounds &ot...
ALGO
0.912011
6.179653
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2022-10-03T23:47: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": "485908ab318...
b5de1686-17b0-45ce-9762-fddf8b0d3aaf
paweldata/Algorytmy-i-struktury-danych
lista3/zad2.cpp
#include <cstdio> #include <random> #include <cstring> #include <cmath> //globas variables int compareAmount = 0; int swapAmount = 0; int randomizedSelect(int* tab, int size, int number); int randomizedSelectRecursion(int* tab, int left, int right, int number); int select(int* tab, int size, int number); int selectRe...
ALGO
0.999011
5.217733
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-03-04T21:30: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": "10d992161...
c4ce32d8-8719-4203-bb77-971912b34e16
likun1234/camera_calibrate
main.cpp
#include <opencv2/opencv.hpp> #include <iostream> #include <ctype.h> #include <dirent.h> using namespace std; using namespace cv; static bool readStringList( const string& filename, vector<string>& l ) { l.resize(0); FileStorage fs(filename, FileStorage::READ); if( !fs.isOpened() ) return false; FileNode n = f...
TOOL
0.971356
5.044699
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-10-30T14:20: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": "70f92d7bdb...
80441730-96fa-43b8-8e4b-8f52549c76d4
jarbhav/generic-programming-22
day17/what.cpp
#include<iostream> using namespace std; #if 0 //v1 void disp(int *first, int * last) { while (first != last) { cout << *first << "\t"; ++first; } cout << "\n"; } #endif //v2 template<typename ptr_t> void disp(ptr_t *first, ptr_t * last) { while (first != last) { cout << *first ...
ALGO
0.998642
5.384877
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-03-17T18:31: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": "3904600891c0...
d0f89fe5-5e29-430e-92bd-2a8b4a2f9644
Kartik-Mathur/14JuneCPP20222
Lecture-23/BST.cpp
// BST.cpp #include <iostream> #include <queue> using namespace std; class node { public: int data; node* left; node* right; node(int d): data(d) { left = right = NULL; } }; node* InsertInBST(node* root, int d) { if (root == NULL) { root = new node(d); return root; } if (root->data >= d) { root->left ...
ALGO
0.999891
4.3322
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2022-06-20T10:36:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 5, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "aadc1e2a0df...
f5bf5b98-5290-4f48-8201-7344adfb951b
GGapa/vscode
program/old program/2024/02/20240206/Minimum Sum LCM.cpp
//Minimum Sum LCM #include <bits/stdc++.h> #define rep(i, a, b) for(int i = (a), stOwxc = (b); i <= stOwxc; i++) #define per(i, a, b) for(int i = (a), stOwxc = (b); i >= stOwxc; i--) using namespace std; typedef long long ll; #define int long long int n; int solve() { int k = 0, po, ans = 0; for(int i = 2; i ...
ALGO
0.999924
4.535461
{ "github_metadata": { "branch": "main", "commit_count": 191, "repo_created_at": "2023-11-17T05:37: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": "aae0e75940...
b8fc79d8-9c9a-4ebe-be7e-49bc16d719c7
Nandini80/CP-Questions
Nandini/CodeForces/1000_Rating/PolucarpRecoverThepermu.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long void solve() { int n; cin >> n; vector<int> v(n); for(int i=0 ; i<n ; i++) cin >> v[i]; if(n==1 || n==2) { for(int i=0 ; i<n ; i++) cout << v[i] << " "; return; } else if(v[0] == n) { ...
ALGO
0.999791
4.26081
{ "github_metadata": { "branch": "main", "commit_count": 1301, "repo_created_at": "2024-02-06T02:36: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": "f2cdafb6b...
697e2509-54ca-44f5-a8f4-7453c1a7bea7
beGG1/clean_code_perfomance_test
cpp/small_func.cpp
#include <iostream> #include <vector> #include <chrono> #include <algorithm> // Quicksort algorithm implemented as one big function void quicksort_big(std::vector<int>& arr, int low, int high) { if (low < high) { int pivot = arr[high]; // Pivot element int i = (low - 1); // Partitioning th...
ALGO
0.999829
6.738531
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-10-21T17:50:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b2eac2cf535...
c8520470-958e-4181-9bcb-52425b8bca0b
SandyyScripts/LeetCode-Questions
Rod Cutting - GFG/rod-cutting.cpp
// { Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution{ public: // Top Down DP // int dp[1000]={0}; // int cutRod(int price[], int n) { // //code here // if(n<=0){ // ...
ALGO
0.999827
5.040864
{ "github_metadata": { "branch": "main", "commit_count": 1481, "repo_created_at": "2021-12-25T12:15:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34e2e0ba6...
b53631fc-3708-448b-9532-6ba8af5bbe32
yaoyaowd/competitivecoding
codefoce/cf1307a.cc
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 200010; const int inf = 1e8; const int mod = 1000000007; vector<int> a; int n, d; void solve() { cin >> n >> d; a.resize(n); for (int i = 0; i < n; ++i) cin >> a[i]; int ans = a[0]; for (int i = 1; i < n; ++i) ...
ALGO
0.999937
3.699645
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-05-04T16:17:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0dd1351059...
fd37d209-675b-4072-992c-6f1765f28498
DanilBukreev/Bonuses-Mass.cpp
massiv.cpp
#include <iostream> using namespace std; void Merg(int arr[], int begin, int end) { int i = begin; int mid = begin + (end - begin) / 2; int j = mid + 1; int k = 0; int d[5]; // массив куда будем складывать элементы после слияния while (i <= mid && j <= end) { if (arr[i] <= arr[j]) { d[k] = arr[i...
ALGO
0.999926
4.379342
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-10-22T11:15: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": "579dd7700b...
32ee38b0-d757-4871-843f-b9fcad54b22d
irtazahashmi/Computer-Graphics-Ray-Tracer
src/ray_tracing.cpp
#include "ray_tracing.h" // Suppress warnings in third-party code. #include <framework/disable_all_warnings.h> DISABLE_WARNINGS_PUSH() #include <glm/geometric.hpp> #include <glm/gtx/component_wise.hpp> #include <glm/vector_relational.hpp> DISABLE_WARNINGS_POP() #include <cmath> #include <iostream> #include <limits> /*...
ALGO
0.999894
6.432872
{ "github_metadata": { "branch": "main", "commit_count": 102, "repo_created_at": "2021-11-10T20:55: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": "8f7ab9cb64...
89df5a44-cf1a-4971-8bb2-d3f4a1e503f2
jacobsayono/cs-32
projects/project-3/Game.cpp
#include "Game.h" #include <iostream> using namespace std; Game::Game(const Board& b, Player* south, Player* north) : _board(b), _south_player(south), _north_player(north), _whose_turn(_south_player), _over(false) {} void Game::display() const { if (_board.holes() <= 3) { cout << " "; } else { ...
ALGO
0.909905
4.952635
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2023-03-30T03:38:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c1391764...
35917b70-f997-4cdd-a363-a82d3e643a2c
TropicG/Object-Oriented-Programming-Cpp
First Big Project/Day.cpp
#include "Day.h" void Day::del() { delete[] this->meet; } void Day::inOrder() { //if one meeting is earlier we swap those meetings for (int i = 0; i < this->size - 1; ++i) { if (this->meet[i] > this->meet[this->size - 1]) this->swap(this->meet[i], this->meet[this->size - 1]); } } bool Day::isInside(const Meet...
TOOL
0.913389
3.952521
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-05-28T12:46: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": "7bdc93ca186a...
120c51f0-ce11-4a8f-9661-759e92e3b23e
CodingMonte/Practice_Algorithm
프로그래머스/lv2/92341. 주차 요금 계산/주차 요금 계산.cpp
#include <string> #include <vector> #include <map> #include <sstream> using namespace std; vector<int> solution(vector<int> fees, vector<string> records) { vector<int> answer; map<string,int> Entrytime; map<string,int> Totaltime; int default_time = fees[0]; int default_fee = fees[1]; int ...
ALGO
0.999121
4.822099
{ "github_metadata": { "branch": "main", "commit_count": 257, "repo_created_at": "2023-07-21T02:06: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": "be1482648b...
7338f0c2-6057-405f-971f-43e266f521b0
lmtlevie/laboCpp
07/template_alumnos/ejercicios.cpp
#include "ejercicios.h" vector<vector<int> > productoVectorial(vector<int> u, vector<int> v){ //COMPLETAR vector<vector<int> > res; int i = 0; while (i<u.size()){ int j = 0; vector<int> tmp = {}; while(j<v.size()){ tmp.push_back(u[i] * v[j]); j++; } ...
ALGO
0.999538
4.890726
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2022-05-23T20:07: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": "c77d6b02ec...
aa558c1f-698c-4203-ab50-299b260570a2
kamrul17/Top-50-Array-Problems
getMinDiff.cpp
// Minimize the Heights II #include <bits/stdc++.h> using namespace std; int getMinDiff(int arr[], int n, int k) { sort(arr, arr + n); // Initial difference int ans = arr[n - 1] - arr[0]; // Handling edge cases int small = arr[0] + k; int big = arr[n - 1] - k; for (int i = 0; i < n - 1; i...
ALGO
0.999962
4.372313
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2023-11-21T14:09:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a9984fec125...
acf85004-22cb-44ee-b71c-b2f0f058c7e1
Hansil-Chapadiya/Leet_Code_Problems
Medium/FindThePowerOfKSizeSubArrayI_3254.cpp
#include <iostream> #include <vector> class FindThePowerOfKSizeSubArrayI_3254 { private: /* data */ public: std::vector<int> resultsArray(std::vector<int> &nums, int k) { std::vector<int> answer; for (int i = 0; i < (nums.size() - k + 1); i++) { bool isContiguous = true; ...
ALGO
0.999579
4.904181
{ "github_metadata": { "branch": "main", "commit_count": 616, "repo_created_at": "2024-09-02T09:51:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "878682cc0a...
b2478dce-aca6-43b7-ba1b-7397b368809d
syohex/leetcode
challenge/202102/minimum_remove_to_make_valid_parentheses/main.cpp
#include <cassert> #include <vector> #include <string> #include <stack> std::string minRemoveToMakeValid(const std::string &s) { struct Data { char c = 0; size_t pos = 0; }; size_t pos = 0; std::vector<Data> v(s.size()); for (size_t i = 0; i < s.size(); ++i) { if (s[i] == '...
ALGO
0.999729
5.460564
{ "github_metadata": { "branch": "master", "commit_count": 1794, "repo_created_at": "2020-06-01T00:08:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0dd0c69...
87c86dad-fa20-4c91-b77e-8545d6b596e5
ishandutta2007/codeforces-b
brovko/normal/587/C.cpp
#include <bits/stdc++.h> //#define int long long #define ld long double #define x first #define y second #define pb push_back using namespace std; int n, m, q, used[100005], p[100005], tin[100005], tout[100005], T, up[100005][20]; vector <int> g[100005], Min[100005][20], Min0[100005]; void dfs(int v) { used[v] =...
ALGO
0.999959
4.356374
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6b26f0a43e4...
4da7179c-6398-4dda-bccc-6ac2c7b3d0d7
axelu/leetcode
cpp/00000-00499/rangesumquery2dmutable.cpp
// 308. Range Sum Query 2D - Mutable // https://leetcode.com/problems/range-sum-query-2d-mutable/ // https://cp-algorithms.com/data_structures/segment_tree.html#toc-tgt-11 class NumMatrix { private: int n,m; vector<vector<int>> t; void build_y(int vx, int lx, int rx, int vy, int ly, int ry, vector<vect...
ALGO
0.999623
7.110891
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2021-04-08T21:22: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": "f9551162d4a...
326bd8d1-e60a-4674-85cb-94d9f0d2af3f
Leapense/problems
18418번: いちご (Strawberry)/main.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); long long N; cin >> N; vector<long long> A(N), T(N); long long M = 0; for (long long i = 0; i < N; i++) { cin >> A[i] >> T[i]; M = max(M, A[i]); } long l...
ALGO
0.999943
4.042275
{ "github_metadata": { "branch": "master", "commit_count": 2661, "repo_created_at": "2024-10-12T10:53: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": "636ed50...
76a7f4e5-09b7-44ce-9311-fdee7605c4cf
alisw/AliRoot
TEvtGen/EvtGen/EvtGenBase/EvtDiLog.hh
// $Id: EvtDiLog.hh,v 1.3 2009-03-16 16:44:33 robbep Exp $ #ifndef EVTGENBASE_EVTDILOG_HH #define EVTGENBASE_EVTDILOG_HH 1 // Include files /** @namespace EvtDiLog EvtDiLog.hh EvtGenBase/EvtDiLog.hh * Dilogarithm function (replaces CERNLIB DDILOG) * * @author <NAME> * @date 2007-01-23 */ namespace EvtDiLog...
ALGO
0.957218
5.968127
{ "github_metadata": { "branch": "master", "commit_count": 74535, "repo_created_at": "2016-03-07T09:20:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 57, "forks": 256, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "dcd7...
8abd3239-169b-4de4-a6ee-0ee64538b289
palnikachavan/SE-Lab-Assignments
DSAL/stl/queue.cpp
#include <iostream> using namespace std; template<typename T> class Queue { int back, front; T queue[50]; public: Queue() { back = front = -1; } void push(T x) { if(back == 49) { return; } else if(front == -1 && back == -1) { ...
ALGO
0.991583
3.759803
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-05-12T03:22: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": "c371cd0c9d4c...
d33bdb78-801b-4f70-9595-4f6fd59e2bdb
mkaouer/Code-Smells-Detection-in-JavaScript
JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/362764/shogun-3.2.0/shogun-3.2.0/src/shogun/lib/malsar/malsar_clustered.cpp
/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * Written (W) 2012 <NAME> * Copyright (C) 2012 <NAME> and <N...
ALGO
0.999879
6.12897
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2016-11-16T11:47:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 4, "issues": 0, "pull_requests": 18 }, "file_meta": { "content_id": "93bdaa4c...
91ffee90-5f1e-4261-bbad-c76ca0c4fb3d
lchakma201232/cp_codes
B_-_Mixtures.cpp
#include <bits/stdc++.h> #if 0 #define HOME #endif #ifndef ONLINE_JUDGE #define dbgA2(A, n, m) {cout<<"-->"<<#A<<"=\n";for(int i = 0; i < n; i++){for(int j = 0; j < m; j++){cout<<A[i][j]<<" ";}cout<<"\n";}cout<<"\n";} #define dbgA(A, n) {cout<<"-->"<<#A<<"=(";for(int i = 0; i < n; i++)cout<<A[i]<<" ";cout<<")\n";...
ALGO
0.999973
3.61086
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-03-31T14:10:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cad77732a0...
f2a67159-575b-40d8-9cbc-6b56e42e7ea5
patrick246/MauMau
MauMau/MauMau/MauMau/MauMauMatch.cpp
#include "MauMauMatch.h" #include "AIEasy.h" #include "AIPlayer.h" #include <iostream> MauMauMatch::MauMauMatch( unsigned int cardCount, GameApp& app ) : m_cardCount(cardCount) , m_talon(m_cardCount, app) , m_currentPlayer(0) , m_playstack(cardCount, app) , m_app(app) , m_playCountdown(0.f) , m_marker(10.f) { ...
TOOL
0.937419
4.009989
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2013-08-06T21:06:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "195f7cfa5...
3cc7b703-65ad-416d-b88f-6120ef627722
kreininmv/PML-30
Ray Tracing/RT/SHAPES/PLANE.H
/* FILE NAME : PLANE.H * PURPOSE : Class plane. * Header Module. * PROGRAMMER : CGSG'2018 * MK5. * LAST UPDATE : 25.07.2018 * NOTE : Module namespace 'mert'. */ #ifndef __PLANE_H_ #define __PLANE_H_ #include "..//..//DEF.H" #include "SHAPE.H" namespace mert { class ...
ALGO
0.983711
6.797314
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2021-03-29T17:40:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "1a779273823...
68d5cb9e-3966-47d6-b990-6dc3d1b9ce01
MTE1991/DSA-Practice
bfs_dfs_mat.cpp
#include <iostream> #include <queue> #include <stack> #include <vector> using namespace std; class Graph { private: int vertices; vector<vector<int>> adjacencyMatrix; public: Graph(int v) : vertices(v), adjacencyMatrix(v, vector<int>(v, 0)) {} void addEdge(int from, int to) { adjacencyMatrix...
ALGO
0.999938
6.333152
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2020-09-16T11:38: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": "7eb03647...
6918abed-f28a-436d-a539-39523af3b744
MicaelBarreto/CG
pong.cpp
#include <stdio.h> #include <stdlib.h> #include <GL/glut.h> #include<math.h> #define janela_altura 600 #define janela_largura 800 #define PI 3.1416 #define VK_W 0x57 #define VK_S 0x53 //Funções void keyboard(); void update(int val); void anima(int val); void display(void); void tela(GLsizei W, GLsizei h); void key...
ALGO
0.977681
4.135965
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-05-04T20:34: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": "d7b0002aeb...
22b0b516-9e7f-4d63-abb8-1a462a4e4624
brkdnmz/advent-of-code
2024/day13/day13-2.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; // wow this took 4 attempts with many silly mistakes int main() { freopen("day13-modified.txt", "r", stdin); ll ans = 0; ll offset = 10000000000000; while (!cin.eof()) { ll ax, ay, bx, by, px, py; cin >> ax >> ay >> bx...
ALGO
0.999884
4.807167
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2024-12-03T14:24: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": "66cd46444...
9f6a0d9f-1d4b-4c33-bd23-9d28da484530
RainChang/My_ACM_Exercises
huawei/QuickSort/QuickSort/main.cpp
// // main.cpp // QuickSort // // Created by Rain on 23/03/2017. // Copyright © 2017 Rain. All rights reserved. // #include <iostream> using namespace std; ///** // <#Description#> // // @param a <#a description#> // @param p <#p description#> // @param q <#q description#> // */ //void quicksort(int a[],int p,in...
ALGO
0.999957
5.574428
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-03-16T08:49:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "022704f10f...
cdb9a48b-9a1a-4a20-8030-9982b492f50e
Ultron011/DSA
BINARY TREE/MEDIUM/DIAMETER OF BINARY TREE/BRUTE FORCE/diameterOfBinaryTree.cpp
/** * Problem : Diameter of a Binary Tree * * Description : * The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the root. * The length of a path between two nodes is represented by the number of edges between them. * * Input: ...
ALGO
0.999997
6.556899
{ "github_metadata": { "branch": "main", "commit_count": 206, "repo_created_at": "2024-10-19T16:32: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": "1d812f2d26...
fc3f9b54-3dc0-486e-8b4b-41b01b29d772
Kaaaap/ASR
ASR_Controller/ASR_Controller.ino
#include <SoftwareSerial.h> //enables XBee connection pins to transmit and receive serial data SoftwareSerial XBee(2, 3); // connect XBee and Arduino //Pin Assignments for Input Values int backLeft = 4; int leftLaser = 5; int fwdRight = 6; int upLaser = 7; int fwdLeft = 8; int smallLaser = 9; int rightLaser = 10; int ...
TOOL
0.903405
4.609337
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-11-27T02:57:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a356c6515...
4a4e9d4f-20c3-43fe-9de3-f5b622a383f8
JimmyDaSilva/spline_problems
src/tri_acc_profile.cpp
#include <ros/ros.h> #include <std_msgs/Float32.h> #include <eigen_conversions/eigen_kdl.h> #include <spline_problems/matplotlibcpp.h> double j_max = 5; double v_max = 1; double period = 0.001; double qi = 0, qdi =0.5, qddi = 0.0; double qf = 2.0, qdf = 0.0, qddf = 0.0; namespace plt = matplotlibcpp; void curves_p...
ALGO
0.986668
4.972632
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-04-25T18:47:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0e88236a7...
ceff2f7e-633a-4ef4-ab20-fbdb3c7f7d19
smv1796/C-Programs-for-practice
HEAPS.cpp
#include<iostream> #include<vector> using namespace std; void maxHeapifyRecursive(vector<int>& A, int i, int N) { int largest=i; int left=2*i, right=2*i+1; if(left<=N && A[left]>A[largest]) largest=left; if(right<=N && A[right]>A[largest]) largest=right; if(largest!=i) { ...
ALGO
0.999975
4.605792
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-09-29T11:02: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": "b84a5393f1...
95bf7945-aab0-4442-a15a-443c91e95d17
JJavier98/FP
Sesion.2/casa/10.- Gaussiana/Gaussiana.cpp
/* Programa que determina el valor del eje de ordenadas que alcanza la función Gaussiana de estadística en un punto x del eje de abscisas. */ #include <iostream> // Inclusión de los recursos de E/S #include <cmath> // Inclusión de los recursos matemáticos using namespace std; int main(){ // Dec...
ALGO
0.999857
4.403965
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-01-12T18:30: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": "593f767733...
a58cbf80-a4df-4660-906a-fb653505de86
freshsun97213/ACM-algorithm
hdu/h7-20/g.cpp
#include<iostream> #include<map> #include<set> #include<string> #include<string.h> #define debug(x) cerr << #x << " " << x << endl; using namespace std; int main(){ char s1[1000000]; scanf("%[^\n]%*c",s1); while(s1[0] != '#'){ set <string> s; int l = strlen(s1); int cnt = 0; string ans = ""; ...
ALGO
0.998554
3.375574
{ "github_metadata": { "branch": "23summer", "commit_count": 72, "repo_created_at": "2023-02-24T13:43:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1c76ae...
26b95150-c4eb-40f9-bacf-022f6ba003e9
11stanley11/Sprout
w3/w3hw59.cpp
// https://neoj.sprout.tw/problem/59/ #pragma GCC optimize ("O2") #pragma GCC optimize ("O3") #pragma GCC optimize ("Ofast") #include <bits/stdc++.h> using namespace std; #define rep(v, i, n, s) for(int v = i; s > 0 ? v < n : v > n; v += s) #define pb push_back #define ll long long #define endl '\n' #define pii pair<in...
ALGO
0.998426
4.144494
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2024-03-03T17:22: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": "16f938d7d6c...
59feaa4d-b532-4204-8d67-7e18004fe676
Camithilwen/Code-Cloning-Analysis
src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p00027/s115905786.cpp
#include <iostream> using namespace std; int main() { int month, day; cin >> month >> day; while (month != 0 && day != 0) { if (month >= 1) day = day; if (month >= 2) day = day + 31; if (month >= 3) day = day + 29; if (month >= 4) day = day + 31; if (month >= 5) day = day + 30; if (month >= 6) day = day ...
ALGO
0.999857
3.346906
{ "github_metadata": { "branch": "main", "commit_count": 243, "repo_created_at": "2025-06-06T16:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "e5cbb7feb0...
761852d6-19a8-4756-b333-0893d66cfc75
lakshayybatra/21104031_Data-Structures
FamilyLinkedList-21104031.cpp
// Linked List Assignment 1: Doubly Linked Lists #include<bits/stdc++.h> using namespace std; // Creation of node class Node{ public: string name; int age; Node* prev; Node* next; Node(string n,int a){ name = n; age = a; next = NULL; prev = NULL; } }; // Functio...
ALGO
0.996721
5.198789
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-09-17T19:53: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": "428dc2538b7...
74073e24-9209-4cd2-8434-656901e8c5c3
amir5200fx/Tonb
Common/Foam/include/base/symmTensorFieldFieldI.hxx
#pragma once // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace tnbLib { // * * * * * * * * * * * * * * * global operators * * * * * * * * * * * * * // template<template<class> class Field> void sqr(FieldField<Field, symmTensor>& res, const FieldField<Field, vector>& f) { ...
ALGO
0.991942
5.938175
{ "github_metadata": { "branch": "master", "commit_count": 2430, "repo_created_at": "2019-12-25T02:29:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 3, "issues": 29, "pull_requests": 1 }, "file_meta": { "content_id": "95c57b...
0947c498-1234-4c66-8a68-72f5545a5a38
ishandutta2007/codeforces-w
w0nsh/normal/1553/D.cpp
#include <bits/stdc++.h> #define FOR(i, n) for(int i = 0; i < (n); ++i) #define REP(i, a, b) for(int i = (a); i < (b); ++i) #define TRAV(i, a) for(auto & i : (a)) #define SZ(x) ((int)(x).size()) #define X first #define Y second #define PR std::pair #define MP std::make_pair typedef long long ll; typedef std::pair<int, ...
ALGO
0.999989
4.492921
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:34: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": "d1fc7d6b3087...
b0ce5a13-4dbf-495d-a7e5-e6e200de4d85
tchalas/Readers-Writers
source/init.cpp
#include <stdio.h> #include <sys/mman.h> #include <sys/types.h> #include <unistd.h> #include <fcntl.h> #include <sys/stat.h> #include <stdlib.h> #include <signal.h> #include <semaphore.h> #include <iostream> #include <cstdlib> #include <string> #include <math.h> #include <sys/ipc.h> #include <sys/shm.h> #include <strin...
TOOL
0.98175
3.506012
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-04-27T14:38: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": "120b83d6af...
04d4578b-8a34-40a0-8b59-fe7f5f0e9bcf
Nanahoshi74/Recommendation
211d.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace atcoder; // using mint = modint998244353; using mint = modint1000000007; // using mint = modint; /*このときmint::set_mod(mod)のようにしてmodを底にする*/ typedef long long ll; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define repi(i,a,b) for(ll i = a; i <= (ll)(...
ALGO
0.999955
4.182008
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2023-11-08T12:45: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": "7e1d2468f82...
f3f456f4-987d-4f9b-91c8-eb20ab3c91be
myunbin/algorithm-BOJ
Code/3055.cpp
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define endl "\n" #define pb(x) push_back(x) #define fio() ios_base::sync_with_stdio(0); cin.tie(0) #define fileio() ifstream file_in("boards.txt");ofstream file_out("boards.txt") #define f first #define s second #define double long double #define db double...
ALGO
0.999943
4.142792
{ "github_metadata": { "branch": "master", "commit_count": 510, "repo_created_at": "2020-03-10T16:50: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": "e7f442ab...
52c130b1-04ce-451d-9dc5-8a37b92191f7
akashksinghal/My-Codes-CP
CodeForces/Codeforces Round #670 (Div. 2)/A - Subset Mex.cpp
//author : akashksinghal #include<bits/stdc++.h> using namespace std; #define ll long long #define fasino ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); #define input(A) for(auto &i:A) cin>>i; #define asc(A) sort(A.begin(),A.end()) #define dsc(A) sort(A.begin(),A.end(),greater<ll>()) void solve() { ll n...
ALGO
0.999963
4.053461
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2020-08-16T17:25:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "721165438...
1e6ba4a0-2e7c-4d4d-b168-1854c3ee9010
jojonicho/algorithms
codeforces/708/e.cpp
#include <bits/stdc++.h> using namespace std; using namespace __detail; typedef long long ll; #define ar array #define vi vector<int> #define vvi vector<vector<int>> #define vll vector<long long> #define all(x) (x).begin(), (x).end() #define en '\n' #define FILL(x, v) memset(x, v, sizeof(x)) #define pb push_back #defi...
ALGO
0.999814
4.663424
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2020-06-02T14:26:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "280e4a0a2...
8aca50bc-7c0b-4030-bb97-3b9ba6dd7d9e
RaplesWojtyla/My-Competitive-Programming-Archive
Compfest/CoderClass/Tree/c.cpp
/* $$\ $$\ $$\ $$\ $$ | $\ $$ | $$ | $$ | $$ |$$$\ $$ | $$$$$$\ $$\ $$$$$$\ $$\ $$\ $$ | $$$$$$\ $$ $$ $$\$$ |$$ __$$\ \__|\_$$ _| $$ | $$ |$$ | \____$$\ $$$$ _$$$$ |$$ / $$ |$$\ $$ | $$ | $$ |$$ | $$$$$$$ | $$$ /...
ALGO
0.999418
3.632413
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-01-10T22:10:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f71c01ca5e6e...
c6beb4d9-7edf-4ec8-877b-b38657e9a8aa
bbom16/study_algorithm
algorithm_2019_cplus/algorithm_2019_cplus/b2250.cpp
// 2019.07.11 // boj 2250 // 트리의 높이와 너비 // tree #include <stdio.h> #include <iostream> #include <vector> #include <utility> using namespace std; typedef struct node_info { int parent; int left_child; int right_child; int level; int x; }NODE; NODE node[100001]; bool child[100001]; //내가 누군가에 자식인지 확인(누구에 자식도 아니면 ...
ALGO
0.999927
3.793455
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2019-01-13T06:23: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": "21c1ff09c...
3dcf5d00-5058-4e6a-a605-f97a410a9b65
czhu1217/competitive-programming
Others/graph2p1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pi; typedef pair<ll,ll> pl; typedef pair<ld,ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; #define FOR(i, a, b) for (int ...
ALGO
0.999949
4.417019
{ "github_metadata": { "branch": "master", "commit_count": 282, "repo_created_at": "2019-10-11T16:26: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": "eefe1fe8...