uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
0cc216a9-047f-479e-9acb-ecb36b7d0207
sugol-a/books
src/croprect.cpp
#include <cmath> #include <iostream> #include <croprect.hpp> static double dist(double x1, double y1, double x2, double y2) { return std::sqrt(std::pow(x1 - x2, 2) + std::pow(y1 - y2, 2)); } static unsigned int modulo(int n, int m) { int mod = n % m; if (mod < 0) { mod += m; } return mod...
TOOL
0.85177
7.063555
1e2372df-f3f4-49fc-8f37-b089e8fb6459
bornil-bd/Codechef_2
0 TO 1/ATM.cpp
//b0rnil #include<bits/stdc++.h> using namespace std; typedef long long int ll; typedef unsigned long long int ull; #define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define v '\n' #define pb(a) push_back(a); #define yes cout<<"YES"<<'\n' #define no cout<<"NO"<<'\n' #define loop(a,b,c) for(...
ALGO
0.998863
3.678782
0487d302-a223-43e0-a457-7b615d400d9a
Danielto1404/bachelor-courses
cpp-course/second-term/HW4/B.cpp
#include <iostream> #include <map> #include <set> #include <fstream> #include <vector> #include <string> using namespace std; typedef unsigned int UI; int main() { ifstream in("broken-keyboard.in"); ofstream out("broken-keyboard.out"); string s; getline(in, s); UI n = stoi(s); set<char> lette...
ALGO
0.999965
4.481289
f2e0e43b-f6cc-4a5a-a59a-9a2e40925e8f
dongyuma/mdywork2
base-mdy/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 <stdlib.h> // for malloc, calloc, free #include <string.h> // for memset #include <new> // for std::__libcpp...
TOOL
0.894969
7.597508
87042b83-7ae8-4bb2-b9c7-8517b8791c07
abhi5404/cpp-DSA
ARRAY/KADANE.cpp
#include <iostream> #include <climits> // Needed for INT_MIN using namespace std; void maxSubarraySum3(int* arr, int n) { int maxSum = INT_MIN; int currSum = 0; for (int i = 0; i < n; i++) { currSum += arr[i]; // fixed this line maxSum = max(currSum, maxSum); if (currSum < 0) { ...
ALGO
0.999987
6.848297
c6f88d88-e41d-4d2d-b9de-adfeeae8ef50
polypour/Archimajor-FW
Marlin/vector_3.cpp
#include <math.h> #include "Marlin.h" #ifdef ENABLE_AUTO_BED_LEVELING #include "vector_3.h" vector_3::vector_3() : x(0), y(0), z(0) { } vector_3::vector_3(float x_, float y_, float z_) : x(x_), y(y_), z(z_) { } vector_3 vector_3::cross(vector_3 left, vector_3 right) { return vector_3(left.y * right.z - left.z * ri...
TOOL
0.904393
5.808784
49323ccc-e050-48f9-a54c-1fb29e0807b9
fsjhhh/acm_title
cpp/match/15th_taiyuanligong/15th_taiyuanligong_N.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #include <vector> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <queue> #include <deque> #define IOS std::ios::sync_with_stdio(false); \ std::cin.tie(0); \ ...
ALGO
0.999934
3.933246
7735f105-f325-41bb-a9ab-d7e464d184a1
yuvrajkumarViT/Codeforces_Solutions
259A/main.cpp
#include <iostream> using namespace std; int main() { string s1="BWBWBWBW"; string s2="WBWBWBWB"; int n=8; int flag=0; string s; while(n--) { cin>>s; if(s==s1||s==s2) { flag++; } } if(flag==8) { cout<<"YES"; } else { cout...
ALGO
0.999837
3.450204
d2ea8a4e-fa91-4427-835e-bebba0250fc5
rifatahammed/Cpp--C-plus-plus
Triangle_Detection.cpp
#include<iostream> using namespace std; int main() { float a, b, c; cout << "Enter three side's length of a triangle: "; cin >> a>>b>>c; if (a == b && b==c) { cout << "This is an equilateral Triangle" << endl; } else { if (a !=b && a!=c && b!=c) { cout << "Scalene Triangle"; } else { cout << "...
ALGO
0.988111
3.768922
8accd735-2cae-4d03-bd5a-bd079c516bd2
root-jeong/BOJ
10000~/11054_가장 긴 바이토닉 부분 수열.cpp
#include <iostream> #include <algorithm> using namespace std; int N; int dp[1001]; int dp2[1001]; int arr[1001]; int mmax = 0; int main() { cin >> N; for (int i = 1; i <= N; i++) { cin >> arr[i]; } for (int i = 1; i <= N; i++) { dp[i] = 1; for (int j = 1; j <= i - 1; j++) { if (arr[i] > arr[j]) dp[i] = ...
ALGO
0.999914
4.510019
ecef54f5-3c29-4388-a626-af2173418fa9
bersilin-robert1609/robert_cp
Accepted/1227-A.cpp
#include<bits/stdc++.h> // #include <cmath> // #include <queue> // #include <stack> // #include <string> using namespace std; #define int long long void solve() { int n; cin>>n; int l[n], r[n]; for(int i=0; i<n; i++) cin>>l[i]>>r[i]; int maxl=l[0]; for(int i=1; i<n; i++){ if(maxl<l[i]...
ALGO
0.999883
4.5654
21d438b7-ff71-4139-9a30-339aeeae93dc
durgaprasadbvdp/DSA
7.PATTERNS/241.cpp
/* PATTERN - 89 241.Write a program to print the following pattern: I/P : n = 5 O/P : 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 */ #include<bits/stdc++.h> using namespace std; void patternPrint(int n) { int x = 1; for(int i=n;i>=1;i--) { for(int j=1;j<=n;j++) ...
ALGO
0.999823
4.346961
66255e35-50f2-4369-96ae-57b7400ae8f3
deh0512/LeetCode
src/110_balancedbinarytree/code.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: bool isBalanced(TreeNode* root) { int max = 0; return search(root, 0, max); ...
ALGO
0.999714
6.744296
1f6f5b17-4b97-48de-a3b6-d1dc7655441e
FlashSnail/JD
JDonlineTest2/JDonlineTest2/JDonlineTest2.cpp
// JDonlineTest2.cpp : ̨Ӧóڵ㡣 // #include "stdafx.h" #include <iostream> #include <vector> #include <stack> #include <string> #include <queue> #include <map> #include <set> #include <algorithm> #include <math.h> using namespace std; /*յ鱨ĻҪ䵽ǰߡСCȥƻ˵䡣 СCڷڹ·һԣ䳵ʱ䣨輤һ䴩 ԴޣֻܷΡΪڷԭ㴦y䡣 ÿ䳵ԿһΣʼxΪXi ,еijλڵһޣΪLi,ٶΪ1xḺ˶ tʱ󣬸óͷxΪXi-tβΪ...
ALGO
0.999791
3.528451
cf12dfe4-1c78-4ed2-9660-5d5b9656f63b
oussamakhadraoui/c-learning
Linked List/ConvertBinaryNumberinaLinkedListtoInteger.cpp
#include <bits/stdc++.h> 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: int getDecimalValue(ListNode* head) { ListNode * temp...
ALGO
0.999935
5.372099
94f75145-bc64-4b35-aa8d-00623b72fae8
the-t3ch-wizard/Dsa-Practice
GeeksforGeeks/Reverse words in a given string.cpp
// link: https://practice.geeksforgeeks.org/problems/reverse-words-in-a-given-string5459/1 //{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to reverse words in a given string. string reverseWords(string str){ ...
ALGO
0.996262
5.863795
728d6986-2e1b-432a-887c-4f0c6aefc0b5
sujal-p0408/Contest-Problems
Sale.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; typedef unsigned long long ull; #define endl "\n" #define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define all(x) (x).begin(), (x).end() #define sz(x) (int) (x).size() #define debug(x) cout<< #x << " " << x <<endl; c...
ALGO
0.999526
4.044296
f3dbc71e-9d7e-4c73-acdd-b13afae633bc
wik46/learn-cpp
data_structures/searching/sequential_array_search.cpp
/* *************************************************************************************** * Filename: sequential_array_search.cpp * Author: Wikus Jansen van Rensburg * Date: November 30, 2020. * Description: This is a file to start studying searching algorithms. * All that is happening in this file is I am crea...
ALGO
0.99891
5.612302
98a91b25-a7f4-42cf-be2d-10bf71bf95ac
jhangy/ca_final_pro
src/systemc/tests/systemc/misc/user_guide/chpt4.2/stage3.cpp
/***************************************************************************** stage3.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /*****************************************************************************...
ALGO
0.99948
4.191345
cdeceb0e-dc1b-4163-9fbe-4a51cea25eb7
PacemakerX/codeForces-my-solutions
solutions_codForces/306000872_1438_B.cpp
#include <algorithm> #include <bits/stdc++.h> using namespace std; // Type definitions typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<pii> vpii; typedef vector<pll> vpll; typedef vector<vi> vvi; typedef vector<vl> vvl; // Macro...
ALGO
0.999894
5.078433
d329cce3-5860-46bf-a468-2a9393b74d57
Beisenbek/pp1_2024
week3/5_2.cpp
#include <iostream> using namespace std; int main(){ for(int i = 1; i <= 100; ++i) if(i % 2 == 0) cout << i << " "; return 0; }
ALGO
0.987468
3.553075
c8f7098b-97b5-4272-93ea-e71a969c7185
wayne-0720/C--a
drawsquare.cpp
#include <bits/stdc++.h> using namespace std; int main() { int l, s; cin >> l; cin >> s; for (int i = 1; i <= l; i++) { for (int j = 1; j <= s; j++) cout << "*"; cout << endl; } return 0; }
ALGO
0.990938
3.264867
67274e21-96b0-48ad-899d-2c14438db299
v1rushb/Problem-Solving
Interview/Graphs/Islands and Treasure.cpp
class Solution { private: vector<int> dx = {1,0,-1,0}; vector<int> dy = {0,1,0,-1}; public: void islandsAndTreasure(vector<vector<int>>& grid) { int rows = grid.size(); int cols = grid[0].size(); queue<pair<int, int>> q; for (int o = 0; o < rows; o++) { f...
ALGO
0.999789
6.162039
732571a0-aba1-4e0d-ac3b-362a4ea9f0e1
krcNAS/ports
graphics/seexpr/files/patch-src_SeExpr_SeNoise.cpp
--- src/SeExpr/SeNoise.cpp.orig 2015-08-28 22:32:38 UTC +++ src/SeExpr/SeNoise.cpp @@ -16,7 +16,9 @@ */ #include <iostream> +#ifdef __SSE4_1__ #include <smmintrin.h> +#endif #include "SeExprBuiltins.h" namespace{ @@ -25,14 +27,18 @@ namespace{ #include "SeNoise.h" namespace SeExpr{ +#ifdef __SSE4_1__ inli...
ALGO
0.996288
6.587263
85e6dcff-f6f2-4c1c-8bf3-443f4a6e76f5
coding4beginner/Course_Learning-Algorithms
C-Plus-Plus/numerical_methods/durand_kerner_roots.cpp
/** * @file * \brief Compute all possible approximate roots of any given polynomial using * [Durand Kerner * algorithm](https://en.wikipedia.org/wiki/Durand%E2%80%93Kerner_method) * \author [Krishna Vedala](https://github.com/kvedala) * * Test the algorithm online: * https://gist.github.com/kvedala/27f1b0b6502a...
ALGO
0.999832
5.96539
fcf44c4c-0eea-42c4-a4c5-06e2314a8601
Penguin5681/LeetCodeSolutions
ArithmeticSlicesIISubsequence.cpp
// 446. Arithmetic Slices II - Subsequence #include <bits/stdc++.h> using namespace std; class Solution { public: int numberOfArithmeticSlices(vector<int>& nums) { int n = nums.size(); int result = 0; vector<unordered_map<long long, int>> dp(n); for (int i = 1; i < n; ++i) { ...
ALGO
0.999938
5.942535
8817d90b-3bab-4f48-beb6-21a61645db1b
Arj404/CP_practise
linear_search.cpp
#include<iostream> using namespace std; int search(int arr[], int x,int n){ for(int i=0;i<n;i++){ if(x==arr[i]){ return i; } } return -1; } int main(int argc, char** argv){ if(argc<2){ puts("usage: programme name <element to search>"); return 1; } in...
ALGO
0.996314
4.377121
57d7501a-e819-4613-ad10-3f6cb3d18a9c
ishandutta2007/codeforces
hellkitsune/normal/406/D.cpp
#include <cstdio> #include <cmath> #include <cstring> #include <string> #include <sstream> #include <algorithm> #include <iostream> #include <iomanip> #include <map> #include <set> #include <list> #include <queue> #include <stack> #include <vector> #include <cassert> using namespace std; #define pb push_back #define ...
ALGO
0.999997
3.94605
042c3b4f-261c-4aa8-a062-f0f19bd511ef
Anujdominoblack/DSA-using-c-
deque/dequestl.cpp
// now we will implement deque using stl #include<iostream> #include<deque> using namespace std; int main() { deque<int> dq ={10,20,30,40,50}; //deque created dq.push_front(60); //puhsed at front dq.push_back(70); //pushed at back for(auto x : dq) //iterating the deque { cout<<x<<"...
TOOL
0.963375
4.298414
e54a43d2-c8b6-47a1-b85b-63d5cd43b011
avBuffer/caffe_ssd-android-lib
eigen_3.2.7/doc/examples/Tutorial_ArrayClass_interop_matrix.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { MatrixXf m(2,2); MatrixXf n(2,2); MatrixXf result(2,2); m << 1,2, 3,4; n << 5,6, 7,8; result = m * n; cout << "-- Matrix m*n: --" << endl << result << endl << endl; result = m.array() * ...
ALGO
0.998745
4.306757
4b4eb1f4-f649-42a8-9033-052153a360b6
yunhong111/1-04-RL_mswitches_
src/Trie_cuckoo_noise_07_21.cpp
/** trie_cuckoo_noise_07_21.cpp create by: Yunhong create time: 07/21/2015 */ #include "Trie_cuckoo_noise_07_21.h" ofstream outfileR[3]; // time double runTime = 0.0; // packet generation rate: pps const float rateParameter0 = 297298.0; int main(int argc, char * argv[]) { cout << "\n"; cout << "PRIME_OPENM...
ALGO
0.990462
3.516238
87b37a73-a94f-4a25-9e00-30f20017a140
Kamrul101/cpp_practice
contest/972 div 2/1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define endl "\n" #define MOD 1000000007 #define mem(a,b) memset(a, b, sizeof(a) ) // const int mx =2e5+123; // int a[mx]; int main() { optimize(); ...
ALGO
0.999866
5.051277
d914ad38-eee1-43d4-8ee1-8b523c65a90e
mzasa/LeetCode
2849. Determine if a Cell Is Reachable at a Given Time 100% 13.84%/main.cpp
class Solution { public: bool isReachableAtTime(int sx, int sy, int fx, int fy, int t) { if (sx == fx && sy == fy) return t != 1; int min_move = -1; if (abs(sx - fx) > abs(sy - fy)) min_move = abs(sy - fy) + abs(sx - fx) - abs(sy - fy); else min_m...
ALGO
0.999841
5.848159
f7836167-f80f-45f6-a7d4-205745e48f84
raincross7/code-similarity
codes/train_code/problem291/problem291_257.cpp
#include "bits/stdc++.h" #define ALL(a) (a).begin(),(a).end() #define SORT(c) sort((c).begin(),(c).end()) #define DESCSORT(c) sort(c.begin(), c.end(), greater<int>()) using namespace std; using LL = long long int; using LD = long double; using pii = pair<int, int>; using pll = pair<LL, LL>; using pdd = pair<double,...
ALGO
0.999533
3.838143
b6666ee9-df09-43c2-bc3a-14959164c613
ahmednasser111/Codeforces
1768A.cpp
// Greatest Convex #include <bits\stdc++.h> using namespace std; int main(int argc, char const *argv[]) { int t; scanf("%d", &t); while (t--) { int k; scanf("%d", &k); cout << k - 1 << '\n'; } }
ALGO
0.999355
3.84854
bcd74e61-441e-40e8-9691-ad608d715f1b
AdeshChoudhar/CPPractice
GFG/SDE_Sheet/Easy/rightmost_different_bit.cpp
class Solution { public: // Function to find the first position with different bits. int posOfRightMostDiffBit(int m, int n) { int ans = -1; for (int i = 0; i < 32; i++) { if ((((m >> i) & 1) ^ ((n >> i) & 1)) == 1) { ans = i + 1; ...
ALGO
0.999961
5.611324
1276fd26-7a3b-4f09-9e96-3bbea5e7f75b
Kondr48/gz_team_engine
trunk/xray/xrQSlim/src/MxStdModel.cpp
#include "stdafx.h" #pragma hdrstop #include "MxStdModel.h" #include "MxVector.h" MxPairContraction& MxPairContraction::operator=(const MxPairContraction& c) { v1 = c.v1; v2 = c.v2; mxv_set(dv1, c.dv1, 3); mxv_set(dv2, c.dv2, 3); delta_faces.reset(); dead_faces.reset(); for(unsigned int i=0; i<(unsigned int)...
ALGO
0.980405
5.915442
417c41d2-b212-451f-869c-e1a1481ad202
nvtoan2k2/Quataitoantu
[LTNC]_QuaTaiToanTu/PhanSo2.cpp
#include<iostream> using namespace std; struct phanSo { int tu, mau; phanSo() { tu = 0; mau = 1; } }; istream& operator >> (istream& is, phanSo& ps) { is >> ps.tu >> ps.mau; return is; } ostream& operator << (ostream& os, phanSo ps) { os << ps.tu << "/" << ps.mau; return os; } bool operator ==(phanSo ps1, p...
ALGO
0.999227
4.25786
b3dc0d84-d0ea-40fb-b9df-077bb6b5417b
tjopenlab/openElastos
Elastos21Documents/Samples/sdk/operating_system/crt/libc/float/_logb/_logb.cpp
/* _logb.cpp: This program extracts exponential value of f1. */ #include <stdio.h> #include <float.h> #include <math.h> int main() { double f, f1; f1 = 16.00; f = _logb(f1); printf("_logb(%f) = %f\n", f1, f); return 0; } /* Output _logb(16.000000) = 4.000000 */
ALGO
0.860994
3.209585
018a8d8c-82ed-495e-b59e-6a9c2e51ae8e
megsputra/IntermediateProg
ass7/ass7.cpp
#include <iostream> #include <string> #include <ctime> #include <cstdlib> #include <iomanip> #include <cmath> using namespace std; unsigned DaysPerMonth[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; const string NAMES[] = { "Joshua","Kyle","Yuxi","Anthony","Michael","Samuel","Karlen","Seyed Nima", "Mega","Tam...
ALGO
0.922616
4.447262
c17405de-93e7-4005-86ff-0643255deedb
incity/skia
src/core/SkStrokerPriv.cpp
#include "SkStrokerPriv.h" #include "SkGeometry.h" #include "SkPath.h" static void ButtCapper(SkPath* path, const SkPoint& pivot, const SkVector& normal, const SkPoint& stop, SkPath*) { path->lineTo(stop.fX, stop.fY); } static void RoundCapper(SkPath* path, const SkPo...
TOOL
0.987857
6.788834
12532eb6-cd60-4931-8bca-c17534b371b6
eliasol/cp-solutions
olinfo/src/ois_partition/partition.cpp
#include <iostream> #include <vector> class fenwick_tree { private: int n; std::vector<int> data; public: fenwick_tree(int n) : n(n), data(n+1,0) {} void add(int i, int v) { ++i; while (i <= n) { data[i] += v; i += i&-i; } } int sum(int i) { ++i; int res = 0; while (i > 0) { res += dat...
ALGO
0.999992
4.366402
0dbffaad-c492-48f7-b8b3-52ed37cfd871
borisboychev/SoftUni
C++-Fundamentals/01.Basic Syntax Exercises/Exercises/01.OrderTwoNumbers/main.cpp
#include <iostream> int main() { int a, b; std::cin >> a >> b; if (a > b) std::cout << b << " " << a << std::endl; else std::cout << a << " " << b << std::endl; return 0; }
ALGO
0.999825
4.884251
94a9f5eb-2fb0-4151-ae5b-dd6a99c208f6
srishti666/cpp-codes-main-main
dsa/Strings/Basic Strings/2_reverse a string.cpp
//question: https://leetcode.com/problems/reverse-string/ //brute force TC: O(N*N) SC: O(n) class Solution { public: void reverseString(vector<char>& s) { vector<char> reversed(s.size()); for (int i = 0; i < s.size(); i++) { reversed[i] = s[s.size() - 1 - i]; ...
ALGO
0.999401
6.477865
3507f4ad-7906-43c7-9db9-5deb17319381
20191864142/G12
G12/c6/67/67.cpp
#include"stdio.h" #include "stdafx.h" void main(void) { int a[15][15]={0}; int i,j,k,n,p=1; while(p==1) { printf("请输入一个奇数n(1到15之内):"); scanf("%d",&n); if((n>0) && (n<=15) && (n%2!=0)) j=n/2; a[0][j]=1; i=0; j=n/2; for(k=2;k<=n*n;k++) { i=i-1; j=j+1; if(i<0) ...
ALGO
0.999549
3.389475
9b27fb4e-08c2-4655-b446-5a7121db96f0
ecastillo999/RetosMoure2023
Retos/Reto #27 - CUENTA ATRÁS [Media]/c++/kevin05m.cpp
#include <iostream> #include <unistd.h> using namespace std; void cuentaAtras(int start, int second){ for (int i = start; i >= 0; i--){ cout << i << endl; if(i == 0){ return; } usleep(second); } } int main(){ int start, second; cin >> start >> second; ...
ALGO
0.986525
3.099809
34e6db4b-d27d-4848-bd28-a64cf16dd39d
leandrosilva/codes-from-books
thinking-in-cplusplus/C05/NobloatTest.cpp
using namespace std; template<class StackType> void emptyTheStack(StackType& stk) { while(stk.size() > 0) { cout << stk.top() << endl; stk.pop(); } } // An overload for emptyTheStack (not a specialization!) template<class T> void emptyTheStack(Stack<T*>& stk) { while(stk.size() > 0) { cout << *stk.t...
ALGO
0.97819
4.312137
80e5073b-87dd-4c01-9825-f2bd09c1d033
abdullahkhan-AI/C-Plus-Plus
088_Keeping_Count.cpp
#include <iostream> using namespace std; int main() { char array[20]; int i, j, k, count, final[20], length; cout << "Enter the number: "; cin >> array; for (i = 0; array[i] != '\0'; i++) { count = 0; for (j = 0; array[j] != '\0'; j++) { if(array[j] == array[i]) { count++; } } final[i] = c...
ALGO
0.99929
3.035878
7014a338-d67d-4e10-b140-f69b1f1153b5
allegroflare/allegro_flare
src/Wicked/Physics/TileMapCollisionStepper.cpp
#include <Wicked/Physics/TileMapCollisionStepper.hpp> #include <Wicked/Physics/AABB2D.hpp> #include <cmath> #include <iostream> #include <sstream> #include <stdexcept> namespace Wicked { namespace Physics { TileMapCollisionStepper::TileMapCollisionStepper(AllegroFlare::TileMaps::TileMap<int>* collision_tile_map, W...
ALGO
0.960329
7.36678
b873a373-17bc-4b12-b4eb-f81c505dde14
Phrostie0-0/SSAD_Labs
Lab1/Task1/main.cpp
#include <iostream> using namespace std; int main() { int totalSeconds; cin >> totalSeconds; int hours = totalSeconds / 3600; int rem = totalSeconds % 3600; int minutes = rem / 60; int seconds = rem % 60; cout << hours << ":" << minutes << ":" << seconds; }
ALGO
0.950255
4.966677
d2d401a8-94d7-4e47-8d14-30feeffd9eae
Harshika9415/Hacktober-fest-2022
CPP/Tower_of_hanoi.cpp
// C++ recursive function to // solve tower of hanoi puzzle #include <bits/stdc++.h> using namespace std; void towerOfHanoi(int n, char from_rod, char to_rod, char aux_rod) { if (n == 0) { return; } towerOfHanoi(n - 1, from_rod, aux_rod, to_rod); cout << "Move disk " <...
ALGO
0.999985
6.062783
0e4f45d4-5a8b-4c42-b28d-40ebf554602c
ishandutta2007/codeforces
endagorion/normal/1149/D.cpp
#include <bits/stdc++.h> #define mp make_pair #define mt make_tuple #define fi first #define se second #define pb push_back #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define forn(i, n) for (int i = 0; i < (int)(n); ++i) #define for1(i, n) for (int i = 1; i <= (int)(n); ++i) #define...
ALGO
0.999864
4.006754
b7a27c7f-3ab0-4965-b417-9c730c485921
adityanjr/code-DS-ALGO
GeeksForGeeks/Practice/QuickSort.cpp
/* The main function that implements QuickSort arr[] --> Array to be sorted, low --> Starting index, high --> Ending index void quickSort(int arr[], int low, int high) { if (low < high) { // pi is partitioning index, arr[p] is now at right place int pi = partition(arr, low, high); ...
ALGO
0.999978
5.066092
bb335fd6-76f5-4502-a75f-27151b7c719b
juandrengifo/cp-algos
10583.cpp
#include <bits/stdc++.h> using namespace std; class dforest{ public: int n, setsCnt; vector<int> rank; vector<int> parent; dforest(int n){ this->n = setsCnt = n; for(int i = 0 ; i < n ; i++){ rank.push_back(0); parent.push_back(i); } } void ...
ALGO
0.999601
4.943931
610addab-3c8e-4ce6-8a40-434f17302f64
oevseev/snippets
graph_theory/edmonds_karp.cpp
int n, c[MAXN][MAXN], f[MAXN][MAXN], mf[MAXN], p[MAXN]; int edmonds_karp(int s, int t) { int res = 0; while (true) { fill_n(mf, n, INT_MAX); fill_n(p, n, -1); queue<int> q; p[s] = s, q.push(s); while (!q.empty() && (p[t] != -1)) { int u = q.front(); ...
ALGO
0.99993
4.175515
9c0fca8c-10dd-436c-bfbe-d874e5fc3fce
Goelshiva1611/Leetcode_Problems
3455-minimum-length-of-string-after-operations/minimum-length-of-string-after-operations.cpp
class Solution { public: int minimumLength(string s) { int n = s.size(); unordered_map<int, int> mp; for (int i = 0; i < n; i++) { mp[s[i]]++; } int t = 0; for (auto it : mp) { int freq = it.second; if (freq % 2 != 0) { ...
ALGO
0.99992
5.909133
629c8cf4-32e7-4d80-9939-cafa1213c5ef
GWW/scsat
src/annotation.cpp
#include "annotation.hpp" #include <algorithm> #include <iostream> #include <numeric> using namespace std; using namespace scsat; void scsat::sort_model(GeneModel & m){ for(auto & c : m.chroms){ m.chrom_order.push_back(c.first); for(auto & g : c.second){ g.lft = g.children.front().chil...
ALGO
0.998938
3.744024
97d7f01b-9627-4719-bada-b0fac8f20d45
DuckyShine004/codeforces-division-solutions
educational/dynamic-programming/russian-2012-2013/c.cpp
#include <algorithm> #include <chrono> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; using na...
ALGO
0.999841
3.766739
f8184f15-c7a1-404a-a408-3c5ed3d20b5d
mahmud1628/Codeforces-Solutions
1360B.cpp
#include<bits/stdc++.h> using namespace std; int main( ) { int t; cin >> t; while(t--) { int n; cin >> n; vector<int> s(n); for(int i=0;i<n;i++) cin >> s[i]; sort(s.begin(),s.end()); vector<int> diff(n-1); for(int i=0;i<n-1;i++) diff[i] = s[i+1] - s[i...
ALGO
0.999859
3.748223
5db17b81-8ec9-427b-93ba-dea63aa177a0
levi178u/Codeforces-codes
B_Stalin_Sort.cpp
// Action Beeeeeaammmmm...... beep beep beep beep beep beep beep.... #include <bits/stdc++.h> using namespace std; #define lli long long int #define ll long long #define vi vector<lli> #define vvi vector<vi> #define gv(v,n) vi v; for (int i = 0; i < n; i++) { ll xx; cin>>xx; v.push_back(xx); } #define mod 1e9 +7 #...
ALGO
0.998988
4.397504
63e54776-8d70-4e87-8eb2-23a29d6a701f
sid-Dbot/demo
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998859
6.785645
78287dde-216f-4f48-8f58-ef6dc512c2c4
faa678/coding
leetcode/e-m-h/easy/easy110.cpp
/* Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which the depth of the two subtrees of every node never differ by more than 1. Example 1: Given the following tree [3,9,20,null,null,15,7]: 3 / \ 9 20 / \ 15...
ALGO
0.999909
6.17336
16a50757-bbfa-4ebf-a78c-2d9b8df24cba
sarvex/leetcode-matlab
solution/2000-2099/2018.Check if Word Can Be Placed In Crossword/Solution.cpp
class Solution { public: bool placeWordInCrossword(vector<vector<char>>& board, string word) { int m = board.size(), n = board[0].size(); int k = word.size(); auto check = [&](int i, int j, int a, int b) { int x = i + a * k, y = j + b * k; if (x >= 0 && x < m && y >= ...
ALGO
0.999878
6.317675
bcbe931a-42fe-4f96-99c9-d720780a0bb4
avigautam-329/Interview-Preparation
Greedy/MaximumSumOfAbsoluteDifference.cpp
/* Given an array, we need to find the maximum sum of absolute difference of any permutation of the given array. Examples: Input : { 1, 2, 4, 8 } Output : 18 Explanation : For the given array there are several sequence possible like : {2, 1, 4, 8} {4, 2, 1, 8} and some more. Now, the absolute difference of an ...
ALGO
0.999964
5.343159
77c8d1ac-07b5-4885-815e-c54cd4314bc4
NTremake/cpp-Daily-Practice
2023/2023.5/2023.5.14_C++/计算最后一个单词长度.cpp
class Solution { public: int lengthOfLastWord(string s) { int len = 0; for(int i = s.size() - 1; i >= 0; --i){ if(s[i] == ' ' && s[i + 1] != ' ' && s[i + 1] != '\0'){ return len; } else if(s[i] != ' '){ ++len; } ...
ALGO
0.99806
4.483771
2965db12-60f4-4782-8323-54be476492a0
om-prabhu123/code-library
String/Longest Palindromic Subsequence.cpp
//{ Driver Code Starts //Initial template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: int longestPalinSubseq(string A) { string B = A; reverse(A.begin(), A.end()); int n = A.size(); vec...
ALGO
0.99988
6.354082
e2c3cd94-826d-473b-bc99-cfbcf096c24a
POC-2025/leetcode
solution/1400-1499/1439.Find the Kth Smallest Sum of a Matrix With Sorted Rows/Solution.cpp
class Solution { public: int kthSmallest(vector<vector<int>>& mat, int k) { int pre[k]; int cur[mat[0].size() * k]; memset(pre, 0, sizeof pre); int size = 1; for (auto& row : mat) { int i = 0; for (int j = 0; j < size; ++j) { for (int& ...
ALGO
0.999995
5.873074
a7287380-25b9-4fdb-9825-3275507d65a6
nguyenhuudatcoder/THPTChuyenNTUCoder
CHAT4.cpp
/// Made by Nguyễn Hữu Đạt #include <bits/stdc++.h> #define ll long long #define kien main using namespace std; const ll inf = LLONG_MAX; const ll mod = 1e9 + 7; ll n, m, ans, k; kien() { // if(fopen(".inp","r")) // { // freopen(".inp","r",stdin); // freopen(".out","w",stdout); // } ios_base::...
ALGO
0.999985
3.610546
b20a8a1c-aa6c-480d-b8a2-2809cb95a46a
smuuule/aoc2024-smule
cpp/03/main.cpp
#include <iostream> #include <regex> #include <string> #include <vector> #include "../UtilsLib/UtilsLib.h" int partone(std::vector<std::string> lines) { std::vector<std::string> exps = {R"(mul\((\d{1,3}),(\d{1,3})\))"}; std::vector<std::smatch> matches = findMatches(lines[0], exps); int res = 0; for (std::sm...
ALGO
0.982207
5.683421
c1032763-865c-4447-9792-048cfd7db2d7
UVARocketry/SpaceportAmericaCup23-24
kalman_linear/eigen/bench/spbench/sp_solver.cpp
// Small bench routine for Eigen available in Eigen // (C) Desire NUENTSA WAKAM, INRIA #include <iostream> #include <fstream> #include <iomanip> #include <Eigen/Jacobi> #include <Eigen/Householder> #include <Eigen/IterativeLinearSolvers> #include <Eigen/LU> #include <unsupported/Eigen/SparseExtra> //#include <Eigen/Sp...
ALGO
0.989051
4.29849
72a6a297-3a9b-4736-8791-7fad7ae94c8c
ssbb1166/algorithm-problem-solving
implementation/boj1769.cpp
#include <iostream> #include <string> using namespace std; string x; int y, tmp, cnt = 1; int main() { cin >> x; for (int i = 0; i < x.length(); i++) y += (x[i] - '0'); while (y >= 10) { tmp = y; y = 0; while (tmp) { y += tmp % 10; tmp = tmp / 10;...
ALGO
0.99997
4.038894
087f9804-1043-4bff-a67d-e732ce9c2d7b
CTranLam/DSA-28tech
Sap xep & tim kiem/b32 bersu ball.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ int n,m ; cin >> n >> m; int a[n],b[m]; for(int &x : a) cin >> x; for(int &x : b) cin >> x; sort(a,a+n); sort(b,b+m); int ans=0; int nam=0,nu=0; while(nam <n && nu <m){ if(abs(a[nam]-b[nu]) <=1){ ++ans; ++nam; ++nu; } ...
ALGO
0.999959
3.551901
997e3021-7989-4363-a79b-e84749929a46
morshedalam3/Algorithms-ph-3
DFS-practice/prob_1.cpp
#include<bits/stdc++.h> using namespace std; const int N=1e3+5; vector <int> adjmat[N]; bool visited[N]; void dfs(int u){ visited[u] = true; for (int v:adjmat[u]) { if(visited[v] == true) continue; dfs(v); } cout<<u<<' '; } int main() { int n,m; cin>>n>>m; for(int i=0;i<...
ALGO
0.999971
4.864132
4615a42b-bfec-40b4-94ad-5d54bc73168e
skyjhyp11/opencvT
opencvT2_widg/ColorDetector.cpp
//#include "stdafx.h"//window vs #include "ColorDetector.h" //C++中成员函数在类里面定义和在类外定义有什么区别: //在类里定义时,这种函数会被编译器编译成内联函数,在类外定义的函数则不会。 //内联函数的好处是加快程序的运行速度,缺点是会增加程序的尺寸。 //比较推荐的写法是把一个经常要用的而且实现起来比较简单的小型函数放到类里去定义,大型函数最好还是放到类外定义。 ////ColorDetector::ColorDetector() //{ //} ColorDetector::~ColorDetector() { } int ColorDetector::...
ALGO
0.942197
4.359215
a74a17d7-66cb-4f85-bd59-b32e1fdadb24
Fork-ColtOS/platform_bootable_recovery
install/adb_install.cpp
#include "install/adb_install.h" #include <errno.h> #include <fcntl.h> #include <signal.h> #include <stdlib.h> #include <string.h> #include <sys/epoll.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> #include <atomic> #include <functional> #include <map...
TOOL
0.922559
7.336442
5f0033aa-224e-46da-8bd4-41861aa178b9
raincross7/code-similarity
codes/train_code/problem002/problem002_392.cpp
#include<algorithm>//sort,二分探索,など #include<bitset>//固定長bit集合 #include<cmath>//pow,logなど #include<complex>//複素数 #include<deque>//両端アクセスのキュー #include<functional>//sortのgreater #include<iomanip>//setprecision(浮動小数点の出力の誤差) #include<iostream>//入出力 #include<iterator>//集合演算(積集合,和集合,差集合など) #include<map>//map(辞書) #include<numer...
ALGO
0.99972
4.335324
1e6b167a-06ea-43d9-b2b6-44b79a597ff6
MarcosCarvalhar/Algoritmos-UFLA-2022
Lista1/exercicio11.cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; int main() { float x1, x2, y1, y2, x, y, m, q; cin >> x1; cin >> y1; cin >> x2; cin >> y2; x = (x2-x1); y = (y2-y1); m = y/x; q = y1 - (m*x1); cout << m << endl << q; }
ALGO
0.999218
3.558858
5070b87e-228f-474a-8ad7-e9af00bff57a
JyotinderSingh/Algorithms
EPI/Arrays/Enumerate_All_Primes/EnumeratePrimesSpaceOptimized.cpp
#include <bits/stdc++.h> using namespace std; vector<int> generatePrimes(int n) { const int size = floor(0.5 * (n - 3)) + 1; //number of odd numbers other than 1 in the given range vector<int> primes; primes.emplace_back(2); // is_prime[i] represents if (2i + 3) is a prime or not. // Initially set ...
ALGO
0.999566
4.848617
e17a3fb9-b943-4120-97b6-cbcd2c6cdf8d
ManthanK-24/SDE_DSA_Sheet
Day3_Arrays/P17)Grid_Unique_Paths.cpp
class Solution { public: int uniquePaths(int m, int n) { vector<vector<int>> paths(m,vector<int>(n,0)); for(int i=0;i<m;i++) { for(int j=0;j<n;j++) { if(i==0 || j==0) { paths[i][j] = 1; } ...
ALGO
0.999886
6.380003
821c1716-8024-4a8d-89ab-d12dd93dd890
elguneminov/E-Olymp-2
9400.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for(int i = 1 ; i <= n ; i++) { for(int j = 0 ; j < i ; j++) cout << "*"; cout << endl; } return 0; }
ALGO
0.999805
3.699848
82f9d6ed-5898-4879-8189-0d9e1783b7ab
AlcivanLucas/Beecrowd
ad-hoc/1397/1397.cpp
#include <iostream> using namespace std; int main(){ int N, A, B, jogador1, jogador2; while(cin >> N){ if(!N) break; jogador1 = 0, jogador2 = 0; for(int i = 0; i < N; ++i){ cin >> A >> B; if(A > B) ++jogador1; else if(B > A) ++jogador2; ...
ALGO
0.999599
3.492223
77ee6dc0-66f9-490d-814d-2f5a1e62e0d2
xcloudyunx/Informatics
islands.cpp
#include <iostream> #include <sstream> #include <vector> using namespace std; vector<vector<char>> grid; vector<vector<int>> visited; int size, W, H; void checkCoordinates(int i, int j) { if (grid[i][j] == '#' && visited[i][j] == 0) { size++; visited[i][j] = 1; if (i != 0) { checkCoordinates(i-1, j); ...
ALGO
0.999523
5.321552
f8b75683-a70e-41fd-a76c-9426bb52d019
w809291634/esp-idf-v5.4.1
examples/_my_examples/esp-iot-solution/components/motor/esp_simplefoc/port/esp/esp_app_fmath.cpp
#include <math.h> #include "common/foc_utils.h" #include "soc/soc_caps.h" #include "IQmathLib.h" float _sin(float a) { _iq iq_radians = _IQ(a); _iq result = _IQsin(iq_radians); return _IQtoF(result); } float _cos(float a) { _iq iq_radians = _IQ(a); _iq result = _IQcos(iq_radians); return _IQto...
TOOL
0.987419
6.084673
de16a563-c9dd-4f1e-af93-1eec43220b45
Corvey/Exercise
ACM/ACM/hiho 1139二分答案/hiho 1139.cpp
#include <cstdio> #include <algorithm> #include <string.h> using namespace std; const int N = 1e4+50, M = 2e5+100; int u[M], v[M], first[N], Next[M], n, m, k, boss; struct node{ int u, v, w; }edge[100100]; bool cmp(const node a, const node b){ return a.w < b.w; } void AddEdge(int from, int to, int t) { u[t]...
ALGO
0.999988
3.891559
9aed181b-e4b3-4750-8e09-672a7c01e300
johngarrett/llvm-research
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.892382
6.120288
304251c4-87c1-4b9f-ba05-76fee1913493
bst-19/miwoosae-C
opencv/sources/samples/gpu/pyrlk_optical_flow.cpp
#include <iostream> #include <vector> #include <opencv2/core.hpp> #include <opencv2/core/utility.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/highgui.hpp> #include <opencv2/video.hpp> #include <opencv2/cudaoptflow.hpp> #include <opencv2/cudaimgproc.hpp> #include <opencv2/cudaarithm.hpp> using namespace std; ...
ALGO
0.912955
6.156531
523c6c71-5c32-4671-8c45-bce111e8b519
venu1201/Competitive-Programming
A_Two_Subsequences.cpp
#include<iostream> #include <set> #include <bits/stdc++.h> using namespace std; int main() { long long int t;cin>>t; while(t--) { long long int n,i,k=999999,a{},b{},c{-999999},d{},x=0,sum{},j=0; long long int y=0; string s,t; cin>>s; map<long long,long long> m; t=s; sort(t.begin(),t.end()); m[t...
ALGO
0.99993
3.70366
eb0108fb-e899-49d4-b3ba-0a6280a0e7c3
thuang86714/LeetCodeCpp2024ver
100. Same Tree.cpp
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), left(left), right(right) {} }; class Solution { public: boo...
ALGO
0.999971
6.76071
5e42f573-c498-401b-9c9a-d4e40100d212
C-2023-1-3/8209230320chuzihao
实验二第2项.cpp
#include <iostream> using namespace std; int main() { double x,y=0; cout << "xֵ"; cin >> x; cout << "xֵΪ" << x << endl; if (x > 0 && x < 1) { y = 3 - 2 * x; } else if (x >= 1 && x < 5) { y = 2 / (4 * x) + 1; } else if(x >= 5 && x < 10) { y = x * x; } cout << "yֵΪ" << y << endl; return 0; }
ALGO
0.998858
3.371359
8d483257-55aa-4ef2-bf5f-da7302613f4b
LevinJ/pypangolin
src/gl/glpangoglu.cpp
#include <pangolin/gl/glpangoglu.h> #include <pangolin/utils/simple_math.h> namespace pangolin { const GLubyte gNotErrorLookup[] = "XX"; const GLubyte* glErrorString(GLenum /*error*/) { // TODO: Implement glErrorString return gNotErrorLookup; } // Based on glu implementation. template<typename P> int Invert...
TOOL
0.875952
6.502697
67068390-645b-4513-b806-5a1aee014c50
DenisCcallo/grafica3
3 beizer/main.cpp
#include<windows.h> #include <GL/glut.h> #include <stdlib.h> #include <math.h> #include<stdio.h> #include<stdlib.h> #include <iostream> using namespace std; GLsizei winWidth=600, winHeight =600; int x1=-1,y1=-1; int coor=0; class wcPt3D { public: GLfloat x, y, z; }; GLint n_CtrlPts = 100, nBezCurvePts = 1000...
ALGO
0.999056
5.045892
d0c06b3f-1011-4544-8358-c0800f7df8b5
webaverse-studios/webaverse
packages/engine-wasm/PhysX/physx/source/physxcooking/src/Quantizer.cpp
#include "Quantizer.h" #include "foundation/PxVec3.h" #include "foundation/PxBounds3.h" #include "PsUserAllocated.h" #include "PsAllocator.h" #include "PsArray.h" #include "CmPhysXCommon.h" using namespace physx; PxU32 kmeans_cluster3d(const PxVec3 *input, // an array of input 3d data points. PxU32 inputSize,...
ALGO
0.997411
6.429296
89403c79-7a46-4618-9baf-6eb9c6e9b680
BangSeIn/Data_Structure_C-
Sort/Sort/Sort.cpp
#define _CRT_NO_SECURE_WARNINGS #include <iostream> #include "Rsort.h" int main() { Data a[SIZE]; int n; cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; } RadixSort(a, n); for (int i = 0; i < n; i++) { cout << a[i] << " "; } return 0; }
ALGO
0.99989
4.699
49815b9f-63e8-4326-a64e-fe088684d182
ishandutta2007/codeforces
andreasyan/normal/825/A.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <string> using namespace std; int n; string ans,a; int main() { int i,j,k=0; cin>>n; cin>>a; for(i=0;i<n;++i) { if(a[i]=='1') { ++k; } else { ans+=(k+'0'); k=0; } } ans+=(k+'0'); cout<<ans<<endl; return 0...
ALGO
0.999966
3.945175
775bc13b-6812-42ad-9af7-3d246007f7c7
aj-ya/dsa
Codeforces/Ed124/B_Prove_Him_Wrong.cpp
#include <iostream> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); unsigned int t, n; cin >> t; while (t--) { cin>>n; if(n>19){cout<<"NO\n";} else{ cout<<"YES\n"; unsigned long long curr=1; while(n--){ ...
ALGO
0.999853
4.064049
0244eaca-b367-41d0-af97-32cc6134dc17
KanishAnand/CompetitiveCoding
CodeforcesContests/education#79/3.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> new_data_set; // // for multiset // // typedef tree<int, null_t...
ALGO
0.999907
4.466371
2035bdc7-e8a5-437b-a146-92fc01d3dd6e
backengineering/llvm-msvc
libcxx/test/libcxx/algorithms/sort_stability.pass.cpp
// <algorithm> // Test std::sort stability randomization // UNSUPPORTED: c++03 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY #include <algorithm> #include <array> #include <cassert> #include <functional> #include <iterator> #include <vector> #include "test_macros.h" struct EqualType ...
TEST
0.963367
7.28363
e19484bb-9e34-47fd-b5d5-44af922e8809
Z-P-J/CppProgrammingEveryday
src/day38/day38.cpp
#include "iostream" using namespace std; /* 写一函数,计算x的y次方(假设x,y都是正整数) */ double fun(int x, int y) { double result = 1; for (int i = 0; i < y; i++) { result *= x; } return result; } int main() { cout << "9^10 = " << fun(9, 10) << endl; system("pause"); return 0; }
ALGO
0.999592
4.325108
42c8c661-ba54-45b7-8116-4bd41a17c552
t-feng/algorithm
ListCopy/ListCopy.cpp
/* Ŀ һÿڵнڵֵԼָ룬һָһڵ㣬һָָһڵ㣩ؽΪƺhead ע⣬벻ҪزеĽڵãֱӷؿգ */ #include <iostream> #include <map> #include <set> using namespace std; struct RandomListNode { int label; struct RandomListNode *next, *random; RandomListNode(int x) :label(x), next(NULL), random(NULL) {} }; RandomListNode* Clone(RandomListNode* pHead) { RandomL...
ALGO
0.999371
3.621515
6ce99b30-fa79-4b44-9eda-0a1cb55d92e8
ZhuangPeng97/BuildFaceFlowDataCode
tools/Fast_RNRR-master/include/igl/copyleft/cgal/point_areas.cpp
#include "point_areas.h" #include "delaunay_triangulation.h" #include "../../colon.h" #include "../../slice.h" #include "../../slice_mask.h" #include "../../parallel_for.h" #include "CGAL/Exact_predicates_inexact_constructions_kernel.h" #include "CGAL/Triangulation_vertex_base_with_info_2.h" #include "CGAL/Triangulat...
ALGO
0.995917
6.429825