uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
7d8ca933-6349-4e8c-af3e-33a5e682f548
BigLeno/Scarlet
Marlin/src/module/delta.cpp
/** * delta.cpp */ #include "../inc/MarlinConfig.h" #if ENABLED(DELTA) #include "delta.h" #include "motion.h" // For homing: #include "planner.h" #include "endstops.h" #include "../lcd/marlinui.h" #include "../MarlinCore.h" #if HAS_BED_PROBE #include "probe.h" #endif #if ENABLED(SENSORLESS_HOMING) #include ...
ALGO
0.970785
7.076561
8b23387f-185f-40e3-a9aa-1e8a0d047065
Voddden/VisualStudio-SEM2
Lab-1/Lab-1__task1/task2.cpp
#define _CRT_SECURE_NO_WARNINGS #include "tasks.h" /* 2. . */ void task2(FILE* fp, char* filename) { fp = fopen(filename, "rb"); int length = countNumbers(fp); int* arr = (int*)malloc(length * sizeof(int)); for (int i = 0; i < length; ++i) { fscanf(fp, "%d", &arr[i]); } int sum = 0; for (int i = 0; i <...
ALGO
0.968795
3.604556
943c3473-ba56-4dca-a057-d1f26a6e180b
bappi2097/ACM-Problem-Solving
Toph/Anower Sir/Mixed Fractions.cpp
#include<iostream> using namespace std; int main() { int a,b; cin>>a>>b; cout<<a/b<<' '<<a%b<<' '<<b<<endl; return 0; }
ALGO
0.997757
3.644658
b17d23ba-3cbb-4a3e-8600-c64cdb770ee1
ApexOS/android_frameworks_av
media/libeffects/lvm/lib/Common/src/LVM_GetOmega.cpp
#include "LVM_Types.h" #include "Filter.h" #include "LVM_Macros.h" /************************************************************************************/ /* */ /* Defines and Tables for 2*Pi/Fs ...
ALGO
0.989586
4.967428
569bc0ef-7e87-42b5-9c2c-310c979ed4f2
mrppdex/MPC
src/Eigen-3.3/unsupported/doc/examples/MatrixPower.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { const double pi = std::acos(-1.0); Matrix3d A; A << cos(1), -sin(1), 0, sin(1), cos(1), 0, 0 , 0 , 1; std::cout << "The matrix A is:\n" << A << "\n\n" "The matrix power A^(pi/4) is:\n"...
ALGO
0.999625
3.790203
665ee663-d5ee-4ce1-a898-04aee58b3ab7
rainboyOJ/problems
roj/1392/std.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> #include<string> #include<cstdlib> #include<queue> #include<set> #include<map> #include<stack> #include<vector> #define INF 0x3f3f3f3f #define PI acos(-1.0) #define N 1001 #define MOD 123 #define E 1e-6 using namespace std; int g[...
ALGO
0.999939
3.534048
99d6c18d-68da-471a-bdc7-bad08dc17d98
bersilin-robert1609/robert_cp
CF New/B_Interesting_drink.cpp
#include<bits/stdc++.h> using namespace std; #define short int #define int long long int #define uint unsigned long long int #define endl "\n" const int MOD = 1e9+7; void solve() { int n; cin>>n; vector<int> a(n); for(auto &i : a) cin >> i; sort(a.begin(), a.end()); int q; cin>>q; w...
ALGO
0.999809
4.458471
3e9e7f21-bd8b-44e0-9dac-6b59110a3a9b
ByteBug01/Leetcode_DSA
1354-find-players-with-zero-or-one-losses/1354-find-players-with-zero-or-one-losses.cpp
class Solution { public: vector<vector<int>> findWinners(vector<vector<int>>& matches) { // map<int,int> lost; // for (auto m : matches) // { // if (!lost.count(m[0])) lost[m[0]] = 0; // lost[m[1]]++; // } // vector<int> zero, ones; // ...
ALGO
0.999847
5.624254
9b4798a4-bb79-4cc3-802b-51d399f06cb3
aayushjn2/WhereICanCode
graph/KruskalsAlgorithm/Code.cpp
// C++ program for Kruskal's algorithm // to find Minimum Spanning Tree of a // given connected, undirected and weighted // graph // Source : https://www.geeksforgeeks.org/kruskals-minimum-spanning-tree-algorithm-greedy-algo-2/ #include <bits/stdc++.h> using namespace std; // a structure to represent a // weighted ed...
ALGO
0.999992
6.098845
c8afdfff-7f65-4610-99a1-afc9f7c3d012
PremThakareitm/Cpp_101_Codes
code50.cpp
#include <iostream> using namespace std; int stringLength(const char* str) { int length = 0; // Iterate through the string until the null terminator is encountered while (str[length] != '\0') { length++; } return length; } int main() { // Define an array of characters representing a s...
TOOL
0.998554
5.663995
63603e88-7720-446d-b3c1-57f899564924
BenjaminOyarzun17/competitive-programming
puc/hindex.cpp
#include<bits/stdc++.h> typedef long long ll; using namespace std; int main(){ ll n; cin>>n; vector<ll> a; for(ll i = 0 ; i< n ; i++){ ll g; cin>>g; a.push_back(g); } sort(a.begin(), a.end(), greater<ll>()); ll needed = a[0]-1; ll objective= a[0]; for(ll i = 1 ; i< n ; i++){ if(a[i]>=objective){ nee...
ALGO
0.999959
3.708251
cca8ad73-410b-4825-b715-ad20a9b8391e
101magikarp101/USACO
cses/range-queries/missing-coin-sum-queries.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const int MAXN = 200000; const int MAXNODE = 5500000; // ~ n * (log₂n + a small constant) struct Node { ll sum; int l, r; } seg[MAXNODE]; int nodeCnt = 1; // seg[0] is the “null” node with sum=0, l=r=0 // Create a new node by copying seg[...
ALGO
0.999988
5.296061
739ba5f9-8474-4755-ba4e-a6342f9b15d7
Husainbw786/GeeksForGeeks
Top 450/Linked List/3. Detect Loop in linked list .cpp
class Solution { public: //Function to check if the linked list has a loop. bool detectLoop(Node* head) { // your code here Node* slow = head; Node* fast = head; while(fast != NULL && fast->next != NULL) { slow = slow->next; fast = fast->ne...
ALGO
0.999858
5.456259
2696b55c-4aec-4221-837f-dbb70a6c6b3f
HerdiiiL/lockers_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.9988
6.76073
731ad1f2-e886-475f-85ac-c5d384fc156a
getchar49/ACO
ACO/src/ACOCore.cpp
#include "ACOCore.h" /* METHOD: Method used to initialize the parameters required to compute the heuristic. INPUT: none OUTPUT: none (SIDE)EFFECTS: Modify the internal state of the class */ void ACOCore::InitializeHeuristicValues() { unsigned int currA; unsigned int ...
ALGO
0.999981
3.166779
f3883e9b-236a-424b-88bf-e71e4859c788
Anoop6338/cpp
c++/pointer_arrays.cpp
#include<iostream> using namespace std; //pointers arithemetic int main(){ int marks[]={23,45,67,89}; int* p=marks; cout<<"The value of *p is "<<*p<<endl; cout<<"The value of *p+1 is "<<*(p+1)<<endl; cout<<"The value of *p+2 is "<<*(p+2)<<endl; cout<<"The value of *p+3 is "<<*(p+3)<<endl; r...
ALGO
0.979277
3.095553
c922d729-0589-4b29-91a8-d3e7b7fa82ba
mxdikhan/pp1
lab4/p.cpp
#include<iostream> using namespace std; int main() { int n; cin >> n; int a[n][n]; for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j) cin >> a[i][j]; int sum = 0; for (int i = 0; i < n; ++i) { sum += a[i][n - 1 - i]; } cout << sum << endl; }
ALGO
0.999926
3.84577
dffe8d48-e722-40ed-bf6d-90b5caefe24d
vallarasuk/LeetCode
solutions/2964. Number of Divisible Triplet Sums/2964.cpp
class Solution { public: // Similar to 1995. Count Special Quadruplets int divisibleTripletCount(vector<int>& nums, int d) { int ans = 0; unordered_map<int, int> count; for (int j = nums.size() - 1; j > 0; --j) { // 'j' also represents k. for (int i = j - 1; i >= 0; --i) ans += count[(-...
ALGO
0.999616
6.393922
b8bc24f0-aa44-4322-bd96-15d2a25663f9
shyamal2411/DSA-Practice
leetcodePractice/Tree/103ZigZagTraversal2nd.cpp
class Solution { public: vector<vector<int>> zigzagLevelOrder(TreeNode* root) { vector<vector<int>> ans; if (root == NULL) return ans; queue<TreeNode*> q; q.push(root); int k = 0; while (!q.empty()) { vector<int> vec; int n = q.size(); for (int i = 0; i < n; i++) { ...
ALGO
0.999994
5.928996
09982bc1-c0b5-4890-9df3-3358c7c4bd6b
mhdr-hami/DynamicPhiFunction
apps/dragonage/Sample.cpp
/* * $Id: sample.cpp * hog2 * * Created by Nathan Sturtevant on 5/31/05. * Modified by Nathan Sturtevant on 02/29/20. * * This file is part of HOG2. See https://github.com/nathansttt/hog2 for licensing information. * */ #include "Common.h" #include "Sample.h" #include "UnitSimulation.h" #include "Episodic...
ALGO
0.972927
4.865301
be7b630f-6b98-4cea-9ccd-c23744c357dc
Chirag-v09/C-plus-plus
Rolling dice problem.CPP
#include<iostream> using namespace std; int main() { // rand1 & rand2 are two dice where we get number between 1 & 6 // s[11] is the array that helps to count that the number of times a number comes // sum is used to find sum of two random numbers and then helps to sum all the counts of each number on dic...
ALGO
0.992411
4.387635
566e8a88-894b-471e-ab4a-296778be7ea6
RowletQwQ/OceanBase_final
src/sql/rewrite/ob_transform_simplify_limit.cpp
#define USING_LOG_PREFIX SQL_REWRITE #include "sql/rewrite/ob_transform_simplify_limit.h" #include "sql/rewrite/ob_transform_utils.h" #include "sql/resolver/expr/ob_raw_expr_util.h" using namespace oceanbase::sql; int ObTransformSimplifyLimit::transform_one_stmt(common::ObIArray<ObParentDMLStmt> &parent_stmts, ...
ALGO
0.973518
5.698014
915687c3-7f7a-4312-a0b5-9142707e4956
floreaadrian/AlgCodes
CodeForces/20C/main.cpp
#include <iostream> #include <vector> #include <queue> #include <pair> using namespace std; const int oo = 0x3f3f3f3f; int n,m,dist[100005]; vector <pair <int,int> > g; inline void dijkstra(int stnode) { priority_queue <pair <int,int> > q; memset(dist,oo,sizeof(dist)); dist[stnode]=0; q.push(make_pa...
ALGO
0.999928
4.047543
72599eb9-75a9-4805-a9db-864105436daf
kalhong/zsim-ramulator
pin_kit/source/tools/MemTrace/membuffer_simple.cpp
/* * * A memory trace (Ip of memory accessing instruction and address of memory access - see * struct MEMREF) is collected by inserting Pin buffering API code into the application code, * via calls to INS_InsertFillBuffer. This analysis code writes a MEMREF into the * buffer being filled, and calls the register...
TOOL
0.91906
6.49491
bb4aa8f9-c829-44d8-a04a-538c59d36b74
AryanSharma47/gfg-solutions
MinimumStepsToDestination.cpp
//Simple Approach class Solution { public: int minSteps(int d) { int steps = 0,sum = 0; while(true) { sum += ++steps; if(sum == d) return steps; if(sum > d && (sum-d)%2 == 0) return steps; ...
ALGO
0.999966
4.553564
b9d6a4d6-8477-40de-a049-ba1f83640cf2
msinitcyn/competitive
src/sort/insertion_sort.cpp
#include <vector> using std::vector; template <typename T> void insertion_sort(vector<T>& v) { for (int i = 1; i < v.size(); ++i) { T cur = v[i]; int j = i-1; while (j >= 0 && v[j] > cur) { v[j+1] = v[j]; j--; } v[j+1] = cur; } }
ALGO
0.999557
5.487427
81f10a84-79c6-4fa4-9b37-cafb260548d2
Jiwan/RADS
thirdparty/boost/libs/mpl/preprocessed/src/and.cpp
// $Id: and.cpp 49268 2008-10-11 06:26:17Z agurtovoy $ // $Date: 2008-10-10 23:26:17 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49268 $ #define BOOST_MPL_PREPROCESSING_MODE #include <boost/config.hpp> #include <boost/mpl/and.hpp>
CONFIG
0.891687
3.406701
01d19976-4d7f-47ba-977e-343db97acf7f
HaejinTest/PS
PS/PS9095.cpp
#include <iostream> #include <cstring> namespace ps9095 { /** @brief PS9095 1,2,3 더하기 https://www.acmicpc.net/problem/9095 @details d[n]을 구할 때 케이스를 잘 생각할것. 예를 들어, 1+2 = 3 2+1 = 3 문제에 따라 이 두 가지를 다르게 보는 경우도 있고 같게 보는 경우도 있는데 주의 */ constexpr int MAX_N = 10; int gMemo[MAX_N + 1]; int PSRecursively(int ...
ALGO
0.999676
4.930031
4188ed5f-9858-45cc-abac-cb834f548da1
goel-aadhaar/Competitive-Coding
Jigsaw.cpp
#include<bits/stdc++.h> using namespace std; void solve(){ int n; cin >> n; vector<int> v(n); for(int i = 0; i < n ; i ++) cin >> v[i]; for(int i = 1; i < n; i ++) { v[i] += v[i - 1]; } set<int> s; for(int i = 1 ; i <= 500 ; i += 2){ s.insert(i * i); } int cnt = 0...
ALGO
0.998757
4.268576
43e05890-bfb5-41fc-9150-26f214af237f
megvii-research/Iter-E2EDET
detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cpu.cpp
namespace detectron2 { template <typename T> void box_iou_rotated_cpu_kernel( const at::Tensor& boxes1, const at::Tensor& boxes2, at::Tensor& ious) { auto num_boxes1 = boxes1.size(0); auto num_boxes2 = boxes2.size(0); for (int i = 0; i < num_boxes1; i++) { for (int j = 0; j < num_boxes2; j++) { ...
ALGO
0.99107
7.187095
b326e336-5195-4bfe-9254-0eef07d5ebe0
JunSpring/BaekJoon
C++/DR_NAM_IROC/02. 자료구조 1-스택 큐 덱 문자열 연습/10809_알파벳 찾기.cpp
#include<iostream> #include<string> #include<cstring> using namespace std; int main() { string st; cin >> st; int arr[26]; memset(arr, -1, sizeof(arr)); for (int i = 0; i < st.size(); i++) { if (arr[st[i] - 'a'] == -1) arr[st[i] - 'a'] = i; } for (int i = 0; i < 26; i++) { cout << arr[i] << ' '; }...
ALGO
0.999918
3.776409
f243a256-d53f-4c5b-976f-f5c4242c09c8
drewdzzz/MathLanguage-v2.0
Compiler.cpp
///@file //#define DEBUG //#define ASM_CODE const char* OUTPUT_CODE = "asm_code.asm"; const char* OUTPUT_BYTES = "elf_code"; const char* INPUT_PROG = "programm.drew"; #include "frontend.hpp" #include "differ-tree.hpp" #include "backend.hpp" #include "elf_backend.hpp" #include <ctime> #include <stdexcept> #if...
TOOL
0.98409
3.067001
a1642e76-3752-46a5-8605-72559e16df85
ishandutta2007/codeforces
i_love_dasha_karpenko/normal/1709/E.cpp
//#pragma GCC Optimize("O3") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define endl '\n' #define all(vec) vec.begin(),vec.end() //#define int ll const int N = 2e5+7; int A[N],sz[N],B[N]; vector<int> G[N]; void calc(int v,int par){ sz[v] = 1; if (par!=v) { ...
ALGO
0.999703
4.730802
a375cf45-18e1-4bdd-9d3a-21aeff78d6cb
takattty/apg4b
sample2/ex2-4.cpp
#include <bits/stdc++.h> using namespace std; // 参照渡しを用いて、呼び出し側の変数の値を変更する void saiten(/* 呼び出し側に対応するように引数を書く */vector<vector<int>> &A, int &correct_count, int &wrong_count) { // 呼び出し側のAの各マスを正しい値に修正する // Aのうち、正しい値の書かれたマスの個数を correct_count に入れる // Aのうち、誤った値の書かれたマスの個数を wrong_count に入れる // ここにプログラムを追記 for(int i=...
ALGO
0.998775
4.006992
e1fc5d8b-9d38-4dda-9ce9-6b20778ea5bc
PaukIsUha/optimizing_formating_code
predictions/submissions-aizu-coop-gpt4/Codenet/p02301/265562687/improved.cpp
#include <bits/stdc++.h> #define EPS (1e-10) #define equals(a, b) (fabs((a) - (b)) < EPS) #define PI 3.141592653589793238 #define int long long using namespace std; static const int COUNTER_CLOCKWISE = 1; static const int CLOCKWISE = -1; static const int ONLINE_BACK = 2; static const int ONLINE_FRONT = -2; static const...
ALGO
0.999287
4.217983
a24c5ac4-042a-4f99-b29c-e6f5d0bdca12
raptoravis/forwardplusrendering
thirdparty/boost_1_70_0/libs/chrono/example/min_time_point.cpp
// min_time_point.cpp ----------------------------------------------------------// #include <boost/chrono/typeof/boost/chrono/chrono.hpp> #include <boost/type_traits.hpp> #include <iostream> using namespace boost::chrono; template <class Rep, class Period> void print_duration(std::ostream& os, duration<Rep, Perio...
TOOL
0.902402
5.745433
34cfdc7f-fb87-40da-9047-3b9833b3c6ae
aashwin-tripathi/Leetcode-problems
sort-characters-by-frequency/sort-characters-by-frequency.cpp
class Solution { private: vector<string> buildBucketArray(map<char, int> mp, int maxCount){ vector<string> ans(maxCount+1, ""); for(auto it= mp.begin(); it!=mp.end(); it++){ ans[it->second].push_back(it->first); } return ans; } string getAns...
ALGO
0.999997
6.137296
c52b66a3-e234-4654-be7b-206a6f034fc9
sohelarman1100/Algorithm
BFS template.cpp
/// BFS ///complexity O(v+e) #include<bits/stdc++.h> using namespace std; int vis[100005]; int dis[100005]; vector<int>graph[100005]; void make_graph(int u,int v) { graph[u].push_back(v); graph[v].push_back(u); } void BFS(int start) { queue<int>q; q.push(start); vis[start]=1; dis[start]=0; ...
ALGO
0.999975
4.248319
50b6ac93-b546-4da9-a6fe-94306ae59b3b
BBohdanBB/CPA-Programing-Essentials-in-C-Page
Chapter 3/3.8 - Labs (1)/Lab 3.8.7 (1).cpp
#include <iostream> #include <cmath> using namespace std; void increment(int &n, int i = 1){ n+=i; } void increment(float &n, float i = 1.0f){ n+=i; } // Insert your functions here int main(void) { int intvar = 0; float floatvar = 1.5; for(int i = 0; i < 10; i++) if(i % 2) { increment(intvar); increment(floatvar, sqr...
ALGO
0.99484
3.213845
b577536a-e944-4f0b-bd2f-ed929aade361
fatiha-mvv/arbre_binaire_parc_largeur
arbre_binaire_parc_largeur/Tree.cpp
#include "Tree.h" #include <queue> //----------> Mthode pour insrer une nouvelle valeur de manire alatoire void Tree::insertPourArbreOrdonne(int val) { // si la valeur est plus petite que la donnee de noeud actuelle--> inserer a gauche if (val < donnee) { // si il n y a pas un noeud fils gauche, o...
ALGO
0.997988
3.590247
ff502c9f-3653-42c3-ab9a-cd4c73c3d704
lamplight8/vsc20
Examples/Modules/Chapter 06/Ex6_07.cpp
// Using smart pointers import <iostream>; import <format>; import <memory>; // For smart pointers import <vector>; // For std::vector<> container #include <cctype> // For std::toupper() int main() { std::vector<std::shared_ptr<std::vector<double>>> records; // Temperature records by days size_t day{ 1 }; ...
TOOL
0.993534
7.260795
6b251386-c5f7-462d-b674-6f4afa67fd66
1-Ujjwal/competitive-programming
codechef/starter_160/Equate_S_and_T.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' void solve() { int n, m; cin >> n >> m; string s, t; cin >> s >> t; int a1 = count(s.begin(), s.end(), 'a'); int a2 = count(t.begin(), t.end(), 'a'); int prefixb1 = 0, prefixb2 = 0; for (int i = 0; i < ...
ALGO
0.999985
5.745686
0d7e0f18-a656-4feb-8ef0-0dcbf11afe8b
adelacvg/luogu
算法7 搜索/P2895.cpp
#include<bits/stdc++.h> using namespace std; vector<int> dx{1,0,-1, 0}; vector<int> dy{0,1, 0,-1}; vector<vector<int>> m(400,vector<int>(400,-1)); vector<vector<int>> ans(400,vector<int>(400,-1)); int main() { int n; cin>>n; int tt=0; int xx,yy; for(int i=0;i<n;i++) { cin>>xx>>yy>>tt; ...
ALGO
0.999929
4.326694
4758e259-99a6-4b64-9b39-8fe683da80e1
HH-Tushar/Problem_Solving
Roman_to_Integer/RomanNumbertoInteger.cpp
#include <iostream> using namespace std; #include <map> class MyClass { public: int romanToInt(string s) { string z = s; int sum = 0; map<char, int> roman; roman.insert(make_pair('I', 1)); roman.insert(make_pair('V', 5)); roman.insert(make_pair('X', 10)); ...
ALGO
0.969368
6.000313
25c13f7c-6d6d-4996-88cb-606a6885703b
JamesJellyfish/Seasonal-Shifters
SpriteLib3.0-ExampleProject/include/Box2D/Collision/b2TimeOfImpact.cpp
#include "Box2D/Collision/b2Collision.h" #include "Box2D/Collision/b2Distance.h" #include "Box2D/Collision/b2TimeOfImpact.h" #include "Box2D/Collision/Shapes/b2CircleShape.h" #include "Box2D/Collision/Shapes/b2PolygonShape.h" #include "Box2D/Common/b2Timer.h" #include <stdio.h> float32 b2_toiTime, b2_toiMaxTime; int3...
ALGO
0.999789
6.616427
6b86ff75-d36c-4c8f-895b-5d0117443004
Blitzman/CarND-Model-Predictive-Control
src/Eigen-3.3/bench/sparse_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.979549
4.155674
afbbfb94-2080-4b22-a9f0-5493a1f008cc
ronaldbakerresume/Algorithm-Examples
Segment_Tree/segment_tree.cpp
#include <iostream> #include <vector> using namespace std; class SegmentTree { private: vector<int> tree, arr; int n; void buildTree(int node, int start, int end) { if (start == end) { tree[node] = arr[start]; } else { int mid = (start + end) / 2; buildT...
ALGO
0.999976
6.836961
b65f7a60-97dc-4424-bc30-cc0b3b1b613d
Xunpeng746/SPAN
SPAN/Optimization/Lant.cpp
#include "Lant.h" // extern size_t MAX_DIM; Records Lant::run(int iter_num, Records records, double * weights) { int iter_cnt = 0; double data_pass = 0, hess_error = 1; int rank = keep_rank + more_rank; MemFactory memFac = MemFactory(); double* full_grad = memFac.malloc_double(MAX_DIM); double* hess_inv_vt = me...
ALGO
0.999764
3.842562
eca99828-9d98-4f01-9e07-853c43cc2d28
greenapple1017/codeTree
241103/두 정수 값 교환하기/to-exchange-two-integer-values.cpp
#include <iostream> using namespace std; void swap(int &a, int &b) { int tmp; tmp = a; a = b; b = tmp; } int main() { // 여기에 코드를 작성해주세요. int n, m; cin >> n >> m; swap(n,m); cout << n << " " << m; return 0; }
ALGO
0.999654
4.925146
1e84f472-ef9d-407a-b574-5c60c1c4bbb3
tomoakiii/atcoder2
abc274/c.cpp
#include <atcoder/all> #include <bits/stdc++.h> using namespace std; using namespace atcoder; #define rep(i,n) for (ll i = 0; i < (n); ++i) template<typename T> inline bool chmax(T &a, T b) { return ((a < b) ? (a = b, true) : (false)); } template<typename T> inline bool chmin(T &a, T b) { return ((a > b) ? (a = b, true...
ALGO
0.999929
3.854178
29bd0ed5-bb45-4e2d-a2a9-bc2bbd220736
marmik599/Leetcode
374-guess-number-higher-or-lower/374-guess-number-higher-or-lower.cpp
/** * Forward declaration of guess API. * @param num your guess * @return -1 if num is higher than the picked number * 1 if num is lower than the picked number * otherwise return 0 * int guess(int num); */ class Solution { public: int guessNumber(int n) { int sta...
ALGO
0.999991
5.789373
e30446f1-65e7-46af-aa4d-79381eb063fd
raincross7/code-similarity
codes/train_code/problem346/problem346_351.cpp
#include<iostream> #include<vector> #include<algorithm> #include<string> #include<set> //#include <bits/stdc++.h> using namespace std; typedef pair<long int,long int> P; int main(){ long int H,W,M; cin>>H>>W>>M; long int h[M],w[M]; set<P> s; vector<long int> x(H),y(W); for (long int i=0;i<M;...
ALGO
0.999979
3.726192
638d36fd-811e-4d35-af48-127560583cb7
lizmars/CrypRPNG
bbs.cpp
#include <cstdlib> #include <iostream> #include <gmp.h> //#include <gmpxx.h> using namespace std; void bbsInit(unsigned int seed); unsigned int bbs(); void printBin(unsigned int x); void printBin(unsigned int x) { int bit = 0; for (int shift = sizeof(unsigned int) * 8 - 1; shift >= 0; --shift) { bit...
ALGO
0.999021
4.252171
4a45009a-0d43-47bd-a015-891275fcbe37
jewelzqiu/opencv-android-library
opencv_contrib/modules/optflow/src/pcaflow.cpp
#include "opencv2/ximgproc/edge_filter.hpp" #include "precomp.hpp" /* Disable "from double to float" and "from size_t to int" warnings. * Fixing these would make the code look ugly by introducing explicit cast all around. * Here these warning are pointless anyway. */ #ifdef _MSC_VER #pragma warning( disable : 4305 ...
ALGO
0.999342
6.672838
c16119e4-0a42-47b3-bfc9-7f151e817a9f
Pressio/SHAW
eigen/bench/benchGeometry.cpp
#include <iostream> #include <iomanip> #include <Eigen/Core> #include <Eigen/Geometry> #include <bench/BenchTimer.h> using namespace Eigen; using namespace std; #ifndef REPEAT #define REPEAT 1000000 #endif enum func_opt { TV, TMATV, TMATVMAT, }; template <class res, class arg1, class arg2, int opt> stru...
TEST
0.862391
6.062908
2005c8d2-1a71-4428-8d16-a8fd66b1d505
YangHyperData/HardAlgorithms-3
1873G.cpp
/* YangStone Come To Play */ #include <vector> #include <bits/stdc++.h> #include <conio.h> #include <algorithm> using namespace std; #define RFOR(i, a, b) for (int(i) = (a) - 1; (i) >= (b); --(i)) #define nl << '\n' #define vti vector<int> #define vtll vector<long long> #define yep cout << "YES" nl #define nope cout ...
ALGO
0.99908
4.796885
57f2741f-4b5d-4fff-a81a-18fe3b69a0d5
iiitu-force/hacktoberfest22
CPP/largestBSTinBinaryTree.cpp
#include <bits/stdc++.h> using namespace std; template <typename T> class BinaryTreeNode{ public: T data; BinaryTreeNode* left; BinaryTreeNode* right; BinaryTreeNode(T data){ this->data = data; left = NULL; right = NULL; } ~BinaryTreeNode(){ delete left; delete right; } }; Binary...
ALGO
0.999952
5.301528
3e071369-9784-4227-a155-4e8c170c83a2
llvm-pic/llvm-pic
libc/src/math/generic/fabsf16.cpp
#include "src/math/fabsf16.h" #include "src/__support/FPUtil/BasicOperations.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" #include "src/__support/macros/properties/architectures.h" #include "src/__support/macros/properties/compiler.h" namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION...
ALGO
0.996281
7.267331
a0a84477-096d-430c-93cc-47094347f4f8
brandonlammey/Classwork
Programming_II/SortingAlgorithms/quicksort.cpp
#include <iostream> #include <string> using namespace std; static const int MIN_SIZE = 10; // Smallest size of an array that quicksort will sort /** Sorts the items in an array into ascending order. @pre None. @post theArray is sorted into ascending order; n is unchanged. @param theArray The given array. @pa...
ALGO
0.999989
6.556121
59a2df7b-7f8e-490a-abcb-a2e2c0b9315d
inchoel/DailyCoding
acmicpc.net/11718_PrintItself.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <string> #include <vector> using namespace std; #define MAX_SIZE (101) int main() { char input[MAX_SIZE]; vector<string> in; memset(input, 0, MAX_SIZE); while (fgets(input, MAX_SIZE, stdin)) { input[strlen(input)-1] = '\0'; string str...
TOOL
0.942486
3.382633
63c36f8e-8e0f-4041-85ac-b73d64bad30d
shubhangi-dwivedi/Data-Structures-and-Algorithms-SOLUTIONS
LEETCODE/LEETCODE-CPP/841.cpp
//841. Keys and Rooms //https://leetcode.com/problems/keys-and-rooms/ //Method-1 using BFS class Solution { public: bool canVisitAllRooms(vector<vector<int>>& rooms) { int n=rooms.size(); vector<bool>visited(n); queue<int> q; q.push(0); while(!q.empty()) ...
ALGO
0.999899
6.474896
0ac5c5c4-b68d-452e-a479-98bdcb7caf06
glbitm-coder/LeetCode-and-GeeksForGeeks-solutions
0909-snakes-and-ladders/0909-snakes-and-ladders.cpp
class Solution { public: int snakesAndLadders(vector<vector<int>>& board) { int n = (int)board.size(); vector<int> board1D(n*n, -1); for(int i = n-1 , cnt = 0; i >= 0 ; --i) { for(int j = 0; j < n && cnt < n * n; ++j) { if(board[i][j] != -1) ...
ALGO
0.999784
6.370611
bd37c36e-ca4b-4501-94c4-50cc7084a5c1
WiktorJ/msnode2vec
src_cpp/node2vec/node2vec.cpp
#include "stdafx.h" #include "n2v.h" #ifdef USE_OPENMP #include <omp.h> #endif void ParseArgs(int &argc, char *argv[], TStr &InFile, TStr &OutFile, int &Dimensions, int &WalkLen, int &NumWalks, int &WinSize, int &Iter, bool &Verbose, double &ParamP, double &ParamQ, bool &Directed, bool ...
ALGO
0.959266
4.642513
8967835d-bcaa-4225-8b1c-4a30fed9a954
tomkaith13/random_c
BFS.cpp
#include <iostream> #include <deque> using namespace std; class BTree { public: int data; BTree* left; BTree* right; BTree(int); }; BTree::BTree(int d) { data = d; left = NULL; right = NULL; } void BFS(BTree *root, deque<BTree*> &d) { int i = 0,popped = 0; BTree *t; d.push_back(root); while(d.size()...
ALGO
0.999948
4.697459
e746a184-df09-4099-a55c-2fe95d74edc2
xxcxu/Code
Luogu/P5540.cpp
#include <bits/stdc++.h> FILE *fin, *fout, *ferr; static const int N = 205, M = 10'005, inf = 2550005; int n, m, fa[N]; struct Edge { int x, y, a, b, w; Edge(int x = 0, int y = 0, int a = 0, int b = 0) : x(x), y(y), a(a), b(b) { w = 0; } } e[M]; struct Vector2 { double x, y; Vector2(double x = 0, dou...
ALGO
0.999936
3.854779
0f48516e-9c4c-41bc-a577-b5d7b304c3fd
louise365/To-be-SDE
2/2/2.cpp
// 2.cpp : ̨Ӧóڵ㡣 // #include "stdafx.h" #include "malloc.h" #include "memory.h" /** * Definition for singly-linked list. */ struct ListNode { int val; struct ListNode *next; }; struct ListNode returnVal; struct ListNode* addTwoNumbers(struct ListNode* l1, struct ListNode* l2){ struct ListNode *lin...
ALGO
0.999407
4.711158
91a66c1e-332f-444d-9b37-0c527f738643
eglrp/cvpr_interpolation_etc
cvpr_interpolation_etc/cvpr_interpolation_etc/StereoMatcher.cpp
//#include "StereoMatcher.h" #include "cxcore.h" using namespace cv; double dataCost(double val0,double val1) { return abs(val0 - val1); } void RawCost(const cv::Mat & img_L,const cv::Mat & img_R, cv::Mat & dataCostCube,int dLevels) { int width = img_L.cols; int height = img_L.rows; for(int z=0;z<dLevels;z++) { ...
ALGO
0.998643
4.171793
650b4114-c517-477d-a33c-35d86fd9323b
romeokil/c-prac
l-44.3.cpp
//Introduction of doubly linked list //Insertion in doubly linkedlist //In this we also handled the case if head is pointing to NULL #include<iostream> using namespace std; class Node{ public: int data; Node*prev; Node*next; Node(int data){ this->data=data; this->prev=NULL; this->next=NULL; } }; void insert...
ALGO
0.998562
3.592201
cd21162c-feda-46a9-9b3b-ddc815548a23
Vanhoai/MasterAlgorithms
practice/array/update_operation.cpp
#include <iostream> using namespace std; #define ms(s, n) memset(s, n, sizeof(s)) #define all(a) a.begin(), a.end() #define sz(a) int((a).size()) #define FOR(i, a, b) for (int i = (a); i <= (b); ++i) #define FORD(i, a, b) for (int i = (a); i >= b; --i) #define PB push_back #define MP make_pair #d...
ALGO
0.999882
4.179543
998eb9d7-ff71-4edc-947a-788d0d544523
honey3491/acmicpc
~2024-06-19/2908.cpp
#include <iostream> using namespace std; int reverse(int s); int main() { int a, b, ar, br; cin >> a; cin >> b; ar = reverse(a); br = reverse(b); if (ar > br) cout << ar; else cout << br; return 0; } int reverse(int s) { int sum = 0; for (int i = 0; i < 3; i++) { sum *= 10; sum += s % 10; s /=...
ALGO
0.999775
3.527598
ccb67edd-9a30-47fd-b543-6a2a0c4f0b84
ishandutta2007/codeforces
cailiyi/normal/1634/D.cpp
#include<cstdio> #include<algorithm> #include<cstring> #include<iostream> #define N 1000 using namespace std; int T,n; inline int query(int i,int j,int k) { int ret; cout<<"? "<<i<<" "<<j<<" "<<k<<endl; cin>>ret; return ret; } inline void print(int i,int j) { cout<<"! "<<i<<" "<<j<<endl; } int main(...
ALGO
0.999958
3.153892
91223461-4fe1-473e-886e-2999ba478e4d
n1ckfg/latk_ml_003
SynDraw/SynDraw/libigl/include/igl/copyleft/marching_cubes.cpp
#include "marching_cubes.h" #include "marching_cubes_tables.h" #include <unordered_map> extern const int edgeTable[256]; extern const int triTable[256][2][17]; extern const int polyTable[8][16]; template <typename DerivedValues, typename DerivedPoints, typename DerivedVertices, typename DerivedIndices, typename Deri...
ALGO
0.9989
7.09467
e1dc3cb5-48e5-4420-a7a3-f4b0d6c56331
hasib-24/DSA
Deque/Deque-2-Empty.cpp
#include <iostream> using namespace std; //1-Create Deque: class Deque { int* arr; int size; int front; int rear; public: Deque(int n) { size =n; arr = new int[size]; front =rear =-1; } //operation-2:Check Empty or Not: bool IsEmpty(){ if(...
TOOL
0.985422
3.222445
e7b62c05-69e9-439a-ade2-4f9652d7769f
jschmidt241/intro_raytracing
main.cpp
#include "rtweekend.h" #include "camera.h" #include "color.h" #include "hittable_list.h" #include "sphere.h" #include "material.h" #include <iostream> color ray_color(const ray& r, const hittable& world, int depth) { hit_record rec; if (depth <= 0) return color(0,0,0); if (world.hit(r, 0.001, infinity, ...
ALGO
0.955977
5.856396
02a2e485-4256-41e5-8ea0-182f5303d391
flowjiyun/PS
tree/bst/938_range_sum.cpp
class Solution { public: int rangeSumBST(TreeNode* root, int low, int high) { m_low = low; m_high = high; dfs(root); return m_sum; } void dfs(TreeNode* curNode) { if (curNode == nullptr) { return ; } if (curNode->val >= m_low && curNode->va...
ALGO
0.999995
6.96765
80985982-53c8-478b-bab9-92d970800b51
AdarshGaur/Competitive-Programming
Codeforces/Codeforces Round #790 (Div. 4)/F. Longest Strike.cpp
// https://github.com/AdarshGaur/Competitive-Programming // Author : @AdarshGaur #include <bits/stdc++.h> using namespace std; #define int int64_t #define endl "\n" typedef pair<int,int> pii; typedef vector<int> vi; // Source : https://codeforces.com/blog/entry/76087 vector<string> vec_splitter(string s) { s += ','...
ALGO
0.999882
5.11812
367ddbdc-1a70-4628-830f-299850d7af99
sudhanshu-t/DSA
InterviewPrep/Practice/honestCoach.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a.begin(), a.end()); int ans = INT_MAX; // for (int i:...
ALGO
0.999818
4.987179
ff5152b9-3a18-47e0-aac7-560f857042d9
Aryan-droid/DSA-Problems
Bits.cpp
#include<bits/stdc++.h> using namespace std; void binary(int n){ cout<<n<<": "; for(int i=10;i>=0;--i){ cout<<((n>>i) & 1); } } int main(){ // for(int j=1;j<=10;j++){ // binary(j); // cout<<endl; // } int n=65; int a= (n | (1<<5)); b=binary(a); cout<<char(b); }
ALGO
0.998976
3.427244
db928b42-66ac-4d93-9b2a-75e8eacc2e31
uni-kakurenbo/themed-research
road-repair/solver/19.cpp
/* * @uni_kakurenbo * https://github.com/uni-kakurenbo/competitive-programming-workspace * * CC0 1.0 http://creativecommons.org/publicdomain/zero/1.0/deed.ja */ /* #language C++ GCC */ #include <cstdlib> #include <cassert> #include <cstdint> #include <iostream> #include <vector> #include <queue> #include <unor...
ALGO
0.999423
5.331683
3bf04fa7-fdc6-43ba-af39-8f383a720405
Kanekicn/WayofOffer
9_动态规划/Leetcode_70_ClimbingStairs.cpp
// // Created by Yang Shuangzhen on 2020/8/25. // #include <vector> /* * Leetcode 70: 爬楼梯 * 思路:dp[n] = dp[n-1] + dp[n-2] */ class Solution{ public: int climbStairs(int n){ std::vector<int> dp(n+3, 0); dp[1] = 1; dp[2] = 2; for (int i=3; i<=n; i++) dp[i] = dp[i-1...
ALGO
0.999075
5.526194
92c6e11a-0b47-4f1e-a74e-b5825247e3f7
raptoravis/forwardplusrendering
thirdparty/boost_1_70_0/libs/graph/example/dfs_parenthesis.cpp
#include <boost/config.hpp> #include <assert.h> #include <iostream> #include <vector> #include <algorithm> #include <utility> #include "boost/graph/visitors.hpp" #include "boost/graph/adjacency_list.hpp" #include "boost/graph/breadth_first_search.hpp" #include "boost/graph/depth_first_search.hpp" using namespace boo...
ALGO
0.998167
5.540949
094cbc8d-ff42-4511-afe8-a70f2db0b36a
ArturGoz/doodle-project-laboratory-work-oop-patterns-uml-diagrams-refactoring
Лабараторна 3 семестр 2/Лінійна регресія.cpp
#include <iostream> #include <string> #include <sstream> #include <chrono> #include <thread> #include <mutex> using namespace std; mutex mt; class regression { //змінні які використовуються для обчислення алгоритму float coeff, constTerm, sum_xy, sum_x, sum_y, sum_x_square, sum_y_square, test_number; public: regr...
ALGO
0.851079
3.810866
6b282cab-f619-457b-98ec-888e7d03fc6c
Askeladd42/ft_irc
SRCS/cmd/who.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* who.cpp :+: :+: :+: ...
WEB
0.905728
4.668958
069905a5-ee52-484a-a381-59dd753c3170
upendra-coder/CP
B_Kar_Salesman.cpp
#include <bits/stdc++.h> using namespace std ; int main() { int t ; cin >> t ; while(t--) { int n , x ; cin >> n >> x ; vector<long long>a(n) ; long long maxi = LLONG_MIN ; long long sum = 0 ; for(int i=0;i<n;i++){ cin >> a[i] ; maxi = max(maxi,a[i]) ; sum += a[i] ; ...
ALGO
0.99995
3.758932
c20f234c-baae-40bf-a3e9-52b459913143
ishandutta2007/codeforces
awakeanay/normal/1543/E.cpp
#include <iostream> #include <queue> #include <set> #include <vector> #define int long long const int MAXN = 65538; std::vector<int> Adj[MAXN]; int ans[3][3]; signed main() { std::ios::sync_with_stdio(false); std::cin.tie(0); ans[1][0] = 0; ans[1][1] = 0; ans[2][0] = 0; ans[2][1] = 1; ans[2][2] = 0...
ALGO
0.999578
4.134754
85366053-d1f1-4310-a218-e2d04e43e1f0
stivencardona/programming-contest
solutions/codeforces/1106A-DIV2.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin >> n; char MAT[n][n]; for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) cin >> MAT[i][j]; int ans = 0; for (int i = 1; i < n - 1; i++) { ...
ALGO
0.999864
4.639004
aa154984-714b-4071-b85b-3a3b788bc77a
jonggeolk/C-plusplus
C-plus-plus/Class1th (Stream)/Source.cpp
#include <iostream> void Swap(int& firstValue, int& secondValue) { int temp = firstValue; firstValue = secondValue; secondValue = temp; } int main() { #pragma region Ʈ // ð 帧 ߻ϴ // 帧Դϴ. // char alphabet = 'A'; // int data = 100; // // std::cout << "data : " << data << std::endl; // std::cout << "al...
ALGO
0.996542
3.803517
17014e34-fe7c-4cf2-bd39-37227a9a6c45
ishandutta2007/codeforces
tob123/normal/1423/B.cpp
#include <bits/stdc++.h> using namespace std; #define sz(x) ((int) (x).size()) typedef long long ll; typedef pair<int,int> pii; template<class T> void print(T & x){ cout << x; } template<class T,class U> void print(pair<T,U> & p){cout << "("; print(p.first); cout << ", "; print(p.second); cout << ")"; } template<class ...
ALGO
0.999952
4.573967
b4a74184-e6ee-45bb-96de-bf27aea27feb
Chris1221/mchg
lib/boost_1_61_0/libs/hana/example/tuple/foldable.cpp
#include <boost/hana/assert.hpp> #include <boost/hana/config.hpp> #include <boost/hana/equal.hpp> #include <boost/hana/fold_right.hpp> #include <boost/hana/if.hpp> #include <boost/hana/less.hpp> #include <boost/hana/prepend.hpp> #include <boost/hana/tuple.hpp> namespace hana = boost::hana; using namespace hana::literal...
ALGO
0.887595
5.677901
6bf5ea28-8b84-4ebf-a5af-d3d9fd049aec
WTCa100/DesignPatterns
Patterns/Structural/Bridge/main.cpp
#include <iostream> #include <string> enum weapon { bow = 0, oneHandSword, twoHandSword, staff }; // Abstract implementation - interface class EnemyClass { protected: std::string name_; int health_; int baseStat_; weapon heldWeapon_; bool alive_; public: EnemyClass(std:...
TOOL
0.888758
6.228103
1e8f4ad6-0db5-491d-8c01-7b0966664a96
triSYCL/sycl
libcxxabi/src/fallback_malloc.cpp
#include "fallback_malloc.h" #include <__threading_support> #ifndef _LIBCXXABI_HAS_NO_THREADS #if defined(__ELF__) && defined(_LIBCXXABI_LINK_PTHREAD_LIB) #pragma comment(lib, "pthread") #endif #endif #include <assert.h> #include <stdlib.h> // for malloc, calloc, free #include <string.h> // for memset #include <new> ...
TOOL
0.927742
7.673243
9476da0a-270b-4106-8ed0-de58ed5ce1c7
alexandraback/datacollection
solutions_5769900270288896_0/C++/Wojtekk/1.cpp
#include<algorithm> #include<vector> #include<queue> #include<cstdio> using namespace std; const int max_n = 1e6+6, inf =1e9; int dist[max_n], n; void solve(int casee) { int ans = inf; int r, c, n; scanf("%d%d%d", &r, &c, &n); if( n<2) ans =0; int sum=r*c; for( int i=1; i< (1<<sum);++i ) ...
ALGO
0.99957
3.84461
5b018820-6d74-494b-a025-91c1b57a1279
Aeon113/Notes
lc/0018_2.cpp
class Solution { public: vector<vector<int>> fourSum(vector<int>& nums, int target) { sort(begin(nums), end(nums)); return kSum(nums, target, 0, 4); } vector<vector<int>> kSum(vector<int>& nums, int target, int start, int k) { vector<vector<int>> res; if (start == nums.size() || nums[start] * k > target || t...
ALGO
0.999969
6.102429
50745bff-3229-4868-96a4-6f04ccd7bac2
Strawberry9583/LeetCode
Leetcode1_99/Leetcode_70/Leetcode_70/Leetcode_70.cpp
#include<iostream> #include<vector> #include<string> using namespace std; // there are lots of solutions can be considerred as following: // https://leetcode.com/problems/climbing-stairs/solution/ class Solution { public: int climbStairs(int n) { int pre_1 = 1, pre_2 = 2; if (n == 1) { return 1; } if (n ...
ALGO
0.9996
4.831766
8e3a19f5-89de-4ab3-8dd2-bf5130812387
SteGG200/SolutionVnojEdu
Matmul/I.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pii pair<ll,ll> #define vi vector<ll> #define all(a) (a).begin(), (a).end() #define fi first #define se second #define gcd __gcd #define mset(a) memset(a, 0, sizeof(a)) #define endl '\n' #define spc " " const int MN1 = 1e6 + 5,MN2 = 1e4 + 5...
ALGO
0.999962
4.440587
7cc9560d-e373-43c5-a8b5-d186b822f83d
nickshinpho/UE4-HTML5-TPS
UE4_ThirdParty/PhysX3/PhysX_3.4/Source/PhysXCooking/src/CookingUtils.cpp
#include "foundation/PxMath.h" #include "CookingUtils.h" #include "CmRadixSortBuffered.h" #include "PsAllocator.h" #include "PsFPU.h" using namespace physx; using namespace Cm; ReducedVertexCloud::ReducedVertexCloud(const PxVec3* verts, PxU32 nb_verts) : mNbRVerts(0), mRVerts(NULL), mXRef(NULL) { mVerts = verts; m...
ALGO
0.980944
5.725755
f51f7385-4d3f-40ce-ad63-db6eb8be2048
sadramanouch/leetcode
0807-max-increase-to-keep-city-skyline/0807-max-increase-to-keep-city-skyline.cpp
#include <vector> #include <algorithm> using namespace std; class Solution { public: int maxIncreaseKeepingSkyline(vector<vector<int>>& grid) { int n = grid.size(); vector<int> maxRow(n, 0); vector<int> maxCol(n, 0); // Calculate the maximum height in each row and column ...
ALGO
0.99999
6.864872
f8e4a682-26af-4554-a9ff-5afcf6358818
KatUrdi/Algoritmica-2
Dynamic Programming/digit/DigitDPprimos.cpp
#include <bits/stdc++.h> #define input freopen("in.txt", "r", stdin) #define output freopen("out.txt", "w", stdout) using namespace std; string number = "307"; int dp[20][2][20]; bool isPrime(int n) { if (n == 2) return true; if (n < 2 || n % 2 == 0) return false; for (int i = 3; i * i <= n; i += 2)...
ALGO
0.999696
4.384373
e59e6b31-cdc2-4a85-a608-c7422e223586
izzat5233/fruit-classifier-wasm
nn/src/act.cpp
// // Created by Izzat on 11/26/2023. // #include "nn.h" #include <valarray> #include <numeric> namespace nn::act { Function step{ [](double x) -> double { return x >= 0 ? 1 : 0; }, [](double y) -> double { return 0; } }; Function sign{ [](double x) -> double { return...
TOOL
0.95419
5.895912
4ba7013f-0ca3-470a-99e8-0449f14be493
TieWay59/HappyACEveryday
2020codes/codeforces/1288/B.cpp
/** * █████╗ ██████╗ ██████╗ ██╗ ███████╗ * ██╔══██╗██╔════╝ ██╔══██╗██║ ╚══███╔╝ * ███████║██║ ██████╔╝██║ ███╔╝ * ██╔══██║██║ ██╔═══╝ ██║ ███╔╝ * ██║ ██║╚██████╗▄█╗ ██║ ███████╗███████╗ * ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚══════╝╚═══...
ALGO
0.998945
3.851573