uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
ea231abb-392f-47d6-bcd1-558dce530e8d
vaibhavkashyap230/Recursion-Backtracking-and-DynamicProgramming
Tower of Hanoi.cpp
#include<stdio.h> #include<iostream> using namespace std; void toh(int n,char s,char a,char d) { if(n==0) { return; } if(n==1) { cout<<s<<"->"<<d<<endl; return; } toh(n-1,s,d,a); cout<<s<<"->"<<d<<endl; toh(n-1,a,s,d); } int main() { cout<<"Enter the number of Disks : "; int n; cin>>n; cout<<endl...
ALGO
0.999919
4.544197
717e5253-4bc8-40a7-9160-6fd3a6b4671a
ilyakudrov/observables_cluster
code/wilson_on-axis.cpp
#include "basic_observables.h" #include "data.h" #include "link.h" #include "matrix.h" #include <iostream> int x_size; int y_size; int z_size; int t_size; using namespace std; int main(int argc, char *argv[]) { unsigned int start_time; unsigned int end_time; unsigned int search_time; std::string conf_forma...
DATA
0.925636
5.022574
67f9475e-3f49-4270-b5a7-6d3f50097144
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_11712_18.cpp
#include <bits/stdc++.h> const int N = 1010; const int inf = 0x3f3f3f3f; using namespace std; int n, m; long long cnt[N][N]; char s[N][N]; long long getsum(int a, int b) { return 1ll * a * b * (a + b + 2ll) / 2ll; } struct data { int x, y; data() {} data(int x, int y) : x(x), y(y) {} } da[N]; bool cmpx(const data...
ALGO
0.999237
4.080133
9f7eea9e-66b3-40f4-bf72-7ec6d1fe365f
expect1ai/Competitive-Programing
CSES/stick length.cpp
#pragma GCC optimize("Ofast") #pragma GCC optimize("O3,unroll-loops") #include <bits/stdc++.h> #define int long long #define endl '\n' #define fastio ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0) using namespace std; signed main() { fastio; int n;cin>>n; vector<int> v(n); for(int i=0;i<n;i++) { ...
ALGO
0.999844
4.554349
2c8262e3-b229-42e2-bcb8-d8a1e9342bbb
old-yan/CP-template
TEST/oj/ysp_27.cpp
#include "IO/FastIO.h" #include "MATH/Cipolla.h" #include "MATH/DynamicMontgomeryModInt32.h" /* [Sqrt Mod](https://judge.yosupo.jp/problem/sqrt_mod)(https://github.com/yosupo06/library-checker-problems/issues/27) */ /** * 本题为二次剩余模板 */ int main() { uint32_t t; cin >> t; while (t--) { uint32_t y, ...
ALGO
0.999912
4.652833
fdb8a17a-9906-4e66-b573-fb06a5b2639a
RajDharkar/competitive-programming
Contests/USACO/Usaco Guide Gold/eulerstour/tour.cpp
// Source: https://usaco.guide/general/io #include <bits/stdc++.h> using namespace std; typedef long long ll; ll n, m; vector<ll> values; vector<ll> sum; vector<vector<ll>> adj; vector<ll> parents; vector<ll> start; vector<ll> finish; ll timer = 0; void dfs(ll node, ll parent){ start[node] = timer; timer++; ...
ALGO
0.999971
4.927267
db48808c-fe07-4897-b799-e978e876bb04
WilliamVernaschi/my_cses_solutions
Dynamic Programming/rectangle_cutting.cpp
#ifdef ONLINE_JUDGE #define debug(x...) #else #include "/home/william/cp/debug.h" #endif #include <bits/stdc++.h> using namespace std; #define PMOD(n,m) ((((n) % (m)) + m) % m) #define F first #define S second #define PB push_back #define FFIO ios_base::sync_with_stdio(false);cin.tie(NULL); typedef long long ll...
ALGO
0.999961
4.372479
4dd37d66-1fde-487c-b0e0-eb22c064e125
solankijanvi/DSA-Cpp
longest_subarray/substring/better_approach.cpp
//here we have a better approach so we have an array {2, 5, 1,7,10} and we have to check length of substring having sum >= 14 //so we use expand =rand strink=l #include<iostream> using namespace std; int main() { int n = 5, k =14; int arr[n] = {2, 5, 1, 7, 10}; int l =0, r=0, sum =0, maxlen =0; while(r...
ALGO
0.999727
4.58301
cfb17de6-9427-49d1-ae25-c0461649e7b3
venkataramanab/extra_problems
2015_30_11/asc_dsc_patterns.cpp
#include<stdio.h> #include<stdlib.h> #include<malloc.h> #include<conio.h> struct test{ int input; }test[5] = { 1234765, 1276354 }; struct node{ int data; struct node*next; }; struct node *newnode(int); void mergeSplit(node *head); node* mergeSort(node *head,node *, node *cur); void print(struct node *head); void ...
ALGO
0.999886
4.047604
02fc048c-78c7-404b-9444-d4d661f6b6c1
ianleifer/CompMeth_Leifer
courseWork/oscillator.cpp
#include "oscillator.h" #include <iostream> Oscillator::Oscillator() { } Oscillator::Oscillator(int pphaseSpaceDimensionality, double H) { setPhaseSpaceDimensionality(pphaseSpaceDimensionality); h = H; } /* In this function we can see that everything is hardcoded. When I wrote this function I meant that osci...
ALGO
0.999618
3.906893
52f13367-e3ec-4f48-bd05-033cff173c0c
akashbkrish/LeetCodes
single-number-ii/single-number-ii.cpp
class Solution { public: int singleNumber(vector<int>& nums) { int n=nums.size(); vector<int> v(32); int ans=0; for(int i=0;i<n;i++){ for(int j=0;j<32;j++){ if((1<<j) & nums[i]) v[j]++; } } for(int j=...
ALGO
0.999939
5.532701
04f56478-3f97-4270-adec-ae63d3b3ada4
iJhonne/Projeto
Sub Rotinas/Programa dobro_Ref.cpp
#include <stdio.h> #include <stdlib.h> #include <conio.h> #include <locale.h> int x; void dobro (int *n); int main (){ setlocale(LC_ALL,"Portuguese"); printf("\nPrograma Dobro.c\n\n"); x=7; printf("x=%d\n\n",x); dobro(&x); printf("x=%d\n\n",x); getch(); return 0 ; } void dobro (int *n){ printf("x=%d *n=%d\n",...
TOOL
0.886927
4.010096
265dc444-9183-42dd-8fdc-d1d4b71b2305
Pragna235/LeetCode_Problems
41. First Missing Positive.cpp
class Solution { public: int firstMissingPositive(vector<int>& nums) { int n=nums.size(); sort(nums.begin(),nums.end()); int ans=1; for(int i=0;i<n;i++){ if(nums[i]==ans){ ans++; } } return ans; } };
ALGO
0.999966
4.788975
01b020e5-4dd5-49bd-9d90-fd3ba53a8d97
moqsad/solved-problems
UVA/11062_ Andy's Second Dictionary.cpp
#include <cstdio> #include <set> #include <cstring> #include <cctype> #include <iostream> using namespace std; set <string> dictionary; set <string> :: iterator it; char arr[210], letter[210], temp[210] = "234432"; int main() { int i, j, x; while(scanf("%s", arr) == 1) { x = strlen(arr); ...
ALGO
0.983239
3.746512
86854332-8563-4da9-94c8-35c883c0aac8
nczhang88pan/KlotskiSGX
klotski/llvmProgram/libcxx/test/std/containers/associative/map/map.cons/initializer_list.pass.cpp
// UNSUPPORTED: c++98, c++03 // <map> // class map // map(initializer_list<value_type> il); #include <map> #include <cassert> #include "min_allocator.h" int main() { { typedef std::pair<const int, double> V; std::map<int, double> m = { {1, 1}...
TEST
0.869762
5.543286
1cb2ce5e-f86a-45c8-a447-431f12b4b018
teoremma/uva
00599.cpp
// SOLVED #include <bits/stdc++.h> using namespace std; int main(){ int t, e, v, a, c, dum; string s; bitset<30> bs; scanf("%d\n", &t); while(t--){ e = v = a = 0; bs.reset(); while(getline(cin, s) && s[0] != '*'){ e++; bs[s[1] - 'A'] = 1; bs[s[3] - 'A'] = 1; } dum = 0; ...
ALGO
0.999153
3.053795
afcd6ed7-0963-45b8-93c7-b27e054d1774
abhishek2208/Code
Print ancestor.cpp
#include<bits/stdc++.h> using namespace std; struct node { int data; struct node* left; struct node* right; }; struct node* newnode(int d) { struct node* root=(struct node*)malloc(sizeof(struct node)); root->data=d; root->left=NULL; root->right=NULL; }; bool ancestor(struct node* root,int k...
ALGO
0.999968
3.182278
b6cf0d7b-2e15-4f96-a2a3-a837fdc5c0c3
swag-lang/swag
llvm/lldb/source/Host/windows/Host.cpp
#include "lldb/Host/windows/AutoHandle.h" #include "lldb/Host/windows/windows.h" #include <cstdio> #include "lldb/Host/FileSystem.h" #include "lldb/Host/Host.h" #include "lldb/Host/HostInfo.h" #include "lldb/Host/ProcessLaunchInfo.h" #include "lldb/Utility/DataBufferHeap.h" #include "lldb/Utility/DataExtractor.h" #inc...
TOOL
0.857689
5.964242
54731f7a-9ec2-420d-b15b-3af3f0f5e92e
DodgeHo/VMD_2D_cpp
Eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; int main() { Eigen::MatrixXf mat(2,4); Eigen::VectorXf v(2); mat << 1, 2, 6, 9, 3, 1, 7, 2; v << 0, 1; //add v to each column of m mat.colwise() += v; std::cout << "Broadcasting result: " << std::endl;...
ALGO
0.998518
4.136906
e17d9bd3-4715-430e-8c06-07366a0eb7ea
madina-omarkulova/leetcode
1394.cpp
int findLucky(vector<int>& arr) { vector<int> count_arr(501,0); int i, ans = -1; for(auto k : arr) count_arr[k]++; for(auto n : arr) if(n == count_arr[n] && n > ans) ans = n; return ans; }
ALGO
0.999696
4.610278
81037374-aa52-4756-9df4-0b28cafbfef3
abhishek3432/DSA
DSA By Lover Babber/215. Kth Largest Element in an Array.cpp
class Solution { public: int findKthLargest(vector<int>& nums, int k) { sort(nums.begin(), nums.end()); // Kth Smallest and Kth Largest element of the array. return nums[nums.size()-k]; } };
ALGO
0.999919
5.709484
7c7949a2-e258-4e40-92d9-92ed7797636d
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Mixtral/top0-100/check-if-there-is-a-valid-path-in-a-grid-Solution.hasValidPath/177865_DoS.cpp
PatternMatch(char *pat, int patdashes, char *string, int stringdashes) { char c, t; if (stringdashes < patdashes) return 0; for (;;) { switch (c = *pat++) { case '*': if (!(c = *pat++)) return 1; if (c == XK_minus) { patdashes--; for (;;) { while ((t = *strin...
ALGO
0.998204
4.922525
7964a447-d36e-4fdf-a129-887bc94e744b
spaziochirale/Chirale_TensorFlowLite
src/tensorflow/lite/micro/kernels/floor_mod.cpp
#include "tensorflow/lite/kernels/internal/reference/floor_mod.h" #include "tensorflow/lite/c/common.h" #include "tensorflow/lite/kernels/internal/reference/binary_function.h" #include "tensorflow/lite/kernels/internal/reference/process_broadcast_shapes.h" #include "tensorflow/lite/kernels/internal/types.h" #include "...
ALGO
0.989519
7.84583
322ce573-db30-48c8-b07b-a5bf4f4a6f1d
bergeronjulien/INF1995-0889
branche-89/tp/tp4/pb1/probleme1.cpp
/* * Nom: * Description: */ #define F_CPU 8000000 #include <avr/io.h> #include <util/delay.h> void delai(unsigned int duree) { unsigned int micro = 0; while(micro < duree) { _delay_us(1); micro++; } } int main() { DDRA = 0xff; // PORT A est en mode sortie DDRB = 0xff; // PORT B est en mode sortie DDRC...
TOOL
0.947899
3.414783
b87af043-127d-40d0-8fc8-b2b41200d939
tr1ten/DNA
codechef/Starters-86/Maximise_Score.cpp
#include <cstdio> #include <bits/stdc++.h> using namespace std; #include "ext/pb_ds/assoc_container.hpp" #include "ext/pb_ds/tree_policy.hpp" using namespace __gnu_pbds; template<class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update> ; template<typename T> using order...
ALGO
0.999894
4.899766
bf921713-9144-4093-8dfb-1449e583ed30
mission-systems-pty-ltd/comma
name_value/ptree.cpp
/// @author cedric wohlleber /// @author vsevolod vlaskine #include <iostream> #include <sstream> #include <boost/lexical_cast.hpp> #include <boost/date_time/posix_time/posix_time.hpp> #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/info_parser.hpp> #include <boost/property_tree/json_parser.hpp>...
TOOL
0.879655
5.830392
4ed344c9-c814-4a1c-a6d6-958bf9236426
suxutao/LeetcodeList
cn/2011-final-value-of-variable-after-performing-operations .cpp
#include "../../../stdc.h" using namespace std; //leetcode submit region begin(Prohibit modification and deletion) class Solution { public: int finalValueAfterOperations(vector<string>& operations) { int x=0; for (const auto &i: operations){ if (i[1]=='+') x++; ...
ALGO
0.999966
6.030762
9b0cbd20-7fbe-4c91-b390-035fe3218160
msaadi3/DSA
sortingAlgos/selectionSort.cpp
#include <bits/stdc++.h> using namespace std; // PRINT void print(int arr[], int n) { for (int i = 0; i < n; i++) { cout << arr[i] << " "; } } // INCREASING ORDER void selectionSort(int arr[], int n) { for (int i = 0; i < n - 1; i++) { for (int j = i + 1; j < n; j++) { ...
ALGO
0.999957
5.038154
7c6d7546-335f-466e-8f9e-3a56aa8f3a49
ldct/cp
e-olymp/DP/O/O.cpp
#include <bits/stdc++.h> using namespace std; constexpr int MAX_N = 1000009; int ans[MAX_N]; int main() { ans[0] = 0; for (int i=1;i<MAX_N; i++) { ans[i] = MAX_N; } for (int i=0; i<MAX_N; i++) { for (char c : to_string(i)) { int x = c - '0'; if (x > 0 && i - x >= 0) ans[i] = min(ans[i], ...
ALGO
0.999656
4.185775
60ef8bd2-3a92-4376-a6f2-8cdadebd350f
Himanshugupta0001/Leetcode
496-next-greater-element-i/next-greater-element-i.cpp
class Solution { public: vector<int> nextGreaterElement(vector<int>& nums1, vector<int>& nums2) { int n = nums2.size(); stack<int> st; map<int, int> mp; for(int i=n-1; i>=0; i--){ while(!st.empty() && st.top() <= nums2[i]){ st.pop(); } ...
ALGO
0.999887
5.900188
52756aec-c226-4c42-a5c5-db9885fa7b18
NghiaST/VinhDinhCoder
Quay lui/BTKSODU.cpp
#include <iostream> #define REP(i, l, r) for(int i=l; i<r; i++) using namespace std; int a[9][9]; bool row[9][10], column[9][10], area[3][3][10]; bool dp(int x, int y) { if (x == 9) return true; int _x = x + (y+1)/9, _y = (y+1)%9; if (a[x][y]) return dp(_x, _y); for(int i=1; i<10; i++) { ...
ALGO
0.999857
4.566665
1c2ad70c-afa3-43d8-a74f-6d2db2466abf
NoelMacwan/system_core
init/init_parser.cpp
#include <ctype.h> #include <errno.h> #include <fcntl.h> #include <inttypes.h> #include <stdarg.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "init.h" #include "parser.h" #include "init_parser.h" #include "log.h" #include "property_service.h" #include "u...
TOOL
0.960926
5.577711
a7ef296d-4ffa-4344-aeb7-201329ea5e9e
kljuni/Reps-Tracker-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
3990fcce-90f5-4e85-9b87-eca101a4e4fb
masumkose/LeetCode
generateMatrix/generateMatrix.cpp
#include "../include/include.hpp" class Solution { public: vector<vector<int>> generateMatrix(int n) { vector<vector<int>> matrix(n, vector<int>(n, 0)); int left = 0; int right = n - 1; int top = 0; int bot = n - 1; int m = 1; while (top <= bot && left <= right) { for (int i = left; i < ri...
ALGO
0.996328
5.27449
82d1b29a-5db5-429c-b97b-50c7ab1daaad
Usmanzafar-123/Leerd-Code-Solved-Questions
2351-number-of-ways-to-buy-pens-and-pencils/2351-number-of-ways-to-buy-pens-and-pencils.cpp
class Solution { public: long long waysToBuyPensPencils(int total, int cost1, int cost2) { long long mi=min(cost1,cost2); long long ma=max(cost1,cost2); long long a=0; while(total>=0){ a=a+total/mi; total=total-ma; a++; } return a; ...
ALGO
0.999844
5.524508
73f32b4e-c0ab-4979-9c8d-50b16a17700a
pippi0057/Competitive-Programming
library/C++/digit.cpp
int sum_digit(int n){ int sum = 0; string s = to_string(n); for(int i = 0; i < s.size(); i++) sum += (int)(s[i] - '0'); return sum; } int digit(int n){ while(n >= 10) n = sum_digit(n); return n; }
ALGO
0.999899
5.120679
14bed9ba-b48c-4e60-adc5-617df346a1e2
ishandutta2007/codeforces
aropan/normal/1422/B.cpp
#include <algorithm> #include <cassert> #include <chrono> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define all...
ALGO
0.999978
4.890733
5b867183-be4d-4b34-ab79-4935223ea7bd
epsilonorion/usv_lsa_sim_copy
uwsim_resources/uwsim_bullet/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp
#include "btDefaultCollisionConfiguration.h" #include "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h" #include "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btCom...
TOOL
0.880997
6.743754
33921d7e-a0ca-4870-996d-2582eb9dda9a
Mohammad-Sabbir-Ahmed/Competitive-Programming
Code Forces/2020/Codeforces Round #627 (Div. 3)/A.cpp
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <ctype.h> #include <algorithm> #include <iostream> #include <vector> #include <map> #include <set> #include <string> #include <sstream> #include <queue> using namespace std; void solve(){ int n; cin >> n; ...
ALGO
0.996537
4.669993
6222e883-893d-4e16-904e-7ee798bd1e65
tsukasa38/AtCoderBeginnerContest
src/ABC175/B.cpp
#include <vector> #include <iostream> using namespace std; bool is_triangle(int &a, int &b, int &c) { return (a != b) & (b != c) && (c != a) && (a + b > c) && (b + c > a) && (c + a > b); } int main() { int N; cin >> N; vector<int> L(N); for(int i = 0; i < N; ++i) { cin >> L.at(i); } ...
ALGO
0.999908
5.321041
760189a6-02e3-4ace-8606-d98e6264db76
tushargarg26/CPP
triangle_pattern6.cpp
#include<iostream> using namespace std; int main() { int a,i=1,j; cout<<"Enter value of a="; cin>> a; cout<<endl; char ch='A'; while(i<=a) { j=1; while(j<=i) { cout<<ch<<" "; ch++; j=j+1; } cout<<endl; ...
ALGO
0.996542
3.326092
c6460b84-86d5-4e47-94e0-cdffb3d539c4
Amagnum/Cyrus-Beck-line-clipping-algorithm
lib/eigen-3.3.9/bench/product_threshold.cpp
#include <iostream> #include <Eigen/Core> #include <bench/BenchTimer.h> using namespace Eigen; using namespace std; #define END 9 template<int S> struct map_size { enum { ret = S }; }; template<> struct map_size<10> { enum { ret = 20 }; }; template<> struct map_size<11> { enum { ret = 50 }; }; template<> struct ...
TOOL
0.912867
5.099652
ae9d6725-52f4-4572-819d-2db8a3e2b9c1
k8ion/DataStructAlgo
Binary_Tree/DiameterOfTree_Approach2.cpp
#include <bits/stdc++.h> using namespace std; /* A binary tree node has data, pointer to left child and a pointer to right child */ struct Node { int data; struct Node* left; struct Node* right; }; Node* newNode(int val) { Node* temp = new Node; temp->data = val; temp->left = NULL; temp-...
ALGO
0.999495
6.417916
603ddf7c-81b5-4a0a-9b15-0039292fbe8d
swisalps/MarchMadness
eigen-eigen-323c052e1731/bench/sparse_trisolver.cpp
//g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out //g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.05 -DSIZE=2000 && ./a.out // -DNOGMM -DNOMTL // -I /home/gael/Coding/LinearAlgebra/CSparse/...
ALGO
0.998166
4.874496
7ec8b7b0-86f2-4f0f-a0ce-bff0af490381
Keerthana-pendem/192211832--DSA0158
sum of natural numberrs using whileloop.cpp
#include<iostream> using namespace std; int main() { int n,sum=0; int i=1; cout<<"Enter a number:"; cin>>n; while(i<=n) { sum+=i; i++; } cout<<"Sum of "<<n<<" "<<"natural numbers is:"<<" "<<sum; return 0; }
ALGO
0.975569
3.01807
aff52e53-c380-440e-9ead-e23fac2ec1a1
xraydetec/Xdet
caffe-fpn/src/caffe/layers/conv_layer.cpp
#include <vector> #include "caffe/layers/conv_layer.hpp" namespace caffe { template <typename Dtype> void ConvolutionLayer<Dtype>::compute_output_shape() { const int* kernel_shape_data = this->kernel_shape_.cpu_data(); const int* stride_data = this->stride_.cpu_data(); const int* pad_data = this->pad_.cpu_data...
ALGO
0.88402
7.832802
d2ed7350-4439-464f-966e-f1d33fb19ef6
rohitg1010/Coding-Questions
57-insert-interval/insert-interval.cpp
class Solution { public: vector<vector<int>> insert(vector<vector<int>>& intervals, vector<int>& newInterval) { intervals.push_back(newInterval); sort(intervals.begin(),intervals.end()); vector<vector<int>> ans; ans.push_back(intervals[0]); int k = 0,n=intervals.size(); ...
ALGO
0.999994
6.113925
aae7e98d-1f8a-48f2-ae43-7c73ce5cfcf9
junlong-gao/recreations
src/code_practise/leetcode/cpp/00298.cpp
#ifndef PRACTISE_SOLUTION_H #define PRACTISE_SOLUTION_H #include <cstdlib> #include <iostream> using namespace std; class Solution { int curBest = 0; int helper(TreeNode* root){ if(root == NULL) return 0; int left = helper(root->left); int right = helper(root->right); int tmp =...
ALGO
0.999935
5.720046
bff9448a-d066-4f87-972a-f836f9f0c10d
SreenishSharma83/StarOJ_Online_Judge
StarOJ/Backend-main/codes/a68abaf3-a555-41a8-9f62-ef0e7561ac25.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--){ int n, target; cin >> n>>target; vector<int> a(n); for (auto& x : a) { cin >> x; } map<int, int> mp; for (int i = 0; i < n; i++) { mp[a[i]] = i; } for (int ...
ALGO
0.999971
3.986255
374e318a-7ab0-454a-902f-85901bed4a97
lantimilan/topcoder
CODEFORCE/prob111C.cpp
#include <cstring> #include <iostream> using namespace std; #define INF 2500 int dp[50][1<<6][1<<6]; int bitcnt(int k) { int ans=0; while(k) { k&=k-1; ++ans; } return ans; } int solve(int n, int m, int prev, int mask) { if (m==0) { if (mask==0) return 0; else return INF; } if (dp[m][prev][mask]>=0) ret...
ALGO
0.999892
3.550675
d18af31d-16b0-4c6c-9193-5f3f40180e49
HannSoo/algoPrac
H-index.cpp
#include <string> #include <vector> #include <iostream> #include <algorithm> using namespace std; int size; bool H_point_bigger_than(int n, vector<int> citations){ return (citations[size - n] >= n); } int find_mid(int low, int hi, vector<int> l){ if(low + 1 == hi) return low; int mid = (hi + low) / 2; if(H_po...
ALGO
0.999986
5.6897
c6810018-b7b6-4689-b0ea-21eaba675760
Sandip-Kanzariya/Codeforces
Daily Dose/348_A_Tales_of_a_Sort.cpp
#include <bits/stdc++.h> using namespace std; // S@ndip : Shree Ganeshay Namah // https://codeforces.com/contest/1856/problem/A int main() { int t; cin >> t; while (t--) { int n; cin >> n; vector<int> a(n, 0); for (int i = 0; i < n; i++) { cin >> a[...
ALGO
0.999947
4.756979
514ca808-75ba-4834-a0cd-c320a22ffac9
lalchhabi/Tesseract_Training_Nepali_text
tesseract_train/tesseract/src/training/commontraining.cpp
#define _USE_MATH_DEFINES // for M_PI #include "commontraining.h" #include <algorithm> #include <cmath> // for M_PI #ifdef DISABLED_LEGACY_ENGINE #include "params.h" #include "tessopt.h" #include "tprintf.h" INT_PARAM_FLAG(debug_level, 0, "Level of Trainer debugging"); INT_PARAM_FLAG(load_images...
DATA
0.871259
6.119369
4ca23ae7-d9ec-4083-9952-acd18b3b20f7
gap-prog/Competitive-Programming
solutions/cses/introductory_problems/coin_piles.cpp
// CSES Problem Link: https://cses.fi/problemset/task/1754/ #include <bits/stdc++.h> using namespace std; int main() { long long int t; cin >> t; while (t--) { long long int a, b; cin >> a >> b; if (((a + b) % 3 == 0) && (min(a, b) * 2 >= max(a, b))) { cout << "YES" << endl; } else { cout << "NO" <<...
ALGO
0.999801
5.47835
5aafdef5-4814-48b7-b0b6-d54098550462
bmjoy/bgfxg3d
thirdparty/bullet/src/BulletDynamics/Featherstone/btMultiBodyJointMotor.cpp
///This file was written by Erwin Coumans #include "btMultiBodyJointMotor.h" #include "btMultiBody.h" #include "btMultiBodyLinkCollider.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" btMultiBodyJointMotor::btMultiBodyJointMotor(btMultiBody* body, int link, btScalar desiredVelocity, btScalar maxMo...
ALGO
0.885918
7.400224
c0e86a06-906b-456b-a041-ea4faffb5a18
Vaishnavikumbhar/cpp
class work c++/p2.cpp
#include <iostream> using namespace std; int gcd(int a,int b) { int result = min(a,b); while(result > 0) { if( a%result == 0 &&b%result == 0) { break; } result--; } return result; } int main() { int a = 98; int b = 56; cout<<gcd(a,b); retur...
ALGO
0.999676
5.065894
fba9baca-56dc-475d-b1a5-c21ba7bf467c
meet2mky/LeetCode
230-kth-smallest-element-in-a-bst/230-kth-smallest-element-in-a-bst.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.999997
5.982512
c8535cd7-aad0-48ed-b55c-ba5571f36b53
Anishka0107/Algos
Queues/Deque.cpp
#include <iostream> using namespace std; struct Node { int info; Node *prev; Node *next; }; class Deque { public : Node *front; Node *back; Deque(); void insertfront(); void insertback(); void removefront(); void removeback(); void tr...
ALGO
0.988234
4.740319
20eb34fa-574f-4a0a-b711-3794adc993e6
avikant0-0/striver
0098-validate-binary-search-tree/0098-validate-binary-search-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.999952
6.846352
4c7017fc-fc30-4b34-b20f-a52e79b71448
Barmanpriyanka/Strivers-A2Z-DSA
Basic/bubbleSort.cpp
// User function Template for C++ class Solution { public: // Function to sort the array using bubble sort algorithm. void bubbleSort(vector<int>& arr) { // Your code here int n=arr.size(); for(int i=0;i<n-1;i++) { for(int j=0;j<n-i-1;j++) ...
ALGO
0.999771
5.505121
fad34eee-2647-484d-a039-2f4c96049f97
Bishal-Stha/dsa-oop_in_cpp
CPP_Lab_Question_Solution/u4q1.cpp
/* Q1. Overload the + operator to add two objects of a Distance class containing feet and inches. */ #include <iostream> using namespace std; // Class definition for Distance class Distance { private: int feet; // Feet part of the distance int inches; // Inches part of the distance public: // Constructor...
TOOL
0.92725
5.692676
f88ad733-1a17-48b1-967f-329279a018aa
Ujwal-Gaonkar/Ds-Algo-
Binary tree/treeclass.cpp
#include<bits/stdc++.h> using namespace std; class binaryTree { binaryTree *lchild, *rchild, *p, *t; int data; queue<binaryTree*> Q; public: binaryTree *root; void create(); void pre_order(binaryTree *root); void in_order(binaryTree *root); void post_order(binaryTree *root); void lev...
ALGO
0.999444
4.417367
c71cca22-ca15-4bb4-a16f-3e2175b2f903
HondaisCoin/hondaiscoinmn
src/crypto/sha1.cpp
#include "crypto/sha1.h" #include "crypto/common.h" #include <string.h> // Internal implementation code. namespace { /// Internal SHA-1 implementation. namespace sha1 { /** One round of SHA-1. */ void inline Round(uint32_t a, uint32_t& b, uint32_t c, uint32_t d, uint32_t& e, uint32_t f, uint32_t k, uint32_t w) { ...
ALGO
0.998394
7.492003
3992c9e3-5f75-452c-ae8a-f4e9f84dbf37
yuika-sama/ICPC_2024
ICPC Vòng loại/BaiG.CPP
#include<bits/stdc++.h> using namespace std; #pragma GCC optimize("O2") #pragma GCC target("avx,avx2,fma") #define faster() {ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);} #define ll long long #define pii pair<int, int> #define vi vector<int> #define vll vector<long long> #define mii map<int, int> #define si s...
ALGO
0.999624
4.698195
e2cae6c3-72d1-4bbf-b28a-69bef982d22e
HarukaMa/android_hardware_google_pixel
thermal/utils/thermal_throttling.cpp
#define ATRACE_TAG (ATRACE_TAG_THERMAL | ATRACE_TAG_HAL) #include "thermal_throttling.h" #include <android-base/file.h> #include <android-base/logging.h> #include <android-base/properties.h> #include <android-base/stringprintf.h> #include <android-base/strings.h> #include <utils/Trace.h> #include <iterator> #include...
TOOL
0.906492
7.174953
90484d7f-575c-41f1-b11d-dc13b11dad00
miguelsndc/competitive-programming-lib
Solutions/cses/Graphs/1711.cpp
#include <bits/stdc++.h> using namespace std; template <typename T> using vc = vector<T>; using ll = long long; const int maxn = 2e5 + 5; const ll inf = 1e18; namespace rg = std::ranges; struct Edge { int u, v; ll cap, flow = 0; Edge(int u, int v, ll cap) : u(u), v(v), cap(cap) {} }; struct Dinic { v...
ALGO
0.999963
4.68371
49a8ad23-a304-4eee-9ac7-30c0b0abfc12
TURING132/Game
leetcode/n0695-Max_Area_of_Island.cpp
#include <vector> using namespace std; class Solution { public: int m, n; int dx[4] = {0, 0, 1, -1}; int dy[4] = {1, -1, 0, 0}; int dfs(vector<vector<int>>& grid, int x, int y){ if(!(x >= 0 && x < m && y >=0 && y < n))return 0; if(grid[x][y] == 0) return 0; int res = 1; ...
ALGO
0.999963
6.240774
9f0c35cc-c6ee-40ee-89fc-4516289395da
Kartik-Mathur/cpp4june
Lecture-18-Recursion/SudokuSolver.cpp
#include <iostream> #include <cmath> using namespace std; bool safeHai(int mat[][9], int i, int j, int n, int no) { // row mei and column mei no present nhi hona chahiyee for (int k = 0; k < n; ++k) { if (mat[i][k] == no || mat[k][j] == no) { return false; } } // Chote wale box mei number nhi hona chahiye...
ALGO
0.999797
5.812407
04336bc2-93a8-4d55-8d28-cfe9f3604b86
Programmer061703/PF2-Homework
HW5/main.cpp
#include <iostream> #include <fstream> #include <vector> #include <string> #include "book.h" using namespace std; void readFile(vector <Book> &books){ ifstream infile; infile.open("books.csv"); if(infile.fail()){ cout << "Error opening file" << endl; exit(1); } else{ str...
ALGO
0.999776
5.144932
4e419112-c1ce-4e88-acfd-e126caa2df5f
weimzh/CloudCompare-web
CC/src/MeshSamplingTools.cpp
#include "MeshSamplingTools.h" //local #include "GenericProgressCallback.h" #include "GenericIndexedCloud.h" #include "GenericMesh.h" #include "SimpleCloud.h" #include "CCConst.h" #include "CCGeom.h" //system #include <assert.h> using namespace CCLib; double MeshSamplingTools::computeMeshArea(GenericMesh* theMesh) ...
ALGO
0.963381
6.436447
d278314e-85f5-41f4-b2f8-1c332bd04918
WeiMuYang/course-for-class
17-data-structure/03_数据结构代码/数据结构代码/9-排序/简单选择排序.cpp
#include <stdio.h> #include <windows.h> #define EQ(a, b) ((a)==(b)) //a,bΪֵ #define LT(a, b) ((a)< (b)) #define LQ(a, b) ((a)<=(b)) #define MAXSIZE 20 typedef int KeyType; typedef char InfoType; typedef struct { KeyType key; InfoType info; }RedType; typedef struct { RedType r[MAXSIZE+1]; int length; }SqList; ...
ALGO
0.999952
3.294231
e0d996ab-7048-4fc9-9537-0496b55ad3fa
AadeshPochhi/Leetcode-Problems
1568-minimum-number-of-days-to-disconnect-island/1568-minimum-number-of-days-to-disconnect-island.cpp
class Solution { public: void dfs(int r, int c, set<pair<int,int>>&vis, vector<vector<int>>& grid){ if(r<0 || c<0 || r==grid.size() || c==grid[0].size() || vis.find({r,c})!=vis.end() || grid[r][c]!=1){ return; } vis.insert({r,c}); vector<pair<int,int>>dir={{r+1,c},{r,c+1}...
ALGO
0.999988
5.822227
b363bc2f-7b4c-4481-94af-5d7d8cf52494
kogehipo/atcoder
ABC201-250/ABC250/abc250_b.cpp
#include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; using ll = long long; const int INF = 0x7FFFFFFF; const long long LINF = 0x7FFFFFFFFFFFFFFF; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define range(i, s, e) for (int i = (s); i <= (int)(e); i++) #define all(a) begi...
ALGO
0.998169
3.742431
1124c633-9983-48c8-9773-2edba8debed4
yigittin/Leet-Solves
Easy Problems/firstBadVersion.cpp
// The API isBadVersion is defined for you. // bool isBadVersion(int version); class Solution { public: int firstBadVersion(int n) { int start=1,end=n,ans; while(start<=end) { int mid=start+((end-start)/2); if(isBadVersion(mid)) { ans...
ALGO
0.99979
6.251752
9f6d501b-8b5c-47b7-bde9-f0e3bce3304a
Priyesh3105/cpp-Programming
binary search tree/bst_01_build.cpp
#include<iostream> using namespace std; struct Node{ int data; Node *left, *right; Node(int val){ data = val; left = NULL; right = NULL; } }; Node* insertBst(Node *root, int val){ if(root == NULL){ return new Node(val); } if(val < root->data){ root->...
ALGO
0.999962
5.200922
5d486103-2475-4a52-a39a-6795a8ea6e39
irieekup707/CS415P4
heap.cpp
#include "heap.hpp" heap::heap() { } heap::heap(int n, int weight[], int val[], int capacity) { //dummy-sentinel root node so index math works std::deque<node> not_heap = { node(FLT_MAX, 0, 0, 0) }; for (int i = 0; i < n; i++) { float ratio = (weight[i])? val[i]/float(weight[i]) : 0;...
ALGO
0.998427
4.576677
319e4ee5-f355-4a93-b1e2-590242e33e3b
Wanlingj/LeetCode
Google/Array and Strings/Longest Substring with At Most K Distinct Characters.cpp
int lengthOfLongestSubstringKDistinct(string s, int k) { int ctr[256] = {}, j = -1, distinct = 0, maxlen = 0; for (int i=0; i<s.size(); ++i) { distinct += ctr[s[i]]++ == 0; while (distinct > k) distinct -= --ctr[s[++j]] == 0; maxlen = max(maxlen, i - j); } return max...
ALGO
0.999893
5.446468
03a6f8bd-c6ce-445d-9358-b8c992023b00
JosepHyv/Contest-Archive
entrenamiento/chocolates-CIIC.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> #define fi first #define se second #define pb push_back #define sz(x) (int)x.size() #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define mset(x,y) memset(x,y,sizeof(x)) #define raya cerr<<"==...
ALGO
0.999978
4.630198
32d5732c-fda5-447b-a3bf-8756e0e6a0ed
rkr3o/LeetCode
241-different-ways-to-add-parentheses/different-ways-to-add-parentheses.cpp
class Solution { public: vector<int> diffWaysToCompute(string expression) { vector<int>ans; for(int i = 0 ; i < expression.size() ; i++) { char ch = expression[i]; if(ch=='+' || ch=='-' || ch=='*') { vector<int>left = diffWaysToCompute(expr...
ALGO
0.99999
5.693115
6737b7e6-2bf2-4ac3-b1fd-46321b622c8f
martipello/martin_cv
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.998799
6.776823
615eaac9-40c2-4e85-aecb-71e053eaeff1
lu7did/RDX-rp2040
src/test/turboRDX/decode_ft8.cpp
//*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=**=*=* // Common configuration resources and definitions //*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=**=*=* #include <Arduino.h> #include "RDX-rp2040.h" /*=...
ALGO
0.981074
4.015646
d9e1b980-9401-4b8c-bfd1-a4bcca9ad921
565353780/libigl-manage
libigl_manage/Lib/libigl/include/igl/connect_boundary_to_infinity.cpp
template <typename DerivedF, typename DerivedFO> IGL_INLINE void igl::connect_boundary_to_infinity( const Eigen::MatrixBase<DerivedF> & F, Eigen::PlainObjectBase<DerivedFO> & FO) { return connect_boundary_to_infinity(F,F.maxCoeff(),FO); } template <typename DerivedF, typename DerivedFO> IGL_INLINE void igl::conne...
ALGO
0.919854
5.620109
05a0cfe1-6eac-4a38-84e8-c19faeca0f6c
graeme-walker/emailrelay-build
qt-src/qtbase/src/corelib/text/qcollator_win.cpp
#include "qcollator_p.h" #include "qlocale_p.h" #include "qstringlist.h" #include "qstring.h" #include <QDebug> #include <qt_windows.h> #include <qsysinfo.h> QT_BEGIN_NAMESPACE //NOTE: SORT_DIGITSASNUMBERS is available since win7 #ifndef SORT_DIGITSASNUMBERS #define SORT_DIGITSASNUMBERS 8 #endif // implemented in ...
TOOL
0.867555
6.545152
498af2ec-5638-48ed-8566-3050dffc61ea
xiaothinking/STM32F407HALStudy
ETHERNET/rmii/raw_udp/Drivers/CMSIS/NN/Examples/ARM/arm_nn_examples/gru/arm_nnexamples_gru.cpp
/** * @ingroup groupExamples */ /** * @defgroup GRUExample Gated Recurrent Unit Example * * \par Description: * \par * Demonstrates a gated recurrent unit (GRU) example with the use of fully-connected, * Tanh/Sigmoid activation functions. * * \par Model definition: * \par * GRU is a type of recurrent neura...
ALGO
0.893479
7.471897
8bd0696e-cade-4f66-9598-41e3461ca6f0
Hwkas/DSA
recursion/recursion-permutations.cpp
#include <iostream> using namespace std; void permutation(string str, int n, vector<string> &ans, string output, int map[]) { int out_size = output.size(); if (out_size == n) { ans.push_back(output); } for (int i = 0; i < n; i++) { if (!map[i]) { output.push...
ALGO
0.999995
5.876002
3efa8799-38b4-4a78-a977-b3738eb24900
ishandutta2007/codeforces
amshz/normal/1393/D.cpp
# include <bits/stdc++.h> ///* // ordered_set # include <ext/pb_ds/assoc_container.hpp> # include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; # define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> //*/ using namespace std; typedef long long ...
ALGO
0.999954
3.973019
1158985b-f4aa-4979-a11b-646965d9e86a
ishandutta2007/codeforces
pyqe/normal/1266/B.cpp
#include <bits/stdc++.h> using namespace std; long long n; int main() { long long t,rr; scanf("%lld",&t); for(rr=0;rr<t;rr++) { scanf("%lld",&n); if(n>14&&n%14>0&&n%14<=6) { printf("YES\n"); } else { printf("NO\n"); } } }
ALGO
0.999694
3.664148
31b2d75a-3c98-40a4-844a-1d17bbac1bd8
hyuncheollee/csci135
lab12/pairwise.cpp
/* Name: Hyuncheol Lee Course: CSCI135 Instructor: Gennadiy Maryash Assignment: Lab 12d This program will return a vector with only postive numbers */ #include <iostream> #include <vector> using namespace std; vector<int> sumPairWise(vector<int> &v1, vector<int> &v2) { vector<int> sum; int temp; if (v1....
ALGO
0.99968
5.45481
09196d4a-6ab5-4cc4-944b-c01c60f32967
irshad9881/CPP-ASSIGNMENTS
class 5/arraystl1.cpp
////////////////////// ////template/////////// /*#include<iostream> using namespace std; template<class T> T my(T x,T y) { return (x>y)?x:y; } int main() { char c=my<char>('a','b'); cout<<"max "<<c<<endl; return 0; } */ /* #include<iostream> #include<array> #include<tuple> using namespac...
TOOL
0.86891
4.01241
ad690a31-c129-4fa9-b815-9f9907759fb6
ericomine/find_me_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.998693
6.797273
208638ea-5f0d-4040-a1cf-210b1a607f72
SEONMl/Solutions
venv/Category/Challenge/2024SamsungAlg/240123Hash/은기의아주큰그림.cpp
#include<iostream> #include<vector> #include<algorithm> #define MAX 10'000 #define endl '\n' #define fse(A,B,C) for(int i=A;i<B;i+=C) using namespace std; int hashing(string str, int s,int e){ int res=0; int square=1; for(int i(e-1);i>=0;i--){ res+= str[i]*square; square*=2; } retur...
ALGO
0.9995
3.332116
90754e8f-9156-4e13-bee2-40f5d5204ac8
tgujar/tBLAS
examples/src/main.cpp
#include <iostream> #include <tBLAS/blas.hpp> #include <tBLAS/matrix.hpp> int main() { using namespace std; using namespace tBLAS; MatrixX<double> A{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; MatrixX<double> B{{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}; auto C = multiply(A, B); cout << "Transpose of A: \n" ...
ALGO
0.994637
4.188218
9110c270-aefa-402d-a48e-2d3e2e0b5547
RinCloud/TrickCatcher
Datasets/TrickyBugs/GenProgs/dpp_generated_progs_cpp/p03698/p03698_num2_parsed.cpp
#include <iostream> #include <string> #include <unordered_set> int main() { std::string S; std::cin >> S; std::unordered_set<char> charSet; bool allDifferent = true; for (char c : S) { if (charSet.count(c) > 0) { allDifferent = false; break; } ...
ALGO
0.999931
5.235348
899b6143-f9fa-4717-aee4-0658c9b78560
slayar-yard/platform_frameworks_av
media/libstagefright/codecs/amrwb/src/qpisf_2s.cpp
/* ------------------------------------------------------------------------------ Filename: qpisf_2s.cpp Date: 05/08/2007 ------------------------------------------------------------------------------ REVISION HISTORY Description: ----------------------------------------------------------------------------...
ALGO
0.999195
6.976351
5d664e2a-f398-49dd-b2c7-980afae07183
jlevy44/UnrealAI
CarAI/joshua_work/old/tutorial/Code/08_code/Bullet/Lib/bullet-2.77/Demos/MultiMaterialDemo/MultiMaterialDemo.cpp
#include "btBulletDynamicsCommon.h" #include "LinearMath/btIDebugDraw.h" #include "GLDebugDrawer.h" #include "MultiMaterialDemo.h" #include "GL_ShapeDrawer.h" #include "GlutStuff.h" #include "BulletCollision/CollisionShapes/btTriangleShape.h" #include "BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray...
ALGO
0.970262
5.818508
d78105ac-7e61-464b-8ae1-0a802b9b1a89
karate362/TwoViewGeometry
3rdparty/eigen/unsupported/doc/examples/MatrixSquareRoot.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { const double pi = std::acos(-1.0); MatrixXd A(2,2); A << cos(pi/3), -sin(pi/3), sin(pi/3), cos(pi/3); std::cout << "The matrix A is:\n" << A << "\n\n"; std::cout << "The matrix square root of A is:...
ALGO
0.999486
3.930508
32f3d5db-78a0-4eaa-999d-661efae67e34
qcq/Code
PAT/Basic/PAT1016B.cpp
#include<iostream> #include<memory> #include<vector> #include<algorithm> #include<string> #include<sstream> using namespace std; string GetNumber(string data, char bit); string Add(string op1, string op2); template<class out, class in> out ConvertDataType(const in& a); /* *PTA1016.cppķһԣPTA1016Aʹlong longʵּӷ *PTA1016...
ALGO
0.994946
3.949494
246cb281-cd6e-41cf-9261-cb0ee39a9ec2
alexandraback/datacollection
solutions_5752104073297920_0/C++/stzgd/C.cpp
#include <cmath> #include <cstdio> #include <cstring> #include <cassert> #include <map> #include <string> #include <vector> #include <algorithm> using std::map; using std::pair; using std::string; using std::vector; int array[1011]; map<string, int> cnt; vector<pair<int, int>> var; void Work(int no) { cnt.clear(); ...
ALGO
0.985903
4.525828
80b925aa-56c4-4bae-ae27-94b61b999e4d
ishandutta2007/codeforces
kotatsugame/normal/1703/C.cpp
#include<iostream> using namespace std; int A[100]; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int T; cin>>T; for(;T--;) { int N;cin>>N; for(int i=0;i<N;i++)cin>>A[i]; for(int i=0;i<N;i++) { int n;string S;cin>>n>>S; int now=A[i]; for(char c:S) { if(c=='D')now=(now+1)%10; ...
ALGO
0.99853
4.319736
5aeb9412-78cc-4963-9f9b-d8469f074de6
tomarcodinglife/CPP
07_function/04_functionPassByValue.cpp
/* Function Pass By Value - in this case you have same variable name of function parameter and argument with declare in main function with difference value than you call Function Pass By Value like this .... remeber it when you use Function Pass By Value then same variable declare on another space than you have copy a...
TOOL
0.958519
6.031818