uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
ddead1b7-61d0-4f92-ad5e-61f587450a18
Fly0307/dtee_ncnn_face_recognition
src/host/insecure/ncnn_retinanet.rv/ncnn/layer/riscv/hardsigmoid_riscv.cpp
#include "hardsigmoid_riscv.h" #if __riscv_vector #include <riscv_vector.h> #endif // __riscv_vector namespace ncnn { HardSigmoid_riscv::HardSigmoid_riscv() { #if __riscv_vector support_packing = true; #if __riscv_zfh support_fp16_storage = true; #endif #endif // __riscv_vector } int HardSigmoid_riscv::forw...
ALGO
0.962293
7.098931
81673832-271b-406e-8c33-bf200ceaad92
TijilM/leetcode_solutions
1768.MergeStringsAlternately.cpp
class Solution { public: string mergeAlternately(string word1, string word2) { string ans=""; int n=word1.size(); int m=word2.size(); int t; if(n < m) t=n; else t=m; int i=0; for(;i<t;i++){ ans+=word1[i]; ans+=word2[i]; } ...
ALGO
0.999879
5.738029
f9e80409-e0fd-492a-ac3d-2b71f5f9fc17
Allenem/LeetCode
everyday/202402/20240222.cpp
/* 889. 根据前序和后序遍历构造二叉树 给定两个整数数组,preorder 和 postorder ,其中 preorder 是一个具有 无重复 值的二叉树的前序遍历,postorder 是同一棵树的后序遍历,重构并返回二叉树。 如果存在多个答案,您可以返回其中 任何 一个。 示例 1: 输入:preorder = [1,2,4,5,3,6,7], postorder = [4,5,2,6,7,3,1] 输出:[1,2,3,4,5,6,7] 示例 2: 输入: preorder = [1], postorder = [1] 输出: [1] 提示: 1 <= preorder.length <= 30 1 <= ...
ALGO
0.999983
6.480767
cdca4298-afa7-4238-9682-f39258727bcc
neemexis/18300229_Integrador
shell_sort.cpp
// 18300229 - P1.2 Programa de Ordenacin por el mtodo de Shell: Este archivo contiene la funcin "main". La ejecucin del programa comienza y termina ah. // Luis Manuel Lim Prez - 183000229 - Estructura de Datos. #include <iostream> #include <conio.h> #include <Windows.h> #include "Integrador.h" using namespace std; cl...
ALGO
0.99853
4.198172
7c77e141-d382-4326-bab4-8b23857d45a3
0kssana/some-tasks
Треугольник/main.cpp
#include <iostream> using namespace std; int main() { int y,x,z; cin>>y>>x>>z; if (y>z&&y>x&&y<=x+z) cout<<"YES"; else if (y>z&&y>x&&y>x+z) cout<<"NO"; else if (z>y&&z>x&&z<=x+y) cout<<"YES"; else if (z>y&&z>x&&z>x+y) cout<<"NO"; else if (x>y&&x>y&&x...
ALGO
0.999739
3.019461
7f4ac4a1-ed1c-4c9f-9494-f27549f87560
not-kai/cp-solutions
1935A.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; string grr; cin >> grr; vector<string> rah; rah.push_back(grr); string jojo = grr; reverse(grr.begin(), grr.end()); rah.push_back(grr + jojo); sort(rah.begin(), rah.end()); cout << rah[0] << "\n"; } int...
ALGO
0.999929
5.058207
348ced06-f5cb-4dbe-a578-0d2b45d1f99c
realvaibhav/competitive_programming
a2oj ladders/Codeforces Rating < 1300/22. Way Too Long Words.cpp
#include<bits/stdc++.h> using namespace std ; typedef long long int ll ; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t ; cin >> t ; for(int i=0 ; i<t ; i++) { string s ; cin >> s ; int n=s.size() ; if(n<=10) { ...
ALGO
0.999203
4.07251
e4e4c8fd-e02e-4ada-bdd0-af42a633fffa
sameer-19/Leetcode
Delete node in Doubly Linked List - GFG/delete-node-in-doubly-linked-list.cpp
// { Driver Code Starts #include <stdio.h> #include <stdlib.h> /* a Node of the doubly linked list */ struct Node { int data; struct Node *next; struct Node *prev; Node(int x){ data = x; next = NULL; prev = NULL; } }; // } Driver Code Ends /* Structure of Node struct Node { int da...
ALGO
0.999851
5.939375
596493b2-ccc0-4cfd-b39c-6f17ba4fca02
jongwook98/algorithm_C-Cpp
DP/좌석관리.cpp
#include<iostream> #include<vector> using namespace std; // 그림을 그려가면서 풀어 볼 때 // 피보나치 수열의 형식을 띈다 vector<int> v; int cur = 1; int DP[41]; int main(int argc, char** argv) { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int N, M; cin >> N >> M; int num; for (int i = 0; i < M; i++) { ...
ALGO
0.999996
4.48559
6cc068c8-b84d-485a-ae3f-5474bbdbef16
rajveer-09/DSAleetcode
Subarray with given sum - GFG/subarray-with-given-sum.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find a continuous sub-array which adds up to a given number. vector<int> subarraySum(vector<int>arr, int n, long long s) { // Your code here int l=0, r=0; ...
ALGO
0.999943
5.536045
2602e7c2-07b4-4f88-b15c-932ff8a1ebbe
oouazize/LeetCode-problems
0287-find-the-duplicate-number/0287-find-the-duplicate-number.cpp
class Solution { public: int Abs(int n) { int const mask = n >> (sizeof(int) * 8 - 1); return ((n + mask) ^ mask); } int findDuplicate(vector<int>& nums) { for (int n: nums) { int nb = Abs(n); nums[nb - 1] *= -1; if (nums[nb - 1] > 0) ...
ALGO
0.999983
5.555432
71953e0d-3c6a-47b2-b04a-9860dfdb95ea
salmansiddiqui75/DSA-Problem
Recursion/MergeSort1.cpp
#include<iostream> using namespace std; void merge(int arr[],int s,int mid, int e) { int leftArraySize=mid-s+1; int rightArraySize=e-mid; int firstArray[leftArraySize]; int secondArray[rightArraySize]; for(int i=0;i<leftArraySize;i++) { firstArray[i]=arr[s+i]; } for(int j=0;...
ALGO
0.999986
4.644701
13f19b5c-e28b-4120-810b-897e5fb3da3c
ei2537/VSCode-Files
HOJ/2043.cpp
#include <iostream> #include <string> using namespace std; void print_binary(unsigned long long n) { if(n==0){ cout << "0\n"; return; } string bin=""; while(n>0){ bin=(char)('0'+(n%2))+bin; n/=2; } for(size_t i=0;i<bin.size();i++){ cout << bin[i]; ...
ALGO
0.999953
5.402382
2a672b4a-044b-40a6-9f64-9fbefc2e5b6f
aditi970/DATA-STRUCTURES
Stack codes.cpp
#include <bits/stdc++.h> using namespace std; #define n 100 class stack{ int *arr; int top; public: stack(){ arr=new int[n]; top=-1; } void push(int x){ if(top==n-1){ cout<<"Stack Overflow"<<endl; return; } top++; arr[top]...
ALGO
0.998221
4.117567
de07b402-dbb1-4ccb-9a8d-f1c3af474dd8
anas3a/Online-Judge-Solutions
D_Make_Them_Equal.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vll = vector<ll>; using vvi = vector<vi>; using vvl = vector<vll>; using pii = pair<int, int>; using pll = pair<ll, ll>; using vpi = vector<pii>; using vpl = vector<pll>; #define pb push_back #define mp make_pair #defin...
ALGO
0.999909
3.296978
a6ffdc32-f096-4be4-8602-59b66843a61b
megh-bari/Striver-A2Z-DSA-Sheet
Step 09 - Stack and Queues [Learning, Pre-In-Post-fix, Monotonic Stack, Implementation]/Lec 3 - Monotonic StackQueue Problems [VVV. Imp]/sum-of-subarray-minimum.cpp
// brute class Solution { public: int sumSubarrayMins(vector<int>& arr) { int n = arr.size(); int sum = 0; int mod =(int)(1e9 + 7); for(int i=0; i<n; i++){ int mini = arr[i]; for (int j = i; j < n; j++) { ...
ALGO
0.999997
6.109697
df3a170a-bdef-4310-a086-7060ea5923aa
spandan11106/DSA
codeforces/900/queries.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { int n, q; cin >> n >> q; vector<int> a(n); vector<long long> prefix(n + 1, 0); long long sum = 0; ...
ALGO
0.999636
4.537289
4c8bdc92-ee3a-4f7a-bdfc-18ea9b67759f
lligen/few_test
greedy_projection.cpp
#include <pcl/point_types.h> #include <pcl/io/pcd_io.h> #include <pcl/kdtree/kdtree_flann.h> #include <pcl/features/normal_3d.h> #include <pcl/surface/gp3.h> #include <pcl/io/vtk_io.h> int main (int argc, char** argv) { // Load input file into a PointCloud<T> with an appropriate type pcl::PointCloud<pcl::PointXYZ...
ALGO
0.957579
5.970366
c062ff96-a852-4091-9640-4ace89051aae
namangarg2002/leetcode
2871-double-a-number-represented-as-a-linked-list/double-a-number-represented-as-a-linked-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: void solve(ListNode* ...
ALGO
0.999987
6.194633
b3ed27dc-bfa4-4f8c-a6df-f1759e195378
0xayushM/crack-your-placement
strings/duplicates.cpp
#include<iostream> #include<string> #include<map> using namespace std; void duplicates(string s) { map<char,int> mp; for(int i=0;i<s.length();i++) mp[s[i]]++; for(auto i:mp) { if(i.second > 1) cout << i.first << ", count = " << i.second<<endl; } } int main() { string s;...
ALGO
0.999545
3.550004
0a085785-6fa2-48f4-9bd3-1b0e6db105ea
Anxile/CabinGuard
libraries/FastLED/src/fl/corkscrew.cpp
#include "fl/corkscrew.h" #include "fl/algorithm.h" #include "fl/math.h" #include "fl/splat.h" #define TWO_PI (PI * 2.0) namespace fl { void generateMap(const Corkscrew::Input &input, CorkscrewOutput &output); void generateMap(const Corkscrew::Input &input, CorkscrewOutput &output) { // Calculate circumference ...
ALGO
0.99716
6.979548
0183b4af-ac21-489b-9cf6-7af8c1d812f6
tunabrain/tungsten
src/core/primitives/Quad.cpp
#include "Quad.hpp" #include "TriangleMesh.hpp" #include "sampling/PathSampleGenerator.hpp" #include "sampling/SampleWarp.hpp" #include "io/JsonObject.hpp" #include "io/Scene.hpp" namespace Tungsten { struct QuadIntersection { Vec3f p; float u; float v; bool backSide; }; Quad::Quad() : _bsdf(_defau...
TOOL
0.908303
7.639155
ebd03635-0f0b-4278-a321-86d0565d0488
vucongtuanduong/cpp-codeptit
advanced/cpp0738/cpp0738.cpp
#include <iostream> #include <cmath> #include <climits> using namespace std; int log2(int x); void testCase(); int main () { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int t; cin >> t; while (t--) { testCase(); cout <...
ALGO
0.99959
5.034155
17241ffa-0bb9-4adf-82ab-0a72961a8ad1
Ankesh-Kushwaha/DATA-STRUCTURE_UPDATED
Graph/BFStraversal.cpp
#include<iostream> #include<list> #include<vector> #include<queue> using namespace std; class Graph{ int V; list<int> *l; public: Graph(int V){ this->V=V; l=new list<int>[V]; } void addedge(int u,int v){ //u---v l[u].push_back(v); l[v].push_back(u); } void bfs(){ queue<int> q; vec...
ALGO
0.999961
4.465755
8a95ba5f-01f5-4671-89a7-28270f2f98cd
vijaynitrr/codes
Trie/string/Search Engine.cpp
#include<bits/stdc++.h> using namespace std; #define rep(i,b) for(i=0;i<b;i++) #define rep1(i,b) for(i=1;i<=b;i++) #define plln(n) printf("%lld\n",n) #define s3ll(n1,n2,n3) scanf("%lld%lld%lld",&n1,&n2,&n3) #define s2ll(n1,n2) scanf("%lld%lld",&n1,&n2) #define sll(n) scanf("%lld",&n) #define countSetBits(n) __buil...
ALGO
0.999902
3.88648
801fc314-da7a-4206-ace0-a66524481ec2
carlosmargraf/Exercicios-Beecrowd
1114 - Senha Fixa.cpp
#include<iostream> using namespace std; int main(int argc, char const *argv[]) { int senha, x; while(true) { cin >> senha; if(senha != 2002) { cout << "Senha Invalida" << endl; } else { cout << "Acesso Permitido" << endl; ...
TOOL
0.946007
3.890027
b518e5a6-663a-4887-b3df-b447384c6972
CoherentLabs/angle
src/compiler/UnfoldShortCircuitAST.cpp
#include "compiler/UnfoldShortCircuitAST.h" namespace { // "x || y" is equivalent to "x ? true : y". TIntermSelection *UnfoldOR(TIntermTyped *x, TIntermTyped *y) { const TType boolType(EbtBool, EbpUndefined); ConstantUnion *u = new ConstantUnion; u->setBConst(true); TIntermConstantUnion *trueNode = ne...
ALGO
0.997959
7.798291
42c1ea30-9b66-4ea2-957f-8f4487932ee3
luckydipper/realsensed435_visual_slam
bottom_up_bundle_adjustment/initial_map/initial_map.cpp
#include <opencv2/core.hpp> #include <opencv2/imgcodecs.hpp> #include "opencv2/imgproc/imgproc.hpp" #include <opencv2/highgui.hpp> #include <opencv2/opencv.hpp> #include <unistd.h> #include <pangolin/pangolin.h> #include <iostream> #include <Eigen/Core> using namespace cv; using namespace std; void find_feature_matches...
ALGO
0.955149
4.988854
ceba54b1-7846-4de0-ade2-4c4182beb84f
shyu61/program-competition
code/ant/133.cpp
// 2-SAT(Priest John's Busiest Day): P290 #include <bits/stdc++.h> using namespace std; using ll = long long; // 2-SATの利用シーン // 大前提、求めたいものが論理命題であり、かつそれを複数の論理式の組み合わせによって表現できること // 例) 区間の交差判定、制約付き選択、割当問題 // 充足可能性問題の考え方 // - 充足したい論理命題を決める // - その命題を真にするために満たす必要がある"制約条件"を論理式として加えていく // - 制約条件は、まず満たさなくなる条件を考えて、それを避けるための論理...
ALGO
0.999982
5.099026
cbad2154-aaf0-493a-8850-d191c08ba3b2
hegde95/ViZDoom_with_Sound
src/vizdoom/src/p_slopes.cpp
#include "doomtype.h" #include "p_local.h" #include "cmdlib.h" #include "p_lnspec.h" //=========================================================================== // // P_SpawnSlopeMakers // //=========================================================================== static void P_SlopeLineToPoint (int lineid, fixed...
TOOL
0.977933
4.852174
9c8991ad-5e02-49fb-a0ee-90f0b0b3d5ea
yangmanhanoi/DSA
ICPC B.cpp
#include<bits/stdc++.h> #pragma GCC optimize("Ofast") using namespace std; #define test() int t; cin >> t; while(t--) #define faster() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define endl '\n' #define ll long long const ll MOD = 1e9 + 7; int main() { faster() string s; cin >> s; unordered_map<i...
ALGO
0.999726
3.560725
40a0db8d-9183-4662-87bd-39a511495c62
NaeemAbdullahAkram/LeetCode
1486-find-the-distance-value-between-two-arrays/1486-find-the-distance-value-between-two-arrays.cpp
class Solution { public: int findTheDistanceValue(vector<int>& arr1, vector<int>& arr2, int d) { int i=0,j=0,ans=0; while(i<arr1.size()) { if(j<arr2.size()) { if(abs(arr1[i]-arr2[j])>d) j++; else { i++; j=0; ...
ALGO
0.999912
5.763625
f51b49ba-c79a-45ef-a007-0a376dbc6708
ishandutta2007/codeforces
rns_cus/normal/1120/A.cpp
#include <bits/stdc++.h> using namespace std; #define N 500500 int m, k, n, s, a[N], cur[N], cnt[N]; bool solve() { int rem = 0, d = m - k * n; for (int i = 0; i < N; i ++) if (cnt[i]) rem ++; for (int i = 0, j = -1; i < m; i ++) { while (rem) { j ++; if (j >= m) break; ...
ALGO
0.999953
3.073769
17c30ed6-4d47-41a0-a338-052164754812
Vetteru/Topcoder
DIV1/SRM580/EelAndRabbit.cpp
// BEGIN CUT HERE // END CUT HERE #include <sstream> #include <string> #include <vector> #include <map> #include <algorithm> #include <iostream> #include <utility> #include <set> #include <cctype> #include <queue> #include <stack> #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> using namespace ...
ALGO
0.999894
5.039713
1f2553bb-a9a1-403c-b006-e70a4858b5f9
todays-mitsui/opencv-fd
opencv/modules/imgproc/src/deriv.cpp
#include "precomp.hpp" #include "opencl_kernels_imgproc.hpp" /****************************************************************************************\ Sobel & Scharr Derivative Filters \****************************************************************************************/ namespace cv...
ALGO
0.99449
4.835148
a22b03ef-ff0a-4378-b467-cfa6cc5731fe
ishandutta2007/codeforces
zx2003/normal/891/B.cpp
#include<cstdio> #include<algorithm> using namespace std; const int N=24; int n,i,b[N]; pair<int,int>a[N]; int main(){ scanf("%d",&n); for(i=1;i<=n;++i)scanf("%d",&a[i].first),a[i].second=i;std::sort(a+1,a+n+1); for(i=2;i<=n;++i)b[a[i].second]=a[i-1].first; b[a[1].second]=a[n].first; for(i=1;i<=n;++i)printf("%d ",...
ALGO
0.999973
3.41341
4d1e39a8-152a-4ead-8c23-76463d84edc6
toufu-24/AtCoder
ABC/abc390/e/main.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; #define all(v) v.begin(), v.end() #define SORT(v) sort(v.begin(), v.end()) #define RSORT(v) sort(v.rbegin(), v.rend()) #define REVERSE(v) reverse(v.begin(), v.end()) #define ll long #define ld long double #define int ll int...
ALGO
0.999487
4.104367
8755ba73-bb80-4bba-9157-f0409f08086c
usukhbaatar/sqrt-online-course
Day8/array4.cpp
#include <iostream> #include <algorithm> using namespace std; int main() { int n; int a[7], x = 0; cin >> n; while (n > 0) { int b = n % 10; if (b == 9) b = 6; a[x] = b; x++; n = n / 10; } sort(a, a + x); // a[0], ..., a[x-1] //x: оронгийн тоо if (a[0] == 0) { for (int i = 0; i < x; i++) { if ...
ALGO
0.999793
4.599323
0b4a8b1f-9ee6-4425-b277-0b48753de72d
alexandraback/datacollection
solutions_2652486_0/C++/laing20333/source.cpp
#include<iostream> #include<string> #include<sstream> #include<cstdio> #include<stack> #include<vector> #include<algorithm> #include<map> #include<climits> #include<cmath> #include<memory.h> #include<sstream> #include<queue> #include<time.h> using namespace std; typedef long long ll; int product[10]; int pos[6] = {}; ...
ALGO
0.999391
3.406382
4445ce5b-49d5-4b63-9c4e-1a9667e25829
OliverZhangMin/data_structure
第五周作业/327_区间和的个数.cpp
class Solution { public: int countRangeSum(vector<int>& nums, int lower, int upper) { this->lower = lower; this->upper = upper; vec_sum.push_back(0); long long sum=0; for(const auto& it : nums) { sum+=it; vec_sum.push_back(sum); } ...
ALGO
0.999986
5.661756
31e27d04-b734-4524-8abe-2510fd1d809f
jvbraun/QDCPE
SeqAnal.cpp
// // File: SeqAnal.cpp // // Purpose: This file defines the sequence analyzer process for analysis // of a given FASTA sequence file. // // Author: Ron Braun // // History: // 10/25/98 RKB Created. // #include <math.h> #include <stdlib.h> #include "AnalAlg.h" #include "SeqAnal.h" ////////////////////////////...
ALGO
0.990168
5.713723
48221366-36f1-48b6-9e4d-97fb960b9558
sruthysab/leetcode
0209-minimum-size-subarray-sum/0209-minimum-size-subarray-sum.cpp
class Solution { public: int minSubArrayLen(int target, vector<int>& nums) { //remove from the front when sum becomes > target int minLen = INT_MAX; int start = 0, sum = 0; for(int i = 0; i < nums.size(); i++){ sum += nums[i]; while(sum >= target){ ...
ALGO
0.999995
6.417329
86228c86-1dc9-4438-b69e-a5101996cddf
nataliaisazaa/proyectoes
dividirlistas.cpp
#include <iostream> #include <stdio.h> #include <stdlib.h> using namespace std; struct nodo { int numero; struct nodo* sig; struct nodo* ant; }; typedef struct nodo*Lista; void insertarValores(Lista &lista,int digito) { Lista nuevo; nuevo = new(struct nodo); nuevo ->numero=digito; if(lista==NULL){ list...
ALGO
0.999347
3.999036
cfb7cf7e-33e8-4d88-b8a7-d86c134d2477
Ashfaq-Hussain7/Data_Structures_Lab
DS_LabCycle4/question7.cpp
#include <iostream> #include <vector> class HashTable { private: static const int TABLE_SIZE = 10; std::vector<int> table; int hash(int key) { return key % TABLE_SIZE; } public: HashTable() : table(TABLE_SIZE, -1) {} void insert(int key) ...
ALGO
0.999547
6.037134
dffc9da8-598c-411f-bafc-92e709147fd6
rilato/Baekjoon
cpp/단계별/브루트포스/^7568(덩치).cpp
//ڽź ū Կ Ű 1 о ǮѴ. #include <iostream> using namespace std; int main() { int input, weight, height; int rank = 1; cin >> input; // 迭 Ҵ int** arr = new int* [input]; for (int i = 0; i < input; i++) { arr[i] = new int[2]; } for (int i = 0; i < input; i++) { cin >> weight >> height; arr[i][0] ...
ALGO
0.999809
3.92298
05cc5303-46e7-4365-a56b-34225f2be34e
kinetiknz/gecko
gfx/angle/src/common/system_utils_win.cpp
// system_utils_win.cpp: Implementation of OS-specific functions for Windows #include "system_utils.h" #include <stdarg.h> #include <windows.h> #include <array> #include <vector> namespace angle { namespace { std::string GetExecutablePathImpl() { std::array<char, MAX_PATH> executableFileBuf; DWORD executab...
TOOL
0.867588
7.017408
3ab856cb-013f-4d9c-bcf0-d36f6ecddf21
coeing/cframework
framework/ext/boost/libs/graph/example/parallel-compile-time.cpp
namespace std { template < typename T > std::istream & operator >> (std::istream & in, std::pair < T, T > &p) { in >> p.first >> p.second; return in; } } namespace boost { enum vertex_compile_cost_t { vertex_compile_cost }; BOOST_INSTALL_PROPERTY(vertex, compile_cost); } using namespace boost; ...
ALGO
0.999756
4.425951
27b22da9-fe92-4076-97bc-accafce4c263
ishandutta2007/codeforces
enem/normal/1330/A.cpp
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define M1 1000000007 #define M2 998244353 #define ll long long #define pll pair<ll,ll> #define REP(i,a,b) for(ll i=a;i<b;i++) #define REPI(i,a,b) for(ll i=b-1;i>=a;i--...
ALGO
0.999991
4.139544
d77a6f89-aee6-438a-9404-06f7fcf1eb83
ChristianKiel3341135/KNCF_Lab_Assignment_1
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
4b3e848b-61b8-4ba9-ac1d-0a06d2202d72
schmoeren/Schule
c++/BubbleSort_HA.cpp
#include <iostream> using namespace std; void bubbleSort(double*, int, bool); void showArray(double*, int); int main() { double meinArray[] = { 2.5, 8.8, 6,-99.9 }; showArray(meinArray, 4); cout << endl; bubbleSort(meinArray, 4, false); showArray(meinArray, 4); } void showArray(double* d, int n) { for (int i =...
ALGO
0.999937
4.482544
c9322e31-3450-4cbb-b342-025e343ab0e1
cquero94/godotproject
thirdparty/embree/kernels/bvh/bvh_intersector1.cpp
#include "bvh_intersector1.h" #include "node_intersector1.h" #include "bvh_traverser1.h" #include "../geometry/intersector_iterators.h" #include "../geometry/triangle_intersector.h" #include "../geometry/trianglev_intersector.h" #include "../geometry/trianglev_mb_intersector.h" #include "../geometry/trianglei_intersec...
ALGO
0.998137
7.771978
d09efc09-9a09-405e-a5f9-a31984cc917e
DionysiosB/CodeForces
1600-1699/1650A-DeletionsOfTwoAdjacentLetters.cpp
#include <iostream> int main(){ long t; std::cin >> t; while(t--){ std::string s; std::cin >> s; char c; std::cin >> c; bool res(false); for(long p = 0; p < s.size(); p++){ if(s[p] != c){continue;} if(p % 2 == 0){res = true; break;} } st...
ALGO
0.999766
4.88303
1a493587-cf82-4d46-92d2-17dc976be31e
simsaens/Codea-Runtime
CodeaTemplate/Box2D/Dynamics/Contacts/b2ChainAndCircleContact.cpp
#include <Box2D/Dynamics/Contacts/b2ChainAndCircleContact.h> #include <Box2D/Common/b2BlockAllocator.h> #include <Box2D/Dynamics/b2Fixture.h> #include <Box2D/Collision/Shapes/b2ChainShape.h> #include <Box2D/Collision/Shapes/b2EdgeShape.h> #include <new> using namespace std; b2Contact* b2ChainAndCircleContact::Create(...
ALGO
0.973435
6.351975
58feca1a-b4f0-4928-be53-636660cab470
StolasIn/leetcode_Submissions
content/unique-email-addresses/Wrong Answer/2-25-2022, 11_14_22 PM/Solution.cpp
// https://leetcode.com/problems/unique-email-addresses class Solution { public: string trans(string& s){ string ans=""; bool flag = false; for(int i=0;i<s.size();i++){ if(flag==false){ if(s[i]=='.'){ continue; } ...
ALGO
0.999449
6.019447
51ef9ea4-314d-4fd4-9185-1d359f09067e
Feanor60/AVS
avs-proj02/parallel_builder/loop_mesh_builder.cpp
/** * @file loop_mesh_builder.cpp * * @author Vojtech Bubela <xbubel08stud.fit.vutbr.cz> * * @brief Parallel Marching Cubes implementation using OpenMP loops * * @date 16.12.2022 **/ #include <iostream> #include <math.h> #include <limits> #include "loop_mesh_builder.h" LoopMeshBuilder::LoopMeshBuild...
ALGO
0.995426
7.692318
b408ee07-47ad-47f6-8b44-c89af761ac1d
habanero-rice/hclib
test/performance-regression/full-apps/qmcpack/src/QMCWaveFunctions/Fermion/DiracDeterminantOpt.cpp
#include "QMCWaveFunctions/Fermion/DiracDeterminantOpt.h" #include "Numerics/OhmmsBlas.h" #include "Numerics/DeterminantOperators.h" namespace qmcplusplus { DiracDeterminantOpt::DiracDeterminantOpt (ParticleSet &ptcl, SPOSetBasePtr const &gs_spos, int first) : DiracDeterminantBase(gs_spos, first) { targetPtcl = &...
ALGO
0.982734
6.869109
fa112751-ab12-40f7-a774-541c4cb71abb
jyhana/SIMS_Qt_CMake
src/Sort.cpp
#include "Sort.h" #include "ui_Sort.h" #include <algorithm> Sort::Sort(QWidget* parent) : QWidget(parent), ui(new Ui::Sort) { ui->setupUi(this); sortButtonGroup = new QButtonGroup(); //实例化sortButtonGroup sortButtonGroup->addButton(ui->ARadioButton, 0); //将代表科目A的单选框加入sortButtonGroup并将其id设为0 ...
TOOL
0.944446
4.625113
04b7db20-79ed-4870-bc67-137e4ceef17b
edpannelap/flapcoin
src/rpc/blockchain.cpp
#include <rpc/blockchain.h> #include <amount.h> #include <base58.h> #include <chain.h> #include <chainparams.h> #include <checkpoints.h> #include <coins.h> #include <consensus/validation.h> #include <validation.h> #include <core_io.h> #include <index/txindex.h> #include <key_io.h> #include <policy/feerate.h> #include ...
WEB
0.873898
7.258667
3350f659-03fe-410b-9e83-1018746a6e0c
roydmerkel/xu4
u4/src/lzw/u4decode.cpp
#include "lzw.h" #include <cstdlib> #include <cstdio> #include <cstring> #include "u4decode.h" /* * Loads a file, decompresses it (from memory to memory), and writes the decompressed data to another file * Returns: * -1 if there was an error * the decompressed file length, on success */ long decompress_u4_file(F...
TOOL
0.967687
4.469488
42e49e52-e315-435c-94ab-0a571584e2aa
Apress/learn-cocos2d-game-dev-w-ios-5
CH12_code/PhysicsBox2D02/libs/Box2d/Dynamics/b2WorldCallbacks.cpp
#include <Box2D/Dynamics/b2WorldCallbacks.h> #include <Box2D/Dynamics/b2Fixture.h> // Return true if contact calculations should be performed between these two shapes. // If you implement your own collision filter you may want to build from this implementation. bool b2ContactFilter::ShouldCollide(b2Fixture* fixtureA, ...
TOOL
0.889198
7.063659
bdc49361-dca5-42d9-ba53-48724ae0ded3
ivanovp/Marlin_robot_arm
buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.cpp
#include "pins_arduino.h" #ifdef __cplusplus extern "C" { #endif // Digital PinName array const PinName digitalPin[] = { PA_0, //D0 PA_1, //D1 PA_2, //D2 PA_3, //D3 PA_4, //D4 PA_5, //D5 PA_6, //D6 PA_7, //D7 PA_8, //D8 PA_9, //D9 PA_10, //D10 PA_11, //D11 PA_12, //D12 PA_13, //D...
CONFIG
0.890284
4.548084
a30772d2-c2bd-4980-a40e-10d3c4bf9c2b
RedPandaProjects/RedSource
src/Utils/Vbsp/disp_ivp.cpp
struct disp_grid_t { int gridIndex; CUtlVector<int> dispList; }; static CUtlVector<disp_grid_t> gDispGridList; disp_grid_t &FindOrInsertGrid( int gridIndex ) { // linear search is slow, but only a few grids will be present for ( int i = gDispGridList.Count()-1; i >= 0; i-- ) { if ( gDispGridList[i].gridInde...
TOOL
0.9411
5.124708
7ad51965-1911-41a7-8899-d1c876a11875
dogdogogo/code
daily/dataStruct/stackAndQueue/ba_stack_link-imp_without-head.cpp
//usr/bin/env g++-11 -o main "$0" && ./main; rm -rf main; exit #include <stdio.h> #include <stdlib.h> typedef struct Stack { int data; struct Stack *next; } Stack, *LinkStack; void initStack(LinkStack&); bool push(LinkStack&, int); bool pop(LinkStack&, int&); bool top(LinkStack&, int&); void prtStack(LinkStack&)...
ALGO
0.997531
4.473934
f3871b12-324b-47ec-aef9-a2832f132273
diditong/UIUC-CS225-FA2018
lab_avl/avltree.cpp
/** * @file avltree.cpp * Definitions of the binary tree functions you'll be writing for this lab. * You'll need to modify this file. */ #include <algorithm> #include <cmath> template <class K, class V> V AVLTree<K, V>::find(const K& key) const { return find(root, key); } template <class K, class V> V AVLTree<...
ALGO
0.999367
5.970094
c27b18f6-14ae-4028-a1f4-f1ebfada5238
ProjectNighthold/NightholdCore
dep/g3dlite/source/MeshAlg.cpp
#include "G3D/MeshAlg.h" #include "G3D/Table.h" #include "G3D/Set.h" #include "G3D/Box.h" #include "G3D/Sphere.h" #include "G3D/vectorMath.h" #include "G3D/AABox.h" #include "G3D/Image1.h" #include <climits> namespace G3D { const int MeshAlg::Face::NONE = INT_MIN; void MeshAlg::generateGrid( Array<V...
ALGO
0.997743
7.832126
b3665d63-e0b6-42ce-8bbe-71723635e6e4
JollyNox/Elements-Engine
Collision.cpp
/* * File: collision.cpp * Author: Nick * * Created on 30 January 2009, 11:02 * Updated on 23 January 2012 for SFML 2.0 */ #include <SFML/Graphics.hpp> #include "Collision.h" Collision::Collision() { } Collision::~Collision() { } sf::Rect<int> Collision::GetAABB(const sf::Sprite& Object) { //Get t...
TEST
0.913424
6.419825
d0c2db62-02ed-4fd4-8b6d-f978e6ce1d21
mbsw04/CSE1321
Assignment2C/Assignment2C.cpp
#include <iostream> #include <string> #include <cmath> using namespace std; int main() { const double distance_moon = 384399.0 * pow(10, 3); const double distance_animal_cracker = 0.025; double meters_entered; float calculated_distance_moon; int calculated_distance_animal_cracker; int size; ...
TOOL
0.984576
4.221263
9fe23087-e29c-452a-9656-fa8a8da84c5d
Parzival1509/GFG_POTD
2023/2023-10/GFG_POTD_2023-10-22_Number_of_Paths.cpp
// GFG POTD 2023/10/22 // Number of Paths // Medium #include <bits/stdc++.h> using namespace std; #define ll long long class Solution { public: int mod = 1e9 + 7; ll power(ll x, int y, int p) { ll res = 1; while(y > 0) { if(y & 1) res = (res * x) % p; ...
ALGO
0.999992
6.023936
8970090e-1200-48b1-8f63-f5de10a6b3d7
ishandutta2007/codeforces
tfg/normal/845/G.cpp
#include <iostream> #include <vector> #include <chrono> #include <random> #include <cassert> std::mt19937 rng((int) std::chrono::steady_clock::now().time_since_epoch().count()); const int ms = 500500; template<const int N, class T = unsigned int> class XorGauss { public: XorGauss() { for(int i = 0; i < N; i++) { ...
ALGO
0.99995
4.908369
ad2afca3-ac25-484a-815d-2d8e04b90791
vjumpkung/01204214-Problem-Solving
week12/mid_ckkc.cpp
#include <iostream> #include <vector> using namespace std; class CKKC { public: char lst[10000]; int n; void get_input() { cin >> n; int t = 1; while (t != 0) { cin >> t; lst[t] = 'X'; } } char show_answer() { string c...
ALGO
0.999241
3.411857
8abfc650-9138-4c11-b99b-2be46fab5c81
pushkarNath007/100_Days_Master_CodeForces_Roadmap
Mathematics/Number_system/Extended_Euclidean_Algo.cpp
#include <bits/stdc++.h> using namespace std; vector<int> extendedEuclideanAlgorithm(int a, int b) { if (b == 0) return {a, 1, 0}; // gcd,x,y vector<int> arr = extendedEuclideanAlgorithm(b, a % b); int y = arr[2]; arr[2] = arr[1] - (a / b) * arr[2]; arr[1] = y; return arr; } int main() ...
ALGO
0.999943
3.970533
892c12ff-bcde-4e4e-9611-f2afefde74d4
GafferHQ/gaffer
src/GafferScene/SetAlgo.cpp
// uncomment to get additional debug output when parsing an expression // #define BOOST_SPIRIT_DEBUG #include "GafferScene/SetAlgo.h" #include "IECore/MessageHandler.h" #include "boost/algorithm/string/predicate.hpp" #include "boost/fusion/include/adapt_struct.hpp" #include "boost/phoenix/operator.hpp" #include "boo...
TOOL
0.987461
7.720482
a3953e00-1c78-4697-a61c-1c220c6d3284
Hypooxanthine/M2-SI3D-Rasterization
tutos/tuto_vertex_compute.cpp
//! \file tuto_vertex_compute.cpp exemple direct. #include "app.h" #include "vec.h" #include "mat.h" #include "program.h" #include "uniforms.h" #include "texture.h" #include "mesh.h" #include "wavefront.h" #include "orbiter.h" // cf tuto_storage namespace glsl { template < typename T > struct alignas(8...
TOOL
0.98365
6.325926
eacc161a-664d-454c-81b1-3fc00f1bbe1e
Taiyeaba/Versity_Code
data structure/code/array/marge.cpp
#include<iostream> using namespace std; void mergeArrays(int array1[], int array2[], int merge[], int s1, int s2) { int k = 0; for (int i = 0; i < s1; i++) { merge[k++] = array1[i]; } for (int i = 0; i < s2; i++) { merge[k++] = array2[i]; } } int main() { int array1[2...
ALGO
0.999544
4.590202
0cd6251b-dd3f-4f00-a10c-d85c7443451d
QHAlexDam/INF-1600-public
TP4/triangle.cpp
#include "triangle.h" #include <cmath> /****************************************/ /****************************************/ CTriangle::CTriangle(float sides[3]) { mSides[0] = sides[0]; mSides[1] = sides[1]; mSides[2] = sides[2]; } /****************************************/ /********************************...
TOOL
0.85618
5.176461
ad76b5cd-8fc2-4813-8136-e1cf78868ddf
Akash20x/Hackerblocks
Dynamic Programming/0-1Knapsack.cpp
#include <bits/stdc++.h> using namespace std; int knapSack(int W, int wt[], int val[], int n) { int i, w; int K[n+1][W+1]; memset(K,0,sizeof(K)); for (i = 0; i <= n; i++) { for (w = 0; w <= W; w++) { if (i==0 || w==0) K[i][w] = 0; else if (wt...
ALGO
0.999988
4.162499
f9a2499d-f247-4b0f-adda-fe43cca2a6aa
saumik-talukdar/CSES
Sorting and Searching/Collecting_Numbers.cpp
#include<bits/stdc++.h> using namespace std; #define int long long void solve() { int n; cin >> n; vector<int> arr(n); vector<int> pos(n + 1); // Store the position of each element in the array // Read the array for (int i = 0; i < n; i++) { cin >> arr[i]; pos[arr[i]] = i...
ALGO
0.999928
5.066084
5387b67c-94ab-4d31-be48-881de1c81bbe
Amisha328/Data-Structure-Algorithm
Searching/Triplet_with_givenSum.cpp
// Problem Statement: // Given an sorted array of integers, find if there is a triplet with sum equal to given sum ‘X’. // Two pointer Approach #include<bits/stdc++.h> using namespace std; #define eff ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define vi vector<int> bool isPair(vi arr, int l, int r, int sum){...
ALGO
1
5.617403
c1d20765-1a58-4ec3-b483-8672d6b96dea
algorithmcardboard/operating-systems
lab2/src/ds/process.cpp
#include "process.h" unsigned int Process::globalPID = 0; Process::Process(int arrivalTime, int totalCPUTime, int cpuBurst, int ioBurst, int priority){ this->pid = globalPID++; this->arrivalTime = arrivalTime; this->totalCPUTime = totalCPUTime; this->cpuBurst = cpuBurst; this->ioBurst = ioBurst; this->sta...
ALGO
0.978738
3.579538
6c08ee63-eb8c-4cf7-a102-f259d94a3969
Hrusteckiy/07rc1
3rd party/nvtt/src/nvtt/squish/weightedclusterfit.cpp
#include "weightedclusterfit.h" #include "colourset.h" #include "colourblock.h" #include <cfloat> namespace squish { WeightedClusterFit::WeightedClusterFit() { } void WeightedClusterFit::SetColourSet( ColourSet const* colours, int flags ) { ColourFit::SetColourSet( colours, flags ); // initialise the best ...
ALGO
0.957352
6.58023
d6531b85-e552-486b-94f1-4b0eb56f565c
abhi210702/newrep
arrays/swapAlternate.cpp
#include<iostream> using namespace std; void printarr(int arr[],int size){ for(int i=0;i<size;i++){ cout<<arr[i]<<" "; }cout<<endl; } void swapAlternate(int arr[],int size){ for(int i=0;i<size;i+=2){ if(i+1<size){ swap(arr[i],arr[i+1]); } } } int main(){ int e...
ALGO
0.999182
4.768301
9e64c620-fc49-4ee7-968a-205a8326474b
mathiaslyngbye/solve-sokoban
src/sokoban.cpp
#include <unistd.h> #include <array> #include <queue> #include <algorithm> #include <set> #include "sokoban.hpp" #include "fstream" Sokoban::Sokoban(std::string t_board, size_t t_cols, size_t t_rows) : m_board(t_board), m_rows(t_rows), m_cols(t_cols) { m_agent = m_board.find_first_of("Mm"); findGoals(m_goal...
ALGO
0.996268
5.052437
731a0020-ffd3-4d54-9aae-8da07f848c3c
ishandutta2007/codeforces
njwrz/normal/301/E.cpp
// // _oo0oo_ // o8888888o // 88" . "88 // (| -_- |) // 0\ = /0 // ___/`---'\___ // .' \\| |// '. // / \\||| : |||// \ // / _||||| -:- ||||...
ALGO
0.999959
4.147032
0ca4bdea-5c88-47a9-ac8a-26fcfdd99f0f
BerengerBerthoul/ad_bench
ad_bench/benchmark/cpp_direct.cpp
#include "ad_bench/benchmark/all.hpp" #include <vector> #include <iostream> #include <chrono> #include "ad_bench/benchmark/all.hpp" #include "ad_bench/operation/all.hpp" std::pair<double,double> benchmark_centered_gradient_cpp(int n_iter, int n_cell) { int gh = 2; int sz = n_cell+2*gh; // Creation std::ve...
ALGO
0.989424
5.967971
9d7f7682-753c-4937-ad24-9efad1420e84
devedu-AI/Data-Structures-and-Algorithms-in-Cpp-Mayank-Arora
011 - Maths/primeFactors(Optimized).cpp
// Print all Prime Factors (Optimized) #include <iostream> using namespace std; void printPrimeFactors(int n) { if(n <= 1) return; for(int i = 2; i * i <= n; i++){ while(n % i == 0) { cout << i << " "; n /= i; } } if(n > 1) { cout << n ...
ALGO
0.999932
5.074978
eec5575c-7566-4d76-bbc3-5edafd05fcd6
yoshiko721721/azarashi
azarashi_project/azarashi_project/azarashi_project/Code/08_Collider/BoxCollider.cpp
#include "BoxCollider.h" #include <algorithm> //-------------------------------------------------------------- //Xɍ킹Ē`̊pxvZ֐(]W) // //2024/11/14 ] //-------------------------------------------------------------- DirectX::XMFLOAT2 BoxCollider::RotatePosition(/*`̒SW*/DirectX::XMFLOAT2 point, /*`̊px*/float angle) { D...
ALGO
0.989744
5.159513
f1e19fc0-d6e0-4f9c-af05-55209f51fa06
giuliaguidi/XAVIER
benchmark/tools/seqan/demos/dox/index/shape_hash_init.cpp
#include <seqan/sequence.h> #include <seqan/index.h> using namespace seqan; int main() { DnaString text = "AAAACACAGTTTGA"; Shape<Dna, UngappedShape<3> > myShape; // loop using hash() and hashNext() starts at position 1 std::cout << hash(myShape, begin(text)) << '\t'; for (unsigned i = 1; i < len...
ALGO
0.926098
6.133972
5aac7577-00e0-4449-a489-faedbf3ae24a
boltonli/ohbee
video/sources/opencore-amr-0.1.2/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/sub.cpp
/* Filename: sub.cpp ------------------------------------------------------------------------------ MODULE DESCRIPTION Subtraction function with overflow control ------------------------------------------------------------------------------ */ /*------------------------------------------------------------------...
ALGO
0.9984
6.767292
b57a43ec-f62e-4eff-bb82-406e7dc0c2dd
palilo815/ps
baekjoon/1000/1697.cpp
#include<bits/stdc++.h> using namespace std; #define loop(i,n) for(int i=0;i<n;++i) bool visited[100001]; int main() { cin.tie(NULL), cout.tie(NULL); ios::sync_with_stdio(false); int n, k; cin >> n >> k; queue<int> q; q.push(n), q.push(-1); int ans = 0; while (1) { int x = q.front...
ALGO
0.999893
3.844453
0929bfa7-f8cf-4aef-99de-96c5e0de99ad
abhiram138b/LEETCODE
2138-divide-a-string-into-groups-of-size-k/2138-divide-a-string-into-groups-of-size-k.cpp
class Solution { public: vector<string> divideString(string s, int k, char fill) { vector<string> v; string str = ""; for(auto it : s){ if(str.size() == k){ v.push_back(str); str = it; }else{ str += it; } ...
ALGO
0.999593
5.521285
427db34c-bf9f-4859-b6f5-0d066277f09f
Prashantpx-17237/Leetcode-Solutions
1675-minimize-deviation-in-array/1675-minimize-deviation-in-array.cpp
class Solution { public: int minimumDeviation(vector<int>& nums) { set<int> st; for(auto i : nums) { if(i & 1) i *= 2; st.insert(i); } int ans = *st.rbegin() - *st.begin(); while(*st.rbegin() % 2 == 0) ...
ALGO
0.999941
5.628583
4224be60-eab1-44e1-b402-49ae819b061b
ishandutta2007/codeforces
hydrogen_zyx/normal/1662/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e5 + 10; vector<int> v[15]; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int t; cin >> t; while (t--) { int n; cin >> n; for (int i = 1; i <= 10; i++) ...
ALGO
0.999904
4.565717
6ad0c50c-ac67-4055-929a-b7ba864d38ab
SenseLogic/MYST
BOOST/boost_1_76_0/libs/compute/perf/perf_set_intersection.cpp
#include <algorithm> #include <iostream> #include <numeric> #include <vector> #include <boost/compute/system.hpp> #include <boost/compute/algorithm/set_intersection.hpp> #include <boost/compute/container/vector.hpp> #include "perf.hpp" int rand_int() { return static_cast<int>((rand() / double(RAND_MAX)) * 25.0);...
ALGO
0.979235
5.588104
4fedbbba-fc8b-4c37-9155-9c0245d7483d
sabari7320/Personal-Expenses-TrackerAPP
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.99887
6.783439
19df81dc-7b96-4387-a04d-a2a791494448
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_2937_4.cpp
#include <bits/stdc++.h> using namespace std; int main() { int r, c; cin >> r >> c; if (r == 1 && c == 1) { cout << "0"; return 0; } if (r == 1) { for (int i = 2; i <= c + 1; i++) { cout << i << " "; } return 0; } if (c == 1) { for (int i = 2; i <= r + 1; i++) { cout <<...
ALGO
0.999115
3.554535
b4fe119d-a1a6-4cb5-82e0-9fc7643a8c0b
youtube/cobalt_sandbox
buildtools/third_party/libc++/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp
// <algorithm> // template<RandomAccessIterator Iter, StrictWeakOrder<auto, Iter::value_type> Compare> // requires ShuffleIterator<Iter> // && CopyConstructible<Compare> // constexpr void // constexpr in C++20 // partial_sort(Iter first, Iter middle, Iter last, Compare comp); #include <algorithm> #incl...
TEST
0.978483
7.142455
fa903625-7892-41c6-8b4c-7cb7865edb1a
JuanAntonioCorona/Examples
C Plus Plus/Puzzles/Reverse_String/Reverse_String.cpp
// Reverse_String.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { char str[] = "1234"; int len = 0; char *a, *b, tmp; a = str; b = str; while (*b != 0) b++; b--; while (a < b) { tmp = *a; *a...
ALGO
0.976416
3.787057
c02f09ac-7830-4a20-b823-430e4f9fa197
goldenarchive/advantage-project
src/sync.cpp
#include "sync.h" #include "util.h" #include <boost/foreach.hpp> #ifdef DEBUG_LOCKCONTENTION void PrintLockContention(const char* pszName, const char* pszFile, int nLine) { LogPrintf("LOCKCONTENTION: %s\n", pszName); LogPrintf("Locker: %s:%d\n", pszFile, nLine); } #endif /* DEBUG_LOCKCONTENTION */ #ifdef DE...
TOOL
0.96889
5.92907
698203e3-aa74-40a3-8d55-3481afb45549
sarvex/solution-cpp
0873.length_of_longest_fibonacci_subsequence.cpp
class Solution { public: int lenLongestFibSubseq(vector<int>& arr) { unordered_map<int, int> mp; int n = arr.size(); for (int i = 0; i < n; ++i) mp[arr[i]] = i; vector<vector<int>> dp(n, vector<int>(n)); for (int i = 0; i < n; ++i) for (int j = 0; j < i; ++j) ...
ALGO
0.999888
5.430672
15c77d31-e9af-404a-943f-e8925b8ed4bb
ronick-grammer/Algorithm
BOJ/BOJ_18428_감시 피하기.cpp
#include <iostream> #include <utility> #include <vector> #include <algorithm> using namespace std; //problem link: https://www.acmicpc.net/problem/18428 int n; bool detected; // 학생이 발견되었는지 여부 char map[7][7]; // 오리지널 맵 char temp_map[7][7]; // 오리지널 맵에 벽들이 설치 될 맵 // 순서대로 상 하 좌 우 int dr[4] = {-1, 1, 0, 0}; int dc[4] = ...
ALGO
0.999933
5.062678