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
8527b2b2-b492-450f-b2ff-cc966bfd50e2
amithgolla/cp_coding_ninjas
3-Language Tools/8-love_for_characters.cpp
//PROBLEM STATEMENT /* Ayush loves the characters ‘a’, ‘s’, and ‘p’. He got a string of lowercase letters and he wants to find out how many times characters ‘a’, ‘s’, and ‘p’ occurs in the string respectively. Help him find it out. */ //INPUT //First line contains an integer denoting length of the string. //Next line ...
ALGO
0.998727
4.131226
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-10-30T15:01: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": "0583320640fe...
1facc9f2-5c7a-45a2-95a6-0c3dd2f7e381
hohodsj/CPPTutorial
Section11 Functions/Challenge/src/main.cpp
#include <iostream> #include <vector> #include <string> #include <cmath> using namespace std; void print_numbers(const vector<int>& v); bool add_number(vector<int>& v, int num); void display_mean(const vector<int>& v); void display_small(const vector<int>& v); void display_large(const vector<int>& v); int main() { ...
TOOL
0.960176
4.286767
{ "github_metadata": { "branch": "remove-files", "commit_count": 2, "repo_created_at": "2024-07-01T03:15: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": "4753...
a6bfaf09-d9e4-4026-9b47-6e90bfb9ff1a
ZhaiYanbo/DataStructure_homework
LinkedList/src/1.cpp
/* *文件名称: 1.cpp *项目名称: 线性表 *创建者: 翟衍博 *创建时间: 2020.3.28 *最后修改时间: 2020.4.2 *功能: 对单链表的一些基本操作进行验证 *文件中的函数: showmenu(菜单函数) creatL、destoryL、lengthL、emptyL、getL、showL、insertL、deleteL、findL(验证链表操作的函数,详见函数定义说明) *与其他文件的依赖关系: 引入了了"LinkedList.h"头文件 */ #include"LinkedList.h" //显示菜单 v...
ALGO
0.999134
3.673866
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-03-22T13:05: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": "80a5c9468f1b...
5a7784ab-c28b-427f-b5ec-1452549b0b94
ebadilla10/i2023-ie2017
semanaCinco/list.cpp
/* * Copyright (c) 2023 <NAME> (@ebadilla10) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge...
ALGO
0.991135
5.638427
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-03-14T01:18: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": "c61d4b6d19be...
73a8b9d6-cd5e-42c5-bf2e-aa49d560eb68
gautam-vaibhav302/Vaibhav-s-Striver-Sheet
Graphs-II/kruskals_algo.cpp
/* Time Comlexity : O(N+E) { for extracting edge information from the adjacency list } + O(E logE) { for sorting the edges } + O(E*4α*2) {for findPar() & union() on DS} Space complexity : O(N) { for disjoint set } [may be O(N) + O(N) + O(E) if you are using DS clas...
ALGO
0.999992
5.374461
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-11T06:43: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": "3dfab6200bce...
f6eb0f0c-6c5c-48c4-ab1b-b76b489661cb
joshtym/cpsc3200Exercises
Exercise11367/main.cc
/* * Solution to exercise 11367 UVA. Utilizes dijkstra's algorithm to find shortest distance, * if there is one from one city to another. This uses Howard Cheng's dijkstra_sparse code * to search. We create an initial graph with all the cities and 101 nodes for each city * to denote capacity (101 because 0 through ...
ALGO
0.99983
4.536417
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2024-07-26T21:46: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": "4269a217d...
0cda3ae4-2cae-40a7-a444-04e6c4c7b730
Ahmed-0sama/CP-Library
J - Card Deck_newsolution/main.cpp
#include <vector> #include<bits/stdc++.h> #include <algorithm> #include <map> using namespace std; #define endl '\n' #define int long long #define fastread() (ios_base:: sync_with_stdio(false),cin.tie(NULL)); signed main(){ fastread(); int t; cin >> t; while (t--) { int n; cin >> n; vector<...
ALGO
0.999992
5.290611
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-07-04T09:08: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": "77dea8f7708...
d76d0bd5-7a2b-478e-ae45-d1522850e751
pikachu123/dung
CODES_and_RESULTS/evaluate2.cpp
#include <iostream> #include <vector> using namespace std; double evaluate_2(vector<int>, vector<int>, int ); int subevaluate(vector<int>, vector<int>, int, int, int ); bool checkflag(vector<bool> ); double evaluate_3(vector<int> s1, vector<int> s2, vector<int> s3,vector<int> s4, int numchannel){ double a12 = evalu...
ALGO
0.999168
4.045474
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2012-12-12T10:19:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1b3ab7c40e...
6339a167-fd43-4dcd-b9b3-3476e57d36e3
sebaxtian/IA
ProyectoIA/main.cpp
#include "mainwindow.h" #include <QApplication> #include <queue> #include <vector> #include <stack> #include "nodo.h" //Función de comparación //El operador le da mejor prioridad a los menores, si lo desea al reves cambie el operador por <= /* struct CompararPrioridad { bool operator() (const Nodo &a, const Nodo...
ALGO
0.986453
4.529574
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2016-05-09T14:10:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "24cad7352...
482fe65d-51c8-4481-b15a-fb31cd82fa77
HamzaHassanain/CP_Templates
Range-Queries/HashingSegmentTree.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long // Template Begins #define int long long const int N = 1e5 + 5, mod = 1e9 + 7, nod = 2e9 + 11; ll base = 31, nase = 37, poww[N + 1], coww[N + 1], inv1[N + 1], inv2[N + 1]; ll powmod(ll a, ll b, ll m) { ll ans = 1; while (b > 0) { ...
ALGO
0.999949
4.856455
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2024-11-21T15:43:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 19, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b7f0a4e4...
398e121a-33ac-4664-ac40-f27641a0ca40
aarinsheik/AARCODE-GFG
Medium/Strongly Connected Components (Kosaraju's Algo)/strongly-connected-components-kosarajus-algo.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find number of strongly connected components in the graph. void dfs( vector<vector<int>>& adj , vector <int> &vis , int so , stack <int> &st ){ vis[so]=1; for(auto...
ALGO
0.999892
5.982057
{ "github_metadata": { "branch": "main", "commit_count": 1027, "repo_created_at": "2023-07-15T07:10: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": "1784e2ae2...
507cd00d-1b29-48db-b40f-ec614d540c6b
burness/paddle-101
script/tutorial/paddle/paddle/gserver/layers/CRFLayer.cpp
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. 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 ...
ALGO
0.954547
7.539427
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2017-12-16T09:14:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04547c690...
1e6d7403-2ac5-4169-8ccb-b1c3a554e046
Kalin1603/University
Uni_resources/progr_04_09_h.cpp
// Програмиране с езика C++ // Задача 4.9. Файл progr_04_09_h.cpp #include <iostream> using namespace std; #include <iomanip> int main() { system("chcp 1251 > nul"); int n; do { cout << "Брой от 3 до 15: "; cin >> n; } while (n < 3 || 15 < n); // 1-о решение for (int w1 = 1, w2 = n - 1, step = 1; w1...
ALGO
0.99554
3.24765
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2022-10-15T11:44: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": "7719a2feb38...
acfcc38b-76b2-48a5-9c23-55edd93d06c7
AztecProtocol/aztec-packages
barretenberg/cpp/src/barretenberg/crypto/blake3s/blake3s.hpp
// === AUDIT STATUS === // internal: { status: not started, auditors: [], date: YYYY-MM-DD } // external_1: { status: not started, auditors: [], date: YYYY-MM-DD } // external_2: { status: not started, auditors: [], date: YYYY-MM-DD } // ===================== /* BLAKE3 reference source code package - C implem...
ALGO
0.932677
7.48262
{ "github_metadata": { "branch": "next", "commit_count": 12599, "repo_created_at": "2023-02-20T16:28:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 339, "forks": 456, "issues": 929, "pull_requests": 149 }, "file_meta": { "content_id": "5...
6bc5f62f-d6ed-446f-88be-862e79be6580
Qzhenlong/SwordtoOffer
27_ConvertBSTtoList.cpp
#include<iostream> #include<vector> #include<stack> using namespace std; /* 题目:输入一棵二叉搜索树,将该树转换成一个排序的双向链表,要求不能创建新的结点,只能调整树中结点的指向。 思路:中序遍历二叉搜索树即为有序序列,将树的左右指针转换成双向链表的前后指针, 空间复杂度O(n),时间复杂度O(n); */ struct TreeNode{ int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class So...
ALGO
0.999999
4.843066
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2015-06-05T10:28: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": "18cff8302...
a0877c17-aa97-4c52-9d2d-4708d86f042a
pradeepbn/programming_challenges
coursera/bst/src/trees/BinaryTree.cpp
using namespace std; #include <BinaryTree.h> #include <cstddef> #include <iostream> /* +---------------------+ | PROTECTED FUNCTIONS | +---------------------+   */ template <class T> void BinaryTree<T> :: swap(Node<T> **left, Node<T> **r...
ALGO
0.999641
5.32891
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2014-05-07T21:12:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "3cd8a79f...
adb53875-a6ca-452e-a9bd-796e34c447dc
DonWick32/IPMP
Week-1/Binary Search/BinarySearch_3.cpp
int findCeil (vi nums, int key){ int l = 0; int r = nums.size() - 1; while (r - l > 1){ int m = (r + l)/2; if (nums[m] > key){ r = m; } else { l = m; } } return r; } int findFloor (vi nums, int key){ int l = 0; int r = nums.size() - 1; while (r - l > 1){ int m = (r + l)/2; if (nums[m] < key)...
ALGO
0.999995
4.910043
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2023-02-04T05:22:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "51e9594b7e3...
eeb8020a-45e9-4fd5-a4d2-4b0d90de28e9
alaneos777/club
codeforces/100637I.cpp
#include <bits/stdc++.h> using namespace std; using ld = long double; struct point{ ld x, y; point(): x(0), y(0) {} point(ld x, ld y): x(x), y(y) {} point operator+(const point & p) const{return point(x + p.x, y + p.y);} point operator-(const point & p) const{return point(x - p.x, y - p.y);} point operator*(ld k...
ALGO
0.999693
4.47114
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2018-08-06T04:13:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91f8ff582...
b41126ed-dd91-426b-8cf0-a99cc86d9ae3
fangda-cu/MultiTrackerDevelopment
BASim/src/Eigen/src/PARDISOSupport/PARDISOSupport.h
/* Copyright (c) 2011, Intel Corporation. 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 ...
ALGO
0.976068
6.584845
{ "github_metadata": { "branch": "ExactCCD", "commit_count": 2265, "repo_created_at": "2014-11-20T17:20:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "220c4...
04c0902a-f093-4153-a949-19248b4ac19a
AnonKour/Soccer-Player-Behavior-Development-for-the-RoboCup-Standard-Platform-League
Src/Tools/NeuralNetwork/CompiledNN/Util/Quantization.h
/** * Utility functions for quantizing floats to integers. * (cf. https://github.com/google/gemmlowp/blob/master/doc/quantization.md) * * @author <NAME> */ #pragma once #include "Tools/Range.h" namespace NeuralNetwork { namespace CompiledNNImpl { namespace Quantization { /** * Struct ho...
TOOL
0.913576
6.598638
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-07-08T17:33:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ec037b6c9fe...
f95909b8-8fb2-4f0d-bce7-3bb705486537
shunnnli/NeuroDAP
Behavior/Shun_OptoPair_EPLHbPair_random/Shun_OptoPair_EPLHbPair.ino
// <NAME>, 2022/11/10 // Day 1 of opto pair: give opto stim randomly, give water reward randomly //20230210: tidied up code, renamed to OptoPair_RandomOutocme //20240502 // 1. Add option to choose between using blue or red to stimulate #define Idle 0 #define ITI_State 1 #define OutcomeDelivery 2 #define EndOutcomeDe...
TOOL
0.962884
5.67569
{ "github_metadata": { "branch": "main", "commit_count": 149, "repo_created_at": "2023-10-16T13:43:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d59f7956a...
9408792d-e4b7-43fc-855a-1b2dc3b04b80
ishandutta2007/codeforces-b
boook/normal/591/D.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #define REP(i,j,k) for(int i = j ; i < k ; ++i) #define RREP(i,j,k) for(int i = j ; i >=k ; --i) #define A first #define B second #define pb push_back #define mp make_pair #define PII pair...
ALGO
0.999287
3.874347
{ "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": "7aed53ea210d...
d176095b-57b6-42c0-98af-78adc25fe0e3
TheRealJerr/leetcode
Dfs/exist.h
// create by hrj // Current time: 2025-02-19 11:39:00.858 #include "/home/hrj/leetcode/headFile.h" // 单词搜索 enum { LEFT, RIGHT, FRONT, BACK, } class Solution { bool used[6][6] = { false }; // 标记一个位置是否使用过 public: Solution() { for(int i = 0;i < 6;i++) { for(int ...
ALGO
0.9944
4.745936
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2025-03-13T06:50: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": "3bead2988da...
bcba4994-ef12-41c5-8588-09931a0ba616
Cloda/Homeworks
MSUNumMethods/5_sem/num_3/classMatrix.h
#ifndef __CLASS_OF_MATRIX__ #define __CLASS_OF_MATRIX__ #include <iostream> #include <fstream> #include <cmath> #include "algorithm_.h" #include <sys/time.h> #include <sys/resource.h> class Matrix; long int get_time(); long int get_full_time(); // костыль, для того чтобы всунуть в pthread_create, тк не работает с к...
ALGO
0.98032
3.832164
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2023-10-28T13:56:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5bca0d4626b...
65b1b8b3-7c4f-4b51-b6b8-b4b5e3bb179b
sussmanLab/curvedSpaceSim
src/models/simpleModel.h
#ifndef SIMPLEMODEL_H #define SIMPLEMODEL_H #include "std_include.h" #include "pointDataType.h" #include "baseSpace.h" #include "baseNeighborStructure.h" #include "noiseSource.h" #include "pointDataType.h" //for point 3 and related #include "meshUtilities.h" //purely for the r3 position conversions /*! \file simpleMo...
TOOL
0.915036
6.458174
{ "github_metadata": { "branch": "main", "commit_count": 192, "repo_created_at": "2023-12-18T18:59:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae223ebac30...
33ac4d4b-a281-41a6-af5e-33e909d7aa67
KelvinBrenand/UFPB
Algorithm analysis and design/main.cpp
#include <iostream> #include <fstream> #include <algorithm> #include <vector> #include <set> #include <string> #include <chrono> using namespace std; using namespace std::chrono; int readData(string str, int &NUMBER_OF_LINES, int &NUMBER_OF_PRODUCTS, vector<int> &t, vector<vector<int>> &s){ ifstream inFile(str); ...
ALGO
0.999932
4.498153
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2021-04-29T19:01:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ed5947df8b...
314e966b-e70c-478d-b6b5-3ef898a5d80c
HarishBachu/my_cpp_journey
dpHardcore/unboundedKnapsack.cpp
//Unbounded Knapsack Problem #include<iostream> #include<vector> #include<cstring> using namespace std; int unBoundedKnapsack(vector<int> val, vector<int> wt, int W, int n) { int dp[n+1][W+1]; for(int i = 0; i <= n; i++) dp[i][0] = 0; for(int j = 0; j <= W; j++) dp[0][j] = 0; ...
ALGO
0.999993
4.418848
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2021-05-12T05:27:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "64231351d3f...
49f55e20-4936-4b84-8bbf-3f90022058de
jvargas714/data_structs_N_Algos
cpp/Algos/LeetCode/other_problems.cpp
#include <algorithm> #include <map> #include <unordered_map> #include <stack> #include <numeric> #include "utility.h" #include "other_problems.h" // ============================================Helper Functions========================================================= static int _calcNum(int n) { int tmp; int re...
ALGO
0.999527
3.163831
{ "github_metadata": { "branch": "master", "commit_count": 279, "repo_created_at": "2016-10-27T04:54:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "85c1868d...
1ca11b96-6215-473c-b961-71d7a89439b3
lrj124/online-judge
luogu/luogu1505/luogu1505.cpp
/************************************************ *Author : lrj124 *Created Time : 2019.09.07.14:49 *Mail : <EMAIL> *Problem : luogu1505 ************************************************/ #include <algorithm> #include <cstring> #include <string> #include <cstdio> using namespace std; const int...
ALGO
0.999893
4.46649
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-07-21T03:33: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": "073e94220d7c...
456be8f4-14cf-4135-8ba3-1b191274882a
jeanpaulHT/CS3101-Competitive-Programing
week8/superSale-10130.cpp
#include<bits/stdc++.h> #define F first #define S second #define PB push_back #define MP make_pair #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() #define FOR(i,a,b) for(int i=(a);i<=(b);i++) #define ROF(i,a,b) for(int i=(a);i>=(b);i--) #define FASTIO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie...
ALGO
0.999941
3.629404
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-07-22T00:08: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": "e34c068dafd9...
0aea1b25-0d80-4e70-b3e4-aeab8e68981c
Pawan-Kadam/Data-Structures-And-Algorithms
Linked Lists/doublyCircularLL.cpp
#include <iostream> using namespace std; class Node { public: int data; Node *prev; Node *next; Node(int data) { this->data = data; this->prev = NULL; this->next = NULL; } }; class CircularLinkedList { private: Node *head; public: CircularLinkedList() { ...
ALGO
0.999823
5.856395
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2022-01-31T04:22: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": "c9f2b486adb...
74393ca6-0476-4607-b71f-c1d656b6c2e4
deepsea-inria/pasl
example/hull.cpp
#include <iostream> #include "datagen.hpp" #include "geometryData.hpp" #include "sequence.hpp" #include "benchmark.hpp" namespace pbbs { #include "defaults.hpp" using namespace sequence; template <class ET, class F> pair<intT,intT> split(ET* A, intT n, F lf, F rf) { intT ll = 0, lm = 0; intT rm = n-1, ...
ALGO
0.999814
5.129486
{ "github_metadata": { "branch": "master", "commit_count": 221, "repo_created_at": "2014-10-07T12:44:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 106, "forks": 19, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "d7ed5e...
a2aecab6-7672-4717-83a7-b288183e68e1
FAU-Inf2/IMPACT24RP
benchmarks_impact/opt_pw16_halfSZ/adept_axpy/tlf.cpp
#include "tlf.hpp" #include <assert.h> #include <orka_hls.h> #include <stdio.h> #include <stdlib.h> static int min(int a, int b) { return a <= b ? a : b; } static int max(int a, int b) { return a <= b ? b : a; } static int floord(int a, int b) { return a / b; } static int exp(int a, int b) { #pragma HLS INLINE int r...
ALGO
0.982726
4.069867
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-12-14T22:42:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9453c2f90328...
4b89fc41-756f-4edd-ab72-b27d5f3f3274
dimitar9/Algorithm_Collection
addBinary.cpp
//leetcode OJ : add binary const char* AddBinary(const char* x, const char* y, char res[]) { if(x == NULL || y == NULL || res == NULL || *x == 0 || *y == 0) return NULL; int i = strlen(x)-1; int j = strlen(y)-1; char* p = res; bool bAdd = false; while (i >= 0 || j >= 0) { int c = 0; if (i >= 0) c += ...
ALGO
0.999962
5.478289
{ "github_metadata": { "branch": "master", "commit_count": 1065, "repo_created_at": "2011-07-27T08:13:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "37027a...
9c465ed7-59c8-4f11-a380-62762a90904a
baolam/c_plus_plus_exercise
#vnoi/message/main.cpp
#include <bits/stdc++.h> #define maxn 801 using namespace std; int n, m; int timeDfs = 0, scc = 0; int num[maxn], low[maxn]; int sccId[maxn]; int in_degree[maxn]; vector<int> G[maxn]; stack<int> temp_scc; void dfs(int u) { low[u] = num[u] = ++timeDfs; temp_scc.push(u); for (int v : G[u]) { if (sccId[v]...
ALGO
0.999866
4.563585
{ "github_metadata": { "branch": "main", "commit_count": 238, "repo_created_at": "2024-02-05T10:05: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": "ae7496356d...
62053529-943d-48a0-b0e7-4da67cb2738a
sherkevin/Resource-Collection
notes/codes/C++/线段树/luogu3372.cpp
#include <iostream> #include <algorithm> using namespace std; const int N = 1e5 + 10; int n, m; struct node { int l, r; long long sum, lazy; }tr[4 * N]; void pushup(int id) { tr[id].sum = tr[id << 1].sum + tr[id << 1 | 1].sum; } void build(int id, int l, int r) { tr[id] = {l, r, 0}; if(l == r) return ; int mi...
ALGO
0.999912
5.225118
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2023-05-13T15:14: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": "aa1fb96d8f...
c2cac8b5-b6e5-4c09-b247-a2d1d070a2a7
patrick1973/hsi-solar-control
SolarControlProject/ServoControl.ino
/** ********************************************************************************************************* ** Function name: verticalServoControl ** Descriptions: Activate the servocontrol for vertical movement when this function is called the light calculations will start and the servo respond ...
TOOL
0.97174
4.824317
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2015-03-21T03: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": "4da4de5f6...
9d9e351b-003a-409c-bddd-922daaa3edab
Avninder99/LeetCode_GFG_Solutions
Find minimum number of Laptops required - GFG/find-minimum-number-of-laptops-required.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution { public: int minLaptops(int N, int start[], int end[]) { // Code here vector<pair<int,int>>v; for(int i=0;i<N;i++){ ...
ALGO
0.999863
5.434927
{ "github_metadata": { "branch": "main", "commit_count": 2005, "repo_created_at": "2022-06-04T06:39: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": "dd90f5734...
608970d0-467c-4c7d-af92-2eabff0436b0
vrangr1/competitive-programming
contests/codeforces/cf_rounds/cf_round_9--/codeforces_964_div4/c.cpp
/*************************************************** * Author : <NAME> * Nick : vrangr * Created : Tue Aug 6 20:13:25 IST 2024 ****************************************************/ #include <bits/stdc++.h> #define debug(...) (void)42 #ifdef LOCAL #undef debug #include <algo/debug.hpp> const bool DEBUG...
ALGO
0.99997
4.397677
{ "github_metadata": { "branch": "main", "commit_count": 585, "repo_created_at": "2021-06-02T19:31: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": "b6c03f10e9...
8dd8f52d-a922-490e-babc-7d4581e00772
Seokwon-Park/BAEKJOON-BOJ
백준/Bronze/4246. To and Fro/To and Fro.cc
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; using tiii = tuple<int, int, int>; const int INF = 0x3f3f3f3f; const int MOD = 1'000'000'007; char b[105][25]; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; while (cin ...
ALGO
0.999955
3.857099
{ "github_metadata": { "branch": "main", "commit_count": 2927, "repo_created_at": "2023-03-13T07:02: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": "3b249f117...
cd40cd26-9e0c-4b00-965d-fac6dbe60372
hanshulll/CodeCollection
Spoj/Consec.cpp
#include<bits/stdc++.h> using namespace std; //Welcome To Hridoy's Code #define ll long long #define ull unsigned long long #define pb push_back #define em emplace_back #define ff first #define ss ...
ALGO
0.999178
3.807985
{ "github_metadata": { "branch": "main", "commit_count": 1438, "repo_created_at": "2021-10-01T17:59:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 219, "forks": 585, "issues": 0, "pull_requests": 130 }, "file_meta": { "content_id": "dcf...
34dda82e-8e0d-4f7e-893a-785eaa3aeb35
ainokiseki/asoul_bbspace
louv/graph.h
#pragma once #include<vector> #include<unordered_map> #include<string> #include<unordered_set> #include<random> #include<tuple> #include<concurrent_priority_queue.h> #include<concurrent_unordered_set.h> #include<concurrent_queue.h> #include<iostream> #include<fstream> #include<thread> #include"mytime.h" using namespac...
ALGO
0.995822
3.449507
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-03-01T10:36: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": "713174507f5...
c68f0af9-c704-4a79-8d14-aac9e9b60dad
jikongabc/test-jikong
acwing12.cpp
#include <iostream> #include <algorithm> #include <cstring> #include <string> #include <vector> #include <queue> #include <deque> #include <map> #include <set> #include <unordered_map> #define inf 0x3f3f3f3f using namespace std; using LL = long long; using ULL = unsigned long long; typedef pair<int, int> PII; typedef p...
ALGO
0.999998
3.331549
{ "github_metadata": { "branch": "main", "commit_count": 329, "repo_created_at": "2024-01-31T07:12: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": "137252a279...
569645ea-c561-4ac9-83cd-2c2f2cac2243
TimeDA/TimeDA
dataset/cpp_12_18/gcj2013/Astein/2433487_2850486_Astein_a.cpp
#include <algorithm> #include <vector> #include <cstdio> using namespace std; int main() { int T; scanf("%d", &T); for (int cn = 1; cn <= T; ++cn) { int B, N; scanf("%d%d", &B, &N); vector<long long> a(37, 0); int maxm = 0; for (int i = 0; i < N; ++i) { scanf("%d", &a[i]); } sort(...
ALGO
0.997586
3.163679
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2022-10-24T06:47: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": "219f2e00fdb...
0208a945-ecf4-45db-b219-f9e0b4d8d4eb
Gaojie-Li/leetcode-cpp
Facebook/Nov. 23th/ReverseLinkedListII.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* reverseBetween(ListNode* head, int m, int n) { if (head == NULL || head -> next == NULL) { return head...
ALGO
0.999997
5.788586
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2016-07-20T05:38: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": "b2fda62f0...
1664900a-3a86-400b-8659-d7cb5cd959cf
ziyeshanwai/METAHUMAN51
Source/MetaHumanMeshTracker/Private/nrr/include/nrr/EyeballConstraints.h
// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include <carbon/Pimpl.h> #include <nls/DiffDataMatrix.h> #include <nls/geometry/Mesh.h> #include <nls/utils/ConfigurationParameter.h> #include <nrr/VertexWeights.h> namespace epic::nls { /** * Class to evaluate constraints relative to the eyeballs ...
TOOL
0.951218
7.259998
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-06-20T06:18:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 6, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "cd3b93cbe41f...
d7c83330-8dc0-4fce-877c-2e550bfaa2aa
nadyakurnia/TugasMetnum2
Metnum_Tugas2.cpp
/* Nama : <NAME> NIM : 3411151140 dan Nama : <NAME> NIM : 341115131 */ #include <iostream> #include <conio.h> #include <iomanip> using namespace std; int main() { float X[100]; float Y[100]; float data, totalX, totalY, totalXY, totalXkuadrat, kuadrattotalX; float a,b ; int i, ul...
ALGO
0.92564
3.511959
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-10-05T03:42:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dad854fe1d...
29388be2-2bb5-4229-bff0-a26052c986e6
yezinMong/Algorithm
baekjoon/simulation/10836_여왕벌.cpp
/* [문제] 크기가 MxM인 격자 형태의 벌집이 있다. 각 칸에 애벌레들이 한 마리씩 자라고 있다. 애벌레가 자라는 정도 결정하는 규칙 (커지는 정도는 0,1,2 중 하나) 1. 제일 왼쪽 열, 제일 위쪽 행의 애벌레는 입력으로 주어진다. 2. 나머지 애벌레는 자신의 왼쪽, 왼쪽 위, 위쪽의 애벌레가 다 자란 다음, 그 날 가장 많이 자란 양만큼 자신도 자란다. [입력] M, N N개의 줄에 0의 개수, 1의 개수, 2의 개수 [출력] 마지막 날 애벌레들의 크기를 출력하라. */ #include<cstdio> #include<cstring> #include<...
ALGO
0.99982
3.594462
{ "github_metadata": { "branch": "master", "commit_count": 208, "repo_created_at": "2019-09-09T08:21: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": "4be6b6c8...
118d05f8-3808-44b5-98a7-4d4c9c771a68
imnurav/Hactoberfest2021-Cpp
Linked list/AppendLastknodes.cpp
#include<bits/stdc++.h> using namespace std; class node{ public: int data; node* next; node(int val){ data=val; next=NULL; } }; void insertAttail(node* &head,int val){ node* n=new node(val); if(head==NULL){ head=n; return; } node* temp=head; whil...
ALGO
0.999749
4.352118
{ "github_metadata": { "branch": "main", "commit_count": 196, "repo_created_at": "2021-10-05T12:35:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 154, "issues": 5, "pull_requests": 84 }, "file_meta": { "content_id": "27993b...
b25b4566-f50c-45ad-aacd-5e3fd5db69c0
taitruong256/Competitive-programming
CSES/graph/graph_Game_Routes.cpp
/*===================================================================================== Nothing is impossible, only you think it is impossible Try, try, try again until you succeed Pratice, practice, and practice I hated every minu...
ALGO
0.999916
4.401973
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-04-14T06:59: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": "bf32a7750fee...
1bc6f604-6704-4633-922a-9b1855b191bf
lnd3/ltools
packages/nodegraph/include/nodegraph/operations/NodeGraphOpTradingFilter.h
#pragma once #include "nodegraph/core/NodeGraphBase.h" #include "logging/LoggingAll.h" #include "hid/KeyboardPiano.h" #include "hid/Midi.h" #include "audio/PortAudio.h" #include "audio/AudioUtils.h" #include "math/MathFunc.h" #include <string> #include <vector> #include <map> #include <typeinfo> #include <type_tra...
TOOL
0.93873
6.176543
{ "github_metadata": { "branch": "main", "commit_count": 500, "repo_created_at": "2024-07-30T07:07:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "c4a0b7c357...
10538588-4ba7-4086-b369-69561c2ea333
RyoSci/AtCoder
初中級者が解くべき過去問精選 100 問/073.cpp
// #define _GLIBCXX_DEBUG #include <algorithm> #include <atcoder/all> #include <atcoder/modint> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; using namespace atcoder; usin...
ALGO
0.999962
4.292415
{ "github_metadata": { "branch": "master", "commit_count": 1005, "repo_created_at": "2020-06-25T03:31: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": "bf8d80d...
8c7594b7-b8e3-40c8-a877-bd1b0859fe8f
Ziklon/algorithms
match/A.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
ALGO
0.99929
3.315432
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2012-12-28T20:25:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5e211e3ed...
f7755b5e-2338-4a5e-b844-8bebf4ad9330
Coach-Academy/Spring-1-2024
Level 3/CPU - Regular - L3 - C101/Practice/Week 01/O - Board Game .cpp
#include <bits/stdc++.h> using namespace std; #define ll long long const int M = 34; int grid[4][4]; bool vis[17]; int frq_r[4], frq_c[4]; int sum_r[4], sum_c[4]; vector<pair<int, int>> pos; bool isValid() { for (int k = 0; k < 4; ++k) { if (frq_r[k] == 0 && sum_r[k] != M) return false; if (frq_c[k] ...
ALGO
0.999822
4.636178
{ "github_metadata": { "branch": "main", "commit_count": 530, "repo_created_at": "2024-02-08T15:35:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "a480bb61fde...
ef9d89e8-01d8-40fc-996a-6ffeb887bfa2
113bommy/LogicalErrorFixCodeT5
logicalErrorFix_CodeT5_no_LineNumber/model/cpp/cpp_gold/gold_41.cpp
#include <bits/stdc++.h> using namespace std; long long int modInverse(long long int a, long long int m) { long long int m0 = m; long long int y = 0, x = 1; if (m == 1) return 0; while (a > 1) { long long int q = a / m; long long int t = m; m = a % m, a = t; t = y; y = x - q * y; x = t; } if (x < 0) x += m0; return x; ...
ALGO
0.999999
3.351145
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-03-14T17:56:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "419b2b8a6e8...
9362da00-be12-47c7-a65c-57be618f8f60
RobinStar520/LeetCode
Hard/428-Serialize and Deserialize N-ary Tree.cpp
// Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be reconstructed later in the same or another computer environment. // Design an algorithm to serialize and deserializ...
ALGO
0.999419
6.428246
{ "github_metadata": { "branch": "main", "commit_count": 84, "repo_created_at": "2023-07-22T06:44:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13314d0918c...
13f36f83-8f24-4192-9698-a5205c025b4c
Surezz123/LeetCode_training
DataStructure/LeetCode/TwoPoint/19.cpp
//删除链表的倒数第N个节点 //虚拟头节点实际上是指向head的指针 #include<iostream> using namespace std; struct Node { int value; Node* next; }; class LinkList { public: void Insert(int x, Node*& head) //在头部插入节点(添加&可以直接对局部变量head进行修改) { Node* temp = new Node(); temp->value = x; temp->next =...
ALGO
0.999969
4.690446
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-10-27T03:12: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": "8943375dbd...
fa4473f0-a49f-40b6-b6f0-31c8201ed5ca
Faathir81/Algoritma-Struktur-Data
Prak05_BubbleSort&ShellSort_4522210033_FaathirAkbarNugroho/Contoh/Contoh1 - Copy.cpp
/* <NAME> 4522210033 kelas A Algoritma & Struktur Data (Contoh 1) Prak 05 */ // Program Pengurutan Gelembung - Bubble Sort #include <string.h> #include <iostream> using namespace std; int FatirData[10], FatirData2[10]; int Fatirn; void FatirTukar(int Fatira, int Fatirb) { int Fatirt; Fatirt = FatirData[F...
ALGO
0.999804
4.588631
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-25T12:11: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": "ee0e0bbc6cb6...
21baeaf5-a4a1-4dcc-8ddf-5a1c52f1cbf1
lifeich1/rspc-src
_archive/1833/e/main.cc
#include <bits/stdc++.h> // Placeholder for upcoming un-std algorithm, by rspc // End placeholder for upcoming un-std algorithm, by rspc // Scheme by rspc: #if defined(RSPC_TRACE_HINT) #define TRACE(...) do { __VA_ARGS__; } while (0) #else #define TRACE(...) (void)0 #endif #define TRACELN(...) TRACE(__VA_ARGS__; cout...
ALGO
0.999453
3.797466
{ "github_metadata": { "branch": "master", "commit_count": 351, "repo_created_at": "2022-03-12T13:04:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "a9f33319...
963939f9-519d-4fad-9147-967744013429
gavinmcroy/Fun-Projects
Interview-Preparation/Modules/Array-101/Insertion/Merge-Sorted-Array/main.cpp
#include <iostream> #include <vector> void merge(std::vector<int> &nums1, int m, std::vector<int> &nums2, int n); int main() { std::vector<int> nums1 = {4, 0, 0, 0, 0, 0}; std::vector<int> nums2 = {1, 2, 3, 5, 6}; merge(nums1, 1, nums2, 5); for (int x : nums1) { std::cout << x << " "; } ...
ALGO
0.999895
5.357288
{ "github_metadata": { "branch": "main", "commit_count": 178, "repo_created_at": "2022-05-09T16:09: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": "8a4bf558dc...
5b09f38c-49b0-46ce-86fa-8346b88dcc37
SayanSadhukhan/ProgrammingCPP
Stack/Sort a Stack/code.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int void file_i_o() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #ifndef ONLINE_JUDGE freopen("input.txt","r", stdin); freopen("output.txt","w", stdout); #endif } void sorted_insert(stack<int> &st, int x){ i...
ALGO
0.99997
5.102829
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2021-12-20T12:00: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": "c5197c64712...
2d81f5f0-e63b-42e3-a08d-2870c7a58990
ankiiitraj/questionsSolved
798-A.cpp
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *// // Author : <NAME> // // Problem Name : Mike and palindrome // // Problem Link : https://codeforces.com/problemset/problem/7...
ALGO
0.999934
4.242572
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2020-02-19T18:09:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d41a34e83...
ea64fba8-1c8f-4142-bd14-66a200165e52
FrankiALVarado/Programacion-II-Francisco-Alvarado
grafo2/cGrafo.cpp
#include "cGrafo.h" /* Labores por terminar: nodo primero mejor - testear arista agarra peso - listo menu ciclico y informar al usuario que primero cargue un vector o que lo va a sobreescribir - listo */ cGrafo::cGrafo() { } cGrafo::cGrafo(std::vector<cNodo> m_nodos, std::vector<cArista> m_aristas) { m_nodos; m_...
ALGO
0.976501
3.639566
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2019-01-14T02:33:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "87706dad8...
d00f7f5a-0a9a-456c-bc22-cb05c44da846
wallet1337/all_source2
ev0lve/lua/helpers.h
#ifndef LUA_HELPERS_H #define LUA_HELPERS_H #include <lua/state.h> #include <base/game.h> #include <util/fnv1a.h> #include <sdk/client_entity.h> #include <sdk/global_vars_base.h> #include <nlohmann/json.hpp> using json = nlohmann::json; namespace lua::helpers { struct var { size_t offset; sdk::send_prop_type ...
TOOL
0.919117
5.971317
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-09-28T14:42: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": "1fef97107d46...
fbd9a13f-4164-4f0b-a762-e45b3dfd174c
sybila/Parsybone
model/property_automaton.hpp
/* * Copyright (C) 2012-2013 - <NAME> * This file is a part of the ParSyBoNe (Parameter Synthetizer for Boolean Networks) verification tool. * ParSyBoNe is a free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3. * ParSyBoNe is released without any warra...
ALGO
0.977697
6.97729
{ "github_metadata": { "branch": "master", "commit_count": 634, "repo_created_at": "2012-03-03T16:23:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "560177911...
4516a8b6-11b5-48f0-b150-493f10e6f52f
NetHack/NetHack
outdated/win/Qt3/qt3_clust.cpp
/* NetHack 3.6 qt_clust.cpp $NHDT-Date: 1575917719 2019/12/09 18:55:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $ */ /* Copyright (c) <NAME>, 1999. */ /* NetHack may be freely redistributed. See license for details. */ #include "qt3_clust.h" static void include(QRect& r, const QRect& rect) { if (rect.left(...
ALGO
0.997203
6.866424
{ "github_metadata": { "branch": "NetHack-3.7", "commit_count": 17992, "repo_created_at": "2015-12-08T02:33:01.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3261, "forks": 502, "issues": 111, "pull_requests": 36 }, "file_meta": { "content_...
d3eecf9f-a576-4b3d-80fb-7ff89e05e3a6
realAYAYA/UnrealEngine-ToonLit
UnrealEngine/Engine/Source/Programs/UnrealLightmass/Private/Lighting/MonteCarlo.h
// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "LMMath.h" namespace Lightmass { /** Generates valid X and Y axes of a coordinate system, given the Z axis. */ void GenerateCoordinateSystem(const FVector4f& ZAxis, FVector4f& XAxis, FVector4f& YAxis); /** Generat...
TOOL
0.912199
6.27753
{ "github_metadata": { "branch": "5.4", "commit_count": 164, "repo_created_at": "2023-03-14T06:10:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 66, "forks": 9, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "7c24178526...
476e72d5-67a0-4f74-9011-99df0c455e69
zxing01/Code
Code/KMP.cpp
// // KMP.cpp // Code // // Created by <NAME> on 8/20/14. // Copyright (c) 2014 <NAME>. All rights reserved. // #include "KMP.h" using namespace std; using namespace Code; /////////////////////////////////////////////////////////////////////////////// KMP::KMP(const string &pattern) : _patt(pattern) { _build...
ALGO
0.999762
5.447564
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2014-08-09T02:18: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": "9f791fd4d...
853a21fb-8ddd-4604-b701-c9fb9620c208
dengyufan2008/code
Contests/20240712-20240830 HDUACM/HDUACM20240722/g/g.cpp
// by wls #include <bits/stdc++.h> using namespace std; string s; int main() { ios::sync_with_stdio(false); cin.tie(0), cout.tie(0); int T; cin >> T; while (T--) { cin >> s; int p0 = -1, p1 = -1; for (int i = 0; i < s.size(); i++) { if (s.substr(i, 3) == "://") { p0 = i - 1; ...
ALGO
0.900956
3.265111
{ "github_metadata": { "branch": "master", "commit_count": 1775, "repo_created_at": "2021-09-21T09:26:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8803948...
e05f989b-98bd-4476-ac48-b6f50c2ca710
praneeth-rdy/cp-practice
stl/stl_sort.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; void show_vector(vector<int> myvector){ vector<int>::iterator itr = myvector.begin(); while(itr != myvector.end()){ cout << *itr << " "; itr++; } cout << "\n"; } // ** comparison function decides whether t...
ALGO
0.999867
5.815145
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2021-04-12T13:07: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": "26309a60a06...
9a706d3d-1a6c-4af3-ae7e-cbe1a02356e7
rMoshiur/contest-code
Team Selection Individual (Dynamic Programming)/A - Free Goodies.cpp
#include <bits/stdc++.h> using namespace std; const double pi = 3.141592653589793; #define xx first #define yy second #define mp make_pair #define intl long long #define filein freopen("input.txt", "r", stdin) #define fileout freopen("output.txt", "w", stdout) #define debug...
ALGO
0.999868
3.876568
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-05-05T12:16:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7e486b1ccc...
a0a01cd4-b499-4203-8561-03ec27dbec0c
motoai/100
100-answers/13-first-bad-version.cpp
/* https://www.lintcode.com/en/problem/first-bad-version/ The code base version is an integer start from 1 to n. One day, someone committed a bad version in the code case, so it caused this version and the following versions are all failed in the unit tests. Find the first bad version. You can call isBadVersion to h...
ALGO
0.984946
5.842123
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2018-06-05T02:53:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59ee75fcb...
ee22ba41-65ad-4fa5-9579-184e95f087b7
google/or-tools
ortools/sat/combine_solutions.cc
// Copyright 2010-2025 Google LLC // 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...
ALGO
0.999851
7.54573
{ "github_metadata": { "branch": "stable", "commit_count": 15256, "repo_created_at": "2015-02-21T01:25:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12243, "forks": 2248, "issues": 60, "pull_requests": 12 }, "file_meta": { "content_id":...
8967a873-aff2-4904-9daf-9c3527bdab61
Zeronfinity/LightOJ-Solutions
1031 - Easy Game.cpp
#include <stdio.h> #include <iostream> #include <climits> #include <map> #include <cmath> #include <algorithm> #include <set> #include <stack> #include <deque> #include <vector> #include <stdlib.h> #include <string> #include <string.h> #include <utility> #include <queue> using namespace std; #define ll long long #def...
ALGO
0.999864
3.612617
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-12-04T08:03:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8f405cbf55...
af525fd0-7ba3-46a9-97c1-436553c7f699
Karantooo/ProyectoDiscretas
src/HashmapCiudad.cpp
#include <iostream> #include <unordered_map> #include <cstring> #include <vector> using namespace std; int coordenada_cartesiana_nodo(int x, int y){ return 14 * x + y; } vector<pair<int,int>> coordenada_string_cartesiana(string input){ unordered_map<string, int> mapa_calles_x; unordered_map<string, int> m...
ALGO
0.995074
3.954791
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2023-11-26T20:16: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": "27844d998...
61822761-a675-4688-b187-130b2868af8c
vxl/vxl
contrib/mul/vil3d/algo/vil3d_locally_z_normalise.h
#ifndef vil3d_locally_z_normalise_h_ #define vil3d_locally_z_normalise_h_ //: // \file // \brief Locally apply z-normalisation to images // \author <NAME> #include <vil/vil_convert.h> #include <vil3d/vil3d_image_view.h> #include <vil3d/vil3d_math.h> #include <vil3d/algo/vil3d_exp_filter.h> #include <cassert> #ifdef...
ALGO
0.953099
5.956841
{ "github_metadata": { "branch": "master", "commit_count": 42154, "repo_created_at": "2013-05-02T18:32:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 250, "forks": 157, "issues": 49, "pull_requests": 0 }, "file_meta": { "content_id": "70...
95f763dc-7ec5-4260-8500-9f9d54c3605f
Chimnii/Algospot
Problems/Yulo.cpp
#include <stdio.h> #include <vector> #include <algorithm> namespace my { struct istream{}; istream cin; inline bool is_num( char c ){ return ( c >= '0' && c <= '9' ); } inline bool is_negative( char c ){ return c == '-'; } inline istream& operator>>( istream& in, int& out ) { char c; out = 0; bool neg = false...
ALGO
0.997858
3.890697
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2015-02-21T07:29: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": "992587b42...
59424561-5acd-413e-86e5-408fcbea17f7
yhwu/rsicnv
src/alglib/alglibinterface.cpp
#include "stdafx.h" #include<stdlib.h> #include<stdio.h> #include "specialfunctions.h" #include "statistics.h" #include "alglibinterface.h" namespace alglib { double pnorm(double x){ return(alglib::normaldistribution(x)); } double pnorm(float x){ return(alglib::normaldistribution(double(x)));} double pnorm(int ...
TOOL
0.997248
4.333215
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2013-10-21T15:01:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "b5cbf11b4e...
4b6b6ec7-ce55-4d7e-ab20-b19e5dd5214d
emf-creaf/medfateland
src/tetis_channel.cpp
#include <Rcpp.h> #include <vector> #include <iostream> #include <cmath> #include <map> #include <algorithm> using namespace Rcpp; //Calculates the total volume of water in the channel network according to a given //average water stream elevation (m) double compute_volume(NumericVector dtm, Logic...
ALGO
0.998002
6.263005
{ "github_metadata": { "branch": "main", "commit_count": 621, "repo_created_at": "2019-06-07T14:25:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d86ddf561d0...
fe17b200-2920-4c9e-9314-00b35b7a2284
feitianxiaowan/Leetcode
cpp/gameOfLive.cpp
// LeetcodeOJ_gameOfLive.cpp #include <iostream> #include <vector> using namespace std; void gameOfLife(vector<vector<int> >& board) { int m = board.size(); int n = m ? board[0].size() : 0;// Details! int dx[8] = {-1,-1,-1,0,0,1,1,1};// How to traverse eight position! int dy[8] = {-1,0,1,-1,1,-1,0,1}; for(...
ALGO
0.999849
4.822195
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2016-06-18T02: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": "5ade95c13...
b106e31c-6b24-4d2a-94ae-f96f39a0164d
atubo/online-judge
lintcode/P0186.cpp
// https://www.lintcode.com/problem/max-points-on-a-line/description // 186. Max Points on a Line #include <bits/stdc++.h> using namespace std; #include "../utils/BinaryTree.h" #include "../utils/Graph.h" #include "../utils/LinkedList.h" #include "../utils/Util.h" #include "../utils/Point.h" class Solution { private:...
ALGO
0.99996
5.148849
{ "github_metadata": { "branch": "master", "commit_count": 2295, "repo_created_at": "2013-10-03T04:23:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3e03c52...
7ccb5bb1-28c9-4b30-8e6b-87559d278869
aleksandraleszczyszyn/IntelligentSystemsProject
Last_Year/SI_CODE/src/Memory.cpp
#include <math.h> #include <algorithm> // sort #include "Memory.h" #include "Searcher.h" #include "kmeans.h" #include <tr1/unordered_set> using std::tr1::unordered_set; using namespace pcl; using namespace std; // we need this to compare the spin images with the kd-tree namespace pcl { template <> class DefaultPo...
ALGO
0.995332
4.595072
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-05-31T22:36: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": "1c0a3dfa1f...
4ce1b1d0-31e4-42ae-ae39-65adaef515bd
mrdetective/LeetCode-Problems
3534-count-almost-equal-pairs-i/count-almost-equal-pairs-i.cpp
class Solution { public: vector<int> getDigits(int num){ vector<int>digits; while(num){ digits.push_back(num % 10); num /= 10; } return digits; } int countPairs(vector<int>& nums) { int n = nums.size(), ans = 0; sort(nums.begin(), nums....
ALGO
0.999976
5.682612
{ "github_metadata": { "branch": "main", "commit_count": 72, "repo_created_at": "2023-09-05T18: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": "daa46aa0177...
166bd37e-fc98-4837-9117-be835870e73f
aitazhibayeva/ADS-2023
lab8/h.cpp
#include <bits/stdc++.h> using namespace std; long long p=31; long long get_hash(string s){ long long h=0; for(int i=0; i<s.length(); i++){ h = (h*p+(s[i]-'a'+1)); } return h; } bool RK(string s, string t){ int hashS = get_hash(s.substr(0, t.length())); int hashT = get_hash(t); in...
ALGO
0.999995
4.328038
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2023-10-18T19:22: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": "3ccafd3d8d7...
c7f05228-6317-47e6-b9fb-bb457e6e293a
yesicota/CotaYesenia_Cis5_41366
Hmwrk/Assignment_2/Gaddis_9thEd_Chap3_Prob10_Temp/main.cpp
/* * File: main.cpp * Author: <NAME> * Created on January 12, 2021, 9:20PM * Purpose: Convert Celsius to Fahrenheit */ //System Libraries #include <iostream> //Input/Output Library #include <iomanip> using namespace std; //User Libraries //Global Constants, no Global Variables are allowed //Math/Physics/Co...
TOOL
0.953027
4.537924
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2021-01-23T11:04: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": "d813c324c0d...
82f9b83a-471d-45a2-a74c-bf50a86c26d8
sahil87/learning-nitt
c/tree/minCostSpanTree2.cc
/* The most used debugging statement for (int i = 0; i < vl.size (); i++) cout << "Element " << i << " is " << vl.at(i) << endl; */ #include <iostream> #include <vector> #include <algorithm> using namespace std; vector < char >vl, svl; char arr[] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g' }; struct edge { char e1, e2; ...
ALGO
0.999842
3.12037
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-04-14T09:13: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": "58b8f94d94...
65348fdf-b2af-4ae4-8003-c29bcfdace9d
shangrex/leetcode
0129-sum-root-to-leaf-numbers/0129-sum-root-to-leaf-numbers.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999905
5.799071
{ "github_metadata": { "branch": "main", "commit_count": 2162, "repo_created_at": "2021-06-23T03:20:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dcdc7e9ff...
c23fde09-85e1-4e5d-989d-fd00220360d3
ComodoSecurity/openedr
edrav2/eprj/boost/boost/histogram/accumulators/sum.hpp
// Copyright 2018 <NAME> // // Distributed under the Boost Software License, version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_HISTOGRAM_ACCUMULATORS_SUM_HPP #define BOOST_HISTOGRAM_ACCUMULATORS_SUM_HPP #include <boost/histogram/fwd.hpp> #include ...
TOOL
0.970381
7.524506
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2020-10-28T20:51:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2476, "forks": 474, "issues": 30, "pull_requests": 0 }, "file_meta": { "content_id": "dc361d...
c29c47ba-36b7-4886-83af-16e950083e90
anshuahi/LeetCode
Problems/1-1000/251-300/287. Find the Duplicate Number/Solution.cpp
/* Approach : 1. Use fast & slow with strides 2 & 1 to move from index 0. 2. When they meet, there is a cycle within the path, i.e., a duplicative number. 3. Reset slow to slow=nums[0], traverse both with stride 1 until they meet; the meet point is the entrance for the cycle; return slow or fas...
ALGO
0.999987
6.121612
{ "github_metadata": { "branch": "main", "commit_count": 182, "repo_created_at": "2023-01-14T02:46:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd1d100940...
14550f46-3a03-4cdc-a097-43312fe5ea70
adhambek010/c_plus_plus_basic
Practise/Salaydinov_405294_hom2ex3.cpp
#include <iostream> //Created by <NAME> using namespace std; void input_array (int *arry, int length); void display (int *arry, int length); void sort_ing (int *arry, int length); int main() { int length; cout << "Please enter length of array: "; cin >> length; if (length > 0) { int *arry = ...
ALGO
0.999194
3.6395
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2023-04-24T16:36: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": "ec02292104...
e0e16990-c07a-4a1f-aafb-537c5b605e69
VA-007/CP-Code
137-Doubly-Linked-List.cpp
#include <bits/stdc++.h> #include <iostream> #include <algorithm> #include <string> #include <vector> #include <cmath> #define ll long long using namespace std; struct Node { Node *prev; int data; Node *next; }; // <----- Displaying a Doubly Linked List -----> void display(Node *p) { while (p != NULL) { ...
ALGO
0.999983
5.338767
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2021-01-05T09:51: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": "2319b302f...
da4d56e0-e5d1-476a-a4eb-4e930b0112e5
Xilinx/Vitis-AI
examples/waa/plugins/include/pl/imgproc/xf_hog_descriptor_norm.hpp
/* * Copyright 2019 Xilinx, 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...
ALGO
0.976822
5.85053
{ "github_metadata": { "branch": "master", "commit_count": 1253, "repo_created_at": "2019-10-16T21:41:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1631, "forks": 649, "issues": 340, "pull_requests": 75 }, "file_meta": { "content_id": "...
f8844f6e-a165-4c40-8807-e9619378946a
WhereIsHeroFrom/Algorithm
数学/图论/奇环/HDU 4598 ( Difference ) .cpp
/* 题解:奇环 or 结点数目大于1的连通块数目 超过1个 都是不合法的 */ #include <iostream> using namespace std; #define MAXN 400 char mat[MAXN][MAXN]; int color[MAXN]; int n; int cnt, cntv; bool dfs(int u, int c) { int i; if(color[u] == -1) { cnt ++; color[u] = c; }else { return (color[u] == c); }...
ALGO
0.999976
4.847176
{ "github_metadata": { "branch": "master", "commit_count": 210, "repo_created_at": "2020-10-24T04:32:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "abd5a7d...
6b789baf-c1c5-4285-ba49-5b0f015b4511
fernandGP/CochesAutonomos
headers/mapa.h
#ifndef MAPA_H #define MAPA_H const int CONST_P_PEATONES = 5; const int CONST_P_OBSTACULOS = 30; const int CAP_MAX_COCHE = 6; #include <vector> #include <sstream> #include <fstream> #include "celda.h" #include <ctime> #include <cmath> #include "f_heuristicas.h" using namespace std; /** * Mapa: Matriz de celdas, i...
ALGO
0.968777
4.759981
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2018-10-17T12:41: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": "1012cf155...
0ed9b9c2-48be-451c-8fc9-04aa07005c91
ArturFPC/Grafo-Algoritmo-Floyd-Warshall
main.cpp
#include <iostream> #include <vector> //Autor: <NAME> using namespace std; const int INF =999; void floydWarshall(vector<vector<int>> &mA, vector<vector<int>> &mP){ for (unsigned int k = 0; k < mA.size(); k++){ for (unsigned int i = 0; i < mA.size(); i++){ for (unsigned int j = 0; j < mA.size();...
ALGO
0.999977
4.560236
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-02-12T21:53: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": "9f5db66c203a...
a16359b1-cd1f-4e8b-bde5-747fc0e9d95b
ayu0616/atcoder-workspace-cpp
archives/abc/abc276/E/main.cpp
#include <iostream> #ifdef ONLINE_JUDGE #define NDEBUG #endif #include "../../lib.hpp" // constexpr int MOD = 998244353; // constexpr int MOD = 1000000007; // constexpr int MOD = 1000000009; // using mint = static_modint<MOD>; int main() { cout << fixed << setprecision(18); ll H, W; cin >> H >> W; v...
ALGO
0.999989
5.650929
{ "github_metadata": { "branch": "main", "commit_count": 378, "repo_created_at": "2023-07-21T05:41: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": "1b479acb18...
8857a6c6-583a-4114-869c-1a157965b852
timkao/cppInit
pLambda.cc
#include <iostream> #include <string> #include <vector> #include <numeric> using std::string; // e10.14 auto sumTwo = [](int a, int b) -> int { return a + b; }; void elimDups(std::vector<int> &nums) { sort(nums.begin(), nums.end()); auto end_unique = unique(nums.begin(), nums.end()); nums.erase(end_unique, ...
ALGO
0.987844
5.843107
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2020-01-22T05:12: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": "302cbe2ec...
3d1f5c85-c394-4515-a3af-6a17ea6de2a2
urawa72/procon
atcorder/abc156/d/main1.cpp
#include <bits/stdc++.h> using namespace std; #define all(v) v.begin(), v.end() #define V vector #define P pair typedef long long ll; const int MOD = 1e9 + 7; const int MAX = 2 * 10e5 + 1; template<typename T> T modPow(T x, T n, const T &mod){ T res = 1; while(n > 0){ if(n & 1) (res *= x) %= mod; ...
ALGO
0.999976
4.622001
{ "github_metadata": { "branch": "master", "commit_count": 338, "repo_created_at": "2019-07-28T08:28:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "646a6215...
b85a69b1-2754-45df-b787-9fbd9661683d
Yonghui56/ogs6
NumLib/Fem/ShapeFunction/ShapeQuad9.h
/** * \copyright * Copyright (c) 2012-2016, OpenGeoSys Community (http://www.opengeosys.org) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.org/project/license * */ #ifndef SHAPEQUAD9_H_ #define SHAPEQUAD9_H_ #incl...
ALGO
0.975542
7.180447
{ "github_metadata": { "branch": "master", "commit_count": 7218, "repo_created_at": "2016-04-14T09:05: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": "2dab552...
cf6a6cec-29c8-48ab-983b-fee0ab780eb1
Chris-J28/PE2025_ChristianG
main 15 (juego 2 torres de Hanoi).cpp
//**PRESENTACION*** //NOMBRE: <NAME> //FECHA: 10 de abril de 2025 //PROGRAMA: Juego 2 //CENTRO UNIVERSITARIO DE LOS ALTOS / UNIVERSIDAD DE GUADALAJARA //PROFESOR: <NAME> //DESCRIPCION: Programa para jugar a las torres de Hanoi #include <stdio.h> #define MAX 10 int main() { int numDiscos; //ciclo do para selecciona...
ALGO
0.999735
4.326446
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2025-01-30T00:05:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ae5b5f5d5ac...