uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
02dfc6f6-5302-44aa-9211-3e407bd5006f
khubaib6970/CODSOFT
tic tac toe game.cpp
#include <iostream> using namespace std; const int BOARD_SIZE=3; // Function to draw the Tic-Tac-Toe board void drawBoard(char board[BOARD_SIZE][BOARD_SIZE]){ cout<<"-------------"<<endl; for (int i=0; i<BOARD_SIZE;++i){ cout<<"| "; for (int j=0; j<BOARD_SIZE;++j) { cout<<board[i]...
ALGO
0.998433
6.487793
206c3fa2-1d82-4621-8d64-8731d6562960
srcode03/codingquestions
Inorder Traversal - GFG/inorder-traversal.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // Tree Node struct Node { int data; Node* left; Node* right; Node(int val) { data = val; left = right = NULL; } }; // } Driver Code Ends /* A binary tree node has data, pointer to left child and a pointer to ...
ALGO
0.99991
7.011731
042724f8-db8e-4a69-87e3-19e31edba096
SteveFauci/Learn_c_again
202505/leetcode/1-linked_list/83-去重1.cpp
// clang-format off struct ListNode { int val; ListNode* next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode* next) : val(x), next(next) {} }; // 自己写的石山,思路是连接到下一个不同的,到最后还要指向nullptr class Solution1 { public: ListNode* deleteDuplica...
ALGO
0.99941
5.151961
c895da5e-ede3-4d9f-a785-10d81c075002
PolinaTur/Hometask
19.12.2018/ControlWorkTask1.cpp
#include <iostream> using namespace std; int nextSmallerThan(int); void nextSmallerThanTests(); void DigitsOfNumber(int*, int); int GetLength(int*); bool equals(int*, int*); void BubbleSort(int* array, int n); void Swap(int& x, int& y); int main() { nextSmallerThanTests(); system("pause"); return 0; } int next...
ALGO
0.999834
4.398695
cf53fe63-936c-42ef-b87c-10bc48dab0d8
elliwigy/z3q_all
android/hardware/qcom-caf/sm8250/display/sdm/libs/utils/utils.cpp
#include <unistd.h> #include <math.h> #include <utils/sys.h> #include <utils/utils.h> #include <algorithm> #define __CLASS__ "Utils" namespace sdm { float gcd(float a, float b) { if (a < b) { std::swap(a, b); } while (b != 0) { float tmp = b; b = fmodf(a, b); a = tmp; } return a; } floa...
TOOL
0.881449
5.780619
2a064fce-7bc6-4aa2-914c-062100dace98
PatchyBitz/Classwork
Fundamentals of Computer Science II/CProj/ConsoleApplication1/ZombSim1.0.cpp
//Author: Yenshae //Class: Fundamentals of computer science. //Teacher: Melissa Holmes //Description: Zombie Sim V1 - Revised 3/12/2025: Tightened up logic and sorted out edge cases such as having a single width or single length #include <iostream> #include <vector> #include <algorithm> #include <cstdlib> using namespa...
ALGO
0.997796
4.275114
fa12516a-7b86-485a-a98f-9029cbc815b6
ywy0318/test_20210224
opencv_cpp/M_形态学滤波_6.4.cpp
/* 6.4̬ѧ˲(2):㣬㣬̬ѧݶȣñ,ñ, ͺ͸ʴ̬ѧʵָ߼̬ѧ任; ߼̬ѧǽڸʴͻϵ; (Opening Operation),ʵȸʴ͵Ĺ; dst=open(src,element)=dilate(erode(src,element)) С壬ϸ㴦壬ƽϴ ߽ͬʱı :ͺʴĹ̳Ϊ(Closing Operation); dst=clese(src,element)=erode(dilate(src,element)); ܹųСͺڶ(ɫ); ̬ѧݶ(Morphological Gradient)ͼ븯ʴͼ֮, dst=morph-grad(src,element)=dilate(src,element)-erode(src,e...
ALGO
0.986603
5.276204
4c03d881-b57b-4960-afb4-206b5e76c0ca
ishandutta2007/codeforces
pt1989/normal/89/A.cpp
#include<vector> #include<stack> #include<set> #include<map> #include<queue> #include<deque> #include<bitset> #include<complex> #include<sstream> #include<fstream> #include<iostream> #include<algorithm> #include<cstring> #include<cassert> #include<cstdlib> #include<cstdio> #include<cmath> #include<climits> #define ...
ALGO
0.999896
3.618261
56551fd4-a8ed-405d-88df-b5c52615e653
cc123-xiaoix/Unilever-Acne
face detector/opencv-master/apps/interactive-calibration/rotationConverters.cpp
#include "rotationConverters.hpp" #include <cmath> #include <opencv2/calib3d.hpp> #include <opencv2/core.hpp> #define CALIB_PI 3.14159265358979323846 #define CALIB_PI_2 1.57079632679489661923 void calib::Euler(const cv::Mat& src, cv::Mat& dst, int argType) { if((src.rows == 3) && (src.cols == 3)) { ...
ALGO
0.975142
6.969026
1293032a-e7d0-427e-8333-6b67d2e110a9
QiuYeDx/PlaneWar
lianbiao.cpp
#include "lianbiao.h" #include <QDebug> #include <QDate> Player::Player(){} Player a[100]; //用于将文件数据读入动态链表中 Player* Player::createp() { Player* pHead = new Player; pHead->next = NULL; FILE* fp = fopen("F:\\Rank.txt", "a+"); fclose(fp); fp = fopen("F:\\Rank.txt", "rb"); Player* cur = pHead; w...
TOOL
0.972352
3.042155
ccfdf9cd-83d4-4c6f-9f05-02aa8c4e63c6
PixelExperience-EXCLUSIVE-edition/android_frameworks_av
media/module/codecs/amrnb/dec/src/d_gain_c.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/d_gain_c.c Functions: d_gain_c Date: 01/29/2002 ------------------------------------------------------------------------------ REVISION HISTORY Description: Updated include files and intput/out...
ALGO
0.998294
6.079532
edb4d9fe-da03-4001-9772-e775d6cbc249
banisoradrian/BAC
Teste Antrenament 2021/TA2021T5.cpp
#include <iostream> #include <iomanip> #include <fstream> using namespace std; unsigned int identice(long int n) { unsigned int c , aux = 1; while(n > 9) { c = n % 10; if(c != n / 10 % 10) { aux = 0; break; } n = n / 10; } return aux; }...
ALGO
0.999902
4.248033
7a0301f1-3c2c-4021-bd42-7cf5735371ab
sidsaurav/DSA-Notes
Trie/01. Trie Implementation.cpp
#include <bits/stdc++.h> using namespace std; class Node{ public: // We can add more member variables as per our need. For example see below question - // https://www.codingninjas.com/codestudio/test-series/amazon-online-test-series/offering/2409857/problem/14688 Node* links[26]; int pre; int end;...
ALGO
0.999803
4.411191
672c6288-ea8c-40d2-92cb-d8d142b9c2c3
alibaba/sionnx
llvm/lib/Transforms/Utils/LowerSwitch.cpp
#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/CFG.h" #include "llvm/IR/Constants.h" #include "llvm/IR/Function.h" #include "llvm/IR/InstrTypes.h" #include "llvm/IR/Instructions.h" #incl...
TOOL
0.99253
6.434106
7798f218-4a9b-4bd1-a26e-42e89f17355c
betteryjs/LC
1109/main.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; // 差分数组工具类 class Difference { // 差分数组 private: vector<int> diff; /* 输入一个初始数组,区间操作将在这个数组上进行 */ public: Difference(const vector<int> & nums) { diff.resize(nums.size()); // 根据初始数组构造差分数组 diff[0] = nums[0]; ...
ALGO
0.999737
5.659736
4374625d-f785-4c3c-b75f-91fd5b7854e3
gitlarky/PoreDy
include/Eigen/doc/examples/nullary_indexing.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; // [functor] template<class ArgType, class RowIndexType, class ColIndexType> class indexing_functor { const ArgType &m_arg; const RowIndexType &m_rowIndices; const ColIndexType &m_colIndices; public: typedef Matrix<typename ArgType::Scalar, ...
ALGO
0.991819
7.050192
5bd4b456-6865-40c0-97c7-9931973c86b1
Outrajas/DAA-LAB
week6q3.cpp
#include <iostream> #include <vector> using namespace std; void heapify(vector<int>& heap, int i, int size) { int largest = i; int left = 2 * i + 1; int right = 2 * i + 2; if (left < size && heap[left] > heap[largest]) largest = left; if (right < size && heap[right] > heap[largest]) largest = rig...
ALGO
0.999671
5.785778
aec59f18-5714-46ad-af12-11706f1aeb78
q4a/source-engine-2017
game/server/tf/bot/behavior/sniper/tf_bot_sniper_lurk.cpp
#include "cbase.h" #include "tf_player.h" #ifdef TF_RAID_MODE #include "raid/tf_raid_logic.h" #endif // TF_RAID_MODE #include "bot/tf_bot.h" #include "bot/behavior/sniper/tf_bot_sniper_lurk.h" #include "bot/behavior/sniper/tf_bot_sniper_attack.h" #include "bot/behavior/tf_bot_retreat_to_cover.h" #include "bot/behavio...
ALGO
0.995416
3.906279
8fde772c-177c-4b0d-8b2a-c7caa63945ff
KrissiKodar/tolvusjon_HR
samples/cpp/tutorial_code/ImgTrans/Laplace_Demo.cpp
/** * @file Laplace_Demo.cpp * @brief Sample code showing how to detect edges using the Laplace operator * @author OpenCV team */ #include "opencv2/imgproc.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" using namespace cv; /** * @function main */ int main( int argc, char** argv ) { //...
ALGO
0.873605
6.413229
11e578df-b674-4db1-bf44-12b43f89cdd4
GitHub-AmanBhardwaj/LeetCode-Problems
278-first-bad-version/first-bad-version.cpp
// The API isBadVersion is defined for you. // bool isBadVersion(int version); class Solution { public: int firstBadVersion(int n) { int i=1; for(i;i<=n;i++){ if(isBadVersion(i)){ break; } } return i; } };
ALGO
0.999645
6.479523
4d1c8837-1d38-495d-918f-aeec9c0fb2de
dushyant-goel/leetcode
46.Permutations.cpp
class Solution { public: vector<vector<int>> permute(vector<int> &nums) { vector<vector<int>> result; permute(result, nums, 0); return result; } private: void permute(vector<vector<int>> &result, vector<int> nums, int pos) { if (pos == nums.size()) { ...
ALGO
0.99999
6.483876
96423a7e-d3ff-4660-a177-63fa12112fd8
BoldWinds/tcFFT
test/tcfft_test.cpp
#include "../tcfft.h" #include "test.h" tcfftHandle plan; void* in_device, *result_device; /** * @brief 位逆序 * * @param N 长度 * @param rev 存储位逆序后的索引数组 * @param radices 基数数组 * @param n_radices 基数数量 */ void gen_rev(int N, int rev[], int radices[], int n_radices) { int *tmp_0 = (int *)malloc(size...
ALGO
0.996866
4.645989
f23ca03c-efe8-4414-8e98-bcda24543d18
ishandutta2007/codeforces
benq/normal/965/D.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> pi; typedef pair<ll,ll> pl; typedef pair<ld,ld> pd; typedef vector<in...
ALGO
0.999994
3.351114
42813738-3de5-463c-b0f6-0f3b63af1afc
xiaqq/SDCND
Term2/CarND-MPC-Project-P10/src/Eigen-3.3/doc/examples/class_CwiseBinaryOp.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; // define a custom template binary functor template<typename Scalar> struct MakeComplexOp { EIGEN_EMPTY_STRUCT_CTOR(MakeComplexOp) typedef complex<Scalar> result_type; complex<Scalar> operator()(const Scalar& a, const Scalar& b...
ALGO
0.899426
6.700232
7a5352d0-c4b2-4bf7-8dfb-8f77c6598d1c
HITS-MCM/gromacs-ramd
src/gromacs/nbnxm/freeenergydispatch.cpp
#include "gmxpre.h" #include "freeenergydispatch.h" #include "gromacs/gmxlib/nonbonded/nb_free_energy.h" #include "gromacs/gmxlib/nonbonded/nonbonded.h" #include "gromacs/gmxlib/nrnb.h" #include "gromacs/math/vectypes.h" #include "gromacs/mdlib/enerdata_utils.h" #include "gromacs/mdlib/force.h" #include "gromacs/mdli...
ALGO
0.998823
6.60889
779778e2-2dff-41ff-8d49-999f9378c907
roshnimishraa/Leetcoding
111-minimum-depth-of-binary-tree/minimum-depth-of-binary-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999973
6.240209
eecad4b2-b89e-4f3f-ac7d-e0df70186829
TianleJin/competitive-programming
CSES/maths/binomial_coefficients.cpp
#include <iostream> #include <string> #include <array> #include <vector> #include <algorithm> #include <sstream> #include <queue> #include <deque> #include <bitset> #include <iterator> #include <list> #include <stack> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <functional> ...
ALGO
0.999915
4.630124
a815a7d3-05bf-4be0-ad68-67fc08ee2619
surajmate007/700_Topicwise_DSA_Solved_Problems
01_Arrays/Extra_11_The_Special_Trick.cpp
// Here we have to find minimum seperate intervals in which all intervals can be included. static bool comp(pair<int, int>& a, pair<int, int>& b){ return a.first < b.first; } int Solution::solve(vector<int> &start, vector<int> &end) { int n = start.size(); vector<pair<int, int>> vec; for(int i=0; i<n;...
ALGO
0.999961
5.338364
29082a45-a9a9-4704-b276-ae44f895a6b6
SungHwanYun/Coding-Test-in-One-Volume-with-Python-book-
4-1-3.cpp
#include<bits/stdc++.h> using namespace std; int in_range(int loc[2]) { return 0 <= loc[0] && loc[0] <= 4 && 0 <= loc[1] && loc[1] <= 4; } int get_apple(int A[5][5], int aloc[2], int iloc[2], int jloc[2], int kloc[2]) { int apple_num = 0; if (!in_range(iloc) || !in_range(jloc)) return 0; if (A[iloc[0]][...
ALGO
0.999964
4.643311
2e5b5cfa-b6bd-48f6-97dc-6da92bd83ea7
rile1036/acmicpc_algorithm
7562.cpp
#include<iostream> #include<queue> #include<vector> #include<stdio.h> #include<stdlib.h> #include<string> #include<string.h> #include<math.h> #include<map> #include<algorithm> using namespace std; int testcase; int length; int dx[8] = {-1, -2, 1, 2, -1, -2, 1, 2}; int dy[8] = { 2, 1, 2, 1, -2, -1, -2, -1 }; int start...
ALGO
0.999739
4.067578
04e0556d-1cd5-45e2-b9ab-78e045a11cbd
urashima0429/keipro_practice
arihon/prev/2_4Set.cpp
#include <iostream> #include <set> using namespace std; // 順序付集合 // 重複可能なものはmultiset int main(){ set<int> s; // add s.insert(1); s.insert(3); s.insert(5); // search1 set<int>::iterator ite; ite = s.find(1); if (ite == s.end()) puts("not found"); // search2 if (s.count...
TOOL
0.886908
3.96088
6e39edb6-741f-41d6-aca1-98d450396a70
walwald/TIL-Today-I-Learned
C++algorithm/0.basic/func/cpy.cpp
#include <bits/stdc++.h> using namespace std; int main(){ /* - 얕은 복사: 메모리 주소값을 복사한 것이라 복사한 배열을 수정하면 원본 배열이 수정되는 방법 - 깊은 복사: 새로운 메모리 공간을 확보해 복사하여, 복사한 배열을 수정하면 원본 배열은 수정되지 않는 복사 방법 <깊은 복사 방법> memcpy(), copy() */ //memcpy(): Array끼리 복사, 어떤 변수의 메모리에 있는 값들을 다른 변수의 "특정 메모리값"으로 복사 //void * memcpy(void * ...
ALGO
0.963745
3.417515
c7fcfe82-5ac8-4f0c-8a4e-87f77e4bc698
2745518585/code
CF852B.cpp
#include<cstdio> #include<algorithm> using namespace std; typedef long long ll; const ll P=1e9+7; const int N=1000001,M=121; int n,m,p,b2[N]; struct matrix { int m,n; ll a[M][M]; friend matrix operator *(matrix a,matrix b) { matrix c; c.m=a.m,c.n=b.n; for(int i=1;i<=c.n;++i) ...
ALGO
0.99995
3.330892
76bf5655-7d8c-4c51-a533-d40b7d105cbf
EvetProject/EvetCoin
src/script/ismine.cpp
#include "ismine.h" #include "key.h" #include "keystore.h" #include "script/script.h" #include "script/sign.h" #include "script/standard.h" #include "util.h" typedef std::vector<unsigned char> valtype; unsigned int HaveKeys(const std::vector<valtype>& pubkeys, const CKeyStore& keystore) { unsigned int nResult = ...
ALGO
0.978604
5.759744
2ea99610-f8ae-4726-ad24-d91d634fcd7f
atul2oct/Cpp
7 Lecture 3 Recursion & Backtracking/3subsequencesString.cpp
// subsequences of a string // i/p "abc" // o/p _,a,b,c,ab,ac,bc,abc #include<iostream> #include<string.h> #include<vector> using namespace std; void printSubSequences(string str,string output,int i){ // base case if(i >= str.length()){ cout<<output<<endl; return; } // recursion // 1...
ALGO
0.998042
4.797679
0b76ced7-236b-47bf-9228-7d85061ee648
baptiste-genest/NESOTS
src/yamabeflow.cpp
#include "yamabeflow.h" void YamabeFlow::init() { mesh.geometry->requireEdgeLengths(); for (auto e : mesh.topology->edges()) original_length[e] = mesh.geometry->edgeLength(e); //u = Vec::Zero(mesh.topology->nVertices()); u = Vec::Zero(mesh.topology->nVertices()); updateEdgeLength(); for...
ALGO
0.999469
5.732789
fa371b86-4ec8-4423-8a6f-0478a9a9ea4f
limyunkai19/competitive-programming-codes
UVa Online Judge Problem/10038 - Jolly Jumpers.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <cmath> #include <algorithm> #include <string> using namespace std; int main() { int n, sequence[3010], diff; bool used[3010], isjolly; while(cin >> n){ memset(used, false, sizeof used); isjolly = true; ...
ALGO
0.999884
3.655798
fc87ba17-1210-4344-9939-fa112aca7d6c
Umair-progs/CP
MagicalSticks.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; //LCM FUNCTION long long gcd(long long int a, long long int b) { if (b == 0) return a; return gcd(b, a % b); } // Function to return LCM of two numbers long long lcm(long long int a,long long int b) { return (a / gcd(a, b)) * b; } void s...
ALGO
0.999756
4.758748
6b1dcf75-ef32-4952-a900-d928298f33e2
zhangxinqian/ZhangXinqian-s-Projects
StockStrategyApp-2014Wind公司实习/StockStrategyApp/StockStrategy.cpp
#include "stdafx.h" #include "StockStrategy.h" StockStrategy::StockStrategy() { } StockStrategy::~StockStrategy() { } int StockStrategy::dbMax(double* dbArr, int length) { int index = 0; for (int i = 1; i < length; i++) { if (dbArr[index] < dbArr[i]) { index = i; } } return index; } int StockStrateg...
ALGO
0.978567
3.834762
5fef64f7-888a-449c-b5db-a2c81ba72d4c
eshohag/leetcode
solution/0700-0799/0714.Best Time to Buy and Sell Stock with Transaction Fee/Solution3.cpp
class Solution { public: int maxProfit(vector<int>& prices, int fee) { int f0 = 0, f1 = -prices[0]; for (int i = 1; i < prices.size(); ++i) { int g0 = max(f0, f1 + prices[i] - fee); f1 = max(f1, f0 - prices[i]); f0 = g0; } return f0; } };
ALGO
0.999917
5.668972
1974e55a-4071-43b1-8767-f4e0c8b7f848
fishy15/competitive_programming
online/cf/606/rectangle.cpp
#include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <array> #include <algorithm> #include <utility> #include <map> #include <queue> #include <set> #include <cmath> #define ll long long #define eps 1e-8 #define MOD 1000000007 #define INF 0x3f3f3f3f #define INFLL 0x3f3f3f3f3f3f3f3f // ...
ALGO
0.999987
3.739156
e223099c-899f-4780-9adc-c18280889ab4
deepak-ky/cpp-codes
cpp-codes/hashtable_insertion.cpp
#include<iostream> #include<bits/stdc++.h> #include<cstring> #include "hashtable2.h" using namespace std; #define int long long #define varname(name) #name #define mod 1000000007 #define wer(x) cout<<"\n"<<varname(x)<<" here : "<<x #...
ALGO
0.972449
3.629866
5278b681-f124-4b2f-8130-2e8b5e51c50f
ishandutta2007/codeforces
alishahali1382/normal/1200/B.cpp
#include <bits/stdc++.h> #pragma GCC optimize ("O2") #pragma GCC optimize ("unroll-loops") using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef pair<pii, int> piii; typedef pair<ll, ll> pll; #define debug(x) cerr<<#x<<'='<<(x)<<endl; #define debugp(x) cerr<<#x<<"= {"<<...
ALGO
0.999908
4.049266
e05c0b6d-bebe-4256-a7cc-3d65f8948840
sahil078/Hacktoberfest2024_jh
cpp/TempCelToFah.cpp
// Write a program to convert temprature in Celcius to Fahrenheit #include<iostream> using namespace std; int main(){ double cel , feh ; cout<<"Enter the Temprature in Celcius : "<<endl; cin>>cel; feh = ((cel*9/5)+32); cout<<"the temprature in Fahrenheit is : "<< feh <<endl; return 0; }
TOOL
0.934187
3.134376
83cbf88b-d540-41d2-85ba-f608d1b2670f
tonyshenkk/leetcode
editDistance.cpp
//#include <string> //#include <iostream> // //using namespace std; // //int minDistance(string word1, string word2) { // // Start typing your C/C++ solution below // // DO NOT write int main() function // int len1 = word1.length(), len2 = word2.length(); // if (len1 < 1) // return len2; // if (len2 < 1) // return le...
ALGO
0.999978
4.300756
db616ead-5c1d-4fed-8936-e2038a016301
ldurieux/cpp08
ex01/span.cpp
#include "span.h" Span::Span(unsigned int N) : _size(N), _currIdx(0), _data(new int[N]) { for (size_t i = 0; i < _size; i++) _data[i] = 0; } Span::Span(const Span& other) : _size(other._size), _currIdx(other._currIdx), _data(new int[other._size]) { for (size_t i = 0; i < _size; i++) _data[i] = other._data...
ALGO
0.991463
5.338432
853c521a-fc7e-44d0-81ac-e6ff96df38fd
KartavyaKothari/dsa-cpp-docstrange
dp/mcm.cpp
#include<bits/stdc++.h> using namespace std; int mcm(vector<vector<int>> &dp, vector<int> &dim , int i, int j){ if(i==j) return dp[i][j] = 0; if(dp[i][j] == -1){ dp[i][j] = INT_MAX; for(int k = i ; k < j ; k++){ dp[i][j] = min( dp[i][j], mcm(dp,dim,i...
ALGO
0.999818
4.060925
07ef9456-5be4-4df0-a88f-4cda6f85311f
Nikita12112002/Placement_Preparation_Module
Dynamic_Programming/Count_no_of_subset/Recursive.cpp
int dfs(vector<int>&num , int tar , int i) { if(i==0) { if(tar==0 && num[0]==0) return 2; if(tar==0 || tar==num[0]) return 1; return 0; } int notpick = dfs(num,tar,i-1); int pick =0; if(num[i]<=tar) pick = dfs(num ,tar-num[i],i-1); retu...
ALGO
0.999982
4.852349
491b204f-3204-4abe-9ef2-628cc589a877
YousufAzadSami/Codes-From-Bachelor
CodesC/cse lab codes/queue.cpp
#include<stdio.h> #include<conio.h> #define SIZE 100 int a [SIZE] ,i; int push(int k) { if (k==SIZE) printf("Queue overflow"); else{ i=k; scanf("%d",&a[i]); k++; } return k; } int pop(int j,int k) { i=j; if(i<k) { printf ("%d",a[i]); j++; ...
ALGO
0.995054
3.489814
baa769e7-3a61-413a-ae43-b942e6334b7b
rasputtim/SGF
Source/math/SGF_Ode.cpp
#include "math/SGF_Odife.h" #include "math/SGF_Vector.h" #include "math/SGF_Matriz.h" #include "math/SGF_Angles.h" #include "util/SGF_StringUtils.h" //#pragma hdrstop namespace SGF{ //=============================================================== // // CODifEq_Euler // //=============================================...
ALGO
0.999912
6.441063
aa089200-1951-4a84-a2b9-f264982c64ea
ylyking/UnrealEngineNiv
Engine/Source/Runtime/AnimGraphRuntime/Private/RBF/RBFSolver.cpp
#include "RBFSolver.h" #include "EngineLogs.h" FQuat FRBFEntry::AsQuat(int32 Index) const { FQuat Result = FQuat::Identity; const int32 BaseIndex = Index * 3; if (Values.Num() >= BaseIndex + 3) { FRotator Rot; Rot.Roll = Values[BaseIndex + 0]; Rot.Pitch = Values[BaseIndex + 1]; Rot.Yaw = Values[BaseInde...
ALGO
0.999695
7.654576
06e6bb58-af8f-402d-befe-a9963ede5384
pratyush6717/Leetcode-problems
23-merge-k-sorted-lists/23-merge-k-sorted-lists.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: void insertAtEnd(List...
ALGO
0.999929
5.751537
4592d239-428e-44f3-9583-ce51f08a431d
floresloyd/Undergraduate_CUNY_Queens
CSCI_381_Computer_Vision/project0/programmingGuide/cpp_main.cpp
#include <iostream> #include <fstream> #include <string> #include <cstdlib> // for atoi #include <climits> // For INT_MAX using namespace std; // INSTANTIATING A CLASS + CONSTRUCTOR && DECONSTRUCTOR class distanceSkeleton { public: // Declare Instance Variables int numRows; int numCols;...
DATA
0.858783
4.969082
4abb59eb-3461-4d43-88a9-e592675475a5
Ryotaro25/leetcode_first60
FindKPairswithSmallestSums/priority_queue_step3.cpp
class Solution { public: vector<vector<int>> kSmallestPairs(vector<int>& nums1, vector<int>& nums2, int k) { if (nums1.empty() || nums2.empty()) { return {}; } priority_queue<SumAndPair> sums_and_pairs; for (int i = 0; i < nums1.size(); i++) { for (int j = 0; j < nums2.size(); j++) { ...
ALGO
0.999994
6.3503
8eab2472-3f81-4e5c-b1bf-5fd356ff43d6
Gideon-Sigilai/dailynotes
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.998859
6.785645
74f15c3e-0409-4abe-8561-8782d5f1d4bd
Himanshutiwari15/Delhi-University-Bsc-CS-Honours
Data Structures/C/Graph/Representation/dfs_and_bfs.cpp
#include<iostream> #include<vector> #include<queue> using namespace std; int connected_component=0; void DFS(int beg,int max_capacity,vector<int>adj[],vector<int>&vis_dfs) { //visited beg node if existed if(beg>max_capacity) { cout<<"Invalid"; return ; } //visited beg node vis_dfs[beg]=1; cout<<beg<<endl; f...
ALGO
0.999584
4.491424
73c5c4fd-164c-4b60-a738-6c179bf9bd87
zkbreeze/kvs_kun
Source/Core/Visualization/Mapper/Streamline.cpp
/*****************************************************************************/ /** * @file Streamline.cpp * @author Yukio Yasuhra, Naohisa Sakamoto */ /*****************************************************************************/ #include "Streamline.h" #include <kvs/Type> #include <kvs/IgnoreUnusedVariable> ...
ALGO
0.935748
4.230838
7d635249-8e27-4aef-bdfe-952b5c192fc4
shranjal02/Cpp
Array4.cpp
// C++ program to Count Inversions // in an array #include <bits/stdc++.h> using namespace std; int getInvCount(int arr[], int n) { int inv_count = 0; for (int i = 0; i < n - 1; i++) for (int j = i + 1; j < n; j++) if (arr[i] > arr[j]) inv_count++; return inv_count; } // Driver Code int main() { int arr...
ALGO
0.999909
5.812869
ecc4fccd-7c65-487a-be8f-661565958294
priyanshuid/practice-codes
7th semester practice/BFS_DFS.cpp
#include <iostream> #include <math.h> #include <queue> #include <stack> #include <stdio.h> #include <vector> #include <memory.h> #include <bitset> using namespace std; int level[10000]; int parent[10000]; char color[10000]; int DFS_Parent[10000]; int finish_time[10000]; int start_time[10000]; void BFS(vector <int> gra...
ALGO
0.999765
3.774971
7bb98d72-21e9-48fd-9e0d-4af1e8e4750e
cliatyw/UE4
Engine/Source/ThirdParty/IntelTBB/IntelTBB-2019u8/src/perf/cpq_pdes.cpp
#include <cstdlib> #include <cmath> #include <queue> #include "tbb/tbb_stddef.h" #include "tbb/spin_mutex.h" #include "tbb/task_scheduler_init.h" #include "tbb/parallel_for.h" #include "tbb/tick_count.h" #include "tbb/blocked_range.h" #include "../test/harness.h" #include "tbb/concurrent_priority_queue.h" #pragma warn...
TEST
0.93843
5.48024
64e9e0c6-d96a-483a-8172-3d64b751754c
MinaProtocol/snark-challenge
reference-07-groth16-prover/depends/libfqfft/depends/ate-pairing/src/zm.cpp
#include "zm.h" #include <cstdio> using namespace mie; #ifdef MIE_USE_X64ASM #define XBYAK_NO_OP_NAMES #include "xbyak/xbyak.h" using namespace Xbyak; #endif /** out[] = x[] + y[] @note the sizeof out >= n @return size of x[] + y[] */ static inline bool in_addN(Unit *out, const Unit *x, const Unit *y, size_t n) {...
ALGO
0.994552
5.789005
a86f67a2-d0b9-4211-ba53-808b49131595
SanikaInamdar/SE_Sem3
OOP_lab/Assignment8.cpp
/* Write a function template for selection sort that inputs, sorts and outputs an integer array and a float array.*/ #include<iostream> #define size 100 using namespace std; bool go=true; int n; char c; template<class T> void selection_sort (T Arr[]) { T num; for(int i = 0; i < n-1; i++) //Outer for loop to ...
ALGO
0.997118
4.440224
b3140c4b-c379-4522-898e-1ceda59500e1
TensorCodeGen/tensor-codegen
clang-tools-extra/clangd/PathMapping.cpp
namespace clang { namespace clangd { llvm::Optional<std::string> doPathMapping(llvm::StringRef S, PathMapping::Direction Dir, const PathMappings &Mappings) { // Return early to optimize for the common case, wherein S is not a file URI...
TOOL
0.984034
7.77194
3d0a4111-6a6f-41c1-8dcf-acc79421e072
BibekRawal5/TOC
toc/TOC-source-codes-main/DFA.cpp
#include<iostream> using namespace std; int main(void){ int i; int TransactionTable[3][2] = { {2, 1}, {2, 1}, {2, 1} }; int StartingState, AcceptingState, State,x; StartingState = 0; AcceptingState = 2; State = StartingState; string w = "0111111110"; i = 0; cout<<"Ini...
ALGO
0.999988
4.480803
70942e17-fe3a-4440-a7ac-b068ed899821
Yaoye1120/Autoware
localization/yabloc/yabloc_common/src/ll2_decomposer/ll2_decomposer_core.cpp
#include "yabloc_common/ll2_decomposer/ll2_decomposer.hpp" #include <lanelet2_extension/utility/message_conversion.hpp> #include <yabloc_common/color.hpp> #include <yabloc_common/pub_sub.hpp> #include <geometry_msgs/msg/polygon.hpp> #include <pcl_conversions/pcl_conversions.h> namespace yabloc::ll2_decomposer { Ll2...
TOOL
0.875444
6.199534
c4602f5a-e2d4-4f63-bbe7-38ea98b73f89
s0umyajeet/Competitive-Programming
Codeforces/TestingRound2B.cpp
#include <bits/stdc++.h> #define int long long #define coutans cout << "ans: " //debug #define endl "\n" using namespace std; void printSpaces(int n) { for (int i = 0; i < n; i++) { cout << " "; } } int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); int t = 1; // cin >> t; while (t--) { string s; ...
ALGO
0.997013
3.757098
4b4d927e-04c4-4924-a5cc-1b685834a8e4
amirphl/learning
algorithms/geeks-for-geeks/dynamic-programming/longest-zig-zag-subsequence.cpp
// https://www.geeksforgeeks.org/longest-zig-zag-subsequence/ //{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: // time: O(n), memory: O(1) int ZigZagMaxLength(vector<int>& arr) { int n = arr.size(); int inc_val = arr[0], inc_len...
ALGO
0.999423
5.577201
8c9926d3-2379-4957-9b28-1c345b88a4a2
Nambomle192/BaiTapTuan11-12
Bai2.cpp
#include<iostream> using namespace std; class Complex { int real, imag; public: Complex(int r = 0, int i = 0) : real(r), imag(i) {} Complex operator+(const Complex& b) const { Complex z(real + b.real, imag + b.imag); return z; } Complex operator-(const Complex& b) const { return Complex(real - b.real, imag -...
ALGO
0.992417
4.393045
b09e5988-96ab-4ba9-b674-4bc7c332abd4
varnitkumar4/cpp_code
Array/SumOfTriplateEqualToGvenValue.cpp
#include<bits/stdc++.h> using namespace std; int main () { int n; cout<<"Enter the size of an array: "<<endl; cin>>n; int arr[n]; cout<<"enter array element "<<endl; for (int i=0; i<n; i++) { cin>>arr[i]; } int x; cout<<"enter value of x"<<endl; cin>>x...
ALGO
0.999786
4.425787
15963b97-a160-471a-9282-473172d7b2b2
FraLotito/palestradialgoritmi
2018-2020/intermedio/intro-day4/soluzioni/dijkstra.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; constexpr ll LLINF = 1e18 + 1; struct Edge{ int v; ll weight; }; // arco struct PQ{ ll d; int v; }; // costo e destinazione bool operator>(const PQ &l, const PQ &r){ return l.d > r.d; } //https://it.wikipedia.org/wiki/Algoritmo_di_Dijkstra ll dijk...
ALGO
0.999784
4.46697
0a88a7ed-f3e2-455a-880b-2506b9ceb956
Prashant-flick/codechef-contest
115/A_PLUS_B_Remastered.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main() { // your code goes here int t; cin >> t; while(t--){ int n; cin >> n; vector<int> arr(n); vector<int> brr(n); for (int i = 0; i < n; i++) { cin >> arr[i]; } so...
ALGO
0.99992
3.643981
e96c913a-1d59-4150-ad63-623c476b42c0
ankitsinghpal/Pattern-Programs
04.cpp
#include <iostream> using namespace std; int main() { /* INPUT : 5 OUTPUT : 1 121 12321 1234321 123454321 12345654321 */ int n; cin>>n; for(int i=1;i<=n;i++) { for(int j=n;j>=i;j--) cout<<" "; ...
ALGO
0.999986
3.997881
babeb73e-336b-4a50-9db5-3732e5714c8f
comradecoastal/cpp_programming_practice
homework/hw2/task1.cpp
#include <algorithm> #include <array> #include <chrono> #include <deque> #include <forward_list> #include <iostream> #include <list> #include <random> #include <vector> using namespace std::chrono; int random_int() { // random int generator auto current_timestamp = std::chrono::steady_clock::now().time_since_...
TEST
0.932904
6.17664
520894af-4d09-4285-bf94-4ca799c927ab
nabil989/Graphics-raytracer
src/SceneObjects/Box.cpp
#include <cmath> #include <assert.h> #include <algorithm> #include "Box.h" using namespace std; const double HUGE_DOUBLE = 1e100; bool Box::intersectLocal(ray& r, isect& i) const { glm::dvec3 p = r.getPosition(); glm::dvec3 d = r.getDirection(); // d.normalize(); int it; doub...
ALGO
0.992235
4.347885
c5d25a67-88fe-4465-a3ab-d5d0f5d8688e
Top-Ranger/android-reversi
src/player/AssemblyAIPlayer/cornercore.cpp
#include "cornercore.h" #include "assemblyaihelper.h" #include "../../core/commons.h" using ReversiCommons::opponent; CornerCore::CornerCore() { } bool CornerCore::retirement(Gameboard board, int player) { // Do not retrire if you can get a corner if(board.play(0,0,player,true)) { return false;...
ALGO
0.997879
5.986509
61ff993e-8746-4ae1-807f-3c1b16330e31
moldenha/NeuroTensor
nt/tda/cpu/MatrixReduction.cpp
#include "../../functional/functional.h" #include "../../linalg/linalg.h" #include "../../mp/Threading.h" #include "../../mp/simde_traits.h" #include "../../sparse/SparseMatrix.h" #include <cstdlib> // For aligned memory allocation #include <cstring> // For memcpy #include <iostream> #include <map> #include <Eigen/Dens...
ALGO
0.997859
5.600415
b3d84ba1-5a3e-4f2d-aa38-1a9c116a8b59
AgentPengin/PhucCNH
CP-Code/VNOJ/NKPALIN.cpp
#include<bits/stdc++.h> #define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(); #define fi first #define se second #define ll long long #define EL "\n"; #define time cerr << "\nTime elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n " #define db(x) do { std::cerr << #x << ": " << x << EL;} while (0) co...
ALGO
0.999994
3.453555
4d105885-cca8-4b6c-b964-1745d0b295d6
mkscac/ITMO_Algorithms_1semester
laboratory 4/3_C.cpp
#include <iostream> #include <vector> using namespace std; struct Node { long long ZP = 0; long long poslednTimeWork = 0; }; void siftUp(vector<Node> &mas, int i) { while(mas[i].ZP < mas[(i - 1) / 2].ZP) { swap(mas[i], mas[(i-1)/2]); i = (i-1)/2; } } void siftDown(vector<Node> &mas, i...
ALGO
0.999681
3.365992
e278ab39-12e8-4b47-b40f-226a426d3914
cyb3rb34s7/Leetcode-prog
First and last occurrences of X - GFG/first-and-last-occurrences-of-x.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: vector<int> firstAndLast(vector<int> &arr, int n, int x) { int first = -1; int last = -1 ; int start = 0 , end = n-1 ; while(start<=end){ int mid = start...
ALGO
0.999958
5.856661
3348c405-4b8c-4157-b1e3-e5e0e8b0084a
PhuocVinhLee/online_system_exam_quiz_programming
online_exam_system_backend/temp/tp5lpy37.cpp
#include <stdio.h> int main() { int number1, number2, sum; // printf("Enter two integers: "); scanf("%d %d", &number1, &number2); // calculate the sum sum = number1 + number1; printf("%d",sum); return 0; }
TOOL
0.990542
3.534392
e49dba29-248d-4110-bed2-45641a6b12d5
ishandutta2007/codeforces
6aren/normal/1075/A.cpp
#include <bits/stdc++.h> using namespace std; int main() { long long n,x,y; cin >> n >> x >>y; long long a= max(x-1,y-1); long long b= max(n-x,n-y); if (a<=b) cout << "White"; else cout << "Black"; }
ALGO
0.999483
3.774639
5dd2ca52-c42f-4f62-af72-e9e27fbe17f2
Salonishrma/Leetcode
Open the Lock/code.cpp
class Solution { public: int openLock(vector<string>& deadends, string target) { unordered_set<string>d1(deadends.begin(),deadends.end()); if(d1.count("0000")){ return -1; } if(target == "0000"){ return 0; } int ans =0; queue<string>q{{...
ALGO
0.999878
6.366498
1db1bb01-9160-4483-8d1b-1d79b4e82480
SysCall97/My-Codeforces-solutions
A. Stickers and Toys.cpp
/*************************************************************** * Name: KAZI NUR ALAM MASHRY * * School: MAWLANA BHASHANI SCIENCE & TECHNOLOGY UNIVERSITY * * CSE (14TH BATCH) * ***********************************************************...
ALGO
0.999863
3.450234
817ab5ae-0858-47c4-9ea0-7bfe72e8abc3
karinairini/Fundamental_Algorithms
Tabele_de_dispersie.cpp
#include <stdio.h> #include <stdlib.h> #include "Profiler.h" Profiler pro("Tabele de dispersie"); typedef struct { int id; char name[30]; }Entry; Entry createEntry(int id, char* name) { Entry entry ; entry.id = id; strcpy(entry.name, name); return entry; } void createHashTable(Entry* hash_table, int size_ta...
ALGO
0.998509
4.543402
18588e2e-cd75-4699-a2e9-073d17b22eb4
AbrarFahad2003/Abrar_algoritmadesaindananalisis
semester 2/pertemuan 1/tugas/tugas smstr2 pertemuan1 insertion sort.cpp
#include <iostream> using namespace std; int main() { int y; cout << "Masukkan banyak array: "; cin >> y; int x[y]; // Input elemen array for (int i = 0; i < y; i++) { cout << "Masukkan angka ke-" << i << " : "; cin >> x[i]; cout << endl; } // Insertio...
ALGO
0.999932
5.462304
ff6cec9f-1c77-4e59-a108-0e15c1885c0a
olga1840/DataContainers
BinaryTree/Source.cpp
#include<iostream> using namespace std; using std::cin; using std::cout; using std::endl; #define DEBUG class Tree {protected: class Element { int Data; Element* pLeft; Element* pRight; public: Element(int Data, Element* pLeft=nullptr, Element* pRight=nullptr) :Data(Data), pLeft(pLeft), pRight(pRight) ...
ALGO
0.99648
4.293638
171ed59a-f7c8-4f4c-909a-d9ca953ec065
0xh4di/kraken
Utilities/Bidirectional.cpp
#include "Bidirectional.h" #include <stdio.h> #include <iostream> #include <list> #include <assert.h> Bidirectional::Bidirectional() : mPrintCand(true) { } void Bidirectional::FillBack(uint64_t final) { uint64_t lfsr1 = final & 0x7ffff; uint64_t lfsr2 = (final>>19) & 0x3fffff; uint64_t lfsr3 = (final...
ALGO
0.999761
4.962298
34113abf-9b24-4b99-b079-8fe572e94503
Alaxe/noi2-ranking
2018/solutions/B/DAC-Plovdiv/lines.cpp
#include <iostream> #include <map> #include <utility> using namespace std; #define MAXN 1024 map<pair<double, double>, int> m; int x[MAXN]={}, y[MAXN]={}, v[MAXN]={}; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); int n, i, j; cin>>n; int maxn=-1; for(i=0; i<n; i++){ cin>>x[...
ALGO
0.999874
4.376883
d3635c5c-a4f1-4efd-8c35-5006975afb99
jeannetoh99/cp
kattis/addemup.cpp
#include <bits/stdc++.h> #define ll long long #define ii pair<int, int> #define iii tuple<int, int, int> using namespace std; unordered_map<int, int> flip = { {1, 1}, {2, 2}, {5, 5}, {6, 9}, {9, 6}, {8, 8}, {0, 0} }; int flipped(int num) { string s = to_string(num); reverse(s.begin(), s.end()); for (i...
ALGO
0.999952
4.248537
c97f1f3c-d532-4a8c-8e86-06e984f1a19e
mehedihasan8226/Algorithm-Course
wekk_4/module_12/dijkstra_algorithom.cpp
/* -create a distance array "d". -initialise all value by infinite. -d[src] = 1; -create a visited array and mark all node as "Unvisited". -for i=0 and n-1 -fick the unvisited array with minimum d[node]. -visited[node] = 1. for adj_node of node: if d[node]+c(node,adj_node) = d[adj_node]. ...
ALGO
0.999986
4.957249
c2cadc73-669e-45dc-8ed5-fd74fd1ab9dc
Sue217/PracticeCodeFolder
CodeForces/r774_div2/C.cpp
/** * author: subobo * created: 05.03.2022 21:26:28 **/ #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<int> a(n); for (long long ans = 1;; ans *= 2) { } bitset<56> can; for () return 0; }
ALGO
0.999621
3.57353
ff68709b-1b03-4fe5-a8b8-6688c96b36eb
projectchrono/chrono
src/chrono/fea/ChMaterialShellKirchhoff.cpp
#include <cmath> #include "chrono/fea/ChMaterialShellKirchhoff.h" namespace chrono { namespace fea { void ChElasticityKirchhoff::ComputeStiffnessMatrix(ChMatrixRef mC, const ChVector3d& eps, const ChVector3d& kur, ...
ALGO
0.964536
7.297186
030bc613-9a99-46ac-aa44-b69717a49eb7
yooshnn/PS
codeforces/661/Boats Competition.cpp
#include <iostream> #include <algorithm> #include <map> using namespace std; bool u[51]; int w[51]; int T, N; map<int, int> M; int mx, mxid, res; int main() { cin.tie(NULL); cout.tie(NULL); ios::sync_with_stdio(0); cin >> T; while (T--) { M.clear(); mx = 0; mxid = 0; res ...
ALGO
0.999849
4.316447
1704fd1c-c822-492f-934a-60803679c660
proRamLOGO/Competitive_Programming
DEC19B/BINXOR_PARTIAL.cpp
#include <bits/stdc++.h> #define llui long long unsigned int #define lui long unsigned int #define M 1000000007 #define MAX 10000 using namespace std ; lui inv_fact[MAX + 1]; lui inv[MAX + 1]; lui fact[MAX + 1]; void prepare_inv() { inv[0] = inv[1] = 1; for (int i = 2; i <= MAX; i++) inv[i] ...
ALGO
0.999949
5.864724
212e2241-de6c-4a61-91e2-d06dbd14ef67
derivada/cpprac
aceptaelreto/adaucm2020local/692.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 ll long long // 64 bits #define ld long double // 80 bits #define PI 3.1415926535897932384626433832795l typedef vector<int> vi; typedef pair<int, int> pi; typed...
ALGO
0.99739
3.966763
4b3aa90f-44c9-40b4-aea2-3e0601b2b698
yqtaowhu/DataStructureAndAlgorithm
programming/linked_list/203.移除链表元素.cpp
/* * @lc app=leetcode.cn id=203 lang=cpp * * [203] 移除链表元素 */ // @lc code=start /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ /** * Definition for singly-linked list. * struct ListNode { * int val...
ALGO
0.999959
6.456926
937e2a87-56d5-4d69-b2f5-d13e408e239e
moinulhossainmahim/cpp
function/ncr.cpp
#include<iostream> using namespace std; int factorial(int n) { int fact = 1; for(int i=2; i<=n; i++) { fact *= i; } return fact; } int main() { int n,r,res; cin>>n>>r; res = factorial(n)/(factorial(n-r) * factorial(r)); cout<<res<<endl; return 0; }
ALGO
0.99983
4.415729
f6fc2476-6110-4468-9dae-ae0cec0ce6cc
k-santo/dvc-comsc110
myBillionsModded.cpp
//Objective: To find how many weeks it takes to be a billionaire, millionaire, and thousandaire if an allowance is doubled each week (with user input) //Name: Kristofer Santo 1768976 //Course: COMSC-110-8076 //Compiler: TDM MinGW //Editor: MS NotePad //libraries #include <iostream> using namespace std; //Programmer d...
ALGO
0.992333
3.35935
07b9b7bb-9cf4-4a45-ad41-139eecec652c
iamnagasatya/LeetCode
145. Binary Tree Postorder Traversal.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.99997
6.101567
3cb5692d-a63b-499b-8394-7a6867063948
yebinhi/LeetcodePractice
maximum-depth-of-binary-tree/Compile Error/6-28-2016, 3:33:12 PM/Solution.cpp
// https://leetcode.com/problems/maximum-depth-of-binary-tree /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int maxDepth(TreeNode* root) { ...
ALGO
0.999786
6.392443