uuid
stringlengths
36
36
repo_name
stringlengths
5
123
relative_path
stringlengths
5
4k
content
stringlengths
33
2.85M
category
stringclasses
6 values
algo_rel_score
float64
0.85
1
quality_score
float64
3
8.76
4484c176-4a80-477c-847b-1d947f973218
ProjectInfinity-X/frameworks_native
cmds/dumpsys/dumpsys.cpp
#include <algorithm> #include <chrono> #include <iomanip> #include <thread> #include <android-base/file.h> #include <android-base/stringprintf.h> #include <android-base/strings.h> #include <android-base/unique_fd.h> #include <binder/BpBinder.h> #include <binder/Parcel.h> #include <binder/ProcessState.h> #include <bind...
TOOL
0.976789
7.211349
d9020d2f-2df3-4885-87cd-c440511e00f3
AneeshAhuja31/DSA_Concepts
Recursion/FasterPowerRecursion.cpp
#include<iostream> using namespace std; int power(int m,int n){ if(n==0) return 1; if (n%2==0) return power(m*m,n/2); else return m*power(m*m,(n-1)/2); } int main(){ int x = power(2,9); cout<<x; return 0; }
ALGO
0.999978
4.985787
08363614-c4f4-4d70-ad9d-4dc214257e0d
moana16/BOJ
백트래킹/N과_M_2.cpp
#include<bits/stdc++.h> using namespace std; int N,M; void sol(int cur, vector<int> nums) { if(nums.size() == M) { for(auto n : nums) cout<<n<<" "; cout<<'\n'; return; } for(int i=cur+1; i<=N; i++) { nums.push_back(i); sol(i, nums); nums.pop_back(); } } ...
ALGO
0.999918
4.683072
6ff786af-b5b1-4571-be8f-fd71102cefc9
yousuff22/Cpp-Ques
First Month/maxScore.cpp
#include<iostream> #include<vector> using namespace std; int maxScore(vector<int>& arr, int k) { int n = sizeof(arr); int l = 0; int r = k-1; int sum = 0; int maxscoree = 0; // for(int i = l; i<=r; i++) { // sum = sum + arr[i]; // maxscoree = max(sum, maxscoree); // } wh...
ALGO
0.999745
4.546337
6e149ccf-eff1-44e6-a24f-929d62eaf092
raincross7/code-similarity
codes/train_code/problem255/problem255_45.cpp
#include <bits/stdc++.h> using namespace std; //#define int long long #define ll long long #define all(v) (v).begin(), (v).end() #define rep(i,n) for(int i=0;i<n;++i) #define rep1(i,n) for(int i=1;i<n;++i) #define FOR(i, m, n) for(int i = m; i < n; i++) #define EPS (1e-7) #define gearup ios_base::sync_with_stdio(0);ci...
ALGO
0.999985
3.644149
ab9e79c7-b68c-4bfc-a937-8b90bffe2a7d
yangwu1227/python-for-machine-learning
tree_based/decision_trees/pybind_decision_tree_classifier/src/decision_tree_classifier/src/decision_tree_classifier.cpp
#include <pybind11/pybind11.h> #include <pybind11/eigen.h> // Include Eigen support for zero-copy with NumPy #include <pybind11/stl.h> // For STL containers like std::vector #include <Eigen/Dense> #include <vector> #include <algorithm> #include <limits> #include <cmath> #include <stdexcept> #include <string> #include...
ALGO
0.981307
7.246712
8740f2c9-9d01-4ade-9604-09a0f40df281
sarvex/leetcode-scala
solution/0700-0799/0735.Asteroid Collision/Solution.cpp
class Solution { public: vector<int> asteroidCollision(vector<int>& asteroids) { vector<int> ans; for (int a : asteroids) { if (a > 0) { ans.push_back(a); } else { while (!ans.empty() && ans.back() > 0 && ans.back() < -a) { ...
ALGO
0.999987
5.670355
100c5d90-df59-4b9a-b57e-a1c148abbce6
BSanandu88/Coding-questions
743-network-delay-time/743-network-delay-time.cpp
class Solution { public: int networkDelayTime(vector<vector<int>>& times, int n, int k) { vector<pair<int,int>> g[n + 1]; for(int i = 0; i < times.size(); i++){ g[times[i][0]].push_back(make_pair(times[i][1],times[i][2])); } vector<int> dist(n+1, 1e9); dist[k] = 0...
ALGO
0.999985
5.892238
790b1568-2d00-4118-8ae7-f13a35c50b86
ishandutta2007/codeforces
zscoder/normal/454/D.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; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; typedef pair<ii, int> iii; typedef vector<iii> viii; typedef vector<vi> vvi; typedef vecto...
ALGO
0.999983
3.031555
00c498f8-a3d4-474a-b35a-5afca4da7e80
1m188/algorithm
leetcode/1002.查找常用字符.cpp
/* * @lc app=leetcode.cn id=1002 lang=cpp * * [1002] 查找常用字符 * * https://leetcode-cn.com/problems/find-common-characters/description/ * * algorithms * Easy (66.51%) * Likes: 58 * Dislikes: 0 * Total Accepted: 10.1K * Total Submissions: 15.2K * Testcase Example: '["bella","label","roller"]' * * 给定仅有...
ALGO
0.9999
6.294508
31b1f84c-de1d-4598-bb84-5913681da37e
ankitapaul74/leetcode_solutions
2563-count-the-number-of-fair-pairs/2563-count-the-number-of-fair-pairs.cpp
class Solution { public: long long lowerbound(vector<int> &nums,int low,int high,int element){ while(low<=high){ int mid=low+ (high-low)/2; if(nums[mid]>=element){ high=mid-1; }else{ low=mid+1; } } return low; ...
ALGO
0.999993
5.95908
477b42bd-6cf7-4706-9fd2-c27c598cf09f
ChrisOng2/basic_partitioning_example
METISAdjncyFind.cpp
// // Created by Christopher on 5/4/2025. // #include "METISAdjncyFind.h" #include <iostream> void METISAdjncyFind(MatrixReadInFormat A, std::vector<int> &xadj, std::vector<int> &adjncy) { std::vector<std::vector<int>> TempAdjncy; TempAdjncy.resize(A.rowCount); for (int i = 0; i < A.rowCount; i++) { ...
ALGO
0.99746
4.727875
e524b9f1-9eb7-4630-a369-06433887e39e
ishandutta2007/codeforces
kevinwan/normal/1586/C.cpp
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef vector<int> vi; mt19937_64 rng(time(0)); const double PI = acos(-1.L); const int mn = 1e6+10; const ll mod = 1e9+7; int ded[mn]; string g[mn]; void solve(){ int n,m; cin>>n>>m; for(int i...
ALGO
0.999945
4.252313
8711d1f1-2e33-45e7-99d3-352948ea2e3f
nogsp/UVa-solved-problems
Union-Find Disjoint sets/10583 Ubiquitous Religions.cpp
#include <cstdio> #include <iostream> #include <vector> #include <map> #define pb push_back using namespace std; vector<int> pai; int find(int x){ if(x==pai[x]) return x; else return pai[x] = find(pai[x]); } void join(int a, int b){ a = find(a); b = find(b); if(a==b) return; pai[b] = a; } int main() { ...
ALGO
0.999569
4.300579
41743cb8-806c-4148-9561-4c8d22c38187
guptaishika128/My-Leetcode-GFG-Solutions
205-isomorphic-strings/205-isomorphic-strings.cpp
class Solution { public: bool isIsomorphic(string s, string t) { if(s.length() != t.length()){ return false; } unordered_map<char,char> map1; // to chedk mapping of s with t unordered_map<char,bool> map2; // to check if char of t has already been used or not ...
ALGO
0.999979
6.461636
2fce8645-4168-4bd0-8575-f397a1ef066e
Altu-Bitu-6/Altu-Bitu-LeeJuyeon
02_스택_큐_덱/4949.cpp
#include <iostream> #include <stack> #include <string> using namespace std; bool checkBalance(stack<char>& s, char a){ if(a=='(' || a=='['){//여는 괄호일 경우 s.push(a); } else if(a==')'){//닫는 괄호일 경우 1 if(!s.empty() && s.top()=='(') { s.pop(); } else { /...
ALGO
0.999901
5.472755
b3cd8abe-fa1e-4cb3-a103-b7090ce6c9f9
thebravoman/software_engineering_2015
VhodnoNivo/Emil_Lozev/Emil_Lozev_{3}.cpp
#include <iostream> using namespace std; int main() { int num1, num2, sumOfNum = 0, counter = 1, isPrimeCounter = 0; cout << "Enter two numbers" << endl; cin >> num1; cin >> num2; if(num1 < num2) { for(int x = num1; x <= num2; x++) { while(counter <= x) ...
ALGO
0.99955
4.303225
d226d1a8-a0a6-4408-b03e-61775e568dc6
mad18-lab/DSA-450
sum of array.cpp
#include<iostream> using namespace std; int main() { int arr[10]; int size; cout<<"\nEnter size of array: "; cin>>size; cout<<"\nEnter elements of array: "; for (int a = 0; a < size; a++) { cin>>arr[a]; } cout<<"\nOriginal Array: "; for (int i = 0; i < siz...
ALGO
0.984742
4.174692
ec99fb08-e031-4fea-944d-e8820536b93d
niklas-simon/dhge-cpp-programs
2-zahlen-zählen/program.cpp
#include <iostream> using namespace std; const int max = 256; class Number { public: Number(int _value, Number *_next, Number *_last) { value = _value; next = _next; last = _last; count = 1; } int value; int ...
ALGO
0.998899
5.291522
a6b34046-647a-4dc6-8176-79eac1a028cb
aprateek29/Coding
DP/07_Kashish/16_b_range_sum.cpp
#include <iostream> using namespace std; #define r 5 #define c 5 int solve(int arr[r][c]) { int dp[r+1][c+1] = {0}; for (int i = 0; i < r; i++) { for (int j = 0; j < c; j++) { dp[i+1][j+1] = dp[i][j+1] + dp[i+1][j] - dp[i][j] + arr[i][j]; } } int row1 = 2; int col1...
ALGO
0.999975
4.043395
9d426429-8336-4503-9245-725a3c8761e7
boltonli/ohbee
video/sources/opencore-amr-0.1.2/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/log2.cpp
/* Filename: log2.cpp ------------------------------------------------------------------------------ */ /*---------------------------------------------------------------------------- ; INCLUDES ----------------------------------------------------------------------------*/ #include "log2.h" #include "basic_op.h" #inc...
ALGO
0.992304
6.324306
1abc0f7e-fa1c-484b-979d-419a2b2637ce
samoutlier/my-codes-cpp
14_Binary_Search_Tree/01_Insert_A_node_In_BST.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; class Node { public: int data; Node *left; Node *right; Node(int data) { this->data = data; this->right = NULL; this->left = NULL; } }; void InOrderTraversal(Node * &root) { if(root == NUL...
ALGO
0.999909
4.916812
104ab612-75f9-4817-aa2a-90c90f696cac
JohnKasun/NoiseMachine-IRLoader
JUCE/modules/juce_core/javascript/juce_JSON.cpp
namespace juce { struct JSONParser { JSONParser (String::CharPointerType text) : startLocation (text), currentLocation (text) {} String::CharPointerType startLocation, currentLocation; struct ErrorException { String message; int line = 1, column = 1; String getDescription() c...
TOOL
0.868936
4.029976
9e9fce9a-144a-4705-8512-7b7a36c32431
hamutahana/kyopro
atcoder/agc/agc013a.cpp
nclude <bits/stdc++.h> using namespace std; using vi = vector<int>; #define rep(i, n) for (int i = 0; i < (n); i++) int main() { int N; cin >> N; vi A(N); rep(i, N) cin >> A[i]; // type: { -1: 単調非減少, 0: 未確定, 1: 単調非増加 } int type = 0, cnt = 1; rep(i, N-1) { int diff = A[i + 1] - A[i]; if (diff == 0)...
ALGO
0.999963
4.118323
009d090b-a284-4787-909a-6259716c250b
ramkrishnareddy24/DataStructures
SearchIn2DMatrix.cpp
#include<bits/stdc++.h> using namespace std; // Linear Search bool searchIn2DMatrix(vector<vector<int>> v,int target) { int n=v.size(); int m=v[0].size(); for(int i=0;i<n;i++) for(int j=0;j<m;j++) if(target==v[i][j]) return true; return false; } // Binary Search Matrix bool searchInMatrix(vector<vector<i...
ALGO
0.999719
4.701322
578ba210-98f7-4d60-8520-4eb5c9c2f633
Julzso23/CGP600-Assignment-02
CGP600-Assignment-02/src/Utility.cpp
#include "Utility.hpp" #include <sstream> namespace Utility { std::vector<std::string> split(std::string input, char delimiter) { std::vector<std::string> result; std::stringstream stream(input); while (stream.good()) { std::string subString; std::getli...
TOOL
0.882734
6.2459
5798b21f-e770-47f3-807f-26a1a3f15cf4
adityaketkar/osrm-backend
src/engine/routing_algorithms/routing_base.cpp
#include "engine/routing_algorithms/routing_base.hpp" namespace osrm { namespace engine { namespace routing_algorithms { bool needsLoopForward(const PhantomNode &source_phantom, const PhantomNode &target_phantom) { return source_phantom.IsValidForwardSource() && target_phantom.IsValidForwardTarget() && ...
ALGO
0.997885
6.01574
ac70b4ff-42fb-424d-bd38-12418074eed3
jeffsonyu/data_structure
code_class/assignment/new_compute24_partial_code/src/Base24.cpp
#include "Base24.h" #include <algorithm> using namespace std; int Base24::Read() { cout << "Please enter the four numbers you want to compute 24: " << endl; cin >> num[0]; cin >> num[1]; cin >> num[2]; cin >> num[3]; return 1; } int Base24::Display() { bool flag = false; int idx[4] = {0, 1, 2, 3}; sort(idx...
ALGO
0.985579
3.761641
041b4c05-f913-4b5e-b3fd-21450b333764
cogotti-giulia/algorithms-and-data-structures
sorting/insertion_sort/main.cpp
/** * @file main.cpp * @author me, myself and I * @brief test insertion sort * @version 1.0 * @date 2023-11-14 */ #include "header.cpp" #include <array> int main() { std::array<my_elem, 6> arr = {new elem(5, 'A'), new elem(2, 'B'), new elem(7, 'C'), new elem(3, 'D'), ...
ALGO
0.987447
4.743013
84d170fc-6b0f-4d3d-8d87-456313add229
edoardopuggioni/crowdpatching
zksnarks/libsnark/depends/libff/libff/algebra/curves/alt_bn128/alt_bn128_pp.cpp
/** @file ***************************************************************************** * @author This file is part of libff, developed by SCIPR Lab * and contributors (see AUTHORS). * @copyright MIT license (see LICENSE file) ***********************************************************************...
ALGO
0.893259
6.270502
eb32e24b-8ffa-44ac-bbb9-d2e44b131d35
ishandutta2007/codeforces
benq/normal/1368/G.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef double db; typedef string str; typedef pair<int,int> pi; typedef pair<ll,ll> pl; typedef pair<db,db> pd; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<db> vd; typedef vector<str> vs; typedef v...
ALGO
0.999651
4.639579
62d663bd-6b63-49ee-befe-35950ecf4e2f
primagiant/learn-c
Fungsi/Fungsi Rekursif 1.cpp
#include <cstdio> #include <cstdlib> int faktorial(int a) { if(a == 1) { return 1; } else { return a*faktorial(a-1); } } int main() { int test, nilai; nilai = 5; test = faktorial(nilai); printf("%d", test); return 0; }
ALGO
0.999902
4.5685
6a1dfc0b-edb6-49b6-b4ee-0ebf80e363dd
sarvex/leetcode-hack
lcci/17.10.Find Majority Element/Solution.cpp
class Solution { public: int majorityElement(vector<int>& nums) { int cnt = 0, m = 0; for (int& v : nums) { if (cnt == 0) { m = v; cnt = 1; } else cnt += (m == v ? 1 : -1); } cnt = count(nums.begin(), nums.end(),...
ALGO
0.999955
5.655781
b39fe297-08a4-483b-a7b4-f7fe5c68d1f4
Sumit2595/Leetcode-Problems
1675-minimize-deviation-in-array/1675-minimize-deviation-in-array.cpp
class Solution { public: int minimumDeviation(vector<int>& nums) { int n=nums.size(); priority_queue<int>pq; int minim=INT_MAX; for(int i=0;i<n;i++){ if(nums[i]%2){ nums[i]=nums[i]*2; } pq.push(nums[i]); minim=min(minim,num...
ALGO
0.999897
5.190398
cb42722e-975d-415a-975a-e1db4665d849
hjtvioller/open3D
cpp/open3d/ml/pytorch/misc/ReduceSubarraysSumOps.cpp
#include "open3d/ml/pytorch/misc/ReduceSubarraysSumOps.h" #include <vector> #include "open3d/ml/pytorch/TorchHelper.h" #include "open3d/ml/pytorch/misc/ReduceSubarraysSumOpKernel.h" #include "torch/script.h" torch::Tensor ReduceSubarraysSum(torch::Tensor values, torch::Tensor row_spl...
TOOL
0.860199
7.254048
327a3bba-096c-411c-9564-e8567332d380
harkerhand/note_0203
Alg/OJ/1032.cpp
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int t; cin >> t; while (t--) { int n; cin >> n; int ans = 100; for (int i = 0; i < n - 1; i++) { int x; cin >> x; ans += x; } c...
ALGO
0.997773
3.572844
b9fa183e-db72-4634-8966-19990ffd61d0
jdcoin/jdcoin
src/jdcoin-cli.cpp
#include "chainparamsbase.h" #include "clientversion.h" #include "rpc/client.h" #include "rpc/protocol.h" #include "util.h" #include "utilstrencodings.h" #include <boost/filesystem/operations.hpp> #include <stdio.h> #include <event2/event.h> #include <event2/http.h> #include <event2/buffer.h> #include <event2/keyvalq...
WEB
0.957817
7.110949
702691f2-7f86-47ed-9b7b-e32b19c6f849
cyberbuddy-io/open-source-contribution-for-beginners
MLSA Event-101/C++/check_pow_of_2.cpp
/* This program checks whether the given number is a power of 2 or not */ #include<iostream> using namespace std; int main(){ long long int n; cin>>n; if( !(n & n-1)){ cout<<"Yes given number is power of 2"<<endl; } else { cout<<"No given number is not the power of 2"<<endl; }...
ALGO
0.999861
4.357557
91a13d7d-5f62-4932-b0d8-d9cbaf6e90c2
ishandutta2007/codeforces
amit_swami/normal/1037/A.cpp
#include <bits/stdc++.h> #define forn(i, n) for(int i = 0 ; (i) < (n) ; ++i) #define err(...) fprintf(stderr, __VA_ARGS__),fflush(stderr) using namespace std; typedef long long ll; int main() { #ifdef amit freopen("in", "r", stdin); freopen("out", "w", stdout); #endif int x; scanf("%d",...
ALGO
0.999973
4.031187
df54aa2d-fabf-4afc-96d7-7ca3057bc3e4
salmaelbarbori/Problem-Solving-with-CPP
arena/DiaaDoesSMS.cpp
#include<iostream> #include<bits/stdc++.h> #include<map> #include <sstream> using namespace std; int main () { int n, m; map<string, string> msisdn; map<string, string> imsi; auto it1 = msisdn.begin(), it2 = imsi.begin(); cin >> n; string initial, value, key; while (n--) { cin >> initial; istringstream iss (...
ALGO
0.993845
3.730517
b93a7961-ac8b-4275-a1e6-ab6fa8eef68f
muntahass/CSE-122-FALL2023-50-7
Lab-6/Boy or Girls.cpp
#include<iostream> #include<algorithm> #include<string> using namespace std; int main() { string s; int count = 0; cin >> s; sort(s.begin(), s.end()); for(int i = 0; i < s.size(); i++) { if(s[i] != s[i+1]) { count++; } } if(count%2 == 0) cout <...
ALGO
0.999838
3.722343
e8e103c1-6dfe-4128-8263-e32f0e0aea39
chapel-lang/chapel-attic
compiler/AST/DoWhileStmt.cpp
#include "DoWhileStmt.h" #include "AstVisitor.h" #include "build.h" /************************************ | ************************************* * * * Factory methods for the Parser * * ...
TOOL
0.962808
6.426065
5d336c46-3aba-44b9-b568-70fa48f3d4ff
myparticl/vds-core
src/cryptopp/3way.cpp
// 3way.cpp - modifed by Wei Dai from Joan Daemen's 3way.c // The original code and all modifications are in the public domain. #include "pch.h" #include "3way.h" #include "misc.h" NAMESPACE_BEGIN(CryptoPP) #if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING) void ThreeWay_TestInstantiations() { Thr...
ALGO
0.999409
4.983791
6ab4a01b-7244-4d1d-89c0-16597492dbca
jubo-2055/SORTING-PROBLEM
Insertion.cpp
#include <iostream> using namespace std; void insertionSort(int arr[], int n) { for (int i = 1; i < n; ++i) { int key = arr[i]; int j = i - 1; while (j >= 0 && arr[j] > key) { arr[j + 1] = arr[j]; --j; } arr[j + 1] = key; } } void printArray(i...
ALGO
0.999934
5.799742
dd171110-83f6-4f36-9910-2f9aac9ae0c2
appfs/appfs
Sanny/ex8/src/c/Steiner.cpp
/* * Steiner.cpp * * Created on: 06.07.2017 * Author: alesan */ #include "Steiner.h" Steiner::Steiner() { nodesInTree = new Nodes(); steinerEdges = new Edges(); } Steiner::~Steiner() { delete nodesInTree; delete steinerEdges; } /** Getter for Edges in Steiner-tree */ Edges Steiner::getEdges() { retu...
ALGO
0.999448
4.178155
76f14180-8314-4349-b82b-476821d92b76
2018331109/BCS-ORBITAX
ICC-75/M.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define endl "\n" #define test int tc; cin>> tc; while(tc--) #define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); const int INF = 1e9 + 7; const int MOD = 1e9 + 7; int main(){ optimize(); test { ll n, k; cin...
ALGO
0.99996
4.050862
f239575c-81d7-4ace-888f-c39cfa84eee7
rpeb/LeetCode
283-move-zeroes/283-move-zeroes.cpp
class Solution { public: void moveZeroes(vector<int>& nums) { int n = nums.size(); int j = 0; for (int i = 0; i < n; ++i) { if (nums[i] != 0) { nums[j++] = nums[i]; } } for (;j < n; ++j) { nums[j] = 0; } } };
ALGO
0.999917
6.700437
05034371-0ac3-4a28-bca4-b5068f10f50e
COMP215/_ryanfogarty
PS01/Graph.cpp
#include <iostream> #include <fstream> #include <stdlib.h> #include <time.h> #include <string.h> #include <stdio.h> #include<algorithm> #include <string> #include <vector> using namespace std; class Node{ public: Node(); string Name; vector<Node> friends; void addConnection(Node* newConnection); b...
ALGO
0.991139
4.260966
38243846-103f-46f0-8bfa-0e1fadae1c07
zouzhenxinggit/UnrealEngine4.26
Engine/Source/Runtime/Navmesh/Private/Detour/DetourNavMesh.cpp
#include "Detour/DetourNavMesh.h" #include "Detour/DetourCommon.h" #include "Detour/DetourAssert.h" enum ESlabOverlapFlag { SLABOVERLAP_Cross = 1, SLABOVERLAP_Min = 2, SLABOVERLAP_Max = 4, }; inline bool overlapSlabs(const float* amin, const float* amax, const float* bmin, const float* bmax, const fl...
ALGO
0.99376
7.336748
a0a26b95-230c-440f-9ef0-2b4dd1ec4979
akankshan339/Graphs
GRAPHS/bfs2.cpp
//BFS tarverasl for directed and undirected graph taking edges from user input #include<bits/stdc++.h> using namespace std; void BFS(int src , unordered_map<int , vector<int>>&adjList , vector<bool>&visited ,vector<int>&res) { queue<int>q; visited[src]=true; q.push(src); while(!q.empty()) { int curr=q.front(); ...
ALGO
0.99995
4.650537
bd27a705-35b5-4e9c-9ab3-ce9cf07b37a8
daniyal-sohail/Cpp-DSA-Questions
Task21.cpp
#include <iostream> using namespace std; void sayDigit(int n, string arr[]) { if (n == 0) { return; } int digit = n % 10; n = n / 10; sayDigit(n, arr); cout << arr[digit - 1] << " "; } int main() { string arr[9] = {"one", "two", "thre...
ALGO
0.996585
5.996333
fc3fde4e-6c9e-4dd9-921c-7e8ff2e27c39
DAYAL-HARSH/DSA-SHEET
RemoveDuplicatesIn-PlacefromSortedArray.cpp
// Brute force // using a set datastructure because set stores only unique elements in sorted order code-> #include<bits/stdc++.h> using namespace std; int main(){ int n; int secondLargest = -1; cin>>n; int arr[n]; for(int i = 0; i < n; i++){ cin>>arr[i]; } set<int> st; for(int...
ALGO
0.999974
5.587996
a5eeb0c7-2455-478a-aed9-77962b840caa
Sergey-Chushev/Task
Проект№5.cpp
#include <iostream> using namespace std; int main() { double X, x, v, t, a; cout << "x = "; cin >> x; cout << "v = "; cin >> v; cout << "t = "; cin >> t; a = -9.8; cout << "X = " << x + v * t + a * t * t / 2; return 0; }
ALGO
0.994572
4.191444
646289d8-15a7-4c47-b771-10327abd9d77
insectkorea/my-cp
abc268/d/main.cpp
/** * author: insectkorea * create-mm-dd hh:mm:ss **/ #include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; // clang-format off /* accelration */ // 高速バイナリ生成 #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") // cin cout の結びつけ解除, stdioと同期しない(入出力非同期化) // c...
ALGO
0.999927
5.001733
a2da0b50-20a6-455e-bb32-7f04cd4b8948
qwerty2024/LeetCode
easy/3222.cpp
class Solution { public: string winningPlayer(int x, int y) { int tmp = min(x, y / 4); return (tmp % 2 == 1) ? "Alice" : "Bob"; } };
ALGO
0.99996
5.661342
d4f16bd7-2b71-4d96-9d04-b33138b0c7e2
chatop2020/ncnn-new
src/layer/x86/groupnorm_x86.cpp
#include "groupnorm_x86.h" #if __SSE2__ #include <emmintrin.h> #include "sse_mathfun.h" #if __AVX__ #include <immintrin.h> #include "avx_mathfun.h" #if __AVX512F__ #include "avx512_mathfun.h" #endif // __AVX512F__ #endif // __AVX__ #endif // __SSE2__ namespace ncnn { GroupNorm_x86::GroupNorm_x86() { // groupnorm...
ALGO
0.996727
6.178018
f88e9a40-7792-410e-a78e-5382d17c42e0
mcoder2014/libtpms
libtpms/TPMS/Filter/CommonMarchCubeFilter.cpp
#include "CommonMarchCubeFilter.h" #include <numeric> #include <TPMS/MarchBoxUtil.h> #include <TPMS/MarchBoxTable.h> CommonMarchCubeFilter::CommonMarchCubeFilter() :isoLevel(0), border(false) { } /** * @brief CommonMarchCubeFilter::operator () * March Cube 方法拟合 * 没有加入任何的约束,直接根据采样点的结果拟合结果 * @param sampleMat...
ALGO
0.992236
5.420992
4971dc85-d890-4ae7-8c19-aba6360dfd3c
llvllrbreeze/alcorapp
look_for_face/look_for_face/face_finder.cpp
#include "face_finder.h" FaceFinder::FaceFinder() : ptu(wxCOM7,wxBAUD_9600) { capture = 0; frame_copy = 0; } FaceFinder::~FaceFinder() { ptu.clearInput(); //cvDestroyWindow("result"); } bool FaceFinder::init() { if ( !detector.init("haarcascade_frontalface_alt2.xml")) { fprintf( stderr, "ERROR: Could not loa...
TOOL
0.934646
4.87061
33cf3d1d-61c2-45b0-bbb8-e15f59c9a45e
SrajanAgrawal/Hacktoberfest2022
C++/DFS.cpp
#include <iostream> #include<map> #include<list> using namespace std; // Directed Graph class Graph { public: map<int, bool> visited; map<int, list<int> > adj; void addEdge(int v, int w); void DFS(int v); }; void Graph::addEdge(int v, int w) { adj[v].push_back(w); } void Graph::DFS(int v) { visited[v] = tr...
ALGO
0.999971
5.251963
b9e0b3fd-4a96-4193-9f2a-194a5b6f92ff
arpituppal/competitive-programming-codes
spoj/UCV2013H.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <queue> #include <algorithm> #include <vector> #include <cstring> #include <stack> #include <cctype> #include <utility> #include <map> #include <string> #include <climits> #include <set> #include <sstream> #include <utility> #include <ct...
ALGO
0.999828
3.191519
1a71ec36-19bf-4389-9c68-ab2622c70385
karoliina/UVa-solutions
uva10264/uva10264.cpp
#include <cstdio> #include <cmath> #include <cstdlib> #include <ctime> #include <iostream> #include <fstream> #include <sstream> #include <string> #include <algorithm> #include <regex> #include <vector> #include <map> #include <set> #include <bitset> using namespace std; #define loop(x, start, end) for (uint x = star...
ALGO
0.999642
4.215011
4faec7b1-4f5d-4b8a-88b3-d1a023f9e6ff
ishandutta2007/codeforces
bench0310/normal/858/F.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0); int n,m; cin >> n >> m; vector<array<int,2>> v[n+1]; for(int i=1;i<=m;i++) { int a,b; cin >> a >> b; v[a].push_back({b,i}); v[b].push_back({...
ALGO
0.999987
4.069143
ef87d702-da16-4dde-94b5-521405ed257b
Ranisme/cacthuattoansapxep
MergeSort.cpp
#include <bits/stdc++.h> using namespace std; void mergeSort(vector<double> &left, vector<double> &right, vector<double> &bars) { int nL = left.size(); int nR = right.size(); int i = 0, j = 0, k = 0; while (j < nL && k < nR) { if (left[j] < right[k]) { bars[i] = left[j...
ALGO
0.999418
4.913451
c513af77-7d52-44b2-a10a-bed6b42831b5
DeBankDeFi/dapppubbosbp
dapppubbosbp.cpp
#include "dapppubbosbp.hpp" void dapppubbosbp::claim(account_name producer) { eosio_assert(is_account(producer) || is_account(_self), "auth failed"); const auto& prod = _producers.get(producer, "unable to find your producer"); const uint32_t claim_time = prod.last_claim_time.sec_since_epoch() + sec_per_day...
ALGO
0.977061
4.792873
84f00b5a-0684-4812-a360-8da263665d39
jvujcic/cp
cpp/hackerrank/week-of-code-21/counting_the_ways.cpp
#include <iostream> #include <cmath> #include <vector> #include <algorithm> using namespace std; typedef long long LL; const LL mod = pow(10, 9) + 7; int main() { //freopen("input.txt", "r", stdin); int N; cin >> N; vector<LL> A(N); for (int i = 0; i < N; ++i) { cin >> A[i]; } ...
ALGO
0.999936
4.481382
dd4f2b4f-323a-4f73-a9bb-4a256e2ef9ae
thanhdat317/code-c-ptit
c03057.cppd.cpp
#include <stdio.h> #include <string.h> long long m(char *s) { long long res = 0; for(int i = 0; i < strlen(s); ++i) { if(s[i] == '6') res = res * 10 + 5; else res = res * 10 + s[i] - '0'; } return res; } long long M(char *s) { long long res = 0; for(int i = 0; i < strlen(s...
ALGO
0.999713
4.710105
bc876589-cdb7-43d1-8ba5-1d2a7dfa0ec1
KaranTalreja/LeetCode
src/number-of-segments-in-a-string/solution.cpp
class Solution { public: int countSegments(string s) { if (s.empty()) return 0; int start = 0; int end = s.size()-1; while (start <= end && s[start] == ' ') start++; while (start <= end && s[end] == ' ') end--; int count=0; bool seenNonSpace = false; for (start; sta...
ALGO
0.999617
4.894465
d36a2b99-cad7-4a82-afba-f32797499609
Khaleeq01/Leetcode-problems-solutions
0div-idbig-omega-company-tagsdiv-idbig-omega-topbardiv-classcompanytagscontainer-styleoverflow-x-scroll-flex-wrap-nowrap-div-classcompanytagscontainer-tag-stylebackground-color-rgba0-10-32-005-divamazon-divdiv-classcompanytagscontainer-tagoccurence4-div-div-divdiv-classcompanytagscontainer-chevrondivsvg-version11-idico...
class Solution { public: vector<string> commonChars(vector<string>& words) { vector<int>finalFreq(26,INT_MAX); for(int i=0;i<words.size();i++){ vector<int>currFreq(26,0); for(auto c:words[i]) currFreq[c-'a']++; for(char c='a';c<='z';c++) ...
ALGO
0.999968
6.035462
1c5f188a-b205-440c-b676-109e552300cf
abdullaabdullazade/rio-semifinal-submissions-2025
RIO2025_Semifinal_S3 (1).cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define all(v) v.begin(), v.end() const int sz = 22, inf = 1e9 + 7; int n, a[sz], b[sz]; void solve() { cin >> n; for(int i = 0; i < n; i++) cin >> a[i]; for(int i = 0; i < n - 1; i++) b[i] = abs(a[i] - a[i + 1]); b[n - 1] = abs(a[n - ...
ALGO
0.999726
3.935452
684ad678-592f-44a0-96aa-8b169f30218f
Nafyaz/my-codes
Codeforces GYM/101982C.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define ff first #define ss second #define MOD 998244353 ll n, k, a[110], dp[110][110]; ll call(ll i, ll j) { if(n - i < k - j) return dp[i][j] = 0; if(i == n) { if(j == k) return dp[i][j] = 1; else ...
ALGO
0.999978
4.629727
04c25fe7-07bd-476b-a2ad-5f1c2c2092b6
ReiAccept/Algorithm
cf/CF1625C.cpp
#include<bits/stdc++.h> //#include<bits/extc++.h> //#define int long long//__int128 #define mmst0(x) memset(x,0,sizeof(x)) #define mmst3f(x) memset(x,0x3f,sizeof(x)) #define pb(x) emplace_back(x) #define mkp(x, y) make_pair(x, y) #define fi first #define se second #define YESS printf("YES\n") #define NOO printf("NO\n")...
ALGO
0.999947
3.030432
aaf580e8-248e-455a-b1d8-d7c88dd26ce7
open-vela/nuttx_libs_libxx_libcxx
test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp
// <algorithm> // template<ForwardIterator Iter> // requires LessThanComparable<Iter::value_type> // pair<Iter, Iter> // minmax_element(Iter first, Iter last); #include <algorithm> #include <random> #include <cassert> #include "test_macros.h" #include "test_iterators.h" static std::mt19937 randomness; templa...
TEST
0.904257
6.323904
831b516c-914b-4c4f-b8f3-fa6e24875ee2
powderly/AndroidTunerMod
app/src/main/jni/fft.cpp
#include <math.h> #include <android/log.h> #include <cstddef> #include "fft.h" #define LOGV(v) \ // __android_log_write(ANDROID_LOG_VERBOSE, "fft-jni" , (v)) #define LOGE(v) \ //- __android_log_write(ANDROID_LOG_ERROR, "fft-jni", (v)) template<class T> inline void swap(T &x, T&y) { T z; z = x; x = y; y = z; } ...
ALGO
0.983759
6.114796
fed9c1dd-7b30-44e0-a43e-cef1657cc5ad
Shi-Qi-Li/DBDNet
model/pointnet_ops_lib/src/random_ball_query/random_ball_query_cuda.cpp
#include <vector> #include <torch/serialize/tensor.h> #include <ATen/cuda/CUDAContext.h> #include "random_ball_query_cuda_kernel.h" void random_ball_query_cuda(int m, int nsample, float min_radius, float max_radius, at::Tensor order_tensor, at::Tensor xyz_tensor,...
ALGO
0.883376
5.200931
4dd799a4-7cd8-4ae0-9514-ca23100d4dfe
mdsarfaraz377/matrix-problem-cpp
subSetArray.cpp
#include<bits/stdc++.h> using namespace std; bool isSubset(vector<int>& arr1, vector<int>& arr2, int m, int n){ for(int i=0; i<n; i++){ bool found = false; for(int j=0; j<m; j++){ if(arr2[i]==arr1[j]){ found =true; break; } } ...
ALGO
0.999941
4.741162
2b5de8e1-4fdc-4a62-9fa4-7206adfc9758
MakVinicius/ueg-files
2Periodo/AlgoritmosEProgramacao2/Lista09/L09E02A.cpp
#include <stdio.h> #include <stdlib.h> #include <locale.h> #define T 100 #define S 2 typedef char String[T]; struct FichaFuncionario { String Nome, Data, Estado, Pais, Cidade, Escolaridade, DataIngresso, Profissao; char Fumante; int QtdDependente; float Salario; }; int main() { setlocale(LC_ALL, "Portuguese");...
TOOL
0.978152
3.906389
97d9b71e-bd9c-4572-b9b9-a79f0bb48018
sangmin970528/BOJ-algorithm
category/union find/1976_여행 가자.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cmath> #include <stack> #include <queue> #include <deque> #include <climits> #include <map> #include <set> using namespace ::std; vector<int> parent(201); vector<int> Rank(201,0); int root(int u) { if(u==parent[u]) return u; ...
ALGO
0.999996
4.454763
965ba18d-ce47-4a29-8b64-e0ea845d68c9
zhzh2001/Learning-public
c++实用代码/莫比乌斯函数.cpp
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<time.h> #include<math.h> #include<iostream> #include<algorithm> using namespace std; #define ll long long #define N 100005 int mu[N],f[N],p[N],sum[N],len; //1<=i<=x,1<=j<=y,gcd(i,j)==dĶ int main() { //freopen("1.in","r",stdin); //freopen("1.out","w",std...
ALGO
0.999564
3.903343
501cb7da-68b5-40fe-aa39-20a1eeb16aa3
Muslimbek23/Cpp
Dasturlarim/va boshqalar/mashina uyini.cpp
#include <iostream> #include <iomanip> using namespace std; int main() { int n; cin>>n; for(int i=0; i<n; i++){ for(int j=0; j<n ; j++){ if(i==j) cout<<"|Q"; else cout<<"| "; } cout<<"|"<<endl; } }
ALGO
0.998719
3.19252
39ab4926-0f63-4594-9f73-5187795cbd7b
bluespeck/aoc
aoc_2020/aoc_2020_09.cpp
import std.core; using input_t = std::vector<int64_t>; input_t read_input() { input_t input; while (std::cin) { int64_t number; std::cin >> number; input.push_back(number); } return input; } void solve_1(input_t& input) { for (int i = 25; i < input.size(); i++) { ...
ALGO
0.999361
4.199903
010f7918-1303-492f-bac4-ee05e7af8ebd
vietnakid/ACM-ICPC
CodeForces/1131/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector< vector<int> > vvi; typedef vector<ll> vl; typedef vector< vector<ll> > vvl; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector< vii> vvii; #define INF 1000000007 #define INFLL 100000000000000000...
ALGO
0.999997
3.352798
99f32e06-c52e-4b8b-a38b-3c8be20aae9a
yeenii/CodingTest
250606/고대 문명 유적 탐사/ancient-ruin-exploration.cpp
#include <iostream> #include<vector> #include<queue> #include<algorithm> using namespace std; const int K = 15; // 1 <= k <= 10 const int M = 330; // 10 <= M <= 300 int k, m =0; //탐사 반복 횟수, 유물 조각 개수 int historySpace[5][5]; //유적지 정보 저장 int pieceWall[M]; //m 개의 유물 조각 번호 queue<int> pieceWall_que; //유적 벽면에 써있는 숫자 저장한 ...
ALGO
0.999902
3.822461
bbd08afd-d522-4779-889f-5c3de1a21a28
exapde/text2code
symengine/as_real_imag.cpp
#include <symengine/visitor.h> #include <symengine/basic.h> namespace SymEngine { void pow_number(const RCP<const Basic> &in_re, const RCP<const Basic> &in_im, unsigned long n, Ptr<RCP<const Basic>> &out_re, Ptr<RCP<const Basic>> &out_im) { unsigned long mask = 1; RCP<const Bas...
ALGO
0.987906
6.544664
c87d95cc-c4d0-4e69-a4a4-6faaffb3f6e4
ishandutta2007/codeforces
slime/normal/932/E.cpp
#include <iostream> #include <cstdlib> #include <cstdio> #include <cstring> #include <algorithm> #define ll long long #define maxn 5005 using namespace std; const ll mod = 1000000007; ll ksm(ll a, ll b) { if(!b) return 1; ll ns = ksm(a, b >> 1); ns = ns * ns % mod; if(b & 1) ns = ns * a % mod; return ns; } int n, ...
ALGO
0.999959
3.80696
acb7ca7f-ae1e-4f6d-b565-7123ace5f27b
Anushka-098/Problem-of-the-day-
occurace of unique number.cpp
#include<iostream> using namespace std; int occuranceofuniquenumber(int arr[],int size){ int ans=0; for(int i=0;i<size;i++){ ans=ans^arr[i]; } return ans; } int main(){ int arr[7]={1,4,5,1,4,5,8}; int ans=occuranceofuniquenumber(arr,7); cout<<ans; return 0; }
ALGO
0.999941
4.058244
57a02b3d-0e98-4939-826f-12b2739cd069
mls-ssjblue/Autoware-fresh
ros/src/computing/perception/localization/packages/orb_localizer/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.cpp
#include "g2o/types/types_seven_dof_expmap.h" namespace g2o { VertexSim3Expmap::VertexSim3Expmap() : BaseVertex<7, Sim3>() { _marginalized=false; _fix_scale = false; } EdgeSim3::EdgeSim3() : BaseBinaryEdge<7, Sim3, VertexSim3Expmap, VertexSim3Expmap>() { } bool VertexSim3Expmap::read(std...
ALGO
0.935155
5.909429
3eed7ba0-dbb6-4530-b2a4-ea83e90c0ace
HekpoMaH/Olimpiads
codeforces/round267/d.cpp
#include<bits/stdc++.h> using namespace std; struct trie{ int fl; int nxt[26]; int bestr,bestl; string dw; }; //bestr-> kolko stavat //bestl-> best len const int nmax=2*(1e5)+9; string s[nmax]; int curr=1; trie tr[nmax]; int n,m; void mytol(char &in){ if(in<='Z' && in>='A') in=in-('Z'-'z'); } void add(...
ALGO
0.99939
3.704036
6ac118a2-3002-4307-aca1-5227756f56c8
chenhanpolyu/DynTrack
yolo_fastest_ros/ncnn/src/fhog.cpp
#ifndef FHOG_CPP #define FHOG_CPP #include <cstring> #include <iostream> using namespace std; #include "fhog.h" #undef MIN // platform independent aligned memory allocation (see also alFree) void* alMalloc( size_t size, int alignment ) { const size_t pSize = sizeof(void*), a = alignment-1; void *raw = wrMalloc(...
ALGO
0.996944
3.907583
da0b505e-3252-4ddc-af89-3236f7624109
faxtcoin/faxtcoin
src/merkleblock.cpp
#include <merkleblock.h> #include <hash.h> #include <consensus/consensus.h> #include <util/strencodings.h> CMerkleBlock::CMerkleBlock(const CBlock& block, CBloomFilter* filter, const std::set<uint256>* txids) { header = block.GetBlockHeader(); std::vector<bool> vMatch; std::vector<uint256> vHashes; ...
ALGO
0.998588
6.172168
35938e44-171f-4a97-a363-820907e611b8
matthewlam721/chess-educational-games
Box2D/Collision/b2CollideCircle.cpp
#include <Box2D/Collision/b2Collision.h> #include <Box2D/Collision/Shapes/b2CircleShape.h> #include <Box2D/Collision/Shapes/b2PolygonShape.h> void b2CollideCircles( b2Manifold* manifold, const b2CircleShape* circleA, const b2Transform& xfA, const b2CircleShape* circleB, const b2Transform& xfB) { manifold->pointCou...
ALGO
0.999103
7.760263
1eea06fe-c478-4455-a520-873726427a37
gutierenmanuel/hack-for-good-proyect
appv2/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.998005
6.76073
46b3866e-9dc0-4691-a13a-161eacbc08ac
CAPS-UMU/gem5-21-1-Berti-IPCP
src/systemc/tests/systemc/misc/unit/data/general/int_to_bits/datawidth.cpp
/***************************************************************************** datawidth.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /**************************************************************************...
ALGO
0.955587
5.362704
67861cc1-9760-4f39-996f-11e85645210d
bliscosque/leetcode
CPP/49.GroupAnagrams.cpp
#include <bits/stdc++.h> #include <algorithm> using namespace std; template <typename T> std::ostream& operator<<(std::ostream& os, const std::vector<T>& vec) { os << "["; if (!vec.empty()) { // Print the first element outside the loop to avoid a trailing comma os << vec[0]; // Print t...
ALGO
0.999977
6.252746
b10a65f0-114f-45cb-874e-49359e647580
qkrdmstn/codetree-TILs
240206/빙산의 일각 2/the-tip-of-the-iceberg-2.cpp
#include <iostream> using namespace std; //변수 선언 int n; int iceBerg[100][1000] = {{0},{0}}; int maxH = 0; int countIce(int surface) { bool ice = false; bool beforeIce = false; int cnt = 0; for(int i=0; i<n; i++){ if(iceBerg[i][surface+1] == 0){ beforeIce = ice; ice = fa...
ALGO
0.999714
4.469909
2f95b3e5-03be-49d8-9f11-aeda250b55db
ZoruaSama/Solutions-4-Luogu-Problems
P2872/main.cpp
#include <iostream> #include <cstdio> #include <cmath> using namespace std; const int maxn=1e3+10; int n,m; int x[maxn],y[maxn],vis[maxn]; double d[maxn]; short mp[maxn][maxn]; double dist(int u,int v){ if(mp[u][v]==1){ return 0; } return sqrt((double)(x[u]-x[v])*(x[u]-x[v])+(double)(y[u]-y[v])*(y[u...
ALGO
0.999839
4.022926
8b99fa02-5665-4d71-bfab-5c75e3320407
krishnakishored/cpp-design-patterns
3.BEHAVIORAL/Iterator/iterator_vinceh/iterator_demo_5.cpp
#include <iostream> #include<string> #include<vector> using std::vector; using std::string; using std::cin; using std::cout; using std::endl; // Purpose. Fairly reusable iterator for step-wise recursive descent // // Discussion. The Composite/Component/Leaf code is one of the previous // Composite demos. Methods a...
TOOL
0.958073
5.326746
98e16556-3bb3-4c4a-9cae-e428cf27d217
adarshmishra1310/Coding
C++_Programming/LinkedList/Singly_Linked_List.cpp/Delete_Last_Node.cpp
#include <bits/stdc++.h> using namespace std; struct node { int data; node *next; node(int x) { data=x; next=NULL; } }; node *deleteTail(node *head) { if(head==NULL) return NULL; if(head->next==NULL) { delete head; return NULL; } node *temp=head;...
ALGO
0.995409
3.954917
4a19f814-ddcf-49c5-9007-26f8f4fecf54
codingtest/interview
QuickSums.cpp
#include <string> using namespace std; string num; int num_size; int target; int data[15]; int len_result = -1; //dynamic programing //http://community.topcoder.com/stat?c=problem_solution&cr=7356427&rd=5072&pm=2829 // not pass void sum(int len, int start) { if ( start == num_size ){ //goto the last one ...
ALGO
0.999827
3.886091
c399ef61-93c7-4ba0-a6d0-7657596cc4a3
AospEnhanced/android_frameworks_av
media/libeffects/lvm/lib/Common/src/LVC_Core_MixSoft_1St_2i_D16C31_WRA.cpp
/********************************************************************************** INCLUDE FILES ***********************************************************************************/ #include "LVC_Mixer_Private.h" #include "LVM_Macros.h" #include "ScalarArithmetic.h" static inline LVM_FLOAT ADD2_SAT_FLOAT(LVM_FLOAT...
ALGO
0.997332
5.816474
ff6b305e-c38b-4ff4-a2fc-fd6ac23c86ff
ishandutta2007/codeforces
klimoza/normal/1285/C.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <math.h> #include <cmath> #include <vector> #include <algorithm> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <cassert> #include <random> #include <deque> #include <bitset> #include <string> #include <queue> #inclu...
ALGO
0.999962
4.787621