uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
103c774c-7068-46e3-b8fb-632bec90f539
acksonx/troca
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
3f6b2b8d-5dd8-41e6-b5af-04ee67459f1c
rbtre/rbtre.github.io
assets/code/CF1077F1.cpp
#include <algorithm> #include <cstring> #include <iostream> using namespace std; using tp = int64_t; constexpr tp Hat_S = 203; tp val[Hat_S], f[Hat_S][Hat_S]; signed main() { tp n, k, x, target = -1145141919810; cin >> n >> k >> x; if (n / k > x) { cout << -1; return 0; } memset(f, -0x7f, sizeof f)...
ALGO
0.999943
4.14212
3ef844d2-549d-43a5-a368-c7d296c0dbc3
ANONDO1250/CodeFORCES_problem_solve
A_Vika_and_Her_Friends.cpp
#include <iostream> #include <cmath> #include <string> #include <algorithm> int main() { int t; std::cin >> t; while (t--) { int n, m, k; std::cin >> n >> m >> k; int x, y; std::cin >> x >> y; bool canEscape = true; for (int i = 0; i < k; ++i) ...
ALGO
0.999674
4.599387
319aaae5-df23-4d45-8d7c-8e475b57c3c0
AnomalyDetection2012/AnomalyDetection2012PWR
AnoDet2012/ANOMALY_DETECTION/RBF/KMeans.cpp
#include "KMeans.h" #include "time.h" #include <vector> #include <iostream> #include <stdlib.h> #include <limits> #include <QDebug> using namespace std; KMeans::KMeans(int clustersNumber, double minSigmaSquare, double maxSigmaSquare, int pointSize, int iterations, int quantizationError, std::vector<std::vector<double...
ALGO
0.998333
5.398649
b51ce912-0c75-4640-afc1-477d2e91d6bc
Masud-Parves/FAANG-Path
NeetCode.io/Graph Algorithms/684. Redundant Connection [BFS].cpp
class Solution { private: bool bfs(int src, int dest, vector<vector<int>>& graph, set<int>& seen){ queue<int> Q; Q.push(src); seen.insert(src); while(!Q.empty()){ int u = Q.front(); Q.pop(); if(u == dest) return true; for(int v...
ALGO
0.999955
6.016326
01003778-e6f5-47ab-ad6b-82c0e8417abc
vitamin1312/Extrapolation
Extrapolation/Extrapolation/mnk_reg.cpp
#include "mnk_reg.h" #include <vector> #include <iostream> #include<math.h> using namespace std; vector <double> mnk_reg:: solve_matrix( vector<vector<double>> &a, vector<double> &b) { vector <vector<double>> matr ; for (auto &p : a) { matr.push_back(p); } int num = 0; for (auto &p : ...
ALGO
0.998742
4.053028
b0cd8c6b-e36d-49d7-aaac-91dc09ce4204
Zenfeuer/algorithms
change_money.cpp
/** * Purpose: Determines the minimum number of coins needed to change * the input value with coins denomination 1, 5, and 10. * * This must be resolved with a greeding algorithm. * * Input: a single integer; 1 <= m <= 10^3 * Output: minimum number of coins needed to change m with * denomination 1,...
ALGO
0.999571
5.845923
a1a2af5d-e819-4f2f-8317-fd28e75984db
jki14/competitive-programming
2014/facebook.com/hackercup/qualification/proc.cpp
#include <cmath> #include <cstdio> #include <vector> using namespace std; double solution(const int n, const int ps, const int pr, const int pi, const int pu, const int pw, const int pd, const int pl){ //TODO check if parameters are all valid. vector<vector<vector<double>>> f(n + n, vector<vector<double>>(n + ...
ALGO
0.999295
3.666204
7da6e79d-8f07-4125-b894-c44a4f2ccc0a
bhawnajoshi1304/DSA
Graph/6_Bipartite_graph_colouring_using_BFS.cpp
// Bipartite graph is a graph that can be divided into two partitions such that no nodes in same partition are connected // Try bfs and assign color while travelling, if colored check if matching else assign opposite to current // Check for odd size cycles // https://www.geeksforgeeks.org/problems/bipartite-graph/1 #i...
ALGO
0.999968
5.806312
d47a6d6b-96d6-4454-ae8f-c62b4f768041
Kishore121523/STL_KIshore
BinarySearch/BinarySearch 1D Arrays/findPeakElement.cpp
#include<bits/stdc++.h> using namespace std; int findPeakElement(vector<int> &arr, int n){ // edge cases if(n==1) return 0; if(arr[n-1] > arr[n-2]) return n-1; if(arr[0]>arr[1]) return 0; // binary search int low = 1; int high = n-2; while(low<=high){ int mid = low + (high-low)/2; if(arr[mi...
ALGO
0.999946
5.120754
b68a8bd4-3862-4487-b6c1-fd1b33954c3b
Survedog/AlgorithmSolutions
Baekjoon/13343.cpp
/* * Problem: https://www.acmicpc.net/problem/13343 * ๋ถ„๋ฅ˜: ์œ ํด๋ฆฌ๋“œ ํ˜ธ์ œ๋ฒ• * * ๊ฒŒ์ž„์—์„œ a > b์ธ (a, b)๊ฐ€ ์ฃผ์–ด์กŒ์„ ๋•Œ, ์ดํ›„ ๊ฒŒ์ž„์—์„œ ๋‘ ํ”Œ๋ ˆ์ด์–ด ์ค‘ ํ•˜๋‚˜๋Š” ๋ฐ˜๋“œ์‹œ (b, a % b)๋ฅผ ๋งŒ๋‚˜๊ฒŒ ๋œ๋‹ค. * ์ด๋•Œ a >= k * b๋ผ๋ฉด (k๋Š” 2 ์ด์ƒ์˜ ์ •์ˆ˜) ํ”Œ๋ ˆ์ด์–ด๋Š” ์ƒ๋Œ€๋ฐฉ์—๊ฒŒ (a % b + b, b), (b, a % b) ์ค‘ ํ•˜๋‚˜๋ฅผ ์ฃผ์–ด ์ž์‹ ์ด ์ดํ›„ ๊ฒŒ์ž„์—์„œ (b, a % b)๋ฅผ ๋งŒ๋‚  ์ง€ ๋ง์ง€๋ฅผ ์„ ํƒํ•  ์ˆ˜ ์žˆ๋‹ค. * ๋”ฐ๋ผ์„œ ๊ฒŒ์ž„์˜ ๊ฒฐ๊ณผ๋Š” ํ˜„์žฌ ํ”Œ๋ ˆ์ด์–ด๊ฐ€ (b, a % b)๋ฅผ ๋งŒ๋‚˜๋Š” ๊ฒฝ์šฐ์™€ ์•ˆ ๋งŒ๋‚˜๋Š” ๊ฒฝ์šฐ๋กœ ...
ALGO
0.999983
4.064553
0b7c00f6-cbe4-4dbf-9651-9dfe63ee7f70
kakamorsch/Creality-Ender3-v4.2.2-Marlin-firmwares-master
Marlin/src/gcode/calibrate/G76_M192_M871.cpp
/** * G76_M871.cpp - Temperature calibration/compensation for z-probing */ #include "../../inc/MarlinConfig.h" #if ENABLED(PROBE_TEMP_COMPENSATION) #include "../gcode.h" #include "../../module/motion.h" #include "../../module/planner.h" #include "../../module/probe.h" #include "../../feature/bedlevel/bedlevel.h" #...
ALGO
0.858102
7.769672
a5071934-e380-4429-ac93-72aa319ba190
DdingJae418/coding
Test/codingbook/07.cpp
#include <string> #include <vector> #include <algorithm> #include <iostream> using namespace std; class Point { private: int x, y; public: Point(int x = 0, int y = 0) : x(x), y(y) {} bool operator==(const Point& other) const { return (other.x) == x && (other.y == y); } void SetPoint(in...
ALGO
0.999704
4.639483
de797ea6-489e-4372-8f04-5b9bd85bbc81
xevyimpala/nowerybki
odcinek_12cz2/main.cpp
#include <iostream> using namespace std; int v1,v2,ile; int main() { cin>>ile; for(int i=1; i<ile; i++) { cin>>v1>>v2; cout<<2*v1*v2/(v1+v2)<<endl; } return 0; }
ALGO
0.998394
3.085608
fff6ce07-0900-4219-881a-c60ec9677ab7
cvetakg/PathPlanning
src/Eigen-3.3/doc/examples/tut_arithmetic_dot_cross.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; using namespace std; int main() { Vector3d v(1,2,3); Vector3d w(0,1,2); cout << "Dot product: " << v.dot(w) << endl; double dp = v.adjoint()*w; // automatic conversion of the inner product to a scalar cout << "Dot product via a matrix product...
ALGO
0.997952
4.042919
3aa4d603-f328-4354-93b8-5c689d7aa1c9
qwerty2024/LeetCode
mideum/368.cpp
class Solution { public: vector<int> largestDivisibleSubset(vector<int>& nums) { int n = nums.size(); sort(nums.begin(), nums.end()); vector<int> ans; vector<int> dp(n, 0); vector<int> dp2(n, -1); for (int i = 0; i < n; i++) { for (int j = ...
ALGO
0.999947
5.143883
e8c4cc9a-b10a-45ad-9ff3-51ef471a7b58
ArpitNalkande/CPP
CPP/Array/sameindex.cpp
#include <bits/stdc++.h> using namespace std; int indexSame(int arr[],int N){ for(int i=0;i<N;i++){ if(arr[i]==i){ return i; } else{ return -1; } } } int main(){ int arr[5]={2,4,3,4}; int N = sizeof(arr) / sizeof(arr[0]); cout<<indexSame(a...
ALGO
0.999509
4.609066
00fc2986-214d-4a49-b5e5-2bb1b7703799
PriyanshuKrishna/LeetCode-Submissions
1161-maximum-level-sum-of-a-binary-tree/1161-maximum-level-sum-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.999982
6.316138
d080ddb9-a7b4-44dd-b84a-8b4a6204c15d
hwannow/PS
BOJ/27323.cpp
#include<bits/stdc++.h> #define x first #define y second #define INF 1e9 using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a, b; cin >> a >> b; cout << a * b; }
ALGO
0.996839
3.878805
6cb61d2d-630c-4b2a-8883-b5501c3de526
liuqingtao/daneicplusplus
day09/cut.cpp
#include<iostream> #include<cstring> using namespace std; class A{ public: virtual void foo(void){ cout<<"A::foo(void)"<<endl; } }; class B:public A{ public: void foo(void){ cout<<"B::foo(void)"<<endl; } }; int main(void){ A a; a.foo(); B b; b.foo(); //a=b; //ๅฏน่ฑกๆˆชๅˆ‡๏ผŒไผšๆŠŠ...
TOOL
0.908262
4.011089
ba25958b-3f75-4685-848b-a631335f587a
Masj200/cpp
week2/p96-2-2.cpp
#include <iostream> using namespace std; void readNumber(int num) { int units[] = {100000, 10000, 1000, 100, 10, 1}; string unitsName[] = {"๋งŒ", "๋งŒ", "์ฒœ", "๋ฐฑ", "์‹ญ", ""}; bool started = false; for (int i = 0; i < 6; i++) { int digit = num / units[i]; num %= units[i]; if (dig...
TOOL
0.989466
6.057001
e53d73fa-1927-4bd7-bb4b-fb94de0fc171
Mohammad-Saliq/LoveBabbar-repo
Lecture033 Recursion Day3/linearSearch.cpp
#include<iostream> using namespace std; void print(int arr[], int n) { cout << "Size of array is " << n << endl; for(int i=0; i<n; i++) { cout << arr[i] << " "; } cout << endl; } bool linearSearch(int arr[], int size, int k ) { print(arr,size); //base case if(size == 0) retu...
ALGO
0.999575
4.721461
523fbdf4-5147-4099-b9e8-498695dcaaae
tiger1710/didactic-octo-funicular
source/c++(c)-code/algospot.com/JOSEPHUS.cpp
#include <iostream> #include <list> #define endl '\n' using namespace std; class Josephus { private: int N, K; list<int> survivors; void input(void) { cin >> N >> K; for (int i = 0; i < N; i++) survivors.push_back(i + 1); } void calc(void) { list<int>::iterator ...
ALGO
0.999906
4.100368
f4a36248-a079-4c15-8428-bd4f88d1cd33
mo-ayman/Lexical-Syntax-Analyzer
LexicalAnalyzerGenerator/NFA/NFAConstruction.cpp
#include <utility> #include <array> #include "NFAConstruction.h" NFAConstruction::NFAConstruction() { stateCount = 0; startStateIndex = 0; nfs = std::vector<std::map<char, std::vector<int>>>(); finalStates = std::unordered_map<int, std::tuple<std::string, Priority, int>>(); } // CONCAT, STAR, PLUS, O...
ALGO
0.997879
7.175015
17bbd895-4ca6-49c6-b2f0-4ae17ef9679b
SchmitzMatias/marlin
buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.cpp
#include "pins_arduino.h" #ifdef __cplusplus extern "C" { #endif // Pin number const PinName digitalPin[] = { PE_2, // D0 PE_3, // D1 PE_4, // D2 PE_5, // D3 PE_6, // D4 PI_8, // D5 PC_13, // D6 PC_14, // D7 PC_15, // D8 PI_9, // D9 PI_10, // D10 PI_11, // D11 PF_0, // D12 PF_1, /...
CONFIG
0.889797
6.262579
74b366f0-d47a-41f3-864f-f1c97c879196
onixcoin-io/onix
src/cpp-ethereum/ethash/lib/ethash/progpow.cpp
#include <ethash/progpow.hpp> #include "bit_manipulation.h" #include "endianness.hpp" #include "ethash-internal.hpp" #include "kiss99.hpp" #include <ethash/keccak.hpp> #include <array> namespace progpow { namespace { /// A variant of Keccak hash function for ProgPoW. /// /// This Keccak hash function uses 800-bit pe...
ALGO
0.998979
7.260067
98dc3589-0ef9-494f-9164-a1eec7b76cf3
bhaviknetam/dsa_with_cpp
115-distinct-subsequences/distinct-subsequences.cpp
class Solution { public: int dp[1005][1005]; int subseq(int i, int j, string& s, string& t) { int n = s.length(); int m = t.length(); if(j == m) return 1; if(i == n) return 0; if(dp[i][j] != -1) return dp[i][j]; int total =0; if (s[i] == t[j]) ...
ALGO
0.999994
6.169166
73f817b4-d6bd-4c00-a08e-7c7eb029dbb1
Chadokar/contests
885/885_a.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long vector<ll>arr,prefix; ll y = (pow(10,9) + 7); void solve(){ } int main(){ int t; cin>>t; while(t--){ solve(); } }
ALGO
0.992441
4.51912
4308fb46-ff3c-451f-810d-be5eaa6ea588
mdbal-lunule/lunule
src/boost/libs/random/example/die.cpp
//[die /*` For the source of this example see [@boost://libs/random/example/die.cpp die.cpp]. First we include the headers we need for __mt19937 and __uniform_int_distribution. */ #include <boost/random/mersenne_twister.hpp> #include <boost/random/uniform_int_distribution.hpp> /*` We use __mt19937 wi...
ALGO
0.951953
6.137387
5490a608-f903-495c-b0b2-e4bb30737416
ishandutta2007/codeforces
peterr/normal/1450/A.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; while (t--) { int n; string s; cin >> n >> s; int cnt = 0; for (int i = 0; i < n; i++) { if (s[i] == 't') ...
ALGO
0.999786
4.378262
b5174e26-98eb-4d20-ab3e-e0d93c390792
JustAG7/Competitive_Programming
Codeforces/Others/CPUlm Winter Contest 2022/G.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define pf push_front #define db double #define X first #define Y second #define fast ios_base::sync_with_stdio(false);cout.tie(NULL);cin.tie(NULL); #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() #define...
ALGO
0.999982
3.240044
b0b41f28-5c03-42c5-b200-9089ec37c71d
LipikaGoyal/DSA
POTD/Count Symmetric Integers.cpp
class Solution { public: int countSymmetricIntegers(int low, int high) { int count = 0; for (int i = low; i <= high; ++i) { if (i < 100) { count += i % 11 == 0; } else if (i > 1000) { const int i0 = i % 10; ...
ALGO
0.998019
6.028948
4e83df9e-3d64-4075-b2b7-074867ff90bb
ishandutta2007/codeforces
egor.lifar/normal/702/E.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cstdio> #include <numeric> #include <cstring> #include <ctime> #include <cstdlib> #include <set> #include <map> #include <unordered_map> #include <unordered_set> #include <list> #include <cmath> #include <bitset> #include <cassert> #...
ALGO
0.999918
3.059407
20440489-1168-4ad2-bca0-1fa6b276a4a1
riduanul/phitron
algorithm/module-19/kruskal_s_algo.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e5+5; int parent[N]; int parentSize[N]; void dsu_set(int n){ for(int i=1; i<=n; i++){ parent[i]=-1; parentSize[i]=1; } } int dsu_find(int node){ while(parent[node] != -1){ node = parent[node]; } retu...
ALGO
0.999992
4.243971
34cf6f5a-6c5c-4fd9-af8b-8a14084031f0
Raja58/Trees
Binary Tree Paths.cpp
// <!-- // ============================ // @Author : raja_5 // @Version : 1.0 // @Date : 17 Dec 2021 // @Detail : Binary Tree Paths (LeetCode) // ============================ // --> class Solution { public: vector<string> binaryTreePaths(TreeNode* root) { if(!root) ...
ALGO
0.99992
6.204544
9c721ba6-9577-4967-87dd-c680a7afbcab
r4pidstart/problems
by_category/impl/1259.cpp
// https://www.acmicpc.net/problem/1259 // 2022-03-16 23:27:42 0ms #include<bits/stdc++.h> using namespace std; int main(void) { string s; cin >> s; while(s != "0") { int flag=0; for(int i=0; i<s.length()/2; i++) if(s[i]!=s[s.length()-i-1]) flag++; cout <...
ALGO
0.999697
4.460792
72ff813f-84c8-4e2f-9297-8d2599daec4e
airen3339/Cocos2d-Lua-Community
cocos/math/Vec2.cpp
#include "math/Vec2.h" #include "math/MathUtil.h" #include "base/ccMacros.h" NS_CC_MATH_BEGIN // returns true if segment A-B intersects with segment C-D. S->E is the overlap part bool isOneDimensionSegmentOverlap(float A, float B, float C, float D, float *S, float * E) { float ABmin = std::min(A, B); float AB...
TOOL
0.950009
7.027948
d27cae39-120d-41ef-8dff-38bf0b49eccc
syncfusion/SfQtWebKit
qtwebengine/src/3rdparty/chromium/third_party/mesa/src/src/gallium/auxiliary/gallivm/f.cpp
/* * This file allows to compute the minimax polynomial coefficients we use * for fast exp2/log2. * * How to use this source: * * - Download and build the NTL library from * http://shoup.net/ntl/download.html , or install libntl-dev package if on * Debian. * * - Download boost source code matching to your...
ALGO
0.999633
5.579648
e3fbb8a3-2c32-443a-9942-966017f1434b
nhuthinh0258/vietfresh
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
f66a1fcb-7702-4687-90a3-3c8456bc7fd3
sumit-raghukant-soni/Leetcode_Solutions
502-ipo/ipo.cpp
class Solution { public: int findMaximizedCapital(int k, int w, vector<int>& profits, vector<int>& capital) { vector<pair<int, int>> v; int N = profits.size(); for(int i = 0; i < N; i++) { v.push_back({profits[i], capital[i]}); } sort(v.begin(), v.end(), [&](pair...
ALGO
0.999995
5.391726
f62b65d2-5214-4831-a483-cf9c7ebeebd8
NalinDalal/cpp_projects
casino_game.cpp
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int generateRandomNumber(int min, int max) { srand(static_cast<unsigned int>(time(0))); return rand() % (max - min + 1) + min; } bool playAgain() { char playAgain; cout << "Do you want to play again? (y/n): "; cin >> pl...
ALGO
0.872102
4.68597
2b8c827d-edfa-4f8b-a748-02ac53b7f8e4
rikuTanide/atcoder_endeavor
abc145/abc145_e.cpp
#include <bits/stdc++.h> #include <cmath> const double PI = 3.14159265358979323846; using namespace std; typedef long long ll; const double EPS = 1e-9; #define rep(i, n) for (int i = 0; i < (n); ++i) //#define rep(i, n) for (ll i = 0; i < (n); ++i) //typedef pair<ll, ll> P; typedef pair<ll, ll> P; const ll INF = 10e17...
ALGO
0.99996
4.053619
ebe99522-6bdc-4bc8-bac4-97a925632da0
MatheusMenezesss/data_struct
ponto_extra.cpp
#include<iostream> #include<cstdlib> #include<cstring> using namespace std; #define par_fecha ')' struct stack{ char value; stack *next = nullptr; }; struct lista{ char value; lista *proximo = nullptr; lista *anterior = nullptr; }; class expr{ private: stack* topo_pilha; list...
ALGO
0.999784
3.761496
d58944ec-9981-43f8-bf61-b37f4dda047d
laurentkneip/CS133swissknife
trunk/test/test_hammingDistance1.cpp
#include <stdlib.h> #include <iostream> #include "swissknife/profiling/lap_timer.hpp" void initData( unsigned char * data1, unsigned char * data2 ) { for( int i = 0; i < 64; i+=2 ) { data1[i] = 0x55; //01010101 data2[i] = 0x55; //01010101 } for( int i = 1; i < 64; i+=2 ) { data1[i] = 0x55; //01010101...
TEST
0.950967
5.445245
f4ea3814-c8b4-425d-9c5b-98ea9ed3e423
zhenglu0/Programming_Practice
Practices/LinkedList/DeleteNode.cpp
#include <iostream> using namespace std; // ้ข˜็›ฎ๏ผš็ป™ๅฎš้“พ่กจ็š„ๅคดๆŒ‡้’ˆๅ’Œไธ€ไธช็ป“็‚นๆŒ‡้’ˆ๏ผŒๅœจO(1)ๆ—ถ้—ดๅˆ ้™ค่ฏฅ็ป“็‚นใ€‚้“พ่กจ็ป“็‚น็š„ๅฎšไน‰ๅฆ‚ไธ‹๏ผš struct Node { int key; Node* next; }; /////////////////////////////////////////////////////////////////////// // Delete a node in a list // Input: pListHead - the head of list // pToBeDeleted - the node to be d...
ALGO
0.999971
4.618182
17606b24-1428-4e01-8db0-a6f6a855978b
rijegaro287/Tarea_02_ANPI
Parte 3/parte3_p1.cpp
#include "parte3.h" mat parte_3::pseudo_inversa(const mat& A){ double tol = 1e-5; int iter_max = 1000; auto n = A.n_cols; mat identidad = eye(n, n); int p = 5; double norma_k = 0; double norma_k_anterior; double error; mat x_k = (1 / pow(norm(A), 2)) * trans(A); // cout << norm...
ALGO
0.99959
3.151117
c2e3c133-c106-44c1-b79f-56e2152b9f8c
mzssbqd/learning-code
algorithmic problem/old problem/11.cpp
#include<iostream> #include<cstdio> #include<vector> #include<algorithm> using namespace std; int main() { long long n,Q,scode=0; scanf("%lld",&n); vector<long long> arr(n); for(long long& x:arr) scanf("%lld",&x); //sort vector<int> down(n); for(int i=0;i<n;i++) down[i]=i; sort(down.begi...
ALGO
0.999997
3.861921
56c0a761-8eb0-427c-9291-a1f61a58e369
xXNembiXx/mangos_333
dep/src/g3dlite/Random.cpp
#include "G3D/Random.h" namespace G3D { Random& Random::common() { static Random r; return r; } Random::Random(void* x) : state(NULL), m_threadsafe(false) { (void)x; } Random::Random(uint32 seed, bool threadsafe) : m_threadsafe(threadsafe) { const uint32 X = 1812433253UL; state = new uint32[N];...
TOOL
0.942127
5.926675
9b604440-81aa-46af-a7ad-9b359bedbfca
Javi5454-DGIIM/FP
Practicas/Sesiรณn 4/II_DiferenciaTiempo.cpp
//FP //Javier Gmez Lpez /* Programa para calcular el espacio de tiempo entre dos instantes distintos manteniendo las unidades. Implementamos algoritmos de conversion de unidades en sistema sexagesimal. Adems nos dir si los intervalos de tiempo estn en das distintos. Por un lado compararemos los se...
ALGO
0.985703
3.936831
95a5775c-52f5-48be-a0fb-61f9db14113d
baseoursteps/b75
37non.cpp
#include <algorithm> #include <cstddef> #include <iostream> #include <vector> using namespace std; // Given an array of intervals intervals where intervals[i] = [starti, endi], // return the minimum number of intervals you need to remove to make the rest of // the intervals non-overlapping. // Input: intervals = [[1...
ALGO
0.999595
5.945421
80b8fc3a-ae1a-4264-92a6-d17c47a3f94c
jasonkclee/csc419-cubicstyle
libigl/include/igl/shape_diameter_function.cpp
template < typename DerivedP, typename DerivedN, typename DerivedS > IGL_INLINE void igl::shape_diameter_function( const std::function< double( const Eigen::Vector3f&, const Eigen::Vector3f&) > & shoot_ray, const Eigen::MatrixBase<DerivedP> & P, const Eigen::MatrixBase<DerivedN> & N, ...
ALGO
0.999693
7.144979
8d821983-092e-4a84-86d7-534a2a0e8583
VSCROx/Cpp_code
C++ by AK/Character Array/Largest word in a Sentence.cpp
#include<iostream> using namespace std; int main(){ int n; cin>>n; cin.ignore(); char a[n+1]; cin.getline(a, n); // As compiler stop to execute after a space encounter cin.ignore(); int i=0; int currlen = 0, maxlen = 0; int st = 0, maxst = 0; while(1){ if(a[i]==' ' || a[...
ALGO
0.999736
3.298646
29bb0afb-c19e-48f6-8b10-b416822b43a8
thenandapurkar/DataStructureProjects
hw-nandapur-master/hw1/sum_pairs.cpp
#include <iostream> #include <fstream> #include <string> using namespace std; int main (int argc, char * argv[]){ //Read in the input file and designate an output file to write to ifstream numbers(argv[1]); ofstream outputs(argv[2]); //Get and store the number of integers to follow //string thisMany; int siz...
ALGO
0.988026
5.225746
2745e2cf-7e8e-415e-8dfe-3a2b9f001ee3
KyoungnamMin/ProblemSolve
BaekJoon/BOJ_9498.cpp
#include <iostream> using namespace std; int main(void){ int score; cin >> score; if(score>=90 && score<=100) cout<< "A"; else if(score>=80 && score<=89) cout<< "B"; else if(score>=70 && score<=79) cout<< "C"; else if(score>=60 && score<=69) cout<< "D"; else cout<< "F"; return 0; }
ALGO
0.999414
3.538758
ff71c143-e7fa-47ec-978a-f534204f37a5
wxl-98/OJ_Code
453.cpp
/*********************************************************** * &Author: Wang Xianling * &E-mail: <EMAIL> * &Motto: Believe in yourself. * &File Name: 453.cpp * &Created Time: 19Century 2019ๅนด12ๆœˆ14ๆ—ฅ ๆ˜ŸๆœŸๅ…ญ 15ๆ—ถ55ๅˆ†11็ง’ * CST Day/348 and Week/49 of this year * ...
ALGO
0.999996
3.399612
79d42616-3add-4459-9d57-e4eb8cb63094
cHI11F/LAB_7.2rec
LAB_7.2rec/LAB_7.2rec.cpp
#include <iostream> #include <iomanip> #include <time.h> using namespace std; void Create(int** a, const int n, const int Low, const int High, int i = 0, int j = 0); void Print(int** a, const int n, int i = 0, int j = 0); bool SearchMinMax(int** a, const int n, int& maxAbove, int& minBelow); void SwapMinMax(int** a, c...
ALGO
0.999758
4.072589
510d62f5-1714-4503-a1c8-a1c43a0c73b7
qiaozishun4/CSP2024_BJ
BJ-Junior/answers/BJ-J00380/chain/chain.cpp
#include<bits/stdc++.h> using namespace std; #define pb emplace_back typedef long long ll; int n,s[1005][2005],l[1005],q,k,r,c,t; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); freopen("chain.in","r",stdin); freopen("chain.out","w",stdout); cin>>t; while(t--){ cin>>n>>...
ALGO
0.99983
3.058934
545c8440-21b2-4122-b38f-b1b211172ec2
sarvex/leetcode-mini-kanren
solution/2400-2499/2433.Find The Original Array of Prefix Xor/Solution.cpp
class Solution { public: vector<int> findArray(vector<int>& pref) { int n = pref.size(); vector<int> ans = {pref[0]}; for (int i = 1; i < n; ++i) { ans.push_back(pref[i - 1] ^ pref[i]); } return ans; } };
ALGO
0.999997
5.47297
05dd47df-5689-4500-b55d-02e9b4cc9635
prade-p/pds_2
PDS_II/vpl_10/jogo_da_vida.cpp
#include "jogo_da_vida.hpp" using namespace std; // Inicializa vivas_ como um vetor com l elementos. // Cada elemento, por sua vez, รฉ um vetor com c elementos iguais a false. JogoDaVida::JogoDaVida(int l, int c) : vivas_(l, std::vector<bool>(c, false)) { } bool JogoDaVida::viva(int i, int j) { return vivas_[i]...
ALGO
0.999374
6.187391
6d892183-a7b6-42e5-9a75-bc50ca36e7a6
yeshenyong/Wiki_Wiki
LeetCode/่ดชๅฟƒ/376. ๆ‘†ๅŠจๅบๅˆ—$.cpp
class Solution { public: int wiggleMaxLength(vector<int>& nums) { /*---method 1:ๅฑ€้ƒจๆœ€ไผ˜ๅŒ–ๆœ€ไผ˜---*/ if (nums.size() <= 1) return nums.size(); int Sequence = 1; int preCur = 0; int NowCur = 0; for (int i=0;i < nums.size()-1;i++) { NowCur = nums[i+1] - nums[i]; ...
ALGO
0.999977
5.444482
2d756bc5-da44-475b-910c-5370036b29b4
0auv0/CompArch-H-
lab5/CPU/MM_base.cpp
#include<iostream> #include<random> #include<chrono> using namespace std; int N; void matrix_mul(float *A, float *B, float *C){ for(int i = 0; i < N; i++){ for(int j = 0; j < N; j++){ float sum = 0; for(int k = 0; k < N; k++){ sum += A[i*N + k] * B[k*N + j]; ...
ALGO
0.99043
4.117294
5bb7fd0e-98a3-4381-9648-e3cb496f1a57
ooyniz/OpenCV-chromakey
opencv-sources/opencv-4.9.0/modules/video/src/tracking/detail/tracking_online_mil.cpp
#include "../../precomp.hpp" #include "tracking_online_mil.hpp" namespace cv { namespace detail { inline namespace tracking { #define sign(s) ((s > 0) ? 1 : ((s < 0) ? -1 : 0)) template <class T> class SortableElementRev { public: T _val; int _ind; SortableElementRev() : _val(), _ind(0) { ...
ALGO
0.999726
6.223973
93b7af7a-991e-45ab-a81e-4f4a4adea709
jcsq6/sgl
contrib/assimp/code/Common/SGSpatialSort.cpp
/** @file Implementation of the helper class to quickly find vertices close to a given position. Special implementation for the 3ds loader handling smooth groups correctly */ #include <assimp/SGSpatialSort.h> using namespace Assimp; // --------------------------------------------------------------------------------...
ALGO
0.998525
7.274989
95a92713-4ece-455f-bd54-6f739648d182
niazlv/universityKPFU1courseC--
laba7/src/labwork7_6.cpp
#include <iostream> using namespace std; int main() { int M = 4; int N = 5; int K = 3; int matrix[M][N]; // ะ˜ะฝะธั†ะธะฐะปะธะทะฐั†ะธั ะผะฐั‚ั€ะธั†ั‹ for (int i = 0; i < M; i++) { for (int j = 0; j < N; j++) { matrix[i][j] = i * N + j + 1; } } int sum = 0; in...
ALGO
0.999595
4.492831
9cb855cc-b93e-43e7-b161-14f64893cd59
ishandutta2007/codeforces
wxhtzdy/normal/1627/B.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int tt; cin >> tt; while (tt--) { int n, m; cin >> n >> m; vector<pair<int, int>> a; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { a.emplace_back(i, j); } ...
ALGO
0.999469
3.282518
c9765c1b-ff18-4764-b870-d0c450b7c1f0
BielMandelli/maratona-unioeste
usaco/bronze/geometry/three_logos.cpp
#include <bits/stdc++.h> using namespace std; #define bieo cin.tie(0)->sync_with_stdio(0) #define int long long signed main() { bieo; vector<int> x(3),y(3); vector<char> c = {'A', 'B', 'C'}; for (int i = 0; i < 3; i++) cin >> x[i] >> y[i]; int s = x[0]*y[0] + x[1]*y[1] + x[2]*y[2]; int sq = sq...
ALGO
0.999744
3.928931
92a4269a-6255-4ec7-9563-16dac2b64779
NandoNunez29/DevZeros-Aprendizaje
Taller 2/Ejercicio2.cpp
// Online C++ compiler to run C++ program online /* Escriba un programa que pida dos nรบmeros enteros y escriba quรฉ nรบmeros son pares y cuรกles impares desde el primero hasta el segundo. */ #include <iostream> using namespace std; int main() { int num1; int num2; cout << "Digita Numero 1: " << endl; ...
ALGO
0.999243
4.707649
8d91ae18-b58c-4dd7-8028-14c12c56e79b
aditya-bhatt-coder/Codeforces-Submissions
Codeforces Round #806/e.cpp
//IT'S NOT A BUG, IT'S AN UNDOCUMENTED FEATURE! #include <bits/stdc++.h> #define ll long long #define mod 1000000007 using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t; cin>>t; while(t--){ int n; cin>>n; vector<vector<int>> a(n, vect...
ALGO
0.999901
4.499637
9878c3ed-085d-4436-b3be-b7e07b6fb309
sandeepvenkataram/Multilocus-FGM
environment.cpp
#include <iostream> #include <vector> #include <gsl/gsl_math.h> #include "randomv.h" #include "modelFunctions.h" #include "environment.h" #include <Eigen/Core> using namespace Eigen; using namespace std; void environment::setOptimum( Matrix<double,Dynamic,1> x ){ optimum = x; } void environment::setPeriodic( bool x ){...
ALGO
0.999616
4.902555
4794f451-8bb8-42c1-bf87-8dee99a8218a
lele94218/3d-graphics-library
RenderEngine/SimulationBoid.cpp
#include "SimulationBoid.h" #include <cmath> Boid::Boid(const float x, const float y, const float z) { m_acceleration = glm::vec3(0.0f); float longitude = frand(2.0f * PI), latitude = frand(2.0f * PI); m_velocity = glm::vec3(cosf(longitude), sinf(longitude), sinf(latitude)); m_position = glm::vec3(x, y, z); r =...
ALGO
0.999796
6.148446
68846c9b-35ac-443c-8145-dbfea6030c30
timniku/rust-opencv
OpenCV/3rdparty/openexr/IlmImf/ImfRgbaYca.cpp
//----------------------------------------------------------------------------- // // Conversion between RGBA and YCA data. // //----------------------------------------------------------------------------- #include <ImfRgbaYca.h> #include <assert.h> #include <algorithm> using namespace IMATH_NAMESPACE; using namespa...
ALGO
0.989153
7.339673
97b9dc68-874a-4127-b012-2d91f647bdde
vijayjoshi16/DSA-AND-COMPETITIVE-PROGRAMMING
02.String/07.NextPermutation.cpp
// Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution{ public: vector<int> nextPermutation(int N, vector<int> arr){ // code here int i; int n=arr.size(); for(i=n-1;i>0;i--){ if(...
ALGO
0.999941
5.289263
8589248e-5c14-490c-92ee-124fe657e3b4
raincross7/code-similarity
codes/train_code/problem350/problem350_64.cpp
#include <iostream> #include <iomanip> #include <string> #include <sstream> #include <stdio.h> #include <string.h> #include <vector> #include <algorithm> #include <utility> #include <tuple> #include <cstdint> #include <cstdio> #include <cmath> #include <map> #include <queue> #include <set> #include <stack> #include <de...
ALGO
0.997911
3.75905
fe9f8233-6620-4e2b-b82d-270293285767
futurewei-cloud/chogori-opengauss
src/gausskernel/storage/access/gin/ginentrypage.cpp
#include "postgres.h" #include "knl/knl_variable.h" #include "access/gin_private.h" #include "access/xloginsert.h" #include "miscadmin.h" #include "utils/rel.h" #include "utils/rel_gs.h" static void entrySplitPage(GinBtree btree, Buffer origbuf, GinBtreeStack *stack, GinBtreeEntryInsertData *insertData, ...
ALGO
0.959688
4.83486
866a7f7d-799a-4745-9b86-e3a22091f16b
jhasan2026/Road_To_Grandmaster
2_Data_Structure_and_Algorithm/13_DynamicProgramming/8_min_coin_change_rec.cpp
#include "iostream" #include "vector" using namespace std; int solve(vector<int>& coins, int amount) { if(amount < 0){ return INT_MAX; } if(amount == 0){ return 0; } int numOfCoin = INT_MAX; for (auto coin:coins) { int temp = solve(coins,amount-coin); if(temp !=...
ALGO
0.999958
5.297417
f8f3941f-59ba-48cc-8dcf-f731dc0b600c
Jangjinhyeok/CodingTest
ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค/unrated/181881.โ€…์กฐ๊ฑด์—โ€…๋งž๊ฒŒโ€…์ˆ˜์—ดโ€…๋ณ€ํ™˜ํ•˜๊ธฐโ€…2/์กฐ๊ฑด์—โ€…๋งž๊ฒŒโ€…์ˆ˜์—ดโ€…๋ณ€ํ™˜ํ•˜๊ธฐโ€…2.cpp
#include <string> #include <vector> using namespace std; int solution(vector<int> arr) { int answer = 0; int cnt = 0; bool is_changed = true; while (is_changed) { for (int i = 0; i < arr.size(); i++) { if (i == 0) is_changed = false; if (arr...
ALGO
0.999916
5.089963
de21e34d-6acb-4653-b6a7-3f09d0fdeeb9
doum1004/code_assessment
leetcode/leetcode_cpp/bitwise-and-of-numbers-range.cpp
/* https://leetcode.com/problems/bitwise-and-of-numbers-range Solution1. Iternate and cal bit time: o(n) space: o(1) [5, 6, 7] right: 7 (111) 111 -> 111 & 110 -> 110 & 101 -> 100 */ class Solution { public: int rangeBitwiseAnd(int left, int right) { int res = right; while (res > left) { ...
ALGO
0.999959
6.346772
f97856da-7beb-4824-9331-cafd3a7a32c8
BastionWolf/4883-PT-Portillo
Assignments/P161/main.cpp
/** * Daniel Portillo * 4883-Programming Techniques * 9-6-2022 */ #include <iostream> #include <iomanip> #include <math.h> #define endl "\n" using namespace std; int GreenSync (int Num1, int Num2, int NumIter); void PrintTime(int Seconds); int main() { int Light1, Light2, Sync; cin >> Light1; while (c...
ALGO
0.999068
4.004418
b55c1491-ab39-4d8c-9f28-c63f1857304b
prabhatkr007/leetcode-GFG-Problems
0106-construct-binary-tree-from-inorder-and-postorder-traversal/0106-construct-binary-tree-from-inorder-and-postorder-traversal.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999978
6.226733
3829ca64-e55f-48a7-ac48-4695fcc98e56
tiqwab/atcoder
abc229/d/main.cpp
#include <algorithm> #include <cassert> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> #include <limits.h> using namespace std; typedef long long ll; template<class T> inline bool chmax(T &a, T b) { if(a < b) { a = b; return true; } return false; } ...
ALGO
0.999533
3.808424
5d3eca3b-e9d7-4c87-ba84-bb97187b6c8f
roy4801/107_Gernic_Programming
cppstdlib-code/stl/ioiter1.cpp
#include <iterator> #include <algorithm> #include <vector> #include <string> #include <iostream> using namespace std; int main() { vector<string> coll; // read all words from the standard input // - source: all strings until end-of-file (or error) // - destination: coll (inserting) copy (istream_i...
ALGO
0.984489
5.577878
0515fa0b-2c1c-4dba-9886-ecf3d85cdba9
Ali-hey-0/opencv
modules/imgproc/src/contours_approx.cpp
#include "opencv2/core/base.hpp" #include "opencv2/core/types.hpp" #include "opencv2/imgproc.hpp" #include "contours_common.hpp" #include <vector> using namespace std; using namespace cv; namespace { struct ApproxItem { Point pt; size_t k; // support region int s; // 1-curvature bool removed; A...
ALGO
0.999717
4.061424
2d8d1cf9-d40a-4be6-bcf2-afd71fa159fb
Shasha0309/LeetCode
0073-set-matrix-zeroes/0073-set-matrix-zeroes.cpp
class Solution { public: void setZeroes(vector<vector<int>>& matrix) { int n = matrix.size(); int m = matrix[0].size(); vector<bool> row(n,0), col(m,0); for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ if(matrix[i][j]==0){ row[i]=1; ...
ALGO
0.999026
6.408629
6ed9c804-b108-42f8-9108-391bfc44d750
JanakPaliwal/c-practical
practical2.cpp
#include <iostream> using namespace std; int main() { int arr[] = {1, 2, 2, 3, 4, 4, 5, 6, 6}; int n = sizeof(arr) / sizeof(arr[0]); int uniqueArr[n]; int uniqueSize = 0; for (int i = 0; i < n; i++) { bool isDuplicate = false; for (int j = 0; j < uniqueSize; j++) { ...
ALGO
0.998907
5.513787
5917db0c-a639-47c4-b5a0-9fa64ee33fd9
abdulrahman-491/dsa-labs-and-assignments
labs-and-assignments/Insert a node at a specific position in a linked list.cpp
SinglyLinkedListNode* insertNodeAtPosition(SinglyLinkedListNode* llist, int data, int position) { if (llist == nullptr) return llist; SinglyLinkedListNode* node = new SinglyLinkedListNode(data); if (llist->next == nullptr) { node->next = llist; llist = node; return...
ALGO
0.993032
4.637643
280bc4ef-4e2b-477f-8122-5eb40b1a48ef
shiver/blaze-lib
blazemark/src/boost/Complex1.cpp
//================================================================================================= //================================================================================================= //************************************************************************************************* // Includes //****...
ALGO
0.992515
4.01491
e8c75ccf-32c9-4472-b3ff-0af4c59eeeb2
alexrmcd/DM
dist.cpp
//***** dist.cpp *****// #include <gsl/gsl_integration.h> #include <gsl/gsl_errno.h> #include "Constants.h" #include "Cluster.h" double Cluster::ddist(double z , void * params){ double distint = mpc2cm * clight / ( H0 * sqrt( OmegaM * pow(1 + z , 3) + OmegaL ) ); return distint; } //distance as a function...
ALGO
0.993753
5.887198
c0bece4d-2276-42a7-bc90-2dc64a36823c
ishandutta2007/codeforces
latte0119/normal/797/C.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define rep(i,n) for(int i=0;i<(n);i++) #define pb push_back #define eb emplace_back #define all(v) (v).begin(),(v).end() #define fi first #define se second typedef vector<int>vint; typedef pair<int,int>pint; typedef vector<pint>vpint; template<type...
ALGO
0.999945
4.406378
8a35898e-5e37-4810-832e-a7901f8d4b62
deepam20050/competitive-programming
solutions/CF1077E.cpp
// AC #include "bits/stdc++.h" using namespace std; #define sz(x) int((x).size()) #define all(x) begin(x), end(x) #define pb push_back #define eb emplace_back #define mp make_pair #define F first #define S second #define FOR(i, a, b) for (int i = (a); i < (b); ++i) using lli = long long; using pii = pair < int, int >...
ALGO
0.999889
3.555268
042f790d-b952-4a42-96ac-d97ec776ea57
cuixing158/Visual-Based-Odometry-Estimation1-cpp
ocv/extractORBCore.cpp
#include "extractORBCore_api.hpp" #include "cgCommon.hpp" using namespace std; ////////////////////////////////////////////////////////////////////////////// // Helper functions ////////////////////////////////////////////////////////////////////////////// void fieldsToORBKeyPoints( real32_T *inLoc, ...
TOOL
0.941798
3.69903
652baf3d-3e34-44d9-836c-11f02549301b
hellocomrade/happycoding
cplusplus/functionObject.cpp
#include <set> #include <list> #include <algorithm> #include <iostream> #include <string> using namespace std; class Person { private: string firstName; string lastName; public: Person(const string &f, const string &l) :firstName(f), lastName(l){} string FirstName()const{ return this->firstName; } string LastName(...
ALGO
0.997961
5.059052
eb3ca62b-1657-4489-9aec-d04e91b7925b
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_11370_2.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n, m; bool tf = false; cin >> n >> m; vector<vector<char>> a(n); for (int i = 0; i < n; i++) a[i].resize(m); for (int i = 0; i < n; i++) for (int j = 0; j < m; j++) { cin >> a[i][j];...
ALGO
0.999845
5.071739
4ca9d594-a774-405f-b33a-01989632970b
pingponghero12/AiSD-Lista4
list5/src/mst_algorithms.cpp
#include "mst_algorithms.hpp" #include "experiment_utils.hpp" #include <vector> #include <queue> #include <algorithm> #include <numeric> #include <iostream> namespace ADS { class DSU { public: DSU(int n) : parent_(n), rank_(n, 0) { std::iota(parent_.begin(), parent_.end(), 0); } int find(in...
ALGO
0.999248
6.312161
21781d0f-6632-4b98-ab27-d15dcb7812f9
AEXmod/platform_system_netd
tests/dns_responder/dns_tls_frontend.cpp
#include "dns_tls_frontend.h" #include <netdb.h> #include <stdio.h> #include <unistd.h> #include <sys/poll.h> #include <sys/socket.h> #include <sys/types.h> #include <arpa/inet.h> #include <openssl/err.h> #include <openssl/evp.h> #include <openssl/ssl.h> #define LOG_TAG "DnsTlsFrontend" #include <log/log.h> #include...
WEB
0.85067
7.889749
3910c903-e382-4abe-a5cd-a84f046924a7
SenseLogic/MYST
BOOST/boost_1_76_0/libs/mpi/example/global_min.cpp
// An example using Boost.MPI's all_reduce() that compute the minimum // of each process's value and broadcast the result to all the processes. #include <boost/mpi.hpp> #include <iostream> #include <cstdlib> namespace mpi = boost::mpi; int main(int argc, char* argv[]) { mpi::environment env(argc, argv); mpi::comm...
ALGO
0.998012
4.349789
106d616f-aa44-4633-9262-a7bf11b76930
PowerSnail/Algorithms-Practices
BST.cpp
#include "BST.h" using namespace std; BST::BST() { nil = new Node(); nil -> parent = nil; nil -> left = nil; nil -> right = nil; nil -> key = 0; } Node * BST::root() { return nil -> left; } void BST::inorder() { inorderRec(root()); cout << endl; } void BST::inorderRec(Node* no...
ALGO
0.999533
4.929011
e5432bad-d2b7-44a6-b7d7-947e0a1c7b75
sklationd/boj
src/19532/19532.cpp
#include <iostream> using namespace std; int main(){ int a,b,c,d,e,f; int x, y; cin >> a >> b >> c >> d >> e >> f; x = (e*c - b*f) / (a*e - b*d); y = (c*d - a*f) / (b*d - a*e); cout << x << " " << y << "\n"; }
ALGO
0.999799
3.68683
97c7e67c-bcb3-4c96-91ef-329d7b07441a
gauravsharmaop/DS
Q.53_binarySeachTreeCreation.cpp
#include <iostream> using namespace std; struct TreeNode { int data; TreeNode* left; TreeNode* right; TreeNode(int value) : data(value), left(nullptr), right(nullptr) {} }; TreeNode* insert(TreeNode* root, int value) { if (root == nullptr) { return new TreeNode(value); } if (value ...
ALGO
0.999998
6.394059
a3d9bda5-6bbe-4966-8eb6-78e3ded9b402
shivajaysaxena/LeetCode
1424-maximum-candies-you-can-get-from-boxes/maximum-candies-you-can-get-from-boxes.cpp
class Solution { public: int maxCandies(vector<int>& status, vector<int>& candies, vector<vector<int>>& keys, vector<vector<int>>& containedBoxes, vector<int>& initialBoxes) { int n = status.size(); vector<int> visited(n, 0); queue<int...
ALGO
0.999976
5.571421
cae95a5d-f753-4172-b4af-af0afe89f53f
ssk4988/Coding
UCFPT/learn/siucf1/broken copy.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using pii = pair<int, int>; using pll = pair<ll, ll>; using vi = vector<int>; using vl = vector<ll>; using vd = vector<ld>; using vii = vector<pii>; using vll = vector<pll>; using vvi = vector<vi>; #define f first #define s se...
ALGO
0.999934
4.490578