uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
ba398969-8d37-4e5f-94d9-9c38386fa255
adarshmishra1310/Coding
C++_Programming/Vector/Moore's_Voting_algorithm.cpp
#include <bits/stdc++.h> using namespace std; //Time complexity -> O(n) //Space complexity -> O(1) int findMajority(vector<int> v,int n) { int ans=0,cnt=1; //Find a candidate(element that appears maximum times in an array) for(int i=1;i<n;i++) { if(v[i]==v[ans]) cnt++;//whenever v[ans] appear...
ALGO
0.999972
4.567664
ea8c6735-dd31-4b56-929e-dbf5363570df
9re-pe/contest
aoj/cpp/ALDS1_9_C_mosha.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; #define MAX 2000000 #define INFTY (1<<30) int H, A[MAX + 1]; void maxHeapify(int i) { int left; int right; int largest; left = 2 * i; right = 2 * i + 1; // 自分と子の中で最大のノードを選ぶ if (left <= H && A[left] > A[i]) { ...
ALGO
0.999632
3.908524
aa02f94e-5a60-48ef-8212-211520a1bf26
HPC-Fortran2CPP/Fortran2Cpp
data/gpt-4o/readable_format_HPEC/cpp/file121.cpp
#include <stdio.h> int a[100]; void foo(int* a, int len, int value) { #pragma omp parallel for firstprivate(value) for (int i = 0; i < len; i++) a[i] = value; } int main() { foo(a, 100, 7); printf("%d\n", a[50]); return 0; }
ALGO
0.997475
3.291178
1deb05ef-9b60-4acb-a0b0-afd932a95c9e
pranavsindura/CompetitiveProgramming
codeforces/A/218a.cpp
#include<bits/stdc++.h> #define ll long long int #define mod 1000000007 #define eps 0.000000001 #define all(x) x.begin(), x.end() #define FASTIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); const double PI = acos(-1.0); using namespace std; int main() { FASTIO; int n, m; cin >> n >> m; ...
ALGO
0.999996
3.315329
4b2f1ba1-ceba-44bb-ad93-6ef55711ec26
Anu0825/DSA
graph/dfs_traversal.cpp
#include<bits/stdc++.h> using namespace std; void dfs(int node,unordered_map<int,bool>&visited,unordered_map<int,list<int>> &adj,vector<int> &component){ component.push_back(node); visited[node]=true; // hr connected node ke liye recursive call for(auto i:adj[node]){ if(!visited[i]){ ...
ALGO
0.999983
5.056404
01ae2006-8ac9-4cec-9ffe-7ea9eafeef91
Suikaba/procon-solved
Codeforces/Round200-249/Round205/A.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> x(n), y(n); int xsum = 0, ysum = 0; for(int i = 0; i < n; ++i) { cin >> x[i] >> y[i]; xsum += x[i]; ysum += y[i]; } if(xsum % 2 == 0 && ysum % 2 == 0) { cout << 0 << endl; ...
ALGO
0.999962
4.339037
9767be8b-9118-4449-ae83-03878b9bc6f7
0z4ck/atcoder-problems
sumitrust2019/F/main.cpp
#include <bits/stdc++.h> #define DBGln(x) do { std::cerr << #x << ": " << x << std::endl; } while (0) #define DBG(x) do { std::cerr << #x << ": " << x ; } while (0) using namespace std; const int dx[4] = {1,0,-1,0}, dy[4] = {0,1,0,-1}; template<typename T> std::ostream& operator<<(std::ostream& s, const std::vector<T>...
ALGO
0.999057
3.591981
75d13dea-08ec-4408-8524-607a799d2bba
Dynamical-Systems-Laboratory/DSL_ABM-Multitown
simulations/complete_var_reopening_study/orig_testing/templates/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 simula...
ALGO
0.995731
5.017521
4cc5aaec-f9f7-44b0-8c01-63e49c5e0dfd
1803039/CODE-FORCES
112A.cpp
///petya and strings #include<bits/stdc++.h> using namespace std; int main(){ string str1,str2; cin>>str1>>str2; long long k = 0, m = 0; for(int i = 0; i<str1.length(); i++){ str1[i] = toupper(str1[i]); str2[i] = toupper(str2[i]); } if(str1 > str2) cout<<1<<endl; else if...
ALGO
0.999995
3.661613
ba2d68e0-7dc9-41f5-959b-71ca83d1e6d5
kdhan235/kookmin_morai_camera
src/code/src/point_create_k.cpp
#include <iostream> #include <cmath> #include <vector> struct Point { double x, y; Point(double x, double y) : x(x), y(y) {} }; std::vector<Point> createPathWithCurvature(const Point& start, const Point& end, double curvature, int numPoints) { std::vector<Point> path; path.push_back(start); doub...
ALGO
0.999695
5.737716
e3b393f7-501b-4cea-9d33-5153aa2905cb
xf97/myLeetCodeSolutions
src/452.cpp
class Solution { /* 用cpp再做一遍 */ public: int findMinArrowShots(vector<vector<int>>& points) { //极端情况 if(points.size() <= 1){ return points.size(); } //排序 sort(points.begin(), points.end(), cmp); //初始化 int num = 1; int firstEnd =...
ALGO
0.999969
5.984776
959b0b52-83c6-4615-a441-461f7001ca2f
747745124/LeetCode_Daily
451.sortByFrequency.cpp
#include "header.hpp" class Solution { public: string frequencySort(string s) { unordered_map<char, int> freq; vector<pair<char, int>> a; string str = ""; for (const auto &ch : s) { freq[ch]++; } for (const auto &kv : freq) { ...
ALGO
0.999936
5.871891
73b6f22f-fbc4-4921-9ea6-5fb1b89e9ac8
yogesh584/Data-Structures-and-Algorithm
Dynamic Programming/Youtube/questions/Unique Binary Search Trees || Catalan Number/Approach1.cpp
#include <iostream> #include <vector> using namespace std; int solve(int n) { // base case if (n <= 1) return 1; int ans = 0; for (int i = 1; i <= n; i++) { ans += solve(i - 1) * solve(n - i); } return ans; } int solve(int n, vector<int> &dp) { // base case if (n <...
ALGO
0.99999
5.639792
53997737-bd25-4125-ab5c-8c3610ab99ec
GziXnine/Codewars
C++/Kyu8/Lario and Muigi Pipe Problem.cpp
/* |_______________________________________________________________________________ | @Solver : GziXnine | @Link : https://www.codewars.com/kata/56b29582461215098d00000f | @description : Given a list of unique numbers sorted in ascending order, | return a new list so that the valu...
ALGO
0.999866
5.768859
8a6b3bfe-301a-4c22-b984-45601ca91c2a
serna37/sandbox
work2/28.cpp
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } auto compress = []<class T>(vector<T> &a) -> int { vector<T> c = a; sort(c.begin(), c.end()); c.erase(unique(c.begin(), c.end...
ALGO
0.999974
4.36631
f4b01def-795c-4249-88e9-c66d367f7646
it-dieuanh/CompetitiveProgramming_bydieuanh
amstp_bangso.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int n, x, cnt = 0; signed main() { cin.tie(0) -> sync_with_stdio(0); freopen("BS.inp", "r", stdin); freopen("BS.out", "w", stdout); cin >> n >> x; int xx = sqrt(x); for (int i = 1; i <= min(n, xx); i++) { if (x % i == 0 && x / i <= n) cnt +...
ALGO
0.999639
4.374252
30ff199b-fc1a-4827-b5c7-a51662d7600d
lev-gevorgyan/Sorting
main.cpp
#include <iostream> #include "Merge Sort/Merge.h" #include "Quick Sort/Quick.h" #include "Heap Sort/Heap.h" int main() { return 0; }
ALGO
0.994093
4.368462
90de4ac8-b5ad-4ac6-a167-e02286dfa473
sakshi050505/DSAL
B5.cpp
/* Problem Statement: A book consists of chapters, chapters consist of sections and sections consist of subsections. Construct a tree and print the nodes. Find the time and space requirements of your method. */ #include <iostream> #include <cstring> using namespace std; class Node { public: string name; Node ...
ALGO
0.996424
6.147453
65f49699-5435-4e68-a451-064a4ca181b4
thienchidh/ListBaiTapCoBan_C-_-_DeBai
85_.cpp
/* Bài 85: Nhập vào tháng của 1 năm. Cho biết tháng thuộc quý mấy trong năm */ #include<bits/stdc++.h> using namespace std; int main() { return 0; }
ALGO
0.99899
4.118423
f2355259-5ab3-4b88-b743-dc7d99ced263
corngood/llvm
lib/Transforms/Scalar/SimplifyCFGPass.cpp
#define DEBUG_TYPE "simplifycfg" #include "llvm/Transforms/Scalar.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/IR/Attributes.h" #include "llvm/IR/Constants.h" #include "llvm/IR/DataLayout.h" #include ...
TOOL
0.933276
7.652504
63c3b7c0-d12a-4465-9d1d-c85a80611145
Gautam-A25/LeetCode-solutions
Stack/#1544.cpp
class Solution { public: string makeGood(string s) { stack<int> st; string ans = ""; for(char c: s){ if(!st.empty() && abs(c - st.top()) == 32){ st.pop(); } else st.push(c); } if(s...
ALGO
0.999918
6.202975
47f5704b-1546-4448-824f-8c27012bd104
anhth2808/Libs
C++/TTCS/Tuan3/bai4/main.cpp
#include <iostream> #include <vector> #include <fstream> #include <iomanip> using namespace std; struct canh { int a; // dinh trai int b; // dinh phai int value; }; // ===== prototype ===== void xuatMang2d(int arr[100][100], int n, int m); void readFile(int graph[100][100], int &V); void writeFile(vector...
ALGO
0.999683
4.203496
3beb41c3-eb64-4b85-864b-9176ca768b47
anilchoudhary/DSA
LeetCode/EC/Array/contains_duplicate_approach2.cpp
class Solution { public: bool containsDuplicate(vector<int>& nums) { sort(nums.begin(), nums.end()); for (int i = 1; i < nums.size(); i++) { if (nums[i - 1] == nums[i]) return true; } return false; } };
ALGO
0.999948
5.727176
014e06d0-dbfe-42b5-9a77-c29e6beb8752
IvayloA/HackBGProblem2
main.cpp
#include <iostream> #include <string> using namespace std; /* * Filling the array with characters from the keyboard . */ int row; int col; void fillMasive(char **matrix,int N,int M) { char b; cout<<"Enter " << N * M << " letters to the string:"; for(int i = 0; i < N; i++){ for (int j = 0; j < M; j++){ ...
ALGO
0.999623
4.178743
6c523b62-3690-43a7-afdd-2c4eb46110bc
MatheusWG/ProjetosC
Diferença.cpp
#include <stdio.h> int main(int argc, char** argv) { int DIFERENCA; DIFERENCA = (5*6)-(7*8); printf ("DIFERENCA = %d",DIFERENCA); }
ALGO
0.998961
3.822257
8c0a9be5-fa65-4eb5-843c-22d43e708f51
AranavMahalpure/LP5
bubble.cpp
#include <iostream> #include <omp.h> using namespace std; void bubbleSort(int arr[], int n, bool parallel) { for (int i = 0; i < n; i++) { int first = i % 2; #pragma omp parallel for if(parallel) shared(arr, first) for (int j = first; j < n - 1; j += 2) { if (arr[j] > arr[j + 1]...
ALGO
0.999968
5.390278
b5511ac4-a570-4c38-a2a1-56ab0417beb3
EAirPeter/algo-include
std/test.cpp
#include "ModArith.hpp" int main() { typedef ModArith<998244353, U32, U64> MA; return (int) MA::Div(100000000, 10000); }
ALGO
0.993642
4.358983
5ed21eef-7847-471e-abf8-b85a33a7d3f9
AdvTrainEvalSrcDomain/adv-train-evaluation-source-code-domain
code-imitator/data/dataset_2017/dataset_2017_8/satyaki3794/5304486_5760761888505856_satyaki3794.cpp
//satyaki3794 #include <bits/stdc++.h> #define ff first #define ss second #define pb push_back #define MOD (1000000007LL) #define LEFT(n) (2*(n)) #define RIGHT(n) (2*(n)+1) using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef pair<int, ii> iii; ll pwr(ll base, ll p, ll mod = MOD){ ll ans = 1...
ALGO
0.999984
3.816985
c2c5da87-8c72-495f-9615-8766c915084e
GTU-Contributions/CSE241_ObjectOrientedProgramming
HW05_131044084_Mehmed_Mustafa/functions.cpp
// HW05_131044084_Mehmed_Mustafa // header.h // // Created on 13/11/2015 by Mehmed Mustafa // Last Edited on 23/11/2015 by Mehmed Mustafa // Odev verildiginde BIG THREE ve namespace konulari // islenmemisti, bu yuzden isimsiz namespace kullanmadim #include "header.h" //Public of the Cell class Cell::Cell(int valX, i...
TEST
0.864774
3.850981
9ce07679-35c6-4a72-8216-05f3db609ac6
pkboe/DSA
b12str.cpp
/* 12. Write C++ program for string operations- copy, concatenate, check substring, equal, reverse and length SEA-71 STRiNG MANUPILATIONS */ #include<iostream> using namespace std; class manupilation { public: int findlen(char str[]) { int l=0,i; for(i=0;str[i]!='\0';i++) { l++; } return l; } void concat(char str1[]...
ALGO
0.994122
3.737259
07f3af9c-9961-48ac-af11-2fe14b527c66
orad-cohen/binarytree-A
Demo.cpp
/** * Demo file for the exercise on binary tree * * @author Erel Segal-Halevi * @since 2021-04 */ #include <iostream> #include <fstream> #include <sstream> #include <stdexcept> using namespace std; #include "BinaryTree.hpp" using namespace ariel; int main() { BinaryTree<int> tree_of_ints; tree_of_ints.add_r...
TEST
0.930195
6.207995
0e146cc0-d664-4aed-a596-cc2b650828e1
miguelAlessandro/CompetitiveProgramming
Codechef/trainDAG/codeforces/div1-438D.cpp
#include <bits/stdc++.h> using namespace std; const int maxN = 1e5 + 10; long long st[maxN<<2]; int maxSt[maxN<<2], minSt[maxN<<2]; int lazy[maxN<<2]; int a[maxN]; int n, m; void init(int nx, long long s, int a, int b) { st[nx] = s; minSt[nx] = a; maxSt[nx] = b; } void build(int nx=1, int l=1, int r=n) { if (l ==...
ALGO
0.999955
5.037293
59387b57-87ab-4b51-b4ad-5d89404a95cf
KanishAnand/CompetitiveCoding
Algorithms/koicost.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int lli; lli mod=1000000000; lli valu=0,size[100005],pairs=0; struct edge{ lli src; lli des; lli wt; }; vector<struct edge> ed; lli king[100005]; bool cmp(edge &a,edge &b){ return (a.wt < b.wt ); } lli find(lli val){ if(king[val] == val){ return v...
ALGO
0.999979
4.106802
1f7b6ddb-5769-4990-b54b-6b748cbeeee9
QuietkidAniket/Algorithms
sorting copy/bubblesort.cpp
#include <iostream> using namespace std; int main(){ int n; cin >> n; int arr[n]; for(int i = 0; i< n; i++){ cin >> arr[i]; } for(int i = 0; i < n -1; i++){ bool swapped = false; for(int j = 0; j < n - i -1; j++){ if(arr[j] > arr[j+1]){ swap...
ALGO
0.999964
4.741342
e617d845-dbc0-47fb-826f-dd073ac06841
mvladoi/CS-21-Data-Structures
CS 21 Data Structures/Quick Sort Program/SortedArray.cpp
/** FULL NAME: VLADOI MARIAN PENGO ACCOUNT NAME: mvladoi EMAIL: <EMAIL> FILENAME: 21-3 ASSIGNMENT 3: Quicksort DESCRIPTION: Implementing quicksort using the median of three partition and insert sort for smaller arrays CODE STATUS: I think is working/tested THE PROGRAM COMPILE WITH NO ERRORS AND WARNINGS *...
ALGO
0.999908
5.556533
beb377a9-2661-426c-b51b-2645c788fb08
amin-mamandi/gem5-tutorial-EECS645
gem5/src/systemc/tests/systemc/misc/semantic/2.3/T_2_3_4_1/T_2_3_4_1.cpp
/***************************************************************************** T_2_3_4_1.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /**************************************************************************...
ALGO
0.963419
3.122964
6401d82d-ca02-4ff6-b60b-bbfd52693e6a
vkupendar/flutter-projects
getxx/getx_demo_prac/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.997186
6.763549
9875b892-0e1f-4524-a707-e2a1eaf8a544
aff3ct/dvbs2
src/common/Module/Synchronizer/Synchronizer_frame/Synchronizer_frame_DVBS2_fast.cpp
#include <cassert> #include <iostream> #include <iterator> #include <algorithm> #include "Module/Synchronizer/Synchronizer_frame/Synchronizer_frame_DVBS2_fast.hpp" // _USE_MATH_DEFINES does not seem to work on MSVC... #ifndef M_PI #define M_PI 3.1415926535897932384626433832795 #endif using namespace aff3ct::module; ...
ALGO
0.988601
5.172292
bfc5c4f7-eb0b-4cec-ae10-8027e30b82b4
timlucos/solo2
1.1lab.cpp
/* При выполнении данной задачи вы должны сравнить библиотеки “string.h” или <cstring> (С) и <string> (С++). А) Перед main() в комментариях /* */ ответьте на вопросы и напишите соответствия С – С++ для следующих функций (причем соответствия необязательно будут в виде функций): 1) strlen - … 2) strcpy - … 3) strcmp - … ...
TOOL
0.992358
4.461294
3c547074-d1fe-4215-a8d1-76189dba571a
ANCHAL628/Leetcode-Google
0746-min-cost-climbing-stairs/0746-min-cost-climbing-stairs.cpp
class Solution { public: int minCostClimbingStairs(vector<int>& cost) { unordered_map<int,int>mp ; return min(minCost(0,cost.size(),cost,mp),minCost(1,cost.size(),cost,mp)) ; } int minCost(int currSt,int endSize,vector<int>&cost,unordered_map<int,int>&mp){ if(currSt == endSize){ ...
ALGO
0.99989
5.793817
901c0f60-a667-472f-bcb4-aeb3d0d82509
rui314/llvm
utils/PerfectShuffle/PerfectShuffle.cpp
#include <cassert> #include <cstdlib> #include <iomanip> #include <iostream> #include <vector> struct Operator; // Masks are 4-nibble hex numbers. Values 0-7 in any nibble means that it takes // an element from that value of the input vectors. A value of 8 means the // entry is undefined. // Mask manipulation funct...
ALGO
0.981293
4.598418
72f3c7be-c5eb-43f1-881e-b6e8e589ad6b
jiangyc2024/NumCSE
Assignments/Codes/IterativeMethods/ModifiedNewton/solutions/modnewt.cpp
#include <utility> #include <iostream> #include <vector> #include <cmath> #include <iomanip> #include <Eigen/Dense> using namespace Eigen; double norm(double x) { return std::abs(x); } double norm(const VectorXd & x) { return x.norm(); } /*! *! \brief Performs many steps of an iteration and terminate when converge...
ALGO
0.999982
6.865402
2ccac14c-98ed-4db1-80cd-71d5f312c733
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/MixtralExpert/top0-100/apply-operations-to-maximize-score-Solution.maximumScore/177807_Bypass.cpp
znumicc_components(i_ctx_t * i_ctx_p) { ref * pnval; ref * pstrmval; stream * s; int ncomps, expected = 0, code; cmm_profile_t *picc_profile; os_ptr op = osp; check_type(*op, t_dictionary); ...
ALGO
0.970057
3.359373
5b100de0-bfcd-4252-9562-4098ae7c8e68
eliot-exdev/boost-morphos
libs/graph/example/tiernan_girth_circumference.cpp
//[tiernan_girth_circumference #include <iostream> #include <boost/graph/directed_graph.hpp> #include <boost/graph/tiernan_all_cycles.hpp> #include "helper.hpp" using namespace std; using namespace boost; // Declare the graph type and its vertex and edge types. typedef directed_graph<> Graph; typedef graph_traits< ...
ALGO
0.998724
6.347127
85576179-b73b-4edf-a0a9-767e23cfa8ca
yogacomp/dev
Menghitung volume dan luas permukaan bola.cpp
#include <iostream> using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char** argv) { float phi=3.14; float r, vol, luas; cout<<"Masukan jari-jari: "; cin>>r; luas=((4*phi)*...
ALGO
0.962205
3.525478
900dfc35-09dd-4685-93fa-8246e66be203
shrinathasati/LeetCode
100 Days Code Challenge/Find Smallest Letter Greater Than Target.cpp
class Solution { public: char nextGreatestLetter(vector<char>& letters, char target) { int size=letters.size(); for(int i=0;i<size;i++){ if(letters[i]>target){ return letters[i]; } } return letters[0]; } };
ALGO
0.998774
5.862028
0d48b4ff-db73-465e-9d8d-69f47dc9d658
Musxeto/dsa
Stacks/reverse_string_using_stacks.cpp
#include <iostream> #include <stack> using namespace std; string reverseString(const string& input) { stack<char> charStack; for (int i = 0; i < input.length(); i++) { charStack.push(input[i]); } string reversedString; while (!charStack.empty()) { reversedString += charStack.top...
ALGO
0.884678
6.765563
07153b2d-f26f-49e3-bab4-f9d1329dec5a
prade-p/pds_2
PDS_II/vpl_02/main.cpp
#include <iostream> #include <cstddef> using namespace std; // 1) A funcao deve adicionar dez a uma variavel inteira void add10(int *n) { *n += 10; } // 2) A funcao deve comparar dois endereços, retornando true se apontarem para a mesma posicao na memoria e false caso contrario bool compare_end(int *num1, int *num...
TOOL
0.920269
4.091133
4c16720d-183f-4a0e-97b8-c93cb007a0e2
pingjuiliao/OTI
llvm-project/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate_n.pass.cpp
// UNSUPPORTED: c++03, c++11, c++14, c++17 // <algorithm> // template<input_or_output_iterator O, copy_constructible F> // requires invocable<F&> && indirectly_writable<O, invoke_result_t<F&>> // constexpr O generate_n(O first, iter_difference_t<O> n, F gen); // Since C++20 #includ...
TEST
0.915322
7.494659
a2193fd0-1ed3-474c-b542-12c9c438cc66
kaisar1232/Logic_Building
program257.cpp
//use of strcmpX to compair 2 strings #include<iostream> using namespace std; bool strcmpX(char *first, char *second) { while((*first !='\0') && (*second !='\0')) { if(*first != *second) { break; } first++; second++; } if(*first == '\0' && *se...
ALGO
0.998943
3.613269
e56857de-378a-46c6-9d5b-b2541f922f02
EmnaMnejja6/Gauss-Jordan
src/Components/Determinant/determinant.cpp
#include <iostream> #include <vector> #include <cmath> // Pour fabs using namespace std; // Fonction pour afficher la matrice void afficherMatrice(const vector<vector<double>> &matrice) { for (const auto &ligne : matrice) { for (double valeur : ligne) { cout << valeur << "\t"; ...
ALGO
0.999977
6.334343
81cffd0b-15ce-4b78-8800-35c76626f934
gracaflucas/CPP-Modules
CPP02/ex03/bsp.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* bsp.cpp :+: :+: :+: ...
ALGO
0.997268
6.018012
4b693846-b4cd-44f6-bb47-123c2705f1b1
23520761/NMLT_200_Solution_Array
UIT_23520662_BT03/Bai051/Bai051.cpp
#include <iostream> #include <cmath> #include <iomanip> #include <ctime> using namespace std; void NhapMang(int[], int&); void XuatMang(int[], int); int DemGiaTri(int[], int); int main() { int a[500]; int n; NhapMang(a, n); cout << endl; XuatMang(a, n); cout << " ||\n"; cout << "-------------------------------...
ALGO
0.998784
3.266537
abddae35-2d43-408f-a8d1-c56a6dc71b3b
Swap-Nova/Understanding-Recursion
57_Indirect_Recursion.cpp
#include<iostream> #include<stdio.h> using namespace std; // have to declare function B earlier void funB(int n); void funA(int n){ if(n>0) { cout<<n<<endl; funB(n-1); // this function will not be executed because funB is created later } } void funB(int n){ if(n>1){ cout...
ALGO
0.999737
4.711023
0504a61d-7ede-47b6-9a11-ffc1950a8afe
Arnab10/competitiveCodingGround
Striver SDE Sheet/Day 2/duplicateElement.cpp
//https://leetcode.com/problems/rotate-image/ #include<bits/stdc++.h> using namespace std; class Solution { public: int findDuplicate(vector<int>& nums) { unordered_map<int,int> maps; for(int i=0;i<nums.size();i++){ if(maps[nums[i]] == 1) return nums[i]; maps[nums[i]]++; ...
ALGO
0.999907
5.732812
52d51d92-df8a-4e6b-a0cf-f1aaeb94d3c3
Yukariko/acm
problem/9693/test.cpp
#include <iostream> using namespace std; int main() { int N; int tc=1; while(cin >> N, N) { int ans = 0; for(int i=5; i <= N; i *= 5) ans += N / i; cout << "Case #" << tc << ": " << ans << '\n'; tc++; } return 0; }
ALGO
0.998535
4.109934
2e537ec8-7aca-4767-a231-3b5b9b3addd4
Kaifislam48/Full-Course-DSA-in-Cpp-for-Placement
PrintSubArray.cpp
#include<iostream> using namespace std; void subArray(int *arr, int n){ for(int st=0; st<n; st++){ for(int end=st; end<n; end++){ //cout<<"("<<st<<","<<end<<")"<<" "; for(int i=st; i<=end; i++){ cout<<arr[i]; } cout<<", "; } co...
ALGO
0.887973
4.013957
98a1a87a-562b-4bf1-98a8-e269029defac
AndreJSON/cprog15
lab-1/assignment-4/count_if_followed_by.cpp
// .------------------------------------------------------- // | count_if_followed_by (data, len, a, b); // | // | About: Returns the number of occurances of // | a followed by b in the range [data, data+len). // '------------------------------------------------------- int count_if_followed_by (char cons...
ALGO
0.918513
3.925684
700d36da-d888-4c91-b01f-de6129ac24b1
45H15H/Security-Laboratory
CPP_codes/Crypto_Lab/Crypto_Lab/Lab_4/Q4.cpp
#include<bits/stdc++.h> using namespace std; vector<int> decToBinary(int n) { // array to store binary number int binaryNum[32]; // counter for binary array int i = 0; while (n > 0) { // storing remainder in binary array binaryNum[i] = n % 2; n = n / 2; i++; } ...
ALGO
0.9998
4.431938
65a86c90-8045-4b3a-8cdb-2d91e8db825c
Quentinjlard/M1-ProgParallele
TP1/Exercice3_2.cpp
/** * @file Exercice3_2.cpp * @author Juilliard Quentin (<EMAIL>) * @brief * @version 0.1 * @date 2023-09-22 * * @copyright Copyright (c) 2023 * */ #include <iostream> #include <thread> using namespace std; const int SIZE = 100; int T[SIZE]; void printTab() { cout << "Print tab : "; for (int i = ...
ALGO
0.997725
4.084613
ce9b5dba-d0f6-4a93-b4e6-3bd96ccc11a0
Lookingforcommit/image_processor
filters/matrix_filters/sharp.cpp
#include "sharp.h" #include <string> #include <cstdint> #include <unordered_map> #include "image.h" void SharpFilter::Apply(Image &img) { Image image_copy{img}; std::unordered_map<std::string, int32_t> img_size = img.GetSize(); RGB pixel; for (int row = 0; row < img_size["height"]; ++row) { for (int idx ...
TOOL
0.982538
5.069884
21ece66a-877d-411d-a7e7-f11b73542cb7
mayurnagrale/Codes
Recursion/LetterPermutation.cpp
#include<bits/stdc++.h> using namespace std; void solve(string inp, string op){ if(inp.length()==0){ cout<<op<<" "; return; } string op1= op; string op2= op; op1.push_back(inp[0]); op2.push_back(toupper(inp[0])); inp.erase(inp.begin()+0); solve(inp,op1); solve(...
ALGO
0.999981
3.877012
7f6f5ed2-53b6-40cc-be50-ff8711eaf4ba
ishubhranshu/code_soln
0020-valid-parentheses/0020-valid-parentheses.cpp
class Solution { public: bool isValid(string s) { stack<char> stk; for(auto &c: s) { if(c=='(' || c=='[' || c=='{') stk.push(c); else if(stk.empty() || (stk.top()=='(' && c!= ')') || (stk.top()=='{' &&...
ALGO
0.998478
6.551003
a5d1ed18-cf5e-477c-b01f-80642de3aa80
chennuo0125-HIT/test
ceres_g2o_comparer/third_party/g2o/g2o/core/optimization_algorithm_dogleg.cpp
#include "optimization_algorithm_dogleg.h" #include <iostream> #include "batch_stats.h" #include "block_solver.h" #include "g2o/stuff/timeutil.h" #include "solver.h" #include "sparse_optimizer.h" using namespace std; namespace g2o { OptimizationAlgorithmDogleg::OptimizationAlgorithmDogleg( std::unique_ptr<Block...
ALGO
0.999894
7.029307
72289750-9135-42a5-8051-3a74042d35f8
pranavms13/Rixe
src/cryptonote_basic/hardfork.cpp
#include <algorithm> #include <cstdio> #include "cryptonote_basic/cryptonote_basic.h" #include "blockchain_db/blockchain_db.h" #include "hardfork.h" #undef MONERO_DEFAULT_LOG_CATEGORY #define MONERO_DEFAULT_LOG_CATEGORY "hardfork" using namespace cryptonote; static uint8_t get_block_vote(const cryptonote::block &b)...
ALGO
0.990936
6.713458
beee5dbb-f15a-4329-adaa-a94fd9522766
kaziabdullahfuad/Codeforces-Grind
upsolving/nastyaandrice.cpp
#include<iostream> #include<cmath> #include<algorithm> #include<string> #include<vector> #include<set> #include<unordered_set> #include<unordered_map> #include<map> using namespace std; #define ll long long #define endl "\n" #define debug(x) cout<<#x<<":"<<x<<endl; #define all(x) (x).begin(),(x).end() template<typename...
ALGO
0.999513
3.781845
d694cc5f-92bf-4fa4-8187-e1a6d111c2f0
HabanaAI/Intel_Gaudi3_Software
synapse/src/graph_compiler/flash_attention_scheduler.cpp
#include "gaudi_max_path_scheduler.h" #include "bundle_plane_graph.h" #include "flash_attention_scheduler.h" std::optional<bool> FlashAttentionComparator::compareFlashAttentionChains(const NodePtr& n1, const NodePtr& n2) const { if (n1 == nullptr) return false; if (n2 == nullptr) return true; // Prioritiz...
ALGO
0.998365
6.456965
03086349-5b0a-473e-9164-f5829bf4c9e2
arcticmatt/CS2
cs2_week8/orbits/src/EulerIntegrator.cpp
/** * @file EulerIntegrator.cpp * @author Ellen Price <<<EMAIL>>> * @version 1.0 * @date 2013-2014 * @copyright see License section * * @brief Functions that carry out numerical integration. * * @section License * Copyright (c) 2013-2014 California Institute of Technology. * All rights reserved. * * Redist...
ALGO
0.999744
6.345528
b77c8573-ca2b-4eb4-b909-48c50082a86d
SwitchGDX/switch-gdx
switch-gdx/res/Box2D/Collision/b2CollideCircle.cpp
#include <Box2D/Collision/b2Collision.h> #include <Box2D/Collision/Shapes/b2CircleShape.h> #include <Box2D/Collision/Shapes/b2PolygonShape.h> void b2CollideCircles( b2Manifold* manifold, const b2CircleShape* circleA, const b2Transform& xfA, const b2CircleShape* circleB, const b2Transform& xfB) { manifold->pointCou...
ALGO
0.99935
7.760263
0d17aeaa-bf0f-4e03-a25c-c9a1f6227af7
maruf-ux/learn-algorithm
array/swap_max_min.cpp
#include <iostream> #include <limits.h> using namespace std; void swapMinMax(int arr[], int size) { int min = INT_MAX; int max = INT_MIN; int minAdd = 0; int maxAdd = 0; for (int i = 0; i < size; i++) { if (arr[i] < min) { min = arr[i]; minAdd = i; ...
ALGO
0.999887
5.291244
8fe7210f-29ff-473c-81eb-538e42bbda76
joydevhati1998/Data-Structure-and-Algorithm-Specialization-Coursera-University-of-califonia-san-diego-
algo on graphs/week3/bfs.cpp
/* Munir Jojo - Verge 05 / 04 / 2018 Coursera 00 - Algorithms and Data Structures 03 - Algorithms on Graphs Week 3 - Paths in Graphs 1 01 - BFS */ // Only for Visual Studio implementation //#include "stdafx.h" #include <iostream> #include <vector> #include <queue> using std::vector; using std::queue; using namesp...
ALGO
0.999984
5.077324
48c4120d-be84-4139-b4b9-3a20e1946ecc
nikhil-x24/DSA_Practics
Day_46-Stack3/1-nextPrev_smllr_Indx.cpp
#include<iostream> #include<vector> #include<stack> using namespace std; vector<int> nextSmaller(vector<int> arr, int n) { stack<int> s; s.push(-1); vector<int> ans(n); for(int i=n-1; i>=0 ; i--) { int curr = arr[i]; while(s.top() != -1 && arr[s.top()] >= curr) { s.pop(); ...
ALGO
0.999995
5.239188
5bdb70d4-2eca-4154-8716-81d03c69eaa4
yergen/leetcode
3SumClosest/3SumClosest.cpp
#include<iostream> #include<vector> #include<algorithm> #include<cmath> using namespace::std; class Solution { public: int threeSumClosest(vector<int>& nums, int target) { int n = nums.size(),result=nums[0]+nums[1]+nums[2]; sort(nums.begin(), nums.end()); for (int i = 0; i < n - 2; i++) { if (i>0 && nums[i...
ALGO
0.999999
5.685506
485761fc-d38b-4980-9150-db66beb4bca7
zqw-hooper/apollo_and_-autoware_path_planner
Apollo_PiecewiseJerk_algorithm/Ipopt-3.12.7/Ipopt/tutorial/CodingExercise/Cpp/3-solution/TutorialCpp_main.cpp
// This file is part of the Ipopt tutorial. It is a correct version // of a C++ implemention of the coding exercise problem (in AMPL // formulation): // // param n := 4; // // var x {1..n} <= 0, >= -1.5, := -0.5; // // minimize obj: // sum{i in 1..n} (x[i]-1)^2; // // subject to constr {i in 2..n-1}: // (x[i]^2+1....
ALGO
0.999848
5.851004
0c54a0a4-e120-4966-97ee-ba95f8cc266f
leokang123/Algorithm
2.3.DP/정삼re.cpp
#include <bits/stdc++.h> using namespace std; #define MAX 501 int arr[MAX][MAX]; int main(void) { cin.tie(nullptr); ios::sync_with_stdio(false); int n ; cin >> n; for(int i = 1 ; i <= n ; i++) { for(int j = 0 ; j < i ; j++) { cin >> arr[i][j]; } } for(int i = n ; i...
ALGO
0.999676
3.44684
79661e84-7f7f-4936-9347-9b0f8675f337
disconcision/depthop
shared/eigen/failtest/qr_int.cpp
#include "../Eigen/QR" #ifdef EIGEN_SHOULD_FAIL_TO_BUILD #define SCALAR int #else #define SCALAR float #endif using namespace Eigen; int main() { HouseholderQR<Matrix<SCALAR,Dynamic,Dynamic> > qr(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10)); }
TEST
0.921536
3.076401
7189c611-3471-448a-a27c-8e3fd209e115
wirelessUser/DSA_Par_2
Section-1/Assi-5 Insert OR Remove a Node at given position from beginning.cpp
#include <iostream> using namespace std; class Node { public: int data; Node *next; }; class LinkedList { private: Node *head; public: LinkedList() { head = NULL; } void add(int _data) { Node *node = new Node(); node->data = _data; node->next = NULL; ...
ALGO
0.988984
4.385006
d985f187-c323-4f30-bbda-bab4914aab85
Statistics-of-Subsequences/PaperMaterials
eigen-3.4.0/bench/sparse_setter.cpp
//g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out //g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.05 -DSIZE=2000 && ./a.out // -DNOGMM -DNOMTL -DCSPARSE // -I /home/gael/Coding/LinearAlgebr...
ALGO
0.979048
4.145121
aad929f8-7967-4302-8244-d85521308fb1
CarlosDLMC/Algorihtms_and_Data_Structures
ThirdLesson/main.cpp
#include <iostream> #include <vector> using namespace std; void rotate(vector<int>& nums, int k) { int s = nums.size(); vector<int> res; k %= s; if(s > 1){ for(int i = s - k; i < s; i++){ res.push_back(nums.at(i)); } for(int j = 0; j < s - k; j++){ res.push_back(nums.at(j)); } nums = re...
ALGO
0.999741
5.057171
9a5a7a42-7be4-4f37-859b-fa6f7680f139
joginderNrajput/Leetcode-Problems
Grouping Of Numbers - GFG/grouping-of-numbers.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 maxGroupSize(int arr[], int N, int K) { vector<int> temp(K, 0); for(int i=0; i<N; i++){ int re...
ALGO
0.99989
5.421101
96f9a1ba-9f2a-4dc1-af2e-f4d63d7795e3
connieya/cpp_algorithm
boj/impl/11021_1.cpp
#include <cstdio> int a,b,t,i; int main() { scanf("%d" ,&t); for(; i<t; i++){ scanf("%d%d",&a,&b); printf("Case #%d: %d\n",i+1,a+b); } }
ALGO
0.996672
3.973626
7de70e51-b9b4-4078-b718-50efe6ac0fff
CGAL/cgal-dev
Weights/examples/Weights/coordinates_one_query.cpp
#include <CGAL/Simple_cartesian.h> #include <CGAL/Weights/discrete_harmonic_weights.h> // Typedefs. using Kernel = CGAL::Simple_cartesian<double>; using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; int main() { // Create a polygon and a query point. const std::vector<Point_2> polygon...
ALGO
0.998896
6.869913
9e9906d9-5955-422b-8515-ed6e55b94252
muyuuuu/OnlineJudgeSolutions
PAT/乙级/1020.cpp
// 3 20 // 18 15 10 // 75 72 45 #include "iostream" #include <vector> #include <algorithm> #include <numeric> using namespace std; int main() { int cla, num; scanf("%d%d", &cla, &num); vector<float> sto, cost; vector<float> pri; float money = 0; int j = 0; for (int i = 0; i < cla; ++i) { cin>>j; sto.push_b...
ALGO
0.999702
3.02309
0edbc844-6955-4cc3-826f-ef1867220ffd
scnb/Cpp-Primer-Plus-Exercise
16-5/16-5.cpp
// 16-5.cpp : ̨Ӧóڵ㡣 // /* reduce()ã ٶ ɾظֵ ۷ԪصĿ ҪʹSTLдú Ҫʹģ庯 template<class T> int reduce(T ar[],int n); */ #include "stdafx.h" #include <iostream> #include <algorithm> #include <string> #include <vector> using std::cin; using std::cout; using std::endl; using std::string; using std::unique; using std::vector; tem...
ALGO
0.999364
4.11978
8e2046a1-5910-4b08-a74f-5bf9e16033b6
ayush4518/DSA-CPP
Pointers/swap_byptr.cpp
#include<iostream> #include<limits.h> #include<math.h> using namespace std; void swapping(int *p1,int *p2)// pass by pointer { int temp=*p1; *p1=*p2; *p2=temp; cout<<p1<<endl; cout<<p2<<endl; } int main(){ int first=10; int second=20; swapping(&first,&second); cout<<first<<" "...
ALGO
0.999479
3.55202
719c3cec-a185-455f-be70-e6009023106f
aditya13902/Leetcode
162-find-peak-element/162-find-peak-element.cpp
class Solution { public: int findPeakElement(vector<int>& nums) { int l=0; int r=nums.size()-1; while(l<r){ int m=(l+r)/2; if(nums[m]<nums[m+1]){ l=m+1; } else{ r=m; } } return l; ...
ALGO
0.999858
5.611547
303339e3-3214-4481-a9ec-4566857e61c7
BCAPATHSHALA/DSA-SUPREME-2-0-NOTES
DSA SUPREME 2.0 CODES/44. CLASS CODE/PROBLEM5.CPP
// 6. Convert array to heap /* Creation of heap using array: Time Complexity: O(N), Where N is number of elements in array Space Complexity: ? */ #include <iostream> using namespace std; // Heapify using recursion void heapify(int *arr, int size, int index){ int leftIndex = 2*index; int rightIndex = 2*index+...
ALGO
0.999698
5.568593
e01756b2-90ce-47e5-8106-d5e696d1a724
Saieiei/Leetcode
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence/1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence.cpp
class Solution { public: int isPrefixOfWord(string sentence, string searchWord) { // Split the sentence into words istringstream stream(sentence); string word; int index = 1; // 1-based index while (stream >> word) { // Check if the word starts with the s...
ALGO
0.999892
6.364229
3a0ad985-6506-4b90-8eb5-a897dc2d74bd
niveditaprity/Competitive-Programming-Data-Structure
Recursion/pattern.cpp
#include <iostream> using namespace std; void print(int n) { if(n<0) { cout<<n<<" "; return; } cout<<n<<" "; print(n-5); cout<<n<<" "; } int main() { print(16); return 0; }
ALGO
0.999785
3.286209
930b927a-31d6-4e68-b9b3-23c2646b7237
AsTonyshment/ABACUS_MC
tools/SIAB/SimulatedAnnealing/source/src_spillage/Calculate_C4.cpp
//========================================================== // AUTHOR : mohan // DATE : 2009-03-18 ( version 1.0 ) // 2009-04-14 ( version 1.1 ) // 2009-05-19 change file name //========================================================== #include "Calculate_C4.h" #include "tools.h" int Calculate_C4::test = 0; Calculat...
ALGO
0.99754
3.357947
33d3062a-d81a-4a14-9f2b-a2d553cd0d93
BangYOKS/21102128_S1IF-09-TI2_ppb2324-2
praktikum_05/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.998892
6.763549
73b7a178-05dc-40fe-b53c-6efb5d6650a4
chunfan119/junfan_student
APCS/20250801/f314/main.cpp
#include <bits/stdc++.h> using namespace std; int main() { // ifstream f("t.txt"); // if(f) cin.rdbuf(f.rdbuf()); // else cout<<"asd"; int m,n; cin>>m>>n; vector<vector<int>> dp(m+1,vector<int>(n+1)); for(int i=1;i<=m;i++){ vector<int> vec(n+1),l(n+1),r(n+1); for(int j=1;j<=...
ALGO
0.999983
3.607169
55c8228e-5bb6-48b9-90f8-4a31092f0366
henry-macarthur/CS32
ZombieDash/Actor.cpp
#include <iostream> #include "Actor.h" #include "StudentWorld.h" using namespace std; int verticalDirection(int y, int y2) { int yD = y - y2; if(yD > 0) return 90; else return 270; } int horizontalDirection(int x, int x2) { int xD = x - x2; if(xD > 0) return 0; else ...
TOOL
0.872067
4.93853
23310c8b-7223-44cf-9abf-fbf194523307
BME-MIT-IET/iet-hf2021-kamikaze-csuszda-1
code/unclassified/src/autobiographical_numbers/autobiographical_numbers.cpp
// Part of OpenGenus Cosmos #include <iostream> #include <string> #include <unordered_map> int main() { std::string s2 = "22535320"; // Input string // string s2 = "72100001000"; // Uncomment this for a "TRUE" answer example. std::unordered_map<int, int> indexCounter; std::uno...
ALGO
0.992537
4.450107
6a06f986-636c-42be-9f1b-a71f9c12f3e3
DWWC-22BCSKPIT-901/day-2-assignments-Nikhil7707
DAY-2/Q_1EASY.cpp
// EASY /*Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The relative order of the elements should be kept the same. Then return the number of unique elements in nums.*/ #include <iostream> #include <algorithm> using namespace ...
ALGO
0.999977
6.440867
3cd891d3-cdff-412f-b79c-a08d475fc1d8
RafaelChavesPB/Codeforces
contests/educational154/c.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using Vi = vector<int>; using Vl = vector<ll>; #ifdef EBUG #define bug(x) { cout << "*** " << #x << " " << x << '\n' << flush; } #define bug2(x,y) { cout << "*** " << #x << " " << x \ << " " << #y << " " << y << '\n' << fl...
ALGO
0.999986
3.99875
c30b8a36-a64b-459c-b981-b6b31919f0e3
mdshoeb2050/let-us-C
YKchap4/1leapyrlogicalOP.cpp
#include<iostream> using namespace std; int main(){ int yr; cout<<"Enter a Year:"<<endl; cin>>yr; if(yr%400==0 || yr%100!=0 && yr%4==0){ cout<<"Leap Year."<<endl; } else{ cout<<"Not A Leap Year."<<endl; } return 0; }
ALGO
0.999376
3.230154
6a25057c-7c1a-4bd0-af18-6b2a6905470c
m1cjey/hyper
surface_judge.cpp
#include"stdafx.h" using namespace std; //\ʔ֐ //***********nbVTΑȂHHH //ěvZpɃJX^}CYi2012-11-05j void freeon(elastic &ELAST, vector<mpselastic> &PART, double n0_4,int *INDEX,int **MESH, double *mindis, int t) { //:freeon֐ł͊eq̗qx߂ƂƂɁAꂽx\ʔsB܂AŒᗱqԋ‚łɂƂ߂Ă //freeon2xÂԂ񉻂eՁB double re=ELAST.get_re()*ELAST.get_distanceb...
ALGO
0.991175
3.190748
6dc5156a-cefb-4a6b-949a-cafb0e9ad8d2
YuanyaoZHU/AbaqusDll_vs_2022
eigen-3.4.0/unsupported/doc/examples/MatrixExponential.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { const double pi = std::acos(-1.0); MatrixXd A(3,3); A << 0, -pi/4, 0, pi/4, 0, 0, 0, 0, 0; std::cout << "The matrix A is:\n" << A << "\n\n"; std::cout << "The matrix exponential ...
ALGO
0.999733
3.706936
cbf36b3b-09bf-4333-b5e2-014a69b5f65b
M-Shariq-546/PF-Assignment
5 program.cpp
#include<iostream> using namespace std; void max(int x, int y , int z) { if (x >= y) { //if x is greater than y if (x >= z) // then x is must be greater than z cout << "Largest number: " << x; // if both upper condition satisfies then x printed. else //unlike 2nd condit...
ALGO
0.999532
3.370946