uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
cd483441-103e-4e4a-a547-cf92dc348fd4
kt0415/Data-Structures
Stacks & Queues/infix-to-prefix.cpp
#include <bits/stdc++.h> using namespace std; int precedence(char ch) { if(ch == '^') return 3; else if(ch == '*' || ch == '/') return 2; else if(ch == '+' || ch == '-') return 1; else return -1; } string infixToPostfix(string& s) { int n = s.size(); stack<char>st; string ans = ""; ...
ALGO
0.999687
5.234042
667bf385-487a-4304-bda5-78dcc2628e24
yegemen/CProgrammingFiles
lisans/teorik/11_4.cpp
#include <stdio.h> #include <conio.h> #include <math.h> int main() { struct nokta{ float x; float y;}; struct nokta A,B; float uzaklik; puts("A noktasinin koordinatlarini giriniz: "); scanf("%f %f",&A.x,&A.y); puts("B noktasinin koordinatlarini giriniz: "); scanf("%f %f",&B.x,&B.y); uzaklik=sqrt(((A.x-B....
ALGO
0.961523
3.700186
76c54c20-234c-4b87-b24d-fb022ca2893f
codemistic/Data-Structures-and-Algorithms
CPP/questions/BUYPLSE.cpp
//ramnit_code_27 #include <bits/stdc++.h> using namespace std; int main() { int a,b,x,y; cin>>a>>b>>x>>y; cout<<(a*x)+(b*y)<<"\n"; return 0; }
ALGO
0.978023
3.311507
ed322cf4-56c4-45a3-b9f8-af7e553b4dc7
D1-86939-Prajwal/CPP
Assignment 6/Question2.cpp
#include <iostream> using namespace std; unsigned int factorial(unsigned int n) { if (n == 0 || n == 1) return 1; return n * factorial(n - 1); } int main() { int num; cout << "Enter the Number: "; cin >> num; try { if (num < 0) { throw 1; } cout << "Factorial ...
ALGO
0.997955
5.157621
2cc07a4d-604c-4402-9e68-250800715278
pawanmsr/n-methods
test/simple_test.cpp
// STLs // #include <fstream> #include <string> #include <iostream> #include <vector> #include <cassert> // NMethods // #include <primes.hpp> #include <exponentiation.hpp> #include <gcd.hpp> #include <sort.hpp> #include <modulo.hpp> // Constants enum enumerate { primes, exponentiation, gcd, sort, ...
TEST
0.935725
5.390561
bf84f40a-4c69-4426-8d42-b412f313d4b5
minkwankim/OP2A2
FDTD1D/GRID_V2/ProcessingFindStencil.cpp
#include <omp.h> #include "Gridv2.hpp" #include "./COMMON/ExceptionGeneral.hpp" #include "./COMMON/ErrorCode.hpp" #include "./MATH/Vector.hpp" #include "./MATH/Area.hpp" namespace GRID { void Processing_Find_Stencil(c_Grid& grid) { c_Cell* CL; c_Cell* CR; c_Cell* CLL; c_Cell* CRR; int dim = grid.Info.DIM; do...
ALGO
0.999766
4.996247
453896ae-3d0a-4bb9-8e2a-82388f6c3a81
vigneshm2/cp
solutions/codechef/posttree.cpp
// Created by Vignesh Manoharan #include <iostream> #include <vector> #include <algorithm> #include <cstdio> #include <cmath> #include <map> #include <queue> #include <stack> #include <set> #include <numeric> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; typedef pair<int...
ALGO
0.999961
3.934541
8c7d4ca4-ebe4-4469-90d7-aec6e5d423fc
turbulenz/tbb-ios
examples/GettingStarted/sub_string_finder/sub_string_finder_extended.cpp
#if __TBB_MIC_OFFLOAD #pragma offload_attribute (push,target(mic)) #endif // __TBB_MIC_OFFLOAD #include <iostream> #include <string> #include <algorithm> #include "tbb/parallel_for.h" #include "tbb/blocked_range.h" #include "tbb/tick_count.h" #if __TBB_MIC_OFFLOAD #pragma offload_attribute (pop) class __declspec(ta...
ALGO
0.999441
6.627594
935d7cef-9977-4c28-b7cc-c7ed21b4237a
Lancelot0902/LeetCode
leetcode/1.TwoSum/solution.cpp
#include <iostream> #include <vector> #include <map> /* 暴力 */ std::vector<int> twoSum(std::vector<int> &nums, int target) { std::vector<int> ans; for (int i = 0; i != nums.size(); ++i) { for (int j = i + 1; j != nums.size(); ++j) { if (nums[i] + nums[j] == target) { ...
ALGO
0.999851
5.238884
cb0c2d65-fac9-4ce6-82e9-94ed1430b464
alexandraback/datacollection
solutions_5630113748090880_1/C++/fruwajacybyk/b.cpp
#include <bits/stdc++.h> #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define FORD(i, a, b) for(int i = (a); i >= (b); --i) #define VAR(v, i) __typeof(i) v=(i) #define FORE(i, c) for(VAR(i, (c).begin()); i != (c).end(); ++i) #define all(v) (v).begin(),(v).end() #define VI vector<int> #define PII pair<int,int> #define ...
ALGO
0.997605
3.193528
54dc38ed-4c83-48e1-94d4-e2af0fe59136
hung1605/DSA_PTIT
thuchanhbai10.cpp
#include <bits/stdc++.h> using namespace std; vector<int> List[1005]; bool chuaxet[1005]; void DFS(int u){ chuaxet[u] = false; for(int v : List[u]) if(chuaxet[v]) DFS(v); } void testCase(){ for(auto &i : List) i.clear(); int n, m; cin >> n >> m; for(int i = 0; i < m; i++){ int u, v; cin >> u >> v; List...
ALGO
0.999781
5.435026
a7d11b95-c35e-48b8-ab8b-f141b194ef54
maddoggin/platform_frameworks_av
media/libstagefright/codecs/amrnb/enc/src/convolve.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/convolve.c Date: 06/19/2000 ------------------------------------------------------------------------------ REVISION HISTORY Description: Optimize for speed. Update to code template. Descriptio...
ALGO
0.999961
6.320671
a0cd1287-8ce6-452b-a919-07ebcd8b7d82
BDeirth/C_plus_plus
8-16/main (10).cpp
//Programmer: Brianna Deirth //Date: 7/26/2023 //Purpose: Program simulates a pick-5 lottery game. Generates and stores 5 distinct numbers between 1-9 into an array. Then the program prompts the player to neter five distinct numbers between 1-9 and stores them into another array. The program then compares and determine...
ALGO
0.998868
4.971568
ebef912b-9520-41fc-b0a7-df0d4340d8ee
kosenijr/cpp
.history/three_string_values_20240529231500.cpp
#include "std_lib_facilities.h" int main() { // variables // declare the three objects string str1, str2, str3; // string strTest = "Hey"; // char letter = tolower(strTest[0]); // returns a numeric position if not stored in a char object. char char1 = tolower(str1[0]); char char2 = tolower(...
ALGO
0.906848
4.441525
ca903052-7c41-4b03-93ff-9df5d452f350
Abhishekjha002/Competitive_programming
Graph/BFS.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; class Edge { public: int v = 0; int w = 0; Edge(int v, int w) { this->v = v; this->w = w; } }; int N = 7; vector<vector<Edge>> graph(N,vector<Edge>()); //add Edge void addEdge(vector<vector<Edge>>& gp, i...
ALGO
0.999716
4.015369
75eb5230-3e0f-4cdc-ae2f-339e6a5236d6
BhaveshJangir/Pattern-Solving-
Pattern/triangle2.cpp
#include <iostream> using namespace std; int main() { int n = 5; for(int i=0;i<n;i++){ for(int j=0;j<5;j++) { if(i+j>=n-1) cout<<"*"; else cout<<" "; } cout<<endl; } } /*Output * ** *** **** ***** */
ALGO
0.9996
3.299405
e2275d53-743a-4c72-8a46-889b48c9bf78
Telpash46/Telegram-june2025androidcontest
TMessagesProj/jni/third_party/openh264/src/codec/common/src/intra_pred_common.cpp
#include "ls_defines.h" #include "cpu_core.h" #include "intra_pred_common.h" void WelsI16x16LumaPredV_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) { uint8_t i = 15; const int8_t* kpSrc = (int8_t*)&pRef[-kiStride]; const uint64_t kuiT1 = LD64 (kpSrc); const uint64_t kuiT2 = LD64 (kpSrc + 8); uint...
ALGO
0.99868
5.886383
fc11a42f-14d3-419f-bd71-634a95fd189e
rohitramteke1/CPP
STL PRACTISE/SET/set.cpp
#include <iostream> #include <set> using namespace std; // set follows the binary search tree implementation // The values in a set are unindexed. int main() { // set<int> val; // defining an empty set // set<int> val = {6, 10, 5, 1}; // defining a set with values set<int, greater<int>> s...
ALGO
0.870604
4.184216
57ec8ff6-82a9-4dda-adfc-1d0b1d4ff5fb
armory3d/haxebullet
bullet/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp
#if defined (_WIN32) || defined (__i386__) #define BT_USE_SSE_IN_API #endif #include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h" #include "btConvexPolyhedron.h" #include "LinearMath/btConvexHullComputer.h" #include <new> #include "LinearMath/btGeometryUtil.h" #include "LinearMath/btGrahamScan2dConvexHu...
ALGO
0.980915
7.034167
746b5a4e-f6a1-447f-b8e5-1e75a1504ab2
ishandutta2007/codeforces
chemthan/normal/573/B.cpp
#include <bits/stdc++.h> using namespace std; #define ms(s, n) memset(s, n, sizeof(s)) #define FOR(i, a, b) for(int i = (a); i < (b); i++) #define FORd(i, a, b) for(int i = (a) - 1; i >= (b); i--) #define sz(a) int((a).size()) typedef long long ll; typedef unsigned long long ull; typedef long double ld; typedef pair<i...
ALGO
0.999992
4.541726
02e84172-d9ac-4923-861f-6d01af3b11bf
yuta-kumagai/opencv-docker
opencv-4.5.3/modules/core/src/count_non_zero.dispatch.cpp
#include "precomp.hpp" #include "opencl_kernels_core.hpp" #include "stat.hpp" #include "count_non_zero.simd.hpp" #include "count_non_zero.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content namespace cv { static CountNonZeroFunc getCountNonZeroTab(int depth) ...
ALGO
0.974689
7.350976
8423ae57-1f72-43e9-b0a3-dae704ce93d0
Vivekrathore2002/DSA-Coding
Power Of Numbers - GFG/power-of-numbers.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: //You need to complete this fucntion int mod = 1000000007; long long power(int N,int R) { //Your code here if(R==1)return N%mod; long long half = power(N,R/2); ...
ALGO
0.999955
5.840107
acaf4686-d8e4-47b4-b630-ffd3c7471df9
therealholger/CelestialCash
src/Common/FormatTools.cpp
#include "FormatTools.h" #include <cstdio> #include <ctime> #include <config/CryptoNoteConfig.h> #include "CryptoNoteCore/Core.h" #include "Rpc/CoreRpcServerCommandsDefinitions.h" #include <boost/format.hpp> namespace Common { //-------------------------------------------------------------------------------- std::str...
TOOL
0.851795
6.158383
5d3f1a35-953a-46fc-bcd5-1b3434429c04
SiRJonny/freertos2
src/StateMachine.cpp
/* * StateMachine.cpp * * Created on: 2015. dec. 9. * Author: Csabi */ #include "StateMachine.h" extern void SetServo_motor(int pos); extern float B; void StateMachine(state_machine_struct * State, bool * stable3lines, int encoderPos) { switch (State->state) { case -1: //SET_SPEED = 0; SetServo_mot...
ALGO
0.961001
4.012372
dab0b8b2-415a-4dc7-a96a-a3bd7156911e
thegamer1907/Code_Analysis
DP/1673.cpp
#include<bits/stdc++.h> using namespace std; int main(){ char s[1000000]; char *a; cin>>s; if((a = strstr(s,"AB")) && strstr(a+2,"BA")){ cout<<"YES";} else if((a = strstr(s,"BA")) && strstr(a+2,"AB")){ cout<<"YES";} else{ cout<<"NO";} }
ALGO
0.999992
3.680959
16ce9a12-e2c1-4006-8944-901f82d99c9e
TakeuchiIori/TD3
Engine/Utility/Systems/MapChip/MapChipCollision.cpp
#include "MapChipCollision.h" #include "MapChipCollision.h" // Z値を考慮 //void MapChipCollision::DetectAndResolveCollision( // const ColliderRect& colliderRect, // Vector3& position, // Vector3& velocity, // int checkFlags, // std::function<void(const CollisionInfo&)> collisionCallback) { // // // 速度が大きい場合はサブステップに分割 // ...
ALGO
0.941672
5.585925
d106d973-8d53-49d6-b485-f4b54137c8b9
liaohuangg/RfCgraTrans
llvm/llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
#include "InstCombineInternal.h" #include "llvm/IR/Instructions.h" #include "llvm/Transforms/InstCombine/InstCombiner.h" using namespace llvm; namespace { /// Return true if and only if the given instruction does not modify the memory /// location referenced. Note that an idemptent atomicrmw may still have /// order...
TOOL
0.933394
7.793539
96e96e4e-d4ad-4a47-99c0-97872d95ab59
raincross7/code-similarity
codes/train_code/problem417/problem417_14.cpp
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < n; ++i) #define ALL(c) (c).begin(), (c).end() #define SUM(x) std::accumulate(ALL(x), 0LL) #define MIN(v) *std::min_element(v.begin(), v.end()) #define MAX(v) *std::max_element(v.begin(), v.end()) #define EXIST(v, x) (std::find(v.begin(), v.end(), x) != v.end...
ALGO
0.999886
4.298691
b17d8ab1-8a1d-4047-8552-358ce0e447ce
ndvazquez/TDP1-FIUBA
TP3/common_encrypter.cpp
#include "common_encrypter.h" #include <cstdint> Encrypter::Encrypter(){} uint32_t Encrypter::rsa(uint32_t msg, uint8_t exp, uint16_t mod){ uint32_t ret = 0; for (int i = 0; i < 3; ++i){ uint32_t result = (msg >> (i * 8) & 0xff); uint8_...
ALGO
0.985052
4.504725
2bb90128-1cfd-403f-8aa1-3bbe147e20d9
kimhojun2/Algorithm
프로그래머스/1/86051. 없는 숫자 더하기/없는 숫자 더하기.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; int solution(vector<int> numbers) { int answer = 0; for(int i=0;i<=9;i++){ if(count(numbers.begin(),numbers.end(), i)==0){ answer += i; } } return answer; }
ALGO
0.999218
5.66395
f1b747d1-f410-404b-9a90-b61dfffeec95
Uttamkumargupta000/450DSA_CRACKER
ARRAY/03_Kth_Element_Array.cpp
// ##### Approach 1 ##### // TC = O(n*log(n)); // Using STL class Solution{ public: // arr : given array // l : starting index of the array i.e 0 // r : ending index of the array i.e size-1 // k : find kth smallest element and return using this function int kthSmallest(int arr[], int l, i...
ALGO
0.999997
5.877843
c567dd0d-cf4c-4da3-b98e-365ac7ff425c
NilFoundation/zkllvm-circifier
lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/interactive_crashlog/multithread-test.cpp
#include <iostream> #include <mutex> #include <thread> int bar(int i) { int *j = 0; *j = 1; return i; // break here } int foo(int i) { return bar(i); } void call_and_wait(int &n) { std::cout << "waiting for computation!" << std::endl; while (n != 42 * 42) ; std::cout << "finished computation!" << std...
TOOL
0.997701
5.897428
d6480841-6409-473d-84d8-896c4c4d9906
polyakovGit/algorithms
algorithms/algorithms.cpp
#include <iostream> #include <limits> #include <vector> void Print(std::vector<int> arr) { std::copy(arr.begin(), arr.end(), std::ostream_iterator<int>(std::cout, " ")); } std::vector<int> Kadane(std::vector<int> arr) { if (!arr.size()) return { 0 }; std::vector<int> result; int maxSoFar = std...
ALGO
0.999979
5.22997
5ab0f3ea-c63c-41c9-a7ea-0f50ee117345
hzfsls/leetcode-supercrawl
data/2212.maximum-points-in-an-archery-competition/code_snippets/sol.cpp
class Solution { public: vector<int> maximumBobPoints(int numArrows, vector<int>& aliceArrows) { } };
ALGO
0.999112
4.337936
a62e9517-ce50-4cbc-9a7c-9cd895145114
wkdehdlr/VS-2017
Projects/SW 역량 테스트대비/SW 역량 테스트대비/완전탐색2/완전탐색2/BOJ 1261 알고스팟.cpp
#include<iostream> #include<vector> #include<algorithm> #include<queue> #include<tuple> using namespace std; vector<vector<int> > vec(101, vector<int>(101)); vector<vector<bool> > visited(101, vector<bool>(101, false)); deque<tuple<int,int,int> > q; int N,M; int dr[] = { 0,1,0,-1 }; int dc[] = { 1,0,-1,0 }; int minN =...
ALGO
0.999924
3.856035
d2b6e6c9-174a-46f7-918b-6d3ead82c562
raincross7/code-similarity
codes/train_code/problem170/problem170_250.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int main(){ int h,n; cin>>h>>n; int k; for (int i = 0; i<n; i++){ cin>>k; h-=k; } if (h > 0){ cout<<"No"; } else{ cout<<"Yes"; } return 0; }
ALGO
0.999995
3.506835
0ef88522-d634-4d0d-b1cb-8d435e2cd3e2
abdullah-124/xpsc
week-6/day-3/Anti_Palindrome.cpp
#include<bits/stdc++.h> #define fastread() {ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);} #define ll long long using namespace std; void solve(){ int n; cin>>n; string s; cin>>s; string r = ""; int fr[26] = {0}; int odc=0,evc=0; for(int i=n-1;i>=0;i--){ r += s[i]; ...
ALGO
0.999891
4.234044
c4365256-38e7-4822-b296-2b2a2de60708
sfchng/Rotation_Coordinate_Descent
demo/src/3rdparty/Eigen/doc/examples/TutorialLinAlgExSolveColPivHouseholderQR.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix3f A; Vector3f b; A << 1,2,3, 4,5,6, 7,8,10; b << 3, 3, 4; cout << "Here is the matrix A:\n" << A << endl; cout << "Here is the vector b:\n" << b << endl; Vector3f x = A.colPivHouseholderQr...
ALGO
0.999891
3.356631
a88ec6b9-ca91-4a8a-a973-7a35a12da77c
konfou/isotope
src/GClasses/GKNN.cpp
#include "GKNN.h" #include "GArff.h" #include "GArray.h" #include <math.h> #include "GVector.h" GKNN::GKNN(GArffRelation* pRelation, int nNeighbors) : GSupervisedLearner(pRelation) { m_nNeighbors = nNeighbors; m_pRows = new GPointerArray(256); int nAttributes = m_pRelation->GetAttributeCount(); m_pScaleFactors = ...
ALGO
0.999041
6.132967
d6873697-19b6-4830-a4aa-8145c4f8d465
NursedaZengin/Cpp-Matematiksel-Uygulamalar
Basamak.cpp
#include <iostream.h> #include <conio.h> usal(int us) { int a=1; while(us>1) { a*=10; us--; } return a; } main() { //girilen bir tam sayının hanelerine ayrılması int sayi,sayac=0,yedek,d=1,c; cout<<"Sayi giriniz: "; cin>>sayi; yedek=sayi; ...
ALGO
0.997466
3.433151
2441f58f-ea92-4ae6-9488-fce396f8c606
ishandutta2007/codeforces
holyk/normal/1637/A.cpp
// Author: HolyK // Created: Sat Feb 12 22:34:09 2022 #include <bits/stdc++.h> template <class T, class U> inline bool smin(T &x, const U &y) { return y < x ? x = y, 1 : 0; } template <class T, class U> inline bool smax(T &x, const U &y) { return x < y ? x = y, 1 : 0; } using LL = long long; using PII = std::pai...
ALGO
0.999979
4.690883
9ba66661-20dd-4d8a-8c4d-3ed2b383fa1c
Captain-Tim/leetcode
0739. Daily Temperatures/Daily Temperatures (optimal solution).cpp
class Solution { public: vector<int> dailyTemperatures(vector<int>& temperatures) { vector<int> res(temperatures.size(), 0); for (int i = temperatures.size() - 2; i >= 0; --i) { int cur_temp = temperatures[i]; int days = i + 1; while (temperat...
ALGO
0.999957
6.406571
ed2ca52f-46ae-4e7b-9036-26ddfd3160cf
ChronisYan/Algorithms-Data-Structures
C++/algorithms/mergeLinkedLists.cpp
// given 2 sorted singly linked lists write a function that returns sorted merged ll // sorting in place, return the head of the ll with the smallest value class LinkedList { public: int value; LinkedList *next; LinkedList(int value) : value(value), next(nullptr) {} }; LinkedList *mergeLinkedLists(Linked...
ALGO
0.999972
5.123513
ac850ae3-b1bd-41ac-9797-e1b910f1b59a
StyleList94/problem-solving
baekjoon/11866.cpp
#include<iostream> #include<queue> using namespace std; int main(void) { int N, M; queue<int> q; cin >> N >> M; for (int i = 1; i <= N; i++) q.push(i); cout << '<'; while (1) { for (int i = 0; i < M - 1; i++) { q.push(q.front()); q.pop(); } cout << q.front(); q.pop(); if (q.empty) { cout...
ALGO
0.999995
3.335289
f29799f0-ba4a-422e-8664-babff140fb0f
Karan-shf/Random-cpp-projects
b.m.m_va_k.m.m.cpp
#include <iostream> using namespace std; int main () { int n,m,max,min,i,R1,R2,B_M_M,K_M_M; cout <<"enter first number: "; cin >>n; cout <<"enter second number: "; cin >>m; if (n>m) { max=n; min=m; } else { max=m; min=n; } i=min; w...
ALGO
0.999909
3.207442
dd204b43-709a-4e83-b568-428f691bf44b
trinhminhtriet/leetcode
solutions/2600-2699/2678.number-of-senior-citizens/Solution.cpp
class Solution { public: int countSeniors(vector<string>& details) { int ans = 0; for (auto& x : details) { int age = stoi(x.substr(11, 2)); ans += age > 60; } return ans; } };
ALGO
0.996382
6.146779
98b15f57-76a9-4ae2-b743-b501ec52b19e
rudrakshgohil/campuscoach2
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
c52e770c-0e99-476a-8e5a-5b2e0fa4ae16
carbonfish/Algorithm-1
技能树/动态规划/最长上升子序列.cpp
//ԲۣDPôѧţưѧѧѧ!!!niubi1 #include <stdio.h> #include <string.h> #include <algorithm> using namespace std; const int maxn=1010; int num[maxn]; int len[maxn]; int main(){ int n,i,j; scanf("%d",&n); fill(len,len+maxn,1); fill(num,num+maxn,0); for(i=0;i<n;scanf("%d",&num[i++])); for(i=1;i<n;++i)...
ALGO
0.99993
3.299787
d9504180-11ea-41b9-a4b8-9f8f5d99fae1
whdcumt/RetinexCPP
retinex.cpp
#include "retinex.h" #include <highgui.h> #include <cv.h> #include <math.h> //#define USE_EXACT_SIGMA #define pc(image, x, y, c) image->imageData[(image->widthStep * y) + (image->nChannels * x) + c] #define INT_PREC 1024.0 #define INT_PREC_BITS 10 inline double int2double(int x) { return (double)x / INT_PREC; } in...
ALGO
0.995459
4.862091
b89ae1d4-fb72-4478-82bb-7d7940521827
Anainoyume/ICPC-Note
AlgorithmCollection/Graph/ClassicProblem/P1129.cpp
#include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0) // #define int long long // #define double long double #define endl '\n' const int md = 1e9+7; const int maxN = 1005; int Map[502][502], p[502], vis[502], M, N; bool match(int i) { for (int j = 1; j <= N...
ALGO
0.999979
5.95841
33838215-fc6c-4035-8f5b-7dcd3b1e6189
andreaswanninger/conservative_levelset-contact_line-curvature
applications/SwimmingDEMApplication/custom_utilities/fields/pouliot_flow_field.cpp
#include "pouliot_flow_field.h" namespace Kratos { void PouliotFlowField::ResizeVectorsForParallelism(const int n_threads) { mExpX.resize(n_threads); mExpY.resize(n_threads); mCoordinatesAreUpToDate.resize(n_threads); for (int i = 0; i < n_threads; i++){ mCoordinatesAreUpToDate[i] = false; ...
ALGO
0.997288
5.926027
fabc33bc-6318-4bd2-b5e9-eae6e3d147b5
ducthinh14091999/server_ocr
FOTS/vision-main/torchvision/csrc/ops/cpu/nms_kernel.cpp
#include <ATen/ATen.h> #include <torch/library.h> namespace vision { namespace ops { namespace { template <typename scalar_t> at::Tensor nms_kernel_impl( const at::Tensor& dets, const at::Tensor& scores, double iou_threshold) { TORCH_CHECK(!dets.is_cuda(), "dets must be a CPU tensor"); TORCH_CHECK(!s...
ALGO
0.968719
7.006502
079a37c9-91e7-48d5-bd68-89e3292300b0
emotionless/Programming-Problem-Solution
codeforces/rocket_B.cpp
#include<bits/stdc++.h> #define xx first #define yy second #define all(a) a.begin(), a.end() #define vsort(v) sort(all(v)) #define UNIQUE(a) sort(all(a)); a.erase(unique(all(a)), a.end()) #define clr(a,k) memset(a,k,sizeof a) #define bclr(b) memset(b,false,sizeof b) #define fr(i, a) for(i = 0; i < a; i++) #define frr...
ALGO
0.999933
4.444202
a48527a7-8fea-454d-a40e-0209d9a0bac5
sarvex/leetcode-ruby
solution/1100-1199/1165.Single-Row Keyboard/Solution.cpp
class Solution { public: int calculateTime(string keyboard, string word) { unordered_map<char, int> index; for (int i = 0; i < keyboard.size(); ++i) { index[keyboard[i]] = i; } int res = 0, t = 0; for (char c : word) { res += abs(index[c] - t); ...
ALGO
0.999971
5.867857
6452e3a4-0474-4bb9-8bbf-2ebb9e2a67e7
nabila-sheona/codeforces_demo
freshman summer/lazergun.cpp
#include <bits/stdc++.h> using namespace std; int main() { set<double> s; int n, x0, y0, x, y,nm=0,m=0; cin >> n >> x0 >> y0; for(int i=0;i<n;i++) { cin >> x >> y; if(y0 - y == 0 && x0 - x == 0) { continue; } else if(y0 - y == 0) { nm=1; } else if(x0 - x == 0) { m=1; } else { ...
ALGO
0.99968
3.968665
4f3e7472-8464-4cb6-b45b-db17130d1258
Maksasj/megaboost
libs/graph/test/king_ordering.cpp
#include <boost/config.hpp> #include <vector> #include <iostream> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/king_ordering.hpp> #include <boost/graph/properties.hpp> #include <boost/graph/bandwidth.hpp> /* Sample Output original bandwidth: 8 Reverse Cuthill-McKee ordering starting at: 6 ...
ALGO
0.999986
5.692588
5d6d7bab-0366-4d7d-a293-7bb6e2306334
wangningbei/codeConstStorage
mitsuba/src/bsdfs/glintConst/blending.cpp
#include "flake.h" #include "normalmap.h" #include "gaussianization.h" #include "blending.h" #include "mitsuba/core/matrix.h" #include "mitsuba/core/fwd.h" #include "mitsuba/core/random.h" #include <omp.h> #include <time.h> #include <fstream> using namespace OPENEXR_IMF_NAMESPACE; using namespace mitsuba; const in...
ALGO
0.969985
4.060302
47bbdfa4-141a-4077-82fc-30f35555b406
mnishh997/leetcode
0213-house-robber-ii/0213-house-robber-ii.cpp
class Solution { public: int f(vector<int>& v) { int n = v.size(); if(n == 1) return v[0]; if(n == 2)return max(v[1], v[0]); int a = max(v[1], v[0]), b = v[0], c = 0; for(int i=2;i<n;i++) { c = max(a, b+v[i]); b = a, a = c; } return max...
ALGO
0.999981
5.795892
c2c3dbba-a242-419c-8df0-407b462db528
BitStashBlockchain/BitStash-Core
src/libff/libff/algebra/curves/bn128/bn128_g2.cpp
/** @file ***************************************************************************** * @author This file is part of libff, developed by SCIPR Lab * and contributors (see AUTHORS). * @copyright MIT license (see LICENSE file) ***********************************************************************...
ALGO
0.958366
6.813828
7caeb643-bded-44c1-988a-a35be8c4b6a3
ZKW465/algorithm
打印稿/数据结构/平衡树/splay/无懒标.cpp
struct node; using Tp = safe_ptr<node>; struct node { Tp l, r, p; int siz; i64 val; i64 sum; node(i64 val_) { siz = 1; val = val_; sum = val; } void pull() { siz = l->siz + 1 + r->siz; sum = l->sum + val + r->sum; } }; // must run once void make_sentinnel() { Tp t = make_safe<node...
ALGO
0.999856
3.971758
71bba268-57e3-4f7b-859c-d69b828221a9
shlagbaum/quantlib-1.0
ql/math/incompletegamma.cpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* The implementation of the algorithm was inspired by "Numerical Recipes in C", 2nd edition, Press, Teukolsky, Vetterling, Flannery, chapter 6 */ #include <ql/math/incompletegamma.hpp> #include <ql/math/distributions/gammadis...
ALGO
0.999694
6.32326
89cbf8ed-5a6e-412e-9c4b-37a21a986b39
angadbaidwan/summer-2018-projects-OOP244
W07/W07 At Home/Hero.cpp
// Name: Angadpreet Baidwan // Student Number: 135421170 // Seneca Email: <EMAIL> // Date: 2018-07-17 #define _CRT_SECURE_NO_WARNINGS #include <cstring> #include "Hero.h" using namespace std; namespace sict { Hero::Hero() { name[0] = '\0'; hp = 0; str = 0; } Hero::Hero(const char* _name, const int _hp, cons...
TOOL
0.941243
3.402297
e5e5e5d4-1672-4bdf-ac4a-03791515e56c
OmarElgabry/Cubes
src/Strings/Replace Characters.cpp
#include <cstdlib> #include <iostream> #include <string> #include <unordered_map> #include <vector> using namespace std; int main(){ char i; unordered_map<char, char> mp; // or using char[] array for (i = 'a'; i <= 'z'; i++) mp[i] = i; string str = "aabbccdd"; vector<pair<char, char>> queries; queries.push_b...
ALGO
0.999968
4.477138
1134e61c-8526-4b26-ace0-28652d9a657f
anishaga/Data-Structures-And-Algorithms
Trees/sumOfNodes.cpp
#include <iostream> using namespace std; #include <vector> #include <queue> template <typename T> class TreeNode { public: T data; vector<TreeNode<int> *> children; TreeNode(T data) { this->data = data; } }; TreeNode<int> *takeInput() { int data; cin >> data; TreeNode<int> *r...
ALGO
0.999562
4.696445
57ac37e0-bebc-4bb3-a37b-f94c32f2a913
ishandutta2007/codeforces
rns_cus/normal/44/F.cpp
#include <bits/stdc++.h> using namespace std; #define N 111 #define M 10010 const double ep = 1e-8; struct pnt{ double x, y; pnt(double x = 0, double y = 0) : x(x), y(y) {} pnt operator + (const pnt &p) { return pnt(x + p.x, y + p.y); } pnt operator - (const pnt &p) { return pnt(x ...
ALGO
0.999928
3.924749
40dba38a-ea6c-4aee-909b-4240065bbc5d
zhiz-m/Competitive-Programming
subjective_issue.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define all(a) (a).begin(),(a).end() #define fi first #define se second #define SZ(x) (int)(x).size() #define rep(i,a,b) for (int i=a;i<b;i++) #define per(i,a,b) for (int i=b-1;i>=a;i--) #define each(a,x) for(auto&a:(x)) #define DEB...
ALGO
0.999532
4.417844
d386d405-491a-4f93-9dad-86df828d747d
raincross7/code-similarity
codes/train_code/problem107/problem107_400.cpp
#include<stdio.h> #include<algorithm> #include<functional> using namespace std; int main(void) { int a,b,n,x,y,m[17][17],p[17][17],i,k; while(1){ scanf("%d %d",&a,&b); if(a==0 && b==0) break; scanf("%d",&n); for(i=1;i<=b;i++){ for(k=1;k<=a;k++){ m[i][k]=0; p[i][k]=0; } } for(i=0;i<n;i++){ sca...
ALGO
0.998824
3.404379
b71398ea-6a4b-498c-a0d5-7cad8f7ce326
tonykhkim/codetree-TILs
241003/문자 개수 세기/count-char.cpp
#include <iostream> #include <string> using namespace std; int main() { string str; char alpha; getline(cin, str); cin >> alpha; int count = 0; for (int i=0;i<str.length();i++) { if (str[i] == alpha) { count += 1; } } cout << count; return 0;...
ALGO
0.987728
3.697201
04d8d6d9-5496-4b43-bc9c-f33fa3198d2f
miteshkumar77/LC
path-crossing/Accepted/6-27-2020, 11:14:48 PM/Solution.cpp
// https://leetcode.com/problems/path-crossing class Solution { typedef pair<int, int> pii; public: bool isPathCrossing(string path) { set<pii> p; pii init(0, 0); p.insert(init); array<pii, 26> dirs; dirs['N' - 'A'] = pii(1, 0); dirs['S' - 'A'] = pii(-1, 0)...
ALGO
0.999978
6.352844
5440783c-2078-40b9-abdd-ca975e544f27
Naushad-ansarintiw/DSA_REPO
LinkedList_striver/Add_two_number.cpp
class Solution { public: Node* addTwoNumbers(Node* l1, Node* l2){ Node* dummy = new Node(); Node* temp = dummy; int carry = 0; while(l1 != NULL || l2 != NULL || carry) { int sum = 0; if(l1 != NULL){ sum += l1...
ALGO
0.999798
6.429283
888613f6-8529-4786-a07c-2e497a587f0f
pkuxxy/LeetCode
C++/WildcardMatching_iterative.cpp
#include<iostream> #include<vector> #include<queue> #include<string> #include<string.h> #include<math.h> #include<algorithm> using namespace std; class Solution { public: bool isMatch(const char *s, const char *p) { if(!s || !p) return false; int len1 = strlen(s); int len2 = strlen(p); int i = 0; ...
ALGO
0.999928
3.633886
6c9dcdcb-5125-499f-b255-1c7b16861b8d
Gaebobman/Algorithm-2022
Univ/Problem Solving/Problem Solving/Problem Solving/week3_A_12171735_JunpyoLee.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; bool alram(int radix[], vector<int>& calorie, const int d, const int start_day) { int median_count = 0; int first = -1; // ¦ if (d % 2 == 0) { for (int i = 0; i < 201; i++) { if (radix[i] != 0) { median_count += radix[i]; ...
ALGO
0.999767
5.336891
fbbe387d-7c85-4bf2-a14b-f6c76d304835
ralf-goettsche/CarND-Path-Planning-Project
src/Eigen-3.3/doc/examples/make_circulant2.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; // [circulant_func] template<class ArgType> class circulant_functor { const ArgType &m_vec; public: circulant_functor(const ArgType& arg) : m_vec(arg) {} const typename ArgType::Scalar& operator() (Index row, Index col) const { Index index = ...
ALGO
0.998923
5.538595
caca0a50-fb48-4c0e-8f3b-50e5fc1f44a1
nadimnesar/nadimnesar-s-cp-library
Number Theory/Binary to Decimal.cpp
ll binarytodecimal(ll binary) { ll i = 0, decimal = 0; while(binary != 0) { decimal = decimal + pow(2, i)*(binary%10); binary /= 10; i++; } return decimal; }
ALGO
0.998775
4.186703
1a6bd247-0771-49c4-8ba7-bf8ddec520ee
raj5036/180-Top-SDE-Interview-Problems
54. K-th element of two sorted arrays/kThGFG.cpp
#include <bits/stdc++.h> using namespace std; int find(int A[], int B[], int m, int n, int k_req) { int k = 0, i = 0, j = 0; // Keep taking smaller of the current // elements of two sorted arrays and // keep incrementing k while(i < m && j < n) { if(A[i] < B[j]) { k++; if(k == k_req) ...
ALGO
0.999902
4.199656
5ffeaf4b-5137-40cf-b60f-2c26e2394ef7
ComputerProgrammerStorager/DataStructureAlgorithm
CLRS/GameTheory/NimGame.cpp
/* You are playing the following Nim Game with your friend: Initially, there is a heap of stones on the table. You and your friend will alternate taking turns, and you go first. On each turn, the person whose turn it is will remove 1 to 3 stones from the heap. The one who removes the last stone is the winner. Given n,...
ALGO
0.999976
6.159374
6339aac2-8b22-4378-b7e3-7faa778b60d2
oigomezz/Retos
Hackerearth/Codemonk/Level-15/Vaishu-and-Maths-Assignment/solution.cpp
#include <bits/stdc++.h> using namespace std; bool dp[111][1000001]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t; t = 1; while (t--) { int l, n, x, y, q, mn = INT_MAX, mx = INT_MIN; cin >> l >> n >> x >> y; memset(dp, 0, sizeof(dp)); dp[0][l] = true...
ALGO
0.999983
3.936892
97037b35-572f-4273-88e4-d3a0d67f9234
seungwoo-project/Baekjoon-Programmers
프로그래머스/1/138477. 명예의 전당 (1)/명예의 전당 (1).cpp
#include <bits/stdc++.h> using namespace std; vector<int> solution(int k, vector<int> score) { vector<int> answer; vector<int> kk; for(int i : score) { kk.push_back(i); sort(kk.begin(), kk.end(), greater<int>()); if(kk.size() < k) { answer.push_back(kk[kk.size() - 1]); ...
ALGO
0.999986
4.252894
517ebf9b-803b-457c-b539-d0eb840d5ebf
lucasresck/data-structures-algorithms
voronoi_image/voronoi.cpp
#include <iostream> #include <fstream> #include <queue> #include <math.h> #include <random> using namespace std; // TODO: // - degenerate case when two sites have the same y coord; // - degenerate case when circle and site have the same y coord; // - handle degeneracy when the point lies exactly bellow intersecti...
ALGO
0.999449
4.560191
7632eaac-c969-43da-af47-5ce6d53e8782
freiler/OpenLB-v1.5
examples/turbulence/channel3d/channel3d.cpp
/* channel3d.cpp: * This example examines a wall-bounded flow at high Reynolds numbers. * The dynamics follow the BGK collision operator and Smagorinsky-Lilly turbulence model. * The near wall region is modelled by a wall function. * * The example shows the usage of turbulent wall models. * * The results are pub...
ALGO
0.998337
6.743241
1cb26a93-cec0-4c46-95d6-f8b1e03262dd
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_166_12.cpp
#include <bits/stdc++.h> using namespace std; int n, m; char s[5005][5005]; vector<int> up[5005], dn[5005], lt[5005], rt[5005]; void del(int x, int y) { dn[up[x][y]][y] = dn[x][y]; up[dn[x][y]][y] = up[x][y]; rt[x][lt[x][y]] = rt[x][y]; lt[x][rt[x][y]] = lt[x][y]; } void ins(int x, int y) { dn[up[x][y]][y] = ...
ALGO
0.999931
3.991039
d0661ca1-e761-47ef-9fde-5dc87503e8ad
jelmerbe/Financial-Computing-II
CPP/Review1/Src/forwardAnnuity.cpp
// // Created by Jelmer Bennema on 3/5/24. // #include "Review1/Review1.hpp" cfl::Function prb::forwardAnnuity(double dRate, double dPeriod, double dMaturity, const cfl::Function &rDiscount, double dInitialTime, bool bClean) { // check preconditions PRECONDITION(dRate >= 0); ...
ALGO
0.993869
7.604417
8396c632-dcf1-4a7a-addf-bcc87e227c9c
hilaolu/hpc-introduction
src/multithread_gemm/main.cpp
#include "gemm.hpp" #include <cstdlib> #include <iostream> #include <fstream> #include <chrono> #include <cassert> #include <f77blas.h> double a[10485760]; double b[10485760]; double c[10485760]; double ref[10485760]; using namespace std; using std::chrono::high_resolution_clock; using std::chrono::duration; int n; ...
ALGO
0.99792
3.832214
779ba2c8-6d0a-4176-9dcf-713191fb5edf
geekboxzone/mmallow_ndk
sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.modifying.operations/alg.remove/remove_copy_if.pass.cpp
// <algorithm> // template<InputIterator InIter, OutputIterator<auto, InIter::reference> OutIter, // Predicate<auto, InIter::value_type> Pred> // requires CopyConstructible<Pred> // OutIter // remove_copy_if(InIter first, InIter last, OutIter result, Pred pred); #include <algorithm> #include <functiona...
TEST
0.855331
6.650496
79871970-356d-4946-8530-42ac0351af4e
zzun-d/Algorithm
프로그래머스/lv1/131705. 삼총사/삼총사.cpp
#include <string> #include <vector> using namespace std; int solution(vector<int> number) { int answer = 0; for (int i=0; i<number.size()-2;i++) { for (int j=i+1; j<number.size()-1;j++) { for (int k=j+1; k<number.size(); k++) { if (number[i] + number[j] + number[k] == 0) { ...
ALGO
0.999779
5.721062
61acafc3-5183-4a09-a2f2-16c2b0e55196
wbl1997/mars_images_ba
include/eigen3/unsupported/doc/examples/MatrixExponential.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { const double pi = std::acos(-1.0); MatrixXd A(3,3); A << 0, -pi/4, 0, pi/4, 0, 0, 0, 0, 0; std::cout << "The matrix A is:\n" << A << "\n\n"; std::cout << "The matrix exponential ...
ALGO
0.999873
3.706936
a90c4eb7-8885-4010-8874-5e0ff6b45a09
abhiramdapke/Independent-projects
Basic Operations/Checking if a number is prime.cpp
#include <iostream> using namespace std; int main() { int i,n,count=0; cout << "Enter a value "; cin >> n; for (i=1;i<=n;i++) { if (n%i == 0) count++; } if (count == 2) cout << "It is a prime number" << endl; else cout << "Not a prime number" <<...
ALGO
0.999374
3.760048
80357000-caca-4c9b-bdb4-554ad54cbc3d
nirdesh17/codeforces
Letter.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string s,g; getline(cin, s); getline(cin, g); vector<char> a,b; a.push_back(s[0]); b.push_back(g[0]); for(ll i=1;i<s.length();i++) { if(s...
ALGO
0.999977
3.606458
dc13f7fe-0dac-44d3-b26c-4876d6a7c121
JonghyeokPark/mysql-57-nvdimm-caching
extra/yassl/taocrypt/src/integer.cpp
/* based on Wei Dai's integer.cpp from CryptoPP */ #include "runtime.hpp" #include "integer.hpp" #include "modarith.hpp" #include "asn.hpp" #ifdef __DECCXX #include <c_asm.h> // for asm overflow assembly #endif #if defined(_M_X64) || defined(_M_IA64) #include <intrin.h> #pragma intrinsic(_umul128) #endif ...
ALGO
0.996843
6.273473
29cab92c-df2c-43dd-9528-bf42d1238fc4
MaheshSharan/LeetCode_Automation
solutions/0800-0899/0879.Profitable Schemes/Solution2.cpp
class Solution { public: int profitableSchemes(int n, int minProfit, vector<int>& group, vector<int>& profit) { int m = group.size(); int f[m + 1][n + 1][minProfit + 1]; memset(f, 0, sizeof(f)); for (int j = 0; j <= n; ++j) { f[0][j][0] = 1; } const int mo...
ALGO
0.999981
5.526706
e30674a6-ffbc-4c94-af44-8b1dcc342439
julliet27/Past_solved_problem
Codeorcesecretsport.cpp
#include<bits/stdc++.h> #define ll long long int #define u int #define endline "\n" #define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) using namespace std; const int mod=1e9+7; int main(){ fast_cin(); int t;cin>>t; while(t--){ int n;cin>>n; string str;cin>>str...
ALGO
0.999857
4.613307
a70298f9-58f5-4690-95ce-03419b15cc59
homveloper/C-
과제/김제형/07/4.cpp
#include <iostream> #include <algorithm> using namespace std; void getSumDiff(double A[], double *AVERAGE, double *MAX, double *SUM) { int i = 0; for (i = 0; i < 5; i++) { *MAX = max(*MAX, *(A + i)); *SUM = *SUM + *(A + i); } *AVERAGE = *SUM / 5; } void swap(int *i, int *j); int main() { int a = 5, b= 3; ...
ALGO
0.995369
3.701785
b5e72d8d-373b-4ca8-8e52-315b60f6e899
SeSACAlgorithm/AlgorithmStudy
프로그래머스/LEVEL 2 (1)/42586) 기능개발/재원.cpp
#include <string> #include <vector> using namespace std; vector<int> solution(vector<int> progresses, vector<int> speeds) { vector<int> answer; while (!progresses.empty()) { // 매일 작업을 진행 for (int i = 0; i < progresses.size(); i++) { progresses[i] += speeds[i]; } ...
ALGO
0.999478
5.84932
8fd2b243-4ad1-4c7f-aca5-801807653b34
PrantiBirla/CodeWithMe
isPerfectNumber.cpp
#include <iostream> using namespace std; int main () { int n = 28, sum = 0; for(int i = 1; i < n; i++){ if(n % i == 0) sum = sum + i; } if(sum == n) cout << n << " is a perfect number"; else cout << n << " is not a perfect number"; }
ALGO
0.999597
4.541094
36ef84dc-76c9-4531-9e33-f6f251ac36c9
JorgeIba/Competitive-Programming-Problems
CodeForces/471 - D - MUH and Cube Walls.cpp
#include <bits/stdc++.h> #define lli long long int #define ld long double #define endl "\n" #define forn(i, in, fin) for(int i = in; i<fin; i++) #define all(v) v.begin(), v.end() #define fastIO(); ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); #define SZ(s) int(s.size()) using namespace std; int main () ...
ALGO
0.999896
3.503245
ba756df6-73d5-4580-9353-f9ec82500914
cy-org/samples-docs
snippets/cpp/VS_Snippets_CLR_System/system.Threading.WaitHandle.WaitAny2/CPP/source2.cpp
// <Snippet1> using namespace System; using namespace System::IO; using namespace System::Threading; ref class Search { private: // Maintain state information to pass to FindCallback. ref class State { public: AutoResetEvent^ autoEvent; String^ fileName; State( AutoResetEvent^ autoEvent,...
TOOL
0.875271
5.999104
218dfa56-866d-4446-a222-d52c649b90b2
aszkiel71/uwr
informatyka [computer science]/[25-S] Algorytmika Praktyczna/list7/task1.cpp
#include <iostream> using namespace std; #pragma GCC optimize("Ofast") #pragma GCC target("avx,bmi,bmi2,lzcnt,popcnt") int find(int ST[], int v, int S, int node = 0) { if (node >= S) return node; if (ST[2 * node + 1] >= v) return find(ST, v, S, 2 * node + 1); else return find(ST, v, S, 2 * node + 2); } int...
ALGO
0.999933
3.874288
8aef9bf3-6bde-4795-a01f-c386ca631d98
Koustubh-lapate/Data-Structures-and-Algorithms-in-Cpp
Linked_List_Cycle.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: bool hasCycle(ListNode *head) { ListNode* slow = head; ListNode* fast = head; while (fast && fast->next){ fast = fast...
ALGO
0.999544
5.148643
24e6cbf4-e547-4916-9ec4-8716c166148d
Pappu-1/Cpp
C++/pattern/pattern1.cpp
#include<iostream> using namespace std; int main(){ int n; cin>>n; int count=1; for(int i=1; i<=n;i++){ for(int j=1; j<=i;j++){ cout<<count<<" "; count++; } cout<<endl; } return 0; }
ALGO
0.999903
3.77831
2f32148b-9b85-46f3-b647-c2a21aaa95e3
ProbablyButter/aoc
2015/day3/part2.cpp
/*!re2c re2c:flags:utf-8 = 1;*/ /*!max:re2c*/ /*!re2c re2c:define:YYCTYPE = char; re2c:yyfill:enable = 0; re2c:flags:tags = 1; re2c:yyfill:check = 1; */ #include "aoc.hpp" #include "graph_tools.hpp" #include "string_tools.hpp" #include <algorithm> #include <charconv> #include <cmath> #include <fstream> #include <iost...
ALGO
0.999568
5.553001