uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
1fa1e3db-bc60-438f-8a6a-9945fcb2d30c
bhargav-borah/DSAPractice
isPalindromeRecursive.cpp
#include <iostream> using namespace std; bool isPalindrome(string s, int start, int end) { if (start == end) return true; if (s[start] != s[end]) return false; return isPalindrome(s, start + 1, end - 1); } int main() { string name = "racecar"; cout << isPalindrome(name, 0, 6) << endl; ...
ALGO
0.999348
5.286163
3611b44c-9cd7-422d-acd6-643c9320c669
zhsso/sproxel
Tools.cpp
#include "Tools.h" #include "RayWalk.h" #include "GLModelWidget.h" //////////////////////////////////////// void SplatToolState::execute() { p_undoManager->beginMacro("Splat"); std::vector<Imath::V3i> voxels = voxelsAffected(); for (size_t i = 0; i < voxels.size(); i++) { p_undoManager->setVoxe...
TOOL
0.908513
4.757136
aefd8c1e-4b58-431e-94c9-dbc5d7ff5890
Capzera/Cpp
LGOJ/LGR-172-Div.4 #19/D.cpp
#include <bits/stdc++.h> using namespace std; long long a, b, c, d, e, f, g, p, l1, r1, l2, r2, ans; int main() { cin >> a >> b >> c >> d >> e >> f >> g >> p >> l1 >> r1 >> l2 >> r2; for (int x = l1; x <= r1; x++) for (int y = l2; y <= r2; y++) ans = max(ans, (a * x * x * x + b * y * y * y + c * y * x * x + d * ...
ALGO
0.999912
3.70459
37677c51-ddab-4bf2-9cef-b0915dfc3c84
Next-Gen-UI/Hacktober
Leetcode/0651. 4 Keys Keyboard/0651-2.cpp
class Solution { public: int maxA(int N) { // dp[i] := max 'A' can be printed w/ i pressings vector<int> dp(N + 1); // 'A' * i iota(begin(dp), end(dp), 0); for (int i = 0; i <= N; ++i) for (int j = 0; j <= i - 3; ++j) dp[i] = max(dp[i], dp[j] * (i - j - 1)); return dp[N]; }...
ALGO
0.999734
5.583075
3e82a40c-ee1a-4b65-aace-3fe772a2dc56
bhavyakalra19/comp-prog
3628-find-minimum-time-to-reach-last-room-ii/find-minimum-time-to-reach-last-room-ii.cpp
class Solution { public: int minTimeToReach(vector<vector<int>>& moveTime) { int m = moveTime.size(); int n = moveTime[0].size(); priority_queue<pair<int,vector<int>>, vector<pair<int,vector<int>>>, greater<pair<int,vector<int>>>> pq; vector<vector<int>> check(m,vector<int>(n,INT_MAX...
ALGO
0.999949
6.026697
4e132234-e3f2-4336-8649-a93f4297fbd4
pietroblandizzi/cracking-the-coding-interview
2/2_8.cpp
#include <iostream> #include <stdlib.h> class Node { friend class List; int data; Node *next; public: int getData () {return data;} Node* getNext () {return next;} void setNext (Node* n) {next = n;} }; class List { Node* head; public: Node* getHead() {return head;} List() {head = ...
ALGO
0.998862
4.317853
a57f5f03-8c1e-4acd-ae15-886d78d062fa
Chiragsuri/LeetCode
Maximum path sum from any node - GFG/maximum-path-sum-from-any-node.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // Tree Node struct Node { int data; Node *left; Node *right; Node(int val) { data = val; left = right = NULL; } }; // Function to Build Tree Node *buildTree(string str) { // Corner Case if (str.length() ...
ALGO
0.999775
7.063112
47d8cd3e-c76c-43f5-82eb-2cd65a370632
hfcr14/FC1_64bit_OpenFC
Externals/meshoptimizer/src/indexcodec.cpp
#include <assert.h> #include <string.h> // This work is based on: // Fabian Giesen. Simple lossless index buffer compression & follow-up. 2013 // Conor Stokes. Vertex Cache Optimised Index Buffer Compression. 2014 namespace meshopt { const unsigned char kIndexHeader = 0xe0; const unsigned char kSequenceHeader = 0xd0;...
ALGO
0.962193
6.656086
8523537f-d7b9-4e51-89fb-bdbfc4e61178
Raj007-bit/CPP-DataStructure
patter1.cpp
#include <iostream> using namespace std; // Function to demonstrate printing pattern void pypart(int n) { // Outer loop to handle number of rows // n in this case for (int i = 0; i < n; i++) { // Inner loop to handle number of columns // values changing acc. to outer loop for (in...
ALGO
0.999614
4.410121
23540aa9-7744-4144-b3ab-07cb3176fca9
amolsatsangi/Leetcode
Easy/Find a Corresponding Node of a Binary Tree in a Clone of That Tree/Find a Corresponding Node of a Binary Tree in a Clone of That Tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ TreeNode * node; class Solution { public: TreeNode* getTargetCopy(TreeNode* original, TreeNode* cloned, TreeNode* target...
ALGO
0.999784
5.40413
48b91ec1-2537-407a-837c-dbf880912fc7
shuav/Copter_3.6.5
libraries/AP_Math/vector2.cpp
#pragma GCC optimize("O3") #include "AP_Math.h" template <typename T> float Vector2<T>::length(void) const { return norm(x, y); } // dot product template <typename T> T Vector2<T>::operator *(const Vector2<T> &v) const { return x*v.x + y*v.y; } // cross product template <typename T> T Vector2<T>::operator %(co...
TOOL
0.931514
6.447634
d137d179-c89a-497b-8fae-c556921d8f51
bdlemos/Faculdade
Semestre_3/ED/TP2/src/main.cpp
#include<bits/stdc++.h> #include "Graham.hpp" #include "Jarvis.hpp" using namespace std; void automatizar(string algoritmo,string metodo, string arquivo); int main(int argc, char *argv[]){ if (argc < 2){ cout << "Nenhum arquivo passado para leitura" << endl << "Uso: ./TP2 <nome do arquivo>" << endl; ...
ALGO
0.993515
4.229088
98b14ee4-f066-4ff5-aa19-03ae8e1addc7
PiyushKumarSingh-90/101_Cplusplus_problems
Code96.cpp
#include <iostream> using namespace std; int main() { int n; cout << "Enter the number of rows: "; cin >> n; for (int i = 1; i <= n; i++) { // Print spaces before numbers for (int j = 1; j <= n - i; j++) { cout << " "; } // Print numbers in increasing orde...
ALGO
0.999556
5.00466
4af66e97-ecbc-4ada-a82d-014d9feeb613
bhuvy2/deku-ai
src/neat/neuron.cpp
#include "neuron.hpp" #include <cmath> double Neuron::sigmoid(const double &x) const { return 2 / (1 + exp(-4.9 * x)) - 1; } void Neuron::clear() { weight = 0; incoming.clear(); } Neuron::Neuron(const Neuron &other) { copy(other); } Neuron::Neuron(Neuron &&other) { swap(other); } Neuron &Neuron::operator=(Neur...
ALGO
0.986368
5.019125
41f6291f-8304-46b9-b7b3-5944e1b622df
goguma1000/programmers_codingtest
baekjoon/string/20291[파일 정리].cpp
#include<iostream> #include<string> #include<map> using namespace std; int main() { std::ios::sync_with_stdio(false); std::cin.tie(NULL); std::cout.tie(NULL); map<string, int> Dir; int n; cin >> n; for (int i = 0; i < n; ++i) { string src; cin >> src; string ext = src.substr(src.find('.') + 1, src.length()...
ALGO
0.997077
4.812113
5c237330-cad7-443a-9147-ce670afca6d6
bqmnhat/CompetitiveProgramming
Tuyen1709/SUPERTHIEF/main.cpp
#include <iostream> #include <bits/stdc++.h> #define MaxN 100007 #define MaxK 200007 using namespace std; typedef long long ll; typedef pair<ll, ll> pii; typedef pair<int, pii> piii; struct Cmd { ll dist; int id; int To; //To == 0 => Ver; To == 1 => Hor }; struct Node { int x, y, id; }; int n, m, k; ll ...
ALGO
0.999943
3.726457
780e1135-889c-45db-a8ed-de62e1431f1a
QbitQuantum/Basics
Исходники/TextFileSearcherText.cpp
bool TextFileSearcherText::MatchLine(wxString line) { bool match = false; if ( m_MatchCase == false ) { line.LowerCase(); } int pos = line.Find(m_SearchText.c_str()); int nextPos; while ( (match == false) && (pos >= 0) ) { char c = ' '; // c is either the preceeding char or a virtual char //...
TOOL
0.989324
5.674517
dec57f11-d216-4208-8e06-7a3046d94f6e
fithisux/FSL
extras/include/boost/libs/graph/example/family-tree-eg.cpp
enum family { Jeanie, Debbie, Rick, John, Amanda, Margaret, Benjamin, N }; int main() { using namespace boost; const char *name[] = { "Jeanie", "Debbie", "Rick", "John", "Amanda", "Margaret", "Benjamin" }; adjacency_list <> g(N); add_edge(Jeanie, Debbie, g); add_edge(Jeanie, Rick, g); add_edge(Jeanie...
ALGO
0.99475
4.287706
628eb87d-0778-4a5f-8634-c0725a206f8e
teachyourselfcoding/Firmware
src/modules/commander/calibration_routines.cpp
/** * @file calibration_routines.cpp * Calibration routines implementations. * * @author Lorenz Meier <<EMAIL>> */ #include <px4_defines.h> #include <px4_posix.h> #include <px4_time.h> #include <stdio.h> #include <unistd.h> #include <math.h> #include <float.h> #include <poll.h> #include <drivers/drv_hrt.h> #inclu...
ALGO
0.998962
4.084158
7b3fddfa-b7f0-4029-9220-370269ae3c92
ishandutta2007/codeforces
rg_gr/normal/1463/F.cpp
// Problem: F. Max Correct Set // Contest: Codeforces - Educational Codeforces Round 100 (Rated for Div. 2) // URL: https://codeforces.com/contest/1463/problem/F // Memory Limit: 256 MB // Time Limit: 4000 ms // // Powered by CP Editor (https://cpeditor.org) // - / /* + ++ +++ ++++ +++++ ++++++ +++++++ ++++++++ +++...
ALGO
0.999447
3.180864
6bdc3ec9-f82a-458a-83be-787fcbe560d8
najmulhc/grind-station
string/isomorphic..cpp
#include <iostream> #include <string> #include <map> using namespace std; int main() { string s1 = "baba"; string s2 = "badc"; map<char, char> hash; for (int i = 0; i < s1.size(); i++) { if (!hash[s2[i]]) { hash[s2[i]] = s1[i]; } else { ...
ALGO
0.99977
3.920405
853b0dfe-6aef-4c75-bc80-346ca723bcb1
MrityunjayNPandey/vscode
CP/stalls.cpp
/** * codeforces: _joKer_0 * codechef: joker_0000 * created: 05-03-2022 12:59:11 **/ #include <bits/stdc++.h> using namespace std; #define endl "\n" #ifdef DEBUG #include "algo/debug.h" #else #define debug(...) #define dclear(x) #endif #define free freopen("input.txt","r",stdin);freopen("output.txt","w...
ALGO
0.999022
4.358055
57248acf-0a52-4c41-8b3c-5f2d69115115
mushfiq-906/cp__training
GYM__Contests/2018-2019 ACM-ICPC, NEERC, Southern Subregional Contest, Qualification Stage/C - Bacteria.cpp
// Author : Abdallah Hemdan // For Hassanosama, ICPC next year ISA. #ifdef _MSC_VER #define _CRT_SECURE_NO_WARNINGS #endif #include <bits/stdc++.h> #define vll vector<ll> #define vi vector<int> #define sz size() #define pll pair<ll, ll> #define pii pair<int, int> #define IO \ ios_base::sync_with_stdio(0), ios::sync_w...
ALGO
0.99994
3.96636
5f3d5cfd-79b5-4b91-9b1b-084adc6e54ed
raincross7/code-similarity
codes/train_code/problem039/problem039_244.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int Maxn = 303; const ll Inf = 1000000000000000000ll; int n, k; int H[Maxn]; ll dp[Maxn][Maxn][Maxn]; int main() { fill((ll*)dp, (ll*)dp + Maxn * Maxn * Maxn, Inf); dp[1][0][0] = 0; scanf("%d %d", &n, &k); for (int i = 1; i <=...
ALGO
0.999942
3.631141
c8da8675-0bb6-42fe-b6bb-6457013e92e0
isac322/SCPC
SCPC/practice_2.cpp
#include <cstdio> #include <algorithm> using namespace std; int t, arr[300001]; int main() { scanf("%d", &t); for (int c = 1; c <= t; c++) { int n; scanf("%d", &n); for (int i = 0; i < n; i++) scanf("%d", arr + i); sort(arr, arr + n); int maximum = 0; for (int i = 0; i < n; i++) maximum = max(maximum,...
ALGO
0.99974
3.570337
5b08d5dd-0139-4c38-b4b4-0a87eb783a4f
leonardonm15/competitive_programing
icpc/fase_zero_2024/j2.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define int long long vector<string> arr; int calc(int i, int j, int k, int l, int n, int m) { int resp = 0; // cout << "-------------------" << endl; // cout << "i -> " << i << endl; // cout << "j -> " << j << endl; // cout << "K -...
ALGO
0.999918
4.017506
d69dd3d3-d367-454c-bc09-be3999b7adcc
Nickurama/competitive_programming
CSES/introductory_problems/chessboard_and_queens.cpp
#include <bits/stdc++.h> bool isBeingAttacked(int row, int col, std::vector<std::pair<int, int>>& queens_location) { for (std::pair<int, int> queen : queens_location) { if (row == queen.first) return true; if (col == queen.second) return true; // (row + 1) + (col + 1) - 1 // int this_diagonal0 = row +...
ALGO
0.999538
4.743804
be1b7e22-aa9a-4875-811b-7e49b383fe92
parthbrahmaxatri/data-structures
DP2/Knapsack-Memoization.cpp
/* A thief is robbing a store and can carry a maximal weight of W into his knapsack. There are N items and ith item weighs wi and is of value vi. Considering the constraints of maximum weight that knapsack can carry, you have to find and return the maximum value that thief can generate by stealing items. I...
ALGO
0.999999
4.999497
21a49d18-ad6f-4411-8a93-a0bda1c4d47b
KaitoEight/tesst
Bai 076/Bai 76.cpp
#include <iostream> #include <cmath> using namespace std; int main() { int n, x; cin >> n >> x; float S = 1 + x; int t = x; int m = 1; for (int i = 3; i <= (2 * n) + 1; i = i + 2) { t = t * x * x; m = m * i * (i - 1); S = S + ((float)t / m); } cout << S; return 0; }
ALGO
0.999464
3.68889
dc00c665-1c8e-407e-9369-3de5e5b8b1e2
secondo-database/secondo
Algebras/ImageSimilarity/tools/EMD.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <cmath> #include <algorithm> #include <random> #include "../JPEGImage.h" #include <fstream> double transport2(std::vector<FeatureSignatureTuple> ist1, std::vector<FeatureSignatureTuple> ist2); struct Flow { double fromWeigh...
ALGO
0.933267
4.56989
6600ddf7-258d-4ceb-a7d9-c617af608326
vikas7974/InterviewSheet
DSA/Leetcode/SortColors.cpp
// Leetcode Problem 75 class Solution { public: void sortColors(vector<int> &nums) { int len = nums.size(); // traversing one by one for (int i = 0; i < len; i++) { for (int j = 0; j < len; j++) { if (nums[i] < nums[j]) { ...
ALGO
0.999991
5.625495
375cf8aa-2cee-428f-bcad-a9d54106473a
ayushjain4702/DSA
LinkedList/loopsInLL.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: int data; Node* next; Node(int data){ this->data = data; this->next = NULL; } }; //print linked list void print(Node* &head){ Node*temp = head; while(temp!=NULL){ cout<<temp->data<<" "; temp = temp->ne...
ALGO
0.999944
4.712069
2687af15-ddea-465c-9729-00f433160d5d
imoncoc/C-and-C-plus-plus
Toph test/New Folder toph test/Alayna and Strings.cpp
#include<bits/stdc++.h> using namespace std; int main(){ string st; cin>>st; int lower = 0, upper = 0; for(int i = 0; i < st.size(); i++){ if(isupper(st[i])) upper++; else if(islower(st[i])) lower++; } cout<<upper<<" "<<lower<<endl; return 0; }
ALGO
0.998752
5.153908
ce35c2cc-997e-4870-8407-90e8c5faf24a
Junghs-cloud/Baekjoon
Silver/4/_1920.cpp
#include <iostream> #include <algorithm> using namespace std; int N; int* arrN; void binarySearch(int target, int start, int end) { while (start <= end) { int mid = (end + start) / 2; if (target == arrN[mid]) { cout << "1" << "\n"; return; } else if (target < arrN[mid]) { end = mid - 1; } e...
ALGO
0.999984
4.432611
d6ce9c99-3086-41c9-9603-7c476625a90e
codeboom471/Hacktoberfest2022-DSA
cpp/MergeSort.cpp
#include <bits/stdc++.h> using namespace std; void swapping(int &a, int &b) { //swap the content of a and b int temp; temp = a; a = b; b = temp; } void display(int *array, int size) { for(int i = 0; i<size; i++) cout << array[i] << " "; cout << endl; } void merge(int *array, int l, int m, in...
ALGO
0.999939
4.684557
ab942d7c-9d73-44c8-b506-d84b6be05fd4
lychees/ACM-Training
Note/多校/2013/2013多校/2013多校4/1003.cpp
/* * Author:kuangbin * 1003.cpp */ #include <stdio.h> #include <algorithm> #include <string.h> #include <iostream> #include <map> #include <vector> #include <queue> #include <set> #include <string> #include <math.h> using namespace std; char g[220][220]; int sx,sy,ex,ey; int n,m; int keynum; int key_s[220][220];...
ALGO
0.999925
3.20479
c5c3952d-c947-4578-b6c8-cf6ce4fd8c01
abhishek18124/PPCPPSept2021
5. January/Lecture 36 - 23rdJanuary2022/005Graphs_SSSPUsingDijkstra.cpp
/* Computing SSSP using the Dijkstra's algorithm in a weighted graph. Note : each vertex in the graph is generic. */ #include<iostream> #include<map> #include<unordered_set> #include<set> #include<list> #include<climits> using namespace std; template <typename T> class graph { map<T, list<pair<T, int>>> neighbou...
ALGO
0.999944
5.600533
29a25bc5-1202-4e19-b315-72a581a34008
CutIce/kraken
test/CFcoding/POJ/1990.cpp
// // Created by hsh on 2020/8/4. // #include <iostream> #include <stack> #include <deque> #include <queue> #include <tuple> #include <set> #include <map> #include <algorithm> #include <string.h> #include <math.h> using namespace std; typedef long long ll; typedef pair<int, int> cow; int n; cow data[20010]; int tree[2...
ALGO
0.999721
3.310841
15b804dc-1a83-4744-bb5e-4aee03c4acbc
convict-git/sport_coding
practise_contest/atcoder.jp/AtCoder_Beginner_Contest_137/D_Summer_Vacation/D_Summer_Vacation.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #pragma GCC optimize ("Ofast") #pragma GCC optimize ("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") ...
ALGO
0.999966
4.514423
babf6426-c712-487f-a8a4-e1ec1ce14593
AvijitChowdhury/C-Cplusplus-DSA
5_Algorithm/Algorithms-II/Module 18/union.cpp
#include <bits/stdc++.h> using namespace std; int parent[1000]; int parentSize[1000]; void dsu_set(int n) { for (int i = 1; i <= n; i++) { parent[i] = -1; parentSize[i] = 1; } } int dsu_find(int node) { while (parent[node] != -1) { node = parent[node]; } return node; ...
ALGO
0.999952
4.429236
8ff90414-b01a-4a80-9bcd-06ea0f871ba1
zevellong/zw_blog
c_cpp/Design_Patterns/protoType/sheep.cpp
#include <iostream> #include <string> #include <memory> #include <vector> #include <unordered_map> using std::cin; using std::cout; using std::endl; using std::string; using std::vector; class point2D{ public: point2D(double xx, double yy) : x(xx), y(yy) {} void print() { cout ...
TOOL
0.93762
4.85805
f16febd9-c781-44c0-ba39-ef864aaba251
TheNitesWhoSay/MiniViews
source/IcuLib/uvector.cpp
#include "uvector.h" #include "cmemory.h" #include "uarrsort.h" #include "uelement.h" U_NAMESPACE_BEGIN #define DEFAULT_CAPACITY 8 /* * Constants for hinting whether a key is an integer * or a pointer. If a hint bit is zero, then the associated * token is assumed to be an integer. This is needed for iSeries */ ...
TOOL
0.926011
6.984235
896507ca-3aef-4bcd-8ac5-a6c1548237c7
anas092121/Leetcode-Solutions
3246-check-if-bitwise-or-has-trailing-zeros/3246-check-if-bitwise-or-has-trailing-zeros.cpp
class Solution { public: bool hasTrailingZeros(vector<int>& nums) { int count = 0; for(int i=0; i<nums.size(); i++){ if(nums[i]%2 == 0){ count++; } if(count>1){ return true; } } return false; } };
ALGO
0.99938
5.786865
096a7eb4-000b-4304-9eb4-3994c5eb70f0
yocontra/node-gdal-next
deps/libgeos/geos/src/geomgraph/index/MonotoneChainEdge.cpp
#include <cassert> #include <vector> #include <geos/geomgraph/Edge.h> #include <geos/geomgraph/index/MonotoneChainEdge.h> #include <geos/geomgraph/index/MonotoneChainIndexer.h> #include <geos/geomgraph/index/SegmentIntersector.h> #include <geos/geom/Coordinate.h> #include <geos/geom/CoordinateSequence.h> using namesp...
ALGO
0.999879
6.655346
43d1decc-f59e-488d-8aa1-53fbecd3e6d9
Qipu1220/BaiTapMang1Chieu
23520493_23521082_23521462_23521604_23521672_BT03/Bai123/Bai123.cpp
#include <iostream> #include <iomanip> #include <fstream> using namespace std; void Nhap(int[], int&); void Xuat(int[], int); int ktDoiXung(int[], int); int main() { int b[10]; int n; Nhap(b, n); cout << "Mang ban dau:" << endl; Xuat(b, n); cout << "Mang so nguyen co ton tai hai gia tri khong lien tiep hay khong...
ALGO
0.998996
3.726463
ab84f1af-e2b6-487e-86fa-51803baffb0b
GrimReaper03/core
libutils/JenkinsHash.cpp
/* Implementation of Jenkins one-at-a-time hash function. These choices are * optimized for code size and portability, rather than raw speed. But speed * should still be quite good. **/ #include <stdlib.h> #include <utils/JenkinsHash.h> namespace android { #ifdef __clang__ __attribute__((no_sanitize("integer"))) ...
ALGO
0.984471
7.085464
23e1ad7a-d501-47be-961b-ef0cdaf7b14e
aqrose0526/test_01
4/addpnstrs.cpp
// addpntrs.cpp -- pointer addition # include <iostream> int main(){ using namespace std; double wages [3] = {10000.0, 20000.0, 30000.0}; short stacks [3] = {3, 2, 1}; // here are two ways to get the address of an array double * pw = wages; short * ps = &stacks[0]; cout << "pw = " << ...
TOOL
0.970617
3.636657
5f79b123-7239-4233-9245-729273528d45
a-windisch/Introduction_to_CUDA_WT2016
Lecture_iv/CUDA_C_code/mpi_launcher.cpp
#include <iostream> #include <vector> #include <mpi.h> #include "CUDA_function.h" #define N 16384 #define N_work 100 #define ARRAYTAG 1 using namespace std; extern vector<double> launch_CUDA_C_code( int num_procs, int proc_id, int dim, int work, vector<double> M_MPI_part); int main( int argc, char *argv[]) { int...
ALGO
0.999532
4.533908
bb94181c-2f0b-4bf9-9122-c26c9ed3d8f5
CoderKumarS/OOP
if.cpp
//using largest number #include<iostream> using namespace std; int main() { int n1,n2,n3; cout<<"Enetr the value"<<endl; cin>>n1; cout<<"Enetr the value"<<endl; cin>>n2; cout<<"Enetr the value"<<endl; cin>>n3; if(n1>n2&&n1>n3) { cout<<"the largest number1 =" <<n1<<endl; }...
ALGO
0.998229
3.290509
32b24c9f-f82f-43df-8316-7e6bdc51d362
mujtaba1747/Algorithms
cycle_detection.cpp
#include <bits/stdc++.h> using namespace std; int n; vector<vector<int>> adj; vector<char> color; vector<int> parent; int cycle_start, cycle_end; bool dfs(int v) { color[v] = 1; for (int u : adj[v]) { if (color[u] == 0) { parent[u] = v; if (dfs(u)) return true; ...
ALGO
0.999866
4.496943
9f471199-2c4c-4009-a3d6-40e60f2c9e49
sarvex/leetcode-piet
solution/1700-1799/1722.Minimize Hamming Distance After Swap Operations/Solution.cpp
class Solution { public: vector<int> p; int minimumHammingDistance(vector<int>& source, vector<int>& target, vector<vector<int>>& allowedSwaps) { int n = source.size(); p.resize(n); for (int i = 0; i < n; ++i) p[i] = i; for (auto e : allowedSwaps) p[find(e[0])] = find(e[1]); ...
ALGO
0.999983
6.085533
8a3c0ecd-9c6b-4b33-a13a-5c23baf8694f
milmillin/comp-prog
CEOI/2016/trick.cpp
#include <cstdio> #include <cassert> int tbl[20]; void solve12() { int n; scanf("%d",&n); assert(n<=6); int x=0; for (int i=0;i<n;i++) { scanf("%d",&tbl[i]); x^=tbl[i]; } for (int i=0;i<n;i++) { for (int j=i+1;j<n;j++) { if ((tbl[i]^tbl[j])==x) { printf("%d %d\n",tbl[i],tbl[j]); return; } ...
ALGO
0.999827
3.37735
b8e18ed1-ad48-4436-834c-3e3bd3346d96
heavenMOJANG/ICPC
.history/luogu/P5494 【模板】线段树分裂_20240801162842.cpp
#pragma GCC optimize(1) #pragma GCC optimize(2) #pragma GCC optimize(3,"Ofast","inline") #include<bits/stdc++.h> #define int long long using namespace std; constexpr int INF = 0x7fffffff; constexpr int N = 2e5 + 10; struct Node { int sum, l, r; }t[N << 5]; int n, m, idx = 1,rt[N << 2], rub[N << 5], cnt, tot; int _n...
ALGO
0.999832
3.657475
007aa678-1f8f-47a7-9478-f80ee562cd2d
ViniciusHenriqueB/Programacao_Competitiva
CIC10169-Programacao_Competitiva/labs/lab-3/C-Alternating_Current.cpp
#include <bits/stdc++.h> using namespace std; #define fast_io ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int main() { fast_io; string f; stack<char> pilha; cin >> f; for (char sinal : f) { if (!pilha.empty() && sinal == pilha.top()) { pilha.pop(); } ...
ALGO
0.999993
4.668164
078498eb-951b-49ef-9b25-53ba4b498210
zita-huang/SI204
lab11/part3.cpp
/******* Filename: part3.cpp Author: Zita Huang (m272898) Lab 11 Part 3 *******/ #include <iostream> #include <string> using namespace std; #include "fractals.h" int main() { cantor_row(1,1); cout << endl << endl << endl; cantor_row(3,1); cout << endl; cantor_row(3,3); cout << endl << endl << endl; ...
ALGO
0.985181
4.485676
220b8564-644f-4375-8b93-9cc3634cd5ca
ecwu/COMP1013_SP
Lab5/optionaltask2.cpp
/* Author: Zhenghao Wu l630003054 verify all the numbers under 1000 which are the multiple of 3 will finally reach 153 through a series calculation calculation:cube each digit and then get the sum, repeat this process */ #include <stdio.h> int main() { int processed = 0, times = 0, indicator = 0; for (int n ...
ALGO
0.99975
4.4432
dab21ddf-f5e1-4ad3-95f9-960ca524a894
airen3339/llvm-project
mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp
#include "mlir/Dialect/SCF/Transforms/Passes.h" #include "mlir/Dialect/Affine/IR/AffineOps.h" #include "mlir/Dialect/Arith/IR/Arith.h" #include "mlir/Dialect/SCF/IR/SCF.h" #include "mlir/Dialect/SCF/Transforms/Transforms.h" #include "mlir/Dialect/SCF/Utils/Utils.h" namespace mlir { #define GEN_PASS_DEF_SCFPARALLELLOO...
ALGO
0.964387
6.385167
05d7b430-5333-4b0d-b17c-c4d709268b1d
TIPatle/Practice
Practice/F1rule.cpp
#include <bits/stdc++.h> #define N 1e7 #define M 1e5 #define vi vector<int> #define vii vector<pair<int, int>> #define pii pair<int, int> #define rep(i, a, b) for(int i = a; i<b; i++) #define decrep(i, a, b) for ( int i = a; i>=b; i--) using namespace std; int main(){ int t; cin>>t; while(t--){ ...
ALGO
0.999146
3.863165
78cd3362-3892-495e-bd80-48c5b6f1a9f1
yuvikaKathaith/DSA
BasicsC++/Pattern/pattern7.cpp
#include<iostream> using namespace std; //1 //2 3 //4 5 6 int main(){ int n; cin>>n; int i=1; int count=1; while(i<=n){ int j=1; while(j<=i){ cout<<count<<" "; count++; j++; } cout<<endl; i++; } }
ALGO
0.999955
4.014788
f9ff36f8-44d4-4b3e-bea2-2b5429196da1
YotaIshigaki/P3T
FDPS-5.0a/sample/c++/sph/main.cpp
// Include FDPS header #include <particle_simulator.hpp> // Include the standard C++ headers #include <cmath> #include <cstdio> #include <iostream> #include <vector> #include <sys/stat.h> /* Parameters */ const short int Dim = 3; const PS::F64 SMTH = 1.2; const PS::U32 OUTPUT_INTERVAL = 10; const PS::F64 C_CFL = 0.3; ...
ALGO
0.998147
5.135311
e60dcf7b-dab0-4ff3-8292-e634f0435d79
shobhit-glitch/Neet433fromleetcode
485-max-consecutive-ones/max-consecutive-ones.cpp
class Solution { public: int findMaxConsecutiveOnes(vector<int>& nums) { int maxl=0; int len=0; for(int i=0;i<nums.size();i++){ if(nums[i]==1){ len++; if(len>maxl){ maxl=len; } ...
ALGO
0.999976
6.082662
44e8fdc2-9a6a-45a0-9d94-898034f3f478
RAGHUNANDANSHARMA01/c-Plus-plus-programming7
recursion.cpp
#include<iostream> using namespace std; int f(int n) { if(n==1) return 1; return n*f(n-1); } int main() { int result =f(5); cout<<result; return 0; }
ALGO
0.999937
4.362293
1c8a60a3-6a88-4d5d-a019-76c2d8d15f61
Prashil1630/DSA-and-DEV-Prep
AlgoZenith/DSA/ALL/All Codes/Mathematical_Expression.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; char op,eq; cin>>a>>op>>b>>eq>>c; if (eq=='='){ if (op=='+'){ if(c == a+b)cout<<"Yes\n"; else cout<<a+b<<"\n"; } else if (op=='-'){ if(c == a-b)cout<<"Yes\n"; else cout<<...
ALGO
0.999862
3.749295
f9989601-f44b-4144-b287-8c4ba610c7b1
nieznanysprawiciel/POBRImageRecognition
ImageRecognition/Segmentation/SegmantationLogic.cpp
#include "SegmantationLogic.h" #define NUM_PREDEFINED_COLORS 30 cv::Vec3b predefinedColors[ NUM_PREDEFINED_COLORS ]; SegmentationLogic::SegmentationLogic() { m_samplesDensity = 15; m_samplesDensityText = 1; int R = 0; int G = 100; int B = 200; for( auto& color : predefinedColors ) { color = cv::Vec3b( B, G,...
ALGO
0.864617
5.02218
f7cdc3fb-3756-4b4b-97f9-65354b547928
svaze30/CompetitiveProgramming
1919/tempCodeRunnerFile.cpp
#include <bits/stdc++.h> typedef long long ll; using namespace std; void solve(); int main() { int t = 1; cin >> t; while (t--) solve(); return 0; } void solve() { ll n, k; cin >> n >> k; priority_queue<ll> pq; for (ll i = 0; i < n; i++) { ll b; cin >> b; pq.push(b); } ll ans ...
ALGO
0.999928
4.074498
fba4e8d4-6383-4cd5-9113-e68b0a537255
frabbi1/Codes-1st-year
c++/csezeroone.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define pf printf #define sf scanf int main(){ int n, one=0, zro=0; string s; cin >> n >> s; for(int i=0; i<n; i++){ if(s[i]=='1') one++; else zro++; } if(one==zro) cout << "0"; else if(one>zro) cout << one-...
ALGO
0.99998
3.657122
4200d749-c859-4a85-bce9-901492b02d8a
PraJwaL-SDE/Eto-app
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
591e3f27-a701-4e70-8272-6600658e1805
cod3holic/PS
Baekjoon/나무_자르기.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; vector<ll> arr; ll n, m; ll sum_slice(ll k) { ll ret = 0; for (int i = 0; i < n; i++) { ret += (arr[i]-k > 0 ? arr[i]-k : 0); } return ret; } ll binary(ll a, ll b) { ll mid; while (a < b) { mid = (a+...
ALGO
0.999982
5.039167
cf523ec7-37ac-4d50-abd2-3b6a53c79627
MattJohn21/All-Projects
Lab 5B.cpp
/* Class:CSE 1321L Section:WE1 Term:2 Instructor:Nick Murphy Name:Matthew Johnson Lab#:5B */ #include <iostream> using namespace std; int main() { int num; cout << "Enter an integer: "; cin >> num; switch (num % 2) { case 0:cout << "This number is divisible by 2" << endl; break; ...
ALGO
0.990959
3.300519
19666a30-f07e-408a-afc0-2bd808aae7ba
carlospasqualidev/cpp-practice
10-calculationOfElasticPotentialEnergyOfSpring.cpp
#include <iostream> int main() { float k, x; std::cout << "Spring's elastic constant (k) in N/m: "; std::cin >> k; std::cout << "Spring's deformation (x) in meters: "; std::cin >> x; if (k < 0 || x < 0 || std::cin.fail()) { std::cout << "The values of k and x must be numbers and gr...
ALGO
0.917215
4.32659
1799f9e9-d03c-452a-9b03-361a4d5cd391
TAMS-Group/bio_ik
src/ik_test.cpp
#include "ik_base.h" namespace bio_ik { struct IKTest : IKBase { RobotFK_MoveIt fkref; std::vector<double> temp; double d_rot_sum, d_pos_sum, d_div; IKTest(const IKParams& params) : IKBase(params) , fkref(params.robot_model) { d_rot_sum = d_pos_sum = d_div = 0; } ...
TEST
0.884757
5.003618
4066d804-5257-4e28-99db-1b3eeeb71734
MOHIT-IITP/Leetcode
2501.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: int longestSquareStreak(vector<int>& nums) { map<int, int>mp; sort(nums.begin(), nums.end()); int res = -1; for(int num: nums) { int _sqrt = sqrt(num); if(_sqrt*_sqrt == num && mp.find(_sqrt...
ALGO
0.999966
4.715233
633e0ff3-e647-4a73-8a3a-57c42e8f70c3
ParticulateFlow/LIGGGHTS-PFM
src/fix_cfd_coupling_force.cpp
#include <string.h> #include <stdlib.h> #include "atom.h" #include "update.h" #include "respa.h" #include "error.h" #include "memory.h" #include "modify.h" #include "comm.h" #include <math.h> #include "vector_liggghts.h" #include "mpi_liggghts.h" #include "fix_cfd_coupling_force.h" #include "fix_property_atom.h" using...
TOOL
0.905345
5.927813
c88163c4-6dc0-4e92-909c-41f141c865b0
tfalsone/810C
Session02/homework_review.cpp
#include<cmath> using namespace std; int main(){ double x = 0; double y = sin(x); //radians double y2 = cos(x); double y3 = tan(x); double y4 = pow(2.0, 0.16); // power double y5 = x*x; // pow(x, 2) }
ALGO
0.955439
3.281575
6cbe2866-f2b4-42d2-8461-eeb90b6385de
mnem/box2d_ane
extension/native/box2d/Box2D/Box2D/Collision/Shapes/b2EdgeShape.cpp
#include <Box2D/Collision/Shapes/b2EdgeShape.h> #include <new> using namespace std; void b2EdgeShape::Set(const b2Vec2& v1, const b2Vec2& v2) { m_vertex1 = v1; m_vertex2 = v2; m_hasVertex0 = false; m_hasVertex3 = false; } b2Shape* b2EdgeShape::Clone(b2BlockAllocator* allocator) const { void* mem = allocator->All...
ALGO
0.967229
7.599598
7f40799a-81f9-4953-81ff-f7711af23e27
coolyuyuyu/leetcode
algorithm_0000-0999/683-K Empty Slots/main.cpp
class Solution { public: // Time: O(NlogN) int f1(vector<int>& bulbs, int k) { set<int> lights; for (int i = 0; i < bulbs.size(); ++i) { auto [itr, _] = lights.insert(bulbs[i]); auto preItr = std::prev(itr); if (itr != lights.begin() && bulbs[i] - *preItr ==...
ALGO
0.999922
5.76928
13518750-3279-4ea5-9a99-23ae04e9a523
joao-xl8/TavernLight
cryptopp-CRYPTOPP_8_5_0/safer.cpp
// safer.cpp - modified by by Wei Dai from Richard De Moliner's safer.c #include "pch.h" #include "safer.h" #include "misc.h" #include "argnames.h" #if CRYPTOPP_MSC_VERSION # pragma warning(disable: 4244) #endif NAMESPACE_BEGIN(CryptoPP) const byte SAFER::Base::exp_tab[256] = {1, 45, 226, 147, 190, 69, 21, 174, 12...
ALGO
0.997278
7.195204
aba6bc49-fcf3-4b6e-985a-06c474c1f9e2
sarvex/leetcode-io
solution/0700-0799/0720.Longest Word in Dictionary/Solution.cpp
class Solution { public: string longestWord(vector<string>& words) { unordered_set<string> s(words.begin(), words.end()); int cnt = 0; string ans = ""; for (auto w : s) { int n = w.size(); if (check(w, s)) { if (cnt < n) { c...
ALGO
0.999968
5.791317
4348ed0f-3ae0-4d92-8225-ac828bfd96a7
yongwhan/jungol
539.cpp
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; typedef long long ll; typedef pair<int,int> ii; typedef tree<ii,null_type,less<ii>,rb_tree_tag,tree_order_statistics_node_update> indexed_set; int main() { cin.tie(0); cout.tie(0); ios_base::sync_with_st...
ALGO
0.999274
3.157754
ac9ac65b-082c-4d2c-873b-086b97802cec
solareenlo/atcoder
05_AtCoder-Beginner-Contest/abc018/A/main.cpp
#include <iostream> #include <algorithm> #include <vector> #define REP(i, n) for (int i = 0; i < (n); i++) using namespace std; // 出力 void print() { std::cout << '\n'; } template <class T>void print(const T &x) {std::cout << x <<'\n';} template <class T, class... Args>void print(const T &x, const Args &... args) {std:...
ALGO
0.999926
4.261646
ffb61486-5782-4b5f-be86-6e1ab687cb4e
Shahriar127/Algorithm-Design-and-Analysis
JobSequencingWithDeadline.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct Job { int id, deadline, profit; }; bool compare(Job a, Job b) { return a.profit > b.profit; } void jobSequencing(Job jobs[], int n) { sort(jobs, jobs + n, compare); int maxDeadline = 0; for (int i = 0; i < n; ...
ALGO
0.999958
5.320847
9203f983-5da5-468e-8359-e1748efd5da3
nxplatform/nx-mobile
thirdparty-cpp/boost_1_62_0/libs/type_traits/examples/copy_example.cpp
#include <iostream> #include <typeinfo> #include <algorithm> #include <iterator> #include <memory> #include <boost/test/included/prg_exec_monitor.hpp> #include <boost/timer.hpp> #include <boost/type_traits.hpp> using std::cout; using std::endl; using std::cin; namespace opt{ // // opt::copy // same semantics as std...
ALGO
0.943905
5.917429
1310c085-8ad0-4208-bf30-7cbb284a7737
Ryb7532/AtCoder
submissions/abc292/a.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define rep(i,n) for (int i=0; i<(n); i++) #define rrep(i,n) for (int i=n-1; i>=0; i--) #define print(a) cout << a << endl #define fix(n) fixed << setprecision(n) #define fill_c(c, n) setfill(c) << setw(n) #define all(v) v.begin...
ALGO
0.997401
3.922567
0a82fb4b-1d1b-4279-b2de-ec79e6da82b4
sztwang/TX2_libstagefright
codecs/amrnb/dec/src/d8_31pf.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/d8_31pf.c Functions: Date: 01/28/2002 ------------------------------------------------------------------------------ REVISION HISTORY Description: Modified to pass overflow flag through to basi...
ALGO
0.999303
5.109934
8d2ea665-7bc3-418a-bb73-0b373637be3a
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_3908_6.cpp
#include <bits/stdc++.h> template <class _Type> void logArray(_Type a[], int n) {} template <class T> inline bool checkMin(T& a, T b) { return (a > b ? a = b, 1 : 0); } template <class T> inline bool checkMax(T& a, T b) { return (a < b ? a = b, 1 : 0); } void preInit(); void init(); void solve(); int32_t main() { ...
ALGO
0.99991
3.935151
e7ff682c-9b65-4ce4-8264-506adbbd3612
gafeol/competitive-programming
Contests/SWERC16/F.cpp
#include "bits/stdc++.h" using namespace std; #define fst first #define snd second typedef unsigned long long ull; typedef long long ll; typedef pair<int, int> pii; #define pb push_back #define for_tests(t, tt) int t; scanf("%d", &t); for(int tt = 1; tt <= t; tt++) #ifndef ONLINE_JUDGE #define debug(args...) // fprintf...
ALGO
0.999903
3.434208
4745579a-ae05-483e-a71c-ac87e1c00fa7
sakurarain1213/daily-c-
129.cpp
//单链表官方实现 #include <iostream> using namespace std; enum Error_code { underflow, overflow, range_Error, success }; const int max_list = 100; typedef int List_entry; typedef int Node_entry; struct Node { Node_entry entry; Node* next; Node(); Node(Node_entry item, Node* add_on = NULL); }; Node::Node() { ...
ALGO
0.999959
3.522796
c0960a29-375d-418b-969a-2c3f3d321851
pratishkatiyar/CP_questions
Codechef/Long Challenge/JULY20B/ADAKING.cpp
#pragma GCC optimize ("-O3") #include <bits/stdc++.h> using ll = long long int; using namespace std; #define vfast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); #define f(i,x) for(ll i=x;i>=0;i--) #define pb push_back #define mp make_pair #define debug(x) cout<<x; #define lb lower_bound #define ub upper_boun...
ALGO
0.999782
3.881271
677f64b0-2037-4a93-8cc4-867fcce1e2b3
xixi-shredp/xixi-gem5
src/systemc/tests/systemc/misc/synth/combo/share/share.cpp
/***************************************************************************** share.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /***************************************************************************** ...
TOOL
0.876489
5.808437
87c6d48e-78b2-40a3-954c-a785bc403caf
mdunggggg/SPOJ-PTIT
P196PROJ.cpp
#include<bits/stdc++.h> //#define MAX 10000000 #define faster() ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL); using namespace std; typedef long long ll; void solve(){ int n ; cin >> n ; int a[n] ; ll ans = 0; int dem = 0 , check = 1; for ( int i = 0 ; i < n ; i++) cin >> a[i]; for ( int i = 0 ...
ALGO
0.999973
3.820105
3a09bacc-7552-4cbf-84aa-1bca205e13e9
zalkary4/-31github
day_4/dice_app/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.998838
6.76073
078d1398-5d69-45f6-95e6-d9916482c7e7
hieupham1103/TINHOC
ONLINE OJ/VNOJ/Contest/VNOI CUP 2023 - round 3/A.cpp
#include<bits/stdc++.h> #define ii pair <int,int> #define fi first #define se second #define int long long #define double long double #define endl '\n' #define all(x) x.begin(), x.end() using namespace std; bool cal(vector <int> ls, int a, int b){ int l = ls.back(); while(ls.size() and ls.back() + a >= l){ ...
ALGO
0.999261
3.989264
8ed5d4e3-a41c-48f0-9ef8-23f7d124e441
harshuttamchandani/Leetcode
1689-partitioning-into-minimum-number-of-deci-binary-numbers/1689-partitioning-into-minimum-number-of-deci-binary-numbers.cpp
class Solution { public: int minPartitions(string n) { sort(n.begin(),n.end()); int l= n.length(); int ascii=n[l-1]; return ascii-48; //convert to integer than rem with 11 10 1 0 if 2 digit } };
ALGO
0.999908
5.802729
7955a7a8-cc6f-4083-a914-d5960f09cb76
heewonham/Algorithm_bj_DFS-BFS
BJ_1987_알파벳.cpp
#include <iostream> using namespace std; bool alpha[26]; char matrix[20][20]; bool visited[20][20]; int max = 0; void DFS(int x, int y, int nn, int R, int C); int main() { int R, C; int i, j; string s; // 1. Է cin >> R >> C; for (i = 0; i < R; i++) { cin >> s; for (j = 0; j < C; j++) { matrix[i][j] = s...
ALGO
0.999576
4.231925
d486b772-107c-4c49-b745-5e263f5adc39
FabioMaione/Domjudge_Cpp
N17.cpp
#include <iostream> using namespace std; bool pari(int x) { if(x!=0) { if(x%2==0) return true; return false; } else return false; } bool multi(int x, int y) { if(y!=0) { int sum=x+y; int c=(sum%x); int v=(sum%y); if(c==0 || v==0) return true; return false; } else return false; } int m...
ALGO
0.99985
3.993153
12b34354-9931-4976-a2ea-d7b763f1bd4e
Seeseejava/Flame
Engine/Source/ThirdParty/glm/test/core/core_func_integer_find_lsb.cpp
#include <glm/glm.hpp> #include <cstdio> #include <cstdlib> //To define "exit", req'd by XLC. #include <ctime> int nlz(unsigned x) { int pop(unsigned x); x = x | (x >> 1); x = x | (x >> 2); x = x | (x >> 4); x = x | (x >> 8); x = x | (x >>16); return pop(~x); } int pop(unsigned x) { x = x - ((x >> 1) & 0...
ALGO
0.998121
4.794778
544e947d-431b-4254-971b-aa8b9c1a2e5e
to-amit/Leetcode
653-two-sum-iv-input-is-a-bst/653-two-sum-iv-input-is-a-bst.cpp
/** * 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) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999987
5.855719
21304096-8d8c-475a-8228-f9c950c21a40
ImtiazAhmedAkash/Problem-Solving
lightoj/1255.cpp
/* In the Name of ALLAH, the most gracious, the most merciful */ // 1255 - Substring Frequency #include <bits/stdc++.h> using namespace std; #define ll long long #define nl '\n' #define deb(x) cerr << #x << " = " << x << nl const int inf = 1e9; const ll INF = 1e18; const int mod = 998244353; const int N = 2e5 + 5...
ALGO
0.999975
5.624379
7553c3d8-b839-4249-b3a8-310829688453
CVRL/RaspberryPiOpenSourceIris
OSIRIS_SEGM/src/OsiCircle.cpp
#include <stdexcept> #include "OsiCircle.h" using namespace std ; namespace osiris { // CONSTRUCTORS & DESTRUCTORS ///////////////////////////// OsiCircle::OsiCircle() { // Do nothing } OsiCircle::~OsiCircle() { // Do nothing } OsiCircle::OsiCircle ( const CvPoi...
TOOL
0.975534
7.164203
6e151c49-6596-4c4e-9478-8aff35b8b888
youngle37/ACM
LeetCode/206_Reverse_Linked_List.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* reverseList(ListNode* head) { ListNode* pre = NULL; ListNode* next = NULL; while(head != NULL){ ...
ALGO
0.99979
5.55811