uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
5cde9aa0-6ade-475c-ae28-d3d72005e75f
etola/libdaisy
src/daisy.cpp
#include <iostream> #include "daisy/daisy.h" using namespace std; using namespace kutility; int g_cube_number = 3; int g_selected_cubes[MAX_CUBE_NO]; daisy::daisy() { m_verbosity = 2; m_image = 0; m_w = 0; m_h = 0; m_rad = 0; m_rad_q_no = 0; m_th_q_no = 0; m_hist_th_q_no = 0; m_grid_poin...
ALGO
0.994777
4.872226
950fd5f3-c768-4256-a7ed-d5d29adea5cb
mpcsdspa/umd
c++/CODE/Chapter9/chapter9c0P.cpp
/* PART 1*/ #include <iostream.h> #include <iomanip.h> #include "SCmathlib.h" #include "SCchapter3.h" #include<mpi.h> void ChebyVandermonde(int npts, double *A, int row); // Global variable to set size of the system const int size = 10; int main(int argc, char *argv[]){ int i,j,k,index; int mynode, totalnodes; ...
ALGO
0.999989
3.699659
6eefe184-8589-42cf-b3d0-327317e70d71
microft11/BJTUsbschool
数据结构/第七次基础作业/7-22.cpp
#include <stdio.h> #include <stdlib.h> #define MAX 100 typedef struct EdgeNode { int adj; struct EdgeNode* next; }EdgeNode; typedef struct Node { int data; EdgeNode* first; }Node, List[MAX]; typedef struct { List list; int nodenum, edgenum; }Graph; //ڽӱ洢ṹ void CreateGraph(Graph &G) { pri...
ALGO
0.99987
3.603575
6cfc1024-f385-4e30-902b-4920d0c81c5b
puffyyy/coding
C++ code/course code/algorithm/class_2/b.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <set> using namespace std; typedef long long int ll; const int MS = 1e5 + 5; int a; int main() { int n, k; ios::sync_with_stdio(false); ...
ALGO
0.999914
3.490387
653eef75-c5e4-4d99-804f-ee784adacb68
om2357/oomProgram
CodingNinjaDSA/FindingLengthOfString.cpp
#include <iostream> using namespace std; int length(char str[]) { if (str[0] == '\0') { return 0; } int SmallStringLength = length(str + 1); return 1 + SmallStringLength; } int main() { char str[20]; cout << "enter your string : "; cin >> str; int l = length(str); cout <...
ALGO
0.997625
3.086903
c33d088f-d60e-4777-80cf-269b78fd862d
MostlyFor/Algorithm_topic
leetcode/0121-best-time-to-buy-and-sell-stock/0121-best-time-to-buy-and-sell-stock.cpp
class Solution { public: int maxProfit(vector<int>& prices) { // for 2번 완전탐색 -> 10^5 -> O int profit = 0; int low = prices[0]; int high = prices[0]; for(int i=0; i<prices.size(); i++){ // 만약 고점이 갱신되는 경우 if(high < prices[i]) high = prices[i]; ...
ALGO
0.999609
5.959696
393d8445-c914-4ef2-a20a-009418b4d962
Carnival02/LEETCODE
Shortest Subarray to be Removed to Make Array Sorted.cpp
class Solution { public: int findLengthOfShortestSubarray(vector<int>& arr) { int n=arr.size(); int left=0; while(left+1<n && arr[left] <= arr[left+1]){ left++; } if(left == n-1) return 0; int right =n-1; while(right>0 && arr[right -1] <= arr[rig...
ALGO
0.99998
5.699376
55946171-5ea9-4e33-a986-17fc51402a8b
franciscoSavala/cpCodeforces
1473A Replacing Elements.cpp
#include <iostream> #include <vector> #include <map> #include <math.h> #include <algorithm> #define ll unsigned long long using namespace std; void solve(){ int n, d; cin >> n >> d; vector<short> a(n); for(int i=0; i<n; i++) cin >> a[i]; sort(a.begin(), a.end()); if(a[0] + a[1] <= d){ for(int i = 2; i<n; i++)...
ALGO
0.999833
4.681797
d8e819ed-4930-414b-b2de-cc069abdb6f2
doofuong/Data-Structures-Algorithm
Stack_bt3.cpp
#include<iostream> using namespace std; #define Max 100 // So phan tu toi da cua Stack struct Stack { int Top; // phan tu xac dinh dinh ngan xep int Data[Max]; }; // Khoi tao ngan xep void Init(Stack* S) { S->Top = -1; // Dinh ngan xep ban dau la -1, chua co phan tu nao } // Kiem tra ngan xep rong in...
ALGO
0.999912
4.008381
3732cbc5-2612-474f-b115-375aa982b26b
Mushfiq1060/Lightoj
1141 - Number Transformation.cpp
#include<bits/stdc++.h> using namespace std; vector<set<int> >arr(1010); set<int>::iterator it; bool isPrime(int n) { int s=sqrt(n); for(int i=2;i<=s;i++) if(n%i==0) return false; return true; } void prime_factor(int n) { if(isPrime(n)) return; int num=n; while (n%2==...
ALGO
0.999934
4.067422
96184c81-1c76-4a13-8c65-ad90863067ae
bharathulaprasad/Leetcode-Solutions
200. Number of Islands.cpp
class Solution { bool withinBounds(vector<vector<char>>& grid, int i, int j) { return i >= 0 && i < grid.size() && j >= 0 && j < grid[0].size(); } bool flood(vector<vector<char>>& grid, int i, int j) { if (!withinBounds(grid, i, j)) return false; ...
ALGO
0.999937
6.715768
1d913a6b-cb2b-4308-8ba4-befede332952
zeroornull/WangDao-DS
2/2.3/exercise/7-DeleteBetween/main.cpp
#include "function.h" void DeleteBetween(LinkList &L, int start, int anEnd); int main() { LinkList L; list_tail_insert(L); print_list(L); int start = 1, end = 3; DeleteBetween(L, start, end); print_list(L); return 0; } void DeleteBetween(LinkList &L, int start, int end) { LinkList q = L...
ALGO
0.999824
4.034681
3cf83f82-733e-4e96-9b04-4fc2e9c6b9b5
homer6/c_reading
boost-trunk/libs/geometry/doc/src/examples/algorithms/within.cpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // QuickBook Example //[within //` Shows how to detect if a point is inside a polygon, or not #include <iostream> #include <list> #include <boost/geometry.hpp> #include <boost/geometry/geometries/geometries.hpp> #include <boost/geometry/domains/gis/io/wkt/wkt.hp...
ALGO
0.998618
6.537134
b438c0f2-22a2-47e7-91c9-8d71a0fa2331
AkshaySingare/FullStackJava-2024
C/1-july/TemperaterApp.cpp
#include<stdio.h> int main(){ int cel,fah; printf("enter tempreture in celsius \t "); scanf("%d",&cel); fah = cel*9/5+32; printf("enter fahrenheit %d ",fah); }
TOOL
0.941419
3.001943
306cefbe-f842-453e-8681-1e4e4a9e3722
GuillerLT/programming-problems
solutions/codeforces/00825/a.cpp
/* Problemset 825 - Problem A * https://codeforces.com/problemset/problem/825/A */ #include <iostream> #include <iterator> using namespace std; int main() { int const n = *istream_iterator<int>(cin); string const s = *istream_iterator<string>(cin); int cnt = 0; for (char const c : s) { if (c == '0') { ...
ALGO
0.999848
4.830292
7b91baa2-1fe5-4576-bbb3-d3443e3e1237
mr-dominor/cpp-snippets
string/patternMatching/RabinKarp.cpp
#include<bits/stdc++.h> using namespace std; #define d 256 void rabinKarp(string text, string pattern, int q){ int m = pattern.size(); int n = text.size(); int patHash = 0; int textHash = 0; int h = 1; for(int i = 0 ; i<pattern.size()-1; i++){ h = (h*d)%q; } for(int i = 0 ;i<m; i...
ALGO
0.999944
5.156037
0ed92840-5c2a-4bec-929f-a53654e8f0dd
kkisic/Procon
CPP/AtCoder/arc/040/a.cpp
#include <cmath> #include <iostream> #include <vector> #include <queue> #include <algorithm> #include <utility> #include <iomanip> #define int long long int using namespace std; typedef pair<int, int> P; const int inf = 1e15; signed main(){ int n; cin >> n; int r = 0; int b = 0; for(int i = 0;...
ALGO
0.999891
4.712202
97394340-83fa-482c-9122-ed4490621256
vidhya2318/vidhya_leetcode
566-reshape-the-matrix/reshape-the-matrix.cpp
class Solution { public: vector<vector<int>> matrixReshape(vector<vector<int>>& mat, int r, int c) { int m = mat.size(); int n = mat[0].size(); if(m * n != c * r) return mat; vector<vector<int>>res(r,vector<int>(c)); for(int i = 0;i < m * n;i++){ res[i /...
ALGO
0.998829
6.045306
881167f2-15d7-44ea-8246-4a6cdc7a8d34
Shashank-Develops/LeetcodeQuestions
0661-image-smoother/0661-image-smoother.cpp
class Solution { public: vector<vector<int>> imageSmoother(vector<vector<int>>& M) { const int m = M.size(); const int n = M[0].size(); vector<vector<int>> ans(m, vector<int>(n)); for (int i = 0; i < m; ++i) for (int j = 0; j < n; ++j) { int ones = 0; int count = 0; for...
ALGO
0.999715
6.967723
4e959752-ad1e-415f-aa0e-67a387afdbe8
jungh150/PS
baekjoon/1475.cpp
#include <iostream> #include <vector> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); string s; cin >> s; vector<int> cnt(10, 0); for (int c: s) { if (c == '9') cnt[6]++; else cnt[c - '0']++; } int ans = 0; for (int i =...
ALGO
0.999641
4.568087
742aa85d-2f93-41d7-a218-6214ca84b2e3
BijoySing/Problem-Solving
practice/week/week-7/Day4/YetnotherrokenKeoard.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define yes cout << "YES\n" #define no cout << "NO\n" #define pp(x) cout << x << "\n" #define int long long int #define ck(x) cout << #x << " = " << x << "\n" #define endl "\n" #define pb(x) push_back(x) int32_t main() { ios::sync_with_stdio(...
ALGO
0.999905
5.015162
0ee000ed-da6e-49bc-9b9f-cf3545f7dac0
david-svitov/HAHA
3rd_party/diff_gaussian_rasterization-alphadep/third_party/glm/test/ext/ext_vector_common.cpp
#include <glm/ext/vector_common.hpp> #include <glm/ext/vector_bool1.hpp> #include <glm/ext/vector_bool1_precision.hpp> #include <glm/ext/vector_bool2.hpp> #include <glm/ext/vector_bool2_precision.hpp> #include <glm/ext/vector_bool3.hpp> #include <glm/ext/vector_bool3_precision.hpp> #include <glm/ext/vector_bool4.hpp> ...
TEST
0.883555
6.714684
858ebd97-54aa-4d3e-b00b-23893a1cce61
JyotinderSingh/DS-Lab-Sem-III
170911162/Misc/MultiCircularQueue.cpp
#include<iostream> #include<bits/stdc++.h> #define Max 100 using namespace std; class MultiCircularQueue { int q[Max], f[Max / 2], r[Max / 2], b[Max / 2]; int nqueues; public: void construct(int); void addq(); int delq(); void display(); }; void MultiCircularQueue::construct(int n) { int i; nqueues = n; for(i...
ALGO
0.995499
3.646495
da25db02-70b9-40f9-8f74-583aab69d5af
raincross7/code-similarity
codes/train_code/problem054/problem054_363.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; #define fast_io ios_base::sync_with_stdio(false) ; cin.tie(0); cout.tie(0); int main() { fast_io; int a,b; cin>>a>>b; double tax1,tax2; tax1=0.08; tax2=0.1; double ans; for(double i=1;i<=1250;i++) { double a1...
ALGO
0.99988
3.49626
dc5b735d-53ab-4e8f-a311-409478d73683
Shuvro-d/Codeforces
Young physicist.cpp
#include<stdio.h> int main() { int n; scanf("%d",&n); int a[n],b[n],c[n],i,p; for(i=0;i<n;i++){ scanf("%d %d %d",&a[i],&b[i],&c[i]); } int sum_1=0,sum_2=0,sum_3=0; for(i=0;i<n;i++){ sum_1=sum_1+a[i]; sum_2=sum_2+b[i]; sum_3=sum_3+c[i]; } if((sum_1==0...
ALGO
0.99983
3.48209
72e22c4e-2b01-488c-8a78-ac62f41cb4bd
webturing/NOIP2018FS
Contest1221/H.cpp
#include <bits/stdc++.h> using namespace std; int main() { vector<int> F(1, 1); for (int i = 2; i <= 9; i++) { F.push_back(F[F.size() - 1] * i); } int T; cin >> T; while (T--) { int n; cin >> n; for (int i = F.size() - 1; i >= 0; i--) { if (F[i] <= n...
ALGO
0.999926
4.586023
caca58fa-3689-4439-b4ab-ddaddebf9215
11kriti/LeetCode-Problems-
1239-maximum-length-of-a-concatenated-string-with-unique-characters/1239-maximum-length-of-a-concatenated-string-with-unique-characters.cpp
class Solution { public: int maxLength(vector<string>& arr) { int N = arr.size(); int ans = 0; vector<int> wrongMask; // Enumerate every mask for(int mask = 0; mask < (1 << N); mask++) { bool notPossible = false; // We will store wrong masks in...
ALGO
0.999856
5.580629
db6c985a-c3a7-44f7-8f54-1c0de7541bb5
Rayhan-Ahmed108/competetive-programming
divided.cpp
#include <iostream> #include<utility> #include <vector> using namespace std; // Function to find GCD of two numbers int gcd(int a, int b) { if (b == 0) return a; return gcd(b, a % b); } // Function to find a pair of elements that can divide all elements of the array pair<int, int> findDividingPair(con...
ALGO
0.999951
5.852804
a6767d67-ec1d-4694-aa1f-d8adfe0985ca
00Osama/text-markt
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.998756
6.772262
27365ec9-9971-4095-89ff-cc3141f512a1
Nahid-IIT/Dhaka-City-Collge
Algorithm Analysis and Design Lab/LAB/4.MERGE.CPP
#include<stdio.h> #include<iostream.h> #include<conio.h> void Merge(int a[],int low,int mid,int high) { int b[80]; int h=low; int i=low; int j=mid+1; int k; while((h<=mid)&&(j<=high)) { if ( a[h] <= a[j] ) b[i++]=a[h++]; else b[i++]=a[j++]; } if(h>mid) for(k=j;k<=high;k++) { ...
ALGO
0.999955
3.823594
11460a8d-8f44-4553-a5de-7ee2ed4ce51a
bovinae/leetcode
190.reverse-bits.cpp
/* * @lc app=leetcode id=190 lang=cpp * * [190] Reverse Bits */ #include "leetcode.h" // @lc code=start class Solution { public: uint32_t reverseBits(uint32_t n) { int i = 0, j = 31; while (i < j) { bool iSet = (n & (1 << i)) != 0; // true represent setted bool jSet = (...
ALGO
0.999966
6.206543
ea71739a-8050-4603-8624-f3c8cf0edbec
ivayloknchv/DSA_2024_2025
Week 01/rotateImage.cpp
class Solution { public: void rotate(vector<vector<int>>& matrix) { int n=matrix.size(); for(int i=0; i<n; i++) { for(int j=i; j<n; j++) { swap(matrix[i][j], matrix[j][i]); } } for(int i=0;i<n;i++) { ...
ALGO
0.999996
6.339533
ec3f5935-95ac-4029-ba75-d61b5f78db50
TajwarSaiyeed/problem-solving-codechef-leetcode-codechef
24-02-2025/A. Presents.cpp
/* Author: Tajwar Saiyeed Date: 2025-02-24 10:42:25 File: A. Presents.cpp */ #include <bits/stdc++.h> using namespace std; #define nl '\n' #define vi vector<int> void solve() { int n; cin >> n; vi a(n + 1); for (int i = 1; i <= n; i++) { int x; cin >> x; a[x] = i...
ALGO
0.999969
5.061413
75c50ef0-dd52-4e41-8da9-b202c4fbd185
jihanchoi/NBCAlg
프로그래머스/1/160586. 대충 만든 자판/대충 만든 자판.cpp
#include <string> #include <vector> #include <map> using namespace std; vector<int> solution(vector<string> keymap, vector<string> targets) { vector<int> answer; map<char, int> keyIndex; for(int i=0; i<keymap.size(); i++) { for(int j=0; j<keymap[i].size(); j++) { if(!k...
ALGO
0.999872
5.722273
ca67c08c-37f3-416a-a4b3-b3f5cab5bc85
nextpointer/dsa-journey
Graph/07_detect_cycle_dfs.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { private: bool dfs(int node,int parent,vector<int>adj[],int vis[]){ vis[node] = 1; for(auto it:adj[node]){ if(!vis[it]){ if(dfs(it,node,adj,vis)==true) return t...
ALGO
0.99996
6.267614
293027b7-5545-4fbd-be3d-758c5b26cce0
mertp/Data-Structures-Applicatons-with-Cpp
QueueLab/Queue_ArrayBased.cpp
#include <iostream> using namespace std; class EmptyQueueException: public exception { private: char *msj; public: EmptyQueueException(char *msj = (char*) "Empty queue!") { this->msj = msj; } const char* what() const throw () { return msj; } }; template <class Object> class Queue{ private: Object *items; i...
TOOL
0.867631
4.256322
86a6d3c2-543a-450d-bc0f-7f855e7e9b8d
cdabruno/panda
pandaPIengine(stack)/src/ProgressionNetwork.cpp
/* * ProgressionNetwork.cpp * * Created on: 25.09.2017 * Author: Daniel Höller */ #include <stdlib.h> #include <iomanip> #include <algorithm> #include "ProgressionNetwork.h" #include "Model.h" namespace progression { #ifdef TRACESOLUTION int currentSolutionStepInstanceNumber = 0; #endif #ifdef SAVESEARCH...
ALGO
0.999419
4.143161
b4e6bc53-2a5a-423b-bde2-bbb2a6e602a9
wnsdudSoftkim/Introduction_to_computer_lab
수강생/201502086유정호/lab4/[유정호-201502086]201502086YooJungHo_7_10-2.cpp
#include <stdio.h> #include <ctype.h> int main(void) { char input_char; int vowel_number = 0; printf("\nEnter a sentence: "); while ((input_char = getchar()) != '\n') { switch (toupper(input_char)) { case 'A': vowel_number++; break; case 'E'...
ALGO
0.996917
5.826548
af9f49bb-f4eb-41e3-ac99-aa544ab9f94c
yu3mars/proconVSCodeGcc
atcoder/abc/abc060/c.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using pii = pair<int, int>; #define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i) #define all(x) (x).begin(),(x).end() #define m0(x) memset(x,0,sizeof(x)) int dx4[4] = {1,0,-1,0}, dy4[4] = {0,1,0,-1}; int main() { i...
ALGO
0.99996
3.679533
07cceebd-1c70-46e9-9081-ff890fd5642f
browncoin-project/Browncoin
src/crypto/hmac_sha512.cpp
#include <crypto/hmac_sha512.h> #include <string.h> CHMAC_SHA512::CHMAC_SHA512(const unsigned char* key, size_t keylen) { unsigned char rkey[128]; if (keylen <= 128) { memcpy(rkey, key, keylen); memset(rkey + keylen, 0, 128 - keylen); } else { CSHA512().Write(key, keylen).Finalize(...
ALGO
0.931806
5.716307
27c221dd-e41a-470a-92d9-e36e3ca68603
LCAD-UFES/carmen_lcad
src/segmap/examples/gicp_examples/gicp_odometry_view_matching_result.cpp
#include <cstdio> #include <cstdlib> #include <carmen/segmap_dataset.h> #include <Eigen/Core> #include <pcl/visualization/pcl_visualizer.h> #include <opencv/cv.h> #include <opencv/highgui.h> #include <iostream> using namespace std; using namespace cv; using namespace pcl; using namespace Eigen; PointCloud<PointXYZRG...
DATA
0.903407
4.192118
6f63d028-8e99-49ac-b08b-721ea5abfadb
sreepadh-sandilya/dsa_problems
leetcode/greedy/948. Bag of Tokens.cpp
class Solution { public: int bagOfTokensScore(vector<int>& tokens, int power) { sort(tokens.begin(),tokens.end()); int i=0,j=tokens.size()-1,n=tokens.size(); int sum=0,maxi=0; while(i<=j) { while(i<n && power>=tokens[i]) { power-=token...
ALGO
0.999911
6.231134
5beb9b19-81e7-451a-8efe-d3b7bc53421e
PravarAnu/DSA
06. Stack/ImplementThruSTL.cpp
#include<iostream> #include<stack> using namespace std; int main(){ stack<int> s; // push function for pushing element inside stack s.push(10); s.push(20); s.push(30); s.push(40); /* | | ------ | 40 | <---- TOP ------ | 30 |...
TOOL
0.897335
3.732419
d0c852d4-badd-41e4-8a01-1526b4c9c14b
lvj5077/ML_Project
utils/Training.cpp
#include <iostream> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <dirent.h> #include <vector> using namespace std; vector<string> getFiles(string cate_dir); int main(){ string dir; // dir=getstring(); cout<<"The dir is:"<< endl; cin>>dir; cout << dir <<endl; vect...
TOOL
0.909843
3.177107
05b444b3-4253-4661-a0a3-f96275fd8fea
ner0-m/elsa
elsa/projectors_cuda/VoxelProjectorCUDA.cpp
#include "LogGuard.h" #include "Timer.h" #include "TypeCasts.hpp" #include "Logger.h" #include "VoxelProjectorCUDA.h" #include <thrust/copy.h> #include <thrust/host_vector.h> #include <thrust/device_vector.h> namespace elsa { template <typename data_t> BlobVoxelProjectorCUDA<data_t>::BlobVoxelProjectorCUDA(...
ALGO
0.884012
7.368248
86d1a9de-26c5-463b-aeb7-4bc8cd4db7b7
JayThakkar17/DataStructuresAndAlgorithms
Recursion/Quiz5.cpp
#include<iostream> using namespace std; void count(int n) { static int d{ 1 }; cout << n; cout << d; d++; if (n > 1) count(n - 1); cout << d; } int main() { int n{ 3 }; count(n); return 0; }
ALGO
0.999903
4.4038
09c5bc6c-658e-4ed1-b315-3f5a5023635b
abhishek-codeit/CrackYourPlacement
213-house-robber-ii/house-robber-ii.cpp
class Solution { public: int fi(vector<int>& nums){ int prev1 = 0; int prev2 = nums[0]; // prev2 = just behind // prev1 = is behind prev2 int n = nums.size(); int res = 0; for(int i = 1;i<n;i++){ int pick = nums[i]; int np = prev2; ...
ALGO
0.99994
5.464212
7d6b951b-a4a1-4089-a30e-4c6e028bdccc
newgame3000/Numerical-methods
lab3_5/main.cpp
#include <iostream> #include <vector> #include <unistd.h> #include <math.h> #include <functional> #include "polynomial.hpp" using namespace std; function<double(double)> f{ [](double x) { return 1 /((2 * x + 7) * (3 * x + 4)); }, }; double SimpsonMethod(double a, double b, double h) { double res = 0; in...
ALGO
0.99982
4.252779
2061aba8-1a26-45fc-aa2e-89e90ba33e09
manikanta2901/ubuntu
.history/practice/cpp/Leetcode/Cpp/AddTwoNumbers_20210308222236.cpp
#include<bits/stdc++.h> using namespace std; struct ListNode{ int val; ListNode *next; }; void printList(struct ListNode *a){ cout << "List : "; while(a != NULL){ cout << a->val << " "; a = a->next; } cout << endl; } class Solution { public: ListNode* addTwoNumbers(ListNod...
ALGO
0.999907
5.087453
09e84cbd-0179-4f23-8fae-673a77ad832d
isaaclo97/programacion-competitiva
Problemas/Acepta el Reto/136.cpp
#include <bits/stdc++.h> #define INF 0x3F3F3F3F using namespace std; int n,m; int solve(int c) { //1 me llevo, c/3 y lo que resta c-c/3 if (c > n) return 1 + solve(c/3) + solve(c-c/3); else return 0; } int main() { while(scanf("%d%d",&n,&m)==2 && n!=0) { n*=2; //fuerza enano printf...
ALGO
0.999938
3.518936
601518c7-93f1-4978-a655-e0508fbd6f72
MisakiFx/C
C-twice/4月9日/求1-n自然数的和.cpp
#include <stdio.h> int fun(int n) { int sum = (1 + n) * n / 2; return sum; } int main() { int m; printf("Enter m: "); scanf("%d", &m); printf("\nThe result is %d\n", fun(m)); }
ALGO
0.999807
5.128146
25a90ef5-8dfb-4853-9756-ae829c5129cb
youssefelmougy/jaccard-selector
Selector/hclib/test/performance-regression/full-apps/qmcpack/src/Numerics/CubicSplineFunctions.cpp
// -*- C++ -*- template<class T> T CubicSpline<T>::operator()(T r) { const T onesixth = 0.16666666666666666667e0; int klo,khi,k; T h,b,a; if(r>X[1] && r < X[Npt]) //NR part { klo=1; khi=Npt; while (khi-klo > 1) { k=(khi+klo) >> 1; if (X[k] > r) khi=k; else ...
ALGO
0.998035
6.005512
71725241-e255-4eab-b5a1-08374a754eff
1119-2916/competitive-programming
atcoder/arc/103/e.cpp
#include <bits/stdc++.h> using namespace std; #define INF 1001000100010001000 #define MOD 1000000007 #define EPS 1e-10 #define int long long #define rep(i, N) for (int i = 0; i < N; i++) #define Rep(i, N) for (int i = 1; i < N; i++) #define For(i, a, b) for (int i = (a); i < (b); i++) #define pb push_back #define eb ...
ALGO
0.99918
3.527689
bf69251f-1db7-4e28-bb97-c3fd952528fa
kmyobin/baekjoon
상어 초등학교 21608/상어 초등학교 21608/상어 초등학교 21608.cpp
#include <iostream> #include <vector> #include <algorithm> #include <memory.h> #include <cmath> using namespace std; int N; int A[21][21]; int students[401][5]; vector<vector<int>> v(401, vector<int>(4, 0)); bool safe(int r, int c) { return 1 <= r && r <= N && 1 <= c && c <= N; } bool cmp(int a, int b) { return a ...
ALGO
0.999759
3.723722
e11b6635-764e-45fc-aed6-f7660909925f
HHH120604/miniob_test
src/observer/sql/expr/expression_iterator.cpp
// // Created by Wangyunlai on 2024/05/30. // #include "sql/expr/expression_iterator.h" #include "sql/expr/expression.h" #include "common/log/log.h" using namespace std; RC ExpressionIterator::iterate_child_expr(Expression &expr, function<RC(unique_ptr<Expression> &)> callback) { RC rc = RC::SUCCESS; switch (ex...
ALGO
0.965537
6.428784
e3437ae8-a62e-4d5c-959b-2f3edbbcaedb
quentin452/CmakeExampleProject
!thirdParty/include/CatVector/bench/insertion.cpp
#include <cstdio> #include <cstdlib> #include <ctime> #include <vector> #include "../vector.hpp" #if defined(USE_LNI_VECTOR) template <typename T> using vec = lni::vector<T>; #else template <typename T> using vec = std::vector<T>; #endif const int N = 1e5; int main() { int i; time_t st; st = clock(); vec<...
ALGO
0.982592
3.652144
8b64bc30-28bb-4388-9331-38aed9907c8d
doubleotoo/edg4x-rose
projects/OpenMP_Checker/tests/omptest1.cpp
/* varibale tid and sum are shared, array variable a[], b[], c[] are shared, but both a and b are only read, c[] is written. A class member is aa, the operation in class definition mul() should have been omp critical to prevent race condition. */ #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <io...
ALGO
0.913531
4.35671
3e9812d5-f1b5-4f1f-adb4-3a775124dac4
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_4188_10.cpp
#include <bits/stdc++.h> using namespace std; using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ; long long int t; cin >> t; while (t--) { long long int n; cin >> n; long long int a[n]; vector<long long int> pos, neg; for (int i = 0; i < n; ++i) { c...
ALGO
0.999929
4.806595
571ef012-df85-4c61-a256-d76f137c8a94
ishandutta2007/codeforces
nikgaevoy/normal/1726/D.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; mt19937 mt(736); template<class ... Types> class dsu { vector<int> par, siz; tuple<Types ...> items; template<size_t ... t> void merge(int a, int b, std::index_sequence<t...>) { ((get<t>(items)(a, b)), ... );...
ALGO
0.999917
4.556845
524e4ce7-8799-4531-8dbb-2755b959b3af
2020147542/PS
20241215/main.cpp
/* 문제: 1547번 공 - 컵 3개가 일렬로 존재 (왼쪽부터 1, 2, 3번) - 1번 컵 아래에 공을 넣음 - 두 컵을 고른 후 위치 맞바꿈, 단 공의 위치는 그대로 있음 - 총 M번의 컵 위치를 변경한 후, 공이 들어있는 컵 번호는? 입력 : 컵의 위치를 바꾼 횟수 M(1 ~ 50), 그 다음 줄 부터는 서로 변경한 컵의 조합을 나타냄(X, Y) 출력 : 공이 들어있는 컵의 번호를 출력함. 공이 사라져서 컵 밑에 없는 경우에는 -1 출력 - 소요시간: 20분 - 의문점: "공이 사라져서 컵 밑에 없는 경우에는 -1을 출력한다."는 조건이 있는데, ...
ALGO
0.99999
4.444417
fdc4c7dc-b43a-467a-a461-f4d49ada1bc9
scipopt/papilo
src/papilo/presolvers/DominatedCols.cpp
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the program and library */ /* PaPILO --- Parallel Presolve for Integer and Linear Optimization */ ...
ALGO
0.956261
7.33819
e5b5f676-085f-4b32-9cc9-59b42d2042d2
diegoinacio/cpp-data-structures-and-algorithms
Basics/constants.cpp
#include <iostream> using namespace std; // Define constant by using #define #define A 85 // Edge a #define B 132 // Edge b #define C 720 // Edge c // Define constant by const keyword const int D = 157; // Diagonal d const int E = 725; // Diagonal e const int F = 732; // Diagonal f int main() { ...
ALGO
0.989481
3.345595
beae57fc-7bdc-4fa4-840f-230ab90bf161
stg0123/baekjoonlearn
divide&conquer/baekjoon2749.cpp
#include <iostream> #include <vector> using namespace std; typedef vector<vector<long long>> matrix; class fibo{ private: long long N; int mod; public: fibo(long long n):N(n){ mod=1000000; }; matrix ma_mul(const matrix& m1,const matrix& m2){ matrix sol(m1.size(),vector<long long...
ALGO
0.999991
4.341419
f04f33eb-f6ef-417b-a2f9-f0fff7dfdd41
mohitkadwe19/geeksforgeeks-solution
largest-subtree-sum-in-a-tree.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int data; Node *left, *right; Node(int x) { data = x; left = right = NULL; } }; class Solution { public: long int ans = INT_MIN; int get(Node *root) { if (root == NULL) return 0; long int left = get(root->left); lon...
ALGO
0.999979
5.858685
42596ca6-66da-47d2-8922-1d2c26e640d6
JoschuaL/anymdl
src/mdl/compiler/compiler_hlsl/compiler_hlsl_optimizer.cpp
#include "pch.h" #include "compiler_hlsl_compilation_unit.h" #include "compiler_hlsl_optimizer.h" namespace mi { namespace mdl { namespace hlsl { // Constructor. Optimizer::Optimizer( IAllocator *alloc, Compiler &compiler, Compilation_unit &unit, int opt_level) : m_alloc(al...
ALGO
0.930562
6.113122
8562566a-1dd3-494f-924a-89faa201131b
ysl2/kaoyan-data-structure
00-Keypoint_in_WangDao/Chapter_06-Graph/01-Graph_Examples/00-Judge_if_is_Way_from_i_to_j_in_Graph/01-DFS_Judge_Way/01-MatrixGraph_DFS_Judge_Way.cpp
// 2020-10-12 // 目标:通过一个一维顶点数组和一个二维边数组,产生一个邻接矩阵图 // 由于C语言在函数传递过程中仅传入数组的首地址,因此我在这里用了一维数组edge来模拟二维数组,而在邻接矩阵中使用实际的二维数组G->edge // 但是无论是否是真实的二维还是模拟的二维,遍历方式都是按照一维数组的方式来的,即首地址 + 偏移量 #include <string.h> #include <iostream> using namespace std; typedef int ElemType; typedef struct { int number; // 顶点的编号,这一项用户不能自己定义,是固定的从1...
ALGO
0.999782
4.940182
42db26ec-c932-4ab7-abc4-2c920d91e690
cthbst/Competitive-Programming
zerojudge/a147_2.cpp
#include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv[]) { int in1 ,in2 ; while (cin >>in1 >>in2 ){ if (in1==0 && in2==0) return EXIT_SUCCESS; cout <<(in1 %2==in2 %2?"Win":"Loss")<<endl ; } return EXIT_SUCCESS; }
ALGO
0.999895
3.058788
568f146c-66f8-42a2-938b-2cdc7b0b2905
askarakshabayev/PP12021Fall
week10/22.cpp
#include <iostream> #include <vector> using namespace std; bool f(string s1, string s2) { if (s1.length() < s2.length()) return true; if (s1.length() > s2.length()) return false; return (s1 < s2); } int main() { vector<string> a; int n; cin >> n; string s; for (int i =...
ALGO
0.999934
4.551038
1d2500f5-10a9-45c7-b501-b0d0b25985e7
VoHongKhanh/olp_acm_icpc
kattis/trivials/quadrant/quadrant.cpp
#include <iostream> using namespace std; /* Quadrant Selection A common problem in mathematics is to determine which quadrant a given point lies in. There are four quadrants, numbered from 1 to 4, as shown in the diagram below: For example, the point A, which is at coordinates (12,5) lies in quadrant 1 since both i...
ALGO
0.999998
4.942625
d5cd8cc5-37f1-4a1e-a4c0-bedc81a558cc
kazama679/ss3-C
bai5.cpp
#include <stdio.h> #include <string.h> int chuoiDoiXung(char text[], int start, int end) { if (start >= end) { return 1; } if (text[start] != text[end]) { return 0; } return chuoiDoiXung(text, start + 1, end - 1); } int main() { char text[1000]; printf("Nhap vao ch...
ALGO
0.999893
3.892562
191aba4b-380e-4854-aae6-7e726183f370
sarvex/leetcode-algol
solution/0400-0499/0401.Binary Watch/Solution.cpp
class Solution { public: vector<string> readBinaryWatch(int turnedOn) { vector<string> ans; for (int i = 0; i < 12; ++i) { for (int j = 0; j < 60; ++j) { if (__builtin_popcount(i) + __builtin_popcount(j) == turnedOn) { ans.push_back(to_string(i) + ":" ...
ALGO
0.998277
6.699302
f0ebe725-d8c6-42da-9c86-d64e0df837da
iMjayant17/PracticeLeet
137-single-number-ii/single-number-ii.cpp
class Solution { public: int singleNumber(vector<int>& A) { vector<long long> bit(32,0); int cnt = 0; for(auto n:A){ int i = 0; if(n<0) cnt++; while(n){ if(n&1) bit[i]++; n = n/2; i++; } } int ans = 0; // for(auto i:...
ALGO
0.999975
5.211435
6184c50d-b10e-435c-bb2a-05e25ef0d7f5
irff/cp-codes
Z-Training/jabuka.cpp
#include <vector> #include <cstdio> #include <algorithm> using namespace std; int a,b,g; vector<int> f; int main(){ scanf("%d%d", &a,&b); g=__gcd(a,b); for(int i=1; i*i<=g; i++){ if(g%i==0){ f.push_back(i); if(g/i != i) f.push_back(g/i); } } sort(f.begin(),f....
ALGO
0.999592
3.197903
868a218d-25b0-4fca-bd0f-f7fbbeafa8f2
nikitonium/nikito
src/protocol.cpp
#include <protocol.h> #include <util.h> #include <utilstrencodings.h> #ifndef WIN32 # include <arpa/inet.h> #endif static std::atomic<bool> g_initial_block_download_completed(false); namespace NetMsgType { const char *VERSION="version"; const char *VERACK="verack"; const char *ADDR="addr"; const char *INV="inv"; co...
WEB
0.87949
5.471697
8ecb0644-6e38-44c4-bc4f-76d37c1c591f
VA-24/Hackerrank-Solutions
STL/lower_bound.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; //before you attempt this lesson on your own, hackerrank provided a link to learn lower // bound, so be sure to check that out int main() { int m, n, o, p; vector<int> a; cin >> m; for ...
ALGO
0.999946
3.88981
c3ab3e7a-d0a5-4c24-ab69-ca5b531eea14
arka8464/Leetcode
2788-split-strings-by-separator/2788-split-strings-by-separator.cpp
class Solution { public: vector<string> splitWordsBySeparator(vector<string>& words, char separator) { vector<string> ans; for(auto it:words) { string s=it; istringstream ss(s); string token; while(getline(ss,token,separat...
ALGO
0.999666
5.612276
203f907b-a2ed-4e82-a654-1c8bdf712199
0A-liang/zi-liao-jie-go
20201223/7-1.cpp
#include <iostream> using namespace std; int N; int Gnode[10][2]; int Visited[100] = {}; int G[100][100]; void DFS(int i) { Visited[i] = 1; cout << i + 1 << " "; for (int j = 0; j <= N - 1; j++) { if (G[i][j] == 1) { if (Visited[j] != 1) DFS(j); } } } int main(int argc, char *argv[]) { int i, E; int...
ALGO
0.999983
3.876354
6f0575d8-16c2-4688-a644-4b7203b10451
NgTienHungg/PTIT-Source
SPOJ PTIT/STR01.cpp
// https://luyencode.net/problem/STR01 // STR01 - Chuyển chuỗi về viết thường #include <bits/stdc++.h> using namespace std; int main() { string s; getline(cin, s); for (int i = 0; i < s.length(); ++i) s[i] = tolower(s[i]); cout << s; return 0; }
ALGO
0.997121
5.285153
7f397270-4d4c-449a-a7c9-e9b7a559631d
MayankSaxena2214/LEETHUBV3
Difficulty: Easy/Total count/total-count.cpp
//{ Driver Code Starts // Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution { public: int totalCount(int k, vector<int>& arr) { // code here int ans=0; for(auto val:arr){ int freq=0; ...
ALGO
0.999546
5.512304
fa52bd7f-7709-4afd-a7d0-e6557ad39de3
SylvainBoutros/HackerRank
Week2/week2_counting_valleys.cpp
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); /* * Complete the 'countingValleys' function below. * * The function is expected to return an INTEGER. * The function accepts following parameters: * 1. INTEGER steps * 2. STRING path */ int countingVa...
ALGO
0.999991
5.740288
e0772935-4b57-48b6-940b-c3e19b746cfd
nmcglo/TSP-Ross
tsp_main.cpp
/* tsp_main.c 3-30-2017 Neil McGlohon */ //includes #include "tsp.hpp" #include "globals.hpp" double jitter = 0.0; double weight_multiplier = 0.0; tw_stime lookahead = 0; unsigned int nlp_per_pe = 0; unsigned int custom_LPs_per_pe = 0; int total_actors = 0; int total_cities = 0; int** weight_matrix; tw_lptype mode...
ALGO
0.999529
3.871078
0a427ff8-65cc-4234-9bba-5ba6c4236e3a
ziglang/zig-bootstrap
llvm/lib/Transforms/Utils/FixIrreducible.cpp
#include "llvm/Transforms/Utils/FixIrreducible.h" #include "llvm/Analysis/CycleAnalysis.h" #include "llvm/Analysis/DomTreeUpdater.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/InitializePasses.h" #include "llvm/Pass.h" #include "llvm/Transforms/Utils.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" #includ...
ALGO
0.99689
7.864157
2bb1ef06-43d4-4332-b3db-6c73b2342e9f
Tushar-coder14/DSA-Coding-Blocks
4. Character Arrays/Palindrome.cpp
#include <iostream> using namespace std; int length(char a[]){ int i = 0; //int count = 0; for(i=0 ; a[i] != '\0' ; i++){ //count++; } return i; } bool isPalindrome(char a[]){ int i=0; int len = length(a); int j = len-1; while(i<j){ if(a[i] != a[j]){ ret...
ALGO
0.999805
4.192513
99a8e97e-10c3-4561-861f-55b50314d67f
pm306/marason
code/AHC002/バックトラック+貪欲(没).cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int, int>; using pll = pair<long long, long long>; constexpr char ln = '\n'; constexpr int INF = 2e9+100; constexpr long long LLINF = 3e18; constexpr double EPS = 1e-9; #define all(v) v.begin(), v.end() #define rep(i, n) for(int i=0;i...
ALGO
0.999971
4.937611
61af05aa-e833-4758-90c9-10a2d3b83d63
Manav-Aggarwal/competitive-programming
CodeChef/Set Difference.cpp
/* Written By Manav Aggarwal */ #include <bits/stdc++.h> using namespace std; #define endl '\n' #define ll long long ll SummedPowersOf2[111111]; //Stores the number of powers of 2 added till i void initPowers() { SummedPowersOf2[0] = 0; SummedPowersOf2[1] = 1; ll mod = 1e9 + 7, i; for(i = 2; i < 111111; i++) { S...
ALGO
0.999989
4.930326
9c939bbe-9f60-4c49-bb84-57891dc5c455
dexterrxx31/DataStructuresAlgorithms
min_window_substring.cpp
#include <bits/stdc++.h> using namespace std; int main() { string s = "ADOBECODEBANC"; // input string ; string pattern = "BANC"; // pattern string unordered_map<char, int> mp; // map to store the frequency of each char in pattern string int i, j, count, min_length; // declaring variables i = ...
ALGO
0.999988
5.668601
3b63db19-9a7d-4d49-a7ba-5e52495fea24
dev-amit-kumar/DSA
leetcode/problems/find_first_and_last_position_of_element_in_sorted_array/solution.cpp
class Solution { public: vector<int> searchRange(vector<int>& nums, int target) { int start = 0; int end = nums.size() - 1; int mid; int lower_bound = -1; int upper_bound = -1; vector<int> result; while (start <= end) { mid = (start + end) ...
ALGO
0.999953
6.658066
1a1894b4-f8a8-48c9-a526-4d85868d5d4a
rishikesh7355/DSA_Practice_Codes
Sheet/String/countAndSayProblem.cpp
#include <bits/stdc++.h> using namespace std; string countAndSay(int n){ string ans="1"; for(int i=2;i<=n;i++){ string s=ans; string str=""; int cnt=1; int j; for(j=1;j<s.size();j++){ if(s[j]==s[j-1]){ cnt++; } else{ ...
ALGO
0.999995
5.6546
bfb2657a-5d39-4979-aec3-17c971de4343
giovannaleao10/C-_facul
C03EX04M.cpp
#include<iostream> #include<math.h> using namespace std; int main(void){ int a, b, c, r; cin >> a; cin >> b; cin >> c; r = pow(a,2) + pow(b,2) + pow(c,2); cout << r; return 0; }
ALGO
0.999222
3.545452
12b105fe-3d99-4eb5-8604-6ed036a09e56
brodante/LeetCode
206-reverse-linked-list/reverse-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: ListNode* reverseList...
ALGO
0.999739
5.499612
9f553614-ca0d-41d7-8b4b-66084b1e34be
erikhko/GerenciamentoDeEstado
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.998756
6.772262
46449994-03eb-415a-89d9-316a6fe9850e
Tekisasu-JohnK/Tekisasu-Graphics
src/ui/listbox.cpp
#ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ui/listbox.h" #include "base/fs.h" #include "ui/display.h" #include "ui/listitem.h" #include "ui/message.h" #include "ui/resize_event.h" #include "ui/separator.h" #include "ui/size_hint_event.h" #include "ui/system.h" #include "ui/theme.h" #include "ui/view.h"...
TOOL
0.943829
7.297822
f4336a39-7237-4797-bd59-6ce40bc5c729
EliseyDev/CPP-Primer-Plus-Exercises
stephen_prata/chapter_05/programming_exercises/hw1.cpp
#include <iostream> int main() { int firstNumber, secondNumber, result = 0; std::cout << "Enter two numbers to find sum of all numbers between them:" << std::endl << "Enter the first number: "; std::cin >> firstNumber; std::cout << "Enter the second number: "; std::cin >> secondNumb...
ALGO
0.995891
4.683115
c267ee8e-a924-4924-8f4b-979d79404fca
dlvguo/NoobOJCollection
OJS/FZUOJ/1000-1099/1081.cpp
#include <iostream> using namespace std; /* 思路:求出r1/2与r2、r1/2与r3、r2与r3的最大公约数 1.如果r1/2与r2的最大公约数不等于r2与r3的最大公约数 或者r1/2与r3的最大公约数不等于r2与r3的公约数,说明倒液体的过程中无法凑出需要的等分液体 2.根据规律可看出,如果公约数相等,那么r1/(r2与r3的最大公约数)-1就是倒液体的次数 */ //最大公约数 int gcd(int x, int y) { if (x % y == 0) return y; return gcd(y, x ...
ALGO
0.999953
3.993066
d68be950-89c2-498f-a14c-dc557229cde1
Harshsngh07/DataStructures_and_Algorithms
leetcode/Strings/implementStrStr.cpp
class Solution { public: int strStr(string haystack, string needle) { int m = haystack.length(); int n = needle.length(); if(needle.empty()) return 0; if(m<n) return -1; for(int i=0;i<=m-n;i++) { int j; for(j=0;j<...
ALGO
0.999967
5.744925
91699ce8-12f3-4420-9272-2c619a144f40
danielbbrito/Algoritmos
lista-7/1190-Direita/C++/1190.cpp
#include <bits/stdc++.h> using namespace std; int main() { // Declarar variáveis char o; float m[12][12], soma=0; cin >> o; // Popular matriz for (int i = 0; i < 12; i++) for (int j = 0; j < 12; j++) cin >> m[i][j]; // Iterar primeira metade da matriz for (int l ...
ALGO
0.999306
3.530877
f76b8238-c58c-4069-9ecd-f6a139012697
quan2003/Lab3_PTUDDNT-3-
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.998756
6.772262
ba6f8ea4-e5e2-4664-a034-58448a45d54f
APE-Project/APE_Server
deps/js/src/methodjit/FastArithmetic.cpp
#include "jsbool.h" #include "jslibmath.h" #include "jsnum.h" #include "methodjit/MethodJIT.h" #include "methodjit/Compiler.h" #include "methodjit/StubCalls.h" #include "methodjit/FrameState-inl.h" using namespace js; using namespace js::mjit; using namespace JSC; typedef JSC::MacroAssembler::FPRegisterID FPRegisterI...
TOOL
0.878474
7.664711
54eef426-919e-458b-b23d-04f81434df0a
AlieZ22/MyAlgorithm
7_BinaryTree/lc94.二叉树中序遍历.cpp
#include <iostream> #include <vector> #include <stack> #include "TreeNode.h" using namespace std; /* * @method: 二叉树中序遍历(左-中-右) */ class Solution94 { public: void traversal(TreeNode *curr, vector<int>& vec){ if(curr == nullptr) return ; traversal(curr->left, vec); vec.push_back(curr->val); ...
ALGO
0.999987
5.379827
dd59b9ee-1582-477c-be7f-d1e376dbd749
MSHP-Community/Decipherer
HammingPacket.cpp
#pragma once #include "HammingPacket.h" #include <iostream> #include <cstring> #include <string> #include <vector> HammingPacket::HammingPacket() // create object with value = 0 { this->finalCleanInt = 0; this->finalCleanString = "00000000000"; } HammingPacket::HammingPacket(const char* s) : HammingPacket() // cre...
ALGO
0.984
4.224411