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
0d32097a-8098-4b73-b477-ea85831e1ecc
setnormTJC/1436-Chapter5
SomeNeatUsesOfForLoops/Source.cpp
#include <iostream> #include<filesystem> #include<fstream> #include<string> using namespace std; int main() { //int fileCount = 0; //string rootFolderPath = "C:/Users/Work/Desktop/misc/testTextFiles"; //for (const auto& entry : std::filesystem::directory_iterator(rootFolderPath)) //{ // file...
TOOL
0.907556
4.314645
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2024-03-05T16:13: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": "8b1d280353...
91b90103-8d28-4f56-a9d1-a1999299a067
akiguti/maze_multithread
maze.cpp
#include <iostream> #include <fstream> #include <string> #include <thread> #include <unistd.h> #include <iomanip> using namespace std; // <NAME>, 14206 // ISE 2020-2021 MII (UPM) // // // Coordinates: // Top left corner ==> (00,00) // Bottom right corner ==> (99,24) int maze (int Ix, int Iy, char dir, char mat[]...
ALGO
0.999005
3.461689
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-11-11T01:18: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": "0da4e4656ba8...
fb43f19d-1ca3-422c-84b9-3169474e742b
iKingsly/iKYLeetCode
剑指offer/剑指offer:面试题31:连续子数组的最大和/剑指offer:面试题31:连续子数组的最大和/main.cpp
// // main.cpp // 剑指offer:面试题31:连续子数组的最大和 // // Created by 郑钦洪 on 16/6/20. // Copyright © 2016年 iKingsly. All rights reserved. // #include <iostream> int FindGreatestSumOfSubArray(int *pData, int nLength) { if (pData == NULL || (nLength < 1)) { return -1; } int maxSum = 0; int Great = 0; ...
ALGO
0.999317
4.293372
{ "github_metadata": { "branch": "master", "commit_count": 152, "repo_created_at": "2016-05-14T07:53:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6eb070cf...
6716ead9-370f-4d7c-a1a3-2363bde237c2
tensorflow/tensorflow
tensorflow/core/kernels/linalg/svd_op_impl.h
/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. 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 a...
ALGO
0.980126
7.856849
{ "github_metadata": { "branch": "master", "commit_count": 182413, "repo_created_at": "2015-11-07T01:19:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 190773, "forks": 74758, "issues": 873, "pull_requests": 553 }, "file_meta": { "content...
664f5cfd-fdf6-4c25-991f-ca993e20ab2c
Alok-2004/problemSolving
tribonacciNumber_LC1137.cpp
/* 1137. N-th Tribonacci Number The Tribonacci sequence Tn is defined as follows: T0 = 0, T1 = 1, T2 = 1, and Tn+3 = Tn + Tn+1 + Tn+2 for n >= 0. Given n, return the value of Tn. */ #include <bits/stdc++.h> using namespace std; //Normal Recursion /* class Solution { public: int tribonacci(int n) { if( ...
ALGO
0.999952
5.337406
{ "github_metadata": { "branch": "main", "commit_count": 106, "repo_created_at": "2024-07-07T19:29: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": "247cd28279...
3cc00867-ec37-45cb-ad35-fd0ece682430
Subodh1911/6Companies30Days
comp 4/PartitionEqualSubsetSum.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 equalPartition(int n, int a[]) { int sum=0; for(int i=0;i<n;i++) { sum+=a[i]; } if...
ALGO
0.999831
5.132788
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2022-01-02T01:32:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "896a328b08c...
6acb9f56-3702-4d03-8010-7951328dbc32
Lfover/legendary-cpp
2022-3-20/2022-3-20/model.cpp
//大整数,高精度加法 模板 #if 0 #include <iostream> #include <vector> #include <string> using namespace std; const int N = 1e6 + 10;//更加保险,安全 //C = A + B vector<int> add(vector<int> &A, vector<int> &B) { vector<int> C;//定义结果 int t = 0;//进位 for (int i = 0; i < A.size() || i < B.size(); i++) { if (i < A.size()) t += A[i...
ALGO
0.999748
3.402447
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2022-01-06T13:59:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "963158329...
98c495fb-2562-4a1d-9997-07b83c191587
coops/envoy
source/extensions/filters/http/cache/in_memory_cache/concurrent_lru_cache/concurrent_lru_cache.h
#pragma once #include <cstdint> #include "absl/base/internal/spinlock.h" #include "absl/base/thread_annotations.h" #include "absl/cleanup/cleanup.h" #include "absl/container/fixed_array.h" #include "absl/container/flat_hash_set.h" #include "absl/container/internal/raw_hash_set.h" #include "absl/hash/hash.h" #include ...
TOOL
0.974434
7.909286
{ "github_metadata": { "branch": "coops_lru_cache", "commit_count": 10209, "repo_created_at": "2021-11-30T23:19:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 29 }, "file_meta": { "content_id...
7c435d4d-f2fd-49fb-ab15-216066e58b96
OI-wiki/OI-wiki
docs/dp/code/plug/plug_3.cpp
#include <cstring> #include <iostream> using namespace std; template <class T> bool checkMax(T &a, const T b) { return a < b ? a = b, true : false; } constexpr int N = 8, M = 8; constexpr int offset = 3, mask = (1 << offset) - 1; int A[N + 1][M + 1]; int n, m; int ans, d; constexpr int MaxSZ = 16796, Prime = 9973; ...
ALGO
0.999849
4.245841
{ "github_metadata": { "branch": "master", "commit_count": 12101, "repo_created_at": "2018-07-11T03:28:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 23612, "forks": 4310, "issues": 112, "pull_requests": 9 }, "file_meta": { "content_id":...
20ec48c3-18ee-4467-950b-190eb72a03ad
parasollab/open-ppl
lib/stapl/stapl/containers/partitions/normal.hpp
/* // Copyright (c) 2000-2009, Texas Engineering Experiment Station (TEES), a // component of the Texas A&M University System. // All rights reserved. // The information and source code contained herein is the exclusive // property of TEES and may not be disclosed, examined or reproduced // in whole or in part withou...
ALGO
0.998207
6.740822
{ "github_metadata": { "branch": "main", "commit_count": 4350, "repo_created_at": "2023-11-24T18:40:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "116943d9ac...
3e5c170f-c101-49e0-9ed3-6915a0896416
azqpbao/IT003.K21.KHCL
BT_Tuan_4/Hinh_Chu_Nhat_To_Nhat/Source.cpp
#include <iostream> using namespace std; struct node { int val; node* next; }; struct stack { node* head; }; node* getnode(int x) { node* p = new node; if (p == NULL) return NULL; p->val = x; p->next = NULL; return p; } void push(stack& s, int x) { node* p = getnode(x); if (s.head == NULL) s.head = p; else {...
ALGO
0.99996
3.784398
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-12-07T07:20:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb91cf7f2854...
2d224525-5d70-4b85-950e-17b24732f286
cartermc24/ComputerVisionProjects
Project-1-Motion-Detection/main.cpp
#include <iostream> #include <opencv2/opencv.hpp> #include "utils/FrameReader.h" #include "utils/ImageShower.h" #include <unistd.h> void simpleTemporalFilter(FrameReader &frame_reader); cv::Mat applyTemporalDerivFilter(cv::Mat *images, int start_idx, cv::Mat filter); void runTemporalDifferenceRun(cv::Mat *input, int ...
ALGO
0.980463
4.188373
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2018-09-24T01:57: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": "61a0b660a...
5997fddb-8df4-48f1-b69d-ff779998084f
appleseedhq/appleseed
src/appleseed/foundation/utility/commandlineparser/valueoptionhandler.h
// // This source file is part of appleseed. // Visit https://appleseedhq.net/ for additional information and resources. // // This software is released under the MIT license. // // Copyright (c) 2010-2013 <NAME>, Jupiter Jazz Limited // Copyright (c) 2014-2018 <NAME>, The appleseedhq Organization // // Permission is ...
TOOL
0.944749
7.929838
{ "github_metadata": { "branch": "master", "commit_count": 11152, "repo_created_at": "2010-07-02T16:33:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2238, "forks": 337, "issues": 423, "pull_requests": 35 }, "file_meta": { "content_id": ...
eb99db32-a9c4-4128-8133-a5009d696fa9
ShalevAsor/AlgoSolverCPP
Problems/Arrays/mountain.cpp
#include "../../Utils/utils.h" /* Mountain: write a function that takes input an array of distinct integers and returns the length of the highest mountain. a mountain is defined as adjacent integers that are strictly increasing until they reach a peak at which the become strictly decreasing. at least 3 numbers are req...
ALGO
0.99972
5.621999
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-07-27T14:11: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": "da3f333ec8f...
3cdf1a06-d564-4f24-9e30-570c5de34f36
sikauf/EECS484P4
Join.cpp
#include "Join.hpp" #include "Record.hpp" #include "Page.hpp" #include "Disk.hpp" #include "Mem.hpp" #include "Bucket.hpp" #include "constants.hpp" #include <unordered_map> #include <vector> #include <utility> using namespace std; /* * Partition Phase: hash records from both relations and write them to disk via mem...
ALGO
0.997131
5.385459
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-16T19:18: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": "9d58b7c1cf17...
40e50c56-185a-47b3-9d15-134b7b8f09df
Paynekk/Learning_c_plus_plus
fundamentos/4_alternativas/Switch.cpp
/* Leer un numero entre 1-7 y mostrar por pantalla. lunes para el uno, martes para el 2 y asi consecutivamente hasta llegar a domingo */ #include <iostream> using namespace std; int main() { int dia; cin >> dia; /*Con Switch*/ switch(dia){ case 1: cout << "Lunes"<< endl; break; ...
ALGO
0.973537
3.087737
{ "github_metadata": { "branch": "master", "commit_count": 323, "repo_created_at": "2019-06-29T06:25:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b20ba97c...
b647d0fd-7cf2-4a68-b4dc-8cbfbfdcb339
BinomialSheep/CompetitiveC--
AtcoderContest/AHC026/延長戦/21.cpp
#pragma region header #include <bits/stdc++.h> // デバッグ用マクロ:https://naskya.net/post/0002/ #ifdef LOCAL #include <debug_print.hpp> #define debug(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__) #else #define debug(...) (static_cast<void>(0)) #endif using namespace std; using ll = long long; using vi = vector<int>...
ALGO
0.999973
4.050967
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2023-12-12T17:45:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9f54b8a66...
b62e1a3f-9870-4b1e-a1e7-ca6498009d61
Abdusolix/Hw2.A.Shakirov
main (1).cpp
#include <iostream> #include <cmath> using namespace std; int main() { cout << "problem1\n"; int number1, number2; cin >> number1 >> number2; float avnumber = (number1 + number2)/2; int product = number1 * number2; cout << "The result of average is equal to " << avnumber << endl; cout << "T...
ALGO
0.992171
4.096045
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-03-16T12:34: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": "87cdc0f3645b...
c37b6b73-9df8-4d0d-bfc2-2e2dc537daff
andrey-glebov/EM_engine
main.cpp
#ifdef __cplusplus #include <cstdlib> #else #include <stdlib.h> #endif #ifdef __APPLE__ #include <SDL/SDL.h> #else #include <SDL.h> #endif #include <ctime> #include <sys/time.h> #include "include/EM_engine.h" #define resize_coef 50 double rnd1(double lim){ double r = lim * 1.0 * (rand() / (double)RAND_M...
TOOL
0.974561
4.386519
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2013-12-07T19:18:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c6cf8c6b4...
6a7eb7f2-abe8-4e0e-bfe0-515c34b885c7
AnasImloul/Leetcode-Solutions
scripts/algorithms/R/Rotated Digits/Rotated Digits.cpp
// Runtime: 3 ms (Top 69.84%) | Memory: 7 MB (Top 11.11%) class Solution { public: bool isValid(int n) { bool check = false; while (n > 0) { int k = n % 10; if (k == 2 || k == 5 || k == 6 || k == 9) check = true; if (k == 3 || k == 4 ||...
ALGO
0.999839
5.764669
{ "github_metadata": { "branch": "main", "commit_count": 5405, "repo_created_at": "2022-08-07T11:14:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 382, "forks": 120, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fad4a...
6158b691-c731-421e-8607-5a42b5aef701
Rydersel/PlaguewareCSGO_3.0
cheats/lagcompensation/resolver.cpp
// This is an independent project of an individual developer. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com #include "animation_system.h" #include "..\ragebot\aim.h" #include "LagCompensation.hpp" float EyeAngles[64] = { 0 }; float GetBackwardYa...
ALGO
0.992959
4.414951
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2021-03-04T20:27:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "01abce1f2...
86927d9d-090f-42f2-804f-e9eafc598e7d
ishandutta2007/codeforces-t
thescrasse/normal/1156/F.cpp
// 1156F // Card Bag #include <bits/stdc++.h> using namespace std; #define nl "\n" #define nf endl #define ll long long #define pb push_back #define INF (ll)1e18 #define mod 998244353 #define maxn 5010 ll i, i1, j, k, k1, t, n, m, res, flag[10], a[maxn], b, dp[maxn][maxn]; ll s, fc[maxn], nv[maxn], tt, sf[maxn]; ve...
ALGO
0.999942
4.354039
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "38f89364cd57...
b7709d18-c492-4b54-a393-9dea8e8719df
VasileiosBouzas/MeshPolygonization
src/Polygonization/Planarity.h
/** * MeshPolygonization is the implementation of the MVS (Multi-view Stereo) building mesh simplification method * described in the following paper: * <NAME>, <NAME>, and <NAME>. * Structure-aware Building Mesh Polygonization. * ISPRS Journal of Photogrammetry and Remote Sensing. 167(2020), 432-44...
ALGO
0.993346
6.660399
{ "github_metadata": { "branch": "master", "commit_count": 162, "repo_created_at": "2018-12-26T11:16:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 81, "forks": 19, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "653140...
58be09a2-ead0-49a6-a2fa-72780487d18b
Jyotika25/ProblemSolvingIBSeries
Binary Search/Rotated Sorted Array search.cpp
/* Given an array of integers A of size N and an integer B. array A is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2 ). You are given a target value B to search. If found in the array, return its index, otherwise return -1. You may assume no duplicate exists in th...
ALGO
0.999996
5.453193
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2020-05-11T15:41:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "632f9901a...
4c817778-80b4-48d3-96ca-22004b1df024
brianbbsu/program
code archive/TIOJ/1332-2.cpp
//{ #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef double lf; typedef pair<ll,ll> ii; #define REP(i,n) for(ll i=0;i<n;i++) #define REP1(i,n) for(ll i=1;i<=n;i++) #define FILL(i,n) memset(i,n,sizeof i) #define X first #define Y second #define SZ(_a) (int)_a.size() #define ALL(_a) _a.begin(),_...
ALGO
0.999997
4.420717
{ "github_metadata": { "branch": "master", "commit_count": 199, "repo_created_at": "2017-02-06T06:47:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69667652...
9dadf12f-09ce-49b4-b1f9-7a85c75f4093
silentsongs/leetcode
algorithms/cpp/ValidAnagram/ValidAnagram.cpp
// source: https://leetcode.com/problems/valid-anagram/ /** * * Given two strings s and t, write a function to determine if t is an anagram of s. * * For example, * s = "anagram", t = "nagaram", return true. * s = "rat", t = "car", return false. * * Note: * You may assume the string contains only lowercase al...
ALGO
0.999358
5.955509
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2015-11-14T08:56:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae378891...
647da326-eda0-4f4c-8b62-6cd37d5f2675
Yuvraj-Sankhyan/C-plus-plus-codes-intermediate-
Experiment11(friend).cpp
#include <iostream> using namespace std; class Array { private: int *array; int size; public: Array(int siz) { size = siz; array = new int[size]; } ~Array() { delete[] array; } void inputElements() { cout << "Enter " << size << " elements: "; for (i...
ALGO
0.990477
5.237101
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-01-12T13:44: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": "9b1c887247a1...
b54c0eeb-1528-48f0-8a67-daebe3257b25
pratyush618/DSA-tutorials
Matrix/row_column_sorted_search.cpp
// Given a matrix of size n x m, where every row and column is sorted in increasing order, // and a number x. Find whether element x is present in the matrix or not. #include <bits/stdc++.h> using namespace std; bool search(vector<vector<int>> matrix, int n, int m, int x) { // code here if (n == 1) { ...
ALGO
0.999979
5.131941
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2022-10-25T03:21: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": "2b0bfc5762d...
95db729e-8fa8-4876-bce9-8b628962d8d8
dedowsdi/journey
gl4/challenge/octree_point/octree_point.cpp
#include <app.h> #include <bitmap_text.h> #include <sstream> #include <debugger.h> #define WIDTH 800 #define HEIGHT 800 namespace zxd { glm::mat4 v_mat; glm::mat4 p_mat; glm::mat4 vp_mat; lightless_program prg; bool draw_tree = false; bool draw_point = true; GLuint num_points = 10000; vec3_vector points; GLfloat ...
ALGO
0.937307
4.456672
{ "github_metadata": { "branch": "master", "commit_count": 312, "repo_created_at": "2018-01-03T02:05:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "249cd9d...
23df16d3-1b18-4c22-b046-2973fe81fe5e
raihanthecooldude/ACM
Codes/Beginner/AIUB Beginner's dp contest (basic + string)/H - Longest Common Subsequence/LongestCommonSubsequence.cpp
/*b-ismi-llāhi r-raḥmāni r-raḥīmi*/ #include<bits/stdc++.h> #include<stdio.h> #include<iostream> #include<sstream> #include<bitset> #include<utility> using namespace std; #define pi 3.1415927 #define pi2 2.0*acos(0.0) #define pi3 acos(-1.0) #define MOD 1000000007 #define MAX 100005 #define UMAX 9223372036854775807 #d...
ALGO
0.999969
3.951321
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2018-07-03T07:29: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": "5b8fc5b14...
19c5bad8-0477-4849-9697-05b7226f4812
Mahabub618/Problem-Solving
Re-rooting/Tree Painting.cpp
/**********************/ /* <NAME> */ /* Cse 10th */ /* Comilla University */ /**********************/ #include<bits/stdc++.h> using namespace std; #define ll long long int #define veci vector<int> #define vecl vector<long long int> #defi...
ALGO
0.999417
4.07845
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2022-12-07T14:30:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c370d9c0ef...
5d3343f6-4641-4783-ad8d-50e37e527b05
bdqnghi/bi-tbcnn
code/quicksort/cpp/1994.cpp
//DER....... #include<stdio.h> #include<stdlib.h> #include<string.h> #include<functional> #include<math.h> #include<assert.h> #include<stdarg.h> #include<time.h> #include<limits.h> #include<ctype.h> #include<string> #include<map> #include<set> #include<queue> #include<algorithm> #include<vector> #include<iostream> #inc...
ALGO
0.999966
3.470648
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2017-10-04T10:39:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 51, "forks": 18, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "998f92...
68dc87a4-e62e-4031-a366-8cfee26b49b0
onlyflan/code-ptit
CPP0524.cpp
#include <bits/stdc++.h> using namespace std; struct SinhVien { string msv, ten, lop; float d1, d2, d3; int stt = 1; }; void nhap(SinhVien &a) { cin >> a.msv; cin.ignore(); getline(cin, a.ten); cin >> a.lop >> a.d1 >> a.d2 >> a.d3; } bool cmp(SinhVien a, SinhVien b) { return a.msv < b...
ALGO
0.965102
3.610615
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-09-22T11:49: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": "59eb02d712c7...
2f40fcbd-eb07-4170-a739-234e3a677fd5
yogykwan/acm-challenge-workbook
src/cf25e.cpp
/* * CF 25E: Test * 题意:给出三个串,求包含它们的最短母串的长度。在母串中,子串可重叠且顺序任意。 * 类型:字符串哈希 * 算法:枚举三个子串开头出现的6种顺序,前两个先处理得到母串,再和第三个得到母串。最短母串的获得可通过hash值是否相同判断是否重叠部分可行,预处理出每个前缀的hash值。 */ #include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef unsigned long long ULL; // 溢出相当于取模 char s[5][300010]; ULL h[...
ALGO
0.999837
4.250187
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2016-11-12T12:14:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1766, "forks": 340, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb9e...
dd5cddc3-e816-45cd-b071-de94a2df3c12
charlenellll/LeetCodeSolution
328 Odd Even Linked List/328 oddEvenList.cpp
// 16 ms, faster than 70.69% class Solution { public: ListNode* oddEvenList(ListNode* head) { if( !head || !head->next ) return head; ListNode* oddHead = new ListNode(0); ListNode* evenHead = new ListNode(0); // for even list oddHead->next = NULL, evenHead->next = NULL; int ...
ALGO
0.999955
5.800152
{ "github_metadata": { "branch": "master", "commit_count": 180, "repo_created_at": "2017-07-20T08:05:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0cad269f...
fa8c94b2-4e3a-4cf6-ab80-a1371a48558d
MeiDaiAa/c_Algorithm
2024_10_25/shortestWay.cpp
#include <iostream> #include <string> using namespace std; /* 对于任何字符串,我们可以通过删除其中一些字符(也可能不删除)来构造该字符串的 子序列 。(例如,“ace” 是 “abcde” 的子序列,而 “aec” 不是)。 给定源字符串 source 和目标字符串 target,返回 源字符串 source 中能通过串联形成目标字符串 target 的 子序列 的最小数量 。如果无法通过串联源字符串中的子序列来构造目标字符串,则返回 -1。 示例 1: 输入:source = "abc", target = "abcbc" 输出:2 解释:目标字符串 "abc...
ALGO
0.999957
5.31279
{ "github_metadata": { "branch": "main", "commit_count": 119, "repo_created_at": "2024-09-10T02:15:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c3018e1ab0...
3cfe3201-2c62-46ea-8ebc-ed62742bb577
Duhui-Kim/CodingTest_JAVA
프로그래머스/3/43163. 단어 변환/단어 변환.cpp
#include <string> #include <vector> #include <iostream> using namespace std; int answer; int diffCount(string &a, string &b) { int idx = 0; int count = 0; for (char c : a) { if (c != b[idx++]) { count++; } } return count; } void solve(string cur, string target, ...
ALGO
0.999996
4.754132
{ "github_metadata": { "branch": "main", "commit_count": 773, "repo_created_at": "2023-01-16T12:26: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": "b1feccefb7...
63f43b3e-293d-4737-ba1b-c2cfd0e3cadc
S-V/NoobWerks-1
Source/Engine/Runtime/ProcGen/Noise/NwNoiseFunctions.cpp
// #include <Base/Base.h> #pragma hdrstop // mt19937 #include <random> // #include <Base/Math/Interpolate.h> #include <Core/Memory/MemoryHeaps.h> // #include <ProcGen/Noise/NwNoiseFunctions.h> namespace Noise { NwPerlinNoise::NwPerlinNoise( int seed ) { this->setSeed( seed ); } void NwPerlinNoise::setSeed( int ...
ALGO
0.991637
6.579145
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-01-25T20:46:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30233a340aea...
cbc2b85c-b93d-4727-bc99-9000432c08e1
HeeChanN/Algorithm-Online-Judge
c++/프로그래머스/lv1/키패드 누르기.cpp
#include <bits/stdc++.h> using namespace std; map<int, pair<int,int>> mp; string solution(vector<int> numbers, string hand) { string answer = ""; mp[0] ={3,1}; mp[1] = {0,0}; mp[2] = {0,1}; mp[3] = {0,2}; mp[4] = {1,0}; mp[5] = {1,1}; mp[6] = {1,2}; mp[7] = {2,0}; mp[8] = {2,...
ALGO
0.999973
4.52442
{ "github_metadata": { "branch": "main", "commit_count": 400, "repo_created_at": "2023-06-24T12:29:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "17f98ebc94...
2bc11bc3-55dc-4130-8b53-929f992f5627
shakibamoshiri/1000_examples_with_cpp
std/04_Algorithm_library/067_algorithm_partition.cpp
/* Algorithm Library C++ The algorithm library defines functions for a variety of purposes. (e.g. searching, sorting, counting, manipulating ) that operate on range of elements. Note that a range is defined as [ first, last ) where last refers to the element past the last element to inspect or modify. -----------------...
ALGO
0.9999
6.258665
{ "github_metadata": { "branch": "master", "commit_count": 123, "repo_created_at": "2016-09-13T13:24:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9863023e...
b2935360-688d-4620-acc6-2c06d6b8bb04
kvnptl/Cpp_utils
6_seconds_to_hh_mm_ss.cpp
#include <cmath> #include <iomanip> #include <string> #include <iostream> using std::string; // INPUT: Long int measuring seconds // OUTPUT: HH:MM:SS string timeFormat(long int seconds) { string timeString; int mm{0}; int hh{0}; float ss; mm = floor(seconds / 60); ss = ((seconds / 60.0) - mm) ...
ALGO
0.903143
4.72142
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-03-18T05:59:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "27decd8eeb94...
2e5011b6-d96c-461e-83b8-e79af890bfce
arangodb/arangodb
3rdParty/boost/1.78.0/boost/hana/fwd/ap.hpp
/*! @file Forward declares `boost::hana::ap`. @copyright <NAME> 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_HANA_FWD_AP_HPP #define BOOST_HANA_FWD_AP_HPP #include <boost/hana/config.hpp> #include...
TOOL
0.902729
7.583623
{ "github_metadata": { "branch": "devel", "commit_count": 51986, "repo_created_at": "2011-10-26T06:42:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13878, "forks": 857, "issues": 743, "pull_requests": 38 }, "file_meta": { "content_id": ...
2ea6765f-4ca2-4be2-b6eb-47b791f95afe
penghao94/TensorVis
external/embree/kernels/xeonphi/bvh4mb/bvh4mb_traversal.h
// ======================================================================== // // Copyright 2009-2015 Intel Corporation // // // // Licensed under the Apache License, Version 2.0 (the "License"); // // y...
ALGO
0.999911
5.7221
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2017-02-17T09:20:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7087dd643...
3b8b8942-e106-42ad-90aa-236289161602
wzmw-zr/Code-Archive
2021/11/8/1.LeetCode299.cpp
/************************************************************************* > File Name: 1.LeetCode299.cpp > Author: > Mail: > Created Time: 2021年11月08日 星期一 10时03分32秒 ************************************************************************/ #include <iostream> #include <string> #include <vector> #include <queue>...
ALGO
0.999994
5.016068
{ "github_metadata": { "branch": "master", "commit_count": 1859, "repo_created_at": "2019-11-28T12:33: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": "e252098...
901cb984-9bcc-4a77-b28e-9a07849fdc8a
MohamedShahed/Knapsack-Problem-with-genetic-algorithms
GAs_ass_1/main.cpp
#include<iostream> #include<cmath> #include<time.h> #include<algorithm> using namespace std ; int NumberOfPopulation=300; int **Population=NULL; int *FitnessArray=NULL; void generatePopuation(int NumberOfItems) { /** * For example your can generate a random number, and if that random number is < 0.5 t...
ALGO
0.999798
3.73291
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-12-12T10:27: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": "0c5449ff5d...
f41f9b8e-d216-46df-8b0e-d8db01b2cceb
ArmaanTechDeveloper/DSA
misc/Concepts/reference.cpp
#include <iostream> using namespace std; // pass by value void passByValue(int value){ // creates a different copy value ++; } // pass by reference void passByReference(int& value){ // points the same memory with a different name value ++; } int main(){ int n = 5; cout << endl << endl <...
TOOL
0.986555
5.145476
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2023-12-01T17:19: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": "5cd55cb7de...
8d568c60-29b0-47af-a9c9-7de884ec74f3
nutyworks/algorithm-study
13460.cpp
// Written by lemonajoc @ 7/18/2023, 12:52:29 PM #include <bits/stdc++.h> using namespace std; const int dx[4] = {-1, 1, 0, 0}; const int dy[4] = {0, 0, -1, 1}; char board[10][10]; bool visited[10][10][10][10]; tuple<int, int, int, int> hit_wall(int rx, int ry, int bx, int by, int d) { while (true) { bool res...
ALGO
0.999928
4.044424
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-07-26T06:54: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": "bd22a192d4f...
ebf86356-8b04-409c-8c3d-f585bb3a1f8f
ojusvini/DAA-Codes
daa lab3/dp/lcs_3.cpp
#include <iostream> #include <string.h> using namespace std; char x[1000]; char y[1000]; char z[1000]; //char lc[1000]; char a[100][1000]; int c[100][100][100]; char b[100][100][100]; int k; void print_lcs(char x[], int i, int j,int k); int lcs(char x[], char y[],char z[]); int main() { int n,i; // scanf("%d",&n); ...
ALGO
0.999534
3.466927
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-08-16T08:28:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ab9f70526...
eb116ef4-4dfe-4e51-b116-7e595d32097f
NVIDIA-Omniverse/PhysX
physx/source/foundation/FdMathUtils.cpp
// 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 disclaimer. // * Redistributions in binary...
ALGO
0.995605
6.758983
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2022-10-04T09:07:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4056, "forks": 524, "issues": 38, "pull_requests": 8 }, "file_meta": { "content_id": "fcbd6b...
4495b7e9-f4ab-432b-9aa2-b11eebb9242e
electronicarts/EASTL
include/EASTL/segmented_vector.h
/////////////////////////////////////////////////////////////////////////////// // Copyright (c) Electronic Arts Inc. All rights reserved. /////////////////////////////////////////////////////////////////////////////// #ifndef EASTL_SEGMENTED_VECTOR_H #define EASTL_SEGMENTED_VECTOR_H #if defined(EA_PRAGMA_ONCE_SUPPOR...
TOOL
0.907243
7.239053
{ "github_metadata": { "branch": "master", "commit_count": 474, "repo_created_at": "2015-12-15T21:04:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8821, "forks": 991, "issues": 82, "pull_requests": 29 }, "file_meta": { "content_id": "c2...
685b382b-5250-42e8-abec-0d7cca1eac1f
Viishhnur/DSCPP-Lab-manual-codes
5b) Queue using stack(enqeue expensive).cpp
#include<iostream> #include<stack> // Enqueue is expensive using namespace std; // Just change the property of stack class Queue{ int size; stack<int> st1,st2; public: Queue(){ size = 0; } void enqueue(int); int dequeue(); bool isempty(); int getS...
ALGO
0.998146
4.406693
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2024-02-15T18:23:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0b721022dd...
6086f980-6865-4a7f-be16-33adc6fa7419
sebrenner/CS106B_Coursework
Reader_Exercises/Stanford_CS106_Reader_Exercises/StanfordCPPLib/queue.h
/* * File: queue.h * ------------- * This interface exports the <code>Queue</code> class, a collection * in which values are ordinarily processed in a first-in/first-out * (FIFO) order. */ #ifndef _queue_h #define _queue_h #include "error.h" #include "vector.h" /* * Class: Queue<ValueType> * ----------------...
TOOL
0.94984
6.080067
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2012-03-23T03:25:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6682cb9bc...
25c3b023-35e9-4dac-b385-33c098eae86a
BartoszFryska/University
Numerical_Methods/lab02/src/LUMethod.cpp
#include "LUMethod.h" void GenerateMatrixesLU ( vector < vector < float > > matrix_A, vector < vector < float > > & matrix_L, vector < vector < float > > & matrix_U, const int n ) { float temp = 0; for ( int i = 0; i < n; i ++ ) { for ( int j = i; j < n; j ++ ) { for ( int k = 0; k <= i...
ALGO
0.99929
3.69697
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-04-10T22:56:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad52ff75769...
9eb90af0-e693-4247-90d1-fbb2bdcca903
adj006/CSE_167-Final_Project
Final_Project/Matrix4.cpp
#include "Matrix4.h" #include <math.h> #include <string> #include <iostream> using namespace std; Matrix4::Matrix4() { for (int i = 0; i<4; ++i) { for (int j = 0; j<4; ++j) { m[i][j] = 0; } } } Matrix4& Matrix4::operator=(const Matrix4& m2) { if (this != &m2) { for (int i = 0; i<4; ++i) { for (i...
ALGO
0.966712
4.5557
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-03-22T01:08: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": "43de6144ce...
98b38279-5ed8-45a9-89dd-473553dee2bd
Readiz/ProblemSolving
codeforce/20210505/D.cpp
#include <stdio.h> #include <unordered_set> using namespace std; #ifndef ONLINE_JUDGE #define READIZ_DEBUG #endif #ifdef READIZ_DEBUG bool isDebug = true; #define printd(...) { printf("[DEBUG] "); printf(__VA_ARGS__); printf("\n"); } inline void testInit() { freopen("D_input.txt", "rt", stdin); } #d...
ALGO
0.998284
3.841191
{ "github_metadata": { "branch": "master", "commit_count": 250, "repo_created_at": "2020-04-18T09:52: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": "c91773d9...
1b71ff28-ada2-43df-9c62-251169eedd63
NewYaroslav/trading_indicators
src/Scaling.cpp
/* * trading_indicators - Indicators for technical analysis. * * Copyright (c) 2018 <NAME>. Email: <EMAIL> * * 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 wit...
ALGO
0.96186
4.740947
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2018-01-08T19:49:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60587a86...
836828b6-0f3b-4fad-a19c-a974b7bc4f79
dmutende/codebkp
C++/Data Structures & Algorithims/src/double_linked_lists/src/main.cpp
/** * <NAME> * P15/1724/2016 * Created on 29th September 2016 * Last Updated on 29th September 2016 **/ #include <iostream> #include "elon.h" #define CREATE 101 #define INSERT 102 #define DELETE 103 #define SHOW_LIST 104 using namespace std; void _init_(); DoubleLinkedList double_linked_list; int PC = 0; //std...
TOOL
0.934163
5.292849
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2016-10-09T18:15: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": "25373e266...
f6487bed-ee06-4e4b-8be5-4178df7b021f
alanna-zhou/project-euler
problem4.cpp
/* * Problem 4: Largest Palindrome Product * * A palindromic number reads the same both ways. * The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. * Find the largest palindrome made from the product of two 3-digit numbers. * * Solved: 4/9/18 * */ #include <iostream> #includ...
ALGO
0.999941
6.778434
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2018-07-19T00:59: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": "7aef0f51a...
ad7c71b9-05f5-4e16-9426-8107e9fc778c
cbwood/algorithm
pat/pat-1003.cpp
#include<bits/stdc++.h> using namespace std; const int maxn = 1e3; #define pb(x) push_back(x) const int INF = 1e9; bool vis[maxn]; int d[maxn]; int num[maxn]; int a[maxn][maxn]; int w[maxn], wi[maxn]; void dijkstra(int st, int ed, int n){ for(int i = 0; i < n; ++i) d[i] = a[st][i]; wi[st] = w[st]; ...
ALGO
0.999956
3.707027
{ "github_metadata": { "branch": "main", "commit_count": 123, "repo_created_at": "2021-09-13T02:43:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15c006327e...
ed5d0ca9-af69-47e5-b56e-2be6adfe6217
sigurdurj09/cv-rotary-pendulum-control
qubeCameraControl/src/signalProcessing.cpp
#define _USE_MATH_DEFINES #include <cmath> #include "signalProcessing.h" #include <deque> #include "qubeControl.h" #include "camControl.h" #include "angleCalculation.h" #include "timing.h" //Signal processing variables //Alpha double b_alpha[] = { 0.2452, 0.2452 }; double a_alpha[] = { 1.0000, -0.5095 }; int alphaFilt...
ALGO
0.999595
4.446476
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-12-02T17:41:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb2350e36e3...
1354d5f3-4699-4dc9-addc-8b283cae87cb
DesuDeluxe/mcu
rotary_servo/rotary_servo.ino
#include <Arduino.h> //3598 #include "arduino2.h" #include <PID_v1.h> #define IN1 7 #define IN2 8 #define PWM 11 #define encoder1PinA 2 // X-AXIS encoder 1 on pins 2 and 4 #define encoder1PinB 4 #define endstopX 3 //left end stop //helpers #define PID_END ( (PiDoutput==0 || PiDoutput==2.00) && (Setpoint==encod...
ALGO
0.992511
4.593229
{ "github_metadata": { "branch": "Arduino", "commit_count": 1, "repo_created_at": "2018-09-20T19:55:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "159e14949...
0120941d-f171-45bb-8abb-246ca8dc4c31
Ashsifat1511/CP-Solves
B_Hamon_Odyssey.cpp
#include<bits/stdc++.h> using namespace std; #define all(x) x.begin(),x.end() #define forn for(int i = 0; i < n; i++) const int N = 1e6+7; typedef long long int ll; #define pb push_back #define cs cout<<"Case "<<tc<<": " int main(){ ios::sync_with_stdio(0); cin.tie(0); int t=1; cin>>t; for(i...
ALGO
0.999909
4.149269
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-10-18T10:14: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": "88119deb973c...
f26753c8-a437-4124-aa89-eab52d1a1d3a
jaemedina/JMAP
samples/field2.cpp
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <JMAP.h> #define NUMCONTROLS 25 typedef struct CONTROL{ v2f pos; HSV_t color; }ControlPt; ControlPt controls[NUMCONTROLS]; ControlPt nearestControl(const int x, const int y){ ControlPt nearest; int dist = 100000; for(int i = 0; i < NUMCONTRO...
ALGO
0.981399
3.806903
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-11-13T19:45: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": "77e2c643e9...
7ba64246-1fbe-4ea7-8cc3-a87b034d5b10
kade5/kade-leetcode
lc2785/sort_vowels.cpp
#include <algorithm> #include <string> #include <vector> using namespace std; class Solution { public: bool isVowel(char c) { return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U'; } string sortVowels(string s) { vector<char...
ALGO
0.999985
6.013088
{ "github_metadata": { "branch": "main", "commit_count": 275, "repo_created_at": "2023-06-24T21:11: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": "3b3355e7de...
8ed2da4f-9813-4e59-bf00-741c1fba62b5
smafjal/AcmOnlinePractice
LightOJ/1332 - Kings in Chessboard.cpp
#include <algorithm> #include <vector> #include <iostream> #include <stdio.h> #include <string.h> #define mp make_pair #define fs first #define sc second using namespace std; #define MAX 100050 #define len 36 struct mat { unsigned int p[len][len]; mat() { for(int i=0;i<len;i++) for(int j=0;j<len;j...
ALGO
0.999776
3.915692
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-02-21T11:34:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f1618d175a...
92ce3925-94c6-44bd-893d-8814fb5195e6
dreamerweee/Algorithm
Tree/TrieTree.h
#ifndef TRIE_TREE_H #define TRIE_TREE_H #include <iostream> #include <vector> #include <string> using namespace std; class TrieTree { public: typedef struct TrieNode { char m_data; vector<TrieNode*> m_child; TrieNode(const char c) : m_data(c), m_child(26, nullptr) { } }TrieNode; TrieTree() : m_roo...
ALGO
0.998297
4.920044
{ "github_metadata": { "branch": "master", "commit_count": 156, "repo_created_at": "2019-08-03T00:23: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": "4b700fad...
3cded31b-7a8a-4db5-877a-d3b2e832fbb6
jmetrikat/comprog-ss24
live-02/prob-diamond-dilemma/solve.cpp
#include <bits/stdc++.h> #define rep(a, b) for (ll a = 0; a < (b); ++a) #define all(a) (a).begin(), (a).end() #define endl '\n' #define ll long long #define Graph vector<vector<ll>> #define WeightedGraph vector<vector<pair<ll, ll>>> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullp...
ALGO
0.999881
4.462524
{ "github_metadata": { "branch": "main", "commit_count": 111, "repo_created_at": "2024-04-12T07:37: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": "d1196f7904...
72649c0e-ab3c-4102-959f-91e70ed73b17
becauseofyou/algorithm
halfplane.cpp
point intersect(point P, Vector v, point Q, Vector w) { point p; Vector u = P - Q; double t = cross(w, u) / cross(v, w); p = P + v * t; return p; } int inhalfplane(point p,point s,point e) { return sgn(cross(e - s, p - s)) ; } std::vector<point> CUT(const std::vector<point> &p, point s, point e) { std::ve...
ALGO
0.999995
5.33597
{ "github_metadata": { "branch": "master", "commit_count": 140, "repo_created_at": "2013-08-22T11:43:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 8, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "b3620c24...
75e7b068-ef3b-464f-a9e1-7bd1966e4362
PriyanshuDas/college-work
Archieved Programs/kickstart/C.cpp
#include <bits/stdc++.h> #define sf scanf #define pf printf #define mp make_pair #define pb push_back #define ll long long int #define ull unsigned long long int #define pi2 pair<ll, ll> #define pi3 pair<ll, pi2 > #define pi4 pair<pi2, pi2 > #define ins insert using namespace std; vector <string> ans; int marks[2] = ...
ALGO
0.999744
3.791118
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2016-07-27T15:23: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": "e1c5cf52f...
9bfca59e-544a-4bd7-a333-98972b6f00ec
ganmolt/AtCoder
0wawawa/ABC/201-250/226/C.cpp
//INCLUDE //------------------------------------------ #include <bits/stdc++.h> //DEFINE //------------------------------------------ #define ll long long #define ld long double #define ALLv(a) (a).begin(),(a).end() #define ALL(a,n) (a),(a)+n #define vi vector<long long> #define vd vector<long double> #define vs vect...
ALGO
0.999945
3.1746
{ "github_metadata": { "branch": "main", "commit_count": 80, "repo_created_at": "2020-06-03T14:56: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": "e37f7aec9a1...
88e535bd-d8c0-4d5a-87d6-13055fd956c6
vardanmidha/18-10-onwards-Dsa
DYNAMIC PROGRAMMIG/120. Triangle Leetcode.cpp
#include <iostream> #include <bits/stdc++.h> #define ll long long #define vl vector<long long> #define v1 vector<int> #define v2 vector<vector<int>> #define IOS \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) using namespace std; class Solution { private...
ALGO
0.999988
4.955137
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2022-10-16T21:05: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": "5edfb312a...
3864c6fc-8264-4a1e-b5df-48d5443d2d22
gammasoft71/Examples_Cpp
Cpp.Core/Random1/Random1.cpp
#include <algorithm> #include <cstdint> #include <iomanip> #include <iostream> #include <numeric> #include <random> #include <vector> using namespace std; // The main entry point for the application. auto main() -> int { vector<uint8_t> bytes1(100); vector<uint8_t> bytes2(100); random_device rand1; random_dev...
TOOL
0.998138
4.576023
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2018-08-16T10:28:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3820b6629...
2a1ed3c4-4c0b-40e4-92f8-5ca197070dbf
sagar1024/mycppjourney
CP/Codeforces/11. Random 800s from recent contests/10. Generate Permutation(accepted).cpp
// B. Generate Permutation // time limit per test1.5 seconds // memory limit per test256 megabytes // There is an integer sequence a of length n, where each element is initially −1. Misuki has two typewriters where the first one writes letters from left to right, with a pointer initially pointing to 1, and another wr...
ALGO
0.99996
5.217267
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2024-08-23T11:34: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": "d0500b9153d...
eaa7bea3-b43b-4460-99b2-0af33574a575
koth/elements-of-programming-interviews
Matrix_search.cpp
// Copyright (c) 2013 Elements of Programming Interviews. All rights reserved. #include <algorithm> #include <cassert> #include <iostream> #include <random> #include <vector> using std::cout; using std::default_random_engine; using std::endl; using std::max; using std::random_device; using std::uniform_int_distributi...
ALGO
0.999175
5.637009
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2016-03-30T01:43:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 14, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "4718714...
3eb52154-4b92-4b25-aeed-9dba6d0b9e9e
patelchaitany/2D-game-engine
Maths/mat4.cpp
#include "mat4.h" namespace sparky { namespace maths { mat4::mat4() { for (int i = 0; i < 4 * 4; i++) { elements[i] = 0.0f; } } float mat4::rnd(float deg) { return (float)((deg * (M_PI)) / 180.0f); } mat4::mat4(float diagonal) { for (int i = 0; i < 4 * 4; i++) { elements[i] = 0.0f; } ...
TOOL
0.925164
5.672074
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-09-25T05:23:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5aed15379879...
19031e19-3e33-4622-bf9f-0c60750f8ac8
generalized-intelligence/GAAS
algorithms/src/LocalizationAndMapping/registration_localization/fast_gicp/thirdparty/nvbio/nvbio/sufsort/dcs_inl.h
/* * nvbio * Copyright (c) 2011-2014, NVIDIA 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,...
ALGO
0.994331
7.009352
{ "github_metadata": { "branch": "main", "commit_count": 765, "repo_created_at": "2019-01-29T06:14:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1991, "forks": 453, "issues": 7, "pull_requests": 3 }, "file_meta": { "content_id": "34b964...
60bc4f87-2bcb-4f9c-a732-7b49961afaa3
FilipH8/ShipBattle
ShipBattle/ship.cc
#include "ship.h" #include <string> #include <iostream> #include "table.h" #include <vector> #include "player.h" #include <unistd.h> using namespace std; Ship::Ship(int sizeShip, int ver_hor, int numberOfShip) { this->sizeShip = sizeShip; this->ver_hor = ver_hor; this->numberOfShip = numberOfShip; } Ship...
TOOL
0.93004
3.799389
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-12T20:04: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": "1af1942b9c07...
1c5ce027-eda5-4d39-9db4-14482ebf182e
iankury/CPP
Solved Problems/uhunt UVa (onlinejudge)/UVa 11152 - Colourful Flowers.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ii> vii; #define FASTIO() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) const int N = 200005, M = 1000000007, BIG = 0x3f3f3f3f; const double PI = 3.14159265358979323846, EPS = 0....
ALGO
0.999891
4.133335
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2020-08-29T15:23: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": "96b3efbcc...
4771d406-4507-4767-8254-d8244ccdd22c
ZhaoPeixiao/CLeetcode
leetcode/Tree/leetcode106.h
// // Created by Peixiao on 2021/6/10. // #ifndef TREE_LEETCODE106_H #define TREE_LEETCODE106_H #endif //TREE_LEETCODE106_H #pragma once #include "TreeNode.h" #include <iostream> #include <vector> TreeNode *build(vector<int> &inorder, int inStart, int inEnd, vector<int> &postorder, int postStart, in...
ALGO
0.999765
6.288815
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2021-05-30T12:07: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": "6d8d73831...
970cfe52-be21-49b8-8100-c5150db2ff5a
luangong/leetcode-cpp
src/solutions/populating_next_right_pointers_in_each_node_ii/populating_next_right_pointers_in_each_node_ii.cpp
/** * Populating Next Right Pointers in Each Node II * * Follow up for problem "Populating Next Right Pointers in Each Node". * * What if the given tree could be any binary tree? Would your previous * solution still work? * * Note: You may only use constant extra space. * * For example, given the following bi...
ALGO
0.999856
6.347841
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-01-11T05:43: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": "b413fc099cae...
7db44abc-b1e4-47fe-a3ae-4371bdf87c5e
basharast/PPSSPP-UWP-ARM
src/1.15.5/Core/MIPS/IR/IRInterpreter.cpp
#include <algorithm> #include <cmath> #include "ppsspp_config.h" #include "Common/BitScan.h" #include "Common/Common.h" #include "Common/Data/Convert/SmallDataConvert.h" #include "Common/Math/math_util.h" #ifdef _M_SSE #include <emmintrin.h> #endif #if PPSSPP_ARCH(ARM_NEON) #if defined(_MSC_VER) && PPSSPP_ARCH(ARM64...
ALGO
0.949856
5.718454
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2023-01-18T22:55:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc1c290f34...
81a76229-7657-4316-ac7a-218e1a6768c5
valentinsingularity/CPP-course
VectorMat/Matrix.cpp
/* 320142 a8_4.cpp <NAME> <EMAIL> */ #include <iostream> #include "Matrix.h" using namespace std; int i,j,k; Matrix::Matrix(int newNr_rows,int newNr_columns) { nr_rows=newNr_rows; nr_columns=newNr_columns; matrix=new double*[nr_rows]; for(i=0;i<nr_rows;i++) matrix[i] = new double[nr_columns]; ...
ALGO
0.99489
3.562853
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-02-07T10:21: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": "1994c3325e...
5d6af556-c331-40a0-99ff-594ec6fafb5d
nashimc/NS
src/main.cpp
#include <iostream> #include <vector> #include <string> #include "../include/pbPlots.hpp" // EXTERNAL #include "../include/supportLib.hpp" // EXTERNAL #include "../include/LinearConvection.hpp" #include "../include/Diffusion.hpp" #include "../include/NonLinearConvection.hpp" #include "../includ...
ALGO
0.990613
5.684534
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2022-04-22T18:09: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": "7ea3545d6a9...
6c9c040e-2f2d-4749-a159-8c2773815352
zmrdltl/problemSolving
leetcode/implementation/1175. Prime Arrangements.cpp
using ll = long long; const int MOD = 1e9 + 7; class Solution { public: bool isPrime(int n) { if (n == 1) return false; for(int i = 2; i * i <= n; i++) { if(n % i == 0) return false; } return true; } ll factorial(int n) { ll fac = 1; for(int i = 2...
ALGO
0.999988
5.06355
{ "github_metadata": { "branch": "master", "commit_count": 2037, "repo_created_at": "2020-07-23T07:18:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "838a598...
b56580a5-25d6-4563-86cc-e261790ac6d2
RituparnaPadira/hacktoberfest
algorithms/c++/CountingSort.cpp
/* Counting sort is a sorting algorithm that sorts the elements of an array by counting the number of occurrences of each unique element in the array. The count is stored in an auxiliary array and the sorting is done by mapping the count as an index of the auxiliary array. Time Complexity: O(n+r) n = no. ...
ALGO
0.999959
6.234398
{ "github_metadata": { "branch": "master", "commit_count": 234, "repo_created_at": "2021-10-02T07:39:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 26, "issues": 3, "pull_requests": 4 }, "file_meta": { "content_id": "48e9850...
4bfc1987-ec7d-4c1b-8738-5c2fea3c0b6d
Chandan-1206/cpp
Radix_sort.cpp
//RADIX SORT #include <iostream> using namespace std; void count_sort(int a[],int n, int place) { int k=(a[0]/place)%10; for(int i=0; i<n; i++) { if (k<(a[i]/place)%10) k=(a[i]/place)%10; } int count_arr[k+1]= {0}; for(int i=0; i<n; i++) { count_arr[(a[i]/place)...
ALGO
0.999959
4.856295
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2023-07-03T11:25: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": "97da612a151...
e4af4954-cb94-4f67-ac40-7841ff528450
Shahidul-Islam-Jony/OLD_CPP_Code
Data Structure & C & Cpp PS/M(20) PP1.cpp
#include<bits/stdc++.h> using namespace std; void printArray(int array[],int size){ for(int i=0;i<size;i++){ cout<<array[i]<<" "; } cout<<endl; } int bubbleSortAssending(int A[],int size){ for(int i=1;i<size;i++){ int flag=0; for(int j=0;j<size-i;j++){ if(A[j]>A[j+1]...
ALGO
0.999964
3.352027
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-03-15T07:59: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": "9a778bdfc214...
347f7028-e348-4d1d-a938-58d516fcf75c
lng8212/DSA
C_C++/Algorithm/DFS.cpp
#include <bits/stdc++.h> using namespace std; vector<int> ke[10000]; bool chuaxet[10000]; void DFS(int n) { chuaxet[n] = true; cout << n << ' '; for (int i = 0; i < ke[n].size(); i++) { if (chuaxet[ke[n][i]] == false) { chuaxet[ke[n][i]] = true; DFS(ke[n][i]); ...
ALGO
0.999822
3.634243
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-07-17T08:04:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e681e68107bb...
3ef6b85e-c4d8-47f0-b688-4248c8de8469
LeePepe/Sicily
1009.cpp
#include <iostream> #include <cmath> using namespace std; int primes[] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59}; int main() { int n; cin >> n; for (int i = 0; primes[i] <= n; i++) { long long mersenne = (long long)pow(2.0, primes[i]) - 1; long long number = merse...
ALGO
0.999751
4.299513
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2015-10-13T11:38: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": "debb3e845...
9ae1bf3d-0a94-45b0-9f77-57bf66ef313d
MAZHARMIK/Interview_DS_Algo
DP/DP on Grids/Count Square Submatrices with All Ones.cpp
/* Scroll below to see JAVA code also */ /* MY YOUTUBE VIDEO ON THIS Qn : https://www.youtube.com/watch?v=y3kdowdyNMM Company Tags : Flipkart Leetcode Link : https://leetcode.com/problems/count-square-submatrices-with-all-ones */ /***************************************...
ALGO
0.99966
5.13346
{ "github_metadata": { "branch": "master", "commit_count": 5946, "repo_created_at": "2020-07-12T13:13:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2586, "forks": 1357, "issues": 7, "pull_requests": 37 }, "file_meta": { "content_id": "...
05e2b438-ddeb-4942-adf2-3e5e7479dbe9
ddimitrovv/Cpp_basics
11_Nested_Loops_Lab/04_sum_of_two_numbers.cpp
#include <iostream> using namespace std; int main() { int first_num = 0, second_num = 0, magic_mun = 0; cin >> first_num >> second_num >> magic_mun; int counter = 0; bool is_found = false; for (int i = first_num; i <= second_num; ++i) { for (int j = first_num; j <= second_num; ++j) { ...
ALGO
0.999944
5.338025
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2023-09-19T11:08:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "42950a31b68...
ed798463-c8e6-450c-8038-545f65cca172
iamarindamkundu/collegedev
College Files/c/I_D_MENU.CPP
#include<stdio.h> #include<conio.h> #include<stdlib.h> typedef struct node { int data; struct node *link; }node; node *head; node *create(node *); int menu(); void display(node *); void ins_head(); void ins_after(node *); void ins_before(node *); void ins_end(node *); void del_head(); void del_val(node *); void del_p...
ALGO
0.999855
3.708846
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-07-28T07:29:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59eff424b0...
2c02ca1b-a223-42e9-a7da-078fec4ca8ed
ibad-r/CPP-CISCO-FINAL-TEST
mcq33.cpp
// What happens if you try to compile and run this program? #include <vector> #include <iostream> #include <algorithm> #include <functional> using namespace std; class Pocket { int value; public: Pocket (int value):value (value) { } int getValue () const { return value; } operator in...
ALGO
0.997885
3.707856
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-11-19T14:29: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": "57e46658bfa5...
af2c4a01-10d1-481c-a159-a254d094c2e9
singhsduos/Placement_Course
Strings/Implement_strstr.cpp
/* Your task is to implement the function strstr. The function takes two strings as arguments (s,x) and locates the occurrence of the string x in the string s. The function returns and integer denoting the first occurrence of the string x in s (0 based indexing). Example 1: Input: s = GeeksForGeeks, x = Fr Output: -...
ALGO
0.999904
5.515292
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2020-06-05T12:48: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": "c7af38602...
a5a722c0-93d1-4cd0-94c1-00d985f2d921
mgsium/miniAeroSeq
StencilLimiter.h
#include <algorithm> #include <cstdio> #include "Faces.h" #include "MathToolsDevice.h" #include "VenkatLimiter.h" #include "ViewTypes.h" #ifndef STENCILLIMITER_H_ #define STENCILLIMITER_H_ #define STENCIL_MAX(a, b) \ ({ \ __typeof__(a) _a = (a); \ __typeof__(b) _b = (b); \ _a >...
ALGO
0.999373
5.840069
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-08-17T19:27:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5f120d811c...
3b1687ba-1f73-4972-aa5a-c9b654f2c464
pearldarkk/C-Cplusplus
zcode/DSA05017.cpp
DSA07023 #include<algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace ...
ALGO
0.999891
3.752689
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-10-08T08:45: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": "ade0c5a9be36...
a668a86b-5938-40b8-9248-9030085b94dc
tege3000/geeksforgeeks-algorithmic-challenges
Data-Structures/Strings/Basics/2- pangram-checking/isPangram.cpp
/* * Topic: * Pangram Checking * * Description: * Given a string check if it is Pangram or not. * A pangram is a sentence containing every letter * in the English Alphabet. * * Examples : The quick brown fox jumps over the lazy * dog ” is a Pangram [Contains all the characters from ‘a’ to ‘z’] * * “The quic...
ALGO
0.996369
5.183393
{ "github_metadata": { "branch": "master", "commit_count": 368, "repo_created_at": "2020-07-18T16:09: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": "fa7ba058...
7aa1ee5f-1da4-4ba9-b9c0-0f61645ddcc2
Adi-11797/Advanced-Engineering-Computation-24-783
ps5/bintreelib/bintree.h
#include <stdio.h> #include <cstddef> #include <cmath> template <class KeyClass,class ValueClass> class BinaryTree { protected: class Node { public: KeyClass key; ValueClass value; Node *left,*right,*up; int height; Node() : left(nullptr),right(nullptr),up(nullptr),height(1) { } }; public: /// <aut...
ALGO
0.999807
4.33079
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-04-01T13:51: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": "474934877c8b...
5d800486-cafa-40e6-9cf8-f8f2aa3ec512
Rohde-Schwarz/botan
src/lib/block/serpent/serpent_fn.h
/* * (C) 1999-2007,2013 <NAME> * * Botan is released under the Simplified BSD License (see license.txt) */ #ifndef BOTAN_SERPENT_FUNCS_H_ #define BOTAN_SERPENT_FUNCS_H_ #include <botan/compiler.h> #include <botan/types.h> #include <botan/internal/rotate.h> namespace Botan::Serpent_F { template <size_t S> BOTAN_FORC...
ALGO
0.990152
7.701632
{ "github_metadata": { "branch": "master", "commit_count": 17496, "repo_created_at": "2016-02-29T19:22:51.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "randombit/botan", "stars": 34, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_...
4b5ec2c3-5432-433b-a177-49ca11bace74
lekanlanihun/MyIcub
chromosomemdoubledouble.h
#ifndef ChromosomeMDoubleDouble_H #define ChromosomeMDoubleDouble_H #include "General.h" #include "chromosome.h" #include "population.h" class ChromosomeMDoubleDouble : public smoga::Chromosome<double, double> { protected: double m_crowdingDistance; ///> Crowding distance (to meas...
ALGO
0.999844
5.149148
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-08-14T09:51: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": "ebf9cb4b71...