uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
b71c6ef5-aad6-4986-b784-e338a305db48
weissms/owb-mirror
development/fontCache/WebCore/xml/XPathPath.cpp
#include "config.h" #include "XPathPath.h" #if ENABLE(XPATH) #include "Document.h" #include "XPathPredicate.h" #include "XPathStep.h" #include "XPathValue.h" namespace WebCore { namespace XPath { Filter::Filter(Expression* expr, const Vector<Predicate*>& predicates) : m_expr(expr), m_predicates(predicat...
TOOL
0.881905
6.876732
a0f7105f-8ae8-4d7c-8c53-256ce4aef096
overtake/TelegramSwift
packages/OCR/Sources/fast-edge.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #include "fast-edge.h" #define LOW_THRESHOLD_PERCENTAGE 0.8 // percentage of the high threshold value that the low threshold shall be set at #define PI 3.14159265 #define HIGH_THRESHOLD_PERCENTAGE 0.10 // percentage of pixel...
ALGO
0.993319
5.75161
697727a6-bf78-420b-9ffd-c51e7de57d79
HeshamAmer/TopCoder
C++/Source.cpp
//https://www.hackerrank.com/contests/booking-hack-a-holiday/challenges/happiness-score #include <iostream> #include <fstream> #include <vector> #include <algorithm> #include <string> #include <memory> #include <stdio.h> #include <iostream> #include <cmath> #include <map> #include <set> #include <stack> #include <queue...
ALGO
0.999738
3.762992
ee2b8408-095b-4c07-aa16-c89044bbc884
Platinumwrist/effective-octo-invention
contracts/eosio.system/src/voting.cpp
#include <eosio/crypto.hpp> #include <eosio/datastream.hpp> #include <eosio/eosio.hpp> #include <eosio/multi_index.hpp> #include <eosio/permission.hpp> #include <eosio/privileged.hpp> #include <eosio/serialize.hpp> #include <eosio/singleton.hpp> #include <eosio.system/eosio.system.hpp> #include <eosio.token/eosio.toke...
TOOL
0.900046
6.638402
fb0b69b8-07ca-446d-99d0-aea0e45caf5f
watyfges/CLearning
C11/C11-2.cpp
#include <stdio.h> long factorial(int n); int main(){ int n; long result; scanf("%d",&n); result=factorial(n); printf("%ld\n",result); return 0; } long factorial(int n){ if (n==0||n==1){ return 1; }else{ return n*factorial(n-1); } }
ALGO
0.999986
4.609921
3f9b2e0a-e6ec-466e-adde-a3412ced43be
willthbill/ExtensionCC
src/cpp/triangulation/polygon_delaunay.cpp
#include<bits/stdc++.h> #include <CGAL/Constrained_Delaunay_triangulation_2.h> #include <CGAL/Triangulation_face_base_with_info_2.h> #include "../cgal.h" #include "../geometry_utils.h" #include "../common.h" #include "../com.h" #include "polygon_delaunay.h" // from https://doc.cgal.org/latest/Triangulation_2/index.htm...
ALGO
0.999375
5.992386
40a88fc9-f19b-4ae7-a33e-a4ea3d992376
romanvorozhbyt/CompPractice2017
Lab 2.9/Lab 2.9.5.cpp
#include <iostream> using namespace std; int main(void) { double matrix[][3] = { { 1, 2, 3 }, { 2, 1, 2 }, { 3, 2, 12} }; int side = sizeof(matrix[0]) / sizeof(matrix[0][0]); bool issymmetric = true; for (int i = 0; i<side; i++) { for(int j = 0; j<side;j++) { if(matrix[i][j]!=matrix[j][i]) { issymmetric= false...
ALGO
0.997976
3.880338
c7dc4ecc-149a-4895-88d2-ed98eba8a60b
zxc-key/ALDS
1_1_B_GreatestCommonDivisor/Source.cpp
#include<iostream> #include<algorithm> using ull = unsigned long long; decltype(auto) a1() { ull a{}, b{}; std::cin >> a >> b; ull r{ 9999 }; while (r != 0) { r = std::max(a, b) % std::min(a, b); a = std::min(a, b); b = r; } std::cout << a << "\n"; } auto rec(ull min_, ull max_, ull r)->decltype(std::...
ALGO
0.999894
4.711647
1bcb7398-edf6-4f22-9ade-58740c9b1ec6
AyushShah2003/Assignments-
LEETCODE SOLUTIONS/Valid Sudoku.cpp
class Solution { public: int coord2gridIdx(int i, int j){ /* grid 0: i: [0-2], j:[0-2] grid 1: i: [0-2], j:[3-5] grid 2: i: [0-2], j:[6-8] */ return i/3 * 3 + j/3; }; bool isValidSudoku(vector<vector<char>>& board) { vector<set<char>> row...
ALGO
0.998956
6.743801
2f3461f2-d7d0-48d5-9e58-708818b05f41
ritwikranjan/ImportantCodes
SquareRoot.cpp
#include<iostream> using namespace std; int main() { float i,inc,p,n; cin>>n>>p; inc = 1; for (int k = 0; k<=p ; k++){ while (i*i<=n){ i=i+inc; } i=i-inc; inc=inc/10; } cout<<i; }
ALGO
0.999932
3.334963
5c8c6830-92ab-4717-8c57-13c6dee61f68
Shrutikatyal/Interview-Preparation
Arrays & Strings/L905. Sort Array By Parity.cpp
/* * Author : Shruti Katyal * Date : 15 May, 2020 * * Compiler : g++ 5.1.0 * Flags : -std=c++14 * */ class Solution { public: vector<int> sortArrayByParity(vector<int>& A) { int low = 0, high = A.size() - 1; while(low < high){ if(A[low]%2 && A[high]%2==0) sw...
ALGO
0.999949
5.713195
804a47ff-e331-45c4-88cc-75acfff5d3ac
univmajalengka/181410045
STD3/caridata.cpp
/* * * caridata.cpp * Contoh penanganan untuk mencari suatu * data didalam array */ #include <iostream> #include <conio.h> using namespace std; int main() { int i, x, ketemu; int data[] = {5, 100, 20, 31, 77, 88, 99, 20, 55, 1}; int jumdata = sizeof(data) / sizeof(int); cout<<"Data semula: "<<endl; for(i...
ALGO
0.998868
3.871913
89e741c6-e44d-4774-abf3-b7cb090ce087
interactivevislab/TrianglePlugin-UE5
TrianglePlugin/Source/libigl-static/include/igl/doublearea.cpp
template <typename DerivedV, typename DerivedF, typename DeriveddblA> IGL_INLINE void igl::doublearea( const Eigen::MatrixBase<DerivedV> & V, const Eigen::MatrixBase<DerivedF> & F, Eigen::PlainObjectBase<DeriveddblA> & dblA) { // quads are handled by a specialized function if (F.cols() == 4) return doublearea...
TOOL
0.9802
7.538044
5e8f5d45-9f97-494d-ae2b-0c7a77b20fb9
PaddlePaddle/Anakin
saber/funcs/impl/x86/saber_power.cpp
#include "saber/funcs/impl/x86/saber_power.h" #include <cmath> namespace anakin{ namespace saber { template <> SaberStatus SaberPower<X86, AK_FLOAT>::dispatch( const std::vector<Tensor<X86>*>& inputs, std::vector<Tensor<X86>*>& outputs, PowerParam<X86>& param) { const float p = param.power;...
ALGO
0.936266
6.640186
e3b9e0e7-6637-4571-b892-17831004bd90
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_7044_6.cpp
#include <bits/stdc++.h> using namespace std; const int MAXN = 200200; const long long MOD = (int)1e9 + 7; const long long INF = (long long)2e18; const int C = 2e4 + 10; long long add(long long a, long long b) { return (a + b) % MOD; } long long sub(long long a, long long b) { a -= b; a %= MOD; if (a < 0) a += MO...
ALGO
0.999896
3.448145
d34c67c4-4bb4-4aa8-b8d2-966f706f6050
kndtty/ProCon
AtCoder/abc/129/abc129_b.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <cmath> #include <queue> #include <numeric> using namespace std; typedef long long ll; long long GCD(long long a, long long b){if(b==0)return a;return GCD(b,a%b);} int main() { int N; cin >> N; vector<int> W(N)...
ALGO
0.999979
4.029821
325f3bb3-32bf-43f0-8fef-2e9dcfb35252
jinsuo1o7/LeetCode
DS__lv1/tree/path_sum.cpp
// Day 6 // https://leetcode.com/problems/path-sum/submissions/ /** * 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) {} *...
ALGO
0.999349
6.435615
9f07abee-3d40-44c8-a216-ac5eb0444f8a
dearlulu/hive
socket_mgr_impl.cpp
/* ** repository: https://github.com/trumanzhao/luna ** trumanzhao, 2016-11-01, <EMAIL> */ #ifdef _MSC_VER #include <Winsock2.h> #include <Ws2tcpip.h> #include <mswsock.h> #include <windows.h> #endif #ifdef __linux #include <sys/epoll.h> #endif #ifdef __APPLE__ #include <sys/types.h> #include <sys/event.h> #include <s...
TOOL
0.92486
6.075297
6cccff97-ee46-4b9f-a888-ea33092fc64b
ahmedFarouk2020/Image_mixer-Dynamic_linking
Dynamic linking/.cpp files/FFT.cpp
#include <iostream> #include <iomanip> #include <complex> #include <cmath> #include <valarray> /* val arrsy to easy making slice for the our arry */ using namespace std; const double PI = 3.14159265359; typedef complex<double> Complex; typedef valarray<Complex> CArray; typedef std::valarray<Complex> CArray; extern "...
ALGO
0.998038
3.669347
19a419f5-d0b3-4994-b832-c3601de6693d
gamecoinproject/gamecoin
src/addrman.cpp
#include "addrman.h" #include "hash.h" #include "serialize.h" #include "streams.h" int CAddrInfo::GetTriedBucket(const uint256& nKey) const { uint64_t hash1 = (CHashWriter(SER_GETHASH, 0) << nKey << GetKey()).GetHash().GetCheapHash(); uint64_t hash2 = (CHashWriter(SER_GETHASH, 0) << nKey << GetGroup() << (has...
TOOL
0.910487
6.790201
0994eb07-cfec-4f7c-ab62-3958045e28b7
neppiness/TIL
problem-solving/boj/solvedac/2475-10-07-2022.cpp
#include <bits/stdc++.h> using namespace std; int main(void) { ios::sync_with_stdio(0); cin.tie(0); int n, ans = 0; for(int i = 0; i < 5; i++) { cin >> n; ans += n*n; } cout << ans%10; }
ALGO
0.999664
3.730445
4dc5c72a-c04a-48fe-b827-a5fafc6d6c3b
zukahai/cpp-basics-tutorial
Quyết/06_mảng/buoi 06/b3.cpp
#include <iostream> using namespace std; int main() { int n; int a[1000]; cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; cout << a[0] << " " << a[n - 1]; } // 0 1 2 3 ... n - 1
ALGO
0.999616
3.194073
fce752b4-7e49-4769-96bb-bcb17fd8d8fc
hundong2/modern-cpp
CPP20/RANGE/ranges_algorithm1.cpp
#include <iostream> #include <vector> #include <ranges> #include <algorithm> int main() { std::vector<int> v = {1,3,5,7,9,2,4,6,8,10}; std::sort(v.begin(), v.end()); std::ranges::sort(v); auto fv = v | std::views::filter([](int n) { return n % 2 == 0; }); std::ranges::replace_if( fv, [](int ...
ALGO
0.999371
4.834817
23679f57-7324-491a-9668-975e07865b0a
AbhinavChauhan549/CPP
Practice/Basic/reversearray.cpp
#include<iostream> using namespace std; void reverse (int arr[], int size){ int start = 0 ; int end = size-1; while(start<=end){ swap(arr[start],arr[end]); start++; end--; } } void printarr(int arr[] , int size ){ for(int i =0 ;i<size ; i++){ cout<<arr[i]<<" ...
ALGO
0.99989
5.064054
f3fb2cd6-f31d-413d-8fe3-d4759ddf1c02
raktimgg/SALSA
src/models/SphereFormer/SparseTransformer/src/sptr/attention/attention_cuda.cpp
#include <vector> #include <THC/THC.h> #include <torch/serialize/tensor.h> #include <ATen/cuda/CUDAContext.h> #include "attention_cuda_kernel.h" void attention_step1_forward_cuda(int N_q, int N_k, int M, int h, int hdim, const unsigned int n_max, at::Tensor q_tensor, at::Tensor k_tensor, at::Tensor index0_tensor,...
DATA
0.979197
4.36777
74b50314-e74e-4590-b1cf-6868ae63eb70
asu-crypto/mpsica
thirdparty/linux/boost/libs/program_options/src/winmain.cpp
#define BOOST_PROGRAM_OPTIONS_SOURCE #include <boost/program_options/parsers.hpp> #include <cctype> using std::size_t; #ifdef _WIN32 namespace boost { namespace program_options { // Take a command line string and splits in into tokens, according // to the rules windows command line processor uses. // ...
TOOL
0.933446
6.211977
fcd03e28-9ae9-4361-8d77-0347ffc69bec
thegamer1907/Code_Analysis
contest/1542558533.cpp
#include <iostream> #include <iomanip> #include <cstdio> #include <algorithm> #include <cstring> #include <cstdlib> #include <vector> #include <set> #include <map> #include <queue> #include <cmath> #include <stack> #include <limits> using namespace std; typedef short i16; typedef long i32; typedef long long i64; // R...
ALGO
0.999591
3.784142
f2edad8f-0196-4388-986b-ac997cd85ac2
Sunidhi-Tiwari/Leetcode
148-sort-list/148-sort-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* sortList(Li...
ALGO
0.999996
5.644218
59706f2f-2afa-41ae-813e-efd727d58bcf
sorinmiroiu97/old-CPP-stuff
git_C++/CLASA/proiect 12/main.cpp
#include <iostream> using namespace std; int a,b,i,d,ok; int main() { cin>>a>>b; if(a>b){aux=a;} for(i=a;i<=b;i++) { ok=1; for(d=2;d<=i/2&&ok;d++) if(i%d==0)ok=0; if(ok)cout<<i<<" "; } return 0; }
ALGO
0.99982
3.40782
fe18912a-96bc-4827-9c3f-f3c6c2277e53
sahilwep/DSA-Workspace
Leetcode/Easy/1346_Check_If_N_and_Its_Double_Exist.cpp
/* // 1346. Check If N and Its Double Exist // Problem Statement: * Given an array arr of integers, check if there exist two indices i and j such that: i != j 0 <= i, j < arr.length arr[i] == 2 * arr[j] // Example: Example 1: Input: arr = [10,2,5,3] Output: true ...
ALGO
0.997813
6.027848
de189161-a92c-45ec-8eab-12fee21f7423
mahiamOmO/Courses-Learn
C++/cpp practice/MemoryAllocation.cpp
#include<iostream> using namespace std; int main(){ int size; std:: cout<,"Enter the size of Array:"; std:: cin>.size; int *dynamicArray = new int[size]; for(int i =0;i<size;++i){ dynamicArray[i] = i*2; std:: cout<<dynamicArray[i]<<" "; } delete[] dynamicArray; re...
TOOL
0.968527
3.383655
d240786b-ae1a-4df4-b9b5-8d344c5d104a
Spenson/Degenerate
Degenerate/AI/Behaviours/cSeek.cpp
#include "cSeek.h" namespace DegenBehaviours { cSeek::cSeek(iEntity* agent, iEntity* target) : mAgent(agent), mTarget(target) { } cSeek::~cSeek(void) { } void cSeek::Update(float dt) { if (mAgent == nullptr || mTarget == nullptr) return; glm::vec3 desired_velocity = glm::normalize(mTarget->Position()...
TOOL
0.944777
5.38121
840d0515-03cc-4467-816e-837d65a7ec43
mharvianto/lf01
Session13/sorting.cpp
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<time.h> struct Data { int score; char name[100]; }; void swap(Data* a, Data* b) { Data t = *a; *a = *b; *b = t; } int partition(Data arr[], int low, int high) { int x = (rand() % (high - low)) + low; swap(&arr[high], &arr[x]); Data ...
ALGO
0.999844
3.984749
d681c944-a8c9-43ed-92eb-71df0ccd12b1
willyPhelan/Programacion1-UTN
Unidad 1/Ejercicios/Alfajores.cpp
///Ejercicio: ALfajores ///Autor:DEK ///Fecha:21-03-2025 ///Comentario: Segundo programa del curso 2025 C1 viernes #include <iostream> using namespace std; int main() { int cantidad, cajas, sueltos ; float importe; // Solicito al usuario la cantidad de alfajores cout << "Ingrese la cantidad de alf...
TOOL
0.94961
4.529785
8e27da34-789e-4198-8590-c89e9ca7dfb3
programMiro24/C-plus-plus
4 Grade/contest.cpp
#include<iostream> using namespace std; int main() { int n,m,s,vz,min,p; int i; cin>>n; cin>>m>>s>>vz; s=m*60+s+(5-vz)*30; min=s; p=1; for(i=2;i<=n;i++) { cin>>m>>s>>vz; s=m*60+s+(5-vz)*30; if(s<min){min=s; p=i;} } m=min/60;s=min%60; cout<<endl; cout<<"P...
ALGO
0.998199
3.428795
2dff7849-6f38-4209-af33-90c47ec7d54a
AlexHPGrall/LeetCodeSolutions
problems/find_the_difference/solution.cpp
class Solution { public: char findTheDifference(string s, string t) { int freq[26] ={0}; for(int i=0; i<s.length();++i ) { freq[s[i]-'a']--; freq[t[i]-'a']++; } freq[t[t.length()-1]-'a']++; for(int i=0;i<26;++i) { if(freq[i]) ...
ALGO
0.999839
5.954255
6117bc41-bf89-4e42-afde-d38906d8d68b
toufique-imam/SOLVED-PROBLEMS
UVA/uva 11953.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n; vector<string>v; bool visited[109][109]; int ax[]= {0,0,-1,1}; int ay[]= {1,-1,0,0}; bool cango(int x,int y) { return x>-1 and y>-1 and x<n and y<n; } void dfs(int x,int y) { visited[x][y]=1; for(int i=0; i<4; i++) { int ...
ALGO
0.99977
5.234806
b23e7535-8297-4b11-a13e-db2d6770684d
PaukIsUha/optimizing_formating_code
predictions/submissions-aizu-gpt35/Codenet/p02276/644122111/response_5.cpp
#include <algorithm> #include <cstdio> using uint = unsigned int; static void print_partition_ints(const int as[], const uint q, const uint n) { auto out_sep = ""; for (auto i = 0u; i < n; ++i) { auto format = (i != q ? "%s%d" : "%s[%d]"); std::printf(format, out_sep, as[i]); out_sep = " "; } std::p...
ALGO
0.999543
4.186422
fb5cb892-f71e-4624-b173-de9989b7fef5
juanvt20/CComp2.1juanv
cvv/arreglos2.cpp
#include <iostream> #include "Point.h" using namespace std; void print(Point array[], int tam){ cout<<"["; for (int i=0; i<tam; i++){ array[i].print(); }cout<<"]"<<endl; } void intercambio(Point &a, Point &b){ Point tmp= a; a=b; b=tmp; } void insertionsort(Point array[], int tam){ ...
ALGO
0.999359
4.35182
dcb70a25-eac2-4d64-9230-2cf956da7eda
ishandutta2007/codeforces
m_99/normal/1512/C.cpp
#include <stdio.h> #include <bits/stdc++.h> using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000001 int main(){ int _t; cin>>_t; rep(_,_t){ int a,b; cin>>a>>b; string s; cin>>s; int n = s.size(); vector<pair<int,int>> p; rep(i,n/2){ int x = i,y = n-1-i;...
ALGO
0.999949
3.571111
0b39bf35-5572-410b-8c86-2ac860711cf9
Muzahid037/Online-Judge-Problems
GeeksForGeeks/Least Prime Factor.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; vector<int>num; int leastPrimeFact(int n) { num[1]=1; for(int i=2;i<=n;i+=2) { num[i]=2; } for(int i=3;i<=n;i+=2) { } } int main() { int t; cin>>t; while(t--) { int n; cin>>n; ...
ALGO
0.999751
4.407034
24f52880-b5dc-42e2-b780-6a3622517c2c
samuelcwait/DataStructures-and-Algorithms
Assignment 5/a5_s_w188/bst.cpp
#include <iostream> using namespace std; struct TreeNode { int value; TreeNode* left; TreeNode* right; }; class MyBST { public: MyBST () { root = NULL; } ~MyBST (); bool Find(int x); void Insert(int x); void PreorderTraversal(); void PostorderTraversal(); void InorderTraversal(); pr...
ALGO
0.99996
5.492949
55d286e4-24e7-4246-a22a-3ccde4b6639b
ajinkyavn1/Codes
codeforces_Old/Closest_Vowels.cpp
#include<bits/stdc++.h> typedef long long int ll; #define do_it_fast ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0) #define vll vector<long long int> #define pll pair<long long int, long long int> using namespace std; void solve(){ ll n; const unsigned int M = 1000000007; cin>>n; string s; cin>...
ALGO
0.999741
4.012529
a6bc75cd-8ea1-4955-967f-ba4532a5bf74
ishandutta2007/codeforces
rubikun/normal/1609/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; } #define all(x) (x).begin(),(x).end() #define fi first #define ...
ALGO
0.99998
4.425054
75a72237-6e43-4d3d-9681-29c83d763356
indrajohn7/Problem-Solving
CPP/Operator_Overloading/complex.cpp
#include<bits/stdc++.h> #define PI 3.14159265 #define SIN(X) sin(X*PI/180) #define COS(X) cos(X*PI/180) #define COMPLEX_MOD(A,B) sqrt(pow(A,2)+pow(B,2)) #define COMPLEX_ARG(A,B) (atan(B/A))*180/PI using namespace std; namespace A{ class comp{ private: float real; float imag; public: comp(float a,float...
ALGO
0.981024
3.266931
ad9916c5-4778-4041-934f-a688dc622b72
c-he/perm
src/torch_utils/ops/filtered_lrelu.cpp
#include <torch/extension.h> #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h> #include "filtered_lrelu.h" //------------------------------------------------------------------------ static std::tuple<torch::Tensor, torch::Tensor, int> filtered_lrelu( torch::Tensor x, torch::Tensor fu, torch::Tens...
TOOL
0.925138
7.3187
74787da0-8e1d-4f49-a41c-ab628e8c30db
dacorp/ThreadSynchronization
2-2018/dekkerov-algoritam.cpp
#include <iostream> #include <cstdlib> #include <unistd.h> #include <signal.h> #include <sys/types.h> #include <sys/ipc.h> #include <sys/wait.h> #include <sys/shm.h> using namespace std; int id; struct ZAP{ int ZASTAVICA[2]; int PRAVO; } *zajednicko; void udji_KO(int i, int j) { (*zajednicko).Z...
TOOL
0.979033
3.195161
5aaf80bb-ce06-4351-b383-a05915d94079
phylovi/bito
src/sbn_maps.cpp
#include "sbn_maps.hpp" #include <algorithm> #include <memory> #include <set> #include <unordered_map> #include <unordered_set> #include <utility> SizeBitsetMap SBNMaps::IdIdSetMapOf(const Node::NodePtr& topology) { SizeBitsetMap map; auto id_count = topology->Id() + 1; topology->Postorder([&map, id_count](cons...
ALGO
0.997602
7.261664
6056c40c-7a51-42f6-9511-8cc74683f2cc
samiulsani/CPP-Programing
practice codeforce problem/C_Simple_Calculator.cpp
#include <bits/stdc++.h> using namespace std; int main() { long long int a, b; cin >> a >> b; cout << a <<" "<< "+"<<" "<< b<<" "<< "="<<" "<< a + b << endl; cout << a <<" "<< "*"<<" "<< b<<" "<< "="<<" "<< a * b << endl; cout << a <<" "<< "-"<<" "<< b<<" "<< "="<<" "<< a - b << endl; return 0...
ALGO
0.998034
4.065132
ef7b01ec-b100-47ee-8995-e2e9e225d93e
Ypostolov/SelfEducation
week_2/task_13_bus_stations/task_13.cpp
#include <iostream> #include <map> #include <string> #include <vector> using namespace std; typedef map<string, vector<string>>& str_vec_map; void new_bus(str_vec_map bus_map, str_vec_map stop_map, string bus, vector<string>& stops) { bus_map.insert(pair <string, vector<string>>(bus, vector<string>())); for (auto& ...
ALGO
0.98074
5.347616
c62bb335-6ecf-4286-a4df-b473979ed0db
neel-kumar/cpp
usaco/diamond2.cpp
#include <iostream> #include <cstdio> #include <map> #include <set> #include <list> #include <string> #include <utility> #include <vector> #include <sstream> #include <algorithm> using namespace std; #define in(N, ii) for(int i = ii; i < N; i++) #define DEV_ENV #ifdef DEV_ENV #define dbg cout << "DEBUG: " #else #de...
ALGO
0.999597
4.115858
827bcb1c-7c56-4043-a6d4-c24fafd8ef6a
UBICO/TinyML-Split-Computing
esp32_board/nn_runner/.pio/libdeps/esp32dev/TensorFlowLite_ESP32/src/tensorflow/lite/micro/kernels/add.cpp
#include "tensorflow/lite/kernels/internal/reference/add.h" #include "tensorflow/lite/c/builtin_op_data.h" #include "tensorflow/lite/c/common.h" #include "tensorflow/lite/kernels/internal/quantization_util.h" #include "tensorflow/lite/kernels/internal/reference/integer_ops/add.h" #include "tensorflow/lite/kernels/inte...
ALGO
0.967934
7.628055
4cb3c87c-24dc-4c7f-9002-fb39c11a17a7
kufan/CPP
课堂代码/4-顺序栈/顺序的栈.cpp
#include <iostream> #include "SeqStack.h" using namespace std; /* 1ݽṹеջģڴеջԵ ڴеջԺֻܶ࣬ģ: Ƚȳһ Ϊֻܲ ջ: Ƚȳ 2ݽṹջص: һջͻ̶ ޷޸ ޷ ޷ ʣ һ ޷޸ ޷ ޷ 3ģⷽʽ 1˳ջ 飬ģջ 2ʽջ ģջ */ typedef struct STUDENT { char name[100]; int age; }Stu; int main() { SeqStack* stack = Init_Stack(); // Stu s1 = { "aaa", 14...
ALGO
0.986013
3.498735
eb582203-9ce3-418a-a95d-1a5c2d8ac58d
KatteMo/CppProject
B7/task_two.cpp
#include <iterator> #include <vector> #include <algorithm> #include <functional> #include "shape.hpp" void task2() { std::vector<Shape::shapePtr> shapes{std::istream_iterator<Shape::shapePtr>(std::cin), std::istream_iterator<Shape::shapePtr>()}; if (!std::cin.eof() && std::cin.fail()) { throw std::inv...
ALGO
0.991521
5.176738
e94ee721-2a66-4138-8e48-8cf6b3590ee1
maheshkumarsingh/PBC
CppAdvanceLearning/kMostFrequentElementUsingPQ.cpp
// C++ program to find the k-most frequent number. #include <bits/stdc++.h> using namespace std; // Compare method to arrange the priority_queue // according to the frequency or lesser value // in case the frequency of two pair matches. struct compare { bool operator()(pair<int, int> p1, pair...
ALGO
0.99998
6.370567
e7b08c92-abc8-4675-92d7-b4c22b39fec8
RIUit/C-
bai10_SetMap.cpp
#include<iostream> #include<set> using namespace std; int main(){ int n, m; cin >> n >> m; int a[n]; for(int i = 0; i < n; i++){ cin >> a[i]; } set<int>setB; for(int i = 0; i < m; i++){ int x; cin >> x; setB.insert(x); } for(int x : a){ if(setB.count(x)){ cout << x << " "; setB.erase(x); } } ...
ALGO
0.999875
3.202854
1d61ecb5-26a5-4551-ab6d-79a5be50f52b
shubhamaryal/LearnCode
_College/OOP/LAB_5/4.cpp
/* create classes c1 and c2 with each having one private member. Add member function to set a value for each class. Add one more function max() that is friendly to both classes. max() function should compare two private member of two classes and show maximum among them, Create one_one object of each class and then se...
ALGO
0.977929
4.588521
0cedbbbd-fb5c-4ef8-b5a9-7f9c0048d9cb
ErikHK/inkscape_animation
src/libavoid/tests/inlineoverlap06.cpp
// From Routing_2a-broken_libavoid-debug. #include "libavoid/libavoid.h" using namespace Avoid; int main(void) { Router *router = new Router( PolyLineRouting | OrthogonalRouting); router->setRoutingPenalty((PenaltyType)0, 50); router->setRoutingPenalty((PenaltyType)1, 0); router->setRoutingP...
ALGO
0.981182
5.245733
551e813d-2e25-4e1c-8b04-0cc4140e6d5c
SDmodding/PseudoSource
ufg/madscience/project/sdhd/sdhd_pc/source/vehicles/ai/crumbtrail.cpp
// File Line: 19 // RVA: 0x64A900 void __fastcall UFG::CrumbTrail::DebugDraw(UFG::CrumbTrail *this, UFG::qColour *color, int numCrumbsOverride) { int mCount; // eax int v6; // ebx int mLast; // ecx float x; // xmm6_4 float z; // xmm7_4 float y; // xmm8_4 int v11; // esi UFG::Crumb *v12; // rcx float v...
TOOL
0.866749
3.183383
a4745f0f-6182-4c6d-94c3-56336cbb8a96
Misquic/Engineering-degree-in-Plasma-Simulations
ch3/v1/Species.cpp
#include "Species.h" #include "Rnd.h" /*Particle constructors*/ Particle::Particle(type_calc x, type_calc y, type_calc z, type_calc u, type_calc v, type_calc w, type_calc macro_weight) noexcept: pos{x, y, z}, vel{u, v, w}, macro_weight{macro_weight} { }; Particle::Particle(type_calc3 pos, type_calc3 vel, type_calc mac...
TOOL
0.938782
5.187126
cb7cf01e-c899-4eaa-8dda-4975bd0980a2
Samdroid27/DSA
DS & Algo/Tree/BuildTree_fromPre&Postorder.cpp
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ int search(vector<int> &inorder,int curr,int start, int end){ for(int i= start;i<=end;i++){ if(inorder[i]==curr){ ...
ALGO
0.999989
5.880559
ebdd41c4-a941-4fa4-a5d9-685db99f96fa
maxco2/leetcode
best-time-to-buy-and-sell-stock-ii.cpp
// // @lc app=leetcode.cn id=193933885 lang=cpp // // [193933885] best-time-to-buy-and-sell-stock-ii [买卖股票的最佳时机 II] // const int N=3e4+10; class Solution { public: int dp[N][2]; int maxProfit(vector<int>& prices) { memset(dp,0,sizeof(dp)); dp[0][0]=-prices[0]; dp[0][1]=0; int res...
ALGO
0.999643
5.772494
e269b7de-1ed0-455b-8b90-5964aac879d3
LidiaMil/open_mpi
HelloMPI/HelloMPI.cpp
#include <stdio.h> #include "mpi.h" #include <clocale> #include <Windows.h> int main(int argc, char* argv[]) { int ProcNum, ProcRank, RecvRank; MPI_Status Status; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &ProcNum); printf("PN = %d", ProcNum); MPI_Comm_rank(MPI_COMM_WORLD, &ProcRank); if (ProcRank ==...
ALGO
0.996493
3.040869
1f292c39-af27-4473-9808-1ed6e6f9d974
ivk22/Data_Structures_and_Algorithm
Advanced_Algorithms_and_Complexity/Week_3/5.3.3.cpp
// 5.3.3.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <vector> #include <iostream> #include <list> #include <iomanip> #include <cmath> #include <math.h> #include <string> #include <set> #include <map> #include <algorithm> using namespace std; int main() { int n ...
ALGO
0.999532
3.561564
8d584a47-4ab6-4817-a787-f24b76b99265
Ryan-Brosius/openGL-Doom-Engine
src/utils/LinearAlgebraUtils.cpp
#include "LinearAlgebraUtils.h" #include <iostream> float angleCCW(const glm::vec3& A, const glm::vec3& B, const glm::vec3& C) { glm::vec3 AB = A - B; glm::vec3 BC = C - B; if (glm::length(AB) > 0.001f) AB = glm::normalize(AB); if (glm::length(BC) > 0.001f) BC = glm::normalize(BC); ...
ALGO
0.997355
6.656476
8d93c792-cb81-47e7-9696-5fb927cfb333
Shahraaz/CP_S5
codeforces/DIV2_602/d.cpp
//Optimise #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; // #define multitest 1 #ifdef LOCAL #define db(...) ZZ(#__VA_ARGS__, __VA_ARGS__); #define pc(...) PC(#__VA_ARGS__, __VA_ARGS__); template <typename T, type...
ALGO
0.999994
4.221378
4d0e6238-18c3-4898-8134-7844e28056c7
istiak7/CompettiveProgramming
codeforces/1189/B.cpp
///*BISMILLAHIR RAHMANIR RAHIM*/// #include <bits/stdc++.h> #define ll long long int #define pb push_back #define endl '\n' #define rep(i, n) for (int i = 0; i < (n); ++i) #define optimize() ios_base :: sync_with_stdio(0);cin.tie(0);cout.tie(0); #define max_size 1000001 using namespace std; // freopen("input.txt","r",s...
ALGO
0.999998
3.680279
df261dcf-165c-41c8-9829-fe26f0f3a3b1
Jisan10667/Problem-Solving-Practice
Codeforces Round 893 (Div 3) /B/B.cpp
//Bismillahir Rahman-ir Rahim #include<complex> #include<queue> #include<set> #include<unordered_set> #include<list> #include<chrono> #include<random> #include<iostream> #include<algorithm> #include<cmath> #include<string> #include<vector> #include<map> #include<cstdio> #include<cstring> #include<string> #include<stdli...
ALGO
0.9998
3.735329
2b860fe4-1f27-40d9-ab53-27e9a28353a7
alexandraback/datacollection
solutions_5686313294495744_0/C++/samurdhilbk/2016_1B_C_1.cpp
#include<bits/stdc++.h> using namespace std; #define NIL 0 #define INF INT_MAX typedef long long ll; typedef pair<ll, ll> pr; typedef pair<string, ll> prr; int main(){ ios_base::sync_with_stdio(false); int tt; cin>>tt; for(int t=0;t<tt;t++){ ll n; cin>>n; vector<prr> firsts; vector<prr> seconds; for(in...
ALGO
0.999848
3.988264
9a13ddfa-c304-407b-97dc-f3d131f231b0
ishandutta2007/codeforces
ashishgup/normal/1567/D.cpp
#include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" #define int long long const int N = 105; string s; int n; int32_t main() { IOS; int t; cin >> t; while(t--) { cin >> s >> n; int sum = 0; for(auto &it:s) sum += (it - '0'); ...
ALGO
0.999948
5.069366
c1a4a39d-a6cf-41b8-b960-f41b934666e5
riadath/problem-solves
Codeforces/1473C.cpp
#include <bits/stdc++.h> using namespace std; #ifdef IHAVETOPEE #include "debug.h" #else #define debug(args...) #endif long long oll = 0; #define ll long long #define ull unsigned long long #define FIO \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #defi...
ALGO
0.999889
4.047378
6b7b71bc-2683-4d1c-add7-531d051af79b
ranjin/MyAlgorithm
MyAlgorithm/队列/QueueWithTwoStacks.cpp
#include "QueueWithTwoStacks.hpp" class CQueue{ public: stack<int> stack1; stack<int> stack2; CQueue(){} void appendTail(int value){ stack1.push(value); } int deleteHead(){ if (stack2.empty()) { while (!stack1.empty()) { int value = stack1.top(); ...
ALGO
0.988951
4.678603
12ee73f5-e785-43eb-8487-ba681d7c7a00
talhaa101/Problem_solving_cpp
typecovo.cpp
#include<iostream> using namespace std; int main() { double div1 = 7 / 2; // Integer division, then conversion double div2 = 7.0 / 2; // Floating-point division double div3 = 7 / 2.0; // Floating-point division double div4 = 7.0 / 2.0; // Floating-point division cout << div1 << '\n' << div2 << '\n'...
ALGO
0.877826
3.410986
b2e2360f-d7de-4e9f-9244-41343e8478de
eugenis/boost-nacl
libs/graph/example/visitor.cpp
// BFS categorized directed graph // tree: 0 --> 2 // tree: 2 --> 1 // tree: 2 --> 3 // cycle: 1 --> 1 // cycle: 1 --> 3 // cycle: 3 --> 1 // tree: 3 --> 4 // cycle: 4 --> 0 // cycle: 4 --> 1 #include <boost/config.hpp> #include <iostream> #include <vector> #include <algorithm> #include <utility> #include <string> #i...
ALGO
0.999825
5.928034
e722ebe8-ab8e-47fb-b7ad-2ed51cd29eeb
ayafullcrit/TRR
dijsktra.cpp
#include <iostream> #include <math.h> using namespace std; double INF = 10000; int main() { int n = 8; double f[n][n] = { {0, 12, 18, 0, 0, 0, 0, 0}, {12, 0, 5, 13, 6, 0, 0, 0}, {18, 5, 0, 5, 0, 25, 0, 0}, {0, 13, 5, 0, 5, 15, 0, 0}, {0, 6, 0, 5, 0, 1, 15, 0}, {0,...
ALGO
0.999982
3.744443
48d9132b-12a8-4c41-98c9-2a49046e2346
sdwvskyo/C-Cplusplus
0916/string.cpp
#include <iostream> #include <string> #include <vector> using namespace std; int main(int argc, const char *argv[]) { string str = ""; while (cin >> str) { for (int i = 0; i != str.size(); i++) { cout << str[i] << endl; } } return 0; }
ALGO
0.98748
4.022366
d59673da-8c83-40c5-9e4b-c4261913add7
Quezia-Marcelli/lista-9
exercicio1.cpp
#include <stdio.h> #include <stdlib.h> void somarMatrizes(int matA[3][3], int matB[3][3], int resultado[3][3]) { for (int linha = 0; linha < 3; linha++) { for (int coluna = 0; coluna < 3; coluna++) { resultado[linha][coluna] = matA[linha][coluna] + matB[linha][coluna]; } } } int ma...
ALGO
0.999454
5.420918
3bd51e67-81fb-4bf2-b914-f10433961e3d
Deepak-png981/Data_Structures_And_Algorithms
0452-minimum-number-of-arrows-to-burst-balloons/0452-minimum-number-of-arrows-to-burst-balloons.cpp
class Solution { public: int findMinArrowShots(vector<vector<int>>& p) { sort(p.begin(), p.end()); int lastpoint = p[0][1]; int ans = 1; for(auto point : p) { if(point[0] > lastpoint) { ans++; lastpoint = point[1]; } ...
ALGO
0.999988
6.283879
be425417-7fee-4c92-a9ec-dbf34244cc7d
TusharPachouri/DSA_AtoZ
AtoZ/01_Basics/Strings/ReverseEachKelementsForEvery2kplace.cpp
class Solution { private: bool isVowel(char ch) { ch = tolower(ch); return (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u'); bool isStringAllVowel(string s){ string str = "aeiou"; for(char ch: str){ if(s.find(ch) == string::npos){ return...
ALGO
0.999836
6.464099
bcb07395-1cf1-4f05-8888-dd8b251dbb66
arponr/usaco
Training/Chapter 4/4.1/fence8.cpp
/* ID: arpon.r1 PROG: fence8 LANG: C++ */ #include <iostream> #include <fstream> using namespace std; #define MAXB 50 #define MAXR 1023 int nboards, nrails, boards[MAXB], rails[MAXR], minboard[MAXR], boardsum, railsum[MAXR], goal, useless, allowed; ofstream fout("fence8.out"); int qcmp (const void * a, co...
ALGO
0.999889
3.63024
fb7e3a7c-114e-4310-bace-2fd117a35259
DefineTheta/project-euler
problem_50.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <chrono> bool isPrime(long n){ if(n % 2 == 0){ return false; } for(int i = 3; i <= int(floor(sqrt(n))); i+=2){ if(n % i == 0){ return false; } } return true; } int main(){ int cutOff; int maxSumCount = 0; int maxPr...
ALGO
0.999945
4.790075
5f02b9bb-bf62-473a-9653-a75a1b8b4fb5
galacticor/cpp
TLX/Lanjutan/Struktur Data Dasar/Penghancuran Batu.cpp
#include <bits/stdc++.h> #define fi first #define se second using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef vector<pii> vii; typedef vector<int> vi; const int MOD=1000000007; vi v; int n,ans; int main(){ ios_base::sync_with_stdio(false); ...
ALGO
0.999987
4.006207
a4257ed1-d8f7-42ac-b838-8cb9e3a001b3
liguigui/kamyu104-LeetCode
C++/subsets.cpp
// Time: O(n * 2^n) // Space: O(1) class Solution { public: vector<vector<int> > subsets(vector<int> &nums) { vector<vector<int>> result(1); sort(nums.begin(), nums.end()); for (size_t i = 0; i < nums.size(); ++i) { const size_t size = result.size(); for (size_t j = ...
ALGO
0.999971
6.392804
fa1ea886-8af5-496e-baad-a649d8c1739d
AnonMiraj/Competitive-solving
Codeforces/Codeforces Round 947 (Div. 1 + Div. 2)/C. Chamo and Mocha's Array.cpp
// ﷽ // Contest: Codeforces Round 947 (Div. 1 + Div. 2) // Judge: Codeforces // URL: https://codeforces.com/contest/1975/problem/c // Memory Limit: 256 // Time Limit: 2000 // Start: Sat 25 May 2024 06:29:45 PM EEST // Reading Time : // Thinking Time : // Coding Time : // Comments : #include<bits/stdc++.h> #ifdef A...
ALGO
0.999282
4.430922
e9af81af-5882-4e81-a4c8-23df28746474
ishandutta2007/codeforces
alexandr_ts/normal/701/B.cpp
#include <bits/stdc++.h> #define fr(i, n) for (int i = 0; i < n; i++) #define frab(i, a, b) for (int i = a; i < b; i++) #define pb push_back #define mp make_pair using namespace std; typedef long long ll; typedef long double ld; const int N = 2e5; const int M = 1e3 + 10; const int INF = 2e9 + 1; const ld EPS = 1e-10...
ALGO
0.999872
3.691155
60ab5edd-12d2-4cdc-a6f7-20a0ecbde6a3
MaxHotiuk/C-
homework_programming/praktyka/000.cpp
#include <iostream> #include <math.h> using namespace std; int main() { double a, z1, z2; cout << "Variable:" << endl; cin >> a; z1 = cos(a) +pow(sin(3 * M_PI - a), 2) + cos(3 * a); z2 = 2 * sqrt(2) * cos(a) * sin((1 / 4) * M_PI + 2 * a); std::cout << "Z1 = " << z1 << endl; std:...
ALGO
0.992736
3.584673
2632078f-9126-46a1-906a-7f75389f2a65
wazedrifat/Vjudge
CodeChef/FLOW006/11823311_AC_0ms_15257kB.cpp
//wazed rifat #include<bits/stdc++.h> using namespace std; #define LLI long long int int t,i,sum,l; string s; int main( ) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); // freopen("input1.txt","r",stdin); cin>>t; while(t--) { cin>>s; l=s.length(); for(i=0,sum=0 ; i<l ; i++) sum+=s[i...
ALGO
0.999554
4.228043
0096bf38-391e-42df-b087-fbb90189decc
VladSaioc/oopsla-24-artifact
gcatch/tools/z3/src/util/fixed_bit_vector.cpp
#include<climits> #include "util/fixed_bit_vector.h" #include "util/trace.h" #include "util/hash.h" void fixed_bit_vector::set(fixed_bit_vector const& other, unsigned hi, unsigned lo) { if ((lo % 32) == 0) { unsigned sz32 = (hi-lo+1)/32; unsigned lo32 = lo/32; for (unsigned i = 0; i < sz32;...
TOOL
0.9095
6.11546
07d91303-68f7-48c0-a25d-1c9c53339906
KDE/bovo
src/ai/gabor/node.cpp
#include "node.h" #include "ai_impl.h" #include <cassert> Node::Node(Standing *_standing, AiImpl *ai) : standing(_standing) , parent(nullptr) , child(nullptr) , depth(0) , signum(_standing->current == 0 ? 1 : -1) , alpha(MinHeur - 1) , beta(MaxHeur + 1) , is_exact(false) , evaluate...
ALGO
0.997849
5.216154
6deaf95a-61e7-4a86-bcea-43b5fa17ead1
SMurph32/football
PassYards.cpp
/********************************************************************* * ** Function: PassYards.cpp * ** Description: Determines the length of the pass attempt based on which play was called * the play outcome is not determined here, just how many yards the pass is tryin gfor * ** Parameters: * ** Pre-Condit...
ALGO
0.992594
3.599663
04ac7c94-0221-490f-aea9-d6b6c663b3db
cinit/libunwindstack
lzma/CPP/7zip/Crypto/RandGen.cpp
// RandGen.cpp #include "StdAfx.h" #include "RandGen.h" #ifndef USE_STATIC_SYSTEM_RAND #ifndef _7ZIP_ST #include "../../Windows/Synchronization.h" #endif #ifdef _WIN32 #ifdef _WIN64 #define USE_STATIC_RtlGenRandom #endif #ifdef USE_STATIC_RtlGenRandom #include <ntsecapi.h> EXTERN_C_BEGIN #ifndef RtlGenRandom ...
TOOL
0.888081
5.347535
d9938dd4-3365-44a0-b909-bf45b899944f
abhishekraut1/DSA_Problems
maximum_difference_in_array.cpp
#include<bits/stdc++.h> #define nl endl using namespace std; // tc=O(n^2) int maxDiff(int arr[],int n){ int diff=0; for(int i=0;i<n;i++){ for(int j=i+1;j<n;j++){ if(arr[j]-arr[i]>diff) diff=arr[j]-arr[i]; } } return diff; } // tc=O(n) int maxDiff2(int arr[],int n...
ALGO
0.999867
4.184594
0f845c7e-cbf1-48b4-8d6c-7c19f49af0ea
ishandutta2007/codeforces
dk1227/normal/1140/B.cpp
#include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <cmath> #include <ctime> #include <chrono> #include <random> #include <bitset> #include <vector> #include <cstdio> #include <cstdlib> #include <cstring> #include <cassert> #include <iostream> #include <algorithm> #include <unorder...
ALGO
0.999916
3.504161
8c57d745-00cf-44b9-81f2-88668793ae8c
damidam125/KMU_2015_2
algorithm/hw3/Parenthesis.cpp
/********************* 20123434 Ȳ Problem E - Parenthesis ȣ ˸° Ȯϴ α׷ *********************/ #include <iostream> #include <fstream> #include <cstring> #define MAXLEN 50+5 using namespace std; /*************** param_ arr : string(input line). arrsize : lenth of arr[] idx : current index of arr numOp: number of '(...
ALGO
0.999949
4.603905
c151ea0b-0995-408b-a644-392d2d9f33dd
SuryaKshetra/project.github.io
Veeresh/bubblesort.cpp
#include <iostream> using namespace std; void bubbleSort(int A[], int n) { for (int i = 0; i < n - 1; i++) { for (int j = 0; j < n - 1 - i; j++) { if (A[j + 1] < A[j]) { int temp = A[j]; A[j] = A[j + 1]; A[j + 1] = temp; } } ...
ALGO
0.999922
5.605783
1e59bee3-2432-4792-8d42-378e8f7f7054
risingOSS/frameworks_av
media/module/codecs/amrnb/common/src/q_plsf.cpp
/* ******************************************************************************** * * GSM AMR-NB speech codec R98 Version 7.5.0 March 2, 2001 * R99 Version 3.2.0 * REL-4 Version 4.0.0 * *********************************************************...
ALGO
0.915387
5.540532
5258088b-df83-4439-8d7d-63730fc9859e
ChandraPratap01/Leetcode-codes
0861-score-after-flipping-matrix/0861-score-after-flipping-matrix.cpp
class Solution { public: int matrixScore(vector<vector<int>>& grid) { int row=grid.size(); int column=grid[0].size(); int sum=0; sum+=pow(2,column-1)*row; for(int i=1;i<column;i++){ int ones=0; int zeroes=0; for(int j=0;j<row;j++){ ...
ALGO
0.999964
6.463845
ab7d4663-e0a6-4f2a-b2d0-f56b36bee8b0
minombreesjeff/darwin_env
libsecurity_utilities/lib/threading.cpp
// // threading - generic thread support // #include <security_utilities/threading.h> #include <security_utilities/globalizer.h> #include <security_utilities/memutils.h> #include <unistd.h> // WWDC 2007 thread-crash workaround #include <syslog.h> // WWDC 2007 thread-crash workaround // // Thread-local storage...
TOOL
0.908316
7.20414
414b4f7a-d6d6-4676-95f5-c90a44809811
manforowicz/competitive-coding
club/2023-spring/contest1/d.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int parent = -1; int childrenCount = 0; int black = 0; int white = 0; }; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); //freopen("in.txt", "r", stdin); int tests; cin >> tests; for (int t = 0; t < tests; t++) { int n; cin >> n; v...
ALGO
0.999655
5.455698
7c7af87f-b4d5-4cd8-9fa2-2b1bdd675c0c
MagYou/Network-Survivability
source/BC.cpp
#include <ilcplex/ilocplex.h> #include <lemon/list_graph.h> #include <stdio.h> #include <fstream> #include <math.h> #include <stdlib.h> #include <iostream> #include <vector> #include <algorithm> #include <string.h> #include <random> #include <list> #include <ctime> #include <iostream> #include <string> #include <fil...
ALGO
0.992825
3.791167