uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
f3e7f7f6-32dc-4a73-bae7-c28801df5660
Premkumar981/DSA_Daily_Problems
merge two arrays into a single sorted array that will be used for further analysis.cpp
#include <iostream> int* mergeSortedArrays(const int* arr1, const int* arr2, int size1, int size2, int& mergedSize) { int* mergedArr = new int[size1 + size2]; int i = 0; // Pointer for arr1 int j = 0; // Pointer for arr2 int k = 0; // Pointer for mergedArr // Merge the arrays until one of t...
ALGO
0.999982
5.824153
c2cc2190-22a1-4966-abe4-96d8f90912c8
HansungJang/Data_Algo_review
Coding_Test_youtube/Djikstra/1753_2trial.cpp
/* 1. ̵ - 2 迭 ȰϿ graph - weight () - 湮 * node heap ߰ (visit heap) - while loop ؼ heap ݺ - ũ - ġ ʱȭ - node heap ߰ 2. ð⵵ - O(V^2) , "" - GPT ؼ , ڵ ð⵵ **\(O(V^2)\)** Դϴ. ܰ躰 ص帱Կ. --- ### **1. ڵ ٽ ** - ׷ **2 `vector<vector<pair<int, int>>>` (`map`)** ȰϿ ˴ϴ. - ** ġ **մϴ. **\(O(E \l...
ALGO
0.999823
5.10853
0dba2348-154f-48ac-a8d8-5627818fafe6
shannon-sys/mongodb
src/mongo/shell/mk_wcwidth.cpp
#include <wchar.h> struct interval { int first; int last; }; /* auxiliary function for binary search in interval table */ static int bisearch(int ucs, const struct interval* table, int max) { int min = 0; int mid; if (ucs < table[0].first || ucs > table[max].last) return 0; while (max...
TOOL
0.955392
6.080735
8d733c44-abb2-4fa9-b164-3fa1e158d784
manikanta2901/ubuntu
.history/codingChallenges/cpp/Codechef/longChallenges/October/ChefAndEasyQueries_20201002195823.cpp
#include<bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #define vv vector #define F first #define S second #define MP make_pair #define EXECUTE_FASTER ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define printM...
ALGO
0.999908
3.715278
ea7648fd-d6e3-40ab-bccb-8c23e928ae52
shubham-begn/DSA
TREE/Leetcode problems/Flip equivalent binary tree.cpp
bool flipEquiv(TreeNode* root1, TreeNode* root2) { if(root1==NULL && root2==NULL) return true; if(root1==NULL || root2==NULL) return false; if((root1->val==root2->val) && (flipEquiv(root1->left,root2->left) && flipEquiv(root1->right,root2->right) || (flipEquiv(root1->left,root...
ALGO
0.999932
4.876687
6683e9d6-a69a-4783-80a5-9ef402abe9f8
chrsdavis/Leetcode
102-Binary-Tree-Level-Order-Traversal/working.cpp
#include "util/common.h" // this one works class Solution { public: vector<vector<int>> levelOrder(TreeNode* root) { if(!root) return {}; vector<vector<int>> sol; queue<TreeNode*> q; q.push(root); while(!q.empty()) { int n = q.size(); // number in current level ...
ALGO
0.999932
5.939821
33e222dc-d875-4454-8bb7-10b543d30e52
rsphoenix02/Data-Structures-and-algorithms
07. Linked List/Circular Linked List/InsertAtHead.cpp
#include <iostream> using namespace std; class Node { public: int data; Node *next; Node(int d) { data = d; next = NULL; } Node() { data = 0; next = NULL; } }; void print(Node *head) { // Time Complexity O(n) if (head == NULL) { retu...
ALGO
0.99978
5.281631
2f24872d-314e-4d48-9e8b-07fb9bafd197
janaprasanna/VIT-PROJECTS
SEM3/OOPS/cc1/q1.cpp
/* Qn: Develop a function that returns through its reference parameters both the maximum and the minimum values stored in an array. */ // Program to find the minimum and maximum value in an array. #include<iostream> using namespace std; // function declaration or Function Prototype // void find_minmax(float x[],int n,...
ALGO
0.999822
5.335458
2e36e696-09b5-4453-b822-51ad3c934153
luqmanarifin/cp
Final SCPC/g_correct.cpp
#include <bits/stdc++.h> using namespace std; const int BIG = 1e7 + 6; const int N = 1e5 + 5; const long long mod = 2e9 + 89; vector<int> p; bool is[BIG]; int h[N], cnt[N]; vector<int> edge[N]; long long val[N]; int dfs(int now) { if (edge[now].empty()) { cnt[now] = 1; val[now] = p[0]; return h[now] ...
ALGO
0.999804
3.707514
33d5a0e2-63d5-42d3-a90d-a397c9498271
bhanupriyanka2/MRND_Summer_2019
DAY2/mergesort_dll.cpp
#include <stdio.h> #include <stdlib.h> struct node{ int data; struct node *next; struct node *prev; }; struct node *create_node(int data){ struct node *new_node = (struct node *)malloc(sizeof(struct node)); new_node->data = data; new_node->next = NULL; new_node->prev = NULL; return new_node; } struct node *c...
ALGO
0.99996
4.745272
10b4ef25-d10a-47d7-b9c0-0133bd38ef3e
aditya9706/Cudnn
Latest/cublas_syrk_test.cpp
#include <iostream> #include <string.h> #include "cublas.h" #include "cublas_v2.h" #define INDEX(row, col, row_count) (((col) * (row_count)) + (row)) // for getting index values matrices #define RANDOM (rand() % 10000 * 1.00) / 100 // for getting random values /* 1e-9 for converting throughput in GFLOP/sec, mult...
ALGO
0.998132
4.0355
c71f2e34-7d2e-4be7-b77e-b90f8e8b4592
BabuEshwar/CSA0431-OS
os programs/c-scan algorithm.cpp
#include<stdio.h> #include<stdlib.h> int main() { int RQ[100],i,j,n,TotalHeadMoment=0,initial,size,move; printf("Enter the number of Requests\n"); scanf("%d",&n); printf("Enter the Requests sequence\n"); for(i=0;i<n;i++) scanf("%d",&RQ[i]); printf("Enter initial head position\n"); scanf("%d",&initial); printf("Enter to...
ALGO
0.999901
3.223154
5aab4dcc-f6bb-4296-b6df-5775fa9ab1c8
abestard/Code
Matrix Exponentiation.cpp
//Matrix Exponentiation O( n^3*log(n) ) typedef vector <int> vect; typedef vector < vect > matrix; matrix identity (int n) { matrix A(n, vect(n)); for (int i = 0; i <n; i++) A[i][i] = 1; return A; } matrix mul(const matrix &A, const matrix &B) { matrix C(A.size(), vect(B[0].size())); for (int i = 0; i < C...
ALGO
0.999708
3.242025
3f781f1a-c9e2-47ed-89c0-1a932c695e9e
PKU-IDEA/OpenPARF-MLCAD2023
openparf/routing/fpga-router/src/router/tilerouter.cpp
#include "tilerouter.h" #include "router.h" #include <chrono> #include <future> #include <queue> #include "pathfinder.h" namespace router { void TileRouter::tileRoute() { auto &netlist = router->getNetlist(); for (auto net : netlist) { int source = net->getSource(); ...
ALGO
0.940372
3.984548
77c564de-89ac-440e-8406-811e95764c50
icepack/Trilinos
packages/anasazi/src/ModalAnalysisSolvers/BlockDACG.cpp
// This software is a result of the research described in the report // // "A comparison of algorithms for modal analysis in the absence // of a sparse direct method", P. Arbenz, R. Lehoucq, and U. Hetmaniuk, // Sandia National Laboratories, Technical report SAND2003-1028J. // // It is based on the Epetra, ...
ALGO
0.997249
5.236085
7d41cf68-7a94-4e36-929a-84c3bd6a7f0a
linhnvhdev/Doi_tuyen_quoc_gia
DoiTuyenQuocGia/ThayThai/2216.cpp
#include<bits/stdc++.h> #define For(i,a,b) for(int i = a;i <= b;i++) #define Forr(i,a,b) for(int i = a;i >= b;i--) #define maxn 1005 #define pii pair<int,int> #define fi first #define se second #define ll long long #define INF 1e18 using namespace std; int m,n,q; ll a[2*maxn][2*maxn],sum[2*maxn][2*maxn]; void copyto(...
ALGO
0.999617
4.008666
f6954ed1-8e09-4511-b3db-49e3060fc422
kmjp/procon
codeforce/621-660/660/c2.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
ALGO
0.999928
3.944032
7942d1b9-d86f-4974-868f-b0ff334ce1a0
BRIJESH6063/DataStructures
Graph January 2023/Shortest Path/shortPathBinaryMaze.cpp
#include<bits/stdc++.h> #include<time.h> using namespace std; // Shortest distance in binary maze .. // Dijkstras Algorithm Shortest path // priority_queue<dist, row, col> NOT REQUIRED.., 4 directions <--, | , --> int shortestPath(vector<vector<int>> &grid, pair<int, int> src, pair<int, int> dest) { if(grid[src....
ALGO
0.999867
4.350107
cee81584-8720-43c6-bc16-b00cc49764c9
songron/leetcode
c++/convert-sorted-array-to-binary-search-tree.cpp
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { private: TreeNode *convertHelper(vector<int> &num, int start, int end) { // https://oj.leetcode.com/problems/...
ALGO
0.999969
6.260058
9b008714-5178-4a61-b9c6-fc839c2227c5
juntawu/Code
Examination/MeiTuan/MinSum.cpp
#include <iostream> #include <vector> using namespace std; /* // 美团 2018-10-09 笔试题:优惠券满减 题目:有一个满X减10的优惠券,一共n个商品,每个只能选择一次,求能使用优惠券的最小价格。就是求n个数选任意几个加起来最接近X且大于等于X的数。1<X<10000,1<n<100,每个商品价格小于等于100。 测试用例 输入:5 20 19 18 17 6 7 输出:23 */ // 实现一:用sums记录下前k个菜品可能出现的价格和,根据前k个的结果与第k+1个的价格得到前k+1个菜品的可能出现的价格和 int MinSum_one(vecto...
ALGO
0.999776
3.840248
e1775519-1662-4638-a917-db9fc6e403c6
stoyan-vr/CPP-Exercises
Chapters 4-17/Exercise06_35.cpp
#include <iostream> using namespace std; void intersectingPoint(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double& x, double& y, bool& isIntersecting) { double a = (y1 - y2); double b = -(x1 - x2); double c = (y3 - y4); double d = -(x3 - x4); double e = (y1 - y2...
ALGO
0.999393
4.707225
c5a64cdb-1b5e-41d7-85eb-db5ea1cb9d4b
stm32-hotspot/stm32wb-matter-device-over-thread
Middlewares/Third_Party/connectedhomeip/src/lib/support/verhoeff/Verhoeff16.cpp
/** * @file * This file implements an object for Verhoeff's check-digit * algorithm for base-16 strings. * */ #include "Verhoeff.h" #include <stdint.h> #include <string.h> #ifndef VERHOEFF16_NO_MULTIPLY_TABLE const uint8_t Verhoeff16::sMultiplyTable[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...
ALGO
0.965346
6.897931
103da561-01b2-4a1b-8a31-4424eecdb72b
0xEbrahim/LeetCode-Grind
647-Palindromic-Substrings.cpp
class Solution { public: int countSubstrings(string s) { int n = s.size(); vector<vector<int>>dp(n + 1, vector<int>(n + 1, 0)); for(int i = 0 ; i < n ; i++) dp[i][i] = 1; for(int i = n - 1 ; ~i ; i--){ for(int j = 0 ; j < n ; j++){ if(i >= j){ ...
ALGO
0.999945
6.012418
29840bb9-cbb1-44d0-a8e2-bc546793e3b8
Phanthuanthanh/Phanthuanthanh_ENGKS24B_C_Session-12
Lession 12_Lesson 09.cpp
#include <stdio.h> void addALLItem(int arr[100][100], int n, int m) { for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { printf("Phan tu thu arr[%d][%d]: ", i, j); scanf("%d", &arr[i][j]); } } } void showItems(int arr[100][100], int n, int m) { printf("Ma t...
ALGO
0.956377
3.17497
3c9d48f8-ca60-4f74-a991-734aa7d0b557
HekpoMaH/Olimpiads
grupa B/esenen turnir/2012/maxsum.cpp
#include<iostream> #include<algorithm> using namespace std; int it[2009]; int n; int a[109],i,j,k,ans,curr; int get(int idx){ int re=0; while(idx>0)re=max(re,it[idx]),idx-=(idx&-idx); return re; } void upd(int idx,int what){ while(idx<=2000){ it[idx]=max(it[idx],what); idx+=(idx&-idx); } } in...
ALGO
0.99996
3.212834
f07d197b-3cac-48a3-bf2a-abdc90e5dd49
bablilayoub/cpp
cpp02/ex03/bsp.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* bsp.cpp :+: :+: :+: ...
ALGO
0.997564
5.185915
af03eb4e-cfa5-4a3d-9d08-8383291f4f4e
jamiedonnelly-px/py-manifold
3rd_party/libigl/include/igl/cut_mesh_from_singularities.cpp
#include "cut_mesh_from_singularities.h" #include <igl/triangle_triangle_adjacency.h> #include <igl/edge_topology.h> #include <vector> #include <deque> namespace igl { template < typename DerivedV, typename DerivedF, typename DerivedM, typename DerivedO > class MeshCutter { protected: const Eig...
ALGO
0.970356
5.912714
2df8fbca-919b-4d9e-9729-bc475fb1d824
manikanta2901/ubuntu
.history/SRM/DAA/Algorithms/Backtracking/SubsetSum_20210523140702.cpp
#include<bits/stdc++.h> using namespace std; void PrintSubSet(vector<int> result){ cout << "Total number of subsets are " << result.size() << " -----> " << endl; for(auto i : result){ cout << j << " "; cout << endl; } } void GetPossiblities(vector<int>numbers,int sum,int Requir...
ALGO
0.999325
4.175202
75a9f99b-cad0-4bcd-b53d-cf9ff020b388
sarvex/leetcode-ksh
solution/0100-0199/0199.Binary Tree Right Side View/Solution.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.999946
6.50406
ba63c09b-07bb-45d0-80c2-445a849b9015
mizuirorivi/kyopuro
ABC139proE.cpp
#include<bits/stdc++.h> using namespace std; #define ALL(v) (v).begin(),(v).end() #define REP(i,p,n) for(int i=p;i<(int)(n);++i) #define rep(i,n) REP(i,0,n) #define SZ(x) ((int)(x).size()) #define debug(x) cerr << #x << ": " << x << '\n' #define INF 999999999 typedef long long int Int; typedef pair<int,int> P; using ll...
ALGO
0.999977
3.716874
d46f1db9-4f3b-4d65-aabd-f6127f1a57e2
ArcSung/OpenCVSaliency
main.cpp
#include<iostream> #include<opencv2/core/core.hpp> #include<opencv2/highgui/highgui.hpp> #include"PreGraph.h" using namespace std; using namespace cv; Mat image; bool backprojMode = false; bool selectObject = false; int trackObject = 0; Point origin; Rect selection; Mat Gradient_Map(const Mat Src) { Mat gray_img,...
ALGO
0.934027
4.02845
a099d469-7b66-4a9b-80a7-1cd69744d889
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_12416_8.cpp
#include <bits/stdc++.h> using namespace std; namespace IO { const int BUFFER_SIZE = 1 << 15; char input_buffer[BUFFER_SIZE]; int input_pos = 0, input_len = 0; char output_buffer[BUFFER_SIZE]; int output_pos = 0; char number_buffer[100]; uint8_t lookup[100]; void _update_input_buffer() { input_len = fread(input_buffe...
ALGO
0.999868
3.904749
5d158d3b-1825-49a9-b6d3-e86e37fdbb80
dor666/piglit
tests/glean/geomutil.cpp
// geomutil.cpp: frequently-used geometric operations #include "geomutil.h" #include "rand.h" #include <cassert> #include <algorithm> #include <cmath> #include <float.h> #include <stdio.h> using namespace std; namespace GLEAN { /////////////////////////////////////////////////////////////////////////////// // Rand...
ALGO
0.973702
7.10059
53e21d32-4688-492f-bfdd-5504ef0c5807
zhangxueyangjuxie/ALIZE
LIA_RAL-master/LIA_Utils/FusionScore/src/FusionScore.cpp
#if !defined(ALIZE_FusionScore_cpp) #define ALIZE_FusionScore_cpp #include <iostream> #include <fstream> // pour outFile #include <cstdio> // pour printf() #include <cassert> // pour le debug pratique #include <cmath> #include "FusionScore.h" #include <liatools.h> using namespace alize; using namespace std; //---...
ALGO
0.994487
4.406013
1a8da10f-4237-43d9-bb5b-6807b3ceaab1
MSKim0215/Algorithm
프로그래머스/lv0/120889. 삼각형의 완성조건 (1)/삼각형의 완성조건 (1).cpp
#include <string> #include <vector> #include <algorithm> using namespace std; int solution(vector<int> sides) { sort(sides.begin(), sides.end()); int sum = 0; for(int i = 0; i < sides.size() - 1; i++) { sum += sides[i]; } return (sum > sides[sides.size() - 1]) ? 1 : 2; }
ALGO
0.996557
4.408718
cc3cbe8e-5b48-4353-b6e7-89534eef5cdc
3xp10it3r/LeetcodeByDG
Google-Interview-Preparation_PREMIUM/1263-number-of-dice-rolls-with-target-sum/number-of-dice-rolls-with-target-sum.cpp
class Solution { public: int dp[31][1001]; const int MOD = 1e9 + 7; int helper(int level, int target, int n, int k) { if(level > n) return 0; if(level == n) { if(target == 0) return 1; return 0; } if(dp[level][target] != -1) return dp[level][target]...
ALGO
0.999997
5.719237
ddc99feb-e7d1-4cfb-bd6b-4ee4bcd6c8b7
Priyanshsoniii/DSA
1029-vertical-order-traversal-of-a-binary-tree/vertical-order-traversal-of-a-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.999998
6.184902
b0b5172d-1fc3-4c9e-85b0-07fdc30832f6
ishandutta2007/codeforces
uryuuu/normal/1117/E.cpp
#include<iostream> #include<stdio.h> #include<cstdio> #include<vector> #include<algorithm> #include<cstring> #include<cmath> #include<queue> #include<string> #include<stack> #include<set> #include<map> #include<bitset> #include<unordered_map> #include<time.h> #include<cstdlib> #include <chrono> #include <random> typede...
ALGO
0.999969
3.354899
eb273b19-8631-4974-97e8-73ddccb80a19
CarterKekoa/AlgorithmAnalysis
adjacency_matrix.cpp
//---------------------------------------------------------------------- // NAME: Carter Mooring // FILE: adjacency_matrix.cpp // DATE: Feb. 4th, 2021 // DESC: Implements the public and private functions specified in // adjacency_matrix.h using the provided member variables. Note // that you cannot modi...
ALGO
0.977564
6.030481
55c0683e-14d7-45fa-9eaa-4c6cdb084075
mac9692/PLATEER_STUDY
Ahnhyunwoo/2022-03-31.cpp
#include <string> #include <vector> #include <cstring> using namespace std; char name[8]={'A','C','F','J','M','N','R','T'}; bool check[8]; vector<string>info; int count=0; vector<char>ans; bool game2(char a,char b,char c,int d){ int anum=0; int bnum=0; for(int i=0;i<ans.size();i++){ if(ans[i]==a){ ...
ALGO
0.999646
3.828539
ea98031d-4f95-482d-adcb-5999627ca00f
beeplovsharma/Coding-Mania
2870-longest-alternating-subarray/longest-alternating-subarray.cpp
class Solution { public: int alternatingSubarray(vector<int>& nums) { int ans = 0; int n = nums.size(); for(int i=0;i<n-1;i++){ int curLen = 1; int next = nums[i]; int add = 1; for(int j=i+1;j<n;j++){ next += add; ...
ALGO
0.999969
5.110071
1dcf97e7-34de-41b9-a94b-1ca3c8d9271a
vamcrizer/cpp-ptit
vam/kiem_tra_so_nguyen_to.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; bool nt(int n){ for (int i = 2; i <= sqrt(n); i++){ if (n % i == 0){ return false; } } return n > 1; } int main(){ int n; cin >> n; if (nt(n)){ cout << "YES"; }else { cout << "NO"; ...
ALGO
0.999883
5.257537
fe679dc8-f139-4147-895a-cf1126312559
zimpha/acm-icpc
ZOJ/vol08/ZOJ_1787.cpp
#include <cstdio> #include <cstring> #include <algorithm> const int MAXN=10005; const int inf=1000000; struct node { int l, m; }; node block[MAXN]; int f[MAXN]; int n; bool cmp(node a, node b) { if (a.l==b.l) return (a.m<b.m); else return (a.l<b.l); } int find(int l, int r, int x) { while (l<=r) { int m=(l+...
ALGO
0.999863
3.21417
6eceefe2-e912-4aaf-96aa-2b1f707d7310
AOSP-CAF/platform_frameworks_av
media/libstagefright/codecs/amrnb/dec/src/ph_disp.cpp
/*---------------------------------------------------------------------------- ; INCLUDES ----------------------------------------------------------------------------*/ #include "ph_disp.h" #include "typedef.h" #include "basic_op.h" #include "cnst.h" /*------------------------------------------------------------------...
ALGO
0.989946
6.393695
efece4f5-a156-422f-8633-aa9d505df26b
thinker99k/BOJ-24summer
240714/2606.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; vector<int> Vertex[101]; bool visited[101]; int V, E, fromV, toV; int t = 0; void bfs(int sEdge) { queue<int> q; q.push(sEdge); visited[sEdge] = true; while (true) { int x = q.front(); ...
ALGO
0.999906
4.292334
0a2b60f7-3252-4a50-b1f8-f8d0a64b22d7
lych4o/competitive-programming
wanafly1901/day1/c1.cpp
#include<stdio.h> #include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn=1e9+7; const int mod=1e5+7; int main(){ int t; scanf("%d",&t); while(t--){ ll a,b; scanf("%lld%lld",&a,&b); if(__gcd(a,b)==1){ printf("1\n%lld %lld\n",a,b); } ...
ALGO
0.999444
4.306603
3f4970ee-a5bd-4a5c-a6c5-02a3c86179be
Y3U18/ollvm-poject
libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/pred.pass.cpp
// UNSUPPORTED: c++03, c++11, c++14 // XFAIL: stdlib=libc++ // <functional> // boyer_moore_horspool searcher // template<class RandomAccessIterator1, // class Hash = hash<typename iterator_traits<RandomAccessIterator1>::value_type>, // class BinaryPredicate = equal_to<>> // class boyer_moore_horspoo...
TEST
0.885058
6.567486
2e0dc93d-64cc-4e28-baf1-e37242ef8bdd
Pradyumn1729/BinarySearch
InfiniteArray.cpp
#include<bits/stdc++.h> using namespace std; int binarySearch(int arr[], int low, int high, int x) { while (low <= high) { // Find index of middle element int mid = (low + high) / 2; // Check if x is present at mid if (arr[mid] == x) return mid; // If x gre...
ALGO
0.999619
4.252225
a233d79c-fa3c-4971-9495-1178c6964a2b
kaluginpeter/Algorithms_and_structures_tasks
Yandex/Practicum/Algorightms_and_Data_Structures/8_sprint/L._Подсчёт_префикс-функции/solution.cpp
#include <iostream> #include <string> #include <vector> void solution() { /* Time Complexity O(N) Memory Complexity O(N) */ std::string a; std::cin >> a; int n = a.size(); std::vector<int> lcp (n, 0); for (int i = 1; i < n; ++i) { int k = lcp[i - 1]; while (k && a[k]...
ALGO
0.999954
5.161102
5a2bd5b9-bb61-4a02-bc89-e6e16a8030cd
Aman18111625/LeetCode-Solutions
0334-increasing-triplet-subsequence/0334-increasing-triplet-subsequence.cpp
class Solution { public: // Brute-Force : // bool increasingTriplet(vector<int>&nums) { // int n=nums.size(); // vector<int>leftMin(n),rightMax(n); // leftMin[0]=nums[0]; // for(int i=1;i<n;i++) leftMin[i]=min(leftMin[i-1],nums[i]); // rightMax[n-1]=nums[n-1]; // for(int i=n-...
ALGO
0.999973
5.881282
555d9b90-d0aa-4ab2-ad9e-5a2ddfa96ac3
OneBitPython/Codechef
DecemberLongContest/Utkarsh_and_Placement_tests.cpp
#include <bits/stdc++.h> using namespace std; void solve() { vector<char> preferences(3); for (int i = 0; i <3;++i){ cin >> preferences[i]; } char x,y ; cin >> x >> y; for (auto &p : preferences){ if (p == x || p==y){ cout << p << endl; break; } ...
ALGO
0.999711
4.262519
7714f599-02b3-42e0-8c1b-4c8c6247cc3f
sarvex/leetcode-raku
solution/2600-2699/2608.Shortest Cycle in a Graph/Solution.cpp
class Solution { public: int findShortestCycle(int n, vector<vector<int>>& edges) { vector<vector<int>> g(n); for (auto& e : edges) { int u = e[0], v = e[1]; g[u].push_back(v); g[v].push_back(u); } const int inf = 1 << 30; auto bfs = [&](in...
ALGO
0.999935
5.564388
9fe3a29a-c861-4f66-99c5-c07d5bb52b62
BLUEMOON233/code-deprecated
competition/cpp/nowcoder/duoxiao07/Beautiful_Sequence.cpp
#include<bits/stdc++.h> using namespace std; typedef long long LL; typedef unsigned int UI; typedef pair<int, int> PII; #define endl '\n' #define rep(i,j,k) for(int i=int(j);i<=int(k);i++) #define per(i,j,k) for(int i=int(j);i>=int(k);i--) #define mes(tmp, data) memset(tmp, data, sizeof tmp) #define debug(x) cerr << "(...
ALGO
0.999931
3.977236
8c39ee21-7a46-4509-95e1-270b89057308
Soroar-Mia/xpsc-code
practies/B - B2.cpp
///******** Bismillahir Rahmanir Rahim ******* #include<bits/stdc++.h> using namespace std; #define ll long long int int main() { int t; cin>>t; while(t--) { string s; cin>>s; int n=s.size(); int one=0; int zero=0; for(int i=0; i<n; i++) { ...
ALGO
0.999939
4.280365
9839fabe-e4ec-4a5e-88d4-a9754a9f34a8
MirazShahin/DP
Frog jumps 1 or 2 steps.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; int const MOD = 1e9 + 7; int ans(int i, vector<int> &dp, vector<int> &v) { int n = v.size(); if(i >= n - 1) { return 0; } if(dp[i] != -1) { return dp[i]; } return dp[i] = min(ans(i + 1, dp, v) + abs(v[i] - v[i +...
ALGO
0.999941
4.997098
2113df0b-eac5-4da2-8a3a-86991f768353
jiyojolly/NCS_InvertedPendulum
truetime-2.0/kernel/matlab/ttCreateTask.cpp
#define KERNEL_MATLAB #include "../ttkernel.h" #include "../createtask.cpp" #include "getrtsys.cpp" #include "../checkinputargs.cpp" void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] ) { rtsys = getrtsys() ; // Get pointer to rtsys if (rtsys==NULL) { return; } ...
TOOL
0.927441
5.648171
110881fa-6af1-4771-8dc6-005c21537446
stujbrown/AdventOfCode_2024
src/days/day16.cpp
#include "aoc_days.h" #include "vec2.h" #include <vector> #include <list> #include <set> namespace { struct State { Vec2 pos; Vec2 dir; size_t cost; std::vector<State*> parents; }; struct StateSetCompare { constexpr inline bool operator()(const State* lhs, c...
ALGO
0.999484
6.369455
9f7cfba2-99cf-4e41-984f-07f43b779e1e
vivekjain0611/Codeforces_contest_submissions
codeforces/table-decoration.cpp
#include<bits/stdc++.h> using namespace std; #define fastio ios_base::sync_with_stdio(0);cin.tie(0); #define int long long int #define dbg(x) cout << '>' << #x << ':' << x << endl; #define M 1000000007 int32_t main() { fastio #ifndef ONLINE_JUDGE freopen("F:\\cp\\input.txt","r",stdin); freopen("F:\\cp\...
ALGO
0.999884
3.87243
f2c6d9e0-6f64-43db-a3fd-a868237e4f74
pavel-ryzhov/global_vars
runs/003262.cpp
#include <vector> #include "math.h" #include "stdio.h" #include <list> #include <cstring> using namespace std; const unsigned MAX_VERTEX_COUNT = 40000; const unsigned MAXLIST = MAX_VERTEX_COUNT * 2; const unsigned LOG_MAXLIST = 17; const unsigned SQRT_MAXLIST = 283; const unsigned MAXBLOCKS = MAXLIST / ((LOG_MAXLIST...
ALGO
0.999922
4.444977
1fb2b5a3-783c-41f8-ab85-78a1db555869
ankit7248/Dsa_Basic_Ques_Abdul_Bari
structparameter.cpp
#include <iostream> using namespace std; struct rectangle { int length; int breadth; }; void change(struct rectangle *p) // call by address { p->length = 20; } int main() { struct rectangle r = {10, 5}; cout << "value of length " << r.length << endl; change(&r); cout << "modify the valu...
TOOL
0.961555
4.506277
faaae4eb-21fa-4535-bc9d-7bcff6054611
bsc-mem/Mess-Paraver
libs/boost_1_79_0/libs/regex/example/grep/grep.cpp
#include <boost/regex.hpp> #include <iostream> #include <fstream> #include <string> #include <vector> #ifdef BOOST_MSVC #pragma warning(disable:4512 4244) #endif #include <boost/program_options.hpp> namespace po = boost::program_options; int after_context; int before_context; bool print_byte_offset; bool count_only...
TOOL
0.928825
6.471102
2e9eb5f9-7cae-4721-aef5-7fb3cc98b877
ishandutta2007/codeforces
maksim1744/normal/754/C.cpp
/* author: Maksim1744 created: 07.09.2020 15:10:03 */ #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define mp make_pair #define pb push_back #define eb emplace_back #define sum(a) ( accumulate ((a).begin(), (a).end(), 0ll)) #define mine(a) (*mi...
ALGO
0.999849
4.395425
9af06d1c-d8d9-4535-bab7-b9a0809879c3
utkarshmaken/cp
inter iit 2019/wells fargo/3.cpp
//MINIMUM MERGE OP TO MAKE ARRAY PALINDROME #include <bits/stdc++.h> typedef long long ll; typedef long double ld; #define f(i,a,b) for(int i = a;i<b;i++) #define rep(i,a,b) for(int i = a;i<=b;i++) #define fd(i,a,b) for(int i = a;i>b;i--) #define repd(i,a,b) for(int i = a;i>=b;i--) #define pii pair<int,int> #define...
ALGO
0.999903
4.038189
82ad7922-9e1e-4947-9c54-6a560f8f42c2
jamarshon/Leetcode
20-29/24SwapNodesinPairs.cpp
/* 24. Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your algorithm should use only constant space. You may not modify the values in the list, only nodes itself can be changed. /* Submission Dat...
ALGO
0.999967
6.339814
1914b82d-c629-4a0a-8aa5-16dbe62974e0
jchoby21/Joecoin
src/bitcoinrpc.cpp
#include "init.h" #include "util.h" #include "sync.h" #include "ui_interface.h" #include "base58.h" #include "bitcoinrpc.h" #include "db.h" #include <boost/asio.hpp> #include <boost/asio/ip/v6_only.hpp> #include <boost/bind.hpp> #include <boost/filesystem.hpp> #include <boost/foreach.hpp> #include <boost/iostreams/con...
WEB
0.963125
4.739603
242aa924-e1c1-4a3e-b8cd-3ba3ba5ea833
daniel-maxwell/LC
0238-product-of-array-except-self/0238-product-of-array-except-self.cpp
class Solution { public: vector<int> productExceptSelf(vector<int>& nums) { int prefix = 1; vector<int> result (nums.size(), 0); for (int i = nums.size() - 1; i >= 0; --i) { if (i < nums.size() - 1) { result[i] = nums[i] * result[i + 1]; } els...
ALGO
0.999974
6.232512
99e15030-fcc2-492e-83e4-a1b31ffa34d4
cakogix/learn
algorithm/leetcode/leetcode0682.cpp
using namespace std; #include <algorithm> #include <array> #include <bitset> #include <climits> #include <deque> #include <functional> #include <iostream> #include <list> #include <queue> #include <stack> #include <tuple> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> class Solu...
ALGO
0.999753
5.22338
ca0c4aee-7887-4185-8e72-d389d38a44c5
zeusptit/Hackerrank
Sort and Search/14. Vắt sữa bò.cpp
#include <bits/stdc++.h> using namespace std; #define quick() ios_base::sync_with_stdio(false); cin.tie(0); using ll = long long; int main() { quick(); int n;cin >> n; int a[n]; ll sum = 0; for(int &x : a)cin >> x; sort(a, a + n, greater<int> ()); for(int i = 0; i < n; i++) { ...
ALGO
0.999838
3.775672
bebff091-66d9-499e-a418-423f11d3f096
ishandutta2007/codeforces
ehnryx/normal/758/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll citizens, temp, ans; ll cap = -1; vector<ll> welfare; cin >> citizens; for (int i = 0; i < citizens; i++) { cin >> temp; welfare.push_back(temp); if (cap < temp) cap = temp; } for (int i = ans = 0; i < citizens; i++) {...
ALGO
0.999866
3.483258
5f894947-de01-4300-8c2f-1973ade00f3b
Joey-Yang22/AC-System-Temperature-Controlled-Fan
fan_main.cpp
// C++ code // /* Name: Joey Yang | Email: <EMAIL> Description: This exercise implements AUTO mode functionality. Measure the temperature using the thermistor. Display the temperature in degrees Fahrenheit (e.g., 70º F) on the second row of the LCD Screen. Update the temperature every 1 second ...
ALGO
0.968645
6.933108
155171ae-f54c-4f7f-8f5d-948fc5dea52f
Tajam/game-physics
src/Box2D/Dynamics/Contacts/b2PolygonContact.cpp
#include <Box2D/Dynamics/Contacts/b2PolygonContact.h> #include <Box2D/Common/b2BlockAllocator.h> #include <Box2D/Collision/b2TimeOfImpact.h> #include <Box2D/Dynamics/b2Body.h> #include <Box2D/Dynamics/b2Fixture.h> #include <Box2D/Dynamics/b2WorldCallbacks.h> #include <new> b2Contact* b2PolygonContact::Create(b2Fixtur...
ALGO
0.983738
7.290236
98c7b866-c866-453c-b150-c6e2ad48a3c5
KillerTouch/flutter---attendance-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.998859
6.785645
0db1c4eb-3189-4015-91be-76176c70feb1
khyathi-29/Leetcode
739-daily-temperatures/daily-temperatures.cpp
class Solution { public: // use monotonic stack to present temparatures like next element and stuff vector<int> dailyTemperatures(vector<int>& temparatures) { vector<int> ans(temparatures.size(),0); stack<pair<int,int>> st; st.push(make_pair(temparatures[0],0)); for(int i=1 ; i<tempa...
ALGO
0.99996
6.366229
8d6208ab-56ec-493a-b094-c32c7b4d0440
fepaf/Competitive-Programming
Resoluções OJ/codeforces/Rounds/601 div2/a.cpp
#include<bits/stdc++.h> #define _ ios_base::sync_with_stdio(0); #define endl '\n' #define INF 0x3f3f3f3f #define MAX (1<<20) #define i64 long long #define all(x) (x).begin() , (x).end() #define sz(x) (int)(x).size() #define ii pair<int, int> #define fs first #define sc second #define eb emplace_back #define vi vector<i...
ALGO
0.999517
4.123351
8850b7ea-7c88-46cb-ba40-30c8f02895e4
Sanmati-Nikam/Leetcode
search_2d_matrix.cpp
class Solution { public: bool searchMatrix(vector<vector<int>>& matrix, int target) { for(int i=0;i<matrix.size();i++){ if(matrix[0].size() == 1){ if(matrix[i][0] == target) return true; continue; } if(target>matrix[i][...
ALGO
0.999978
6.052527
8036caca-187f-499a-ab3d-2327674d4477
Romlah24/first_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.998733
6.76775
987cffd8-7410-47a2-aa50-337a203df404
bsatrom/Particle_TensorFlowLite
src/tensorflow/lite/experimental/micro/kernels/comparisons.cpp
#include "tensorflow/lite/kernels/internal/reference/comparisons.h" #include "tensorflow/lite/c/c_api_internal.h" #include "tensorflow/lite/kernels/internal/quantization_util.h" #include "tensorflow/lite/kernels/internal/tensor_ctypes.h" #include "tensorflow/lite/kernels/kernel_util.h" namespace tflite { namespace op...
ALGO
0.948689
4.502176
7f5f9c65-f8c7-4414-8363-6c8b4726248b
BeauJoh/MedialAxisTransform
medialAxisTransform/marchingcubes.cpp
#include <cmath> #include "marchingcubes.h" vector<vertex> vertexList; vertex interpolate(double isolevel, vertex p1, vertex p2, int valp1, int valp2) { if(fabs(isolevel - valp1) < 0.00001) return p1; if(fabs(isolevel - valp2) < 0.00001) return p2; if(fabs(valp1 - valp2) < 0.00001) ...
ALGO
0.999894
5.3187
dd789ca2-5b25-4eaa-9e93-f01ac8adc801
cherrytomato1/C-Algorithm
visual_studio_0001~0054/알고리즘/0035_200504_2193_이친수.cpp
/* 1. ȭ -> d[N][0] = d[n-1][0] + d[n-1][1] d[N][1] = d[n-1][0] 2. ̸ ϸ d[N] = d[N][0]+d[N][1] = d[N][1]+ d[N-1][0] + d[N-1][1] = d[N][1]+ d[N-1][1] + d[N-2][1] .... ʱⰪ d[1],d[2] 1,1 ̹Ƿ ̴ Ǻġ ̴. Ǻġ ε ذ ִ */ #include<iostream> using namespace std; unsigned long long d[90 + 1][2]; uns...
ALGO
0.999974
3.863955
9103fce9-e804-482c-b099-f7ec4dd2cf7f
khaledsliti/CompetitiveProgramming
IFHLC/2020/Indiv/IFHLC#01/C.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define endl '\n' #define D(x) cerr << #x << " = " << (x) << '\n' #define sz(x) ((int)(x).size()) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() typedef long long ll; const int N = 1001; int main() ...
ALGO
0.999938
4.097338
26763ec6-c978-4f0b-888b-8db7d1535244
Lunatalied/Cpp_Practices
Practice8/List.cpp
// // Created by lutsi on 08.01.2022. // #include "List.h" #include <iostream> List::List(){ head = nullptr; count_of_elem = 0; } int List::getCount(){ return count_of_elem; } bool List::isEmpty(){ return (count_of_elem == 0); } int List::getValue(Node* ptr){ return (*ptr).value; //ptr->value }...
TOOL
0.96354
3.652671
dfb94848-bb3a-4f22-89d6-6a7c42d8b551
Debangshu-Banerjee/minor_lab
4.cpp
#include<bits/stdc++.h> using namespace std; double cal (double x){ double temp= (double)exp(2.0*x)*(double)sin(3.0*x); return temp; } double intr(double a,double b){ double mid=(a+b)/(double)2.0; double temp= cal(a)+(double)4.0*cal(mid)+cal(b); temp=temp*(b-a)/(double)6.0; return temp; } dou...
ALGO
0.999939
3.87053
5e53c81a-6a24-4392-aed1-12ac377e90a5
dhanu-05/JN-02-Dhanashree
I_p converter.cpp
#include<iostream> #include<stack> using namespace std; // defines the Boolean function for operator, operand, equalOrhigher precedence and the string conversion function. bool IsOperator(char); bool IsOperand(char); bool eqlOrhigher(char, char); string convert(string); int main() { string infix_...
ALGO
0.999864
4.928408
7cedad41-53be-4fc1-b53b-ebdc595da5bd
creydit/cd-assignment
libc/src/math/amdgpu/acosf.cpp
#include "src/math/acosf.h" #include "src/__support/common.h" #include "declarations.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(float, acosf, (float x)) { return __ocml_acos_f32(x); } } // namespace LIBC_NAMESPACE_DECL
TOOL
0.872382
6.30589
75e69d7e-97e7-4620-b33c-85f292531a50
Hossain-Sabrina/CSE1230-Computer-Programming-Course
Practices/123.cpp
#include<bits/stdc++.h> #include<cmath> using namespace std; int main() { double a; cout.precision(5); cout.setf(ios::right); cout<<"log log10(a)"<<endl; for(a=2; a<=100; a++) { cout.width(10); cout<<log(a)<<" "; cout.width(10); cout<<log10(a)<<endl; } }
ALGO
0.99388
3.538113
be729a4d-492f-41d0-81a4-7a6b67022e12
arifur30/Codeforces-Submissions
A_Spy_Detected_XORmethod.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; #define YES cout << "YES\n" #define NO cout << "NO\n" #define nl "\n" int main() { ios::sync_with_stdio(false); cin.tie(0); ll t; cin>>t; while (t--) { ll n; cin >> n; ...
ALGO
0.999984
4.476843
bcee17dd-6df0-4dd5-949a-bc588ed68d51
razzie/hobby-projects
2009/Grafika/hazi_4b.cpp
# include "graphics.h" # include <stdlib.h> typedef struct pont { int x, y, e; } PONT; int aktiv_pont(PONT *pontok, int n, int r) { for (int i=0; i<n; i++) if ( (pontok[i].x-egerx)*(pontok[i].x-egerx) + (pontok[i].y-egery)*(pontok[i].y-egery) < r*r ) return i; return -1; } PONT metsz_illeszt(PONT p1, PON...
ALGO
0.999788
3.742084
dd0dd3ce-9257-438b-9df6-ce428b9d4f78
Sajjad617/Problem-Solving-for-Cpp
CodeForce/A_Vlad_and_the_Best_of_Five.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int #define endll '\n' #define Y cout << "A" << endll #define no cout << "B" << endll #define nl cout << endll void game() { // int n; // cin >> n; string s1; cin >> s1; int a = 0; for(auto x : s1) { if(x=='A') ...
ALGO
0.997107
4.273666
61510641-6b53-4482-9ead-20ad5ee15e41
Zerokei/Simple-Meshware
vs Project/vcglib/apps/sample/trimesh_refine/trimesh_refine.cpp
#include<vcg/complex/complex.h> #include <vcg/complex/algorithms/update/topology.h> #include <vcg/complex/algorithms/update/normal.h> #include <vcg/complex/algorithms/update/flag.h> #include <vcg/complex/algorithms/refine.h> #include <vcg/complex/algorithms/refine_loop.h> #include <vcg/complex/algorithms/bitquad_crea...
ALGO
0.980482
3.711415
59a3e2bd-e23a-49bb-bab1-710bf127c3f6
minhkhuong2404/codeForce
codeForce/41A/main.cpp
#include <bits/stdc++.h> using namespace std; int main() { string s,r; cin>>s>>r; int count = 0; for ( int i = 0; i < s.length();i++){ if (s[i] == r[s.length() - 1 - i]){ count += 1; } } if ( count == s.length()){ cout<<"YES"; } else{ cout<<"NO"; } return 0; }
ALGO
0.999915
3.664191
946b3130-a1a2-4b92-99d2-3a5ac6058e14
TTP1128/wangjunrui-s-code
LOJ/10200.cpp
#include<cstdio> #define re register using namespace std; template<typename T> inline void read(T&x) { x=0; char s=getchar(); bool f=false; while(!(s>='0'&&s<='9')) { if(s=='-') f=true; s=getchar(); } while(s>='0'&&s<='9') { x=(x<<1)+(x<<3)+s-'0'; s=getchar(); } if(f) x=(~x)+1; } const int N=1e6+...
ALGO
0.999762
3.594058
15dd034c-65ed-415b-8d23-ebc6d885fd9e
destripador3000/basico_cplusplus
ejercicio_26.cpp
/*Realice una matriz que calcule la suma de dos matrices cuadradas de 3x3*/ #include <iostream> #include <conio.h> #include <cmath> using namespace std; int main(){ int matriz1[100][100],matriz2[100][100]; int conteo1=0,conteo2=0,a, total; cout<<"Digite los valores de la matriz número 1: "<<endl; ...
ALGO
0.99804
3.474853
be13c374-1315-4932-aafc-8dd69ffbd450
RicoPauli/eeros
src/control/PathPlannerCubic.cpp
#include <eeros/control/PathPlannerCubic.hpp> #include <eeros/core/System.hpp> #include <iostream> #include <fstream> #include <unistd.h> using namespace eeros; using namespace eeros::control; PathPlannerCubic::PathPlannerCubic(double dt) : dt(dt), timeInterval(-dt), log('P'), posOut(this), velOut(this), accOut(this)...
ALGO
0.920969
5.167803
b16cc863-1513-4e3b-b410-dd939b0fa8f1
JoydeepMallick/CODECHEF
18.6.25 Starters 191 Div 3/grid_path_easy.cpp
/* _________________________ | Written by silent_Joy | ---------~u~--------- */ #include"bits/stdc++.h" #pragma GCC optimize("O3,unroll-loops") // #pragma GCC target("bmi,bmi2,lzcnt,popcnt") // #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") //intel pentium porcessors released post 2020 support avx2, un...
ALGO
0.999851
4.556028
ae917f3f-874a-4c81-a60c-72e289e72465
francistec/gdal-react-native
deps/libproj/proj/src/conversions/axisswap.cpp
#define PJ_LIB__ #include <errno.h> #include <stdlib.h> #include <string.h> #include "proj.h" #include "proj_internal.h" PROJ_HEAD(axisswap, "Axis ordering"); namespace { // anonymous namespace struct pj_opaque { unsigned int axis[4]; int sign[4]; }; } // anonymous namespace static int sign(int x) { ret...
ALGO
0.998012
7.581858
c6f827a9-29d5-40ce-9bfe-12654ac44666
maximshuklin/huffman-archiver
ArgumentParser.cpp
#include "ArgumentParser.h" #include <iostream> #include <vector> #include <exception> ArgumentParser::ArgumentParser(int argc, char const* argv[]) { for (size_t i = 0; i < static_cast<size_t>(argc); ++i) { keys_.push_back(argv[i]); } } bool ArgumentParser::IsEncoder() const { return Contains("-c"); } bool Arg...
TOOL
0.896092
5.273361
4347dba2-43dc-44a2-a432-9be72ad40b10
twaldecker/Mobile_Netze_HM_OpenBTS_Handover
openbts/trunk/SIP/SIPMessage.cpp
#include <stdio.h> #include <stdlib.h> #include <signal.h> #include <ortp/ortp.h> #include <osipparser2/sdp_message.h> #include <osipparser2/osip_md5.h> #include "SIPInterface.h" #include "SIPUtility.h" #include "SIPMessage.h" using namespace std; using namespace SIP; #define DEBUG 1 #define MAX_VIA 10 osip_messag...
WEB
0.88808
4.16046
9a774d3f-2892-409a-92d2-f30248225aa7
Hz188/experiments
algorithms/leetcode/0-array/pre-sum/hash-map/974.和可被-k-整除的子数组.cpp
/* * @lc app=leetcode.cn id=974 lang=cpp * * [974] 和可被 K 整除的子数组 */ // @lc code=start #include <vector> #include <unordered_map> using namespace std; class Solution { public: int subarraysDivByK(vector<int>& nums, int k) { int n = nums.size(); vector<int> pre_sum(n + 1); for (int i = 0; ...
ALGO
0.999595
6.009928
d578492c-fb61-4dd0-b4cc-e913ac984217
CHENNA-NAGESH/ATOZ-DSA
1.learn the basics/1.2 LOGICAL THINKING/star_diamond.cpp
#include<iostream> using namespace std; void nStarDiamond(int n) { // Write your code here. for(int i=1;i<=n;i++) { for(int j=1;j<=n-i;j++) { cout<<" "; } for(int j=1;j<=(2*i)-1;j++) { cout<<"*"; } cout<<endl; } for(int i=1;i<=n;i++) ...
ALGO
0.999955
4.114111
82be6108-e4f8-499e-849f-d4f93bdc134e
tao73bot/codes
codeforces_1355_A.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while(t--) { long long a,k,p,mn,mx; cin >> a >> k; while(k!=1) { p=a; mn=9,mx=0; while(p!=0) { mn=min(mn,p%10); mx=max(mx,p%10); p/=10; } if(mn*mx==0) break; a+=(mn*mx); k--; } cout << a << "...
ALGO
0.999935
4.02707