uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
1e2943de-5017-4211-81ae-e5512dbc63ab
AriiBrahga/ALP
ALP - Lista 4(vulgo 5)/Lista4 - Ex14.cpp
#include <iostream> #include <math.h> #include <stdio.h> #include <string> using namespace std; int main () { float marco1, marco2, tempo = 0, esp = 0, vel; while (marco1 != marco2){ cout << "Digite o primeiro marco quilometrico: " << endl; cin >> marco1; cout << "Digite o segundo marco quilometrico:...
ALGO
0.985109
3.330907
1e50f89a-372b-44b4-9d36-15bf82bf8185
LEETESH42/Leetcode
0287-find-the-duplicate-number/0287-find-the-duplicate-number.cpp
class Solution { public: int findDuplicate(vector<int>& nums) { int slow=0,fast=0; do{ slow=nums[slow]; fast=nums[nums[fast]]; }while(slow!=fast); slow=0; while(slow!=fast){ slow=nums[slow]; fast=nums[fast]; } ...
ALGO
0.999985
6.10514
0e01a869-4d0b-4209-8861-920af431ad71
josenalde/algorithms-programming
prog-contest-problems/overflow.cpp
#include <iostream> using std::cin; using std::cout; int main() { int N, P, Q; char C; cin >> N >> P >> C >> Q; bool tN = 1<=N && N<=500000;//5e5 bool tP = 0<=P && P<=1000; bool tQ = 0<=Q && Q<=1000; if (tN and tP and tQ) { switch(C) { case '+': { if (P+Q<=N) cout << "OK"; else ...
ALGO
0.998894
3.751961
a0d12e20-4dc4-42e5-9634-0ac6244c1e41
boyslikeguy23/dsa_Cpp
bupbenga.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n, k, ref=0; cin>>n>>k; int a[n]; for(int &x:a) cin>>x; sort(a, a+n, greater<int>()); queue<int> Q; for(int x:a) { Q.push(x); if(Q.front()>=x+k) Q.pop(); else ref+=x; } cout<<Q.size()<<" "<<ref; }
ALGO
0.999952
3.715773
30cd0de7-447f-4dd8-a4e0-d44166542088
yitianhao/gpu_sched_new
gpu-sched-centralcontrol/minor/boost_1_61_0/libs/numeric/ublas/doc/samples/assignment_examples.cpp
#include <boost/numeric/ublas/assignment.hpp> #include <boost/numeric/ublas/vector.hpp> #include <boost/numeric/ublas/vector_proxy.hpp> #include <boost/numeric/ublas/matrix_proxy.hpp> #include <boost/numeric/ublas/vector_sparse.hpp> #include <boost/numeric/ublas/matrix_sparse.hpp> #include <boost/numeric/ublas/io.hpp> ...
TOOL
0.896997
3.670881
a4f9a6ab-afd6-4bc3-b6ee-d07ec76a76a2
Swam-bot/MCA-CODING
diiferece.cpp
#include<iostream> #include<math.h> using namespace std; int main() { int num,d; cout<<"ENTER NUMBER TO DIVIDE"; //Find difference of sum of divisibles upto n by k ans sum of non divisibles upto N by k cin>>num; cout<<"ENTER DIVISOR"; cin>>d; int rem; int sum=0; int sum1=0; int diff=0; int a[100]; int i=0;...
ALGO
0.99938
3.699739
7ae100a3-dfac-456c-93e0-71db9eea73bb
protik0939/codeforces_problemset
800 Ratings/A_Chores.cpp
/* ________________________________________________________________ ....... ....... ... .. .......... . . . . . .. ,*.////. . .... ..**** ,*,** //,,.*** *,,,,..,,.,* ,.......
ALGO
0.999441
3.399819
7dcdb6b0-2379-41ce-9e98-0bf6535e56a0
dragonwell-project/dragonwell21
src/hotspot/share/services/virtualMemoryTracker.cpp
#include "precompiled.hpp" #include "logging/log.hpp" #include "memory/metaspaceUtils.hpp" #include "memory/metaspaceStats.hpp" #include "runtime/os.hpp" #include "runtime/threadCritical.hpp" #include "services/memTracker.hpp" #include "services/threadStackTracker.hpp" #include "services/virtualMemoryTracker.hpp" #incl...
TOOL
0.933911
7.622455
3c00e0c8-2e84-4cf7-95f2-ce7a0c728efe
yogibala/leetcode
solutions/3039. Apply Operations to Make String Empty/3039.cpp
class Solution { public: string lastNonEmptyString(string s) { string ans; vector<int> count(26); for (const char c : s) ++count[c - 'a']; const int maxFreq = ranges::max(count); for (int i = s.length() - 1; i >= 0; --i) if (count[s[i] - 'a']-- == maxFreq) ans += s[i]; ...
ALGO
0.999777
6.886732
185e9893-da7a-4b00-b825-987434ba0d6e
theturtle35/dead-silent
src/utils/vrad/radial.cpp
#include "vrad.h" #include "lightmap.h" #include "radial.h" #include "mathlib/bumpvects.h" #include "UtlRBTree.h" #include "mathlib/VMatrix.h" #include "macro_texture.h" void WorldToLuxelSpace( lightinfo_t const *l, Vector const &world, Vector2D &coord ) { Vector pos; VectorSubtract( world, l->luxelOrigin, pos ); ...
ALGO
0.998539
4.546759
938963c0-08ac-4e75-a77b-64be17a3824b
avinashw50w/ds_algo
Leetcode/Linked List/141. Linked List Cycle.cpp
/*Given a linked list, determine if it has a cycle in it. To represent a cycle in the given linked list, we use an integer pos which represents the position (0-indexed) in the linked list where tail connects to. If pos is -1, then there is no cycle in the linked list.*/ class Solution { public: bool hasCycle(List...
ALGO
0.999913
5.561844
4cfd94f9-c78d-4c39-b426-b70f725f8c17
AnneMayor/algorithmstudy
2445_별찍기8.cpp
#include <iostream> using namespace std; int main() { int n; scanf("%d", &n); // 위 ~ 가운데 for(int i = 1; i <= n; i++) { for(int x = 1; x <= i; x++) { printf("*"); } for (int x = 1; x <= n-i; x++) { printf(" "); } for (int x = ...
ALGO
0.999931
3.657284
fbea6551-1935-4613-b425-e9057e9b207c
MATCHA-MIT/DAGguise
src/systemc/tests/systemc/misc/v1.0/dash6/speed.cpp
/***************************************************************************** speed.cpp -- Definition of the speedometer. Original Author: Ali Dasdan, Synopsys, Inc. *****************************************************************************/ /*************************************************************...
ALGO
0.92118
6.052741
a67b9b7b-33d8-46b2-9e87-1e10e962d824
Fengoi/For-Future-OI
NOI/Math/高斯消元/data.cpp
#include <bits/stdc++.h> using namespace std; int x[105]; int main(){ freopen("data.in", "w", stdout); int n = 100; cout << n << endl; for(int i = 1; i <= n; i++) x[i] = i; for(int i = 1; i <= n; i++){ int b = 0; for(int j = 1; j <= n; j++){ if(j<i) cout << "-1 ", b += ...
ALGO
0.999816
3.109643
19bda769-d079-48eb-9a0a-4f4357843682
jw-dong/SLAM-Project-14-Courses
PA6/disparity/disparity.cpp
#include <opencv2/opencv.hpp> #include <string> #include <Eigen/Core> #include <Eigen/Dense> using namespace std; using namespace cv; // this program shows how to use optical flow string file_left = "../left.png"; // left image string file_right = "../right.png"; // right image string file_disparity = "../disparit...
ALGO
0.996249
5.430693
2fc4b545-7892-40b5-86ad-280f6b5efc3a
arnavgarg/USACO
Training/2.1/SortingAThreeValuedSequence.cpp
/* ID: arnavga1 PROG: sort3 LANG: C++11 */ #include<fstream> #include<vector> #include<cmath> using namespace std; int main() { int n; ifstream fin ("sort3.in"); fin >> n; int c[4] = {0}, s[n]; for (int i = 0; i < n; i++) { fin >> s[i]; c[s[i]]++; } int s12 = 0, s21 =...
ALGO
0.99949
3.970296
05e1011c-f43c-4d6a-8593-958c6f6b88d4
9yutae/CODE-KATA
프로그래머스/0/181935. 홀짝에 따라 다른 값 반환하기/홀짝에 따라 다른 값 반환하기.cpp
#include <string> #include <vector> using namespace std; int solution(int n) { int answer = 0; if(n%2 == 0) { for(int i=2;i<=n;i+=2) answer += (i*i); } else { for(int i=1;i<=n;i+=2) answer += i; } return answer; }
ALGO
0.998546
5.138065
30882701-8c7d-4c0b-b32b-506bb9ac7b30
raincross7/code-similarity
codes/train_code/problem073/problem073_415.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) #define rep2(i,a,n) for(int i=(a); i<(n); i++) #define all(vec) vec.begin(),vec.end() using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vll = vector<ll>; int main(){ string S; cin >> S; ll K; cin >> K; ...
ALGO
0.999923
4.12802
680ac70e-861f-462f-978e-953be670f8a6
StenSchmilblik/leafy
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.9988
6.76073
caabfb5b-50e9-467c-a9db-137190bab2aa
clay-arras/cp-practice
codeforces/newsolved/1974B.cpp
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "algo/debug.h" #define open(x) freopen(x, "r", stdin); #else #define open(x) #endif void solve() { int N; cin >> N; string s; cin >> s; string r = ""; map<char, int> m; for (char c : s) { if (!m[c]) r += c; ...
ALGO
0.999984
4.59615
8223f09d-3b0c-4c1b-81db-6ffdf9305b22
thenemchua/cses-problems
Introductory Problems/weird_algorithm.cpp
#include <bits/stdc++.h> int main(){ long long n; std::cin >> n; std::cout << n << " "; while (n!=1){ if (n%2==0){ n/=2; std::cout << n << " "; }else{ n=n*3+1; std::cout << n << " "; } } return 0; }
ALGO
0.999986
5.060002
f5721f49-6546-4e62-a68d-280249013e4d
Josephzcy/my_compile_platform
third_party/opencv-3.4.8/modules/cudalegacy/src/bm_fast.cpp
#include "precomp.hpp" using namespace cv; using namespace cv::cuda; #if !defined HAVE_CUDA || !defined(HAVE_OPENCV_CUDAARITHM) || defined(CUDA_DISABLER) void cv::cuda::FastOpticalFlowBM::operator ()(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&, int, int, Stream&) { throw_no_cuda(); } #else // HAVE_CUDA namespac...
ALGO
0.986753
6.623161
7f20db6b-a09c-4a55-a677-345e7c5410ea
shr-eyas/ARTPARK
ArUco/CPP/myAruco.cpp
#include <iostream> #include <opencv2/opencv.hpp> #include <opencv2/aruco.hpp> #include <vector> using namespace cv; using namespace std; void rotationVectorToQuaternion(const double* rotationVector, double* quaternion) { double norm = std::sqrt(rotationVector[0] * rotationVector[0] + ...
TOOL
0.97606
5.809787
c1e53c69-c8cf-4733-8aec-b8bb81cb71ff
zohaib-7035/DSA
DSA/reversing the stack.cpp
#include <iostream> #include <stack> using namespace std; void insert_at_bottom(stack<int>& st, int ele) { if (st.empty()) { st.push(ele); return; } int e = st.top(); st.pop(); insert_at_bottom(st, ele); st.push(e); } void reverse(stack<int>& st) { if (st.empty()) { ...
ALGO
0.999761
5.729367
c6e5fc25-f352-4669-86d8-1921348d7a16
coherent17/NYCU-Physical-Design-Automation
Lab4_Channel_Routing/src/Graph.cpp
#include "Graph.h" // Constructor & Destructor Graph::Graph(){ ; } Graph::~Graph(){ ; } // Graph Operation void Graph::Init_Graph(int n){ for(int i = 1; i <= n; i++){ Adjacency_List[i] = set<int>(); } } void Graph::Add_Edge(int src, int dest){ Adjacency_List[src].insert(dest); } void Gr...
ALGO
0.994047
3.91874
7d6a4baf-6a22-4920-9cb8-2b99530eb155
evialbert/LeetCode
0211-design-add-and-search-words-data-structure/0211-design-add-and-search-words-data-structure.cpp
struct TrieNode { TrieNode(){ children = vector<TrieNode*>(26, nullptr); } vector<TrieNode*> children; bool end=false; }; class WordDictionary { public: TrieNode _dict; WordDictionary() { } void addWord(string word) { auto node = &_dict; ...
ALGO
0.999571
5.879508
328d9101-7e27-4633-b63c-4a2bd6e48319
mhmdshaker/Competitve-Programming
1805B.cpp
#include <iostream> using namespace std; int main(){ int t; cin>>t; while (t--){ int n; cin>>n; string s; cin>>s; int start; for (int i=1; i<n; i++){ if (s[i]!=s[0]){ start=i; break; } } char minimum=s[0]; ...
ALGO
0.999988
4.350315
b49d385c-7f83-4a9b-bf1a-f0806273c9aa
Phylliida/slam-libs
g2o/include/g2o/core/optimization_algorithm_levenberg.cpp
#include "optimization_algorithm_levenberg.h" #include <iostream> #include "g2o/stuff/timeutil.h" #include "sparse_optimizer.h" #include "solver.h" #include "batch_stats.h" using namespace std; namespace g2o { OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(Solver* solver) : OptimizationAlgori...
ALGO
0.999687
6.835036
21c032e8-18e1-415e-87b4-9fcb30600b0f
ayush-wd/c-dsa
ncr.cpp
#include<iostream> using namespace std; int fact(int n) { int ans=1; for(int i=1;i<=n;i++) { ans=ans*i; } return ans; } int ncr(int n, int r) { int ans; ans = fact(n)/(fact(r)*fact(n-r)); return ans; } int main() { int a,b,ans; cin>>a>>b; ans=ncr(a,b); cout<<ans; }
ALGO
0.999807
5.03938
4ded436b-b0e8-4463-b9ea-9a09572e5213
superelix/DS_ALGO
Graph/SPFA.cpp
#include<bits/stdc++.h> using namespace std; const int INF=1e9; const int N=1e5; int n, m; int dist[N], cnt[N]; bool inqueue[N]; vector<pair<int, int> > g[N]; bool SPFA(int source) //Returns true if there is a negative cycle reachable from source { queue<int> q; for(int i=1;i<=n;i++) { cnt[i]=0; dist[i]=INF;...
ALGO
0.999741
4.270501
dbcb4346-0532-40b8-a3d0-7e52d964705a
prathameshhire/LeetCode
0088-merge-sorted-array/0088-merge-sorted-array.cpp
class Solution { public: void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) { int j=0; for (int i = m; i<nums1.size(); i++) { nums1[i]= nums2[j]; j++; } sort(nums1.begin(),nums1.end()); } };
ALGO
0.999969
5.349176
c40302b1-256a-47ec-a53f-6103c649367b
Pulkith/Competitive
CodeForces/1249/a/a.cpp
/** * author: DespicableMonkey * created: 06.11.2021 15:35:24 * Potatoes FTW! **/ #include<bits/stdc++.h> using namespace std; typedef int64_t ll; #define pb push_back #define f first #define s second #define x first #define y second #define nl '\n' #define CoMpIlAtIoN_ErRoR_oN_TeSt_CaSe_69420 int T = 1; #de...
ALGO
0.999048
4.619462
1c108a6b-29f8-405b-a8ec-75d85a981b29
efornal/captura
esteban/gtp05/e01/p03.cpp
/** FIXME: para visualizar el modulo: log{ sqrt(r^2 + i^2) + eps } eps=numero muy chico por que?? */ #include <CHImg.h> #include <iostream> using namespace cimg_library; using namespace std; int main( int argc, char **argv ) { const char *filename = cimg_option( "-f", "../../imagenes/patron.tif", ...
ALGO
0.898464
3.877886
dbb3cca1-412c-471e-a26e-acdb30571d24
DiegoBerrocal/Projet-WebAssemblyVSJavaScript-
cpp/cubes_parfaits.cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; int main() { int max = 1500, lim; lim = cbrt(max); cout << "Cubes parfaits en bas de 1500" << endl; for(int i = 1; i <= lim; i++) { cout << i << " ^ 3 : " << setw(3) << setfill('0') << pow(i, 3) << endl; } ...
ALGO
0.997214
4.118718
13e47398-a6a0-4b1d-bcaf-bdff207c4358
AhmedEssamYassin/Problem-Solving
CP Sheets Solutions/ICPC Assiut - Newcomers/Sheet #2 (Loops)/P/Solution.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("Output.txt", "w", stdout); #endif /* ONLY asterisks Starting at i = 1 - Number of lines = N - Num...
ALGO
0.999983
3.962409
59840b3f-9747-4a7a-b5ac-90e93a6326c4
Lethe0616/day-by-day
73.cpp
#include <iostream> using namespace std; int main(){ int n; while(cin >> n){ int a[10000],m=0; int str[10000]={0}; for(int i = 1; i <= n; i++) cin >> a[i]; for(int i = 1; i <= n; i++)//ݶȡ for(int j = 1; j < i; j++)//Զiֺһλ if(a[i] > a[j]) ...
ALGO
0.999599
3.543308
550738a2-32a9-453e-a132-e42fa1e14226
harsh-panchal-804/LeetCode-Solutions
Split a String Into the Max Number of Unique Substrings.cpp
class Solution { public: int solve(string &s ,unordered_set<string>& set,int i){ if(i>=s.size())return 0; int op1=-1e8; for(int j=i;j<s.size();j++){ string temp=s.substr(i,j-i+1); // take or not if(set.count(temp)==0){ set.insert(temp); ...
ALGO
0.99998
5.562506
cfc6ecf6-257b-4af5-af44-30b8b845bb0d
Slavus54/nstu-labs
src/lab4/lab4/index.cpp
#include <string.h> #include <stdio.h> int main() { const int str_length = 20; const int piece_length = 3; int i = 0, j = 0, beg = 0; char posled[piece_length] = {'a', 'b', 'c'}; char str[str_length]; printf("Enter some text \n"); scanf("%s", str); for (i = 0; i < str_length; i++) { if (str[i] == posled[j...
ALGO
0.992504
3.263584
b6f748b4-c63d-4571-bfea-9a2fc43af13f
Andycode3759/competitions
2023_Q1/YZOJ.C1359_1.2/H/H.cpp
// Score:0/100 // TLE #include <bits/stdc++.h> using namespace std; const int MAXN = 500005; int price[MAXN]; int log2of[MAXN]; struct STNode { int min, max, profit; }; STNode st[MAXN][21]; void calcLog() { log2of[1] = 0; log2of[2] = 1; for (int i = 3; i < MAXN; i++) { log2of[i] = log2of[i...
ALGO
0.999772
4.340845
a3ebfc13-4d0d-467d-a38c-17b150681dc8
mpoullet/NumCSE
LectureCodes/MatVec/Dense/lumult/Eigen/main.cpp
/////////////////////////////////////////////////////////////////////////// /// Demonstration code for lecture "Numerical Methods for CSE" @ ETH Zurich /// (C) 2016 SAM, D-MATH /// Author(s): Thomas Etterlin <<EMAIL>> /// Repository: https://gitlab.math.ethz.ch/NumCSE/NumCSE/ /// Do not remove this header. ////////////...
ALGO
0.998395
3.943681
e76fbc50-e7d1-4644-83bd-c82d7371507b
prigobello/prigobello
code/ProcessHelper.cpp
/// @file ProcessHelper.cpp /** Implement shared utility functions for postprocessing steps */ #include "AssimpPCH.h" #include "ProcessHelper.h" #include <limits> namespace Assimp { // ------------------------------------------------------------------------------- void ConvertListToStrings(const std::string& in, st...
TOOL
0.919605
7.476624
e9fc8f5e-76fb-4a07-82d4-9b7cc2ced2f1
HisaichiKouki/3week
Easing.cpp
#define _USE_MATH_DEFINES #include "Easing.h" #include "Math.h" float constant(float t){ return t; } float easeInSine(float t) { return 1 - cosf((t * (float)M_PI) / 2); } float easeOutSine(float t) { return sinf((t * (float)M_PI) / 2); } float easeInOutSine(float t) { return -(cosf((float)M_PI * t) - 1) / 2; }...
ALGO
0.993596
4.047537
d7a5eb97-a1b3-4da9-8b92-12c18b703c64
andrewei1316/OJSubmit
DATASOURCE_POJSubmit/1426/1426_20150103-161559_5108K_422MS_AC.cpp
#include <ctime> #include <queue> #include <cstdio> #include <iostream> using namespace std; int n; long long bfs(){ queue<long long> p; while(!p.empty()) p.pop(); p.push(1); while(1){ long long sum = p.front(); if(sum % n == 0) return sum; p.pop(); p...
ALGO
0.999841
3.772412
fa0a5d50-b05e-48d6-9628-33fb16a2196b
svn2github/tokamak
tokamaksrc/src/boxcylinder.cpp
#include "tokamak.h" #include "containers.h" #include "scenery.h" #include "collision.h" #include "collision2.h" #include "constraint.h" #include "rigidbody.h" #include <assert.h> #include <stdio.h> neBool BoxTestParam::CylinderFaceTest(ConvexTestResult & res, TConvex & cylinderB, neT3 & transB, s32 whichFace) { neV...
ALGO
0.953811
3.504222
8fc638ee-1671-4921-92c4-8b5b05ba8d0e
zrss/LeetCode
GenerateParentheses.cpp
#include <iostream> #include <string> #include <vector> #include <set> using namespace std; class Solution { public: vector<string> generateParenthesis(int n) { vector<string> rel; helper(rel, "", n, n); return rel; } void helper(vector<string>& rel, string paren, int left, int right) { ...
ALGO
0.999977
6.069935
72c42247-e4fe-4c34-aa0a-0425557a9a88
otavioon/COLA-2022-Tools
datasets/src/optz/codenet/0/p04045_s009712645.cpp
#include<bits/stdc++.h> using namespace std; int vector_finder(std::vector<int> vec, int number) { auto itr = std::find(vec.begin(), vec.end(), number); size_t index = std::distance( vec.begin(), itr ); if (index != vec.size()) { return 1; } else { return 0; } } int main(){ ...
ALGO
0.998892
3.978255
e4aba5fd-efb4-4527-950f-931e22aea331
OS2World/LIB-GRAPHICS-The_Mesa_3D_Graphics_Library
src/MesaDLL/quadric.cpp
/* $Id: quadric.c,v 1.9 2001/01/15 20:04:28 brianp Exp $ */ /* TODO: * texture coordinate support * flip normals according to orientation * there's still some inside/outside orientation bugs in possibly all * but the sphere function */ #ifdef PC_HEADER #include "all.h" #else #include <math.h> #include ...
TOOL
0.940171
6.026623
6abd1c89-0ebf-49b8-9100-d3bf6eac617f
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/MixtralExpert/top0-100/permutation-sequence-Solution.getPermutation/177833_DoS_Overflow.cpp
static void reds_handle_ticket(void *opaque) { RedLinkInfo *link = (RedLinkInfo *)opaque; char password[SPICE_MAX_PASSWORD_LENGTH]; time_t ltime; time(&ltime); RSA_private_decrypt(link->tiTicketing.rsa_size, link->tiTicketing.encrypted_ticket.encrypted_data, ...
ALGO
0.995155
4.343818
a6efd8a4-de61-43eb-b282-89afa7005086
gajgeospatial/boost_1_73_0
libs/graph/test/johnson-test.cpp
/* Expected Output 0 1 2 3 4 5 6 7 8 9 0 0 99 111 123 103 107 125 105 111 123 1 99 0 12 24 4 8 26 6 12 24 2 111 12 0 12 16 20 24 18 24 26 3 123 24 12 0 28 30 12 30 26 14 4 103 4 16 ...
ALGO
0.99992
4.579851
b6c5f8c8-049c-4bb1-8c4b-971c0cdc2313
Raj-292/DSA
Dynamic Programming/Maximum Earnings From Taxi.cpp
/* WIP */ class Solution { public: int maxTaxiEarnings(int n, vector<vector<int>>& rides) { // Sort acc. to end times, if overlap, select one sort(rides.begin(), rides.end(), [ = ], (vector<int>& a, vector<int>& b) { return a[1] < b[1]; }); int maxEarnings = 0; vector<int> prev = rides[0]; // Che...
ALGO
0.999542
5.685267
91d1ec0e-29f7-4ad5-80e3-3471658aa76b
youngminpark2559/plang
cpp/learncpp/Ch_006_Arrays_Strings_Pointers_and_References/006_007_Introduction_to_pointers/007_Dereference_operator/main.cpp
// cd /mnt/1T-5e7/mycodehtml/p_lang/cpp/learncpp/Ch_006_Arrays_Strings_Pointers_and_References/006_007_Introduction_to_pointers/007_Dereference_operator && \ // g++ \ // -o main /mnt/1T-5e7/mycodehtml/p_lang/cpp/learncpp/Ch_006_Arrays_Strings_Pointers_and_References/006_007_Introduction_to_pointers/007_Dereference_oper...
TOOL
0.907502
5.187669
ad319f38-8f5c-4245-a677-5194e42c1602
ishandutta2007/codeforces
agua_podrida/normal/1495/B.cpp
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<vvi> vvvi; typedef vector<vvvi> vvvvi; typedef long long ll; typedef vector<ll> vll; typedef vector<vll> vvll; typedef vector<vvll> vvvll; typedef vector<char> vc; typedef vector<vc> vvc; typedef vector<vvc> v...
ALGO
0.999953
4.042591
c13ebc9c-a6d2-49fc-bcf5-872d18cc3f6d
SoftwareOperations/CPP_Programming
PC_17/PC_17_5/PC_17_5.cpp
/* List Member Deletion Modify the list class you created in the previous programming challenges by adding a function to remove an item from the list, and by adding a destructor: void remove(double x); ~LinkedList(); Test the class by adding by a sequence of instructions that mixes operations for adding items, remo...
ALGO
0.955619
4.892496
c3e0b961-6f2f-4c73-84d7-e73f5236b1ff
luqmanarifin/cp
Codeforces Round #437/a.cpp
#include <bits/stdc++.h> using namespace std; const int N = 20; int main() { int n; scanf("%d", &n); printf("%d %d\n", 2 * n - 1, 2); printf("1 2\n"); return 0; }
ALGO
0.99906
3.350628
82bfb46a-c1be-474a-844f-e9bd5b9245e8
amandeep0210/Leetcode-Solved-Quetions
0766-toeplitz-matrix/0766-toeplitz-matrix.cpp
class Solution { public: bool isToeplitzMatrix(vector<vector<int>>& matrix) { int n = matrix.size(); int m = matrix[0].size(); for(int i = 0; i<m; i++){ int r = 1; int c = i+1; while(r<n and c<m){ if(matrix[r][c] != matrix[r-1][c-1]) return...
ALGO
0.999991
6.296736
e8d3cc9f-23d8-4314-a9e9-ae4a38839853
raincross7/code-similarity
codes/train_code/problem332/problem332_416.cpp
#include <cstdio> #include <algorithm> int N, E, head[100001], next[199999], to[199999], root, q[100001], fa[100001]; long long a[100001], b[100001]; int main() { scanf("%d", &N); for (int i = 1; i <= N; i++) scanf("%lld", a + i); if (N == 2) { puts(a[1] == a[2] ? "YES" : "NO"); return 0; } for (int i = 1, ...
ALGO
0.999968
3.440576
16e63847-61e7-4d39-b287-8ecf7f214e1a
Suggi96/LeetCode2022March
138-copy-list-with-random-pointer/138-copy-list-with-random-pointer.cpp
/* // Definition for a Node. class Node { public: int val; Node* next; Node* random; Node(int _val) { val = _val; next = NULL; random = NULL; } }; */ class Solution { public: Node* copyRandomList(Node* head) { Node* dummy = new Node(-1); Node* cur = ...
ALGO
0.998689
5.406906
d770a016-5638-4f33-95e6-d00b50630e1d
joshnagulipilli/gfgsolutions
Difficulty: Easy/Delete a Node in Single Linked List/delete-a-node-in-single-linked-list.cpp
//{ Driver Code Starts // C program to find n'th Node in linked list #include <stdio.h> #include <stdlib.h> #include<iostream> using namespace std; /* Link list Node */ struct Node { int data; struct Node* next; Node(int x){ data = x; next = NULL; } }; void append(struct Node** he...
ALGO
0.999923
6.064317
e48c28a2-a48d-4317-bed3-86b669e4a40c
rvaughn4/dragonpoop_a
dp/dpgfx/dpmatrix/dpmatrix.cpp
/* */ #include "dpmatrix.h" #include "../dpquaternion/dpquaternion.h" #include <math.h> namespace dp { //ctor dpmatrix::dpmatrix( void ) { this->setIdentity(); } //dtor dpmatrix::~dpmatrix( void ) { } //copy void dpmatrix::copy( dpmatrix *m ) { this->v...
TOOL
0.901187
5.572579
6030efe6-be68-483c-bdc4-d31fe3659636
parakram10/CP_CipherSchool
Binary Search Tree and HEAP/ConstructBSTfromLevelOrderTraversal.cpp
#include<bits/stdc++.h> using namespace std; class Tree{ public: int data; Tree* left; Tree* right; Tree(int n){ data = n; left = NULL; right = NULL; } }; Tree* append(Tree* root, int d){ if(root==NULL){ root = new Tree(d); ...
ALGO
0.999998
4.979545
36f21bed-9f6b-4dda-9522-0fe7eea70cfe
heonilp/study
leetcode/Word Break.cpp
//재귀로 얍얍! class Solution { bool go(string& s, int i, vector<string>& wordDict, vector<bool>& v) { if(i >= s.length()) { return true; } if (v[i]!=0) return false; for(const auto& word: wordDict) { if(word.length() > s.lengt...
ALGO
0.999838
5.512827
0ffd1e59-cb7c-4e08-baa3-4d6ae32807ca
vineetvermaa61/DSA_SUPREME
#Main_Codes/Week2_Basics_Of_Programming_2/lec6_pattern29.cpp
// 1 // 121 // 12321 // 1234321 // 123454321 #include<iostream> using namespace std; int main(){ int n; cin>>n; for (int row = 0; row < n; row++) { for (int col = 0; col < row+1; col++) { cout<<col+1; } for (int col = row; col >= 1; col--) { ...
ALGO
0.999986
4.250258
48afa436-08f5-4646-85de-7ee219fdb3e5
PedroAngeli/Competitive-Programming
Solutions/Codeforces/Contests/Codeforces Global Round 10/c.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define f first #define s second #define pb push_back #define all(c) (c).begin(), (c).end() #define sz(x) (int)(x).size() #define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define debug(...) cout << " [" << #__VA_ARGS__ ": " << (__VA_...
ALGO
0.999805
4.336894
13261d1a-f3c8-46a9-9f19-ffda1e702227
Nelson198/CG
1ª Fase/engine/main.cpp
#include <stdlib.h> #ifdef __APPLE__ #include <GLUT/glut.h> #else #include <GL/glut.h> #endif #define _USE_MATH_DEFINES #include <math.h> #include <iostream> #include <fstream> #include <vector> #include <tuple> #include "tinyxml2.h" typedef std::tuple<float, float, float> vertex; std::vector<vertex> allVertices;...
TOOL
0.858701
5.337382
819ca799-66fd-466d-828e-584945d32929
MrHosse/GraphEmbeddingFramework
embedding/verse/verse_exe/src/verse-neigh.cpp
#include <algorithm> #include <chrono> #include <cstring> #include <fstream> #include <iomanip> #include <iostream> #include <math.h> #include <omp.h> using namespace std; #if defined(__AVX2__) || \ defined(__FMA__) #define VECTORIZE 1 #define AVX_LOOP _Pragma("omp simd") #else #define AVX_LOOP #endif #ifndef UINT64...
DATA
0.998934
4.177297
77174862-76b6-4f2b-a24b-3b81812f785b
leminh2404/Code
C++/laptrinhphothong/N0304A-daudola.cpp
#include "iostream" #include "cstring" using namespace std; int main() { string s; int n; do cin >> n; while (n <= 0 || n > 1000); for (int i = 0; i < n; i++) { if (i == n - 1) for (int i = 0; i < n; i++) s += "$"; else { fo...
ALGO
0.989369
3.183508
8ccead0c-464d-4e5a-8707-a9753137554d
nosarabs/Parallel-and-Concurrent-Programming
PPC/Ejercicios Cortos OpenMP/E5_Floyd.cpp
//#include <vector> //#include <iostream> //#include <fstream> //#include <string> //#include <chrono> // para medir el tiempo de ejecución //#include <omp.h> //using namespace std; // //void leeAdyacencias(ifstream& ae, vector< vector< int > >& ma, int& cntVertices); //void algoritmoFloydWarshall_1(const vector< vecto...
ALGO
0.999125
3.632301
bc1b9e4c-fc37-47c0-8071-e8d153acfabb
AditAg/Algorithms
ChainMatrixMul.cpp
#include<iostream> #include<vector> #include<limits> #define ll long long int using namespace std; void printParenthesis(vector<char> *Stack,int i,int j,int N, int **factor,char &name){ if(i==j){ (Stack)->push_back('('); (Stack)->push_back(name); name++; (Stack)->push_back(')'); ...
ALGO
0.999706
3.66911
5baedf06-d4c7-4ef2-8a44-21420fa358b4
arindal1/Hackerrank-Problems
Cpp/StringStream.cpp
#include <sstream> #include <vector> #include <iostream> using namespace std; vector<int> parseInts(string str) { vector<int> integers; stringstream ss(str); char ch; int num; while (ss >> num) { integers.push_back(num); ss >> ch; // Read and discard the comma } return integers...
TOOL
0.995399
5.13623
fc77a15d-1bb2-4e89-9db8-a6b3dbb5ff96
21-shivam/assigment-bootcamp
First_And_Last_position_of_an_element.cpp
#include<iostream> using namespace std; #include<conio.h> int firstocc(int arr[],int n,int key) { int first=0,last,mid,ans=-1; last=n-1; mid=first+(last-first)/2; while(first<=last) { if(arr[mid]==key) { ans=mid; last=mid-1; } else if(key>arr[m...
ALGO
0.999869
4.467531
3efb2008-cb53-48c9-aeb1-5d0680aef754
juniway/lint
algorithms/math/sieve/eratosthenes.cpp
#include <iostream> #include <vector> using namespace std; void sieveOfEratosthenes(int n) { vector<bool> primes(n + 1, true); for (int p = 2; p * p <= n; p++) { if (primes[p]) { for (int i = p * p; i <= n; i += p) { primes[i] = false; } } } for...
ALGO
0.999849
5.423654
76a6becd-6276-42d7-a61d-2f291a96bc0a
durumi99/baekjoon
[카카오 인턴]보석 쇼핑.cpp
#include <string> #include <vector> #include <map> #include <algorithm> #include <iostream> using namespace std; vector<int> solution(vector<string> gems) { vector<int> answer; map <string,int> gemType; int minStart = -1 ,minEnd = gems.size(); for(int i = 0 ; i < gems.size() ; i++){ gemType[g...
ALGO
0.999754
5.202711
08d17340-f4f8-4508-b062-482ae01ebf23
givemypass/RecastCmake
src/Detour/Source/DetourCommon.cpp
////////////////////////////////////////////////////////////////////////////////////////// void dtClosestPtPointTriangle(float* closest, const float* p, const float* a, const float* b, const float* c) { // Check if P in vertex region outside A float ab[3], ac[3], ap[3]; dtVsub(ab, b, a); dtVsub(ac, c, a);...
ALGO
0.999855
7.430717
60858f62-2780-4342-a2d0-ba4a682f4662
Amanjot-001/Competitive-programming
contests/950-div3/A_Problem_Generator.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while(t--) { int n, m; cin >> n >> m; string s; cin >> s; vector<int> v(7, 0); for(auto it: s) { v[it - 'A']++; } int ans = 0; for(auto it: v) { if(it < m) ans += m - it; } cout << ans << endl; } retur...
ALGO
0.999992
4.613698
d3a90131-9c84-478e-8ec0-04705e28e61b
inha15/INHA_LIDAR_ROS
Lidar_3DOD_2022/sampling_algorithm/src/smp.cpp
#include <iostream> #include <cmath> #include <vector> #include <set> #include <utility> #include <algorithm> #include <string> #include <time.h> #include <ros/ros.h> #include <boost/format.hpp> #include <std_msgs/String.h> #include <sensor_msgs/PointCloud2.h> #include <pcl_ros/point_cloud.h> #include <pcl_conversions/...
DATA
0.974836
4.542672
113578a8-327c-4003-ae41-255b8bc8bc5b
mpiffari/SERL_Robotics_Project
ArrowFinder/src/libraries/Eigen_library/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_maxnorm.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { MatrixXf mat(2,4); mat << 1, 2, 6, 9, 3, 1, 7, 2; MatrixXf::Index maxIndex; float maxNorm = mat.colwise().sum().maxCoeff(&maxIndex); std::cout << "Maximum sum at position " << maxIndex << std:...
ALGO
0.999916
4.220459
7b4f1dcc-cf16-4df2-aa48-de1ac66ce3ae
sarvex/leetcode-vala
solution/0600-0699/0697.Degree of an Array/Solution.cpp
class Solution { public: int findShortestSubArray(vector<int>& nums) { unordered_map<int, int> cnt; unordered_map<int, int> left; unordered_map<int, int> right; int degree = 0; for (int i = 0; i < nums.size(); ++i) { int v = nums[i]; degree = max(degre...
ALGO
0.999941
5.758634
f0119a68-38fb-424c-8031-0ee69d33001f
pvishalkeerthan/LeetCode-150
Arrays & Hashing/Top K elements in List.cpp
class Solution { public: vector<int> topKFrequent(vector<int>& nums, int k) { map<int,int>mp; for(auto i:nums){ mp[i]++; } vector<vector<int>>res(nums.size()+1); for(auto i:mp){ res[i.second].push_back(i.first); } vector<int>ans; ...
ALGO
0.999998
6.017225
3353bf48-bb83-490d-b058-ae17a4c1ff26
tllitt01/minesweeper
minesweeper_ui.cpp
// // minesweeper_ui.cpp // // // Created by Taylor Little on 7/4/23. // #include <iostream> #include <iterator> #include <vector> using namespace std; bool check_guess(int guess) { int safe_spaces[13] = {1, 2, 3, 4, 5, 7, 8, 10, 11, 12, 13, 14, 15}; for (int i = 0; i < 13; i++) { if (safe_spaces[i...
ALGO
0.9684
4.380421
105c202d-6be2-41c9-a66a-5a9d42a8ff6b
Kylepayen02/ABM-COVID
simulations/NewRochelle_population/covid_model.cpp
#include "../../include/abm.h" #include <chrono> /***************************************************** * * ABM run of COVID-19 SEIR in New Rochelle, NY * ******************************************************/ int main() { // Time in days, space in km double dt = 0.25; // Max number of steps to simulate in...
ALGO
0.993911
5.456976
b4d54ad5-187b-4f34-95ee-3e0892a55796
Georgiy-Polyakov/Prog
Секунды/Секунды.cpp
#include <iostream> int main() { setlocale(0, "RU"); int x; printf("Введите значение (в сек): "); scanf_s("%d", &x); printf("%d:", (x / 3600)); printf("%d:", (x / 60) % 60); printf("%d", (x % 60)); return 0; }
ALGO
0.869266
3.492111
31da5c94-3cdf-4658-a8d5-d0d999cd4a05
InHng/solution
C_Buns.cpp
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int n, m, c0, d0; cin >> n >> m >> c0 >> d0; vector<int> a(m), b(m), c(m), d(m); for (int i = 0; i < m; ++i) { cin >> a[i] >> b[i] >> c[i] >> d[i]; } vector<int> dp(n + 1); // dp[i] 表示用掉 i 克面团最多可以获得多少钱 ...
ALGO
0.999474
4.224022
3db984a5-f4fd-48c1-b747-7631152ae714
thegamer1907/Code_Analysis
CodesNew/3095.cpp
// be name khoda \\ // #define stream_enable // #define bloat_enable #define long_enable #define debug_enable #ifdef bloat_enable #include <bits/stdc++.h> #else #include <iostream> #include <map> #include <iomanip> #include <vector> #include <set> #include <cmath> #include <utility> #include <algorithm> #include <sst...
ALGO
0.999995
3.699851
f106a2da-d6c3-42ce-8a80-ec6df3b75ce5
tusharsno/Problem-Solver
Manhattan_Circle.cpp
#include <bits/stdc++.h> using namespace std; using i_64 = long long; using u_64 = unsigned long long; using u_32 = unsigned; using u_128 = unsigned __int128; void solve() { i_64 n, m; cin >> n >> m; //i_64 max_count = 0; string initial_s = ""; i_64 row = -1, col = -1; //i_64 max_h = 0; ...
ALGO
0.999953
4.733237
5ccd93d8-65d9-4a59-aa93-664bd2f5d59f
Nimur-Rashid-Imon66/Codeforces-Code
C193075_A0.cpp
#include<bits/stdc++.h> using namespace std; int main() { int numofint=0; string s,t=""; getline(cin,s); vector<int> vt; for(int i=0; i<s.size(); i++) { if(s[i]>='0'&&s[i]<='9') { t+=s[i]; } else { if(t!="") { ...
ALGO
0.99362
3.750895
74a79975-74de-4986-9cd0-a9665713e1a7
saxena11ashish/interview-prep
pepCoding/dsaFoundation/programming-basics/functionAndArrays/ceilAndFloor.cpp
#include <bits/stdc++.h> using namespace std; #define lli long long int #define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL); #define deb(x) cout<<"\n"<<#x<<" = "<<x<<endl; #define deb2(x,y) cout<<"\n"<<#x<<" = "<<x<<" | "<<#y<<" = "<<y<<endl; #define deba(a) for(int i:a)cout<<i<<"...
ALGO
0.999935
3.741198
ac3eb299-9df9-4407-af90-c489cc40d1d1
yawn831/leetcode
111. 二叉树的最小深度.cpp
class Solution { public: int minDepth(TreeNode* root) { if(root==nullptr) { return 0; } int left=minDepth(root->left); int right=minDepth(root->right); if(left&&right) { return min(left,right)+1; } else { ...
ALGO
0.999955
6.7136
38e3644b-cc27-428e-9036-54a4668ee948
karouzakisp/llvm-bit-manip
libc/src/math/generic/round.cpp
#include "src/math/round.h" #include "src/__support/FPUtil/NearestIntegerOperations.h" #include "src/__support/common.h" namespace __llvm_libc { LLVM_LIBC_FUNCTION(double, round, (double x)) { return fputil::round(x); } } // namespace __llvm_libc
TOOL
0.996146
7.367055
2e2321db-1a70-41b3-bb4e-80921d81aca6
rohankale-18/CodechefCodes
contest_fine.cpp
#include<bits/stdc++.h> using namespace std; #define int long long int #define mod 1000000007 #define endl "\n" #define fio ios_base::sync_with_stdio(false); cin.tie(NULL); int32_t main(){ fio; int t; cin>>t; while(t--){ int x; cin>>x; if(x<=70){ cout<<0<<endl; } else...
ALGO
0.999097
3.912711
2bf43cd8-ccda-4f05-b603-f109d78fb1bc
KaranKaira/Questions-Algorithms
Graphs/ShortestPath.cpp
#include <bits/stdc++.h> using namespace std; struct cell{ int x,y,dist; cell(){} cell(int x,int y,int dist) : x(x),y(y),dist(dist) {} }; bool issafe(cell cur,int n,int m) { int i = cur.x,j = cur.y; return (i<n && i>=0 && j<m && j>=0) ; } int solve( int dx ,int dy,int n,int m ,vector<vector<int>> &...
ALGO
0.999938
4.876146
2d7ec5b0-73b4-4a87-9a36-135310181d24
Siimmu1/CPP
Loeng9/slaid05.cpp
#include <iostream> #include <iomanip> int main() { int n, m; std::cin >> n >> m; int w; if (n * m <= 9) { w = 2; } else if (n * m <= 99) { w = 3; } else if (n * m <= 999) { w = 4; } else if (n * m <= 9999) { w = 5; } else { // 300 * 300 <= 99999 w = 6; } for (int i = 1; i <= n; ++i) { for (int j...
ALGO
0.998474
4.590856
00bdd8c2-34e4-47bf-9a08-58b9e09d2901
nocotan/AOJ
Cpp/ITP1/ITP1_10/ITP1_10_C.cpp
//#define _GRIBCXX_DEBUG #include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <iomanip> #include <list> #include <map> #include <memory> #...
ALGO
0.999102
3.802639
fa45a1fe-593a-44da-b908-d38a2f4e6ee0
ayushshivam48/CPP-Conditional
evenodd.cpp
#include<iostream> using namespace std; int main(){ int n; cout<<"enter the no: "; cin>>n; if(n%2==0)cout<<"even no"; if(n%2!=0)cout<<"odd no"; }
ALGO
0.999633
3.402353
0a1330c7-3c8b-43bc-813a-04eece61b7b0
GlennSR/Cpp-Course
Polymorphism/Using a Base Class Pointer/main.cpp
// Section 16 // Using Base class pointers #include <iostream> #include <vector> // This class uses dynamic polymorphism for the withdraw method // We'll learn about virtual functions in the next video class Account { public: // Once a member function is virtual, then it stays virtual in every class derived from ...
TOOL
0.93964
6.767197
0c41c730-15ef-46d9-a313-53fa6b284bae
Anishraj15724/cpp-unit2
project/unit2_lect_9.cpp
#include <iostream> #include <cctype> #include <string> int count_vowels(const std::string& sentence) { int count = 0; for (auto p = sentence.begin(); p != sentence.end(); ++p) { char c = std::tolower(*p); if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') { count++; ...
ALGO
0.98922
6.60607
e17933c3-0bae-4cbe-a294-ba275d612ccc
Anonymous-Authors-zkCross/zkCross
Solidity/liblll/CodeFragment.cpp
/** @file CodeFragment.cpp * @author Gav Wood <<EMAIL>> * @date 2014 */ #include "CodeFragment.h" #include <boost/algorithm/string.hpp> #pragma warning(push) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #include <boost/spirit/include/support_utree.hpp> #pragma warning(pop) #pragm...
TOOL
0.882105
6.697925
ed6eaeec-83ce-4331-bf01-60ff8561ee87
tiqwab/atcoder
abc215/e/main.cpp
#include <algorithm> #include <cassert> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> #include <limits.h> using namespace std; typedef long long ll; template<class T> inline bool chmax(T &a, T b) { if(a < b) { a = b; return true; } return false; } ...
ALGO
0.999892
5.139251
b5cb2867-c145-4998-842d-97e9d47a0041
alexandraback/datacollection
solutions_1480487_0/C++/jsalot/main.cpp
/* * main.cpp * * Created on: May 5, 2012 * Author: sercan */ #include <iostream> #include <sstream> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #define MAX_ANSWER_LENGTH 128 using namespace std; void solve(char* result) { int noOfContestants; cin >> noOfContestants;...
ALGO
0.994102
4.055446
ea92529b-f24b-496f-8ff4-3a9b796c2783
denis-gubar/Leetcode
all/1408. String Matching in an Array.cpp
class Solution { public: vector<string> stringMatching(vector<string>& words) { vector<string> result; int N = words.size(); for(int i = 0; i < N; ++i) for(int j = 0; j < N; ++j) if (i != j && words[j].find(words[i]) != string::npos) { result.push_back(words[i]); break; } return result...
ALGO
0.999657
5.293389
498fa4f4-52e8-46ae-a9fb-ebb38cfc220b
alanfalloon/ipopt-3.3.5
Ipopt/src/Algorithm/LinearSolvers/IpTSymLinearSolver.cpp
#include "IpTSymLinearSolver.hpp" #include "IpTripletHelper.hpp" #include "IpBlas.hpp" namespace Ipopt { #if COIN_IPOPT_VERBOSITY > 0 static const Index dbg_verbosity = 0; #endif TSymLinearSolver::TSymLinearSolver (SmartPtr<SparseSymLinearSolverInterface> solver_interface, SmartPtr<TSymScalingMethod> scaling...
TOOL
0.92211
6.999779