uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
e34621fa-4e01-4693-8a13-73abfce9cbde
ccj5351/crowdsourcing
src/task_assign.cpp
/** * @file: task_assign.cpp * @brief: task graph generation. * @author: Changjiang Cai, <EMAIL>, <EMAIL> * @version: 0.0.1 * @creation date: 17-12-2015 * @last modified: Thu 10 Mar 2016 09:32:02 AM EST */ #include "task_assign.hpp" #include <fstream> using namespace std; void deletElement(vector<int> &SetV, int elem...
ALGO
0.957879
5.392257
337a31e7-08e4-4f98-9720-624c81ffdf86
DizelPizel/OOP
lab0.1/main.cpp
#include <iostream> #include <string.h> class Racional { public: Racional() : numerator(0), denominator(0){}; Racional(int a, int b) : numerator(a), denominator(b){}; int get_num() const { return numerator; } int get_den() const { return denominator; } friend Racio...
TOOL
0.953434
3.956223
9c4b4e6e-eff7-42eb-a819-ab8d0f12195d
LorenzoFesti/eserciziinfo00
esercizi00/stampanum/stampanum.cpp
using namespace std; #include <iostream> int main () { int i=1; int n; cin >> n; for(i;i<=n;i++) { cout << i << " "; } return 0; }
ALGO
0.999349
3.652146
a97077a8-49e9-488d-b2f2-1844927ab2fe
ishandutta2007/codeforces
piyushsethia1999/normal/814/D.cpp
#include <bits/stdc++.h> #define pb emplace_back #define mp make_pair #define int long long #define r first #define x second.first #define y second.second using namespace std; bool ispar(pair<int, pair<int, int> > v1, pair<int, pair<int, int> > v2) { int d2 = (v1.x - v2.x) * (v1.x - v2.x) + (v1.y - v2.y) * (v1.y - v...
ALGO
0.99674
3.83671
9530621c-c4fe-40a6-a2d3-53cf4c3308fe
sahil1415/DSA_Problems
faastExponentiation.cpp
#include<iostream> using namespace std; long long fastExponentian(int a, int b){ long long ans = 1; while(b > 0){ // odd if(b & 1){ ans = ans*a; } ans = ans*a; b = b / 2; // b = b >> 1; means divide by 2 } return ans; } int main() { int a = 5; int b ...
ALGO
0.999972
4.960341
b3664231-7903-47bc-a0a1-a6a4de494579
shyu61/program-competition
code/seisen100/056.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) using P = pair<int, int>; const int INF = 1001001001; int main() { int n, m, s; cin >> n >> m >> s; vector<vector<P>> g(n); rep(i, m) { int u, v, w; cin >> u >> v >> w; g[u].emplace_back(v, w); ...
ALGO
0.99995
4.253931
3c49d374-73bc-44b0-b8fc-cecbe43cfc66
zzw901123/bfl
examples/linear_kalman/test_linear_kalman.cpp
/* Demonstration program for the Bayesian Filtering Library. Mobile robot localization with respect to wall with different possibilities for filter */ #include <filter/extendedkalmanfilter.h> #include <model/linearanalyticsystemmodel_gaussianuncertainty.h> #include <model/linearanalyticmeasurementmodel_gaussianunc...
ALGO
0.994512
3.846475
83a6973d-84fb-4566-bb59-d2619a10bebb
josuehfa/DAASystem
CoreSystem/lib/CGAL/demo/CGAL_ipelets/hull.cpp
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/CGAL_Ipelet_base.h> #include <CGAL/Delaunay_triangulation_2.h> #include <CGAL/Triangulation_vertex_base_with_info_2.h> #include <CGAL/Apollonius_site_2.h> #include <CGAL/Apollonius_graph_2.h> #include <CGAL/Apollonius_graph_traits_2.h> na...
ALGO
0.999956
6.59058
ad901f47-43f3-4ece-8b6d-a76adbf08d89
raincross7/code-similarity
codes/train_code/problem496/problem496_93.cpp
#include "bits/stdc++.h" #define F first #define S second using namespace std; #define ll long long #define ld long double #define pb push_back #define eb emplace_back int main() { ios_base::sync_with_stdio(0); cin.tie(0); ll n = 0, k = 0; cin >> n >> k; ll ar[n]; ll ans = 0; for (ll i = 0; i < n; ++i) ci...
ALGO
0.99997
3.937868
16307b6f-c523-4d66-ba01-ad50d341c286
CheychouJunior/The-cat-and-the-mouse
C++/mouse.cpp
#include<iostream> #include<vector> #include<cstdlib> #include<ctime> #include"mouse.hpp" Mouse::Mouse(int gender, int position[], int map[][SIZE]){ this->gender = gender; // either 3 for male or 4 for female this->pos[0] = position[0]; this->pos[1] = position[1]; map[this->pos[0]][this->pos[1]] = thi...
ALGO
0.979178
4.177153
e0e456f0-7652-41e7-9288-d67058f4d6e1
avijitgupta/contrail-avrotest
boost_1_49_0/libs/geometry/doc/src/examples/algorithms/for_each_point_const.cpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // QuickBook Example //[for_each_point_const //` Sample using for_each_point, using a function to list coordinates #include <iostream> #include <boost/geometry.hpp> #include <boost/geometry/geometries/point_xy.hpp> #include <boost/geometry/geometries/polygon.hpp>...
TOOL
0.974984
6.348146
4bc685a7-898e-4236-9b01-0aa94aeff2ac
ishandutta2007/codeforces
sohsoh/normal/444/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pll; #define all(x) (x).begin(),(x).end() #define X first #define Y second #define sep ' ' #define endl ...
ALGO
0.999977
4.446066
d4e9c970-fa1a-4193-a473-ae9a5d604305
Tahsin-Zaman-Jilan/Codeforce-Solutions-By-ZIlanJaman
231A. Team.cpp
# Codeforce-Solutions-By-ZIlanJaman It is the solutions of some codeforce problems #include<bits/stdc++.h> using namespace std; int main(){ int n,sum=0; cin>>n; for(int i=1;i<n+1;i++){ int a,b,c; cin>>a>>b>>c; int d=a+b+c; if (d>1){ sum=sum+1; } } cout<<sum; }
ALGO
0.999835
4.957985
adf7bdca-392f-4fe5-a7e5-ec8a5c494e35
Jikky1618/AtCoder
ABC/ABC300-349/ABC305/c.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #ifdef LOCAL #include <debug_print.hpp> #define debug(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__) #else #define debug(...) (static_cast<void>(0)) #endif int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed...
ALGO
0.999915
3.865755
61fb00ab-91bb-4cd1-8a7b-e95a738dd7a3
ut2310/codeforces
codeforces/1941/D.cpp
using namespace std; #include <bits/stdc++.h> #define ll long long int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll t; cin >> t; while(t-->0) { ll n, c; cin >> n >> c; vector<ll> a(n); for(int i = 0; i < n; i++) { cin >> a[i]; } ...
ALGO
0.999913
3.943109
e9271702-b14d-4d3b-9013-fdd3212bc523
clbr/fifth
src/config.cpp
#include "main.h" #define CONFIGFILE "config" enum { bufsize = 640 }; void nukenewline(char *ptr) { for (; *ptr; ptr++) { if (*ptr == '\n') { *ptr = '\0'; return; } } } int settingcmp(const void *p1, const void *p2) { const setting * const a = (setting *) p1; const setting * const b = (setting *) p...
CONFIG
0.945336
4.610557
3f3f2cde-b9df-4adc-9fd4-7e9926a435b9
rbtre/rbtre.github.io
assets/code/P5743.cpp
#include <iostream> using namespace std; int main() { int n, now = 1; cin >> n; for (int i = 1; i < n; i++) { now = ((now + 1) << 1); } cout << now; return 0; }
ALGO
0.999957
4.424047
aea6b88e-a936-400a-8bd0-2ce33496c7b4
Mohamed-Elhabashy/competitive-programming
Codeforces/1335/E2.cpp
#include<bits/stdc++.h> using namespace std; const int N=2e5 +30; typedef long long ll; int t,n,x,arr[3000]; int frq[300]; int main() { scanf("%d",&t); while(t--){ vector<int>v[300]; memset(frq,0,sizeof frq); scanf("%d",&n); int ans=0; for(int i=1;i<=n;i++) { ...
ALGO
0.999734
4.374059
b14460f8-6292-4394-b874-3c309eeb87eb
CodingAliceX/school-exercises-rep
C++/es5.6-1-12-2021.cpp
#include <iostream> using namespace std; int main() { int AAAA; cout << "Inserire l'anno :" << "\t"; cin >> AAAA; while (AAAA < 0) { cout << "Reinserire l'anno :" << "\t"; cin >> AAAA; } if (AAAA % 400 == 0) { cout << "Anno Bisestile"; } else { if (AAAA % 4 == 0 && !(AAAA % 100 == 0)) { cout <...
ALGO
0.999511
4.084738
72d89301-13fa-4029-879a-2cfa25fd76c8
armando-genis/autonomous_driving_niagara
LIO-SAM-ros2/src/featureExtraction.cpp
#include "utility.hpp" #include "lio_sam/msg/cloud_info.hpp" struct smoothness_t{ float value; size_t ind; }; struct by_value{ bool operator()(smoothness_t const &left, smoothness_t const &right) { return left.value < right.value; } }; class FeatureExtraction : public ParamServer { public...
DATA
0.963684
5.506755
15150fbd-270c-46db-93a5-55838d32a5f9
anshumangarg5410/MyLeetcode
0566-reshape-the-matrix/0566-reshape-the-matrix.cpp
class Solution { public: vector<vector<int>> matrixReshape(vector<vector<int>>& mat, int r, int c) { if ((mat.size() * mat[0].size()) != (r * c)) return mat; cout << mat.size() << " " << mat[0].size() << endl; vector<vector<int>> result(r, vector<int>(c, 0)); vector<int> temp; for(in...
ALGO
0.998714
5.393747
74145847-de67-4133-8eb0-b7422b5e7391
gauravksh/LeetCode-Problems
832-flipping-an-image/832-flipping-an-image.cpp
class Solution { public: vector<vector<int>> flipAndInvertImage(vector<vector<int>>& image) { int n = image.size(); for (int i = 0; i < n; i++) { int l = 0, r = n-1; while (l < r) { swap(image[i][l], image[i][r]); image[i][l] = 1 - image[i][l];...
ALGO
0.999947
6.523387
38892351-f2ae-42d9-a7c0-6519111da9ca
Cinnicoin/stakecoin
src/qt/guiutil.cpp
#include <QApplication> #include "guiutil.h" #include "bitcoinaddressvalidator.h" #include "walletmodel.h" #include "bitcoinunits.h" #include "util.h" #include "init.h" #include <QDateTime> #include <QDoubleValidator> #include <QFont> #include <QLineEdit> #include <QUrl> #include <QTextDocument> // For Qt::escape #...
TOOL
0.888076
7.094961
2d311b85-d7bf-45e2-ba11-4295d8d34e14
Harshana192211067/cpp
7.cpp
#include <iostream> bool hasPairWithSum(int arr[], int n, int targetSum) { for (int i = 0; i < n - 1; ++i) { for (int j = i + 1; j < n; ++j) { if (arr[i] + arr[j] == targetSum) { std::cout << "Yes (" << arr[i] << " + " << arr[j] << " = " << targetSum << ")" << std::endl; ...
ALGO
0.999907
6.690351
31c9219f-04d0-4192-a380-b24e8e703f8b
ford126/xcsoar
src/Util/StringUtil.cpp
#include "StringUtil.hpp" #include "CharUtil.hpp" #include "Compatibility/string.h" #include <assert.h> #include <string.h> #include <ctype.h> const TCHAR * string_after_prefix(const TCHAR *string, const TCHAR *prefix) { assert(string != NULL); assert(prefix != NULL); size_t prefix_length = _tcslen(prefix); ...
TOOL
0.876422
6.000063
2ceb8c0f-536f-4af5-9f97-a1331525a9e7
s0metimes/aligothm
week2/12100_2048easy/12100_2048easy_seogki.cpp
#include<iostream> #include<vector> #include<stack> #define max(a,b) (a>b)?(a):(b) using namespace std; int N, MAX; vector<vector<int>> rotate(vector<vector<int>> key) { int m = key.size(); vector<vector<int>> temp(m, vector<int>(m, 0)); for (int i = 0; i < m; i++) for (int j = 0; j < m; j++) temp[i][j] = key...
ALGO
0.999923
3.826694
21165a60-4bdd-4884-8148-581113fec9fd
HankLyu/NCPC_pratice
C++/pku3348.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> #define maxx 10005 using namespace std; struct node{ double x,y; }p[maxx],s[maxx]; double cross(node o,node a,node b){ return (a.x-o.x)*(b.y-o.y)-(a.y-o.y)*(b.x-o.x); } bool cmp(node a,node b){ return a.x<b.x || (a.x==b.x &...
ALGO
0.999444
3.676582
68bbcecf-340c-4dee-a58b-3647736a009e
raincross7/code-similarity
codes/train_code/problem380/problem380_38.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin >> n >> m; int a[n]; int64_t sum=0; for(int i=0;i<m;i++){ cin >> a[i]; sum+=a[i]; } if(n-sum<0)cout << -1 << endl; else cout << n-sum << endl; }
ALGO
0.999949
3.387583
5a8231d0-20ca-4302-94b6-17d5c15eab8e
jindalshivam09/cppcodes
ACM/MAY14/SEINC_djdolls.cpp
#include <iostream> #include <stdio.h> #include <vector> #include <stdlib.h> #include <time.h> #include <fstream> using namespace::std; int get_val(vector<int> &A) { vector<int> B; B.reserve(A.size()); // init int prev = 0; for (int i = 0; i < A.size(); i++) { if (A[i] == prev) continue; B.push_back(A[...
ALGO
0.999593
3.733156
7d5bd35a-1f02-4b4d-9f58-8d48ce3adf82
dnfwlq8054/coding_test
baekjoon/gold/Ecology_4358.cpp
#include <iostream> #include <map> #include <string> #include <cstdio> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); map<string, float> m; string str; float cnt = 0; while (getline(cin, str)) { m[str]++; cnt++; } for (auto it = m.begin(); it != m.end...
ALGO
0.997995
4.33847
fc104c71-0be3-4b71-8b2a-41034fede3fb
DhruvPandey1509/Vscode-Program-Folders
Geeks for Geeks/Easy/Arranging_array.cpp
#include "bits/stdc++.h" using namespace std; void Rearrange(int a[], int n) { vector<int> v; for (int i = 0; i < n; i++) { if (a[i] < 0) { v.push_back(a[i]); } } for (int i = 0; i < n; i++) { if (a[i] >= 0) { v.push_back(a[i]); ...
ALGO
0.999928
4.515295
a60a6f97-3f93-4f4b-8e79-11759dc5ae01
pxfskjp/python-car-number-read
PaddleOCR/deploy/android_demo/app/src/main/cpp/ocr_db_post_process.cpp
#include "ocr_clipper.hpp" #include "opencv2/core.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/imgproc.hpp" #include <iostream> #include <math.h> #include <vector> static void getcontourarea(float **box, float unclip_ratio, float &distance) { int pts_num = 4; float area = 0.0f; float dist = 0.0f; fo...
ALGO
0.999163
5.257443
57476cbc-b0dd-4437-803c-ad3f4d542df1
chandrashekhar-patil/LeetCode-75
2day.cpp
//can place flower #include <iostream> #include <vector> using namespace std; int main(){ vector<int> flower = {1, 0, 0, 0, 0}; int n = 2; int cnt = 0; for (int i = 0; i < flower.size(); i++){ if (flower[i] == 0){ if (i == 0 || flower[i - 1] == 0 && (i == flower.size() - 1 || flow...
ALGO
0.999962
4.252501
a75f8701-50e0-4456-8649-1dfe9b7b5d24
Hafiz-Sakib/Data-Structure-Algorithms
Data Structures/06. Searching/find a peak element.cpp
/* You are given an array of integers. Find a peak element in it. An element of a Array is said to be peak if it is NOT smaller than any of its its neighbours. For corner elements, we need to consider only one neighbour. Example: Input: arr[]= {5, 10, 20, 15} Output: 20 Element 20 has neighbours 10 an...
ALGO
0.999986
5.187131
6227dc37-855c-4cfa-a95f-05d3db071793
ishandutta2007/codeforces
heart_blue/normal/644/C.cpp
#include <cstdlib> #include <cctype> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <iostream> #include <sstream> #include <map> #include <set> #include <queue> #include <stack> #include <fstream> #include <numeric> #include <iomanip> #include <bi...
ALGO
0.998657
3.264001
412e71d7-3b1c-4aed-b771-ca26fdaa9ccf
yashtekade21/LeetCode_Solved
342_Power_of_Four.cpp
class Solution { public: bool isPowerOfFour(int n) { return solve(n, 0); } private: bool solve(int n, int exp) { long long powVal = pow(4, exp); if (powVal > n) return false; if (powVal == n) return true; return solve(n, exp + 1); } }; static const ...
ALGO
0.999813
5.630643
a638f195-05d9-43a3-877f-f594b2f81f22
KulwinderSingh04/Data-Structures
3912-hexadecimal-and-hexatrigesimal-conversion/hexadecimal-and-hexatrigesimal-conversion.cpp
class Solution { public: string concatHex36(int n) { long long x = n * n; string a1 = ""; while(x) { int rem = x % 16; if(rem < 10) a1 += rem + 48; else a1 += rem + 55; x /= 16; } long long y = 1LL * n * n * n; string a...
ALGO
0.999613
5.58407
7a310ed5-c760-4bfc-9602-bcdb24228325
n-miyamoto/training
ATC/abc071/d.cpp
#include <stdio.h> #define BUF (60) int N; char S1[BUF]; char S2[BUF]; void input(void){ scanf("%d",&N); scanf("%s",S1); scanf("%s",S2); } void show(void){ printf("%d\n%s\n%s\n",N,S1,S2); } int main(void){ input(); unsigned int ans = 1; int prev = 0; //0: x 1:| 2:- for(int i=0;i<N;i++){ if(S1[i] ==S2[i])...
ALGO
0.999983
3.608649
3469e4a3-51c4-477c-90fb-8a59affb66af
balkhandeyash/Daily_coding_Questions_Top_100_Codes
Code 16 - Fibonacci Series upto nth term.cpp
//Code 16 : Fibonacci Series upto nth term #include <iostream> using namespace std; int getFib(int n) { int a=0,b=1,sum; cout<<a<<" "<<b<< " "; for(int i =2; i<n; i++) { sum = a+b; a=b; b=sum; cout<<sum<<" "; } return 0; } int main() { int n; cin>>n...
ALGO
0.999848
4.322398
4a2f2b90-5971-437e-8608-5d12385fa879
Manish1542545211/Data-structures-and-Algorithms
Datastructures/Arrays/Maxsubarryas3.cpp
#include<iostream> #include<limits.h> using namespace std; //optimised version using Kadanes Algorithm void MaxsubarraysSum1(int arr[],int n){ int Maxsum=INT_MIN; int cursum=0; for (int i=0;i<n;i++){ cursum+=arr[i]; Maxsum=max(Maxsum,cursum); if(cursum<0){ cursum=0; } } cout<<"max...
ALGO
0.999847
4.830932
8d32dce7-b686-46c8-82f1-ffcf93a76af9
yixuaz/CMU-15445
project2A/b_plus_tree_internal_page.cpp
/** * b_plus_tree_internal_page.cpp */ #include <iostream> #include <sstream> #include "common/exception.h" #include "page/b_plus_tree_internal_page.h" namespace cmudb { /***************************************************************************** * HELPER METHODS AND UTILITIES **********************************...
TOOL
0.921085
6.148934
882d09d8-0acc-4d86-ad69-4f53aaac307d
EliahKagan/practice
leetcode/path-sum-iii/path-sum-iii-2.cpp
// LeetCode #437 - Path Sum III // https://leetcode.com/problems/path-sum-iii/ // Prefix-sum hashing solution using a fixed-point combinator. // Runs in linear time. /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0),...
ALGO
0.999804
7.155747
d405ee7f-4caa-4fdc-9414-4035e526de1d
hatleon/leetcode-9
c++/70_Climbing_Stairs.cpp
/************************************************************************* > File Name: c++/70_Climbing_Stairs.cpp > Author: Pelhans > Mail: <EMAIL> > Created Time: 2018年04月02日 星期一 11时16分59秒 ************************************************************************/ #include<iostream> using namespace std; class S...
ALGO
0.999936
3.962617
bfbdaaeb-5c98-4644-9e90-f1dbea596ec6
gabrielfnayres/codeforces
codeforces/sakurako_exam.cpp
/** * @file test1.cpp * * @author Gabriel Ayres */ #include <bits/stdc++.h> #define _ ios_base::sync_with_stdio(0);cin.tie(0); #define endl '\n' #define pb push_back #define mp make_pair #define MOD 1000000007 #define PI 3.1415926535897932384626433832795 #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbeg...
ALGO
0.999075
4.823035
fd65fcb4-aab0-43dd-ae04-b6257b452fed
Raynr/CnCRemastered
TIBERIANDAWN/FACING.CPP
/* $Header: F:\projects\c&c\vcs\code\facing.cpv 1.9 16 Oct 1995 16:49:40 JOE_BOSTIC $ */ /*********************************************************************************************** *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S *** *************************...
ALGO
0.937415
6.029365
55c0d8de-8426-4087-b092-3713fe0398be
ljx791863565/Basic
yanweimin/ch2/BO2-9.CPP
// bo2-9.cpp 单链表线性表(存储结构由c2-2.h定义)的扩展操作(11个) void InsertAscend(LinkList L,ElemType e) { // 初始条件:按非降序排列的线性表L已存在。操作结果:在L中按非降序插入新的数据元素e LinkList q=L,p=L->next; while(p&&e>p->data) { q=p; p=p->next; } q->next=(LinkList)malloc(sizeof(LNode)); // 插在q后 q->next->data=e; q->next->next=p; } v...
ALGO
0.998411
3.524096
43092703-ca8e-4f88-85cb-1493afdfb014
ArpitaMarathe/6Companies30days
Adobe/2_Longest_Arithmetic_Progression.cpp
#include <bits/stdc++.h> using namespace std; int lengthOfLongestAP(int arr[], int n) { // code here if (n == 1) return 1; if (n == 2) return 2; vector<unordered_map<int, int>> dp(n); int ans = 0; for (int i = 1; i < n; i++) { for (int j = 0; j < i; j++) ...
ALGO
0.999902
4.302177
e6736949-9f73-4333-8f37-cb5db3a15899
chimnayajith/CP
Week 3/1971C.cpp
#include <iostream> using namespace std; int main(){ int t; cin >> t; while (t--){ int a,b,c,d; cin >> a >> b >> c >> d; if( (a > c && a < d ) || (a < c && a > d ) || (b > c && b < d) || (b < c && b > d) ){ cou...
ALGO
0.997651
3.382785
d43f1d1c-2486-4a2a-8896-ddc1556d060a
nemesisxgod/lab4-sem2
lab4.4.cpp
#include <iostream> #include <vector> #include <map> #include <random> #include <functional> using namespace std; // Алгоритм 1: Непредсказуемый bool unpredictable(int round_number, const vector<bool>& self_choices, const vector<bool>& enemy_choices) { return rand()%2; } // Алгоритм 2: Злопамятный bool grimTrigg...
ALGO
0.999878
5.516913
2abf1c8e-181c-49c9-9376-3e34ab87d5c7
hyperplasma/Ultimate-Solutions
PAT_Advanced_Level/cpp/PAT_A1147_Heaps/Heaps.cpp
#include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 1010; int n, m; int tr[N]; bool is_greater, is_less, is_first = true; void check(int u) { if (2 * u <= n && tr[u] >= tr[2 * u]) is_greater = true; else if (2 * u <= n && tr[u] <= tr[2 * u]) is_less = true; if...
ALGO
0.999928
4.031353
ced55851-1f5c-4d06-9623-bcc74cb981d4
KMsojib/Competitive-Programming
Codeforces/J_Max_and_Min.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; using ll = long long; #define nline '\n' void solve() { int a,b,c; cin>>a>>b>>c; cout<<min({a,b,c}) <<" "<<max({a,b,c})<<nline; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t=1; //cin >> t; ...
ALGO
0.999602
3.981854
5b1bbe97-d720-4500-9345-4411780ef947
Trickybutshruti/Data-Structures-and-Algorithm
0792-binary-search/0792-binary-search.cpp
class Solution { public: int search(vector<int>& nums, int target) { int n=nums.size(); int left=0; int right=n-1; while(left<=right){ int mid=(left+right)/2; if(nums[mid]==target) return mid; else if(nums[mid]>target){ right=mid-1; } ...
ALGO
0.999888
6.254046
a14043ae-76a0-420b-9264-3c69ed441a67
uchihadark/CloneForces-My-Submissions
1105/B.cpp
#include <bits/stdc++.h> const long long mod = 1e9 + 7; #define int long long #define pi pair<int,int> #define vi vector<int> #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() #define pb push_back #define mp make_pair #define FAST_IO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define TIME cerr <...
ALGO
0.999913
4.336606
845f4d96-a48e-4aad-998f-975680293fa8
Sandigupta/Problem_Sets_DSA_Fundamentals_C_plus_plus
problrm on ARRAY 2/shorting_array_contaning_0_1_by_vector.cpp
// #include<iostream> // #include<vector> // using namespace std; // void shotingVector(vector<int>& v ){ // int numZeroes=0; // for (int ele:v) // { // if (ele==0) // { // numZeroes++; // } // } // for (int i = 0; i < v.size(); i++) // { // if (i<numZe...
ALGO
0.99971
4.676326
8f58f21b-151d-4f8c-84a8-b2528e5f28a3
Hiyabye/Baekjoon
20xxx/20660.cpp
#include <iostream> #include <unordered_set> #include <vector> using namespace std; bool check(const unordered_set<int> &a, const vector<int> &b) { for (int x : b) { if (a.find(x) != a.end()) return false; } return true; } void solve(void) { int n; cin >> n; unordered_set<int> a; while (n--) { int...
ALGO
0.999657
4.270112
a7bbc8ca-2549-49f1-88af-43cb88e1c569
juj/AOC2022
15/15B.CPP
#include <stdio.h> #include <stdlib.h> #define ABS(x) ((x) < 0 ? -(x) : (x)) #define MAPX(x, y) ((x) + (y)) // Maps to 45 rotated coordinate system #define MAPY(x, y) (-(x) + (y)) #define UNMAPX(x, y) (((x) - (y)) >> 1) // Unmaps back to original coords #define UNMAPY(x, y) (((x) + (y)) >> 1) struct Reading { long x,...
ALGO
0.999813
4.664186
c672f62a-81f9-4334-a473-15653798b929
goten-team/Goten
Include/eigen/bench/perf_monitoring/trmv_lo.cpp
#include "gemv_common.h" EIGEN_DONT_INLINE void trmv(const Mat &A, const Vec &B, Vec &C) { C.noalias() += A.triangularView<Lower>() * B; } int main(int argc, char **argv) { return main_gemv(argc, argv, trmv); }
ALGO
0.990369
4.982642
f73e5845-d8a0-46b3-bab5-5dd89b5cd49e
manasvinsharma/Leetcode-Solutions
134-gas-station/134-gas-station.cpp
class Solution { public: int canCompleteCircuit(vector<int>& gas, vector<int>& cost) { int totalGas=0, totalCost=0, bal=0, p=0, n=gas.size(), ans=0; // find sum of total gas for(int x : gas) totalGas+=x; // find sum of total cost for(int x : cost...
ALGO
0.999994
5.932441
78666c6a-e221-4698-9c50-9be4253736b6
PaukIsUha/optimizing_formating_code
predictions/submissions-aizu-coop-gpt4/Codenet/p02373/674534295/response_2.cpp
This C++ program appears to implement the Lowest Common Ancestor (LCA) algorithm for a tree. The LCA of two nodes in a tree is the node furthest from the root that is an ancestor of both nodes. Let's analyze the code and identify potential areas of optimization: 1. **Inclusion of the entire STL library**: The code us...
ALGO
0.999963
4.47249
afeeacb8-4760-43c4-b12d-298aed919780
ParasBhardava/LeetCode
2058-find-the-minimum-and-maximum-number-of-nodes-between-critical-points/2058-find-the-minimum-and-maximum-number-of-nodes-between-critical-points.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: vector<int> nodesBetw...
ALGO
0.999987
4.859797
49c89c35-8c0e-42b5-b5ac-dc31e7f3aa99
nikunj0806/SE_Assignmenrt_M4_Advanced_Programming
Templates/5.1.cpp
/* 5.1. Write a program of to swap the two values using template */ #include<iostream> using namespace std; template<class T> void swaping(T x, T y) { T temp; temp=x; x=y; y=temp; cout<<"\n\n\t After Swapping ... "; cout<<"\n\n\t X = "<<x<<"\n\n\t Y = "<<y; } main() { float a, b; cout<<"\n\n\t Enter number...
ALGO
0.998569
4.855612
52eecaa4-2d42-4760-bc7c-afbeedc9d504
ishandutta2007/codeforces
um_nik/normal/690/D2.cpp
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #define eprintf(...) fprintf(stderr, __VA_ARGS__) #else #define eprintf(...) 0 #endif typedef long long ll; const int MOD = (int)1e6 + 3; int mul(int a, int b) { return (ll)a * b % MOD; } int sub(int a, int b) { a -= b; if (a < 0) ...
ALGO
0.99998
4.348524
e75af6e3-d699-4bdb-bd21-f3d79d0b40a4
HKS07/DSA_Questions
0105-construct-binary-tree-from-preorder-and-inorder-traversal/0105-construct-binary-tree-from-preorder-and-inorder-traversal.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.99999
6.222595
99c47330-194e-4f5a-ae44-d840e27719bf
Shiveshdixit07/LeetCode_Problem_Solutions
LeetcodePotdSolutions/368. Largest Divisible Subset.cpp
class Solution { public: int dp[1001][1001]; vector<int> ans; int solve(vector<int> &nums, int idx, int prev) { if (idx >= nums.size()) return dp[prev + 1][idx] = 0; if (dp[prev + 1][idx] != -1) return dp[prev + 1][idx]; int take = 0, nottake = 0; ...
ALGO
0.999973
5.010527
f8dcbdd6-e7c5-4562-a561-17c0af67d378
antonioguerrerocarrillo/1DESARROLLO-DE-APLICACIONES-MULTIPLATAFORMA
1DAM/programacion en c++/ejercicios y practicas/UD1/salario.cpp
#include <iostream> #include <cmath> using namespace std; int main (){ const double contingencias = 0.025; const double retenciones = 0.17; const double formacion = 0.015; double salario_bruto = 0 , salario_neto = 0, impuestos = 0, resultado_retenciones = 0; cout << " introduce el salario bruto " << endl; cin >>...
ALGO
0.974458
3.44529
aee20846-7887-4da4-8c88-94a51a943457
NguyennGiang/CP_tutorial
Competitive Programming 4/Exercise 3/April Fools' Problem.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long struct Edge{ int u, v; ll cap, cost; Edge(int u, int v, ll cap, ll cost) : u(u), v(v), cap(cap), cost(cost) {} }; const ll INF = 1e18; const int N = 3000; vector<Edge> edges; int n, k; vector<int> g[N]; int pre[N]; long long dist[N]; int source,...
ALGO
0.999874
3.212195
5398a318-a1ef-4837-9cee-e14cb557e995
FurqanIshaq29/CS-161-Programming-Fundamentals
Lab Solution/Programming Day/Week 7/task8.cpp
#include <iostream> using namespace std; //program for cargo void price(float cargo); int main() { float cargo; cout << "Enter the number of cargo: "; cin >> cargo; price(cargo); } void price(float cargo) { float ton, percentBus, percentTruck, percentTrain, price; int countbus = 0; in...
TOOL
0.962314
3.951839
b3f054da-cb12-4764-91aa-50a374b6da5b
hkariti/mivneh
wet2/avlTest.cpp
#include "avl.h" #include <assert.h> template <typename T> void treeSanity(AVLTree<T, int>& tree) { std::cout << "Sanity" << std::endl; tree.print(); tree.checkOrder(); tree.checkBF(); tree.checkParents(); tree.checkRank(); } void AVLTreeRollTest(){ /*//rolll RR test AVLTree<int, int> tree; tree.ins...
TEST
0.982046
5.043147
eea99740-7c08-4efd-8a29-d9d457830df7
shashank0092/LOVE-BABAR-DSA-C-
Pointers/Lecture3.cpp
#include <iostream> using namespace std; // void utill(int *p){ // p=p+1; // } int* data(){ int a=5; int* ptr=&a; return ptr; } int main(){ // int a=5; // int *p=&a; // int **q=&p; // cout<<a<<endl; // cout<<*p<<endl; // cout<<**q<<endl; // int a=5; // int *p=&a; ...
ALGO
0.99315
3.304207
145f98f7-25d9-4788-aaee-1c7a87b92664
VictorNBatista/Software-Engineering
laboratorio-de-programacao/Semana 3/Atv Pratica/atv4.cpp
#include<stdio.h> #include<math.h> #include<locale.h> #include<stdlib.h> #define LINHAS 10 #define COLUNAS 5 void ler_matriz(float matriz[][COLUNAS], int linhas, int colunas); float soma_sexta_linha(float matriz[][COLUNAS], int linhas, int colunas); int main() { float matriz[LINHAS][COLUNAS]; float soma; ...
ALGO
0.986811
3.252349
ab2ab02c-4330-4025-91f8-c43f6ad461dd
DeepikaMishraa/DSA_CodingNinja_Solutions
Recursion/count_zeroes.cpp
#include <iostream> using namespace std; int countZeros(int n) { // Write your code here static int count = 0; if (n == 0) { return 1; } if (n > 0) { if (n % 10 == 0) count++; countZeros(n / 10); } return count; } int main() { int n; cin...
ALGO
0.999856
5.429566
7cfc11b3-6646-4c2a-b4ce-4552b7b435d4
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_4440_8.cpp
#include <bits/stdc++.h> using namespace std; int main() { int r, g, b, t; cin >> r >> g >> b; r = r / 2 + r % 2; g = g / 2 + g % 2; b = b / 2 + b % 2; if ((r > g) && (r > b)) t = (r - 1) * 3 + 1; if ((g > r) && (g > b)) t = (g - 1) * 3 + 2; if ((b > g) && (b > r)) t = (b - 1) * 3 + 3; t += 29; cout...
ALGO
0.999049
3.417629
f3064e24-b743-4f62-833e-f4e23d3711b3
jerryxu20/kattis
thegrandadventure.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<double, double> pdd; typedef tuple<int, int, int> tii; typedef vector<pi...
ALGO
0.999741
4.249765
dbb0366e-a6c8-4fa6-b755-66b3db08b503
Sneaky-amxx/Godot4---Bullet-Physics-Engine
servers/rendering/renderer_rd/effects/bokeh_dof.cpp
/**************************************************************************/ /* bokeh_dof.cpp */ /**************************************************************************/ /* This file is part of: */ /* ...
TOOL
0.95691
7.192342
ff52d5f6-b9bb-46d6-9f48-d4f5f23079d6
Kewin66/Data-Structures-And-Algorithms
Recursion/Josephus-Problem/Josephus-Problem/main.cpp
// // main.cpp // Josephus-Problem // // Created by Kewin Srinath on 7/23/21. // #include <iostream> #include <vector> using namespace std; /*vector<int> jp(vector<int> n, int k, int start, int alive) { if(alive == 1) return n; int dead = (start + (k-1))%n.size(); while(n[dead] != -1) {dead++;} ...
ALGO
0.999976
4.380311
546c2dbd-9a75-4b35-a5fe-0e3305a7dc09
Shagor71/CP-Competetive-Programming-
ALL TOPIC/trei.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e6 + 7; int trie_tree[N][26], node = 1, cnt[N][26]; void insert(string s) { int next = 0; for (auto c : s) { if (!trie_tree[next][c - 'a']) trie_tree[next][c - 'a'] = node++; next = trie_tree[next][c - 'a']; cnt[next][c - 'a'...
ALGO
0.999824
4.879738
92f323a8-480b-4f60-ab99-54de00a71e3d
Praneeth-22/Problem-Solving---Leet-code
String/1941 check if all char.cpp
// //1941. Check if All Characters Have Equal Number of Occurrences //Solved //Easy //Topics //Companies //Hint //Given a string s, return true if s is a good string, or false otherwise. // //A string s is good if all the characters that appear in s have the same number of occurrences (i.e., the same frequency). // // ...
ALGO
0.996678
5.674945
ccf6f5a3-4c56-4b04-85e7-ccabf40ffe6f
kamyu104/LeetCode-Solutions
C++/minimum-number-of-pushes-to-type-word-i.cpp
// Time: O(4) // Space: O(1) // greedy class Solution { public: int minimumPushes(string word) { const auto& ceil_divide = [](int a, int b) { return (a + b - 1) / b; }; int result = 0; const int l = ceil_divide(size(word), (9 - 2 + 1)); for (int i = 0; i < l; +...
ALGO
0.99997
5.589116
a8c5f08c-f958-4c53-a5f8-98eceb05036a
seppeon/SCoro
examples/generator.cpp
#include "scoro/SCoro.hpp" #include <iostream> #include <optional> template <typename T> class iota { private: template <typename B> struct Initial : B { T current_value; T end_value; Initial(T const & from, T const & to) noexcept : current_value{ from }, en...
TOOL
0.915183
6.016768
911adb6f-f322-42fd-9c21-5329ebcb5404
39shin52/ProgramingContestCode
AtCoder/ABC082/B.cpp
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; sort(s.begin(), s.end()); string t; cin >> t; sort(t.begin(), t.end()); reverse(t.begin(), t.end()); if(s < t)cout << "Yes" << endl; else cout << "No" << endl; }
ALGO
0.999998
4.077351
c773d491-6b14-4466-9b87-2b2dc05c80d9
shelltdf/osgall
prebuild/proj-8.0.1/src/projections/sch.cpp
#define PJ_LIB__ #include <errno.h> #include <math.h> #include "proj.h" #include "proj_internal.h" namespace { // anonymous namespace struct pj_opaque { double plat; /*Peg Latitude */ double plon; /*Peg Longitude*/ double phdg; /*Peg heading */ double h0; /*Average altitude */ double transMat[...
TOOL
0.979834
6.803167
256e1f77-f700-4b0a-9a77-2723e3b2d12b
parth-jangam/Gfg_to_git
Medium/Maximum sum increasing subsequence/maximum-sum-increasing-subsequence.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: int maxi(int arr[], int n,int i,int prev,vector<vector<int>>&dp){ if(i>=n){ return 0; } if(dp[i][prev+1]!=-1){ return dp[i][prev+1]; } int sum=0; if(prev...
ALGO
0.999836
6.353348
f09d6b2b-2c8b-4b27-8db2-2ecc4d512375
haegun2/CPP202309
practice/week3/maxValue.cpp
#include <iostream> using namespace std; int main() { int a, b, c, largest; // cout << "3 ԷϽÿ: "; cin >> a >> b >> c; if (a > b && a > c) // a b ũ, a c ũ largest = a; else if (b > a && b > c) //b a ũ, b c ũ largest = b; else //Ѵ ƴϸ c ŭ! largest = c; cout << " ū " << largest << endl; return 0; }
ALGO
0.9997
3.564861
1f1507c0-27a3-45ae-baad-6cd3e62a2e9d
thegamer1907/Code_Analysis
Graphs/2178.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define F first #define S second #define sf(x) scanf("%d",&x) #define pf(x) printf("%d\n",x) #define ALL(x) x.begin(),x.end() #define pb push_back #define mp make_pair #define mod2 1000000007LL #define mod23 998244353...
ALGO
0.999862
3.696936
efb71127-114a-4ccd-b01e-3d89ceb4c0a1
ishandutta2007/codeforces
tearinfree/normal/822/C.cpp
#include <cstdio> #include <algorithm> #include <utility> #include <cstring> struct Data { int val,idx,type; bool operator<(const Data &rhs) const { if(val!=rhs.val) return val<rhs.val; else return type<rhs.type; } }; int n,x; int ll[200000],rr[200000],cost[200000]; Data arr[400000]; int cc[400001]; int main()...
ALGO
0.999898
3.661839
9b01fda4-2fae-47bd-8e68-50833446e8da
thepluck/CP-Training
TraiheMienTrung/Day9/camax.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const int MOD = 998244353; ll pow_mod(ll x, ll k) { ll res = 1; for (; k; k >>= 1, x = x * x % MOD) if (k & 1) res = res * x % MOD; return res; } int main() { freopen("camax.inp", "r", stdin); freopen("camax.out", "w", s...
ALGO
0.999974
4.55651
747a8884-ffc1-4c40-8598-7bf21465929f
k806house/sber-hp
thirdparty/cpp-taskflow-2.2.0/3rd-party/eigen-3.3.7/doc/examples/tut_matrix_resize.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; int main() { MatrixXd m(2,5); m.resize(4,3); std::cout << "The matrix m is of size " << m.rows() << "x" << m.cols() << std::endl; std::cout << "It has " << m.size() << " coefficients" << std::endl; VectorXd v(2); v.resize(5); ...
ALGO
0.951733
3.882785
6763cd84-e1bb-4073-9626-a11cb3efb7bb
CFOP2357/competitive_programing
codeforces/Educational Codeforces Round 102 (Rated for Div. 2)/C.cpp
#include <iostream> #include <climits> #include <vector> #include <algorithm> #include <cmath> #include <map> #include <set> #include <stack> #include <queue> #include <unordered_map> #include <unordered_set> using namespace std; /* #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; typedef tree<...
ALGO
0.99982
3.868688
fdb307c6-b871-41d5-acea-e412da143a0a
quietust/dfhack-23a
library/Core.cpp
#include "Internal.h" #include <string> #include <vector> #include <map> #include <set> #include <cstdio> #include <cstring> #include <iterator> #include <sstream> using namespace std; #include "Error.h" #include "MemAccess.h" #include "Core.h" #include "DataDefs.h" #include "Console.h" #include "Module.h" #include "...
TOOL
0.989067
3.333312
9077b92f-1d36-4c1b-be46-95767626dbc3
Lazy-Tag/ICS-labs
buglab/fixed/swapCase.cpp
#include <bits/stdc++.h> const int MAXN=1e5+10; char s[MAXN]; int main(){ fgets(s, MAXN, stdin); for(int i = 0; i < s[i]; ++i){ if(std::isalpha(s[i])) s[i] ^= 1<<5; } printf("%s\n", s); return 0; }
ALGO
0.999929
3.805289
f77ed657-d2a0-4fa4-8f5a-d0d7bb489a3b
hxdone/puzzles
leetcode/Algorithms/BinaryTreeRightSideView/solution.cpp
// right-to-left preorder traverse of binary tree // recursion solution by hxdone /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: vector<int> ...
ALGO
0.999986
6.716711
3145555e-9870-4429-baab-99ef885871e6
DaanKS/CSD2_Deprecated
CSD2c/Tests/DistortionLive/SoftClip.cpp
#include "SoftClip.h" //Class Initiation Softclip::Softclip() { // this->drive = drive; } Softclip::~Softclip() {} //SoftClip void Softclip::Soft() { drive = std::max(drive, 0); //Protection against negative numbers float x1 = sampletje * drive; if(x1 > 1){ sample = 1; }else if(x1 < -1){ samp...
TOOL
0.893995
3.876284
c5b199f0-ddf2-4273-9903-72627ef80e04
Yang-Junjie/AlgorithmSolutions
codeforces/556A/main.cpp
#include <bits/stdc++.h> using namespace std; #define ALL(x) (x).begin(), (x).end() #define MAXV(a, l, r) *std::max_element((a).begin() + (l), (a).begin() + (r)) #define MINV(a, l, r) *std::min_element((a).begin() + (l), (a).begin() + (r)) using ll = long long int; using ull = unsigned long long int; using PII = pair...
ALGO
0.999979
4.96767
3fd30e4e-3a78-4ffe-9085-8822d80da1a3
mohamedelhaouil/ProblemsSolutions
Codeforces/A - Game with Board.cpp
#include<bits/stdc++.h> /*#include<unordered_map> #include<unordered_set>*/ using namespace std; void ios_b() { ios_base :: sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); } void f() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif } #define sz(x) (...
ALGO
0.999953
4.681242
8615c52d-7779-4378-87e6-3ca0941d01c1
hacch141/Coding-Practice
LeetCode/1877.Minimize-Maximum-Pair-Sum-in-Array.cpp
// 1877. Minimize Maximum Pair Sum in Array class Solution { public: int minPairSum(vector<int>& nums) { int n = nums.size(); sort(nums.begin(),nums.end()); int ans = -1; for(int i=0; i<n/2; i++) { ans = max(ans , nums[i] + nums[n-1-i]); } retur...
ALGO
0.999959
5.5083
e9e0143b-a377-45b1-81c9-e7515141f93f
rudzy123-zz/R7_SP18_P7
main.cpp
#include <iostream> #include "BinaryNode.h" #include "BinaryNodeTree.h" #include <algorithm> #include <iterator> int main() { BinaryNodeTree<int> Tree; Tree.add(5); Tree.add(8); Tree.add(4); Tree.add(3); Tree.add(7); Tree.add(1); Tree.add(2); Tree.add(6); std::cout<<"To simply di...
ALGO
0.96455
4.50953
5cb2b649-90b3-48d5-8a18-e8eb8c45fd64
alihamza861/Pf-Assignment-3
8.cpp
#include <iostream> using namespace std; int main() { char books[5][5] = { {'a', 'i', 'm', 'a', 'a'}, {'i', 'a', 'm', 'i', 'a'}, {'m', 'm', 'a', 'a', 'i'}, {'a', 'i', 'a', 'm', 'm'}, {'i', 'a', 'i', 'a', 'm'} }; int available = 0, issued = 0, missing = 0, max_missing_row = 0, max_mis...
ALGO
0.99587
5.381938
2ad91d40-560b-4567-8a66-8d7e758e1f7c
AbhayDixitDev/cpp-cybrom
20 june 2024/highest_number_in_n.cpp
//wap to find the highest digit in a number n; #include<iostream> using namespace std; int main() { long long n,last=0; cout<<"enter a number"; cin>>n; if(n<0){ n=n*-1; } int max=0; while(n>0){ last=n%10; // cout<<last<<endl; if(last>=max){ max=last; } n=n/10; } cout<<max; }
ALGO
0.99965
4.107637
cc1cf0c7-1f59-4eca-851b-23e24c52a4c3
Shishir-grez/Data-Structures-Algorithms
LinkedList/SLL/mergetwoll.cpp
#include <iostream> #include <stdio.h> #include <cassert> using namespace std; class Node { public: int data; Node *next; Node() { next = nullptr; } }; class LinkedList { public: void insert(Node *&head, int data) { if (!head) { head = new Node; ...
ALGO
0.999869
4.756612
597859ac-fc55-4be2-9746-0b9ccaec14ac
alex-kity/optimization-Registration
3rdpart/gtsam/gtsam/discrete/DiscreteJunctionTree.cpp
/** * @file DiscreteJunctionTree.cpp * @date Mar 29, 2013 * @author Frank Dellaert * @author Richard Roberts */ #include <gtsam/inference/JunctionTree-inst.h> #include <gtsam/discrete/DiscreteJunctionTree.h> #include <gtsam/discrete/DiscreteEliminationTree.h> namespace gtsam { // Instantiate base classes te...
ALGO
0.961128
6.934422