uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
a5a442cb-8a13-49a4-af4b-de315ff97993
Reinazhard/bionic
linker/linker_main.cpp
#include "linker_main.h" #include <link.h> #include <sys/auxv.h> #include "linker_debug.h" #include "linker_debuggerd.h" #include "linker_cfi.h" #include "linker_gdb_support.h" #include "linker_globals.h" #include "linker_phdr.h" #include "linker_relocate.h" #include "linker_tls.h" #include "linker_utils.h" #include...
TOOL
0.875742
7.556419
be254621-ef6d-4e9b-a04f-92ee97decf06
avikant0-0/striver
0105-construct-binary-tree-from-preorder-and-inorder-traversal/0105-construct-binary-tree-from-preorder-and-inorder-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.999982
6.640441
7634a306-aa90-4c69-af76-ce9dbd437217
meilleur777/Competitive_Programming
AtCoder/old/others/Japanese Student Championship 2021 D.cpp
#include <bits/stdc++.h> #define rep(i, n) for(int i=0; i<(n); i++) using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> intp; void init_code() { ios_base::sync_with_stdio(false); cin.tie(NULL); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", ...
ALGO
0.999964
4.591022
5bb30279-500a-4be4-82a5-ab2efea9de66
ishandutta2007/codeforces
liuhengxi/normal/1730/C.cpp
#include<cstdio> #include<algorithm> #define F(i,l,r) for(int i=l,i##_end=r;i<i##_end;++i) using namespace std; template<typename T>void readmain(T &x) { bool neg=false; unsigned int c=getchar(); for(;(c^48)>9;c=getchar())if(c=='-')neg=true; for(x=0;(c^48)<10;c=getchar())x=(x<<3)+(x<<1)+(c^48); if(neg)x=-x; } temp...
ALGO
0.99996
4.474448
20a7da2d-ce2b-490a-981f-8cc3ca23513f
codewar193/Practice-Striver-SDE-Sheet
SlidingWindow/Sliding Maximum.cpp
#include "bits/stdc++.h" vector<int> maxSlidingWindow(vector<int> &arr, int n, int k){ // Write your code here vector<int> ans; deque<int> dq; for(int i =0;i<n;i++) { if(!dq.empty() && dq.front() == i-k){ dq.pop_front(); } while(!dq.empty() && arr[dq.back()] < arr[i]){ ...
ALGO
0.999937
5.245588
593deef7-3a40-417a-9136-dbc5686a6c9e
musa-45/CODEFORCES_CODES
Gravity fillup.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n); for(int i = 0 ;i < n ; i++) { cin >> a[i]; } sort(a.begin() , a.end()); for(int i = 0 ; i < n ; i++) { cout << a[i] << " "; } }
ALGO
0.999872
3.720154
47d1ed7c-cbdf-47e1-9095-423597e230af
ishandutta2007/codeforces
boook/normal/520/C.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #define REP(i,j,k) for(int i = j ; i < k ; ++i) #define RREP(i,j,k) for(int i = j ; i >=k ; --i) #define A first #define B second #define pb push_back #define mp make_pair #define PII pair...
ALGO
0.999988
5.097467
4c626f1e-787c-4532-801d-0649ff04bf59
embedded-dev-research/arm_gemm
app/main.cpp
typedef std::chrono::nanoseconds ns; typedef std::chrono::high_resolution_clock Time; int main(int argc, char** argv) { for(auto count = 128; count < 1025; count *= 2) { std::cout << " ===== matrix size = " << count << " ===== " << std::endl; uint32_t n = count, m = count, k = count; std::v...
TOOL
0.960599
4.206123
79ed91ca-8e8d-47c9-9c57-42919a2f8ddf
1987873567/ACM
Contest/Codeforces/970 div3/g.cpp
#include <bits/stdc++.h> using ld = long double; using i64 = long long; #define NO std::cout << "No\n" #define YES std::cout << "Yes\n" #define all(x) x.begin(), x.end() // std::default_random_engine Rand; // std::uniform_int_distribution<int> r1(1, 10); // constexpr int d[4][2] = {-1, 0, 0, 1, 1, 0, 0, -1}; void so...
ALGO
0.999947
4.214915
d8df575c-3675-45ce-b445-fdbc66cd1d8e
DrSwad/CP
Submissions/Others/IUPC CU/D.cpp
#include <bits/stdc++.h> using namespace std; const int N = 20; const int K = 5; int k, rows, cols; int g[N][N]; pair<int, int> sos[K]; int dist[K][N][N]; int dr[] = {+1, -1, 0, 0}; int dc[] = {0, 0, +1, -1}; void go(int id) { dist[id][sos[id].first][sos[id].second] = 0; queue<pair<int, int>> que; que.push(sos...
ALGO
0.99906
4.757901
8824405c-777c-4641-994b-5c4bb13832c9
nitinprakash96/Data-structures
String Algorithms/Z-Index/zindex.cpp
#include <iostream> using namespace std; string str; int zindex[1000001]; int maxx=0; int pos=0; int ans[1000001]; int ans2[1000001]; int mins(int a, int b) { if(a<b) return a; return b; } //For problem "password" codeforces, zindex box method to calculate length of prefix that a substring is. int ...
ALGO
0.99989
3.897012
fd77deb0-4d4c-4893-8585-4f74bf83f0f1
giuliano-97/fracture_sim
libigl/include/igl/mat_to_quat.cpp
// This could be replaced by something fast template <typename Q_type> static inline Q_type ReciprocalSqrt( const Q_type x ) { return 1.0/sqrt(x); } //// Converts row major order matrix to quat //// http://software.intel.com/sites/default/files/m/d/4/1/d/8/293748.pdf //template <typename Q_type> //IGL_INLINE void ig...
ALGO
0.996969
6.545238
02fd8bca-8dc1-4bd7-b938-855428833e70
muschellij2/FSL6.0.0
extras/include/boost/libs/functional/hash/examples/portable.cpp
#include <boost/functional/hash.hpp> #include <cassert> // This example illustrates how to customise boost::hash portably, so that // it'll work on both compilers that don't implement argument dependent lookup // and compilers that implement strict two-phase template instantiation. namespace foo { template <class...
TOOL
0.913364
6.983414
8cf71c49-52a4-4daa-a378-ebfb919afaba
DE-NISkA/android_frameworks_base
media/libstagefright/codecs/amrwb/src/band_pass_6k_7k.cpp
/* ------------------------------------------------------------------------------ Filename: band_pass_6k_7k.cpp Date: 05/08/2004 ------------------------------------------------------------------------------ REVISION HISTORY Description: ---------------------------------------------------------------------...
ALGO
0.999867
5.574719
2ad7714e-5e74-419b-a92d-beab58187485
julianobst/xtlw6-marlin-community
Marlin/src/module/planner_bezier.cpp
/** * planner_bezier.cpp * * Compute and buffer movement commands for bezier curves * */ #include "../inc/MarlinConfig.h" #if ENABLED(BEZIER_CURVE_SUPPORT) #include "planner.h" #include "motion.h" #include "temperature.h" #include "../MarlinCore.h" #include "../core/language.h" #include "../gcode/queue.h" // ...
ALGO
0.999449
7.924169
4a11c84e-e9d5-448c-bf3c-d10d6c48832c
Seven-milk/C
C++/helloworld/bubble_sort.cpp
#include <iostream> using namespace std; int main10() { int store = 0; int arr[] = { 4,2,8,0,5,7,1,3,9 }; int start = 0; int end = sizeof(arr) / sizeof(arr[0]) - 1; int turn = end; cout << "˳ǰ" << endl; for (int i = 0; i <= end; i++) { cout << arr[i] << endl; }; while (turn >= 1) { for (int i=0; i<tur...
ALGO
0.999914
3.48334
280eb67a-1804-4eb7-a3e5-2fbd00bb2f0a
Raoalimurad/DSA_PRACTICE
trieDataStructure/LongestWordWithAllPrefixPresent.cpp
#include <iostream> #include<string> using namespace std; class Trie{ private: class Node{ public: Node* children[26]; bool eow; Node(){ for(int i= 0; i<26;i++){ children[i] = NULL; } eow = false; }}; Node* root; st...
ALGO
0.999811
4.690967
f9f9c28d-bc77-4c8e-b374-0b7b3850b746
saks-hamjain/Leetcode_solutions
0063-unique-paths-ii/0063-unique-paths-ii.cpp
class Solution { public: int uniquePathsWithObstacles(vector<vector<int>>& obstacleGrid) { int m= obstacleGrid.size(); int n = obstacleGrid[0].size(); vector<vector<int>> dp(m,vector<int>(n,1)); for(int i =0;i<m;i++) { for(int j = 0;j <n;j++) { ...
ALGO
0.999553
5.854436
0590b793-a1e3-4eb9-96f7-459e73288143
SU-IN-LEE/codetree-TILs
240309/짝수만 2로 나누기/divide-even-numbers-by-2.cpp
#include <iostream> using namespace std; void DivideEven(int *arr, int n) { for (int i = 0; i < n; i++) { if (arr[i] % 2 == 0) { arr[i] /= 2; } } } int main() { int n, arr[50]; cin >> n; for (int i = 0; i < n; i++) { cin >> arr[i]; } DivideEven(arr, n)...
ALGO
0.999436
5.121605
aad50f0f-c506-4915-865c-31c9975f1888
ishandutta2007/codeforces
lucaperju/normal/213/A.cpp
#include <bits/stdc++.h> using namespace std; int vl[203],cat[203],lib[4][203],ccat[203]; vector <int> v[203]; int main() { long long add=1,t,h,n,i,j,mn=100003LL*100003LL,k,mx=0,rz=0,tot,m,obj,st,cnt=0,cnti=0,s=0,nri=0,a[4],b=0,c=0,a2,b2,a3,b3; cin>>n; s=n; a[1]=a[2]=a[3]=0; for(i=1;i<=n;++i) ...
ALGO
0.999878
3.159052
fb2736e5-4997-49ee-ba87-d97103d7bddb
RAVINGMADROSE/CSC-134
Module 3/M3T3_Moon.cpp
// CSC 134 // M3T3 - Craps //Madison Moon // 9/25/24 #include <iostream> #include <cstdlib> //for rand() #include <ctime> // using namespace std; int roll () { // get a random number from 1 to 6 int die = (rand() % 6) + 1; return die; } int main() { // set up your variables int die1, die2, total; int s...
ALGO
0.994831
4.676558
d3ffd2a2-c509-4d61-b560-22d59749104e
himanshusingla2004/LeetCode
2309-greatest-english-letter-in-upper-and-lower-case/2309-greatest-english-letter-in-upper-and-lower-case.cpp
class Solution { public: string greatestLetter(string s) { map<char,int> mp; for(auto i:s)mp[i]++; for(char ch='Z';ch>='A';ch--){ if(mp.find(ch)!=mp.end() && mp.find(ch+32)!=mp.end()){string st;st += ch;return st;} } return ""; } };
ALGO
0.998911
5.488201
66475aef-4f66-4cf0-8689-9a4d61ebd158
dhanushrajm/OOPS_Cpp
kruskal and prim's algorithm.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; // Kruskal's algorithm vector<pair<int, pair<int, int>>> edges; // edges sorted by weight vector<int> parent(V); int find(int x) { if (parent[x] != x) parent[x] = find(parent[x]); return parent[x]; } void kruskal() { ...
ALGO
0.999983
5.857141
fe99d756-3a83-45d9-afa0-5bf4d2133ef7
Adityagupta1625/450-DSA-Questions
linkedlist/p22.cpp
// Given a doubly linked list of n elements. The task is to reverse the doubly linked list. // Example 1: // Input: // LinkedList: 3 <--> 4 <--> 5 // Output: 5 4 3 // Probelm link: https://practice.geeksforgeeks.org/problems/reverse-a-doubly-linked-list/1 #include <bits/stdc++.h> using namespace std; struct Node { ...
ALGO
0.999713
6.005382
a3988f59-f9b2-465f-bc39-8bac0965ef35
bvrstich/Hessian-v2DM-2D-Hub
Gradient.cpp
#include <iostream> #include <cmath> #include <fstream> using std::ostream; using std::ofstream; using std::ifstream; using std::cout; using std::endl; using std::ios; #include "include.h" double *Gradient::norm; int Gradient::n; /** * initialize the static lists */ void Gradient::init(){ n = TPTPM::gn(); ...
ALGO
0.990362
4.594372
b4fab170-27ad-4e5b-928c-fe85f77be78f
stalker5217/problem-solving
BAEKJOON/14501.cpp
#define DEBUG 0 #define LOG(string) cout << string #include <iostream> #include <cstring> #include <vector> #include <algorithm> #include <functional> using namespace std; typedef struct __consulting{ int time; int profit; } consulting; int N; vector<consulting> consult; vector<consulting> consultStack; int myMax...
ALGO
0.999933
4.19804
cef04c58-76f5-4bdb-a759-e514d330c962
origamimantis/SJTU_2019
shared/opencv3/opencv_contrib/ximgproc/src/dtfilter_cpu.cpp
#include "precomp.hpp" #include "dtfilter_cpu.hpp" namespace cv { namespace ximgproc { typedef Vec<uchar, 1> Vec1b; typedef Vec<float, 1> Vec1f; Ptr<DTFilterCPU> DTFilterCPU::create(InputArray guide, double sigmaSpatial, double sigmaColor, int mode, int numIters) { Ptr<DTFilterCPU> dtf(new DTFilterCPU()); dt...
TOOL
0.929776
6.231524
c94a97e2-f33d-43d6-932b-e30dd2b27839
enkilee/leetcode
.history/20.有效的括号_20200305225115.cpp
/* * @lc app=leetcode.cn id=20 lang=cpp * * [20] 有效的括号 */ // @lc code=start class Solution { public: bool isValid(string s) { if(s.empty()) return true; stack<char> sta; for(int i=0;i<s.size();i++) { if(sta.empty()) sta.push(s[i]); ...
ALGO
0.999338
6.792219
10c50448-781c-447a-a7d5-bc16176f223b
llvm-pic/llvm-pic
libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/ranges_make_heap.pass.cpp
// UNSUPPORTED: c++03, c++11, c++14, c++17 // <algorithm> // template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less, // class Proj = identity> // requires sortable<I, Comp, Proj> // constexpr I // ranges::make_heap(I first, S last, Comp comp = {}, Proj proj = {}); ...
TEST
0.991248
7.531446
4abd7d09-a7b3-4421-8d2a-49cf1fc30987
numbqq/opencv
samples/cpp/watershed.cpp
#include <opencv2/core/utility.hpp> #include "opencv2/imgproc.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" #include <cstdio> #include <iostream> using namespace cv; using namespace std; static void help(char** argv) { cout << "\nThis program demonstrates the famous watershed segmentation ...
ALGO
0.996088
6.151807
e00dc9bd-50cc-4b20-ab14-185ea0b93618
lekhamohan/algorithms
Stack/stack.cpp
#include<stdio.h> #include<iostream> using namespace std; class TwoStack { int topBeg; int topEnd; int *arr; int size; public: TwoStack(int n) { size = n; arr = new int[size]; topBeg = -1; topEnd = size; } void pushBeg(int num) { if(topBeg < topEnd-1) { topBeg++; arr[topBeg] = num; } ...
ALGO
0.99703
3.767386
0ac3478d-0644-4129-96f6-b59d1fe5e748
Nakib-Arman/CSE318---ArtificialIntelligence
3.ChainReaction/.history/main_20250609234734.cpp
#include <bits/stdc++.h> using namespace std; class Cell { int orb_num; int critical_mass; char color; public: Cell() { this->orb_num = 0; this->color = 'W'; this->critical_mass = 4; } // Cell(int orb_num, char color) { // this->orb_num = orb_num; // t...
ALGO
0.998879
4.431004
3cab6ac6-e680-4424-9b2f-5d82009704c5
jeremykvlim/kattis
open/hilldriving.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { double a, b, vmax, f; int R; cin >> a >> b >> vmax >> f >> R; vector<double> dist(R), slope(R); for (int i = 0;...
ALGO
0.999888
4.502631
450475a3-d036-4902-9d9d-75cf4527ca45
PieterVanHolm/IONLAB
src/modules/fw_att_control/fw_roll_controller.cpp
/** * @file fw_roll_controller.cpp * Implementation of a simple roll P controller. */ #include "fw_roll_controller.h" #include <float.h> #include <lib/geo/geo.h> #include <mathlib/mathlib.h> float RollController::control_roll(float roll_setpoint, float euler_yaw_rate_setpoint, float roll, float pitch) { /* Do not...
ALGO
0.88428
5.57717
9175de94-d239-4b96-a9d0-0b0624c996f4
WeiguangTWK/PartyMemberManagement
Project3/类实现-manager.cpp
#ifdef _HAS_STD_BYTE #undef _HAS_STD_BYTE #endif // _HAS_STD_BYTE #define _HAS_STD_BYTE 0 #include"ȫֱ洢.h" #include"ļȡ.h" #include"disp.h" #include"-.h" #include"-ɾ.h" #include"-.h" #include"-.h" #include<Windows.h> #include<string> using namespace std; //================================================================...
TOOL
0.873584
3.081834
1b007143-dc96-4fce-ba07-1bfd46f43a82
fsrt16/Trees
preorder inorder BST construction.cpp
#include <iostream> #include<cstring> #include<string> #define TRUE 1 #define FALSE 0 using namespace std; struct btreenode { btreenode *leftchild ; int data ; btreenode *rightchild ; } *root ; void insert ( btreenode **sr, int num ) { if ( *sr == NULL ) { *sr = new btreenode ; ( *sr ) -> leftchild...
ALGO
0.999758
3.429479
664dc1db-4e8f-4e10-b15d-539f0c2e4067
RemInstant/MAI_numerical_methods
task3.3/main.cpp
#include <iostream> #include <iomanip> #include <vector> #include <limits> #include <cmath> #include <numbers> #include <format> #include <algorithm> #include <checks.h> #include <polynomial.h> #include <algorithms.h> double calc_quadratic_error( polynomial approximate_polynomial, std::vector<double> points, ...
ALGO
0.996356
4.383711
af6d8ede-14e7-4f45-8d71-e7c2a8846a92
zhongfq/cocos-lua
frameworks/3rd/glsl-optimizer/src/glsl/lower_variable_index_to_cond_assign.cpp
/** * \file lower_variable_index_to_cond_assign.cpp * * Turns non-constant indexing into array types to a series of * conditional moves of each element into a temporary. * * Pre-DX10 GPUs often don't have a native way to do this operation, * and this works around that. * * The lowering process proceeds as foll...
ALGO
0.997598
7.510715
3f5e0601-788c-4de3-a30d-2fdc555d7ad5
AmanYadav038/DSA-with-CPP
sortings algos/insertion.cpp
#include<iostream> using namespace std; int main(){ int n=6; int arr[n]={12,31,25,8,32,17}; for (int i=1;i<=n-1;i++){ int temp=arr[i]; for (int j=i-1;j>=0;j--){ if(arr[j]>temp){ arr[j+1]=arr[j]; arr[j]=temp; } } } for (i...
ALGO
0.999833
3.101749
b6bd4c3d-c8c8-4634-bf39-2a3d72a5fd24
inholeegithub/summer2022
MPI/MPI_day1_2022/MPI_Tutorial_1.cpp
// MPI_Tutorial_1.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include "mpi.h" using namespace std; /* The goal of this program is to let the user input a number, then calculate the sum 1+2+3+....user inputted number. The last number is included. For example,...
ALGO
0.998338
4.860095
bb4ca0b0-b67c-4512-a2e1-ea0e81c33ae0
noko206/AtCoder
abc/301-350/339/a.cpp
// clang-format off #include <bits/stdc++.h> using namespace std; #if __has_include(<atcoder/all>) #include <atcoder/all> using namespace atcoder; #endif #define _overload3(_1,_2,_3,name,...) name #define _REP(i,n) REPI(i,0,n) #define REPI(i,a,b) for(int i=int(a);i<int(b);++i) #define REP(...) _overload3(__VA_ARGS__,R...
ALGO
0.999826
3.960187
1e397472-6751-4f3d-b87e-bcc1dfc66689
aiviaghost/Kattis_solutions
Open-Kattis/factstone.cpp
#include <bits/stdc++.h> using namespace std; #define INF 1e9 using pii = pair<int, int>; using pdd = pair<double, double>; auto gen_map() -> unordered_map<int, int> { unordered_map<int, int> answers; int year = 1960, i = 2; double log_fact = 0; while (year <= 2160) { log_fact += log2(i); ...
ALGO
0.999429
4.346106
bda064ad-3477-4403-ba1d-dd24ed3cc4a4
ishandutta2007/codeforces
skywalkert/normal/699/D.cpp
#include <map> #include <set> #include <list> #include <queue> #include <cmath> #include <vector> #include <cstdio> #include <string> #include <cstdlib> #include <cstring> #include <algorithm> using namespace std; const int maxn = 200010; int n, a[maxn], fa[maxn], ans; bool vis[maxn]; int find(int x) { return x == fa[...
ALGO
0.999979
3.647074
49b330f3-e0da-4a34-aa76-99e981f6187d
Mangoo0110/candypos
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
601afd0c-5c0b-4207-80ed-7c5a4e8cb85b
RodrigoRossetti/URI-OJ
Volume 13 (1300 - 1399)/1375/1375.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n && n != 0) { int i, key = 0, x = 0, y = n, c[n], p[n], ini[n]; memset(ini, 0, sizeof(ini)); for (i = 0; i < n; ++i) { cin >> c[i] >> p[i]; if (p[i] >= x && p[i] < y) ...
ALGO
0.999715
3.606308
980486b2-333d-431f-ad59-8020ed8f9ae9
ishandutta2007/codeforces
galen_colin/normal/1272/D.cpp
#include <bits/stdc++.h> #include <chrono> using namespace std; using namespace std::chrono; // #pragma GCC target ("avx2") // #pragma GCC optimization ("O3") // #pragma GCC optimization ("unroll-loops") // #pragma optimization_level 3 // #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3") ...
ALGO
0.999934
4.198153
ecbcbc89-0e91-4c6a-b031-156cf4135fed
HuynhTrinhPhuocLoi/huynhtrinhphuocloi_monC
c6/Programming Challenges_6.18.cpp
#include <iostream> using namespace std; const int NUM_JUDGES = 5; // Số lượng giám khảo // Hàm yêu cầu người dùng nhập điểm của giám khảo và xác thực nó void getJudgeData(double &score) { do { cout << "Nhập điểm của giám khảo: "; cin >> score; if (score < 0 || score > 10) { co...
ALGO
0.999368
6.351953
9496c08c-c40b-487e-90a7-6234f193609c
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_11698_21.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, d[3] = {0}, a, b, c; cin >> n; for (int i = 0; i < n; i++) { cin >> a >> b >> c; d[a] += b - c; } cout << ((d[1] >= 0) ? "LIVE" : "DEAD") << endl; cout << ((d[2] >= 0) ? "LIVE" : "DEAD") << endl; return 0; }
ALGO
0.999889
3.964304
2c5a9aec-b80f-4e02-a756-73889352d4bc
zxy9815/Model_Predictive_Control
Ipopt-3.12.7/Ipopt/src/Algorithm/IpStdAugSystemSolver.cpp
#include "IpStdAugSystemSolver.hpp" #include "IpDebug.hpp" #include "IpCompoundSymMatrix.hpp" #include "IpCompoundVector.hpp" #include "IpSumSymMatrix.hpp" #include "IpDiagMatrix.hpp" #include "IpIdentityMatrix.hpp" // ToDo: Remove below here - for debug only #include "IpTripletHelper.hpp" // ToDo: Remove above here ...
ALGO
0.999085
5.765891
2f1a5f68-fc10-4c76-820b-0d515d599e08
Tianyuyuyuyuyuyu/TByd
TByd.Framework.HybridCLR/HybridCLRData/LocalIl2CppData-WindowsEditor/il2cpp/libil2cpp/vm-utils/NativeSymbol.cpp
#include "il2cpp-config.h" #include "il2cpp-class-internals.h" #include "os/Environment.h" #include "os/File.h" #include "os/Image.h" #include "os/Initialize.h" #include "os/LibraryLoader.h" #include "os/Locale.h" #include "os/Path.h" #include "NativeSymbol.h" #include "utils/Collections.h" #include "utils/PathUtils.h...
TOOL
0.93204
7.288784
54a4a69b-bec8-4e25-966d-f83d928f6ee4
Rishi-negi/DSA-Questions
LinkedList-2/FindaNodeInLL(recursive).cpp
/**************************************************************** Following is the class structure of the Node class: class Node { public: int data; Node *next; Node(int data) { this->data = data; this->next = NULL; } ...
ALGO
0.999963
5.054475
5b309929-6ff8-478f-b6d3-47720b6a7b71
nqmcl2735/DSU
proD.cpp
//ngqminh.cl2735 #include <bits/stdc++.h> #define PB push_back #define pii pair <int,int> #define vi vector <int> #define F first #define S second #define reset(x) memset(x,0,sizeof(x)) #define sz(x) int(x.size()) #define mp make_pair #define maxn 300005 #define MOD #define Task "proD" using namespace std; ifstream fi(...
ALGO
0.999998
4.193814
041acd06-b4d8-4163-820c-5426e56b55fc
doldam42/DoldamEngine
include/bullet/BulletDynamics/Featherstone/btMultiBodyGearConstraint.cpp
///This file was written by Erwin Coumans #include "btMultiBodyGearConstraint.h" #include "btMultiBody.h" #include "btMultiBodyLinkCollider.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" btMultiBodyGearConstraint::btMultiBodyGearConstraint(btMultiBody* bodyA, int linkA, btMultiBody* bodyB, int li...
ALGO
0.963101
6.460514
ad6d28f3-1097-462c-bbe5-eb8a6f2771f0
wissem18/LeetCode-Solutions
1963-minimum-number-of-swaps-to-make-the-string-balanced/1963-minimum-number-of-swaps-to-make-the-string-balanced.cpp
class Solution { public: int minSwaps(string s) { int n = s.size(); int cnt = 0; for (int i = 0; i < n; ++i) { if (s[i] == '[') { cnt++; } if (s[i] == ']') { if (cnt) cnt--; } } int ans = (cnt + 1) / 2; return ans; } };
ALGO
0.999652
5.792789
d3925974-10eb-4820-825e-daf5f7bcccf9
prakhar-5447/dsa_leetcode
search_in_2_d_matrix.cpp
// https://leetcode.com/problems/search-a-2d-matrix/description/ #include <iostream> #include <vector> using namespace std; class Solution { public: bool searchMatrix(vector<vector<int>> &matrix, int target) { int n = matrix.size(); int m = matrix[0].size(); int st = 0; int e...
ALGO
0.999955
6.233036
af7295db-a40d-40ba-9bc3-431523fff094
yitati/LCProject
Leetcode/LargestDivisibleSubsets.cpp
/****************************************************************************** * Question: #368 Largest Divisible Subsets * Given a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of * elements in this subset satisfies: Si % Sj = 0 or Sj % Si = 0. * If there are multiple sol...
ALGO
0.999833
4.911043
4bf158d8-550e-4f25-a7f3-76130d71e98e
AhmedEzzatG/competitiveProgramming
DPproblems/22-MaximumSumSubsequence.cpp
#include<bits/stdc++.h> #include<unordered_map> #include<unordered_set> using namespace std; #define endl "\n" #define oo 0x3f3f3f3fLL #define OO (oo*oo) #define sz(s) (int)(s.size()) #define RT(s) return cout<<s,0 #define all(v) v.begin(),v.end() #define allr(s) s.rbegin(),s.rend() #define clr(v,val) memset(v,val,size...
ALGO
0.999985
4.745552
a6ae0662-2904-432c-a0f9-73cba109afcd
ishandutta2007/codeforces
couplefire/normal/917/C.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1<<8; int x,n,k,q,at[N],c[25],p[25],w[25]; vector<int>v; map<int,int>mp; struct matrix{ long long mat[N][N]; matrix(){ for(int i = 0;i < v.size();i++) for(int j = 0;j < v.size();j++) mat[i][j] = 1e18; } void I(){for(int i = 0;i < v.size();i++)mat[...
ALGO
0.999936
3.377465
7595703d-9184-4791-9643-299a2f751089
vamcrizer/cpp-ptit
long/TapHop_NTo_CungNhau.cpp
// LonggVu. #include<bits/stdc++.h> using namespace std; using ll = long long int; using ld = long double; using str = string; ll gcd(ll a, ll b){ if(b==0) return a; return gcd(b, a%b); } int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while(t--){ ll n, m; cin >> n >> m; ll...
ALGO
0.999978
5.282086
15b51ffe-4925-4669-86d4-0ebdfc45c4f9
omlahamage21/Logic-Building
program186.cpp
#include<iostream> using namespace std; class Arithematic { public: int iValue1; int iValue2; Arithematic(int A, int B) { iValue1 = A; iValue2 = B; } int Addition() { int iResult = 0; iResult = iValue1 + iValue...
ALGO
0.973594
4.382384
08f8da1b-6613-482f-a58d-bab23360643d
pranav-20055/Cryptography-Network-Security
CBC MAC.cpp
#include <stdio.h> #include <string.h> #define BLOCK_SIZE 8 void xorBlocks(char *block1, char *block2, char *result) { for (int i = 0; i < BLOCK_SIZE; i++) { result[i] = block1[i] ^ block2[i]; } } void cbc_mac(char *key, char *message, char *mac) { char iv[BLOCK_SIZE] = {0}; // Initialization ve...
ALGO
0.9949
5.374422
fde36e67-2bd6-48e2-80a9-e17a9a979a0e
intel/ai-reference-models
models_v2/pytorch/maskrcnn/training/cpu/maskrcnn-benchmark/maskrcnn_benchmark/csrc/cpu/ROIAlign_cpu.cpp
// implementation taken from Caffe2 template <typename T> struct PreCalc { int pos1; int pos2; int pos3; int pos4; T w1; T w2; T w3; T w4; }; template <typename T> void pre_calc_for_bilinear_interpolate( const int height, const int width, const int pooled_height, const int pooled_width,...
DATA
0.979572
6.734262
38b74ce3-2f7b-4686-b145-e610f3028923
Nakib-Arman/CSE318---ArtificialIntelligence
4.DecisionTree/.history/a_20250710121006.cpp
#include<bits/stdc++.h> using namespace std; class Node { int column_num; string label; unordered_map<string,Node*> children; float threshold; public: Node(int column_num){ this->column_num = column_num; this->label = ""; this->threshold = 0; } Node(string labe...
ALGO
0.997675
4.351235
856b4c48-264e-4bbb-b192-9aa24c70298d
Class-17/Programming_Contest_Challenge
Chapter.2/POJ.2395.Out_of_Hay.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxv = 2e3; const int maxe = 1e4; struct edge { int a, b, w; bool operator < (const edge &x) const { return w < x.w; } } es[maxe]; int dsu[maxv + 1]; int find(int x) { if (dsu[x] < 0) return x; retur...
ALGO
0.999963
4.703398
fccdfc15-70f5-4d09-8671-4ba950c01c44
goodgec/collision-detection
src/quadtree.cpp
#include "quadtree.h" #include "constants.h" Quadtree::Quadtree(int levelIn, double nwXIn, double nwYIn, double seXIn, double seYIn) { level = levelIn; maxParticles = MAX_PARTICLES_PER_LEVEL; maxLevels = MAX_LEVELS; nwX = nwXIn; nwY = nwYIn; seX = seXIn; ...
ALGO
0.989833
5.229836
933ffde7-b4d9-418c-bd17-23c1227af639
berneylin/LeetCode2019Spring
1456/max_vowels.cpp
#include<string> using namespace std; class Solution { public: inline int isVowel(char c){ return (c=='a' || c=='e' || c=='i' || c=='o' || c=='u')?1:0; } int maxVowels(string s, int k) { int ans = 0; int sLen = s.length(); int lhs = 0, rhs = 0; int curCnt = 0; ...
ALGO
0.999988
5.692901
9480a04b-2b5b-47bf-9c45-19551d3be382
Deepti675/Leet_Code
daily_challenge/Number of Islands.cpp
https://leetcode.com/problems/number-of-islands/ class Solution { public: void bfs(int r, int c, vector<vector<int>>&vis,vector<vector<char>>&grid){ int n=grid.size(); int m=grid[0].size(); vis[r][c]=1; queue<pair<int,int>>qu; int offsets[]={0,1,0,-1,0}; qu.push({r,c}...
ALGO
0.9999
6.394481
7dea08ec-7c6e-4f5d-8c10-43ec27f746e5
mariahavalos/Scope-Quantifier-Ambiguity
supervised.cpp
#include <iostream> using std::cout; using std::endl; #include <string> using std::string; using std::stol; #include <fstream> using std::ifstream; #include <vector> using std::vector; #include <algorithm> using std::transform; using std::find; #include <map> using std::map; using std::pair; using std::multimap; #inc...
TOOL
0.878596
3.690482
89e1b914-5656-43cf-a458-23616371a999
samuka7abr/IDP
3_semestre/IDP-TPAA-2025.1/A1/listas_casa/lista3(remake)/06/F.cpp
#include <bits/stdc++.h> using namespace std; bool compare(const pair<string, string> &player1, const pair<string, string> &player2){ /*essa função serve de condição de ordenação. se o p1.second(tempo) for diferente do p2, retorna o p1.second sendo maior que o p2 em booleano. ou seja: se o p2 for maior...
ALGO
0.999746
4.953817
813554ab-b17c-4779-9bd7-836d5c428059
aadil-srivastava01/ds-algo24
problems/arrayOfProd.cpp
/* Problem Statement: Write a function that takes in a non-empty array of integers and returns an array of the same length, where each element in the output array is equal to the product of every other number in the input array. In other words, the value at output [i] is equal to the product of every number in the inpu...
ALGO
0.999967
6.479621
5fc6570a-d3d9-46e2-a36e-b56c20d42fb3
KolotVadym/Programing-Essentials-in-C-
Chapter 2/Lab 2.9/Lab 2.9.3/Исходный код.cpp
#include <iostream> using namespace std; int main(void) { int vector[] = { 1, 7, 3, 8, 3, 7, 1 }; bool ispalindrome = true; int n = sizeof(vector) / sizeof(vector[0]); for (int i = 0; i < n; i++) { if (vector[i] != vector[n - 1 - i]) ispalindrome = false; } if (ispalindrome) cout << "It's a palindrome"; ...
ALGO
0.998592
3.947727
698b88a4-148f-4a21-ba0b-2502a4fe97d0
just-kitkat/Competitive-Programming
Codeforces/Contests/981d3/b.cpp
// Author: JustKitkat // Status: AC #include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> using namespace std; // #pragma GCC optimize("O3,unroll-loops") // #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #define int long long #define el "\n" #define arr array ...
ALGO
0.999981
4.45367
3a233cf1-1e09-4e0d-964c-a6dfc40d0af8
yfuka86/pc
sandbox/arc000/d/d.cpp
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> #define rep(i,n) for(ll i=0;i<(ll)(n);i++) #define rep_r(i,n) for(ll i=(ll)(n)-1;i>=0;i--) #define rep2(i,sta,n) for(ll i=sta;i<(ll)(n);i++) #define rep2_r(i,sta,n) for(ll i=(ll)(n)-1;i>=sta;i--) #define all(v) (v).begin(),(v).end() #define pb push_back #define mp ...
ALGO
0.999957
3.769469
c9273c5e-ddb4-4530-bda8-73460bdba997
victorzappi/LDSP
examples/Instruments/LDSPowl_delay/render.cpp
#include "LDSP.h" #include "libraries/Biquad/Biquad.h" #include <vector> #include <cmath> float max_delay = 0.5; // [s] // initial delay time float delay = 0.3; // [s] // declare variables for circular buffer std::vector<float> gDelayBuffer; int gWritePointer = 0; int gReadPointer = 0; const float G=9.8; // float a...
ALGO
0.98471
4.235574
6935d8d9-e11c-47c1-a7e7-a193b862a4f6
doomsday861/Allofit
countingroomscses.cpp
/** * counting rooms cses **/ #include<bits/stdc++.h> #define ll long long #define testcase ll t;cin>>t;while(t--) using namespace std; char adj[10000][10000]; bool vis[10000][10000]; ll m,n; ll row[] = {0,0,-1,1}; ll col[] = {-1,1,0,0}; struct cord { ll x; ll y; }; struct point { cord pt; }; bool val(ll r, ll c) ...
ALGO
0.999639
4.142937
e54c0638-3b1e-4203-aabd-1e62df9d35e7
Shishir335/trStore
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
7767ed70-50f2-4a51-b665-6be5b2e0730d
geziangfinn/easyPlace
Library/eigen-git-mirror/doc/examples/tut_arithmetic_redux_basic.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; int main() { Eigen::Matrix2d mat; mat << 1, 2, 3, 4; cout << "Here is mat.sum(): " << mat.sum() << endl; cout << "Here is mat.prod(): " << mat.prod() << endl; cout << "Here is mat.mean(): " << mat.mean() ...
ALGO
0.999146
3.872858
cbfc42d1-95bd-4a71-9a61-ada575221d5d
ndungudedan/descope-tutorial
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
02976919-60ef-4183-9804-13b96f307165
ruLegen/SLAM3D-Video
app/src/main/cpp/thirdparty/orb3slam/Thirdparty/eigen/bench/sparse_lu.cpp
// g++ -I.. sparse_lu.cpp -O3 -g0 -I /usr/include/superlu/ -lsuperlu -lgfortran -DSIZE=1000 -DDENSITY=.05 && ./a.out #define EIGEN_SUPERLU_SUPPORT #define EIGEN_UMFPACK_SUPPORT #include <Eigen/Sparse> #define NOGMM #define NOMTL #ifndef SIZE #define SIZE 10 #endif #ifndef DENSITY #define DENSITY 0.01 #endif #ifnd...
ALGO
0.999246
4.187482
c2843cbc-bd67-4f32-9168-5c568519f57a
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_4502_20.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; cout << ceil(n / 2) - 1 << endl; } return 0; }
ALGO
0.999852
5.130442
c7644a0c-0720-448c-a1d1-98957beb2211
kendriyavid/Algorithms
PrefixSum/subdivisibility.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; vector<int> vec(n); for(int i=0;i<n;i++){ cin>>vec[i]; } int tc=0; map<int,int> mp; mp[0]=1; int prefix=0; for(int i=0;i<n;i++){ prefix+=vec[i]; int remainder = prefix%n; if(...
ALGO
0.999887
3.921884
99f29fa5-212a-4e86-a2d6-f14db0160582
User-yp/Algo_DA
searching/hashing_search.cpp
#include "../utils/common.hpp" /* 哈希查找(数组) */ int hashingSearchArray(unordered_map<int, int> map, int target) { // 哈希表的 key: 目标元素,value: 索引 // 若哈希表中无此 key ,返回 -1 if (map.find(target) == map.end()) return -1; return map[target]; } /* 哈希查找(链表) */ ListNode *hashingSearchLinkedList(unordered_map<i...
ALGO
0.999848
5.32124
53c07121-b796-4aeb-9805-579da7843bb4
ranasl62/UVA_SOLVE
GoodBye2016c.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; int m=0; int d,c; cin>>n; n--; int a=0; cin>>c>>d; if(1==d) m=1901+c; else m=1899+c; if(n==0 && c<0 && d==1) { a=2; } while(n--) { cin>>c>>d; if(1==d && m>=190...
ALGO
0.999922
3.547775
5942d7d6-c40f-4980-b09c-f0b77d4f1970
walkerwzy/walker_jupyter_lab
deepblue/05.20.cpp/cpp_base.cpp
#include <iostream> using namespace std; #include <list> int main(){ list<int> a(5); int b[6] = {10, 20, 30, 10, 10, 10}; a.assign(b, b+5); // 10, 20, 30, 10, 10 cout << a.size() << endl; // 5 a.reverse(); // 10 10 30 20 10 for (list<int>::iterator i = a.begin(); i!=a.end(); i++){ ...
ALGO
0.97792
3.858942
614ff830-c40f-44c4-a604-24b64a4b1f3d
joan12222/algorithme
luogu/luogu-P1434.cpp
#include<bits/stdc++.h> using namespace std; int n,m,a[105][105],f[105][105]; int dx[]={0,0,1,-1}; int dy[]={1,-1,0,0}; int dfs(int x,int y){ if(f[x][y]!=-1) return f[x][y]; int maxx=1; for(int i=0;i<4;i++){ int nx=x+dx[i]; int ny=y+dy[i]; if(nx>=1&&nx<=n&&ny>=1&&ny<=m&&a[nx][ny]<a[x][y]) maxx=max(maxx,dfs(nx,...
ALGO
0.999976
4.44805
02c7ff0b-62b5-4f3f-993d-74c062d59c6e
buniatyann/Hackerrank
One Month Preparation/Week3/SimpleTextEditor.cpp
#include <string> #include <iostream> #include <algorithm> #include <stack> /* Time O(n * m) Space O(n * m) where n is the number of operations and m is the average length of the string at each step */ int main() { // Initialize an empty string std::string s = ""; // Create a stack to store th...
ALGO
0.998336
6.917061
5fd8c5a6-965f-4ea5-a35c-2f1d8c35fe7d
Filippini-Fiorentini/base_FF
BASE_FEM/src/fem_2d_solver.cpp
#include "fdm_2d_solver.hpp" namespace fdm { Fdm_2d_solver::Fdm_2d_solver(Mesh_2d m, Real_function_2d f1, Real_function_2d g1): mesh(m), f(f1), g(g1), exact(function_2d_0()), have_exact(false), A(mesh.get_n_nodes(),mesh.get_n_nodes()), b(mesh.get_n_nodes(),1), A_assembled(false), b_assembled(false) {} Fdm_2d_so...
ALGO
0.99955
5.26791
e29c3852-0465-4262-bf9e-ea0357e8bb4e
Ayush05G/Cpp_DSA
Data Structures & Algorithms/LinkedList/MegaClass-28-Jul-2024/2. 2. Add Two Numbers.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 *iterative(L...
ALGO
0.999976
6.28701
07fd6e7e-a2d7-4f45-8f72-f6d8f836e405
immortalmin/ZOJ
2970.cpp
#include<iostream> #include<vector> #include<algorithm> #include<fstream> using namespace std; vector<int>v; bool myComp1(const int&a,const int&b) { return a<b; } bool myComp2(const int&a,const int&b) { return a>b; } int main() { //freopen("1.txt","r",stdin); int n; while(cin>>n) { while(n--) { int m,a; ...
ALGO
0.999488
3.446606
7ecf91a7-1a2b-48ac-ad1b-465ea3d2a9b0
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Phi/top0-100/find-products-of-elements-of-big-array-Solution.findProductsOfElements/177832_nan.cpp
walk_string(fz_context *ctx, int uni, int remove, editable_str *str) { int rune; if (str->utf8 == NULL) return; do { char *s = &str->utf8[str->pos]; size_t len; int n = fz_chartorune(&rune, s); if (rune == uni) { /* Match. Skip over that one. */ str->pos += n...
ALGO
0.998903
5.086908
5fb608a5-aa4e-48c8-829e-14f032f43c03
kmjp/procon
codeforce/edu/121-160/143/f.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define ...
ALGO
0.999879
4.676341
98244a1b-8737-4762-96bd-507a5f0e3aae
kaswtr09/Codeforces
490A. Team Olympiad.cpp
#include<bits/stdc++.h> using namespace std; int n, a[100001], c; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> n; vector <int> pr, m, pe; for (int i = 1; i <= n; i++){ cin >> a[i]; if (a[i] == 1) pr.push_back(i); else if (a[i] == 2) m.push_back(i); else if (a[i...
ALGO
0.999845
3.428126
57e419f9-3ebc-4fb4-8a50-86924b2d7cd7
sagsango/cp
code/cses/solution/1636 - Coin Combinations II.cpp
/* Problem Name: Coin Combinations II Problem Link: https://cses.fi/problemset/task/1636 Author: Sachin Srivastava (mrsac7) */ #include<bits/stdc++.h> using namespace std; template<typename... T> void see(T&... args) { ((cin >> args), ...);} template<typename... T> void put(T&&... args) { ((cout << args << " "), ...);}...
ALGO
0.999982
4.317434
d8a7bfd8-4dd1-42d8-bcb1-667cec5de8b2
oddcard2/codeforces
educational/7/E/main.cpp
#include "bits/stdc++.h" using namespace std; typedef long long ll; vector<int> used; vector<vector<int>> g; int d = 0; //depth int l1cnt = 0; vector<vector<int>> leafs; vector<vector<int>> timev; function<void(int)> dfs = [&](int v) { used[v] = 1; int cd = d++; if (cd == 1) { leafs.push_back({}); } in...
ALGO
0.999223
4.499648
14a00523-7c7c-42a8-b629-35c5b24a62a1
Garvit/code-backup
codechef/sep 13 long/leexams.cpp
#include<iostream> #include<set> #include<utility> #define ld long double using namespace std; int num[51][2]; ld prob[51]; ld func(pair<set<int>,ld> p,int i,int n) { if(i==n) return p.second; set<int> s=p.first; ld val1,val2; if(s.find(num[i][0])!=s.end()) val1=0; else{ s.insert(nu...
ALGO
0.999718
3.537172
0529acbf-5b2c-4279-a142-ea1873ec15e3
JosEduardoEFilho/Faculdade_ED_2023
Aula100323/Funcao04/main.cpp
#include <iostream> using namespace std; int obtem_valor() { int valor; cout << "Entre um valor: "; cin >> valor; return valor; } int main() { int a, b; a = obtem_valor(); b = obtem_valor(); cout << "Soma = " << a + b << endl; }
TOOL
0.876736
3.838165
b6a74802-57a7-4af7-aaae-d9a6592ad73c
boostpro/boost-release
libs/graph/test/bellman-test.cpp
// From Louis Lavery <<EMAIL>> /*Expected Output:- A: 0 A B: 11 A Actual Output:- A: 0 A B: 2147483647 B */ #include <iostream> #include <iomanip> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/bellman_ford_shortest_paths.hpp> #include <boost/cstdlib.hpp> #include <boost/test/minimal.hpp> int t...
ALGO
0.999204
5.678792
0a7e9f7a-0f4a-4147-9a10-163c2c870d1a
yuyou0221/UE427
Engine/Source/Programs/HeadlessChaos/Private/HeadlessChaosTestCollisions.cpp
#include "HeadlessChaosTestCollisions.h" #include "HeadlessChaos.h" #include "HeadlessChaosCollisionConstraints.h" #include "Chaos/GJK.h" #include "Chaos/Pair.h" #include "Chaos/PBDRigidsEvolution.h" #include "Chaos/PBDRigidParticles.h" #include "Chaos/PBDCollisionConstraintsPGS.h" #include "Chaos/CollisionResolutionT...
TEST
0.860427
6.430792
d405e470-1baa-4612-b32e-5eb50122b1f8
wridzer/Grad_HKU
godot-4.4-dev3/thirdparty/misc/pcg.cpp
#include "pcg.h" uint32_t pcg32_random_r(pcg32_random_t* rng) { uint64_t oldstate = rng->state; // Advance internal state rng->state = oldstate * 6364136223846793005ULL + (rng->inc|1); // Calculate output function (XSH RR), uses old state for max ILP uint32_t xorshifted = ((oldstate >> 18u) ^ oldst...
ALGO
0.899803
6.352406
38047efd-12ab-4e32-8bd3-5e838deedc87
AjajAlam1399/Leetcode-Aj
1885-count-number-of-homogenous-substrings/count-number-of-homogenous-substrings.cpp
class Solution { using ll=long long int; int mod=1e9+7; public: int countHomogenous(string s) { int i=-1,j=-1; int n=s.size(); ll ans=0; unordered_map<char,int>map; while(true){ bool f1=false; bool f2=false; while(i<n-1){ ...
ALGO
0.999998
5.560661