uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
b8ce0df9-dec8-4827-b1dd-6011f92d7343
WUSTL-CSPL/Gecko
lib_llvmpass/bp_compartment/link_lib/libsecsen.cpp
#include <stdlib.h> #include <fstream> #include <vector> #include <sys/types.h> #include <unistd.h> #include <sys/syscall.h> #include <chrono> #include <time.h> #include <set> #include <vector> #include <functional> #define BATCHSIZE 5 #define BBCOUNT 300000 #define SFCOUNT 40 #define gettid() ((pid_t)syscall(SYS_ge...
DATA
0.897975
3.636619
56e52f2e-b184-4e2c-b4b4-b00c41fd6093
genome-vendor/deFuse
tools/HierarchicalClusterer.cpp
/* * HierarchicalClusterer.cpp * * Created by Andrew McPherson on 1/27/10. * */ #include "HierarchicalClusterer.h" #include <iostream> #include <vector> #include <list> #include <boost/bimap/bimap.hpp> #include <boost/bimap/multiset_of.hpp> #include <boost/bimap/unordered_set_of.hpp> using namespace std; usin...
ALGO
0.999811
5.963518
ff2add94-5da7-4c24-b49e-58e78654c750
dusagong/Algorithm
LeetCode/367.cpp
class Solution { public: bool isPerfectSquare(int num) { int x = num; for(long long i = 1; i <= x;i++ ){ if(i * i == x){ return true; } else if( i * i > x)break; } return false; } };
ALGO
0.999855
5.476683
d8908f24-d557-47ce-96c5-996ca1197be9
embecosm/agc-llvm-project
clang-tools-extra/clangd/URI.cpp
#include "URI.h" #include "support/Logger.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/Twine.h" #include "llvm/Support/Error.h" #include "llvm/Support/Path.h" #include <algorithm> LLVM_INSTANTIATE_REGISTRY(clang::clangd::URISchemeRegistry) namespace clang { namespace clangd { namespace { bool isWindowsPa...
TOOL
0.88696
7.54393
1eda8d40-37eb-496c-9325-62ca6b5175ff
Sharafabdullah/CompetitiveProgramming
contests/B/KuriyamaStones.cpp
#include <bits/stdc++.h> using namespace std; #include <sstream> #define all(v) ((v).begin()), ((v).end()) #define sz(v) ((int)((v).size())) #define clr(v, d) memset(v, d, sizeof(v)) #define rep(i, v) for (int i = 0; i < sz(v); ++i) #define lp(i, n) for (int i = 0; i < (int)(n); ++i) #define lpi(i, j, n) for (int i =...
ALGO
0.999955
4.234393
8db78bd7-6e00-47f7-8512-26212aff0d00
sumitt194/Codeforces-Solutions
Codeforces/A_Find_The_Array.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int t; cin >> t; while (t--) { ll s; cin >> s; int zola = 1; //will do double x = sqrt(s); cout<<ceil(x)<<endl; } } return 0; }
ALGO
0.99951
3.649901
eed68d64-d8b1-49d1-ab27-707478bae722
henrybear327/CCU-2017-Spring-Compiler
hw6/QuestionB/S.cpp
double *S() { Node *Lnptr, *Rnptr; Node *res; switch (token) { case 0: case 1: Lnptr = L(); Rnptr = R(); res = Rnptr; res.val = Lnptr.val + Rnptr.val / Rnptr.base; break; case '$': res = mknode(1, 0); break; default: error(); ...
TOOL
0.969379
3.617763
13873729-a95f-4c2a-84e3-7730795608bb
OluwaseunOjeleye/Real-Time-Human-Gender-Detection
Gender_Detection_GPU/src/rnn_layer.cpp
#include "rnn_layer.h" #include "connected_layer.h" #include "utils.h" #include "cuda.h" #include "blas.h" #include "gemm.h" #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> static void increment_layer(layer *l, int steps) { int num = l->outputs*l->batch*steps; l->output += num; ...
ALGO
0.993953
5.861053
a43fe8ca-4314-425f-b4fb-ef39053b0c79
milanow/LeetCodePractice
400+/420_Strong_Password_Checker.cpp
/* 420. Strong Password Checker * The problem is REALLY hard, it take me long to figure out how this solution works. * * The key is to find out which operation is the most efficient: Replace * Let's divide the problem into three conditions: * 1. lengthof(s) <= 6 * 2. 6 < lengthof(s) <= 20 * 3. lenthof(s) > 20 ...
ALGO
0.99881
6.236515
8abd0c4f-4914-47ed-8cb5-dc97d8bc18fe
tsiarokhin/bsu-famcs-cs-solutions
Term1/Week03/3/main.cpp
#include <iostream> using namespace std; int gcd(int a, int b) { while ((a %= b) && (b %= a)); return a | b; } int main() { int n; cout << "Week #3, Task #3.\nAssuming that only proper fractions are required\n"; cin >> n; for (int i = 2; i < n; i++) { for (int j = 1; j < i; j++) ...
ALGO
0.997219
4.219253
df3767eb-12ee-4f1e-b94c-1ecafe8f6f30
chaohona/redis-proxy
src/thirdparty/rocksdb/third-party/folly/folly/detail/Futex.cpp
#include <folly/detail/Futex.h> #include <folly/portability/SysSyscall.h> #include <stdint.h> #include <string.h> #include <array> #include <cerrno> #include <folly/synchronization/ParkingLot.h> #ifdef __linux__ #include <linux/futex.h> #endif #ifndef _WIN32 #include <unistd.h> #endif using namespace std::chrono; ...
TOOL
0.904539
7.627037
2333217c-91cc-416c-aa03-d2d72e4ff455
avinash6817/OOPs-Using-CPP-LAB
virtual_function.cpp
// concept of Virtual Functions #include<iostream> using namespace std; // This is base class class Parent { public: // virtual function preceded by virtual keyword virtual void print(){ cout << "print Parent class\n"; } void show(){ cout << "show Parent class\n"; } }; // This is derived class class ...
TOOL
0.906509
5.884472
d4ade41c-5ef9-4ea7-9d6f-83743eff70b6
Premkumar981/DSA_Daily_Problems
program to maintain a student roster using a singly linked list.cpp
#include <iostream> #include <string> using namespace std; class Node { public: string name; Node* next; Node(string studentName) : name(studentName), next(nullptr) {} }; class StudentRoster { private: Node* head; int size; public: StudentRoster() : head(nullptr), size(0) {} void inser...
ALGO
0.999835
6.45482
91839b68-aed4-43e1-8b22-0881ff6d9655
Creator-Turbo/c-dsa-
pattern1/solidRectangle.cpp
#include<iostream> using namespace std; int main() { int n; cout << "No of rows : "; cin >> n; int m; cout << "No of columns : "; cin >> m; // Loop to print the rectangle of stars for (int i = 1; i <= n; i++) { // Loop for rows for (int j = 1; j <= m; j++) { // Loop f...
ALGO
0.974868
3.849563
de390aa1-1d61-4c5b-8ad3-6a8a37220577
BibhabenduMukherjee/cppmaster1
String/arrange_given_number_from_Agreater.cpp
#include<bits/stdc++.h> using namespace std; int mycompare(string X , string Y){ string XY = X.append(Y); string YX = Y.append(X); return XY.compare(YX) > 0 ? 1 :0; } void printArray(vector<string> s){ sort(s.begin() , s.end() , mycompare); } int main(){ vector<string>s; s.push_back("54"); s.push_back...
ALGO
0.999303
4.616634
bb408f4a-3f81-4bb5-a7ad-89d0856e963b
mdfbaam/gmsh
Mesh/meshGRegionDelaunayInsertion.cpp
#include <set> #include <map> #include <algorithm> #include <queue> #include "GmshMessage.h" #include "robustPredicates.h" #include "OS.h" #include "meshGRegion.h" #include "meshGRegionLocalMeshMod.h" #include "meshGRegionDelaunayInsertion.h" #include "GModel.h" #include "GRegion.h" #include "MTriangle.h" #include "Num...
ALGO
0.918591
6.390161
72188458-50e3-4075-9f4d-a5dfbd24a38a
Rudolf-Gama/Striver-A2Z_DSASheet
BinaryTrees/Medium/Balencedtree.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int data; Node* left; Node* right; Node(int val) : data(val), left(nullptr), right(nullptr) {} }; int height(Node* node){ // code here if(node==NULL) return 0; int lh=height(node->left); int rh=h...
ALGO
0.999966
5.530721
9307a7ce-80e5-47d8-b268-518cf4737a62
rohankumardubey/libcudacxx
libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/compare.pass.cpp
// <string> // template<> struct char_traits<wchar_t> // static int compare(const char_type* s1, const char_type* s2, size_t n); // constexpr in C++17 #include <string> #include <cassert> #include "test_macros.h" #if TEST_STD_VER > 14 constexpr bool test_constexpr() { return std::char_traits<wchar_t>::compare(...
TEST
0.870233
5.993908
e24d5aaa-3761-4312-a263-b306f62e7efc
raincross7/code-similarity
codes/train_code/problem459/problem459_122.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int mod=1e9+7; int main(){ ll n;cin>>n; if(n&1){cout<<0<<endl;} else{ ll f=0; ll now=1; while(now<=n){ now*=5; f+=(n/(now*2)); } cout<<f<<endl; } }
ALGO
0.999979
4.146247
c07365ad-032b-43b7-9888-ac55a1ab6d97
simyy/leetcode
combination-sum.cpp
/* Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen from C unlimited number of times. Note: All numbers (including target) will be positive integers. Elements in a combination (a1, a2, … , ak) m...
ALGO
0.999979
5.493497
a6bf4b62-bf0e-459d-bb88-968b6fde3b05
Schr0Smi1ey/XPSC
Week 01/Contest/F_Colorful_Stamp.cpp
#include<bits/stdc++.h> using namespace std; #define fastio ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0); #define endl "\n" #define int long long int const int INF = 1e18; void solution(){ int n;cin >> n; string str;cin >> str; for(int i=0;i<n;i++){ if(str[i] == 'W'){ continue...
ALGO
0.999848
4.632534
df520970-8229-4199-a264-cd5b2b8f8064
devhasibulislam/CodeForces-online-judge
900-999/938B-RunForYourPrize.cpp
#include <cstdio> #include <vector> long mymax(long x, long y){return (x > y) ? x : y;} int main(){ long n; scanf("%ld", &n); std::vector<long> a(n + 2); for(long p = 1; p <= n; p++){scanf("%ld", &a[p]);} a[0] = 1; a[n + 1] = 1e6; long mn(1e7); for(long p = 0; p <= n; p++){ long cand = my...
ALGO
0.999715
3.354276
b31f7887-e75f-4855-9bff-0e6c7d36ba7f
gabriel-candeia/Competitive-Programming-Solutions
atcoder/abc198/C.cpp
#include<bits/stdc++.h> #define ll long long using namespace std; int main(){ ll r, x, y, dist=0; cin >> r >> x >> y; dist = x*x + y*y; if(dist<r*r) cout << 2 <<"\n"; else cout << ceil(sqrt(dist)/r) << '\n'; return 0; }
ALGO
0.999481
3.161875
eaf7049e-c166-430f-98ad-ef9db2803fbd
dhwanish-3/gem5_cache_replacement_policy
src/systemc/tests/systemc/misc/synth/combo/switch4/switch4.cpp
/***************************************************************************** switch4.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /****************************************************************************...
ALGO
0.961755
5.225846
058213cb-163a-4951-903d-9ba5039d966c
zuirez/DSA
CodeHelp/Patterns/pattern9alt.cpp
/* 1 2 3 3 4 5 4 5 6 7 */ #include <iostream> using namespace std; int main() { int n; cin>>n; for(int i=1; i<=n; i++) { for(int j=0; j<i; j++) { cout<<i+j<<" "; } cout<<endl; } }
ALGO
0.99992
4.045654
de4d1ee3-5459-44cd-a614-4b8b002c913a
edinakaknjo/CPPvjezba
CPPvjezba/Z2/Z3/main.cpp
//TP 2018/2019: Zadaća 2, Zadatak 3 #include <asm-generic/errno.h> #include <iostream> #include <deque> #include <array> using namespace std; template < class Iter1, class Iter2, class Iter3> auto ZajednickiElementiBlokova(Iter1 p1, Iter1 p2, Iter2 p3,Iter2 p4,Iter3 p5){ int velprvog=0, veldrugog=0; while(p1...
ALGO
0.999029
4.050375
8421a538-0df6-493d-a847-d989fc73af64
ishandutta2007/codeforces
hank55663/normal/1095/C.cpp
#include<bits/stdc++.h> //#include<bits/extc++.h> using namespace std; //using namespace __gnu_pbds; //typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> set_t; #define mp(a,b) make_pair((a),(b)) #define pii pair<int,int> #define pll pair<LL,LL> #define pdd pair<double,double> #define p...
ALGO
0.999995
3.808138
63ed6ff7-fb7e-43dd-9091-6c5e67c341b1
MohamedSameh15122001/text_recognition_1
image_to_text/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.997377
6.785645
51bd2653-9e7c-4201-841b-fda9162196ab
Berkantagur/Object-Oriented-Programming
OOP Lab Final/Question1.cpp
// With using class structure on the above write code for creating two course named Object Oriented Programing (with 4 credits) and Discrete Mathematics(with 3 credits) and enroll 40 students each and after that try to enroll 20 student more. // Display total course number before and after creating the courses, also d...
TOOL
0.973481
6.343705
6b77687a-d772-4175-8c0f-db6f79fb83ab
seanrmitchell/GanttChart
GanttChart/RNDServArr.cpp
// Gantt Chart Demonstration Project, // Random Service and Arrival Times // Completed 3/30/23 // Sean Robert Mitchell #include <iostream> #include <iomanip> #include <queue> using namespace std; std::vector<int> serviceGen() { return std::vector<int> {}; }; std::vector<int> arrivalGen() { return std::vector<int> ...
ALGO
0.864553
4.480384
9b636779-e9ab-4709-8975-e4848203b94a
ranun9/ReiwaCollection
cocos2d/cocos/math/MathUtil.cpp
#include "math/MathUtil.h" #include "base/ccMacros.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include <cpu-features.h> #endif //#define USE_NEON32 : neon 32 code will be used //#define USE_NEON64 : neon 64 code will be used //#define INCLUDE_NEON32 : neon 32 code included //#define INCLUDE_N...
TOOL
0.967885
6.360316
34c522ae-a437-4d81-9f87-fadcfbc63d53
YYYEJI/2022WinterPPS
week2/A068_YejiSong_20230104.cpp
// Backjoon 18258 - 큐2 #include <iostream> #include <queue> using namespace std; int main() { cin.tie(NULL); cin.sync_with_stdio(false); int n, m; string s; queue<int> q; cin>>n; for(int i = 0; i<n; i++) { cin>>s; if(s == "push") { cin>>m; q.push(m); ...
ALGO
0.999038
4.62807
ba0faf11-bab4-416d-8697-7d126958486b
rituraj0/Topcoder
Old Topcoder SRM codes/AmebaDiv1 - Copy.cpp
#include <algorithm> #include <iomanip> #include <iostream> #include <sstream> #include <cstring> #include <cstdlib> #include <climits> #include <fstream> #include <cctype> #include <cstdio> #include <string> #include <vector> #include <queue> #include <stack> #include <cmath> #include <ctime> #include <map> #include <...
ALGO
0.999876
4.105644
b0935d20-5ac9-47d3-9788-8dd00e13302a
abhishekshrivastava972/morethantechnical
ICP/MyICP.cpp
#include "cv.h" //#include "cvaux.h" #include "highgui.h" using namespace cv; #include <iostream> #include <vector> #include <limits> using namespace std; void ShowPoints(Mat& im, Mat& X,Scalar c = Scalar(255)) { for(int i=0;i<X.rows;i++) { Point p; if(X.type() == CV_32SC1 || X.type() == CV_32SC2) p = X.at<P...
ALGO
0.995976
4.696082
404b22ec-e203-43b8-8536-ce2ba6c6e529
arthurasanaliev/daily-leetcoding-challenge-January-2024
src/day7.cpp
// Problem: https://leetcode.com/problems/arithmetic-slices-ii-subsequence/ // Time Complexity: O(n * m) // Space Complexity: O(n * m) class Solution { public: int numberOfArithmeticSlices(vector<int>& nums) { int n = nums.size(); long long ans = 0; vector<unordered_map<long long,...
ALGO
0.999821
6.336772
00b2aee5-0baf-4f6e-b533-cbc1f3636e05
joydip007x/CompetitiveCodeArchive
CodeForces/614A/24624853_WA_31ms_8kB.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define nl '\n' #define deb(x) cerr<<#x" = "<<x<<nl #define in() ( { int a ; scanf("%d",&a); a; } ) const int N = 5e5 + 9; const int mod = 1e9 + 7; ll n,x,y, l,r,k; vector<ll>v ; string s; #define ld long double ld lr,lh,lk; ...
ALGO
0.999946
3.345134
f40a78da-b850-437a-af66-d3cf486766b8
ishandutta2007/codeforces
danya.smelskiy/normal/588/B.cpp
#include <bits/stdc++.h> using namespace std; long long n; int main(){ cin>>n; long long ans=1; for (int i=2;i<=sqrt(n);++i){ if (n%i==0){ ans*=i; while (n%i==0){ n/=i; } } } if (n>1) ans*=n; cout<<ans; }
ALGO
0.999994
5.075354
e81aff06-a9e8-4d09-8acf-3e6bbcfcd3d4
Shubhambarange/LeetCode-Top-Interview-150
76_Minimum_Window_Substring.cpp
Level -- HARD Example 1: Input: s = "ADOBECODEBANC", t = "ABC" Output: "BANC" Explanation: The minimum window substring "BANC" includes 'A', 'B', and 'C' from string t. Example 2: Input: s = "a", t = "a" Output: "a" Explanation: The entire string s is the minimum window. Example 3: Input: s = "a", t = "aa" Out...
ALGO
0.999972
6.644137
1d86c761-c238-4b89-8836-c4bdc21aeb8b
AlexhahDeng/ppdbscan
extern/eigen/bench/perf_monitoring/gemv.cpp
#include "gemv_common.h" EIGEN_DONT_INLINE void gemv(const Mat &A, const Vec &B, Vec &C) { C.noalias() += A * B; } int main(int argc, char **argv) { return main_gemv(argc, argv, gemv); }
ALGO
0.923654
4.484408
843e794c-8607-41aa-93cb-4fc1a9ce7431
Giro4c/SAE1.02_PacMan
ThePacMan/PacMan/NosFiles/collision.cpp
#include "collision.h" using namespace std; /* ************************ PacMan / Mur ************************** */ unsigned CoNextMur (const PacMan & Pac, const unsigned & CaseSize, vector<nsGraphics::Vec2D> & VecteurMurs, const CMyParam & Parameters) { // Si direction vers le haut if (Pac.DirectionActuell...
ALGO
0.997911
4.324088
7a241335-9728-437a-996f-e127a4907e47
kabu0330/ProgrammersCordingTest
01_체육복/01_체육복.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int solution(int n, vector<int> lost, vector<int> reserve) { std::sort(lost.begin(), lost.end()); std::sort(reserve.begin(), reserve.end()); for (size_t i = 0; i < lost.size(); i++) { for (size_...
ALGO
0.999722
4.623439
8ec7ebe8-1fea-4b52-9e39-99a3a4701c95
brightlaboratory/llvm-project
libcxx/test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp
// test bitset<N>& operator^=(const bitset<N>& rhs); #include <bitset> #include <cstdlib> #include <cassert> #include "test_macros.h" #if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" #elif defined(TEST_COMPILER_C1XX) #pragma warning(disable: 6294) // Ill-defined for-loop: i...
TEST
0.952492
7.502642
9fef1db8-108d-4a17-ad2f-cf29c65b69eb
vadithya1989/MDGFRD
greensFunction.cpp
/* * File: greensFunction.cpp * Author: vijaykumar * * Created on February 7, 2015, 4:09 PM */ #include "greensFunction.h" #include "findRoot.h" #include <assert.h> #include "externDefs.h" double greensFunction::ellipticTheta4Zero ( double q ) { if ( std::abs(q) > 1.0 ) { std::cout << "Invali...
ALGO
0.999551
4.37835
538d5497-d6e6-4d5b-9286-1bc012fd6a50
VJZ-Corp/Toolboxal
Core/core.cpp
// core.cpp #include "core.h" bool isNumber(const std::string& str) { char* end = nullptr; const double value = strtod(str.c_str(), &end); return end != str.c_str() && *end == '\0' && value != HUGE_VAL; } std::string Core::Radix_Converter(const std::string& num, const int origin, const int base) { // filter out ...
ALGO
0.994802
4.921501
1df5016e-a6a8-4f6a-801e-ce70856bed51
anna23333/part1
llvm/lib/CodeGen/LiveRegMatrix.cpp
#include "llvm/CodeGen/LiveRegMatrix.h" #include "RegisterCoalescer.h" #include "llvm/ADT/Statistic.h" #include "llvm/CodeGen/LiveIntervalAnalysis.h" #include "llvm/CodeGen/VirtRegMap.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Targ...
ALGO
0.923153
7.616575
ac0c8546-e0d9-4d3e-a187-53a27682c727
pratapaditya1997/competitiveProgramming
codeforces/1262/c/c.cpp
/* * Author: aps * Time: 2019-11-29 13:58:20 **/ #include<bits/stdc++.h> #define fi first #define se second #define pb push_back #define sz(x) (int)x.size() #define all(x) x.begin(), x.end() using namespace std; typedef long long int ll; typedef long double ld; typedef pair<ll,ll> pll; typedef vector<int> vi; ...
ALGO
0.999579
3.733563
3381205f-4459-482b-a492-fcb3e2abf6e4
SamueleVid/competitive_programming
olinfo/pozzo/code.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, d; cin >> n >> d; vector<int> h(n),l(n); for (int i=0;i<n;i++) { cin >> h[i] >> l[i]; } long long sum = 0; for (auto x : h) sum += x; vector<pair<int,int>> reach(n); ...
ALGO
0.999954
3.738327
dae2fa09-5dc4-4016-acaa-9043dc300a78
user992199/Illuminati_PP_Oct22
17-12/help_ramu.cpp
#include<iostream> using namespace std; int main() { int t; cin>>t; while(t--){ int c1, c2, c3, c4; cin>>c1>>c2>>c3>>c4; int n, m; cin>>n>>m; int rick[n], cab[m]; for(int i = 0; i < n; i++){ cin>>rick[i]; } for(int i = 0; i < m; i++){ cin>>cab[i]; } int rickshaw_cost = 0, cab_cost = 0; fo...
ALGO
0.999881
3.164181
c9306834-92bf-4a04-8806-0698f774f908
Aidoshq/ADS_22B030403
lab 8/2.cpp
#include <iostream> #include <vector> using namespace std; long long q = 1e9 + 7; long long p = 31; long long getHash(string s) { long long hash = 0; long long curX = 1; for (int i = 0; i < s.size(); i++) { long long curH = (s[i] - 'a' + 1) * curX % q; hash = (hash + curH) % q; cu...
ALGO
0.999917
5.150919
1ef1e0c8-2eaf-43f8-9b91-98b889bf622e
NidhiMuni/binary-search-trees
equal-paths.cpp
#ifndef RECCHECK //if you want to add any #includes like <iostream> you must do them here (before the next endif) #endif #include "equal-paths.h" using namespace std; // You may add any prototypes of helper functions here bool equalPaths(Node * root) { if (root == nullptr){ return true; } // Add your co...
ALGO
0.996852
4.936674
0d8b7779-9e01-44e9-b088-015525ea4fc4
OsmareDev/PTG_OpenGL
Test05(Fragment_Shader_and_Vertex_Shader)/Code/vboteapot.cpp
#include "vboteapot.h" #include "teapotdata.h" #include <glm/gtc/matrix_transform.hpp> using glm::mat4; using glm::vec4; void generatePatches(float * v, float * n, float * tc, unsigned int* el, int grid) { float * B = new float[4*(grid+1)]; // Pre-computed Bernstein basis functions float * dB = new float[4*(grid+1...
ALGO
0.941123
3.659741
e92cf1fb-3b04-406b-90be-97434ea6b2ba
jiezhoucs/llvm-analysis
llvm/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp
#include "llvm/ADT/ArrayRef.h" #include "llvm/Support/Endian.h" using namespace llvm; using namespace llvm::codeview; static inline MethodKind getMethodKind(uint16_t Attrs) { Attrs &= uint16_t(MethodOptions::MethodKindMask); Attrs >>= 2; return MethodKind(Attrs); } static inline bool isIntroVirtual(uint16_t At...
TOOL
0.878249
6.823136
3ee3cd0c-a6d6-48a2-9c07-da3ce99ce2ce
Amanthakur25/C----PROGRAMING
Lecture008 Switch Statement & Functions/power.cpp
#include<iostream> using namespace std; int power(int num1, int num2) { //cout << a <<endl; int ans = 1; for(int i = 1; i <= num2; i++) { ans = ans * num1; } return ans; } int main() { int c , d; cin>> c >> d; int answer = power(c,d); cout << " answer is " << answer...
ALGO
0.999962
4.825105
98a70b69-682b-48b1-b2f8-c8b4b9dc32cb
Catrya/Competitive-Programming
atcoder/A_easy/abc338_a Capitalized?.cpp
/* https://atcoder.jp/contests/abc338/tasks/abc338_a A - Capitalized? / Time Limit: 2 sec / Memory Limit: 1024 MB Score: 100 points Problem Statement You are given a non-empty string S consisting of uppercase and lowercase English letters. Determine whether the following condition is satisfied: The first characte...
ALGO
0.999731
5.270255
172c2296-0d37-48bd-b655-c57e6b2e2883
joshualass/CP
Solutions/Contests/Special/USACO/15/January/mooviemoving.cpp
#include <bits/stdc++.h> typedef long long ll; typedef long double ld; using namespace std; const ll MOD = 1e9 + 7; signed main() { ios_base::sync_with_stdio(false); cin.tie(NULL); freopen("movie.in","r",stdin); freopen("movie.out","w",stdout); int n, l; cin >> n >> l; vector<int> a(n); ...
ALGO
0.999949
3.919078
020664ee-c53a-486a-bd7e-954026897cae
doe300/GameOfLife
GameOfLife.cpp
#include "GameOfLife.hpp" #include <random> #include <chrono> #include <cstdlib> #include <iostream> #include <functional> void Grid::seed(const unsigned numCells) { // static std::mt19937 generator(std::chrono::system_clock::now().time_since_epoch().count()); // for(unsigned i = 0; i < numCells; ++i) // { // double...
ALGO
0.998516
6.218051
62c83c76-674a-49bf-a8a9-aab4b4d90823
ShivanshKumarJha/Coding-Dump
C++/C++11 Features/template_classes.cpp
#include<bits/stdc++.h> using namespace std; template <class T> class Stack{ private: T *stk; int top; int size; public: Stack(int sz){ size=sz; top=-1; stk=new T[size]; } void push(T x); T pop(); }; template <class T> void Stack<T>::push(T x){ if(top==si...
ALGO
0.955415
3.667904
c9480045-d2d5-416f-852b-f8cfcf441076
Utkarsh9799/LeetCode-Solutions
Coin Change.cpp
class Solution { public: int coinChange(vector<int>& coins, int amount) { int i, j, n = coins.size(); int dp[amount + 1]; dp[0] = 0; for(i = 1; i <= amount; i++) dp[i] = INT_MAX - 1; for(i = 1; i <= n; i++) { for(j = 1; j <= amount; j+...
ALGO
0.999928
5.877755
e508ebb4-bf21-4eda-a7e3-0805e3134c2b
ishandutta2007/codeforces
thebes/normal/426/A.cpp
#include <bits/stdc++.h> using namespace std; int tot, mx, n, s, i, x; int main(){ for(scanf("%d%d",&n,&s),i=1;i<=n;i++){ scanf("%d",&x); tot+=x; mx=max(mx, x); } printf("%s\n",(tot-mx<=s)?"YES":"NO"); return 0; }
ALGO
0.99968
3.176538
63083dc9-ced4-4101-9af0-a60daffa3a39
harshahuja186/DSA-Repo
Basic/Decimal to binary/decimal-to-binary.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ void toBinary(int N) { int ans = 0; int p = 1; while(N>0){ int last_bit = (N&1); ans+=(last_bit*p); p*=10; N=N>>1; ...
ALGO
0.99969
6.266773
12e68f33-2a98-413f-b6ac-44971e6668aa
Kenneth-Nicholas/COSC-1560-03-C-Plus-Plus-Programming-II
Programming_II_HELP/5139145_54863693_Fall+2016+COSC+1550+Class+Examples/Class Examples/Week13/Range-Based Loops/pr7-10.cpp
// This program demonstrates the range-based for loop. #include <iostream> using namespace std; int main() { // Define an array of integers. int numbers[] = { 10, 20, 30, 40, 50 }; // Display the values in the array. for (auto val : numbers) cout << val << endl; return 0; }
ALGO
0.978604
4.098769
a7d3606a-e12b-4f2d-a655-7524c9283bfa
zhangyilin/leetcode
leetcode/permutationSequence.cpp
class Solution { public: long long factorial (int n){ assert (n>=0); if (n==0) return 1; return n*factorial(n-1); } string getPermutation(int n, int k) { list<int> l; for (int i=1; i<=n; ++i){ l.push_back(i); } return getPermutationSet (n, k, l); } ...
ALGO
0.999981
6.01652
db5994dc-1a20-47b9-8014-0da0b41bb035
Cchinchillaz/2110211-Data-Structure
cp_vector/vector_rotate/main.cpp
#include <stdexcept> #include <iostream> #include <string> #include <cassert> #include "vector.h" #include "student.h" using std::cin; using std::cout; using std::endl; using std::string; template <typename T> void do_check(CP::vector<T> &v,int round) { for (int i = 0;i < round;i++) { int a,b,k; cin >> a >>...
ALGO
0.934304
3.558941
ef66ece0-31b0-44de-b1df-3bb270e1753b
wenyuema-cs/fairness
.history/read_20220317174306.cpp
#include <algorithm> #include <iostream> #include <iomanip> #include <iterator> #include <fstream> #include <numeric> #include <set> #include <string> #include <sstream> #include <queue> #include <typeinfo> #include <utility> #include <vector> using namespace std; int SAMPLE_SIZE = 50; double randam(){ double r ...
ALGO
0.99977
4.2324
07a242a2-5d2e-4a70-a14b-41e46b90e242
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Gemma/top0-100/remove-methods-from-project-Solution.remainingMethods/177823_Exec_Code_Overflow.cpp
BufCompressedFill (BufFilePtr f) { CompressedFile *file; register char_type *stackp, *de_stack; register char_type finchar; register code_int code, oldcode, incode; BufChar *buf, *bufend; file = (CompressedFile *) f->private; buf = f->buffer; bufend = buf + BUFFILESIZE; stackp...
ALGO
0.999489
4.073649
a02d9de9-18a7-4d1f-8072-c14d42e9ff72
Vanslashington/algorithm-problem-solutions
UVa/ancientMessages.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <deque> #include <algorithm> using namespace std; int bitmap[202][202]; int h, w, h2, w2; int nObjects, holes; char hDigit; char glyphs[6] = {'W', 'A', 'K', 'J', 'S', 'D'}; deque<char> foundObjects; const int WHITE = 0, OBJECT = 1, ...
ALGO
0.998588
3.638358
f3ec527d-ed21-4bf2-8f96-b4e6f75a89a9
jariasf/CC126-2202
Semana 10/Hoja de ejercicios/ejercicio3.cpp
#include <iostream> #include <cstdlib> using namespace std; int ingresarNumeroPersonas(); int nextInt(int, int); void generarEdades(int*, int); void mostrarEdades(int*, int); void encontrarMenorEdad(int*, int); int encontrarPosicionMenorEdad(int*, int); int contarPersonasEntre30y50(int*, int); double calcularPromedioE...
TOOL
0.922271
3.426362
8229f606-868d-42ee-80f7-72f3bd6c3072
juaan-dev/localiza-ifood
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
286b1c58-9fe2-49b5-89e7-ad6893bafeb7
vedantkokane10/LeetCode_75
Array and Strings /2_ Greatest Common Divisor of Strings.cpp
/* 1071. Greatest Common Divisor of Strings For two strings s and t, we say "t divides s" if and only if s = t + ... + t (i.e., t is concatenated with itself one or more times). Given two strings str1 and str2, return the largest string x such that x divides both str1 and str2. Example 1: Input: str1 = "ABCABC", str2 ...
ALGO
0.99555
6.43634
e02b15c2-c459-4560-af17-1309585f5d4e
yitati/LCProject
Leetcode/RemoveNthNodeFromEndOfList.cpp
/******************************************************************************/ /** * Question: #19 Remove Nth Node From End Of List * Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end...
ALGO
0.999642
6.012077
0d69c4fa-82f6-4652-aa5b-433aeb703436
kul-optec/pantr-cdc2023-experiments
drivers/mpc-driver.cpp
#include <alpaqa/config/config.hpp> #include <alpaqa/newton-tr-pantr-alm.hpp> #include <alpaqa/panoc-alm.hpp> #include <alpaqa/params/params.hpp> #include <alpaqa/structured-panoc-alm.hpp> #include <alpaqa/structured-zerofpr-alm.hpp> #include <alpaqa/util/demangled-typename.hpp> #include <alpaqa/util/print.hpp> #includ...
ALGO
0.997534
7.336273
e70fe477-806c-4cd2-a097-116a50f64a60
gradientspace/UnrealMeshProcessingTools
UE4.24/IGLMeshProcessingProject/Plugins/MeshProcessingPlugin/ThirdParty/libigl/include/igl/is_delaunay.cpp
template < typename DerivedV, typename DerivedF, typename DerivedD> IGL_INLINE void igl::is_delaunay( const Eigen::MatrixBase<DerivedV> & V, const Eigen::MatrixBase<DerivedF> & F, Eigen::PlainObjectBase<DerivedD> & D) { typedef typename DerivedV::Scalar Scalar; // Should use Shewchuk's predicates instea...
ALGO
0.986504
7.194934
529f81da-ae6c-4c12-b367-caf065e21dc6
vfolunin/archives-solutions
EOlymp/2381.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <string> using namespace std; bool solve() { vector<int> a; for (int value; cin >> value && value; ) { if (value == -1) return 0; a.push_back(value); } sort(a.begin(), a.end())...
ALGO
0.999241
3.917255
4af83372-f581-4f8f-bcc3-fc90286b7742
juarezpaulino/coderemite
problemsets/Codeforces/C++/B436.cpp
/** * * Author: Juarez Paulino(coderemite) * Email: <EMAIL> * */ #define _USE_MATH_DEFINES #include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int,int> pi; typedef pair<ll,ll> pl; typedef vector<string> vs; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vl; typed...
ALGO
0.999552
3.504053
720e57f1-1441-46d6-9fe5-13675c23aca7
Mayanklakhina/Leetcode-Practice-Problems
0930-binary-subarrays-with-sum/0930-binary-subarrays-with-sum.cpp
class Solution { public: int lessOrEqual(vector<int>& nums, int goal){ int i = 0, j = 0; int result = 0; int sum = 0; if(goal < 0) return 0; while(j < nums.size()) { sum += nums[j]; ...
ALGO
0.999992
6.223383
afd49af1-5800-4247-a1c6-d84fd47d38bd
Golam6967/new_repository
codefroces/Practice.cpp
#include<bits/stdc++.h> using namespace std; int recursion(int ind,vector<int>v,int prev){ if(ind==v.size()){ return 0; } int len = recursion(ind+1,v,prev); if(prev==-1 || v[prev]<v[ind]){ len = max(len,1+recursion(ind+1,v,ind)); } return len; } int find_prefixes(int ind,vector<int>v,int sum,vector<vector<int>...
ALGO
0.999158
3.586266
bc4789f1-f77f-4a1c-9116-fe0b8483492f
yogurtkun/oj_practice
yzy/two sum.cpp
class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { vector<int> results; for (int i = 0; i < nums.size(); i++) results.push_back(nums[i]); //cout << results[0] << results[1] << endl; sort(results.begin(), results.end()); //cout << results[...
ALGO
0.99992
5.852611
f90bbc1e-1273-4663-993a-9f7012e135ee
NoyeArk/algorithm
data structure/第8章 排序/插入排序/希尔排序.cpp
/** * @file 希尔排序.cpp * @author horiki * @version 0.1 * @date 2024-05-21 * @copyright Copyright (c) 2024 * * @brief * */ #include <iostream> using namespace std; const int N = 100010; int n; int a[N]; void shell_sort() { for (int gap = n / 2; gap; gap /= 2) { for (int i = gap + 1; gap <= n; i ++) } }...
ALGO
0.999968
4.729401
011529cb-b8c5-4e8f-9ee3-807e07d183e3
itmc-ptit/itmc-cpp-class-2024
N24DCCN090/buoi5/b9..cpp
#include <iostream> using namespace std; //cho phep nguoi dung in k lan mot chuoi nao do lien tiep void in(string s, int k) { for (int i = 0; i < k; i++) { cout << s; } } int main() { int n = 0; int m = 0; cout << "nhap vao chieu cao cua cay thong: "; cin >> n; cout << "nha...
ALGO
0.997485
3.317497
0cd18c12-2292-42c3-acf4-7cb765fa181e
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_5608_0.cpp
#include <bits/stdc++.h> #include <algorithm> using namespace std; int main() { long long int a,b,c; cin >> a>>b>>c; long long int d =(a%2)*(b%2)*(c%2)*min(a*b,c*b,a*c); cout << d << endl; }
ALGO
0.999957
4.929653
efb08429-b726-4387-baac-262da74bd058
raincross7/code-similarity
codes/train_code/problem291/problem291_439.cpp
#include <iostream> #include <cstdlib> #include <cstdio> #include <cmath> #include <stack> #include <cctype> #include <complex> #include <vector> #include <algorithm> using namespace std; bool solve(){ int d; while(cin>>d){ int n = 600/d; int sum=0; for(int i=1;i<n;i++){ sum += d * (i*d)*(i*d); } cout...
ALGO
0.997952
3.250861
b97ecf1a-853d-4eb8-a728-ed256be8e718
Sehee-Lee-01/algorithmCPP
PracProg2/week5/p1.cpp
// 계산기 만들기 #include <iostream> #include <vector> #include <string> using namespace std; typedef long long ll; int main() { int T, L; cin >> T; while (T--) { cin >> L; vector<string> cals; vector<ll> nums; string temp; while (L-- > 0) { cin >> ...
ALGO
0.999909
4.525479
f0369646-6397-4d69-b856-0b72a9850825
Project-Awaken/android_frameworks_av
media/module/codecs/g711/decoder/g711DecAlaw.cpp
#include <stddef.h> #include <stdint.h> void DecodeALaw(int16_t *out, const uint8_t *in, size_t inSize) { if (out != nullptr && in != nullptr) { while (inSize > 0) { inSize--; int32_t x = *in++; int32_t ix = x ^ 0x55; ix &= 0x7f; int32_t iexp = ix >> 4; int32_t mant = ix & 0...
ALGO
0.971495
5.344831
9b4fe347-9316-4ef8-bb7a-eacc1c09d786
ayushdh96/Leetcode
2271-rearrange-array-elements-by-sign/rearrange-array-elements-by-sign.cpp
class Solution { public: vector<int> rearrangeArray(vector<int>& nums) { vector<int> newArr(nums.size()); int pos=0,neg=1; for(int i=0;i<nums.size();i++){ if((pos<=nums.size()-1) && nums[i]>0){ newArr[pos]=nums[i]; pos+=2; } ...
ALGO
0.999963
5.582303
efc14b7b-ece7-47bc-ba4e-4c77c1dca83f
rishabhjha05/CodeStruct
Module_07/Ques4.cpp
#include <iostream> using namespace std; int count(int n) { int count = 0; while (n > 0) { count++; n /= 10; } return count; } int main() { int n; cout << "Enter a value of n : "; cin >> n; if (n != 0) cout << "Number of digits in the given number is : " << c...
ALGO
0.99855
4.968214
643aaf53-d48d-4cbc-b724-59a06f89c42b
king7282/algorithm
boj/String/9249.cpp
#include <iostream> #include <string> #include <algorithm> std::string input, input1, input2; int SA[400010], pos[400010], lcp[400010], d, tmp[400010]; bool cmp(int a, int b) { if (pos[a] == pos[b]) { a += d; b += d; if (!(0 <= a && a < input.size() && 0 <= b && b < input.size())) return a > b; return po...
ALGO
0.999949
4.133817
bfff5caa-de17-45bb-a270-2d72d22cc746
PranjalAgni/210DaysLeetCode
day-219.cpp
/* Minimum Cost to Move Chips to The Same Position We have n chips, where the position of the ith chip is position[i]. We need to move all the chips to the same position. In one step, we can change the position of the ith chip from position[i] to: position[i] + 2 or position[i] - 2 with cost = 0. position[i] + 1 o...
ALGO
0.999892
6.022977
98edff1e-af4e-45b2-976a-bff4eee3beb7
aditi-govindu/Unstop-100-days
Day62/Collinear.cpp
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> /* Description: Akarsh gives Aryan n 2D points. Aryan plots the points on the Cartesian plane and he wants to observe how many maximum points lie on a line. Write an algorithm to help Aryan. Assumptions → No two poi...
ALGO
0.999922
5.420255
89035d4b-b5db-48e9-829b-a895cb845cfe
cfoust/leetcode-problems
problems/max-area-of-island/solution.cpp
class Solution { public: int maxAreaOfIsland(vector<vector<int>>& grid) { } };
ALGO
0.999768
6.313776
74996ea0-cb7d-414e-ab38-538d0aec0efe
DevMohitgarg/DSA_with_CPP
STL/Set/setUsingVector.cpp
//In this we are creating a vector which will work like set #include<bits/stdc++.h> using namespace std; void insert(vector<int> &s,int ele) { int flag=0; for(int i=0;i<s.size();i++) //this loop is checking for element not to be repeat in vector { if(s[i]==ele) { ...
ALGO
0.999165
3.885381
4845e2ae-8a4a-4126-aa61-6d6a60247653
NVlabs/data-orchestration
loop-nests/graph-processing/bfs-pull/untiled-adjmat/bfs-pull-untiled-adjmat.cpp
#include "whoop.hpp" #include <math.h> #include <cassert> int main(int argc, char** argv) { using namespace whoop; VecIn AdjacencyMatrix("adjmat"); VecOut Parent("parent"); //stores parent of each vertex Vec Frontier("frontier"); //stores level (in bfs-tree) of each vertexr"); Vec Stop("stop"...
ALGO
0.998913
4.335548
83c505ae-e08e-491f-89b7-cdcc44cc0cfb
Anup-Chaurasiya/Leetcode-top-problems
59-spiral-matrix-ii/spiral-matrix-ii.cpp
class Solution { public: vector<vector<int>> generateMatrix(int n) { vector<vector<int>>matrix(n,vector<int>(n)); int top = 0; int buttom = n-1; int right = n-1; int left = 0; int count = 1; while(top<=buttom && left<=right){ for(int i=left;i<=r...
ALGO
0.999944
5.867089
fc361e6b-e835-4178-9710-ad6294926a5b
Shuvro-d/LightOj-
1022-Circle in Square.cpp
#include<bits/stdc++.h> #define ll long long int #define mx 6 using namespace std; int main() { ll t; cin>>t; for(ll test=1; test<=t; test++) { double r; cin>>r; double pi=2 * acos (0.0); double square=pow(2*r,2); double circle=pi*pow(r,2); ...
ALGO
0.997728
3.818433
95ae97c4-0738-42c4-bbf3-bab99452b7de
rouviecy/NAO_SLAM
Visio/cpp/src/mapping/Arbre.cpp
#include "Arbre.h" using namespace std; // Constructeur Arbre::Arbre(bool allow_overwrite){ tracking = Tracking(40); this->allow_overwrite = allow_overwrite; } // Ajouter des nouvelles cases à la carte en essayant de trouver des liens bool Arbre::Add_cases(std::vector <STRUCT_VIGNETTE> new_liste){ if(liste.size()...
ALGO
0.951798
4.087161
7f98b980-8fda-463a-9d0d-67c0e9059431
i-am-gk/C-programs-All-
Lab task 5 3.22.cpp
#include <stdio.h> // Function to check if a number is prime int is_prime(int n) { // Base case: 0 and 1 are not prime numbers if (n <= 1) { return 0; } // Check divisibility from 2 to the square root of n for (int i = 2; i * i <= n; i++) { if (n % i == 0) { return ...
ALGO
0.999493
5.553526
ae1fb57f-681f-4279-83cc-012195896857
Vatsal-Shingala-1011/Data-Structures-And-Algorithms
code force/Registration_system.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; map<string,int> m; int t=n; while(t--){ string str; cin>>str; if(m.find(str)==m.end()){ cout<<"OK"<<endl; m[str]++; } else{ string s...
ALGO
0.999747
4.303019
8e9a31a3-71fb-4eeb-b25c-d94b52914532
YousefSameh25/LeetCode
3243-shortest-distance-after-road-addition-queries-i/3243-shortest-distance-after-road-addition-queries-i.cpp
class Solution { public: int BFS (int n, vector < vector < int > >& G) { queue < int > q; vector < int > lvl (n, -1); q.push(0); lvl[0] = 0; while(q.size()) { auto node = q.front(); q.pop(); for (auto& child : G[node]) ...
ALGO
0.999975
5.887518
260e7bd7-d63b-473f-b32c-83c855877ed2
Moyu0730/CP-Question-Record
Zero Judge/d672. 10922 - 2 the 9s.cpp
/* Question : ZeroJudge d672. 10922 - 2 the 9s */ #include<bits/stdc++.h> using namespace std; #define opt ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); #define mem(x, value) memset(x, value, sizeof(x)); #define pii pair<int, int> #define pdd pair<double, double> #define pb push_back #define F first #def...
ALGO
0.999006
4.325655
9d9f0a03-bcfb-47e3-84d8-2525abc2456c
Nakib-Arman/CSE318---ArtificialIntelligence
4.DecisionTree/.history/decision_tree_20250705094720.cpp
#include<bits/stdc++.h> using namespace std; float getEntropy(int attributes, vector<int> neumerator, vector<int> denomenator) { float entropy=0; for (int i=0;i<attributes;i++){ float p = static_cast<float> (neumerator[i])/denomenator[i]; entropy -= log2(p) * p; } return entropy; } int...
ALGO
0.957935
4.697077
10669ecf-f949-49c9-9672-eccd2520c2eb
GenesisOS-Staging/external_skia
src/pathops/SkPathOpsRect.cpp
#include "src/pathops/SkPathOpsRect.h" #include "src/pathops/SkPathOpsConic.h" #include "src/pathops/SkPathOpsCubic.h" #include "src/pathops/SkPathOpsQuad.h" #include "src/pathops/SkPathOpsTCurve.h" void SkDRect::setBounds(const SkDQuad& curve, const SkDQuad& sub, double startT, double endT) { set(sub[0]); ad...
TOOL
0.956413
7.262503