uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
9023a2ba-e9fb-4ed5-bc1b-b8eaaddcbcfb
Anik114911/XPSC_Batch_04
Week 20/Day 2/N.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define fst \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define ll long long #define endl '\n' #define yes cout << "YES\n"; #define no cout << "NO\...
ALGO
0.999974
3.614485
caf3734e-129c-45a8-b20d-37d726993fc2
faithful-dragon/Compititive-Programming
LEETCODE/ARRAY/1282.cpp
#include <iostream> #include <vector> #include <string> #include <map> using namespace std; class Solution { public: vector<vector<int>> groupThePeople(vector<int>& groupSizes) { vector<int>v; vector<vector<int>>ans; map<int,vector<int>>m; for(int i=0;i<groupSizes.size();i++){ ...
ALGO
0.999927
5.741283
6123dfa6-f0fb-4d3e-91e3-4326ac3970c0
ABHINAB-CHHETRI/DataStructure-Cpp
RECURSION/sumofdigits.cpp
#include <iostream> #include<cstdlib> using namespace std; int sumOfDigits(int a) { if (a==0) { return 0; } return a%10+sumOfDigits(a/10); } int main() { #ifndef ONLINE_JUDGE freopen("../input.txt", "r", stdin); freopen("../output.txt", "w", stdout); #endif cout<<"enter any number : ...
ALGO
0.999521
4.245943
ece19f71-514b-4e05-91c1-bc863eaf8212
theFPVgeek/Tevo-Tarantula-Marlin-1.1-RC7-BugFix-
Marlin/qr_solve.cpp
#include "qr_solve.h" #if ENABLED(AUTO_BED_LEVELING_GRID) #include <stdlib.h> #include <math.h> //# include "r8lib.h" int i4_min(int i1, int i2) /******************************************************************************/ { return (i1 < i2) ? i1 : i2; } double r8_epsilon(void) /***************************...
ALGO
0.999946
5.624253
c607b526-aebb-4e8a-b7e0-66bb3b21290a
ZelinMa557/15-445-21-fall
src/common/util/string_util.cpp
#include <algorithm> #include <cstdarg> #include <cstring> #include <iomanip> #include <memory> #include <sstream> #include <string> #include <vector> #include "common/util/string_util.h" namespace bustub { auto StringUtil::Contains(const std::string &haystack, const std::string &needle) -> bool { return (haystack...
TOOL
0.890185
7.112531
a381e437-47ed-4e39-b3ba-51f4a1b1a9fb
swingld/ceph-14.2.8
src/boost/libs/yap/example/vector.cpp
#include <vector> #include <iostream> //[ vector_take_nth_xform struct take_nth { template <typename T> auto operator() (boost::yap::expr_tag<boost::yap::expr_kind::terminal>, std::vector<T> const & vec) { return boost::yap::make_terminal(vec[n]); } std::size_t n; }; //] // A sta...
TOOL
0.892637
6.644027
6ed6aac7-45c9-4ab6-b7a9-fd3cc1409e5e
pitaohc/Algorithm-Diary
LeetCode/LC-2389/main.cpp
#include<iostream> #include"Solution.h" using namespace std; void print(vector<vector<int>> vect) { for each (vector<int> row in vect) { for each (int num in row) { cout << num << " "; } cout << endl; } } template<class T> ostream& operator<<(ostream& out, vecto...
ALGO
0.999811
4.893562
4bc1d445-c556-4327-9139-29b25ab76ec6
zmiksis/SciComp
21210_Spring2017/SP2017_me/code/HW3/hw3.3.cpp
// Statistical analysis program #include <iostream> #include <vector> #include <cmath> using namespace std; double mean(const vector<double> &x_obs); double st_dev(const vector<double> &x_obs); double correlation(const vector<double> &x_obs, const vector<double> &y_obs); int main() { vector<double> x_obs; ve...
ALGO
0.948782
4.8955
bd2bdf08-ee42-4b70-a1d2-f94c51bffd49
ishandutta2007/codeforces-b
bench0310/normal/1194/A.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; scanf("%d",&t); while(t--) { int n,x; scanf("%d%d",&n,&x); printf("%d\n",2*x); } return 0; }
ALGO
0.997475
3.615988
da3a785f-efe0-492b-bd1c-f043ca46740e
omagen9466/Docker_Tut
3DJet/athena_version4/src/hydro/rsolvers/hydro/roe.cpp
// C headers // C++ headers #include <algorithm> // max() #include <cmath> // sqrt() // Athena++ headers #include "../../../athena.hpp" #include "../../../athena_arrays.hpp" #include "../../../eos/eos.hpp" #include "../../hydro.hpp" namespace { // prototype for function to compute Roe fluxes from eigenmatrices...
ALGO
0.99993
4.102538
10831d0a-1396-46cf-87f0-bb0e88246fbb
parasguglani1/competitive_coding
Codechef/practice/Two_Arrays.cpp
#include <bits/stdc++.h> using namespace std; using namespace chrono; #define ff first #define ss second #define int long long using ll = long long; #define setbits(x) __builtin_popcountll(x) #define zrobits(x) __builtin_ctzll(x) #define mod 1000000007 #define inf 1e18 #define PI 3.1415926535897932384626 #define ps(x,...
ALGO
0.99996
4.13729
37efca91-8e5e-4eaa-803e-b6269b04d932
Shadat-tonmoy/ACM-Problem-Solution
HackerRank/Birthday Chocolate.cpp
#include<bits/stdc++.h> using namespace std; int main() { int i,j,k,l,m,n,num[1000],d,sum,ans; while(cin>>n) { ans=0; for(i=0;i<n;i++) { cin>>num[i]; } cin>>d>>m; for(i=0;i<=n-m;i++) { sum=0; for(j=i;j<i+m;j++) ...
ALGO
0.999837
3.327694
523b7964-6bde-41c0-9f66-b98624081f0b
VatsalP117/dsa-questions
Dynamic Programming/DP on LIS/count_num_of_LIS.cpp
#include <bits/stdc++.h> int findNumberOfLIS(vector<int> &arr) { // Write your code here. int n=arr.size(); vector<int> dp(n,1); vector<int> count(n,1); int maxi=1; for(int i=1;i<n;i++){ for(int prev=0;prev<i;prev++){ if(arr[i]>arr[prev]){ if(dp[i]<1+dp[prev]...
ALGO
0.999976
5.704332
b49d7623-9394-45e2-8805-a2a0bd7e862d
luisfteixeira11/cpp-competitive
bspoj/fatorial.cpp
#include <iostream> #include <stdio.h> using namespace std; long long ultimodigito (long long n){ long long fat = 1; for(long long i=2; i<=n; i++){ fat*=i; while (fat%10==0){ fat/=10; } fat %= 100000; //evita overflow pegando os primeiros digitos...
ALGO
0.998009
4.004484
50d6de61-0e09-4325-84c3-8a6066b2c3d9
ishandutta2007/codeforces
purplecrayon/normal/1063/C.cpp
#include <bits/stdc++.h> using namespace std; #define sz(v) int(v.size()) #define ar array typedef long long ll; const int MAXN = 5e1+1, MOD = 998244353; bool qry(int x, int y) { cout << x << ' ' << y << endl; string s; cin >> s; return s == "black"; } void rec(int l, int r, int n, bool left) { if (!...
ALGO
0.989548
3.821115
50f39b0a-5c2a-40b9-bce1-33079304d7bd
monhime/atcoder_charter
C++_old/beginner/041/B.cpp
#include<iostream> #include<cstdio> #include<cstdlib> #include<algorithm> #include<cstring> #include<string> #include<math.h> #include<vector> #include<queue> #include<map> #include<stack> //#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; map <int,int> mp; #define INF (1<<3...
ALGO
0.999982
3.848136
407dd5be-d240-4ff9-97bd-3c9eec378aa1
Surya-Kumar-03/Leetcode-and-GFG-Problems
956-number-of-music-playlists/number-of-music-playlists.cpp
class Solution { public: int numMusicPlaylists(int n, int goal, int k) { const int MOD = 1e9 + 7; vector<vector<long>> dp(goal + 1, vector<long>(n + 1, 0)); dp[0][0] = 1; for (int i = 1; i <= goal; i++) { for (int j = 1; j <= min(i, n); j++) { dp[i][j] =...
ALGO
0.999993
5.985767
da7a0d1e-0273-4e47-8e08-95bcaa5e454d
Heidoco/RayCasting
esfera.cpp
#include "esfera.h" Esfera::Esfera(Ponto3 centro, double raio, Cor cor):centro(centro),raio(raio),cor(cor){} //Construtor com mateiral Esfera::Esfera(Ponto3 centro, double raio, shared_ptr<Material> m):centro(centro),raio(raio),mat_ptr(m){} bool Esfera::hit( Raio &r, double t_min, double t_max, hit_record& registro)...
ALGO
0.958076
5.534174
7c70e29f-6cee-462e-ad28-c4c8dae71f8a
OriLiMu/leetCodeOri
cppVersion/41_FirstMissingPositive_v1.cpp
#include <algorithm> #include <climits> #include <cmath> #include <cstddef> #include <iostream> #include <vector> using namespace std; class Solution { public: int targetNum = -1; void putCurIndexToRightPlace(vector<int> &nums, int curNum) { if (curNum > 0 && curNum <= nums.size()) { if (curNum == nums...
ALGO
0.999941
4.598401
6b2bccb9-9dd8-4f54-9ded-4c2a14eb46a2
jhui/driving
mpc/src/Eigen-3.3/doc/examples/Tutorial_BlockOperations_colrow.cpp
#include <Eigen/Dense> #include <iostream> using namespace std; int main() { Eigen::MatrixXf m(3,3); m << 1,2,3, 4,5,6, 7,8,9; cout << "Here is the matrix m:" << endl << m << endl; cout << "2nd Row: " << m.row(1) << endl; m.col(2) += 3 * m.col(0); cout << "After adding 3 times the first colu...
ALGO
0.974566
3.576145
fb13f7c4-e1d9-4f10-9537-03c5f457c6d9
firej/fizteh-C-2014-demos
demo_radix.cpp
#define _CRT_SECURE_NO_DEPRECATE #include <stdio.h> #include <stdlib.h> #include <math.h> #include <memory.h> #include <time.h> void print_array(char **arr, size_t arr_size, bool carriage = true); void radixsort(char **arr, size_t arr_size, size_t depth = 0); int main(int argc, char ** argv) { char *strings[1024]; ...
ALGO
0.998869
4.375544
9228b023-39d8-4de7-aa03-2c4478cefa38
nikhil4u8/Leetcode-solutions
Leetcode Solutions/37. Sudoku Solver.cpp
class Solution { public: pair<int,int> next_empty_block(vector<vector<char>>&board,int x,int y){ if(board[x][y] == '.') return {x,y}; for(int i=y+1;i<9;i++){ if(board[x][i] == '.') return {x,i}; } for(int i=x+1;i<9;i++){ for(int j=0;j<9;j++){ ...
ALGO
0.999726
6.660073
a4788a0f-2a7c-4c97-aea5-e51ddd1c992d
Schrodinger1926/A2OJ
div2B/5.53.cpp
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <iomanip> #include <limits> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #includ...
ALGO
0.999463
3.83633
8a4950ed-79ba-4c94-911a-3d3b0c92d91e
shecoderfinally/DSA
LinkedList/reverseLinkedList.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node *next; Node(int data) { this->data = data; this->next = NULL; } ~Node() { delete next; } }; Node *takeInput(vector<int> &arr) { Node *head = NULL, *tail = NULL; for (int ...
ALGO
0.999708
5.604612
31f873cb-ee26-4740-b6d9-2a193342983f
arrows-1011/CPro
AOJ/Volume22/2217.cpp
#include <iostream> #include <vector> #include <cstring> using namespace std; #define MAX 100 int tx, ty, ans; int n, X[MAX][MAX], Y[MAX][MAX]; bool visited[MAX][MAX], found[MAX][MAX]; bool used[MAX][MAX], flg; void rec(int x, int y){ if(visited[x][y]){ if(!found[x][y] && tx == x && ty == y){ found[x]...
ALGO
0.999407
3.942683
30b5c612-b579-4953-be29-ea41fa957837
ishandutta2007/codeforces
burnedchicken/normal/1363/C.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define int long long #define ull unsigned long long #define ld long double #define rep(a) rep1(i,a) #define rep1(i,a) rep2(i,0,a) #define rep2(i,b,a) for(int i=(b); i<((int)(a)); i++) #define rep3(i,b,a) for(int i=(...
ALGO
0.999868
4.685101
24874898-ac10-4770-b05f-e41f265b41f1
instinct/GameFroot
GameFroot/libs/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.cpp
#include <Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.h> #include <Box2D/Common/b2BlockAllocator.h> #include <Box2D/Dynamics/b2Fixture.h> #include <new> using namespace std; b2Contact* b2EdgeAndCircleContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator) { void* mem =...
TOOL
0.98399
6.813939
16f50f2a-cfb7-4fc2-b5ce-84ebbd6f69be
JayGJJ/Algorithm_LeetCode
questions/4.寻找两个正序数组的中位数.cpp
// @before-stub-for-debug-begin #include <vector> #include <string> #include "commoncppproblem4.h" using namespace std; // @before-stub-for-debug-end /* * @lc app=leetcode.cn id=4 lang=cpp * * [4] 寻找两个正序数组的中位数 */ // @lc code=start #include <vector> using namespace std; class Solution { public: double findMed...
ALGO
0.999996
6.370452
cf03b1ab-59f5-47e4-85c3-f712329341d1
amansharma2001/CODING-NINJAS_Solutions_DSA_and_INTRO_TO_CPP
Coding Ninjas Solutions/INTRO_TO_CPP/Arrays/Lecture/Swap Alternate.cpp
#include <iostream> using namespace std; void swapAlternate(int *arr, int size) { int i=0; int temp; while(i<size-1){ temp = arr[i]; arr[i]=arr[i+1]; arr[i+1] = temp; i+=2; } } int main() { int t; cin >> t; while (t--) { int size; cin >> size; int *ar...
ALGO
0.997604
4.052512
d6d2ae42-9bdc-4da5-ace3-28dc14643f18
ButakovBI/Algorythms-DataStructures
sem2_algorithms_ds/2. Number theory/E_Strongly_compound_numbers.cpp
#include <iostream> #include <vector> unsigned long long gcd(unsigned long long a, unsigned long long b) { return (b == 0) ? a : gcd(b, a % b); } bool hasThreePrimeDivisors(int n) { int cnt = 0; const int num = n; for (int i = 2; i * i <= n; i += 1) { if (n % i == 0) { cnt++; ...
ALGO
0.999871
4.885624
78128d76-6c1b-4166-9c1f-8e2aecd32a26
suyasuyaTY/AtCoder-cpp
ABC/ABC376/A.cpp
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #include <atcoder/all> using namespace std; int main() { int N, C; cin >> N >> C; vector<int> T(N); rep(i, N) cin >> T[i]; int res = 1, t = T[0]; for (int i = 1; i < N; i++) { if (T[i] - t >= C) { res += 1; t = T[i]; ...
ALGO
0.999975
4.082027
0cb1c774-16ac-4c63-bba2-fa6db1f6d883
ZhenyuTan/XueTangX_C_plus_plus_course_basic
c2_1/c2_1.cpp
#include<iostream> using namespace std; int main(){ int n; cin >>n; int array[100] ={0}; for(int i =0;i<n;i++){ cin >> array[i]; } int sum =0; int max_idx=0; int min_idx =0; for (int j=0;j<n;j++){ sum = sum+array[j]; if(array[j]>array[max_idx]){ ...
ALGO
0.999878
3.51674
f0338ccd-0ef1-4071-bf27-0bf164de2bf9
akhil-maker/Complete-DSA
Dynamic Programming/lps.cpp
#include<iostream> using namespace std; int lcs(string x, string y){ int m = x.length(), n = y.length(); int dp[m+1][n+1]; for(int i=0; i<m+1; i++){ for(int j=0; j<n+1; j++){ if(i==0 || j==0) dp[i][j] = 0; else if(x[i-1]==y[j-1]) dp[i][j] = 1+d...
ALGO
0.999946
4.603388
ee467592-3f74-4f0e-bb90-387da13371a1
kplabs-pl/opencv_contrib_akaze_gpu
modules/aruco/samples/detect_board_charuco.cpp
#include <opencv2/highgui.hpp> #include <opencv2/aruco/charuco.hpp> #include <vector> #include <iostream> using namespace std; using namespace cv; namespace { const char* about = "Pose estimation using a ChArUco board"; const char* keys = "{w | | Number of squares in X direction }" "{h ...
TOOL
0.980237
6.302296
b3e6d003-b627-4786-ba86-c120b6cbfca6
cihuyyama/ExePAML1_106
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
3569d214-4afb-43dd-9a3f-462661651861
ProtonAOSPPhoenix/frameworks_av
media/codecs/amrwb/dec/src/oversamp_12k8_to_16k.cpp
/* ------------------------------------------------------------------------------ Filename: oversamp_12k8_to_16k.cpp Date: 05/08/2004 ------------------------------------------------------------------------------ REVISION HISTORY Description: ----------------------------------------------------------------...
ALGO
0.998723
6.132918
d043d9da-e083-4ba3-9b73-8fb1731dabe5
starboomboom/code_for_ccf
code/相反数.cpp
#include<iostream> #include<vector> #include<map> #include<string> #include<set> #include<stdlib.h> using namespace std; int main() { int n; cin>>n; int *a = new int[n]; for(int i=0;i<n;i++) cin>>a[i]; int count = 0; for(int i=0;i<n;i++) { for(int j=i+1;j<n;j++) { if(a[i]+a[j]==0) count++; } ...
ALGO
0.999858
4.437358
97cb9f29-1241-4383-bcff-1ba954d3a4e9
jisonchakma/problem-solving
Week_4/Day1/al_tab.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; stack<string>st; map<string,bool>mp; while(n--) { string s; cin>>s; st.push(s); } while(!st.empty()) { if(!mp[st.top()]) { cout<<st.top().substr(st.top().size(...
ALGO
0.999152
4.014386
bc0ba583-751a-4b67-a090-36e6ce4134e7
wuvei/algorithm
Algorithm/cpp/0636.ExclusiveTimeofFunctions/exclusiveTime.cpp
class Solution { public: vector<int> exclusiveTime(int n, vector<string>& logs) { stack<pair<int, int>> st; vector<int> res(n, 0); for (auto& log : logs) { char type[10]; int idx, timestamp; sscanf(log.c_str(), "%d:%[^:]:%d", &idx, type, &timestamp); ...
ALGO
0.997103
6.101686
e6d17c5c-5cf0-443b-8665-55e3dcdc11fb
divanys/holodov
pz/pz_2_1.cpp
// Разработка программ на языке С++ с использованием массива строк. // // Created by divan on 10/27/23. // // Задан список из десяти городов (массив [.]string). Найти количество городов, // название которых заканчивается сочетанием букв «град» или “grad”. #include <iostream> #include <string> #include <clocale> using ...
TOOL
0.965076
5.518952
b6ae1bb7-1f35-4436-b387-63be45a203a1
arash-ha/Cpp
Reverse Words in a String.cpp
/* Reverse Words in a String Given an input string s, reverse the order of the words. A word is defined as a sequence of non-space characters. The words in s will be separated by at least one space. Return a string of the words in reverse order concatenated by a single space. Note that s may contain leading or trai...
ALGO
0.999791
5.008663
e01fbd43-8c17-47a4-8631-a28b03053ee4
lokesh-bottu/BASIC-PROBLEMS
NUMBER TO BINARY CONVERSION.cpp
#include<iostream> #include<string> using namespace std; int main() { int num =12; string a=""; while(num>0){ a = to_string(num%2)+a; num /= 2; } cout<<a; } #include<iostream> #include<string.h> #include<math.h> using namespace std; int main() { string a = "110"; int j = 0; int value = 0; for(...
ALGO
0.999954
4.127266
d36027af-b6d0-4d7a-bce3-f253e7f7003b
tux550/RayTracer-RPF
src/integrators/bdpt.cpp
// integrators/bdpt.cpp* #include "integrators/bdpt.h" #include "film.h" #include "filters/box.h" #include "integrator.h" #include "lightdistrib.h" #include "paramset.h" #include "progressreporter.h" #include "sampler.h" #include "stats.h" namespace pbrt { STAT_PERCENT("Integrator/Zero-radiance paths", zeroRadiancePa...
ALGO
0.998458
5.227811
648ad775-d4f2-408e-9fc2-c9d62b475755
yayboss/yaycoin
src/rpcclient.cpp
#include "rpcclient.h" #include "rpcprotocol.h" #include "util.h" #include "ui_interface.h" #include <set> #include <stdint.h> using namespace std; using namespace json_spirit; class CRPCConvertParam { public: std::string methodName; //! method whose params want conversion int paramIdx; ...
CONFIG
0.954517
6.9232
a1686f68-6a38-48f4-8ad2-237b42d37dc9
Xiaxikongying/c_code
06_C++_11/04_jisuanqi/a.cpp
class Solution { private: public: int calculate(string s) { vector<int> ans; char op = '+'; int n = s.size(); int num = 0; for (int i = 0; i < n; ++i) { if (isdigit(s[i])) // 如果是数字 num = num * 10 + (s[i] - '0'); if (!is...
ALGO
0.999936
4.503644
f64442be-9607-4677-8a43-f7c5a6b03f53
tanish35/C
A_Two_Friends.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define vll vector<long long> #define vi vector<int> #define umap unordered_map<int, int> #define uset unordered_set<int> int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; while (t--) { int fl...
ALGO
0.999384
3.599599
f06145b7-11ee-4c02-b0e2-408b0dc515c0
darkshuige/codecode
c code/游游的矩阵统计.cpp
#include<bits/stdc++.h> #define jiasu ios::sync_with_stdio(false),cin.tie(0),cout.tie(0) #define int long long #define endl "\n" using namespace std; const int maxn=100005; int a[maxn],b[maxn]; int c[maxn],d[maxn]; map<int,int>mp; signed main() { jiasu; int n,m1,m2; cin>>n>>m1>>m2; for(int i=0;i<m1;i++) cin>>a[i]...
ALGO
0.999856
3.32069
52485e9c-e128-4d0b-9995-bfe5081e761c
gaolingshan/leetcode
Reverse Linked List II/Source.cpp
// <filename>.<ext> // Author: <name> // Update: <date> #include <iostream> #include <string> #include <vector> #include <map> #include <set> #include <unordered_set> #include <unordered_map> #include <cmath> #include <algorithm> #include <queue> #include <stack> using namespace std; struct ListNode { int val; L...
ALGO
0.999976
5.153634
40309086-89cf-4f06-aac5-65cca77cf0f8
djamel96/user_mvvm
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.998741
6.771294
87c4c858-949a-4793-93d9-897622c4fdbe
anhvietcr/CodeFights
Arcade/Intro/deleteDigit.cpp
int deleteDigit(int n) { int number = 0, max = 0; std::vector<int> r; //đảo số đưa vào vector //ví dụ : 222219 --> 912222 while(n > 0){ r.push_back(n%10); n/=10; } //chạy ngược i và j để tạo ra các số mới for(int i = 0; i < r.size(); i++){ number = 0; for(int j = r.size() - 1; j >= 0; j-...
ALGO
0.999631
4.950446
0299a9c4-2c62-42ad-a8ad-922334d6d27a
rohitkumar1502/CPP-CipherSchools
Practise-Class/maximumset.cpp
#include <iostream> #include <set> using namespace std; int main() { int n; cout << "Enter the number of digits: "; cin >> n; set<int> digits; cout << "Enter the digits: "; for (int i = 0; i < n; i++) { int digit; cin >> digit; digits.insert(digit); } set<...
ALGO
0.999771
5.622677
99a8e5a3-e23b-4eef-b733-9124759705b4
SANJID-01/Algo
knapsnack.cpp
#include <bits/stdc++.h> using namespace std; int knapsack(int W, int wt[], int val[], int n) { int dp[n + 1][W + 1]; for (int i = 0; i <= n; i++) { for (int w = 0; w <= W; w++) { if (i == 0 || w == 0) dp[i][w] = 0; else if (wt[i - 1] <= w) ...
ALGO
0.999996
5.112805
015e6e4e-185a-4e17-8f03-49bba33d7fa7
ThiagoFBastos/programacao-competitiva
beecrowd/3018 - Gluing Pictures.cpp
#include "bits/stdc++.h" using namespace std; using i64 = long long; using u64 = unsigned long long; using i32 = int; using u32 = unsigned; using i16 = short; using u16 = unsigned short; using ld = long double; using ii = pair<int, int>; int mod_sum(int x, int n) { return x >= n ? x - n : x; } auto suffix_array(st...
ALGO
0.99996
4.575086
5ff5d40d-a61c-436e-ab04-c1eddfcea47f
Kevin-Mattheus-Moerman/febio2
FEBioMix/FEFiberPowLinearSBM.cpp
#include "stdafx.h" #include "FEFiberPowLinearSBM.h" #include "FEMultiphasic.h" //----------------------------------------------------------------------------- // define the material parameters BEGIN_PARAMETER_LIST(FEFiberPowLinearSBM, FEElasticMaterial) ADD_PARAMETER2(m_E0 , FE_PARAM_DOUBLE, FE_RANGE_GREATER_OR_EQ...
ALGO
0.922607
4.642394
a4e20f92-b9f3-4f4b-8b2d-db937fd9af9f
Anastasiia-Ni/CodeWars-LeetCode
Leetcode_Medium/Divide_Array_Into_Arrays.cpp
/*You are given an integer array nums of size n and a positive integer k. Divide the array into one or more arrays of size 3 satisfying the following conditions: Each element of nums should be in exactly one array. The difference between any two elements in one array is less than or equal to k. Return a 2D array cont...
ALGO
0.999819
5.984537
fa077e3d-fc15-4021-a5cd-e1b0204bae4e
wuminzhe/FuckCoin
src/netbase.cpp
#include "netbase.h" #include "util.h" #include "sync.h" #include "hash.h" #ifndef WIN32 #include <sys/fcntl.h> #endif #include <boost/algorithm/string/case_conv.hpp> // for to_lower() #include <boost/algorithm/string/predicate.hpp> // for startswith() and endswith() using namespace std; // Settings static proxyTyp...
TOOL
0.984382
4.974189
5896eacb-bd39-4599-90ac-e3018201b4bb
chensiyuan030105/data-structure-code
src/ExpressionTree.cpp
#include <iostream> #include <bits/stdc++.h> #include <list> #include <sstream> #include <iomanip> #include <string> using namespace std; struct Token { // 一个简单的结构体,成员只有一个字符串,用来储存数值或符号 string text; Token(string text) : text(text) {} double doubleValue() { // 将string类型转化为double类型 stringstream ss(...
ALGO
0.997873
3.996593
4d78c8f7-c1be-407d-89ff-32ad57b88270
Flamigero/Algorithms
14-PlusOne.cpp
/* Given a non-empty array of decimal digits representing a non-negative integer, increment one to the integer. The digits are stored such that the most significant digit is at the head of the list, and each element in the array contains a single digit. You may assume the integer does not contain any leading zero, exce...
ALGO
0.9999
7.280082
d400ac1f-a163-4466-a8e2-c56df43e8b2c
apple-opensource-mirror/clang
src/lib/Transforms/Utils/LoopSimplify.cpp
#include "llvm/Transforms/Scalar.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/SetOperations.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/BasicAliasAnalysis.h" #include "llvm/Analysi...
ALGO
0.999115
6.804942
fa10411c-9331-4ea7-a846-41d466b632d2
UnknownCode01/DSA
Lab 7/4.cpp
#include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> struct Stack { int top; unsigned capacity; char* array; }; struct Stack* createStack(unsigned capacity) { struct Stack* stack = (struct Stack*)malloc(sizeof(struct Stack)); stack->capacity = capacity; stack-...
ALGO
0.999731
5.683383
a150c45c-f0ba-4079-8126-fc13c7c06a5a
access-softek/llvm-project-dil
libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp
// <random> // template<class RealType = double> // class student_t_distribution // template<class _URNG> result_type operator()(_URNG& g); #include <random> #include <cassert> #include <cmath> #include <numeric> #include <vector> #include "test_macros.h" template <class T> inline T sqr(T x) { return x * x; } ...
TEST
0.86264
4.526381
eac8bc62-8c6b-412c-b4db-110299f673f9
denis-gubar/Leetcode
Hash Table/3186. Maximum Total Damage With Spell Casting.cpp
class Solution { public: long long maximumTotalDamage(vector<int>& power) { long long result = 0; int N = power.size(); map<int, int> M; map<int, long long> F; F[-2] = 0; for (int x : power) ++M[x]; for (auto [key, value] : M) { ...
ALGO
0.999951
5.089185
ce83377c-5094-483a-8c22-3238e9ba06d8
blinskyblin/uhh
koroleva_e_l/0313a.cpp
#include <iostream> // source: https://codeforces.com/contest/313/problem/A int main() { int n = 0; std::cin >> n; if (n >= 0) { std::cout << n; } else { n =- n; // для упрощения понимания (неразберихи со знаками) if ((n / 100) * 10 + n % 10 < n / 10) { std::cout << - ((n / 100) * 10 + n % 10); } el...
ALGO
0.994597
4.17957
9a97f998-1a57-4675-b48c-0ff83ca8e3a1
AnimezKishan/Data-Structures-and-Algorithm-Preparation
LeetCode/Math/[C++] 1630. Arithmetic Subarrays.cpp
//Without Sorting. [ Arithmetic Progression ] //O(m * n) class Solution { public: bool isAp(vector<int> & temp){ int n = temp.size(); int mini = INT_MAX; int maxi = INT_MIN; unordered_set<int> st; for(int &i:temp){ mini = min(mini, i); maxi = max(max...
ALGO
0.999945
5.944166
99cceca3-912f-4104-b9d5-9a6fa58fefad
john6/CONTAIN
EIGENDIR/bench/benchVecAdd.cpp
#include <iostream> #include <Eigen/Core> #include <bench/BenchTimer.h> using namespace Eigen; #ifndef SIZE #define SIZE 50 #endif #ifndef REPEAT #define REPEAT 10000 #endif typedef float Scalar; __attribute__ ((noinline)) void benchVec(Scalar* a, Scalar* b, Scalar* c, int size); __attribute__ ((noinline)) void be...
TOOL
0.907647
5.111393
3d047c42-7917-41ad-a91a-40b0ac83d77e
hanpfei/chromium-net
third_party/icu/source/common/filterednormalizer2.cpp
#include "unicode/utypes.h" #if !UCONFIG_NO_NORMALIZATION #include "unicode/normalizer2.h" #include "unicode/uniset.h" #include "unicode/unistr.h" #include "unicode/unorm.h" #include "cpputils.h" U_NAMESPACE_BEGIN FilteredNormalizer2::~FilteredNormalizer2() {} UnicodeString & FilteredNormalizer2::normalize(const U...
TOOL
0.944639
7.532857
c4ce323f-6e98-43fc-81df-38c34a444a08
Farhana-Najnin/Datastructure
module22/insert_in_heap_implement(1input)_module22.cpp
#include<bits/stdc++.h> using namespace std; int main(){ vector<int>v={50,40,45,30,35,42,32,25,20,10}; int x; cin>>x; v.push_back(x); int cur_idx=v.size()-1; //cout<<cur_idx<<endl; //cout<<parent<<endl; while(cur_idx!=0) { int parent_idx=(cur_idx-1)/2; if(v[parent_idx]<v[cur_idx]) swap(v[parent_...
ALGO
0.99997
3.032759
ec545c00-ec37-49ff-b505-916a0c542910
martyr-deepin/deepin-webkit
Source/JavaScriptCore/runtime/NumberPrototype.cpp
#include "config.h" #include "NumberPrototype.h" #include "BigInteger.h" #include "Error.h" #include "JSFunction.h" #include "JSGlobalObject.h" #include "JSString.h" #include "Operations.h" #include "Uint16WithFraction.h" #include "dtoa.h" #include <wtf/Assertions.h> #include <wtf/MathExtras.h> #include <wtf/Vector.h>...
TOOL
0.853568
7.226888
9580ab9e-7579-45d2-bf54-5b7126c4fc81
lepecoder/algorithms
leetcode_cn/1893.检查是否区域内所有整数都被覆盖.cpp
/* * @lc app=leetcode.cn id=1893 lang=cpp * * [1893] 检查是否区域内所有整数都被覆盖 */ #include <bits/stdc++.h> using namespace std; // @lc code=start class Solution { public: bool isCovered(vector<vector<int>> &ranges, int left, int right) { bool bs[right - left + 1]; memset(bs, false, sizeof(bs)); ...
ALGO
0.999704
6.379985
e49818ac-2871-4a18-8a60-9790d3e7d491
HarshGupta02/Data-Structure-And-Algorithm
Greedy/Maximize sum after K negations.cpp
/// METHOD 1: class Solution{ public: using ll = long long int; long long int maximizeSum(long long int a[], int n, int k) { priority_queue<ll,vector<ll>,greater<ll>>pq; for(int i = 0; i < n ; i ++){ pq.push(a[i]); } ll ans = 0; while(k > 0){ ...
ALGO
0.999972
4.971089
9f87ff27-f656-427e-b8ce-b46973f2f07d
JakubHandzus/VUT-FIT-BIT
3BIT_5th_term/ISA/POP3_server(C++)/popser.cpp
/** * \file popser.cpp * \brief Subor obsahujuci main, napovedu * \author Jakub Handzus xhandz00 * * Projekt: ISA - Programovanie sietovej sluzby * Tema: POP3 Server * Rocnik: 2017/18 */ #include "popser.h" mutex mtx, mtx_thread; map<int,string> glob_fd_map; map<pthread_t, int> glob_thread_map; ifstr...
WEB
0.899421
3.71032
1d7cd18b-32ff-4e31-a35c-d102b2ec8ddf
Abhishekkkkkkkkkkk/100DaysofLearningChallange
DAY29/DSA/C++ STL/Containers/Adapter Cotainers/QueueSTL.cpp
#include<iostream> #include<queue> using namespace std; int main() { queue<string> q; q.push("Abhi"); q.push("Shek"); q.push("Kumar"); cout<<"Size of the Stack before pop "<<q.size()<<endl; cout<<"First Element :- "<<q.front()<<endl; q.pop(); cout<<"After Pop First Element :- "<<q...
ALGO
0.992789
4.09157
c2d9f1b8-e5df-45d7-9a57-07d26126df63
parvkumra/DS
interview100/kthsmallestBST.cpp
#include <queue> 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), left(left), right(right) {} }; class Solution...
ALGO
0.999993
6.29798
1b7194f3-7fec-402c-8dce-91f6b402af29
ishandutta2007/codeforces
shenxy13/normal/1276/A.cpp
#include <iostream> #include <algorithm> #include <string> #include <vector> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t; string s; cin >> t; for (int i = 0; i < t; ++i) { vector<int> ans; cin >> s; for (int j = 2; j < s.size(); ++j) { if (s[j...
ALGO
0.999925
3.558232
b8878430-7c2c-40ca-a4f7-8679bb82b42f
InCloudsBelly/Xngine
Engine/Source/ThirdParty/bullet3/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp
///btBox2dBox2dCollisionAlgorithm, with modified b2CollidePolygons routines from the Box2D library. ///The modifications include: switching from b2Vec to btVector3, redefinition of b2Dot, b2Cross #include "btBox2dBox2dCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "...
ALGO
0.999505
6.993068
2f272915-f446-421d-941f-a249d87bca51
Sujal261/DSA
LAB2/fibo.cpp
#include<iostream> using namespace std; int fibo(int num){ if (num ==0 || num ==1){ return num; } else{ return fibo(num-1)+fibo(num-2); } } int main() { int n , result; cout<<"enter the nth place for fibonacci number"<<endl; cin>>n; result =fibo(n); cout<...
ALGO
0.999208
3.411011
cd3f6a1a-f040-44a4-9a3f-d230a85551ac
ishandutta2007/codeforces
qwertypi/normal/1225/B1.cpp
#include <bits/stdc++.h> using namespace std; int A[101]; void solve(){ int n, k, d; cin >> n >> k >> d; for(int i = 0; i < n; i++){ cin >> A[i]; } int ans = n; for(int i = 0; i <= n - d; i++){ set<int> S; for(int j = i; j < i + d; j++){ S.insert(A[j]); ...
ALGO
0.999747
4.442248
1fe99f18-6c7c-40b7-95ed-d6259a6aa9c7
deepraj16/DSA
3-stack and queue /stack_brack.cpp
#include<bits/stdc++.h> using namespace std; bool isreduant(string a,stack<char>s){ for(int i=0;i<a.length();i++){ char ch=a[i]; if(ch=='(' || ch=='+' || ch=='-' || ch=='/' || ch=='*'){ s.push(ch); } else{ if(ch==')'){ bool isredunt=true; ...
ALGO
0.992255
3.985033
43fb968d-dc75-4057-84e9-747b3fca918c
lyw94/mscaffe
src/caffe/solvers/adam_solver.cpp
#include <vector> #include "caffe/sgd_solvers.hpp" namespace caffe { template <typename Dtype> void AdamSolver<Dtype>::AdamPreSolve() { // Add the extra history entries for Adam after those from // SGDSolver::PreSolve const vector<Blob<Dtype>*>& net_params = this->net_->learnable_params(); for (int i = 0; i ...
ALGO
0.991797
7.613853
a5451e89-2bde-4fa0-9c4a-e5e0d4cc1d0d
benHassan98/CP
Solved Problems/Solitaire.cpp
#include <bits/stdc++.h> using namespace std; int n=0,m=0; vector< pair< pair<int,int> ,vector<int> > >vsol; vector<pair<string,int> >jokers; vector<string>vd; vector<char>Ranks={'A','2','3','4','5','6','7','8','9','T','J','Q','K'}; bool vis[100]={0}; string fa[100]; bool overlap(vector<int>v1,vector<int>v2){ i...
ALGO
0.999967
3.665751
3bbc6071-05ad-4c84-ae55-720f8857f9a0
cannontwo/cannon
scripts/project_euler/euler_problem_42.cpp
#include <iostream> #include <fstream> #include <cassert> #include <cmath> #include <sstream> #include <cannon/log/registry.hpp> using namespace cannon::log; /*! * The nth term of the sequence of triangle numbers is given by t_n = 1/2 * (n * * (n+1)); so the first ten triangle numbers are: * * 1, 3, 6, 10, 15,...
ALGO
0.983798
6.144673
4bc4bf07-64fd-4b3d-9280-6acb7fb94f80
abhishekrane/Automating_Simulation
lammps-11Aug17/src/USER-OMP/pair_lj_charmm_coul_msm_omp.cpp
/* ---------------------------------------------------------------------- Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ #include <math.h> #include "pair_lj_charmm_coul_msm_omp.h" #include "atom.h" #include "comm.h" #include "force.h" #inc...
ALGO
0.999731
7.077258
3ccf1a23-fe1b-4eb3-af1d-f123681c725c
snkt-30/LeetCode_Que
0076-minimum-window-substring/0076-minimum-window-substring.cpp
class Solution { public: string minWindow(string s, string t) { unordered_map<char, int> mp; int ns = s.length(); int nt = t.length(); if(nt>ns) return ""; if(ns==1 and nt==1) { if(s[0]==t[0]) return t; ret...
ALGO
0.999985
6.181366
3f287dfa-78ac-4f06-9151-5eb390566d64
androm3da/clang_sles
3.7.0/cfe-3.7.0.src/lib/ASTMatchers/ASTMatchFinder.cpp
#include "clang/ASTMatchers/ASTMatchFinder.h" #include "clang/AST/ASTConsumer.h" #include "clang/AST/ASTContext.h" #include "clang/AST/RecursiveASTVisitor.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/StringMap.h" #include "llvm/Support/Timer.h" #include <deque> #include <memory> #include <set> namespace clang ...
TOOL
0.962968
7.744955
9425664e-3a1e-4aff-a6ee-e263f91b4750
dlwlgn/Algorithm
백준/silver4/1676/팩토리얼 0의 개수.cpp
#include <stdio.h> int num2(int number){ int count = 0; while(1){ if(number%2 == 0){ number /= 2; count++; } else{ return count; } } } int num5(int number){ int count = 0; while(1){ if(number%5 == 0){ number /=...
ALGO
0.999884
4.04951
e29c6d47-b3a5-4f16-9fb6-f1695b5ba01f
ehrlichsei/Carbrain
src/state_estimation/src/state_estimation/state_estimation.cpp
#include "state_estimation.h" #include <common/macros.h> #include <common/math.h> THIRD_PARTY_HEADERS_BEGIN #include <cmath> #include <ros/ros.h> #include <cmath> #include <limits> THIRD_PARTY_HEADERS_END #include "kalman_filter/linear_kalman_filter/linear_2ws/linear_2ws_kalman_filter.h" #include "kalman_filter/linea...
ALGO
0.974999
7.269279
975cf0c8-cafe-4de2-a46c-a6bac97871cc
yongs3/Algorithm
BOJ/1000/1924.cpp
#include <iostream> #include <string> using namespace std; int main(void) { int arr[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; string str[] = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"}; int a, b; cin >> a >> b; int tmp = 0; for(int i = 1; i < a; i++) { tmp += arr[i...
ALGO
0.99994
3.697452
11cbc1e0-c236-4da7-8552-3a440e28d54a
daszek0/zadania_public
SKN/B21-22/06_2021-11-06/prz.cpp
// Jakub Daszkiewicz // zadanie Przelewy #include <cstdio> #include <set> #include <algorithm> using namespace std; int main() { int n, s, t, a = 0; scanf("%d", &n); multiset<int> p; for (int i = 0; i < n; i++) { s = 0; for (int j = 0; j < n; j++) { scanf("%d", &t); s += t; } if (s) p.insert(...
ALGO
0.999587
3.078819
a516bc27-565a-4f77-a801-024cbbef324d
jenasuman/LeetCode-Solutions
881-boats-to-save-people/881-boats-to-save-people.cpp
class Solution { public: int numRescueBoats(vector<int>& people, int limit) { int n=people.size(); sort(people.begin(),people.end()); int boat=0; int i=0; int j=n-1; int currWeight=0; while(i<=j){ if(people[i]+people[j]<=limit){ ...
ALGO
0.999992
5.934696
917352e2-2d0f-4ea8-8f5f-22555811da1c
sbakic/algorithms
timus-online-judge/1585-penguins/main.cpp
#include <stdio.h> #include <string.h> int main(){ int n,sumEmperor=0,sumLittle=0,sumMacaroni=0; char name[20]; scanf("%d",&n); for(int i=0;i<=n;i++){ gets(name); if(strcmp(name,"Emperor Penguin")==0){ sumEmperor++; } else if(strcmp(name,"Little Penguin")==0...
ALGO
0.976355
3.497139
e1c43095-e50f-45d7-b685-e6803b2eb4d1
Washington-eng/LAPISCO---Computer-Vision-Trainee-Program
Topico39/Cpp/Origem.cpp
#include "opencv/highgui.h" #include "opencv2/opencv.hpp" using namespace std; using namespace cv; int main(void) { Mat img; Mat img_gray; Mat img_OTSU; Mat element = getStructuringElement(MORPH_RECT, Size(1, 3), Point(-1, -1)); img = imread("image.jpg", 1); //imshow("Image", img); cvtColor(img, img_gray, CV...
ALGO
0.864453
4.412204
1394e2a7-ccf3-4260-9463-874b8dd9cad8
ntrntr/leetcode
leetcode_cpp/leetcode/Sort with Swap.cpp
#include <vector> #include <iostream> #include <string.h> #include <algorithm> #include <string> #include <map> #include <stack> #include <unordered_map> #include <limits.h> using namespace std; int main() { int n; cin >> n; vector<int> f(n); vector<int> g(n); int pos = 0; int count=0; int swapcount = 0; int t ...
ALGO
0.999806
3.56918
3c23230e-7c4e-4252-bcdd-b466f26104b5
walidhabbach/Competitive_Programming
CodeForces/A/CF365-D2-A.cpp
#include <iostream> #include <string> using namespace std; int main() { int n; int k; long *a; int count=0; bool good;// i th number is good number , contains all digits not exceeding k (0,...,k) string str; cin>>n>>k; a=new long[n]; for(int i=0;i<n;i++){ cin >> ...
ALGO
0.999755
3.901597
90be2d8f-0d5d-49e5-9106-ec696ca99a5e
Sharpless298/CompetitiveProgramming
TOJ/362.cpp
#include <iostream> using namespace std; bool f; int ary[8][32]; int p[8]; void DFS(int depth) { if (depth == 26) { f = true; return; } for (int i = 0; !f && i < 3; i++) { for (int j = i + 1; !f && j < 4; j++) { if (p[i] == 13 || p[j] == 13) continue; if (ary[i][p[i]] == ary[j][p[j]]) { p[i]+...
ALGO
0.999901
3.869034
6b32bcf4-b95d-44e6-a8dc-7842a6124785
adi-shelke/DSA
subsequenceOfStrings.cpp
#include <bits/stdc++.h> void solve (string str, int start, int end, string temp,vector<string> &ans){ if(start>=end){ if(temp.length()>0) ans.push_back(temp); return; } solve(str,start+1,end,temp,ans); temp.push_back(str[start]); solve(str,start+1,end,temp,ans); } vector<string> subsequences(string str){ ...
ALGO
0.999856
5.361864
1c8feb4a-3125-49a7-b017-08670a88727a
AbdoWael2003/Graduation-Project-QAgent2.0-
FlowChartGeneration/CPPSamples/Sample487/sample_code487.cpp
#include <cmath> double area_pentagon(double a) { double area = (sqrt(5 * (5 + 2 * sqrt(5))) * pow(a, 2)) / 4.0; return area; }
ALGO
0.97148
3.566553
d2f728c9-8818-4d6f-932e-fe2f5398b5aa
Namanvijay/CP
practice problems/12.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node* next; }; struct Node *head=NULL; Node* SortedMerge(Node* a, Node* b); void midvalue(Node* head, Node** h1, Node** h2); void MergeSort(Node** head) { Node* head1=*head; Node* a; Node* b; if ((h...
ALGO
0.999918
4.235805
ccb05977-04e0-4831-a8eb-d52617eb8ba3
staeen/CPP-programs
arrIntersectSorted.cpp
/* Pinting intersection of two sorted arrays */ #include <vector> #include <iostream> #include <math.h> #include <limits.h> using namespace std; void arrIntersect(int arrm[], int m, int arrn[], int n) { int i=0,j=0; cout << "Intersection of array M and N is :"; while (i<m && j<n) { if (arrm[i]=...
ALGO
0.999964
4.445562
a28dd3eb-8d84-4581-be8d-461c9954a3c1
markmark345/Socket-programming
Server/Authentication/Authentication Server/Authentication Server/ServerConfig.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <fstream> #include <string> #include <cstdio> #include <map> #include <iterator> #include "ServerConfig.h" //using namespace std; map<string, string> CreateServerConfigMap() { map<string, string> serverConfig; ifstream file("server.config"); string str...
CONFIG
0.877499
3.190983
1ec83aef-9239-40c0-b7d7-de892facbeed
Extant-1/ThieVR
idlib/geometry/JointTransform.cpp
#include "precompiled.h" #pragma hdrstop /* ============= idJointMat::ToJointQuat ============= */ idJointQuat idJointMat::ToJointQuat( void ) const { idJointQuat jq; float trace; float s; float t; int i; int j; int k; static int next[3] = { 1, 2, 0 }; trace = mat[0 * 4 + 0] + mat[1 * 4 + 1] + ...
ALGO
0.976228
5.252673