uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
6a079e95-7b1b-4bff-963f-adfb4b3e8e18
BG-YU/algorithm
Programmers/연습문제/Programmers_LV1_문자열 다루기 기본.cpp
/* https://programmers.co.kr/learn/courses/30/lessons/12918 [문제 설명] 문자열 s의 길이가 4 혹은 6이고, 숫자로만 구성돼있는지 확인해주는 함수, solution을 완성하세요. 예를 들어 s가 a234이면 False를 리턴하고 1234라면 True를 리턴하면 됩니다. [제한 사항] s는 길이 1 이상, 길이 8 이하인 문자열입니다. [입출력 예] s return a234 false 1234 true */ #include <string> #include <vector> using namespace s...
ALGO
0.949103
5.655785
cc2a52d6-e3be-4609-839e-f7435fca583b
Hi-Hd/striver_dsa
Basic_Recursion/string_palindrome.cpp
#include<iostream> #include<string> using namespace std; bool palindrome(int i, string arr, int n){ if(i >= n/2) return true; if(arr[i] != arr[n-i-1]) return false; return palindrome(i+1, arr, n); } int main(){ string s = "123454321"; cout<<palindrome(0,s,s.size()); return 0; }
ALGO
0.999643
4.912094
9f5f9cbe-66ef-42aa-b87f-564408131634
xin10000/rtabmapProject
rtabmap-tango/corelib/src/GeodeticCoords.cpp
/* * The methods in this file were modified from the originals of the MRPT toolkit (see notice below): * https://github.com/MRPT/mrpt/blob/master/libs/topography/src/conversions.cpp */ #include "rtabmap/core/GeodeticCoords.h" #include <cmath> #ifndef M_PI #define M_PI 3.14159265358979323846 #endif namespace...
TOOL
0.981152
7.072814
027a9e08-c98d-4c02-b7b7-bff5b9babd3a
alielbanna/responsive_implementation
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.99887
6.783439
63640119-3400-41f3-855f-439f704bb6b6
xperblueray/C-Primer-Plus
addpntrs/addpntrs.cpp
// addpntrs.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> int main() { using namespace std; double wages[3] = {10000.0, 20000.0, 30000.0}; short stacks[3] = {3, 2, 1}; short tell[10]; cout << "The tell is " << tell << endl; cout << "The address of tell is ...
TOOL
0.927574
3.863349
bf45a626-5ecc-4b7a-984d-f7cf0f460b90
GANGESHOTTEOK/gukbbap
SORT/1181/LEE/1181.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> #define FOR(i, n) for (int i = 0; i < n; i++) using namespace std; bool compare(string & str1, string & str2) { if (str1.length() == str2.length()) return str1.compare(str2) < 0; return str1.length() < str2.length(); } bool checkDupl...
ALGO
0.999881
4.816939
96ba184a-2e7d-45a5-906c-b44de278f15f
rcpsilva/DesignAndAnalysisofAlgorithms
Sorting.cpp
#include <vector> #include <algorithm> #include <concepts> #include <compare> #include <set> #include <functional> #include <stack> #include <list> #include <iterator> template<typename T> concept can_compare = requires(T a, T b) { a < b; }; template <typename T> void selection_sort(std::vector<T>& v) requires can_co...
ALGO
0.999486
6.088216
fda73a07-d4f3-4224-b330-a975ee5d530c
SWEG-2014-EC-Batch/Code-Elite
FoP-II/Kirubel Wondwoson/(1)Function Worksheet/Q15scale.cpp
#include<iostream> using namespace std; int sum(int n){ if(n==0){ return 0; } else{ return(n + sum(n-1)); } } int main(){ int num; cin>>num; cout<<sum(num); }
ALGO
0.999914
4.286165
7f259431-68d0-49c9-9e65-b9ac7d61b05b
Dayof/integrate-c-python
test-boost/boost_1_60_0/libs/graph_parallel/test/distributed_queue_test.cpp
// Authors: Douglas Gregor // Andrew Lumsdaine #include <boost/graph/use_mpi.hpp> #include <boost/config.hpp> #include <boost/throw_exception.hpp> #include <boost/graph/distributed/queue.hpp> #include <boost/test/minimal.hpp> #include <boost/graph/distributed/mpi_process_group.hpp> #include <boost/pending/qu...
TEST
0.934585
5.441686
4097ad6a-1848-4d18-aef1-8bca1d40c8d7
wb08/Coursework
kursach/selectors/raschifr_file.cpp
#include <iostream> #include <fstream> #include <string> #include <map> #include <algorithm> using namespace std; int main() { int lower; int jw=0; int elem_v_massive1=0; int iw=0; float Q=0,W=0,E=0,R=0,T=0,Y=0,U=0,I=0,O=0,P=0; float A=0, S=0,D=0,F=0,G=0,H=0,J=0,K=0,L=0; float Z=0,X=0,C=0,V=0,B=0,N=0,M=0...
TOOL
0.923383
3.103206
f816c00e-668b-421d-be6c-7fece2cc5fbf
DuyTaDinh/Code.ptit.TaDuy
DSA C++/DSA08012.cpp
#include <bits/stdc++.h> using namespace std; #define FILL(a,x) memset(a, x, sizeof(a)) #define CLEAR(arr,rag) for(int i=0; i<= rag; i++) arr[i].clear(); #define SPEED ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define MULTIPLE_TEST int tes; cin>>tes; while(tes--) #define FOR(x,iFi,iLa) for(int x...
ALGO
0.999801
4.536383
3f780589-a453-4147-ad75-95759ddb5a0d
CRAVA/crava
rplib/distributionsdryrockmix.cpp
#include "rplib/distributionsdryrockmix.h" #include "rplib/distributionssolid.h" #include "rplib/dryrockmix.h" #include "rplib/distributionwithtrend.h" #include "rplib/demmodelling.h" #include <cassert> #include "src/definitions.h" #include "nrlib/random/distribution.hpp" //This file contains two classes Distribu...
ALGO
0.886432
6.44673
3cd0dd61-1850-4c4a-84d4-4e092d649014
Chikzz2001/LC-solution-chikzz
1413-minimum-value-to-get-positive-step-by-step-sum/1413-minimum-value-to-get-positive-step-by-step-sum.cpp
class Solution { public: int minStartValue(vector<int>& nums) { int res=1,sum=0; for(auto &x:nums) { sum+=x; if(sum<=0) res=max(res,-sum+1); } return res; } }; /* -3 -1 -4 */
ALGO
0.99995
5.502292
05a82bb2-9f48-422a-a39c-d732088050d2
alzmqp00/leet
665. Non-decreasing Array.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: bool checkPossibility(vector<int> &nums) { bool chance = 1; for (int i = 1; i < nums.size(); i++) { if (nums[i - 1] > nums[i] && chance == 1) { // 後面變大 if ((i + 1 < nums.size() ...
ALGO
0.999996
5.036062
d8389fa8-b94f-4b7b-8faf-63e5681e785b
raincross7/code-similarity
codes/train_code/problem382/problem382_83.cpp
#include <iostream> #include <iomanip> #include <utility> #include <cmath> #include <random> #include <vector> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <string> #include <algorithm> #include"atcoder/all" using namespace std; #define rep(i,n) for(int i = 0; i<n; ++i) #de...
ALGO
0.999792
4.86589
36e23bfe-0ffe-4ec4-b62f-9eb6686ae750
kungs8/OpenCVAlgorithmRefinement
OpenCV算法精解-代码/第9章:几何形状的检测和拟合/9.1/minEnclosingTriangle.cpp
#include<opencv2/core/core.hpp> #include<opencv2/imgproc/imgproc.hpp> using namespace cv; #include<iostream> using namespace std; int main(int argc, char*argv[]) { //㼯 //vector<Point2f> points; //points.push_back(Point2f(1, 1)); //points.push_back(Point2f(5, 1)); //points.push_back(Point2f(1, 10)); //points.pu...
ALGO
0.990146
3.175732
e94c9663-69a6-4153-b873-84a8c2c78dea
he-guanzhong/LeetCode
Code2/04-BT_combinationSum.cpp
#include "head.h" /* 39. 组合总和 给你一个 无重复元素 的整数数组 candidates 和一个目标整数 target ,找出 candidates 中可以使数字和为目标数 target 的 所有 不同组合,并以列表形式返回。你可以按 任意顺序 返回这些组合。 candidates 中的 同一个 数字可以 无限制重复被选取。如果至少一个数字的被选数量不同,则两种组合是不同的。 示例 1: 输入:candidates = [2,3,6,7], target = 7 输出:[[2,2,3],[7]] 解释: 2 和 3 可以形成一组候选,2 + 2 + 3 = 7 。注意 2 可以使用多次。...
ALGO
0.999811
5.7582
16263d31-8b52-4848-97dd-9365950708f8
solenegranjeon/TPS2n1
Complex.cpp
// =========================================================================== // Includes // =========================================================================== #include "Complex.h" // =========================================================================== // ...
ALGO
0.950607
4.451868
f7bf1556-7032-4163-bd81-46bf563c010b
CnZoom/XcSoarPull
src/Terrain/ScanLine.cpp
#include "Terrain/RasterTileCache.hpp" #include "Terrain/RasterLocation.hpp" #include <stdlib.h> struct GridLocation : public RasterLocation { unsigned short tile_x, tile_y; unsigned remainder_x, remainder_y; unsigned index; GridLocation(const RasterLocation &other, unsigned tile_width, unsign...
ALGO
0.987944
7.002976
2241d497-248d-4b42-aaa6-edecad5e4e68
coding-minutes/dsa-essentials-solutions-cpp
DSA Essentials Solutions/Recursion/FriendsParty.cpp
//Expected Time Complexity: O(2^n) #include <iostream> using namespace std; int help(int n) { if (n <= 0) return 0; if(n == 2 || n == 1) return n; return help(n - 1) + (n - 1) * help(n - 2); } int friendsPairing(int n){ return help(n); }
ALGO
0.999957
4.992131
9a6515f4-ed16-4e2b-982e-42b650d602fe
AdminAbhi/MyCodeLib
CodeForces/Educational/round_102/2.cpp
//============================================================================= // @abhi_admin linkedin.com/in/adminabhi Email: <EMAIL> //============================================================================= #include <bits/stdc++.h> using namespace std; typedef long long LL; typedef vector<int> VI; typ...
ALGO
0.99996
5.141786
2c9bbc86-ec18-4b4c-979a-7ebd2ce1b12e
kushuu/competitive_programming_all
leetCode/sqrtx/Accepted/8-15-2021, 6_10_07 PM/Solution.cpp
// https://leetcode.com/problems/sqrtx class Solution { public: int mySqrt(int x) { long long int i; for(i = 0; i*i <= x; i++); return i-1; } };
ALGO
0.999986
5.511548
e3f813f1-f26d-41c1-8b91-4f7968313a35
Hitesh-s0lanki/DSA
array/MaximumSubarray.cpp
#include <iostream> #include <vector> #include <climits> using namespace std; int maxSubArray(vector<int>& nums) { int n = nums.size(); int mini = INT_MIN; int sum = 0; for( int i = 0; i < n; i++ ) { int temp = nums[i] + sum; mini = max(mini, temp); sum = max(0, temp); ...
ALGO
0.999686
5.32561
c2f23693-bf0e-4671-bc0f-076195478ebc
sahilsingh2002/LeetCode-DSA
907-koko-eating-bananas/koko-eating-bananas.cpp
typedef long long ll; class Solution { public: int minEatingSpeed(vector<int>& piles, int h) { int maxm = 0; for(int i:piles){ maxm = max(maxm,i); } ll l = 1,r=maxm; while(l<=r){ ll hours = 0; ll mid = l+(r-l)/2; for(int i:piles){ hours+...
ALGO
0.999961
5.75857
1c588526-545b-46fa-91a9-ecc889e91f67
UM-ARM-Lab/data-augmentation-for-manipulation
link_bot_planning/src/floating_rope_ompl.cpp
#include <ompl/base/SpaceInformation.h> #include <ompl/base/spaces/SE3StateSpace.h> #include <ompl/base/samplers/ObstacleBasedValidStateSampler.h> #include <ompl/geometric/SimpleSetup.h> #include <ompl/config.h> #include <iostream> #include <thread> #include <link_bot_planning/floating_rope_ompl.h> namespace ob = om...
ALGO
0.976763
6.977852
4eb5318d-1cd9-4638-851e-b55d07567ec7
damianob/xcsoar
src/Engine/Route/RouteLink.cpp
#include "RouteLink.hpp" #include "RoutePolar.hpp" #include "GlideSolvers/GlideState.hpp" #include "GlideSolvers/GlideResult.hpp" #include "GlideSolvers/MacCready.hpp" #include "Geo/SpeedVector.hpp" #include "Geo/Flat/TaskProjection.hpp" #include "Math/FastMath.h" #include <assert.h> #include <limits.h> gcc_const sta...
TOOL
0.984814
6.681492
fb44af97-edf9-4e5f-bae0-2ed21598b4ec
rociomelara7/LabosFunda
corto 4 programacion/25alumnos.cpp
#include <iostream> #include <conio.h> using namespace std; void alturaalumno(int n, float x[ ]){ int i; for (int i = 0; i < n; i++) { cout << "Ingrese la altura del alumno " << i + 1 << " : " << endl; cin >> x[i]; } } float promedio(float x[ ]){ int i; float suma = 0; ...
TOOL
0.997403
3.333548
6769cd1a-6c48-451e-b8de-f6710086f59d
mustafaberat/Data-structure-all-assignments
QuickSort_Pivot_LastElement.cpp
/* Mustafa Aru - 30716006 Question No. 2 Implement Quick Sort for sorting an integer array by using the last element as pivot. Also display the results for each step in the recursive function call. */ #include <iostream> using namespace std; void printArray(int *arr , int n){ for(int i=0 ; i<n ; i++){ cout << arr[...
ALGO
0.999981
5.285981
f82ae655-07dd-4be4-9daf-dbaf9104c1ff
EthanPham03/BeginningProgrammingHomework
SearchAWord.cpp
// A program that compares words from two files #include <iostream> #include <fstream> #include <vector> #include <string> #include <sstream> bool searchWord(const std::vector<std::string>& words, const std::string& target) { for (size_t i = 0; i < words.size(); ++i) { if (words[i] == target) { ...
TOOL
0.993749
5.460887
95a6e7b0-8b2c-4712-81f6-c73d40d1f390
AbdulRahmanElHelweh/todoProject
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
f5f41334-018d-4a55-bb2e-fb4550e7824c
SashaKaripov/canonical_matrix_
eigen/doc/snippets/MatrixBase_all.cpp
Vector3f boxMin(Vector3f::Zero()), boxMax(Vector3f::Ones()); Vector3f p0 = Vector3f::Random(), p1 = Vector3f::Random().cwiseAbs(); // let's check if p0 and p1 are inside the axis aligned box defined by the corners boxMin,boxMax: cout << "Is (" << p0.transpose() << ") inside the box: " << ((boxMin.array() < p0.arra...
ALGO
0.981754
3.622676
3eae1024-1874-49b8-9c8d-c320298fac98
pkorivi/model_car
catkin_ws_user/src/mpc_control/src/Eigen-3.3/test/denseLM.cpp
#include <iostream> #include <fstream> #include <iomanip> #include "main.h" #include <Eigen/LevenbergMarquardt> using namespace std; using namespace Eigen; template<typename Scalar> struct DenseLM : DenseFunctor<Scalar> { typedef DenseFunctor<Scalar> Base; typedef typename Base::JacobianType JacobianType; typed...
TEST
0.994396
5.862647
58a51f8a-55f9-4e30-aa54-4c020292519c
jric2002/algorithms
codeforces/low_difficulty/difficulty_800/60.holiday_of_equality_[758A]/holiday_of_equality.cpp
#include <iostream> /* Author: José Rodolfo (jric2002) */ using namespace std; int main() { unsigned short int n; unsigned int a, s, max_welfare = 0, total_welfare = 0; cin >> n; for (unsigned short int i = 0; i < n; i++) { cin >> a; if (a > max_welfare) { max_welfare = a; } total_welfare ...
ALGO
0.999914
3.388485
5dc2de40-c9f8-428d-8011-48993f5872bd
Ultraschall/ultraschall-soundboard
JUCE/modules/juce_audio_utils/native/juce_android_BluetoothMidiDevicePairingDialogue.cpp
namespace juce { #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD, CALLBACK) \ STATICMETHOD (getAndroidBluetoothManager, "getAndroidBluetoothManager", "(Landroid/content/Context;)Lcom/rmsl/juce/JuceMidiSupport$BluetoothManager;") DECLARE_JNI_CLASS_WITH_MIN_SDK (AndroidJuceMidiSupport, "com/rmsl/juc...
TOOL
0.978997
7.013473
700866e8-91e9-49d9-8f8a-acfe3661d6b9
aashan007/Coding
topics/search/geeksforgeeks/smallest_second_smallest.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--){ int n,flag=0 ; int smallestFirst=INT_MAX; int secondSmallest=INT_MAX; cin>>n; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; } for(int i=0;i<n;i++){ if(smallestFirst>a[...
ALGO
0.999949
3.462297
ec727c47-b85f-452b-ad89-7d7565b8a2e8
zhengbinbin-coder/CPP
leetcode--二叉树中和为某一值的路径--leetcode--路径总和.cpp
ERROR: type should be string, got "\nhttps://leetcode-cn.com/problems/er-cha-shu-zhong-he-wei-mou-yi-zhi-de-lu-jing-lcof/submissions/\n\nhttps://leetcode-cn.com/problems/path-sum-ii/\n/**\n * Definition for a binary tree node.\n * struct TreeNode {\n * int val;\n * TreeNode *left;\n * TreeNode *right;\n * TreeNode(int x) : val(x), left(NULL), right(NULL) {}\n * };\n */\nclass Solution {\npublic:\n void pathSumDFS(TreeNode* root, int sum,vector<vector<int>>& result,vector<int>& v)\n {\n // 若某条路径已经走到空,return\n if(root==nullptr) return;\n\n v.push_back(root->val); // 添加节点值到待选结果中\n sum-=root->val; // 将给定值减去所添加的节点值\n\n // 若节点已经走到叶子,并且给定值已经减到0,说明此路径符合要求,将此待选结果添加到结果集中\n if(root->left==nullptr && root->right==nullptr && sum==0)\n {\n result.push_back(v);\n }\n\n // 深度优先遍历\n pathSumDFS(root->left,sum,result,v);\n pathSumDFS(root->right,sum,result,v);\n\n // 回退一步,继续遍历下一条路径\n v.pop_back();\n }\n\n vector<vector<int>> pathSum(TreeNode* root, int sum) {\n // 回溯法\n vector<vector<int>> result; // 定义结果集\n vector<int> v; // 定义待选结果\n pathSumDFS(root,sum,result,v);\n return result;\n }\n};"
ALGO
0.999957
5.970173
fd1cb86b-64d6-4959-8921-82569988a89b
Ashwani7766/CipherSchoolsCompetitiveCoding
Practice Sheet 9/Min jumps to reach end.cpp
#include <bits/stdc++.h> using namespace std; // Function to return the minimum number // of jumps to reach arr[h] from arr[l] int minJumps(int arr[], int n) { // Base case: when source and // destination are same if (n == 1) return 0; // Traverse through all the points // reachable fr...
ALGO
0.999977
5.038876
3686c779-3a24-496f-8580-1d13899ce29c
KarlsruheLongestPaths/KaLP
extern/tbb2019_20181203oss/examples/parallel_for/tachyon/src/intersect.cpp
/* * intersect.cpp - This file contains code for CSG and intersection routines. */ #include "machine.h" #include "types.h" #include "intersect.h" #include "light.h" #include "util.h" #include "global.h" unsigned int new_objectid(void) { return numobjects++; /* global used to generate unique object ID's */ } uns...
TOOL
0.98437
5.815677
1b7f8671-865d-4171-9373-60693aee25b7
harrypotter0/SPOJ
CRDS.cpp
#include<stdio.h> int main() { int t; scanf("%d",&t); while(t--) { long long tri,cards,level; scanf("%lld",&level); tri = (level*(level+1))/2; cards=(tri*3)-level; cards=cards%1000007; printf("%lld\n",cards); } return 0; }
ALGO
0.999661
3.38768
aab427fc-bab9-4ff6-81a8-1ea55dc83b79
Xilinx/Vitis-Tutorials
AI_Engine_Development/AIE/Design_Tutorials/18-MUSIC-Algorithm/aie/qrd/qrd_qr.cpp
#include "qrd_qr.h" // for kk = 1 : C // R(kk,kk) = norm(Q(:,kk)) // Q(:,kk) = Q(:,kk) * (1.0/R(kk,kk)) // for ii = kk+1 : C // R(kk,ii) = transpose(conj(Q(:,kk))) * Q(:,ii) // Q(:,ii) = Q(:,ii) - R(kk,ii) * Q(:,kk) // end // end template<unsigned COL_NORM, unsigned COL_QR, unsigned IN_TOTAL, ...
ALGO
0.999396
3.508186
f293bd5b-c49b-4d13-93ab-875eb2ecc729
wolfvoid/HNU-resourses
学类核心-程序设计(84)/程序设计-教材源码/book7/ch7_12.cpp
//--------------------- // ch7_12.cpp //--------------------- #include<iostream> #include<iomanip> using namespace std; //--------------------- int a[3][4]={{ 5, 7, 8, 2}, {-2, 4, 1, 1}, { 1, 2, 3, 4}}; int b[4][5]={{4,-2, 3, 3, 9}, {4, 3, 8,-1, 2}, {2, 3, 5, 2, 7}...
ALGO
0.994933
3.239788
5ac035c1-6f0d-4282-8dbf-633062eed86a
flowerinheart/acm
tmp/tmp.cpp
#include <bits/stdc++.h> using namespace std; int N, M; int m[601][601]; bool visited[601][601]; int t1[4] = {0 , 1, 0, -1}; int t2[4] = {1, 0, -1, 0}; int ax, ay, bx, by; int res = 0; void dfs(int i, int j, int height) { if (i < 0 || j < 0 || i >= N || j >= M || visited[i][j] || !(m[i][j] > height)) ...
ALGO
0.999808
4.951263
0ac35798-e6a1-4751-9c5d-1ae0bb8b14d1
Tire-3-Wale/DSA
Character Array/Check_Palendrome.cpp
#include <iostream> using namespace std; char ToLowercase(char ch) { if (ch >= 'a' && ch <= 'z') { return ch; } else { char temp; temp = ch - 'A' + 'a'; return temp; } } bool CheckPalindrome(char arr[], int n) { int start = 0; int end = n - 1; while...
ALGO
0.999922
4.38993
4b89e05b-87d7-47d5-8ac3-28347f4718c9
k8440009/Algorithm
SWEA/5658_1.cpp
// 5658 [모의 SW 역량테스트] 보물상자 비밀번호 #include <iostream> #include <string> #include <vector> #include <cmath> #include <algorithm> using namespace std; const int MAX = 28; int N, K; int board[MAX]; vector<long long> numbers; void rotate() { int temp = board[N - 1]; for (int i = N - 1; i - 1 >= 0; i--) { ...
ALGO
0.999868
5.009012
e84a2a07-9e2a-45d0-81b1-2a2c58b3ea23
AaronShaneen/CS
C++/HW5P2/HW5P2/HW5P2.cpp
/* Aaron Shaneen Homework 5 Problem 2 Deletes a substring from a user input string */ #include<iostream> #include<string> using namespace std; void eraseSubstring(string& input, string substr); int main() { string someStr; cout << "Enter a string: " << endl; cin >> someStr; // inputs user's string into some...
ALGO
0.976804
5.587153
bc593838-e498-4e8d-9b2c-ee4cc8dc93ac
raincross7/code-similarity
codes/train_code/problem416/problem416_186.cpp
#include <iostream> #include <array> #include <algorithm> #include <vector> #include <bitset> #include <set> #include <unordered_set> #include <cmath> #include <complex> #include <deque> #include <iterator> #include <numeric> #include <map> #include <unordered_map> #include <queue> #include <stack> #include <string> #i...
ALGO
0.999853
3.521793
41d4b14e-175a-4efc-bb39-6a6e01e9bba1
APSIS-ANALYSIS/PERIGEE
examples/ale_ns_rotate/src/PTime_NS_Solver.cpp
#include "PTime_NS_Solver.hpp" void PTime_NS_Solver::print_info() const { SYS_T::commPrint("----------------------------------------------------------- \n"); SYS_T::commPrint("Time stepping solver setted up:\n"); SYS_T::commPrint(" final time: %e \n", final_time); SYS_T::commPrint(" solution record frequency...
ALGO
0.998556
5.606071
0f7f202b-8a7b-435e-8db1-b760f6d8d305
goldflower/nctu_TOC17
proj1/Fib2584Ai.cpp
#include "Fib2584Ai.h" #include "Fib2584/GameBoard.h" #include "Fib2584/MoveDirection.h" #include "Fib2584/Statistic.h" #include <algorithm> #include <functional> #include <vector> #include <ctime> #include <cstdlib> #include <string> const vector<int> fib = {0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 9...
ALGO
0.98922
4.350306
66e2675c-3e38-43ff-81c2-689cadae478b
Jonathan-Jay/Math-Learning-Modules
Angry Birds/Angry Birds/include/Box2D/Collision/b2DynamicTree.cpp
#include "Box2D/Collision/b2DynamicTree.h" #include <string.h> b2DynamicTree::b2DynamicTree() { m_root = b2_nullNode; m_nodeCapacity = 16; m_nodeCount = 0; m_nodes = (b2TreeNode*)b2Alloc(m_nodeCapacity * sizeof(b2TreeNode)); memset(m_nodes, 0, m_nodeCapacity * sizeof(b2TreeNode)); // Build a linked list for th...
ALGO
0.995744
7.793611
c79aff67-a4fb-468b-bfa4-657283039849
WYK15/swift-Ollvm12
llvm/lib/Analysis/DDG.cpp
using namespace llvm; static cl::opt<bool> SimplifyDDG( "ddg-simplify", cl::init(true), cl::Hidden, cl::ZeroOrMore, cl::desc( "Simplify DDG by merging nodes that have less interesting edges.")); static cl::opt<bool> CreatePiBlocks("ddg-pi-blocks", cl::init(true), cl::Hidden, cl::ZeroOrMore, ...
ALGO
0.928859
7.845782
09f8c537-5ca7-4255-8844-970054301b47
azpeteryang/leetcode
Two_Pointers/259.3Sum-Smaller/259. 3Sum Smaller.cpp
class Solution { public: int threeSumSmaller(vector<int>& nums, int target) { int count=0; sort(nums.begin(),nums.end()); for (int a=0; a<nums.size(); a++) { int sum=target-nums[a]; int left=a+1; int right=nums.size()-1; ...
ALGO
0.999994
6.217546
cc3894e0-6684-4de1-bc7f-8dd20359107f
shreyamali01/dsa
2. Patterns/q22.cpp
#include <bits/stdc++.h> using namespace std; void printMatrix(int a, int n, vector<vector<int> > &arr, int og){ if (a == 1){ arr[og-1][og-1] = 1; return; } for (int i=(og-n); i<=(og+n-2); i++){ for (int j=(og-n); j<=(og+n-2); j++){ if (i==(og-n) || j==(og-n) || i==(og+n...
ALGO
0.999923
3.01756
624ed148-315a-4675-aea6-6322d2b4d69b
cddchen/algorithm
数学/组合数学学习/h-最后一个非0数字.cpp
#include <cstdio> #include <algorithm> #include <cmath> #include <cstdlib> #include <cstring> #include <vector> #include <ctype.h> using namespace std; typedef long long ll; int get_prime_factor(int n, int x) { if (!n) return 0; return n / x + get_prime_factor(n / x, x); } int g(int n, int x) { if (!n) retu...
ALGO
0.999928
3.960784
5d37d78b-fd96-4465-a0a2-4f1a52bc131d
ParasWaghela07/DSA-SUPREME-2.0
(WEEK 18) DP/ASCII_deletion.cpp
class Solution { public: int byRec(string &s1,string &s2,int i,int j){ if(i>=s1.size() && j>=s2.size()){ return 0; } if(i>=s1.size()){ int ttl=0; while(j<s2.size()){ ttl+=s2[j]; j++; } return ttl; ...
ALGO
0.99998
5.920276
c7e3bde3-5a35-4c00-9a88-876bea386868
PranitChawla/ACM-ICPC-Regionals-Codes
maximum_remaining.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ll t; cin>>t; while (t--) { ll n; char c; cin>>n;; string s; cin>>s; cin>>c; ll ans=0; ll f=0; vector <ll> v; for (ll i=0;i<n;i++) { if (s[i]==c) { v.push_back(i); } } if (v.size()==0) { ...
ALGO
0.999868
3.904886
f64d5222-3d47-49fc-a40f-dd5c18405815
Asylniet/PP1-404-G1
6practice/d.cpp
#include <iostream> #include <algorithm> using namespace std; int main() { int n; cin >> n; int a[n]; for(int i = 0; i < n; i++) { cin >> a[i]; } sort(a, a + n); reverse(a, a + n); int countMax = 0; for(int i = 0; i < n; i++) { int count = 1; for(int j = i + 1; j < n; j++) { if(a[i]...
ALGO
0.999987
3.560287
dce17ad4-7cd5-42eb-9a68-78c00d4baa86
JongHoooon/Algorithm-Study
BaekJoon/solve/1/10988/10988.cpp
#include <iostream> using namespace std; string input; int result = 1; int main(void) { cin >> input; size_t size = input.size(); for(int i = 0; i < size / 2; ++i) { if(input[i] != input[size - i - 1]) { result = 0; break; } } cout << result; return 0; }
ALGO
0.999989
3.90207
8b5269a0-bfc5-45b7-9d39-34e4a2f1b3b0
JEAYNE/Conseil-Metropolitain
src/stepOptions.cpp
#include "mainwindow.h" #include "ui_mainwindow.h" #include "editTools.h" /* Quand, dans le cadre de l’accord local, on attribue les sièges optionnels de manière 'algorithmique', par opposition à 'politique', il y a deux manières de procéder. Dans les deux cas on tient compte du rapport entre les représentativités en...
TOOL
0.932981
4.964267
bf5b6010-a9b3-4dcd-a9a7-779519ace350
debosmita212/LeetCode-Problems
363-max-sum-of-rectangle-no-larger-than-k/363-max-sum-of-rectangle-no-larger-than-k.cpp
class Solution { public: int findMax(vector<int> &arr,int k){ int n=arr.size(); int maxi=INT_MIN; int curr=0; //stores cumulative sum set<int> s; //stores pefix sum of array s.insert(0); // put 0 into set, if curr_sum == k, (curr_sum - k) will be zero for(int i=0;i<n...
ALGO
0.999975
5.940944
df2b903b-438f-4106-8dca-8ca76a0f9ccc
lucasxia01/Competitive-Programming-Problems
AtCoder/ABC 320/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define int ll typedef pair<int, int> pi; typedef pair<ll,ll> pl; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; #define F0R(i,n) for (int i = 0; i < n; i++) #define FOR(i,a,b...
ALGO
0.999981
4.156835
f7f8eb9c-93b1-49cb-8c90-4820065216d6
imaiguo/VTK.9.3.0
ThirdParty/libproj/vtklibproj/src/projections/igh_o.cpp
#define PJ_LIB__ #include <errno.h> #include <math.h> #include "proj.h" #include "proj_internal.h" PROJ_HEAD(igh_o, "Interrupted Goode Homolosine Oceanic View") "\n\tPCyl, Sph"; /* This projection is a variant of the Interrupted Goode Homolosine projection that emphasizes ocean areas. The projection is a compilatio...
ALGO
0.977997
5.033972
e67e61d5-bc4f-461a-b0ea-f972ad7c2fea
sangvirgo/algorithm
codeforce/oldd/Review/UCLN.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define MAX 1000000 const int MOD = 1e9 + 7; /* BÀI 1H: ƯỚC CHUNG LỚN NHẤT Cho dãy số A[] có N phần tử. Nhiệm vụ của bạn là hãy tìm 2 số nguyên trong dãy số sao cho UCLN của chúng là lớn nhất có thể. Input: Dòn...
ALGO
0.999888
3.786603
63553db9-3ccc-4fdd-b242-d0af293b3da7
AnuragSaxena1999/Searching-and-Sorting
selectionSort.cpp
#include<bits/stdc++.h> using namespace std; void selectionSort(int array[] , int n){ for(int i = 0 ; i<n-1 ; i++){ int min_index = i; for(int j = i+1 ; j<n; j++){ if(array[min_index]>array[j]){ min_index = j; } } swap(array[i], array[min_ind...
ALGO
0.999895
3.901137
85b1dc4d-2302-46f5-bbe1-009d339111c7
i4Ds/IRE
IREMedia/libraries/OpenCV/modules/ml/test/test_emknearestkmeans.cpp
#include "test_precomp.hpp" using namespace std; using namespace cv; static void defaultDistribs( Mat& means, vector<Mat>& covs, int type=CV_32FC1 ) { float mp0[] = {0.0f, 0.0f}, cp0[] = {0.67f, 0.0f, 0.0f, 0.67f}; float mp1[] = {5.0f, 0.0f}, cp1[] = {1.0f, 0.0f, 0.0f, 1.0f}; float mp2[] = {1.0f, 5.0f}, c...
TEST
0.87866
6.815752
dababc80-060b-45ed-b738-41de685a77cf
shajayb/Alice_Studio17
Alice/ALICE_PLATFORM/src/Eigen/doc/examples/TutorialLinAlgSetThreshold.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix2d A; A << 2, 1, 2, 0.9999999999; FullPivLU<Matrix2d> lu(A); cout << "By default, the rank of A is found to be " << lu.rank() << endl; lu.setThreshold(1e-5); cout << "With threshold 1e-5...
ALGO
0.999471
4.090376
0af09817-3dcd-40fc-9298-a2112d243b2c
M-Saad-0/flutter_projects
tailortape-app/windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.99886
6.776823
3e500c39-cf81-4dcf-b116-f6fa1b964d6f
ishandutta2007/codeforces
yasugongshang/normal/961/A.cpp
#include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #include<cmath> #include<set> #include<map> #include<queue> using namespace std; typedef long long LL; #define sqr(x) ((x)*(x)) #define mp make_pair inline char gc(){ static char buf[100000],*p1=buf,*p2=buf; return p1==p2&&(p2=(p1=buf)+fread(bu...
ALGO
0.99995
3.474439
20ad04e7-274a-4baa-989f-c56e0d215ec9
JoyFuture/algorithm_cpp
class21/Code04_CoinsWaySameValueSamePapper/Code04_CoinsWaySameValueSamePapper.cpp
#include <iostream> #include<map> #include<vector> using namespace std; int process(vector<int>&coins,vector<int>&zhangs, int index, int rest) { if (index == zhangs.size()) { return rest == 0 ? 1 : 0; } int ways = 0; for (int zhang = 0; zhang * coins[index] <= rest && zhang <= zhangs[index]; zhang++) { ways +=...
ALGO
0.999962
4.118796
6d183af1-6371-435a-8ee8-bf03286b2c8c
kopasxa/CppHomeWork
MySecodHomeWork/Progarm3/Progarm3.cpp
#include <iostream> using namespace std; int main() { setlocale(LC_ALL, "Russian"); int factorial, i = 1, result = 1; cout << "Введите факториал: "; cin >> factorial; if (factorial >= 0) { if (factorial == 0) result = 1; else { while (i <= factorial) { ...
ALGO
0.999847
4.227471
da61cbb5-ce46-41d3-a8c2-b52a709f28b7
GZhonghui/PlayGround
AtCoder/Regular_Contest_182/b.cpp
#include<algorithm> #include<cmath> #include<cstdio> // 这题可能是蒙对的 int n, k; int fill_length, fill_number; inline int set_bit(int data, int index) { data = data | (1<<(index-1)); return data; } inline int clear_bit(int data, int index) { data = set_bit(data, index); data = data - (1<<(index-1)); r...
ALGO
0.9999
3.335842
95167281-bf34-4b04-b262-282d630e3ec6
CriticalHex/PWDCrack
Source.cpp
#include<ctime> #include<iostream> #include<vector> #include<chrono> using namespace std; int main() { vector<int> asciiArray; vector<int> guess; string userIn; cout << "Enter a PIN: \n"; cin >> userIn; for (auto c : userIn) { asciiArray.push_back(int(c)); guess.push_back(32); } auto start = chrono::high_...
ALGO
0.936873
3.986809
88d7df4e-8636-4b19-927a-cde04e28d583
NafiHasan/HabiJabi
C++/Codeforces Contests/GLOBAL/Global 19/a.cpp
#include <bits/stdc++.h> using namespace std; #define fast_io() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) int main() { fast_io(); int tc; cin >> tc; while (tc--) { int n; cin >> n; vector<int> a(n), mn(n), mx(n); int mxx = 0, mnn = INT_MAX; // int mx = 0, mn = INT_MAX, lo, hi; fo...
ALGO
0.999833
4.723732
299ef9f7-96db-4b56-98fe-72b2903c0230
sczzq/symmetrical-spoon
base-usage/cplusplus/stl_priority_queue.cpp
// priority_queue::push/pop #include <iostream> #include <queue> int main() { std::priority_queue<int> mypq; mypq.push(30); mypq.push(100); mypq.push(25); mypq.push(40); std::cout << "Popping out elements..."; while(!mypq.empty()) { std::cout << ' ' << mypq.top(); mypq.pop(); } std::cout << std::endl; ...
ALGO
0.938877
4.234653
b06eea59-549e-4bcd-a883-507ba2462ac1
iamabrar14/Data-Structures-and-Algorithms
ascendingorder.cpp
#include <iostream> using namespace std; int main(){ int n,i,j,temp; int arr[100]; cout<<"How many numbers ? "<<endl; cin>>n; cout<<"Enter Numbers : "; for(i=0;i<n;i++){ cin>>arr[i]; } for(i=0;i<n;i++){ for(j=i+1;j<n;j++) if(arr[j]<arr[i]){ temp=arr[i]; ...
ALGO
0.999011
4.072742
f3272ee4-7605-446b-ae61-d955c890eb54
GaghiZor/GameDev.tv-Cpp-Course
Project2/dasher.cpp
#include "raylib.h" struct AnimData { Rectangle rectangle; Vector2 position; int frame; float updateTime; float runningTime; }; bool isOnGround(AnimData data, int windowHeight) { return (data.position.y >= windowHeight - data.rectangle.height); } AnimData updateAnimData(AnimData data, int max...
ALGO
0.970855
4.96243
5febec16-5a37-459f-a231-944c83a752ba
chaos1231107/Self_learning_Algorithm_and_Data_Sturcture
sortion/selection_sort/selection_sort2.cpp
#include <bits/stdc++.h> using namespace std; void selection_sort(int list[], int n) { int least, temp; for (int i = 0; i < n-1; i++) { least = i; for (int j = i+1; j < n; j++) { if (list[j] < list[least]) { least = j; } } ...
ALGO
0.999911
4.986392
cd105301-f523-4a9b-a9b1-05c581a925cf
3dv-casia/PanoVLM
third_party/osi_clp/CoinUtils/src/CoinRational.cpp
#include <algorithm> #include <cmath> #ifdef __clang__ #include <cstdlib> #endif #include "CoinRational.hpp" // Based on Python code from // http://www.johndcook.com/blog/2010/10/20/best-rational-approximation/ // (with permission). // // Returns closest (or almost, anyway) rational to val with denominator less // th...
ALGO
0.998511
6.170665
9caeaf45-b5e6-45b2-826b-631e944107e2
syxm1/competitive-programming
online-judge/cses/introductory-problem/apple-division.cpp
#include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> using namespace std; // using namespace __gnu_pbds; #define int long long #define ull unsigned long long #define ld long double #define pii pair<int, int> #define str string #define fi ...
ALGO
0.999949
4.290549
841af536-a8e0-4067-8b8c-90d32cbdc806
raincross7/code-similarity
codes/train_code/problem309/problem309_54.cpp
/* author : nishi5451 created: 11.08.2020 23:20:46 */ #include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) typedef long long ll; int main(){ char c; cin >> c; if(c>='a' && c<='z') cout << 'a' << endl; else if(c>='A' && c<='Z') cout << 'A' << endl; retur...
ALGO
0.964918
3.752762
a8ce795b-85ad-47b7-beeb-0cb6b1721bc6
muschellij2/FSL6.0.0
extras/include/boost/libs/graph/example/neighbor_bfs.cpp
#include <boost/config.hpp> #include <algorithm> #include <vector> #include <utility> #include <iostream> #include <boost/graph/visitors.hpp> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/graph_utility.hpp> #include <boost/graph/neighbor_bfs.hpp> #include <boost/property_map/property_map.hpp> /* ...
ALGO
0.999935
6.018683
28f65d65-fb7b-44f8-a393-388fbb87d529
prijus/Problem-Solving-Part-2
Quick_sort.cpp
//Author : PROSENJIT MONDOL #include<bits/stdc++.h> #define lower(s) transform(s.begin(), s.end(), s.begin(), ::tolower); #define upper(s) transform(s.begin(), s.end(), s.begin(), ::toupper); using namespace std; const int inf = 3e5; using ll=long long ; ll mod = 1e9 + 7; //-----------------------------------------...
ALGO
0.99999
3.765972
f4a7dfb1-e4f8-43fa-900f-4517a89264e4
Shorya-Dixit/Leetcode_Solutions
Difficulty: Medium/Top View of Binary Tree/top-view-of-binary-tree.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; // Tree Node struct Node { int data; Node* left; Node* right; }; // Utility function to create a new Tree Node Node* newNode(int val) { Node* temp = new Node; temp->data = val; temp->left = NULL; ...
ALGO
0.999741
6.939492
e0fe1271-eecb-44d8-a45b-808609acc588
XAlearnerer/LeetCode
BinarySearch/350.InsersectionOfTwoArraysII_找出交集,包括重复的数值.cpp
// // Created by zhao on 19-5-15. // #include <iostream> #include <vector> #include <unordered_map> using namespace std; class Solution { public: vector<int> intersect(vector<int>& nums1, vector<int>& nums2) { unordered_map<int,int> m; for(auto i:nums1) ++m[i]; vector<int> res; fo...
ALGO
0.999944
5.598594
00cc2f2c-9c28-4b78-a0ba-c56b653681d3
Bilkis-A-Dalia/Data_Structure
Module-18/maximum_height.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int val; Node* left; Node* right; //constructor Node(int val) { this->val=val; this->left=NULL; this->right=NULL; } }; Node* input_tree() { int val; cin>>val; Node* root; ...
ALGO
0.999707
4.399907
425ddbf7-4fb2-4772-90c9-657994922800
Tomiyou/fri_3_letnik
ps/seminarska (copy)/docker/vector-add/src/vector-add.cpp
#include <CL/sycl.hpp> #include <array> #include <iostream> #include <stdio.h> #include <stdlib.h> #define WORKGROUP_SIZE 8 #define EPSILON 0.1 // const int heightA = 9, widthA = 9, heightB = 9, widthB = 9; const int heightA = 47, widthA = 513, heightB = 513, widthB = 81; const int Asize = heightA * widthA; const int...
ALGO
0.963769
4.759604
1a5b399b-71c8-49b5-8c1d-e175462b8541
PoisWu/coding
lc/0217. Contains Duplicate/solution.cpp
#include <algorithm> #include <array> #include <bitset> #include <climits> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; using lli = long long int; template...
ALGO
0.999749
5.271629
713152a4-0f3d-4124-b551-057f5dd2c5ca
automenta/old-crittergod
src/physics/BulletDynamics/Vehicle/btRaycastVehicle.cpp
#include "LinearMath/btVector3.h" #include "btRaycastVehicle.h" #include "BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h" #include "BulletDynamics/ConstraintSolver/btJacobianEntry.h" #include "LinearMath/btQuaternion.h" #include "BulletDynamics/Dynamics/btDynamicsWorld.h" #include "btVehicleRaycaster.h" #i...
ALGO
0.865597
5.704927
bd724d28-1286-44f8-9e52-629062b40a43
sjj118/OI-Code
GCJ/2017/QR/C/code.cpp
#include<cstdio> #include<algorithm> #include<map> #define rep(i,x,y) for(int i=(x);i<=(y);++i) #define per(i,x,y) for(int i=(x);i>=(y);--i) typedef long long LL; using std::map; LL n,k; map<LL,LL> s; LL calc(LL n,const LL&mn,const bool&sm){ if(n<=0)return 0; if(s.count(n))return s[n]; LL ret=0; LL mid=(n+1)>>1; i...
ALGO
0.99989
3.828702
dacf9ed9-8614-4f5a-8cb7-8b675e9a82fc
whorahul/dream-codes
Project Euler #97: Large non-Mersenne prime.cpp
//Language: C++ //by Rahul Balamwar #include <bits/stdc++.h> #include <iomanip> using namespace std; typedef unsigned long long ULL; const unsigned __int128 MOD = 1000000000000ULL; unsigned __int128 Power(unsigned __int128 n, unsigned int e) { unsigned __int128 res = 1; while(e > 0) { if(e &...
ALGO
0.998747
4.845895
db7cd4dc-faf6-4d62-bbe3-0914586bbe38
AkashdeepGarg/DSA-and-SQL
0078-subsets/0078-subsets.cpp
class Solution { public: vector<vector<int>> subsets(vector<int>& nums) { int m = nums.size(); int n = (1<<m); vector<vector<int>>ans(n); for(int i =0; i<n; i++) { for(int j=0; j<m; j++) { if((i>>j) & 1) { ans[i].push_back(nums[j]); ...
ALGO
0.99992
6.272795
d333c835-6b4e-4cc2-bd28-638d58a1dd0e
oldground/coding
boj/cpp_boj/BRONZE/2577.cpp
// 2577. 숫자의 개수 -> 브론즈 2 #include <bits/stdc++.h> using namespace std; void func1(void) { int arr[10] = {0,}; int A, B, C; cin >> A >> B >> C; int mul = A*B*C; while (mul > 0) { arr[mul%10]++; mul /= 10; } for (int n : arr) cout << n << '\n'; } int main(void) { ios...
ALGO
0.999902
5.008465
14858056-f641-4cbe-b7b7-4cdac960a23d
omkarugale7/codeforces
contests/Codeforces Round #814 (Div. 2)/01.cpp
/* Editor: Omkar Ugale DATE - 16-Aug-2022 TIME - 20:02:42*/ #include <bits/stdc++.h> using namespace std; // typedef long long int ll; #define int long long int #define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); void PrintArr(vector<int> &arr) { for (int i = 0; i < arr.size(); i++) ...
ALGO
0.999917
5.225781
077136a1-1d95-459f-b1c4-3323fb7ce819
cgddrd/OpenCV-Lab
c++/sift_feature_matching/sift_feature_matching/main.cpp
#include <stdio.h> #include "opencv2/core/core.hpp" #include "opencv2/features2d/features2d.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/nonfree/nonfree.hpp" #include "opencv2/imgproc/imgproc.hpp" using namespace cv; static void help() { printf("\nThis program demonstrates using features2d detect...
ALGO
0.976579
5.614778
0fca1ea1-bb10-44b0-9a59-8e3d4ca990b8
camargodev/programming-challenges
uri/2404/2404.cpp
#include<iostream> #include <queue> using namespace std; using ull = int; using Node = int; struct Edge { Node from; Node to; ull cost; Edge(Node from, Node to, float cost): from(from), to(to), cost(cost) {} }; struct EdgeCompar...
ALGO
0.999917
4.144137
300f8bb2-8b18-471f-aea7-2fc2e613e9ad
MisterRooster/ogl-gui-starter
src/utility/FileSystem.cpp
#pragma once #include "FileSystem.h" #include <sys/stat.h> #include "Debug.h" // Platform defines #define NHAPP_PLATFORM_WIN32 1 #define NHAPP_PLATFORM_LINUX 2 #define NHAPP_PLATFORM_OSX 3 #if defined( __WIN32__ ) || defined( _WIN32 ) # define NHAPP_PLATFORM NHAPP_PLATFORM_WIN32 #elif defined( __APPLE_CC__) # define...
TOOL
0.850109
6.074088
94bf792c-e9ed-4ef8-bd40-d120ad590ad0
RitaRez/seg_trees
lazy_propagation/segtree.cpp
#include <bits/stdc++.h> #include "segtree.hpp" using namespace std; Segtree::Segtree(vector<int> arr) { this->arr = arr; this->n = arr.size(); this->lazy.resize(4 * n); this->segtree.resize(4 * n); } int Segtree::build(int p, int l, int r) { if (l == r) return segtree[p] = arr[l]; i...
ALGO
0.999984
5.272891
80c59ec3-8260-44f4-ad1f-921eb2cc0151
QbitQuantum/Basics
Исходники/combining_tree.cpp
int Combining_Tree::getAndIncrement(int thread_id){ std::list <Node*> nodes_stack; Node * myLeaf = this->leaf_[thread_id / 2]; Node * node = myLeaf; // determine first or second node reach to a point while(node->pre_combine()){ node = node->getParent(); // climb to the parent...
ALGO
0.999958
4.373324
0d3c095b-7101-4a56-96cc-8d96439eeb29
NikitaNikson/xray_stalker_sdk_04_fixed
xrLC/nv_algebra.cpp
#include "stdafx.h" #pragma hdrstop #ifndef nv_algebraH #include "nv_math.h" #endif #ifndef _WIN32 #define _isnan isnan #define _finite finite #endif mat3::mat3() { } mat3::mat3(const nv_scalar* array) { Memory.mem_copy(mat_array, array, sizeof(nv_scalar) * 9); } mat3::mat3(const mat3 & M) { Memory.mem_cop...
TOOL
0.958391
3.640296
c07bc901-9769-4039-8868-ab220dbbac5b
525jw/BOJ
2024_06/1202/1202.cpp
#include <iostream> #include <queue> #include <algorithm> #include <vector> using namespace std; typedef struct pair<int,int> t_mv; struct compare{ bool operator()(const t_mv &a,const t_mv &b){ if(a.second==b.second) // unnecessary? a.first>b.first; return a.second<b.second; } }; v...
ALGO
0.999974
3.568294
87fc6564-d11e-4ed6-b7be-d31bf4012904
sifatmahmud/Phitron
C++ for DSA/Module-07/sort_using_selection_sort.cpp
#include <bits/stdc++.h> using namespace std; class Student { public: string name; int roll; int marks; }; int main() { // input section int n; cin >> n; Student a[n]; for (int i = 0; i < n; i++) { cin >> a[i].name >> a[i].roll >> a[i].marks; } // Working section ...
ALGO
0.999939
4.449191