uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
81d0079e-57e0-41f4-9408-ea316768295f
JianCong-WENG/IterCluster
IterCluster/IterCluster-MCL/src/eigen-eigen-b9cd8366d4e8/doc/examples/Tutorial_ArrayClass_cwise_other.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { ArrayXf a = ArrayXf::Random(5); a *= 2; cout << "a =" << endl << a << endl; cout << "a.abs() =" << endl << a.abs() << endl; cout << "a.abs().sqrt() =" << endl << a.abs().sqrt() << endl...
ALGO
0.983955
3.130341
14459b6f-9e4a-4f20-b558-d21cc34492f2
fahshed/graph-algorithms
Offline 9 - Minimum Vertex cover/1605077/1605077.cpp
#include <stdio.h> #include <iostream> #include <stdlib.h> #include <time.h> using namespace std; #define NULL_VALUE -999999 #define INFINITY 999999 #define WHITE 1 #define GREY 2 #define BLACK 3 class Node { public: int from ; int vertex ; int weight ; Node() ; Node(int vertex, int weight, int ...
ALGO
0.999859
3.457005
925ea310-9f4e-43a4-a056-59b2eb83d08b
puzika/Codeforces
alternating_subsequence_1343c.cpp
#include <iostream> #include <limits> int main() { int t; std::cin >> t; for (; t > 0; t--) { int n; int mxNeg = 0; int mxPos = 0; long long sum = 0; std::cin >> n; for (int i = 0; i < n; i++) { int x; std::cin >> x; if (x > 0) { sum += mxNeg; mxNeg = ...
ALGO
0.999914
5.304952
9850bbc0-b0c9-422a-a779-06f8cdaa136e
S3EE1LIEUYANYU/FOONYEW-KUALI-S3EE1-172638
ex9-1.cpp
// #include <iostream> // using namespace std; // void print_arr(int* p,int n){ // int i,n1=sizeof(p)/sizeof(int); // printf("in function, array size n = %d \n",n1); // for (i=0; i < n; i ++){ // printf("%d ",p[i]); // printf("= %d ,",*(p+i)); // } // printf("\n"); // } // int ma...
ALGO
0.99942
3.40991
08cf0b13-9d23-4b47-895b-e20cfe424cd2
EmilyRadKey/Neural-Network
opencv/sources/3rdparty/carotene/src/sobel.cpp
#include <vector> #include "common.hpp" namespace CAROTENE_NS { bool isSobel3x3Supported(const Size2D &size, BORDER_MODE border, s32 dx, s32 dy, Margin borderMargin) { return dx < 3 && dx >= 0 && dy < 3 && dy >= 0 && (dx + dy) > 0 && isSeparableFilter3x3S...
ALGO
0.989758
6.430039
ade9ab6c-d26d-4207-9764-b0ac47e932ee
RShankar/Hydrological-Modeling
systemc-ams-1.0Beta2/src/scams/impl/predefined_moc/eln/sca_eln_sc_rswitch.cpp
/***************************************************************************** sca_eln_sc_rswitch.cpp - description Original Author: Karsten Einwich Fraunhofer IIS/EAS Dresden Created on: 10.11.2009 SVN Version : $Revision: 1113 $ SVN last checkin : $Date: 2011-01-23 17:09:13 +0100 (Sun, 23 Jan 2011) ...
TOOL
0.960597
6.265635
8daa4d0d-cf3d-440a-ad29-ff0552b9b94f
tejas1996/mathrunner
tess-two/jni/com_googlecode_tesseract_android/src/ccstruct/polyaprx.cpp
#include <stdio.h> #ifdef __UNIX__ #include <assert.h> #endif #define FASTEDGELENGTH 256 #include "polyaprx.h" #include "params.h" #include "tprintf.h" #define EXTERN EXTERN BOOL_VAR(poly_debug, FALSE, "Debug old poly"); EXTERN BOOL_VAR(poly_wide_objects_better, TRUE, ...
ALGO
0.99786
4.03212
89d20727-7b19-469d-b0a3-52f4b5840f26
jiho5993/solving_algorithm
BOJ/7662.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define all(x) (x).begin(), (x).end() int main() { ios_base::sync_with_stdio(false), cin.tie(nullptr); int T; cin >> T; while(T--) { int K; cin >> K; multimap<int, bool> Q; while(K--) { char s; cin >> s; ...
ALGO
0.994848
3.838833
6a45f722-255a-4b39-83c5-0bb8213a2b16
ishandutta2007/codeforces
felerius/normal/1401/A.cpp
// region boilerplate #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <chrono> #include <cstdint> #include <deque> #include <exception> #include <forward_list> #include <functional> #include <initializer_list> #include <iomanip> #include <iostream> #include <iterator...
ALGO
0.999976
4.992991
451a139d-509b-4b7b-a16f-eaf0d4a54044
21021660-LuongPhungNham/Homework
BT7/C.cpp
#include <iostream> #include<cstring> using namespace std; void reverse(char* s); int main() { char s[] = "abc"; cout << "Xau ban dau " << s << endl; reverse(s); cout << "Xau sau khi dao: " << s << endl; return 0; } void reverse(char* s) { int len = strlen(s); for (int i = 0; i < len / 2; i++) { ...
ALGO
0.997486
3.774929
79e4f3e4-ecb6-4015-abef-0f84144b0880
hacch141/Coding-Practice
GFG/Array/03.Hard/01.Pascal's-Triangle.cpp
// Pascal's Triangle vector<vector<int>> pascalTriangle(int N) { // Write your code here. if(N == 1) return {{1}}; vector<vector<int>> ans(N); for(int i=0; i<N; i++) { ans[i].resize(i+1); ans[i][0] = 1; ans[i][i] = 1; for(int j=1; j<i; j++) { ans[i][j] = ans...
ALGO
0.999948
6.165616
24396d82-94ba-4a6d-8f74-3d8dd9615c63
jacobeverist/opaque
src/modules/alphashape/boost_1_53_0/libs/intrusive/example/doc_list.cpp
using namespace boost::intrusive; class MyClass : public list_base_hook<> //This is a derivation hook { int int_; public: //This is a member hook list_member_hook<> member_hook_; MyClass(int i) : int_(i) {} }; //Define a list that will store MyClass using the public base hook typedef list...
ALGO
0.945868
5.771467
cab46b59-69dd-443e-9c32-fff90268a774
jonathandarryl/UVa-Code
10034.cpp
#include <stdio.h> #include <iostream> #include <cstdlib> #include <cmath> #include <string> #include <cstring> #include <vector> #include <map> #include <stack> #include <queue> #include <deque> #include <algorithm> #include <set> #include <bitset> using namespace std; typedef long long LL; //typedef pair<int,int> ii...
ALGO
0.999705
4.360172
8c119b9a-d2bd-4e14-9e45-0fd1238e50a9
Yaroslavcoder47/cpp_labs
C++/lab03/Task5/main.cpp
/** * Рассмотрим следующую последовательность: * a0 = 1 *ai+1 = 2ai ⊕ ai *Где ⊕ — операция xor целых чисел. *Сгенерируйте несколько первых чисел этой последовательности и выведите их в *двоичной системе счисления, по одному в строке. Для наглядности можете вывести ‘ ’ *вместо ‘ 0 ’. Как называется полученная фигура? От...
ALGO
0.999965
4.078807
2c187325-2664-4dd2-84d2-7e38d673ea2c
mariaasoltanei/lmp_gpu
lib/linalg/dlartg.cpp
#ifdef __cplusplus extern "C" { #endif #include "lmp_f2c.h" int dlartg_(doublereal *f, doublereal *g, doublereal *cs, doublereal *sn, doublereal *r__) { integer i__1; doublereal d__1, d__2; double log(doublereal), pow_lmp_di(doublereal *, integer *), sqrt(doublereal); integer i__; doublereal f1, g1,...
ALGO
0.999733
6.082712
91750f60-e524-4e48-b322-de6ffe99f795
Mussabat/_CP_
Array/GFS_Largest subarray with 0 sum.cpp
#include <bits/stdc++.h> using namespace std; class Solution{ public: int maxLen(vector<int>&a, int n) { unordered_map<int, int>m; int ans = 0; int sum = 0; m[0] = 0; for(int i = 0; i < n; i++) { sum += a[i]; if(m.find(sum) == m.end()) { ...
ALGO
0.999246
5.345392
b43518e6-57a3-450b-9465-f3c7721a3010
weizhenwei/leetcode
src/2012-03-03_Valid_Sudoku.cpp
#include <assert.h> #include <stdio.h> #include <string.h> #include <vector> using std::vector; class Solution_Valid_Sudoku { public: bool isValidSudoku(vector<vector<char> > &board) { int judge[9] = {0}; assert(board.size() == 9); assert(board.size() == board[0].size()); // row j...
ALGO
0.996664
5.90881
9c7af570-13e5-4ebc-aca6-904c788929a2
baldwinmatt/AoC-2015
Day3/main.cpp
#include "aoc/helpers.h" #include <set> namespace { using MappedFileSource = aoc::MappedFileSource<char>; using Point = std::pair<ssize_t, ssize_t>; using VisitedMap = std::set<Point>; } int main(int argc, char** argv) { aoc::AutoTimer t; std::unique_ptr<MappedFileSource>m(new MappedFileSource(argc, argv...
ALGO
0.99907
6.367928
d69a301e-caff-43ba-9a5f-1f743451c411
hlight-git/PTIT.2.2.DSA.Exercise
thuchanh3/tomau.cpp
#include <bits/stdc++.h> using namespace std; class node { public: int color = 1; set<int> edges; }; int canPaint(vector<node>& nodes, int n, int m) { vector<int> visited(n + 1, 0); int maxColors = 1; for (int sv = 1; sv <= n; sv++) { if (visited[sv]) continue; ...
ALGO
0.999853
5.680791
a9b5f6e4-2a00-4f44-a72f-e0c654767c98
yasmeenyehiaa/Leetcode-Submissions
61-rotate-list/61-rotate-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* rotateRight...
ALGO
0.99998
5.707806
ad5aa02e-e41e-486a-8bda-1d900f8cd5df
PriyanshuSingh/CompProg
codeforces/round#304_A.cpp
/************************************************************ * Author: Priyanshu Singh * Handle: tgamerz */ #include <cmath> #include <climits> #include <queue> #include <vector> #include <map> #include <cstdlib> #include <fstream> #include <iomanip> #include <iostream> #include <sstream> #include <stack> #i...
ALGO
0.999963
3.268609
0b999f5b-5cd7-42c6-8b90-1ec883a03eab
qmrmqmrm/lectureC
20220112/32_함수와전략.cpp
#include <iostream> using namespace std; // 핵심 : 변하지 안흔ㄴ 전체 알고리즘에서 변해야 하는 정책 코드는 분리되어야 한다. // > 일반 함수에서는 변하는 것을 함수 인자(함수 포인터)로 뽑아내면 됩니다. bool cmp1(int a, int b){return a > b;} // 오름차순 bool cmp2(int a, int b){return a < b;} // 내림차순 void Sort(int* x, int n, bool (*cmp)(int a, int b)) { for (int i = 0; i < n-1; +...
ALGO
0.99998
4.989573
1547200e-f0e3-4274-b525-e457c0822270
ZaidMushtaq921/leetcode
Partitions with Given Difference - GFG/partitions-with-given-difference.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { int mod= 1e9+7; int f(int ind,int sum,vector<int>& arr,vector<vector<int>>& dp ) { if(ind==0) { if(sum==0 && arr[0]==0) return 2; if(sum==0 || sum==arr[0]) return 1; ...
ALGO
0.999928
6.526472
656d83d5-89ba-456c-9313-98cf90c01904
KaioAlex/cpp_development
Compilers/Trabalho Prático 1 – Montador/src/func_auxiliares.cpp
// Implementacao das funcoes #include "func_auxiliares.hpp" int busca_num_operandos_simbolo(tipo_simbolo simb){ switch(simb){ case SIMB_ERROR: case SIMB_HALT: case SIMB_RET: case SIMB_END: return 1; case SIMB_READ: case SIMB_WRITE: case SIMB_PUSH: case SIMB_POP: case SIMB_NO...
ALGO
0.988945
3.638789
0882d514-bda8-4940-b89c-f0682626bd72
andremcmiller/rudnprogramming
pervoedz/Number8.cpp
#include <iostream> using namespace std; int main() { int s,d,e,t; cout << "\nInput t: "; cin >> t; e = t %10; t /= 10; d = t %10; s = e + d; cout << "\nSum = " << s ; return 0; }
ALGO
0.99876
4.077309
35f95b2a-dbb8-40e4-ab8a-c0c721d6d8de
flammender/lab06
solver_lib/solver.cpp
#include "solver.h" #include <stdexcept> #include <cmath> void solve(float a, float b, float c, float& x1, float& x2) { float d = (b * b) - (4 * a * c); if (d < 0) { throw std::logic_error{"error: discriminant < 0"}; } x1 = (-b - std::sqrt(d)) / (2 * a); x2 = (-b + std::sqrt(d)) / (2...
ALGO
0.996621
5.69914
dcf680c4-d350-4634-a9ae-bc44451a1b66
AsraAijaz17/FYP_Mobileapp
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.9988
6.76073
60bf6085-c235-4bd4-a9d1-1d828ec6cfc1
zjwfufu/FateAvatar
submodules/simple_phongsurf/3rdparty/eigen-3.3.7/bench/sparse_dense_product.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 -DCSPARSE // -I /home/gael/Coding/LinearAlgebr...
ALGO
0.997927
4.386344
df360b38-0689-4577-aea2-083e0e765e24
Suzumiya7mi/Algorithm
12-intToRoman.cpp
#include <iostream> #include <string> using namespace std; string intToRoman(int num) {// 字符串操作算法 int arr[4] = { 0 }, i = 3; do { arr[i] = num % 10; num /= 10; i--; } while (num); string str; for (int i = 0; i < 4; i++) { if (arr[i] == 4) { if (i == 1) ...
ALGO
0.999463
5.30371
539c9b70-1fed-4637-8f4c-71c2e773e9cb
brenwill/Cinder
src/AntTweakBar/TwColors.cpp
// --------------------------------------------------------------------------- // // @file TwColors.cpp // @author Philippe Decaudin // @license This file is part of the AntTweakBar library. // For conditions of distribution and use, see License.txt // // ---------------------------------...
ALGO
0.861423
5.644995
cd6e87cd-9257-4a4c-9985-97b5d3630866
BLOCXTECH/BLOCX-POW
src/rpc/request.cpp
#include <rpc/request.h> #include <fs.h> #include <random.h> #include <rpc/protocol.h> #include <util/system.h> #include <util/strencodings.h> /** * JSON-RPC protocol. Bitcoin speaks version 1.0 for maximum compatibility, * but uses JSON-RPC 1.1/2.0 standards for parts of the 1.0 standard that were * unspecified ...
WEB
0.88504
7.514116
21cdd30f-ba91-45e0-b9ac-2ce3d552bcee
nguyendo24/professional_cpp_marc_gregoire
Code/c18_code/16_StudentEnrollment/Enrollment.cpp
import <list>; import <vector>; import <string>; import <iterator>; import <fstream>; import <iostream>; import <format>; using namespace std; // courseStudents is a vector of lists, one for each course. The lists // contain the students enrolled in those courses. They are not sorted. // // droppedStudents is a list ...
TOOL
0.942163
6.816068
10d24ba8-1873-4278-9ed2-217ceee70556
jsupancic/AStar_Dual_Tree_HandPose
Parts/PairwiseDeformationWindow.cpp
#include "PairwiseDeformationWindow.hpp" #include "Log.hpp" #include "util.hpp" #include "Orthography.hpp" #include "Log.hpp" namespace deformable_depth { using params::RESP_ORTHO_X_RES; using params::RESP_ORTHO_Y_RES; /// /// SECTION: Deformation Model /// shared_ptr<DetectionManifold> FixedWindowDef...
TOOL
0.933206
6.024439
9e9dae2f-feae-4e81-8f08-a1b799022885
valerioformato/RTIAW
src/App/Renderer/HittableObjectList.cpp
#include <algorithm> #include <numeric> #include "HittableObjectList.h" template <class... Ts> struct overloaded : Ts... { using Ts::operator()...; }; // explicit deduction guide (not needed as of C++20) template <class... Ts> overloaded(Ts...) -> overloaded<Ts...>; namespace RTIAW::Render { void HittableObjectLis...
ALGO
0.91927
7.311542
67af0763-1ad0-44e5-9fe2-9af6154dc0f1
Fisher87/leetcode
cplus/sort-array-by-moving-items-to-empty-space.cpp
// Time: O(n) // Space: O(n) // greedy, sort class Solution { public: int sortArray(vector<int>& nums) { const auto& min_moves = [&](int d) { const auto& index = [&](int x) { return (x == 0) ? d * (size(nums) - 1) : x - d; }; vector<bool> lookup(size(num...
ALGO
0.999977
6.030887
cf7653c1-3852-4f1e-9259-3be07def3492
KarelSmets00/mecotron_assignment
Arduino/CT-EKF-Swivel-original/robot.cpp
/* * EXTENDED KALMAN FILTER TEMPLATE * * This is a template to get you started with the implementation of the Kalman filter * on your own cart. * */ #include "robot.h" bool Robot::init() { MECOtron::init(); // Initialize the MECOtron desiredVelocityCart(0) = 0.0; desiredVelocityCart(1) = 0.0; return tr...
ALGO
0.987677
4.92593
f0eb251d-a345-40ff-8979-47e709ceed48
molo4evan/gnicartyar
Raytracing/model/primitives/box.cpp
#include "box.h" Box::Box(QVector3D min, QVector3D max) { minPoint = min; maxPoint = max; } Box::Box(gabarite_box box): minPoint(box.x_min, box.y_min, box.z_min), maxPoint(box.x_max, box.y_max, box.z_max){} pair<QVector3D, QVector3D> Box::getMinMax(){ return pair<QVector3D, QVector3D>(minPoint, m...
TOOL
0.866004
5.272206
e4eded3b-045a-4d71-861c-ead0e37b1015
khuship03/PhotoSharing
adaptive_app/step_04/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.998117
6.787361
b45a979a-d009-4aef-b417-4c69f1a05f7d
KrzysztofBugaj/Projekt_Informatyka_2024_2025
Projekt_inf_gra/struktura+.cpp
#include <SFML/Graphics.hpp> #include <vector> #include <fstream> #include <iostream> #include <ctime> #include <cstdlib> using namespace sf; // Definicje staych constexpr int szerokoscOkna{ 800 }, wysokoscOkna{ 600 }; constexpr float promienPilki{ 10.f }, predkoscPilki{ 8.f }; constexpr float szerokoscPaletki{ 60.f ...
TOOL
0.924054
4.690153
610d4eff-ff3b-4736-acc1-30b35255ac7e
ishandutta2007/codeforces
snuke/normal/698/A.cpp
#include <cstdio> #include <algorithm> #include <stack> #include <queue> #include <deque> #include <vector> #include <string> #include <string.h> #include <cstdlib> #include <ctime> #include <cmath> #include <map> #include <set> #include <iostream> #include <sstream> #include <numeric> #include <cctype> #include <bitse...
ALGO
0.999985
3.902342
cf8f76b9-563f-42f6-bcc1-e10f9fdc0a4d
ShrikeBin/Uni4
AI/list2/notunittest/test2.cpp
#include <vector> #include <queue> #include <array> #include <string> #include <cstdint> #include <algorithm> #include <map> #include <iostream> uint32_t encode1(const std::array<uint8_t, 16>& state, uint8_t heuristic) { // 1,5,6,9,10 uint32_t pattern_bits = 0; for(uint8_t i = 0; i < 16; ++i) { ...
ALGO
0.999596
4.954976
3880feb2-d3f5-4848-9221-44337723ea7c
asdf2014/algorithm
Codes/molinchn/336.回文对.cpp
class Solution { private: vector<string> wordsRev; unordered_map<string_view, int> indices; public: int findWord(const string_view& s, int left, int right) { auto iter = indices.find(s.substr(left, right - left + 1)); return iter == indices.end() ? -1 : iter->second; } bool isPalindrome(const stri...
ALGO
0.99989
6.618908
e640a032-fa6f-4283-9958-498c368c0b1b
Tewer1234/-90-AtCoder-Solutions
024 - Select +/- One(★2).cpp
#include <iostream> #include <stdlib.h> #include <stdio.h> #include <algorithm> #include <bits/stdc++.h> #include <iomanip> #include <vector> #include <map> #include <queue> #include <stack> #include <set> #define ll long long int #define pb push_back #define inf 0x3f3f3f3f #define SIZE 400005 using namespace std; typ...
ALGO
0.999997
3.53215
138c5fb0-e32c-439d-899e-635a9eb12e43
eparslow18/CS315DistributedScalableComputing
HW5 Lab5/LAB01_01/LAB01_01/Source.cpp
#include <iostream> #include <random> #include <vector> using namespace std; const int DIM_SIZE = 1000000; /** Vector addition @param a vector a @param b vector b @param result vector (a+b) */ void vector_add(const vector<int> &a, const vector<int> &b, vector<int> &result) { result.resize(a.size()); // ensure ...
ALGO
0.993505
4.51819
464e6661-8382-4aee-91cd-2d7c405ed3bd
hack-parthsharma/LeetCode
925-long-pressed-name/925-long-pressed-name.cpp
class Solution { public: bool isLongPressedName(string name, string typed) { int i = 0; for (int j = 0; j < typed.length(); ++j) if (i < name.length() && name[i] == typed[j]) ++i; else if (j == 0 || typed[j] != typed[j - 1]) return false; return i == name.length(); } };
ALGO
0.999455
6.22122
c7608ef4-fb85-4979-9fc6-8db26e33d9a3
Harshsngh07/DataStructures_and_Algorithms
leetcode/Bit Manupluation/SingleNumber3.cpp
class Solution { public: vector<int> singleNumber(vector<int> &nums) { int sum(0); for (auto i : nums) sum ^= i; int low_bit = sum & (-sum); vector<int> res{0, 0}; for (auto i : nums) { if (i & low_bit) res[0] ^= i; ...
ALGO
0.999937
5.017859
01ea74d7-9858-489f-b8ed-cb6e7827bbbb
verb55nta/atcoder
contests/ABC/abc135/library/factory.cpp
#include<iostream> #include<string> #include<algorithm> #include<cstdlib> #include<cmath> #include<vector> #include<list> #include<cstdint> #include<bits/stdc++.h> #include<queue> #include<set> #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define rep_r(i, n) for(int i = n-1; i >= 0; i--) #define rep1(i, n) for(...
ALGO
0.999934
4.417843
5c153ed6-1f4f-4375-ad03-d05897258faa
mycbxzd1/myCppCode
hydro-system/hydro(主站)/topoac/2025秋季模拟赛/[2025线上CSP-S&NOIP联测第1阶段] 模拟赛2/checker.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); string S, expected, output; if (!getline(cin, S)) return 0; getline(cin, expected); getline(cin, output); int n = S.size(); int start = -1; set<int> init; for (int i = 0; ...
ALGO
0.999639
5.294643
a9b78771-9136-4d80-9144-f566a6dcb6be
thginWalker/D-NSGA3-Greedy
Three goals for phase One/CLI/Method2/code/src/alg_environmental_selection.cpp
#include "alg_environmental_selection.h" #include "alg_population.h" #include "aux_math.h" #include "alg_nondominated_sort.h" #include "alg_reference_point.h" #include <limits> #include <algorithm> #include <iostream> using namespace std; // ---------------------------------------------------------------------- // T...
ALGO
0.999919
5.69452
04731271-1391-4fdb-89b1-7b79656c8985
viCodexm/RSATU-Labs
semester-4/Graphs/lab 1. oriented graph dfs/main.cpp
#include <bits/stdc++.h> using namespace std; struct edge { int color = 0, number = 0; vector<int> to; }; struct Solution { const int WHITE = 0, GREY = 1, BLACK = 2; int number = 0; void solve_tests() { freopen("input.txt", "r", stdin); int tests; cin >> tests; while (te...
ALGO
0.99979
4.270805
a35b2e62-0c64-4cbb-b96d-a353b6a1540e
malaksayour/hslam_ros2
src/FSLAM/Thirdparty/opencv-3.4.6/modules/features2d/src/blobdetector.cpp
#include "precomp.hpp" #include <iterator> #include <limits> //#define DEBUG_BLOB_DETECTOR #ifdef DEBUG_BLOB_DETECTOR # include "opencv2/opencv_modules.hpp" # ifdef HAVE_OPENCV_HIGHGUI # include "opencv2/highgui.hpp" # else # undef DEBUG_BLOB_DETECTOR # endif #endif namespace cv { class CV_EXPORTS_W Simpl...
TOOL
0.913846
6.703278
b360aaff-2aec-44e3-b3fd-d6ddbf672ce0
nvolprotocol/nvolve
src/cryptonote/cn_values/cryptonote_basic_impl.cpp
#include "include_base_utils.h" using namespace epee; #include "cryptonote_basic_impl.h" #include "string_tools.h" #include "serialization/binary_utils.h" #include "serialization/vector.h" #include "cryptonote_format_utils.h" #include "cryptonote_config.h" #include "misc_language.h" #include "common/base58.h" #include...
TOOL
0.924654
6.328093
275dbb53-ced5-4da2-b3a6-5f08c66c8bd6
AOSP-8916/packages_inputmethods_LatinIME
native/jni/src/suggest/core/dicnode/dic_nodes_cache.cpp
#include <list> #include "defines.h" #include "suggest/core/dicnode/dic_node_priority_queue.h" #include "suggest/core/dicnode/dic_node_utils.h" #include "suggest/core/dicnode/dic_nodes_cache.h" namespace latinime { // The biggest value among MAX_CACHE_DIC_NODE_SIZE, MAX_CACHE_DIC_NODE_SIZE_FOR_SINGLE_POINT, ... cons...
TOOL
0.895411
6.894089
3ad57ecd-1e6f-460d-a5c8-26bb75901da9
witmaos6/LeetCode
0945-snakes-and-ladders/0945-snakes-and-ladders.cpp
class Solution { public: int snakesAndLadders(vector<vector<int>>& board) { const int N = static_cast<int>(board.size()); vector<int> Moves(N * N + 1, -1); int Index = 1; bool Flag = true; for(int Row = N - 1; Row >= 0; Row--) { for(int i = 0; i < N...
ALGO
0.999834
6.519322
c25ab850-6bbc-438a-ae9a-c1a0884d4147
Aksel-B/MyIUT
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.998574
6.776823
a0cc9a25-f4ec-4f25-963b-a4153e3c7183
sumitsojha88/Placement-Preparation
Leetcode Solution/Tree/Easy/check_binary_tree_subtree.cpp
// C++ program to check if a given tree is BST. #include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node* left, *right; Node(int data) { this->data = data; left = right = NULL; } }; bool isBSTUtil(struct Node* root, Node *&prev) { if (root) { if (!isBSTUtil(root->left, prev)) ...
ALGO
0.99987
6.73057
c796f4e5-0905-4278-a001-7fe450bf1c6e
singlarohan/leetcode_sol
0003-longest-substring-without-repeating-characters/2022-08-16 13.55.24 - Accepted - runtime 19ms - memory 8.4MB.cpp
class Solution { public: //FOR LONGEST SUBSEQUENCE :') // int solve(int i, string s, vector<char> &temp, unordered_map<char, int> &mp){ // if(i >= s.size()) // return temp.size(); // mp[s[i]]++; // if(mp[s[i]] > 1){ // mp[s[i]]--; // return...
ALGO
0.999967
5.802414
106a97f1-82dd-4b31-a075-7359c8278b27
drmeister/legacy-externals-clasp
boost/libs/graph/example/make_biconnected_planar.cpp
#include <boost/graph/biconnected_components.hpp> #include <boost/graph/make_biconnected_planar.hpp> #include <boost/graph/boyer_myrvold_planar_test.hpp> using namespace boost; int main(int argc, char** argv) { typedef adjacency_list < vecS, vecS, undirectedS, property<vertex_index_t, int>,...
ALGO
0.995618
7.067492
703587c8-d7ab-4be0-9c27-595f7f29c4cc
tanvirtareq/programming
codeforces/1311 b.cpp
#include<bits/stdc++.h> #define v(a) vector<a> #define p(a, b) pair<a, b> #define dbg(a) cout<<#a<<" = "<<a<<endl using namespace std; typedef long long ll; typedef long long unsigned lu; typedef vector<int> vi; typedef pair<int, int> ii; typedef priority_queue<int> mxpqi; typedef priority_queue<int, vector<int> , g...
ALGO
0.999924
3.55415
9a40fcc1-b35b-41d7-ad02-42f85f13d981
igorski/kosm
src/main/cpp/modules/envelopefollower.cpp
#include "envelopefollower.h" #include <cmath> // constructor EnvelopeFollower::EnvelopeFollower( float maxGain, float attackMs, float releaseMs, int sampleRate ) { envelope = 0.0; _attack = pow( 0.01, maxGain / ( attackMs * sampleRate / 1000 )); _release = pow( 0.01, maxGain / ( releaseMs * sampleRate...
ALGO
0.979839
5.65556
11e40592-b7dd-4754-9f34-2ec109abde15
hjiang13/LLMs-in-IR
POJ-104/101/530.cpp
#include <iostream> using namespace std; /** * file homwork.cpp * author ??? 1100012722 * data 2011-10-14 * description ??? */ int main() { int a,b,c; int n1,n2,n3; for(a = 1; a <= 3 ; a ++) for(b = 1; b <=3 ; b ++) if(a != b) { c = 6 - a - b; n1 = (b > a) + (c == a); n2 = (a > b) + (a > c); n3 = (c > b) + (b > a); i...
ALGO
0.999875
3.022375
b48db88b-b0b2-40ae-af68-844101b71819
101vinayak/Cpp-course
Lecture-2/min_max_avg.cpp
#include<iostream> using namespace std; int main(){ int n; cin>>n; int i=0; int value; int min = 100000; int max = -10000; int sum = 0; while(i<n){ cin>>value; // handle min if(value<min){ min = value; } //handle max if(value>max){ max = value; } //handle sum sum = su...
ALGO
0.999385
3.456582
7826864c-c691-442c-b521-3e677947cc89
saladyears/Cities3D
trunk/crypto++/5.5.2/square.cpp
// square.cpp - written and placed in the public domain by Wei Dai // Based on Paulo S.L.M. Barreto's public domain implementation #include "pch.h" #include "square.h" #include "misc.h" #include "gf256.h" NAMESPACE_BEGIN(CryptoPP) // apply theta to a roundkey static void SquareTransform (word32 in[4], word32 out[4])...
ALGO
0.999716
7.151082
64c9c3c7-863f-4db4-953e-be423b3198dd
Proco-Copro/Copro
data structure/Doubly_LInked_list.cpp
#include<iostream> #include<stdlib.h> using namespace std; struct Node { int data; struct Node *next; struct Node *prev; };struct Node *head; int listLength(struct Node *head) { if (head == NULL) { cout << "\n\nEmpty Linked List\n"<< endl; return; } struct Node *cu...
ALGO
0.992047
3.738605
67faa9ee-8307-46e5-9956-21f607d69960
tranvanphuchuy/flutter_application_13
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
d9bf4d51-a5a6-4229-9296-fa72bf5f5221
vanshu778/programming
sprint_3/9_PrintARightAngleTriangleOfNumbers.cpp
// 1 // 23 // 456 // 78910 #include <iostream> using namespace std; void printNumberTriangle(int n) { int num = 1; for (int i = 1; i <= n; i++) { for (int j = 1; j <= i; j++) cout << num++; cout << endl; } } int main() { int n = 4; printNumberTriangle(n); return 0; ...
ALGO
0.999582
5.776981
d8db80d7-4da4-4223-a785-dfe894a84360
huangfeibang/mycode
acm/pat/1010.cpp
#include<iostream> using namespace std; int main() { int a, b ,f = 1; while(cin>>a>>b) { if(b) { if(f) { cout<<a*b<<' '<<b-1; f = 0; } else cout<<' '<<a*b<<' '<<b-1; } } if(f) ...
ALGO
0.999178
3.570774
086a99e7-bb5c-47f1-8e76-bc0788c89952
zealiumcoin/Zealium
src/wallet_ismine.cpp
#include "wallet_ismine.h" #include "key.h" #include "keystore.h" #include "script/script.h" #include "script/standard.h" #include <boost/foreach.hpp> using namespace std; typedef vector<unsigned char> valtype; unsigned int HaveKeys(const vector<valtype>& pubkeys, const CKeyStore& keystore) { unsigned int nRes...
ALGO
0.985195
5.505462
7efec7e5-61b5-4c9c-8e54-d86c19eaa11e
Jimmy09x/anjingloebangsat
src/sync.cpp
#include "sync.h" #include "util.h" #include "utilstrencodings.h" #include <stdio.h> #include <boost/foreach.hpp> #include <boost/thread.hpp> #ifdef DEBUG_LOCKCONTENTION void PrintLockContention(const char* pszName, const char* pszFile, int nLine) { LogPrintf("LOCKCONTENTION: %s\n", pszName); LogPrintf("Loc...
TOOL
0.96258
5.919316
0cd6e312-7d81-4ed0-9187-76111c751165
iMjayant17/PracticeLeet
45-jump-game-ii/jump-game-ii.cpp
class Solution { public: int jump(vector<int>& nums) { int n = nums.size(); vector<int> dp(n,100000); dp[0] = 0; for(int i = 1;i<n;i++){ int cnt = 100000; for(int j =1;j<=1002;j++ ){ if(i-j<0) break; if(nums[i-j]>=j) cnt = min(c...
ALGO
0.999953
5.65507
11297fc4-49cb-416f-82cd-4ecaa2f610e4
1103-Khan-Aleena/CS302-PA6
main.cpp
//ALEENA KHAN //PURPOSE: generates 100 random numbers from 1-200 and inserts them into BST and dispays the trees height traversal orders //DATE: 7/9/2025 #include "binarysearchtree.h" #include <iostream> #include <cstdlib> #include <ctime> using namespace std; void display(int& item) { cout << item << " "; } int ...
ALGO
0.998009
5.54275
1b45a7d7-db4b-4957-a2cc-2d9a371f29b8
alaaels1/quiz_app
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
29f38fde-cbeb-4502-8c67-055f81cf1f62
kbc19b02/UD
GameTemplate/Game/bulletPhysics/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp
#include "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/CollisionShapes/btCompoundShape.h" #include "BulletCollision/BroadphaseCollision/btDbvt.h" #include "LinearMath/btIDebugDraw.h" #include "LinearMath/btAa...
ALGO
0.999325
6.741042
dcce7feb-894b-4b24-b9f2-18f266b4828b
shadab16/CodeChef
src/river_home.cpp
#include <iostream> #include <bitset> std::bitset<1001117+1> r1; std::bitset<1000110+1> r2; std::bitset<1000053+1> r3; static int next(int n) { int sum = n; while (n) { sum += n % 10; n /= 10; } return sum; } static void init_series() { for (int n = 1; n <= 1001117; n = next(n)) { r1[n] = true; } for ...
ALGO
0.999758
3.829704
a7a7100a-e8f6-40ed-8c52-1f0e5e48415b
wr786/Key-to-LeetCode
C++/110 Balanced Binary Tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int toMaxDepth(TreeNode* root) { if(root == NULL) return 0; return max(toMaxDep...
ALGO
0.999714
6.428302
8663856c-4319-4ac2-8e52-55e4d4760ee8
bmmcginty/simpleUnrar
rs.cpp
#include "rar.hpp" #define Clean(D,S) {for (int I=0;I<(S);I++) (D)[I]=0;} RSCoder::RSCoder(int ParSize) { RSCoder::ParSize=ParSize; // Store the number of recovery volumes. FirstBlockDone=false; gfInit(); pnInit(); } // Initialize logarithms and exponents Galois field tables. void RSCoder::gfInit() { for ...
ALGO
0.998137
4.678828
aa1d8d7e-d89a-4f12-bb56-e8dac6a3c6f3
omkaranu04/CP_DSA
CSES/Dynamic Programming/array_description.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int const int MOD = 1e9 + 7; int n, m; vector<int> x; vector<vector<int>> dp; signed main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> n >> m; x.resize(n + 1); for (int i = 1; i <= n; i++) ...
ALGO
0.999997
4.586057
31fc1018-d47e-44fc-a8b4-7ba20dc0e879
rohandocx/Leetcode-DSA-Problems
33.Search in rotated array.cpp
class Solution { public: int search(vector<int>& nums, int tar) { int low=0,high=nums.size()-1; while(low<=high) { long long mid=((high+low)/2); // Check whether mid element is target element or not if(nums[mid]==tar) return mid; ...
ALGO
0.999986
6.191425
d5df01c1-a671-44f9-a84b-21a9f6eb4e42
GJDuck/LowFat
llvm-4.0.0.src/tools/clang/lib/Analysis/ThreadSafetyLogical.cpp
#include "clang/Analysis/Analyses/ThreadSafetyLogical.h" using namespace llvm; using namespace clang::threadSafety::lexpr; // Implication. We implement De Morgan's Laws by maintaining LNeg and RNeg // to keep track of whether LHS and RHS are negated. static bool implies(const LExpr *LHS, bool LNeg, const LExpr *RHS,...
ALGO
0.995757
7.766248
5a2000c6-ddcc-4ac6-8524-2faac1dea5ac
sheinnn/FlightGear-Simulator-Parser-Interpreter
Mult.cpp
// // Created by sheina on 12/12/18. // #include <iostream> #include "Mult.h" double Mult::calculate() { return this->left->calculate() * this->right->calculate(); } Mult::Mult(Expression* expression, Expression* expression1) { this->left=expression; this->right=expression1;}
TOOL
0.944968
4.012386
2f90161d-27c8-4514-a21d-c79db05e38c3
Fabayu/Leetcode-problems
538-convert-bst-to-greater-tree/538-convert-bst-to-greater-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.999927
6.406695
66a43c53-4b30-4116-857b-c634dbdc788c
ashutosh8789/DSA-SOLUTIONS
Binary Search/search_in_rotated_sorted_arrray.cpp
#include <bits/stdc++.h> using namespace std; //iterative code int bs_rotated(vector<int> arr,int key){ int s=0; int e=arr.size()-1; int mid=s+(e-s)/2; while(s<=e){ if(arr[mid]==key){ return mid; } //rorted sorted array II //if(arr[mid]==arr[s]&& arr[s]==a...
ALGO
0.999978
5.449887
1582607a-160f-436b-b56b-6d5390b1d9bd
dxuanthu1/New
I_GGX64/4/4对1/4兵对1车.cpp
#ifndef END_my_m_MT_R_4pawn_B_1che #define END_my_m_MT_R_4pawn_B_1che #include "..\\..\\chess.h" #include "..\\..\\preGen.h" #include "..\\..\\endgame\mat.h" #include "41.cpp" #include "..\\..\\white.h" #else #include "..\\..\\black.h" #endif //const int Pawn_add = 10; //췽4ڷһ void my_m_MT_R_4pawn_B_1che(typePOS &PO...
CONFIG
0.995966
3.010791
ebed8996-e462-4660-8e9c-827965bd3392
MatheusRyuki/Codes
Libertadores.cpp
/* The Libertadores Cup is the main soccer competition among professional clubs of South America, organized by the South American Confederation of Soccer (CONMEBOL). This cup is known for having a very complicated regulation, especially for the quarter finals and semi-final. These stages are played roundtrip matches...
ALGO
0.999935
3.988963
4f12705e-bd64-485f-b7e2-f5adc7ff54e3
blacop/DsCppR
YanWeiMinCppSln/第02章/ListInsert_L.CPP
//ListInsert_L.cpp //This program is to insert a element into the LNode # include <stdlib.h> # include <malloc.h> # include <iostream.h> # include <conio.h> # define INIT_LENGTH 10 # define OK 1 # define ERROR 0 typedef struct LNode //define LNode structure { int data; struct LNode *next; }LNode,*Linklist; int Li...
ALGO
0.999522
3.304296
ef9aecce-6736-4115-95cb-42cdacdbc9c2
rahulroynipon/Competitive_Programming
tree_class_1.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *left = nullptr; Node *right = nullptr; Node(int val) { this->val = val; } }; void preorderTraversal(Node *root) { if (root == nullptr) { return; } cout << root->val << " "; pre...
ALGO
0.999873
4.507864
3b928698-bd2c-4520-b052-32716d2dbdc0
tpisto/rmongo
src/mongo-cxx-driver/boost/libs/graph/example/king_ordering.cpp
#include <boost/config.hpp> #include <vector> #include <iostream> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/king_ordering.hpp> #include <boost/graph/properties.hpp> #include <boost/graph/bandwidth.hpp> /* Sample Output original bandwidth: 8 Reverse Cuthill-McKee ordering starting at: 6 ...
ALGO
0.999989
5.667625
8937afe6-946a-4df0-90fb-3fffbaf39926
iRath96/variance-aware-path-guiding
visualizer/nanogui/ext/eigen/bench/sparse_cholesky.cpp
// #define EIGEN_TAUCS_SUPPORT // #define EIGEN_CHOLMOD_SUPPORT #include <iostream> #include <Eigen/Sparse> // g++ -DSIZE=10000 -DDENSITY=0.001 sparse_cholesky.cpp -I.. -DDENSEMATRI -O3 -g0 -DNDEBUG -DNBTRIES=1 -I /home/gael/Coding/LinearAlgebra/taucs_full/src/ -I/home/gael/Coding/LinearAlgebra/taucs_full/build/lin...
ALGO
0.995456
4.173108
9d000522-6f41-4328-8978-19621d00386c
Tetsu-is/neet-code
two_pointers/container_with_most_water.cpp
#include <iostream> #include <vector> #include <unordered_set> using namespace std; class Solution { public: int maxArea(vector<int> &heights) { int n = heights.size(); int max = 0; int left = 0; int right = n - 1; while (left < right) { int value = ...
ALGO
0.999849
6.385732
fa03ae01-18f3-4e67-a3e1-bd459aace710
dmytrocore/20250621_1
20250621_1/20250621_1.cpp
// 20250621_1.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <cstdlib> #include <ctime> #include "Func.h" //rename #include "cui.h" #include "settings.h" using namespace std; int main() { int source[MAX_SOURCE_SIZE]; bool hasData = fals...
ALGO
0.996446
4.250973
03f4fa0f-1226-4e00-b825-1cb5b385b450
WickedNekomata/NekoEngine
Source/MathGeoLib/include/Math/float4.cpp
/** @file float4.cpp @author Jukka Jylnki @brief */ #include "float4.h" #ifdef MATH_ENABLE_STL_SUPPORT #include "myassert.h" #include <utility> #include <iostream> #endif #include <stdlib.h> #include "float2.h" #include "float3.h" #include "../Geometry/Sphere.h" #include "../Algorithm/Random/LCG.h" #include "float4...
TOOL
0.902709
3.776405
181ad558-fc6c-4079-b8dd-4370da933e28
princeofcrows/--cp
practice/cf/1800/D_Easy_Problem.cpp
#include <bits/stdc++.h> using namespace std; // Data type #define int long long #define ll long long #define pii pair<int, int> #define piii pair<int, pii> #define vi vector<int> #define vll vector<long long> #define vpi vector<pii> #define mii map<int, int> #define msi map<string, int> #define si set<int> #define s...
ALGO
0.999897
3.77748
f9681872-966c-44a6-a1d6-ecf09e795eb8
bachingo/TF2Vintage
src/utils/vbsp/boundbox.cpp
#include "vbsp.h" #include "BoundBox.h" //#include "hammer_mathlib.h" //#include "MapDefs.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" float V_rint(float f) { if (f > 0.0f) { return (float) floor(f + 0.5f); } else if (f < 0.0f) { return (float) ceil(f - 0.5f); } el...
TOOL
0.874605
7.510041
ebfebe0c-58b0-4a3c-a471-6b57475bbb45
745745/ETH_CG_project
ext/eigen/unsupported/test/NNLS.cpp
#define EIGEN_RUNTIME_NO_MALLOC #include "main.h" #include <unsupported/Eigen/NNLS> /// Check that 'x' solves the NNLS optimization problem `min ||A*x-b|| s.t. 0 <= x`. /// The \p tolerance parameter is the absolute tolerance on the gradient, A'*(A*x-b). template <typename MatrixType, typename VectorB, typename Vecto...
TEST
0.962905
7.501124
1544932b-e72b-40df-9124-6cf872d7d9c5
navinkrnirala76/LeetCode-Practice
Length Of Last Word.cpp
class Solution { public: int lengthOfLastWord(string s) { int length; for(int i=0;i<s.size()-1;i++){ if(s[i]==' '){ i-=1; } if(i>=0 && s[i]!=' '){ length +=1; } } return length; } };
ALGO
0.999176
5.463446
4b4e3260-4c3c-406a-ba1d-c87d2f847777
bioimagesuiteweb/gplcppcode
bisGPLTestFunctions.cpp
class bisTestOptimizable : public bisOptimizableAlgorithm { public: bisTestOptimizable() : bisOptimizableAlgorithm("test") { }; float computeGradient(std::vector<float>& params,std::vector<float>& grad) { int num=params.size(); if (num==2) { float x=params[0],y=params[1]; float dx=2*...
ALGO
0.983935
4.244074
0033c74e-3fcb-4084-81ed-efbd5690f379
ansharma-as/DSA-CPP
Sorting/MergeSort.cpp
#include <iostream> #include <vector> using namespace std; class Solution{ public: // Function to merge two sorted halves of the array void merge(vector<int> &arr, int low, int mid, int high) { // Temporary array to store merged elements vector<int> temp; int left = low; int rig...
ALGO
0.999999
6.438253
1c8154be-a413-4f16-8120-58787d8082e5
eaulisa/MyFEMuS
applications/PCFieldSplit/ex42/ex42.cpp
/** \file Ex11.cpp * \brief This example shows how to set and solve the weak form * of the Boussinesq appoximation of the Navier-Stokes Equation * * \f{eqnarray*} * && \mathbf{V} \cdot \nabla T - \nabla \cdot\alpha \nabla T = 0 \\ * && \mathbf{V} \cdot \nabla \mathbf{V} - \nabla \cdot \nu (\nabla \mathbf{V}...
ALGO
0.99969
4.375767
d3badbde-3464-41cd-9ad3-f6c2a2304c35
sunputawan/POSNC-Archive
POSNC/2564/Camp1/Day 9/64153_12.cpp
#include <iostream> #include <string.h> using namespace std; int main(){ char str[100]; char tmp[100]; int head_index[100]={}; bool available_str[100]; int str_amount=0; cin>>str; int n = strlen(str); int start = 0; available_str[0]=true; for(int i=1;i<n;i++){ available_...
ALGO
0.99989
3.305229
536e95b8-c590-463e-8207-ce84a358df5f
umsh1ume/awesome-competitive-coding
InterviewBit/Hashing/LongestSubstring.cpp
int Solution::lengthOfLongestSubstring(string A) { map<char,int> hash; int i=0,ans=0; for(int j=0;j<A.length();j++) { if(hash.find(A[j])==hash.end()||hash[A[j]]==-1) { hash[A[j]]=j; ans=max(ans,j-i+1); } else if(hash.find(A[j])!=hash.end()) ...
ALGO
0.999939
5.502812