uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
a0a404f3-28b0-4aba-b684-c895d2902878
joseneto0/G4M3
P0155.cpp
#include <bits/stdc++.h> using namespace std; int n, m; tuple<char, int, int, int> infos; vector<int> root(n+1); int find(int x){ while() } void unionn(int a, int b){ int x = find(a); int y = find(b); } int main(){ ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); cin >> n >> m; ...
ALGO
0.99984
4.037732
8c766ebb-2b88-431d-9819-3857aa4bec03
Nidhipatel0824/Nidhi_Monstack
Assigement/C++/MODULE_3.2/Q12_swap_twono_friend_fun.cpp
//Write a program to swap the two numbers using friend function without using third variable #include<iostream> using namespace std; class Swap { public: int a,b; public: friend void swap(Swap obj); }; void swap(Swap obj) { obj.a=23; obj.b=45; obj.a=obj.a+obj.b; obj.b=obj.a-obj.b; obj.a=obj.a-obj.b; cout...
ALGO
0.998058
5.178108
5ada5206-1652-4024-9b89-10249d96b062
ksvkabra/learn-cpp
basicPointer.cpp
#include <iostream> using namespace std; int main() { int a = 10; int *ptr; ptr = &a; cout << a << endl; cout << &a << endl; cout << &ptr << endl; cout << ptr << endl; cout << *ptr << endl; }
ALGO
0.969338
3.021845
74e9c334-5361-40e8-9f76-c15b37c6de5c
g932150283/leetcode
mycode/31单调栈/496.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: vector<int> nextGreaterElement(vector<int>& nums1, vector<int>& nums2) { stack<int> s; vector<int> res(nums1.size(), -1); if(nums1.size() == 0){ return res; } // key 元素 value 下标 unord...
ALGO
0.99998
5.428558
a2753749-a7f9-4d15-affe-f220e479a043
Mahesh-Pawar-02/Industrial-Programming-Logics
C++ Programming/Program163.cpp
#include<iostream> using namespace std; class Digits { private: int iNo; public: Digits(int x) { iNo = x; } // Logics }; int main() { int iValue = 0, iRet = 0; cout<<"Enter the number : "<<endl; cin>>iValue; Digits nobj(iValue); retur...
ALGO
0.998494
4.325648
1f13b15b-e4f4-443c-b7e2-44aad009308d
sarvex/leetcode-pascal
solution/0100-0199/0101.Symmetric Tree/Solution.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.999966
6.873504
c39923d8-795b-42e7-9224-8f575c2deb9e
goldenfishs/Robocon2024_R2
src/rm_navigation/teb_local_planner/teb_local_planner/src/recovery_behaviors.cpp
#include "teb_local_planner/recovery_behaviors.h" #include <rclcpp/rclcpp.hpp> #include <limits> #include <functional> #include <numeric> #include <g2o/stuff/misc.h> namespace teb_local_planner { // ============== FailureDetector Implementation =================== void FailureDetector::update(const geometry_msgs::ms...
ALGO
0.971241
6.425395
fee0bd75-3c27-4c3d-ac98-c708e9d65dc7
klabertants/mipt-algo-2016
Homeworks/Task6/Max/H.cpp
#include <iostream> #include <vector> #include <algorithm> std::vector<size_t> prefixFunc (std::string str) { size_t n = str.size(); std::vector<size_t> pi(n); for (int i = 1;i < n;++i){ size_t j = pi[i - 1]; while (j > 0 && str[i] != str[j]){ j = pi[j - 1]; } if...
ALGO
0.999952
4.594907
eb718769-38b9-4873-aed4-a8c31031c9e4
jesushilarioh/DelMarCSi.cpp
Projects/Lab7-math-tutor/2.practice-subtraction.cpp
//************************************** // 2. Practice Subtraction // // By: Jesus HIlario Hernandez // Last updated: Octobe 31, 2016 //************************************** #include <iostream> #include <cstdlib> // For rand and srand #include <ctime> // For the time function using namespace std; int mai...
ALGO
0.978489
4.156459
7070c995-4814-4a94-a17c-301db6f06f3d
Himel-Sarder/Problem-Solving
GeeksForGeeks/Insert in a Sorted List.cpp
class Solution{ public: // Should return head of the modified linked list Node *sortedInsert(struct Node* head, int data) { Node* newNode = new Node(data); if (!head || data < head->data) { newNode->next = head; return newNode; } Node* current = hea...
ALGO
0.999976
5.570765
9273dd07-7498-48b7-8aff-89d7491f9e17
Moksh081/Leetcode_Codeforces
ceil_floor_ofarr.cpp
#include <iostream> using namespace std; void search(int nums[], int size, int target) { int low = 0; int high = size - 1; int x = -1; // Initialize x to -1 to indicate no floor found int y = -1; // Initialize y to -1 to indicate no ceiling found while (low <= high) { int mid = low + (high...
ALGO
0.999979
5.888611
9b246073-0066-4b6f-820b-35a2fc27b3d8
gayasha754/DSA
Queue.cpp
#include <iostream> using namespace std; //implementation of queue using arrays //prototyping the functions void enqueue(); bool isFull(); bool isEmpty(); void dequeue(); int peek(); void display(); //declaring the array rear-> _ _ _ _ _ <- front //Global variables and array int maxSize = 5; int queue[5]; int fro...
ALGO
0.997227
3.597168
6a996653-b085-4bf3-9577-0c8d24700b64
ishandutta2007/codeforces
xellos/normal/1344/B.cpp
// iostream is too mainstream #include <cstdio> // bitch please #include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <list> #include <chrono> #include <random> #include <cstdlib> #include <cmath> #include <ctime> #include <cstring> #include ...
ALGO
0.999956
3.615975
d69ae1cc-080c-4122-be2e-b3bf2a22ae8b
ishandutta2007/codeforces
qwqcorz/normal/1391/E.cpp
#include<bits/stdc++.h> #define ll long long using namespace std; const int N=5e5+5; ll read(){static ll x;scanf("%lld",&x);return x;} void write(ll x){printf("%lld",x);} void print(ll x,char c='\n'){write(x),putchar(c);} bool vis[N]; int deep[N],fa[N]; vector<int>e[N],a[N]; void clear(int n){for (int i=1;i<=n;i++) e...
ALGO
0.999809
4.067978
6a6c1b65-abc8-42f6-9ffa-53448d79293b
AxonDragonScale/Algorithms
Linked Lists/Remove Nth node from the end.cpp
// https://www.interviewbit.com/problems/remove-nth-node-from-list-end/ // Given a linked list, remove the nth node from the end of list and return its head. // For example, Given linked list: 1->2->3->4->5, and n = 2. // After removing the second node from the end, the linked list becomes 1->2->3->5. // If n is great...
ALGO
0.999743
6.22304
88f9f31f-6255-4f45-9e28-96b18379286b
PaukIsUha/optimizing_formating_code
predictions/submissions-aizu-coop-gpt35/Codenet/p01694/178411908/response_5.cpp
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int n; while (cin >> n, n) { int ans = 0; string now = "", next; int nowCode = -1, nextCode; for (int i = 0; i < n; ++i) { cin >> next; if (nowCode == 0 && nextCode == 1) ans++; else ...
ALGO
0.998642
3.417337
756e1aa0-03ec-407e-8e30-381a1d63cde2
CKlittleluck/C
21.7-22.2/21.7-22.2/test.cpp
class Solution { public: int StrToInt(string str) { const int len = str.length(); if (len == 0) return 0; int i = 0; while (i < len && str[i] == ' ') { ++i; } // ųͷĿո if (i == len) return 0; if (!isdigit(str[i]) && str[i] != '+' && str[i] != '-') return 0; bool neg = str[i] == '-' ? true : false; i = i...
ALGO
0.998899
4.944771
293057e0-d2e7-4f4b-baa1-4877844b3b8d
kassem3/cpp
#71 max_num_using_arrays.cpp
/* Write a Program that determines the maximum value among a set of user-input numbers */ #include<iostream> using namespace std; int findMAX(int arr[], int num) { int max = arr[0]; for(int i = 1; i < num; i++) { if(arr[i] > max) { max = arr[i]; } } return max; } in...
ALGO
0.999253
4.674397
fd855ac3-484d-430e-99f2-be612799f276
jluisdeveloper/UCSP
ADA/C++/DynamicPrograming/mochila.cpp
#include <bits/stdc++.h> using namespace std; // vivimos enganhados vector de vector es muy costoso :x :'( se acabo el suenho XD int mochila(int capacidad, vector<int>peso, vector<int>beneficio, int cant_objs){ vector<vector<int>> resultMt; resultMt.assign(cant_objs + 1, vector<int>(capacidad + 1, 0));...
ALGO
0.999933
4.709113
f057367a-8511-4a36-a49f-b9772c40e383
copydev/CodeForces
ROund606/D.cpp
#include <bits/stdc++.h> using namespace std; #define ll long #define REP(i,n) for(ll i = 0;i<n;++i) void reverseStr(string& str) { ll n = str.length(); for (ll i = 0; i < n / 2; i++) swap(str[i], str[n - i - 1]); } int main() { ll t; cin>>t; while(t--){ ll n; cin>>n; vector<stri...
ALGO
0.999724
3.91963
3b143a6f-ddea-41c4-b06b-59911295464c
singh651/Coding-Journey
Striver_Arrays/Missing Number using XOR.cpp
#include <bits/stdc++.h> using namespace std; int missingNumber(vector<int>&a, int N) { int xor1 = 0, xor2 = 0; for (int i = 0; i < N - 1; i++) { xor2 = xor2 ^ a[i]; // XOR of array elements xor1 = xor1 ^ (i + 1); //XOR up to [1...N-1] } xor1 = xor1 ^ N; //XOR up to [1...N] retur...
ALGO
0.999694
4.984014
9f5b6732-242a-4f25-bc7c-9a2902bfc108
chrisdembia/coin
Cbc/Cbc/src/CbcNode.cpp
/* $Id: CbcNode.cpp 2272 2016-02-22 00:12:18Z tkr $ */ #if defined(_MSC_VER) // Turn off compiler warning about long names # pragma warning(disable:4786) #include <windows.h> // for Sleep() #ifdef small #undef small #endif #else #include <unistd.h> // for usleep() #endif #include "CbcConfig.h" #ifdef COIN_HAS_NTY #i...
ALGO
0.921786
4.320918
2a2c5c36-d9de-4d4f-b686-8d403b43e975
v195360/truco_nato
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
283e21ad-1ce2-47c6-ba42-244ed5d753cd
pedrohp-machado/MaratonaProgramacao
Aula8/fractions/main.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int level; cin >> level; int a = 0, b = 1; while(level--){ int aux = b; b += a; a = aux; } cout << b << endl; return 0; }
ALGO
0.999964
3.470115
ec14b4df-5446-4218-8044-457f92b906cf
BEaANIKET/DSA
0039-combination-sum/0039-combination-sum.cpp
class Solution { public: vector<vector<int>> result; void solve(vector<int>& can, int index, int target, vector<int>& ans) { if (target == 0) { result.push_back(ans); return; } if (index >= can.size() || target < 0) { return; } ans....
ALGO
0.999977
6.616969
b51d28f6-4d53-4944-b5a5-bb517fd908df
bartvbl/Shapebench
lib/CGAL-5.6.1/examples/Jet_fitting_3/Single_estimation.cpp
#include <CGAL/Simple_cartesian.h> #include <CGAL/Monge_via_jet_fitting.h> #include <fstream> #include <vector> typedef double DFT; typedef CGAL::Simple_cartesian<DFT> Data_Kernel; typedef Data_Kernel::Point_3 DPoint; typedef CGAL::Monge_via_jet_fitting<Data_Kernel> My_Monge_via_jet_fitting;...
ALGO
0.997796
5.840753
57fc8e6c-9d0d-446c-ad57-dbb07cc59a38
FAUtonOHM2017/aadc2017
FTO_MoveToPoint/bezier.cpp
#include "bezier.h" #include <cstring> #include "stdafx.h" bezier::vec2 bezier::getBezierPoint( bezier::vec2* points, int numPoints, float t) { //LOG_WARNING(cString::Format("bezier::vec_x %f, vec_y %f, numPoints %d, t %f",vec2[0].x, vec2[0].y, numPoints, t)); bezier::vec2* tmp = new bezier::vec2[numPoints]; ...
ALGO
0.997851
4.120909
8f6a6413-b0d1-4d03-9ad1-2ea88c3e7f95
yashsoni501/Competitive-Programming
Codechef/MAXEXPR.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define ff first #define ss second #define pb push_back #define pf push_front #define mp make_pair #define pu push #define pp pop_back #define in insert #define MOD 1000000007 #define endl "\n" #define sz(a) (int)((a).size()) #define all(x) (x).begin(),...
ALGO
0.999552
3.039728
c82ff2f3-99ee-4592-a9cd-829af5663753
ishandutta2007/codeforces
eliden/normal/NA/275.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i=a;i<b;++i) #define debug(x) cerr<<#x<<": "<<x<<endl #define sz(x) (int)(x).size() using ll = long long; using vi = vector<int>; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int MAXA=102; vi count(MAXA,-1); int...
ALGO
0.999999
3.549607
e6970d56-8462-4d52-9e87-b916c81d309e
S1amyak/dsa_cpp
reverse array.cpp
#include <iostream> using namespace std; // reverse array void printArray(int arr[], int size) { for (int i = 0; i < size; i++) { cout << arr[i] << " "; } cout << endl; } void reverse(int arr[], int size) { int start = 0; int end = size - 1; while (start <= end) { swap(a...
ALGO
0.995547
4.945629
6bcd5ac5-a594-40c1-903b-ce9a34776fa6
manikanta2901/ubuntu
.history/codingChallenges/cpp/Codechef/longChallenges/july/temp_20200707235649.cpp
#include<bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #include<unordered_map> #define F first #define S second #define MP make_pair #define EXECUTE_FASTER ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define ...
ALGO
0.999985
3.967985
e43e3911-3478-418b-99db-4d8e4127f756
S4ltF1sh/SPOJ
P165SUMI_ROUND_5I.cpp
//P165SUMI - ROUND 5I - Cộng trừ #include <iostream> #include <vector> #include <string> #include <cmath> #include <algorithm> #include <stack> using namespace std; int main() { long long n; cin >> n; if (n % 2 == 0) cout << n / 2; else cout << "-" << n / 2 + 1; return 0; }
ALGO
0.999965
4.024556
c66dd19c-ed27-4d5a-8d55-af9433174f7c
Himanshu12211967/Leetcode
0090-subsets-ii/0090-subsets-ii.cpp
class Solution { public: void solve(vector<int> &nums, int idx, vector<int> temp, vector<vector<int>> &ans){ if(idx == nums.size()){ ans.push_back(temp); return; } if(idx > 0 && temp.size() > 0 && nums[idx] == temp[temp.size()-1]){ temp.push_back(nums[i...
ALGO
0.999984
5.9813
5128e60b-0c67-4874-9699-957ab6aa5356
honeyvikash/Leetcode_Solved_Problems
0950-reveal-cards-in-increasing-order/0950-reveal-cards-in-increasing-order.cpp
class Solution { public: vector<int> deckRevealedIncreasing(vector<int>& deck) { vector<int> v1(deck.size()); sort(deck.begin(),deck.end()); deque<int> dq; for (int i=0;i<deck.size();i++) { dq.push_back(i); } int i=0; while(dq.empty()==0) ...
ALGO
0.99999
6.054876
8e822f7a-8d5c-45a6-9c2e-5956af5956c8
KaueAmorim/Competitive-Programming
Beecrowd/2333-Pizza.cpp
#include <bits/stdc++.h> using namespace std; #define _ ios_base::sync_with_stdio(0);cin.tie(0); #define dbg(x) cout << #x << " = " << x << endl #define f first #define s second typedef long long ll; const int INF = 0x3f3f3f3f; const ll LINF = 0x3f3f3f3f3f3f3f3fll; int main(){ _ int n; cin >> n; i...
ALGO
0.999983
3.491449
2c701a78-2b97-412d-810c-879eda07fd53
hebowen325/Leetcode
PAT1144.cpp
#include<iostream> #include<algorithm> using namespace std; int Arr[1000000]; int main() { int c=1; int N,t; scanf("%d",&N); for(int i=0;i<N;i++) { scanf("%d",Arr+i); } sort(Arr,Arr+N); for(int i=0;i<N;i++) { if(Arr[i]<=0) { continue; } ...
ALGO
0.999927
3.691958
b6054e5d-5963-412c-89a7-f1da8bb71200
sir-rasel/Online_Judge_Problem_Solve
toph/implementation/digit-seperation.cpp
#include <bits/stdc++.h> using namespace std; int main(){ char str[1002]; int sum; while (scanf("%s",str)!=EOF){ sum=0; for (int i=0;str[i]!='\0';i++) sum+=str[i]-'0'; printf("%d\n", sum); } return 0; }
ALGO
0.998605
3.837475
2c18ef42-0833-4ec7-bc0a-30ed86bf0414
normy121/ITSA
math_05.cpp
#include <iostream> #include <iomanip> using namespace std; int main(){ double num; cin >> num; double result = num * num; result = result * 100; if(((int)result % 10) >= 5){ result += 5; } result = result / 100; cout << fixed << setprecision(1) << result << endl; return 0; }
ALGO
0.999666
3.180738
a290470b-6f27-4001-86fa-0fe97b4a6370
SagHack/TrabajoPSCD
TRABAJO_PRUEBAS/workers.cpp
//WORKER #include <iostream> #include "Socket/Socket.hpp" #include <fstream> #include <sstream> #include <iterator> #include <string> #include <vector> #include <algorithm> #include <thread> #include <chrono> using namespace std; const string SERVER_ADDRESS = "localhost"; const string SEPARADOR="\n"; const string DEL...
WEB
0.882789
4.196023
98ee33ab-1e86-4fab-a1b2-99e2be873e18
AbdulKreemShah2408/leetcode
0345-reverse-vowels-of-a-string/0345-reverse-vowels-of-a-string.cpp
class Solution { public: bool isVowel(char c){ c=tolower(c); return c=='a' || c=='e' || c=='i' || c=='o' || c=='u'; } string reverseVowels(string s) { int i=0, j=s.size()-1; while(i<j){ if(isVowel(s[i]) && isVowel(s[j])){ swap(s[i],s[j]); i++; ...
ALGO
0.999981
6.59173
fd50df95-7afc-4522-bc3e-f6843381853e
mushfiq-906/cp__training
Codeforces__Problems/contest/742/a/66283952_compilation_error_0.cpp
// Author : Abdallah Hemdan // For Hassanosama, ICPC next year ISA. #ifdef _MSC_VER #define _CRT_SECURE_NO_WARNINGS #endif #include <bits\stdc++.h> #define vll vector<ll> #define vi vector<int> #define sz size() #define pii pair<int,int> #define IO ios_base::sync_with_stdio(0),ios::sync_with_stdio(0),cin.tie(0),cout.ti...
ALGO
0.999943
4.655496
6eceaf67-3ac0-4ac5-b105-0c624ddd59eb
RajkumarSony/LeetCode-Solutions
cpp/338-Counting-Bits.cpp
/* Given int, return array: for each i, ans[i] is # of 1's Ex. n = 2 -> [0,1,1], 0 = 0 has 0, 1 = 1 has 1, 2 = 10 has 1 x = 1001011101 = 605 x'= 0100101110 = 302 Differ by 1 bit, by removing LSB: f(x) = f(x / 2) + (x mod 2) Time: O(n) Space: O(n) */ class Solution { public: vector<int...
ALGO
0.999992
6.268326
bb99e59d-d1f7-4418-9a8f-1fb78a108894
30-Days-code/Somasekhar
day_18.cpp
// Write a program in C++ use operator overloading for creating a simple calculator // program having functions for addition, subtraction, multiplication, division, // and modulus. // https://www.youtube.com/watch?v=BO2KagRMS3M (Reference.) #include <stdio.h> #include<iostream> using namespace std; class number { ...
TOOL
0.971371
3.598224
c87c073e-801f-4ee6-89d6-6d1301a1a2f4
karthik-k-18/CodeForces
819/A.cpp
// // Created by karth on 06-09-2022. // #include<bits/stdc++.h> using namespace std; #define ll long long void TestCase() { int n; cin>>n; vector<int>vec(n); int mini=INT_MAX,maxi=INT_MIN; for(int i=0;i<n;i++){ cin>>vec[i]; mini=min(mini,vec[i]); maxi=max(maxi,vec[i]); ...
ALGO
0.999669
5.454636
427821d8-2145-424d-8c05-7f357e3241ce
vfolunin/archives-solutions
UVa Online Judge/1316.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <string> using namespace std; struct Product { int cost, deadline; bool operator < (const Product &that) const { return cost > that.cost; } }; bool solve() { int productCount; if (!(cin >> pr...
ALGO
0.999551
5.311729
718e1873-4e88-42ce-8ebd-9cd27a2b2646
vishal9431/String-pwskills-part2
Question4.cpp
// Given an array of strings. Check whether they are anagram or not. // Input : s = "car" , t = "arc" // Output : True // Input : s = "book" , t = "hook" // Output : False #include<iostream> #include<algorithm> using namespace std; int main() { string s; string t; cin>>s; cin>>t; // if(s.length()!=t...
ALGO
0.999982
5.079096
39ed68e2-fa8e-4500-9d6f-a42557747bcf
a38062an/Branch_Predictor
src/BranchTargetBuffer.cpp
/* * The cache model we use which utilises a doubly linked list to keep track of LRU / MRU with Head / Tail * We use an array to keep track of data in cache * * */ #include "../include/BranchTargetBuffer.h" BTBEntry::BTBEntry(int src, int tgt) : sourceAddr_tag(src), targetAddr_data(tgt), prev(nullptr), next(nullpt...
ALGO
0.981808
5.821405
c3f27af1-4bb5-4e6c-ad55-183c231b8ffe
ramganga911/DSA-Practice
BST/create_tree.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <unordered_set> using namespace std; struct TreeNode{ int val; TreeNode* left; TreeNode* right; TreeNode(int x): val(x),left(NULL),right(NULL){} }; TreeNode* createBinaryTree(vector<vector<int>>& descs){ unordered_map<int, TreeN...
ALGO
0.999955
5.826288
fd1f622d-2607-4baa-b30f-50d001237612
PhoenixGS/Solutions
LOJ/2127.cpp
#include <cstdio> int n; double x[2000000]; int cnt[2000000]; double ans; int main() { scanf("%d", &n); n = 1 << n; for (int i = 0; i < n; i++) { scanf("%lf", &x[i]); } for (int i = 1; i < n; i <<= 1) { for (int j = 0; j < n; j += (i << 1)) { for (int k = 0; k < i; k++) { x[j + k + i] += x[j + ...
ALGO
0.999693
3.678336
25dc8300-2424-4919-862b-0e3081370b21
GregWagner/Udemy-DSA-Courses
Coding-Minutes/Data_Structures_and_Algorithms_Level_Up/Section_03_String_Problems/tokenization.cpp
/* * String Tokenization * * Tokenizing a string denotes splitting a string with * respect to some delimiter(s) like white space. */ #include <cstring> #include <iostream> #include <sstream> #include <vector> void usingSstream() { std::string input; std::cout << "Enter a sentence: "; std::getline(std:...
TOOL
0.890841
5.875955
96f4b067-e6e5-4ebd-86f1-67ce116bb10f
yanpot69420/latihangit
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.998859
6.785645
d15a3a54-5d4a-41d1-ad65-79ee1874ce01
Professional-CPP/edition-6
Exercises - No Modules/Ch24/24-4/24-4.cpp
#include <print> #include <regex> #include <variant> #include <string> #include <stdexcept> #include <utility> using namespace std; using Parameter = pair<string, variant<bool, int, string>>; Parameter parseParameter(const char* parameter) { regex r{ "(.*)=(.*)" }; if (cmatch m; regex_match(parameter, m, r)) { c...
TOOL
0.949013
6.75738
923369d5-42bd-4c51-a34d-71f9a5fb969d
rudralaxmikanth5/Object-oriented-programing-
lab5.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <set> using namespace std; //creating class node class node { public: node *right; int val; node(int data) { val=data; right=NULL; } }; //creating class Dlist class Dlist { pr...
ALGO
0.999703
4.463218
efbec7a6-b85a-4ac2-8604-54019b2935b4
ComputationalBiomechanicsLab/opensim-creator
third_party/libosim/opensim-core/OpenSim/Sandbox/Moco/sandboxJointReaction/sandboxJointReaction.cpp
#include <Moco/osimMoco.h> #include <OpenSim/Common/osimCommon.h> #include <OpenSim/Simulation/osimSimulation.h> #include <OpenSim/Actuators/osimActuators.h> using namespace OpenSim; /// This model is torque-actuated. Model createInvertedPendulumModel() { Model model; model.setName("inverted_pendulum"); ...
ALGO
0.999439
6.518625
00950ed0-f328-473a-b952-a5d525769362
feliposz/leetcode-solutions
C++/remove-linked-list-elements.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* removeEleme...
ALGO
0.999933
5.964377
6e45285c-b3af-4c3b-8e38-04f2d9095606
Vishruth-S/CompetitiveCode
Hackerrank_problems/kangaroo/solution2.cpp
// LOGIC: // First, we compare the first kangaroo's location & rate with the second one. // if the first kangaroo's location & rate both are higher than the second or vice versa, // there's no way both will reach same location at any point. // Second, if the location & rate of both the kangaroos are same, //...
ALGO
0.999882
4.134301
47c9e2a2-5808-422d-8465-ac91a206b015
yitianhao/gpu_sched_new
gpu-sched-centralcontrol/minor/boost_1_61_0/libs/math/tools/igamma_temme_large_coef.cpp
#include <boost/math/special_functions/log1p.hpp> #include <boost/math/special_functions/erf.hpp> #include <boost/math/constants/constants.hpp> #include <map> #include <iostream> #include <iomanip> #include "mp_t.hpp" using namespace std; using namespace boost::math; // // This program calculates the coefficients of ...
ALGO
0.999114
4.395362
d421bc45-3035-4917-9328-680c7f798d40
sohaibayub/llvm_openmp
runtime/src/kmp_barrier.cpp
/* * kmp_barrier.cpp */ #include "kmp.h" #include "kmp_wait_release.h" #include "kmp_itt.h" #include "kmp_os.h" #include "kmp_stats.h" #if KMP_MIC #include <immintrin.h> #define USE_NGO_STORES 1 #endif // KMP_MIC #include "tsan_annotations.h" #if KMP_MIC && USE_NGO_STORES // ICV copying #define ngo_load(src) __m5...
TOOL
0.940409
5.422007
9fd1911c-0f89-42c9-bb2a-9fb5e0f41635
Kawser-nerd/CLCDSA
Source Codes/AtCoder/agc029/B/3812965.cpp
#include <iostream> #include <set> using namespace std; #define MAX_N 200000 int A[MAX_N]; multiset<int> inverted; int invert(int x) { int inv{1}; while (inv <= x) inv <<= 1; return inv - x; } int main() { int N; scanf("%d", &N); for (int i{}; i < N; ++i) scanf("%d", &A[i]); sort(A, A + N); ...
ALGO
0.999923
4.447409
5ded5aed-9f26-4989-b039-7156a40c601d
Shukti042/Data-Structures-and-Algorithms-II
Implementation of Hash Table/Hash1605042.cpp
#include<bits/stdc++.h> using namespace std; #define NULL_VALUE -99999 #define NULL_VALUE2 -9999999 int val=1,hash1ChainCol=0,hash1DoubleCol=0,hash1CustomCol=0; float hash1ChainHit=0,hash1Doublehit=0,hash1Customhit=0; int hash1ChainCol2=0,hash1DoubleCol2=0,hash1CustomCol2=0; float hash1ChainHit2=0,hash1Doublehit2=0,has...
ALGO
0.99798
3.090099
ebf8019a-43b8-494f-a05e-f64f635ad935
s1mhadri/fault_injection_simulation
src/moveit/moveit/moveit_core/collision_distance_field/src/collision_common_distance_field.cpp
/* Author: E. Gil Jones */ #include <moveit/collision_distance_field/collision_common_distance_field.h> #include <ros/console.h> #include <boost/thread/mutex.hpp> #include <tf2_eigen/tf2_eigen.h> #include <memory> namespace collision_detection { struct BodyDecompositionCache { using Comperator = std::owner_less<sha...
TOOL
0.996458
7.20657
e026bd5c-2e3b-4ac1-84ad-136d79ec0f44
nursyah21/algoexercise
1201210005_TeguhSambadaAbrielKarisma/Hackerrank/Hackerrank/string_stream.cpp
#include <sstream> #include <vector> #include <iostream> using namespace std; vector<int> parseInts(string str) { stringstream ss(str); vector<int> result; char ch; int tmp; while(ss >> tmp) { result.push_back(tmp); ss >> ch; } return result; } int main() { string str; cin >> str; ...
ALGO
0.989351
4.300578
7ca56373-ea5d-4c55-b427-32365b2fef99
TheArcadiaGroup/DAPS
src/merkleblock.cpp
#include "merkleblock.h" #include "hash.h" #include "primitives/block.h" // for MAX_BLOCK_SIZE #include "utilstrencodings.h" using namespace std; CMerkleBlock::CMerkleBlock(const CBlock& block, CBloomFilter& filter) { header = block.GetBlockHeader(); vector<bool> vMatch; vector<uint256> vHashes; vM...
ALGO
0.998308
5.952847
350e04c2-ca43-42ef-ba02-5d4c27edec91
subham0269/Everything-c-cpp
CPP/cllg_codes/question set/ch4_8.cpp
#include<bits/stdc++.h> using namespace std; double power(double m,int n){ return pow(m,n); } double power(double m){ return pow(m,2); } int main(){ double m; int n=-1; cout<<"Enter m: "; cin>>m; cout<<"Enter n:"; cin>>n; cout<<"The answer: "; (n!=-1)?cout<<power(m,n):cout<<power(m); return 0; }
ALGO
0.999346
3.948
c9598d52-5e9c-4256-96a2-70f0c659d436
flyingCircusEggSpam/detectiveFace-C
detactiveFace/main.cpp
#include <iostream> #include <string> #include <vector> //boost #include <boost/filesystem.hpp> #include <boost/foreach.hpp> //openCV #include <opencv2/core/core.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/objdetect/objdetect.hpp> namespace fs = boost::filesys...
TOOL
0.916368
4.082593
d3e65307-a70e-4257-80fe-68594fa8de48
oKcerG/qt-base-switch
src/gui/painting/qdrawhelper_neon.cpp
#include <private/qdrawhelper_neon_p.h> #include <private/qblendfunctions_p.h> #include <private/qmath_p.h> #ifdef __ARM_NEON__ #include <private/qpaintengine_raster_p.h> QT_BEGIN_NAMESPACE void qt_memfill32(quint32 *dest, quint32 value, qsizetype count) { const int epilogueSize = count % 16; #if defined(Q_CC_G...
TOOL
0.937209
5.740649
01f09b52-0b35-478f-b50d-25379db4171a
rrafaelramos/ProgramacaoEstruturada
Exercicios/quest7.cpp
#include <stdio.h> int main(){ int a,aux=1,aux1=1,aux2=1,teste=0; printf("Digite um valor: "); scanf(" %d",&a); for(int i=1; i<a; i++){ aux+=i; aux1+=i+1; aux2+=i+2; teste=aux*aux1*aux2; if(teste==a){ printf("Triangular!"); break; }else{ printf("Nao eh triangular!"); break; } } }
ALGO
0.999488
3.776563
3bbf3de3-e0d1-4003-95b8-168393216886
AnkurDeria/Blender-Fork
extern/bullet2/src/BulletDynamics/ConstraintSolver/btBatchedConstraints.cpp
#include "btBatchedConstraints.h" #include "LinearMath/btIDebugDraw.h" #include "LinearMath/btMinMax.h" #include "LinearMath/btStackAlloc.h" #include "LinearMath/btQuickprof.h" #include <string.h> //for memset #include <cmath> const int kNoMerge = -1; bool btBatchedConstraints::s_debugDrawBatches = false; struct...
ALGO
0.982071
3.911474
ccccffe9-341e-423b-a262-c16d18f56878
qquynh217/DSA
tap_con_ke_tiep.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long const ll P = 1e9 + 7; int main() { int t; cin >> t; while (t--) { int n, k; cin >> n >> k; int a[n], check = false; for (int i = 1; i <= k; i++) cin >> a[i]; int vt = 0; for (in...
ALGO
0.99996
3.565657
0ede095a-7e83-47fa-8432-74c44e065c64
DougTownsend/ece309-sum25-lectures
lecture06/list.cpp
#include <iostream> #include <string> #include <memory> class List{ private: class ListNode{ public: std::shared_ptr<ListNode> next; std::string item; ListNode(){ next = nullptr; item = ""; } }; std::shared_ptr<ListNode> head; std::sh...
TOOL
0.917854
4.872289
8fca3189-5f74-40ff-8b3c-c55fa6f8c607
Kishanbhadoriya007/Mini-Cpp-Projects
GCD.cpp
// // Q-158) Recursively find the GCD of two numbers. #include<bits/stdc++.h> using namespace std; long GCD(long a, long b){ if(b==0){ return a; } return GCD(b, a%b); } int main(){ long n1,n2; cout<<"Enter first number\n"; cin>>n1; cout<<"enter second number\n"; cin>>n2; wh...
ALGO
0.99252
4.942059
2722b460-613b-4ea3-a593-c4907177004e
Bencomester/LeetCode
2544.cpp
class Solution { public: int alternateDigitSum(int n) { int sum = 0; int sign = 1; while (n != 0) { sum += (n % 10) * sign; n /= 10; sign *= -1; } return sign > 0 ? -sum : sum; } };
ALGO
0.999968
6.124574
a0760d6f-f368-48d0-adad-63b465a91830
thiru31/daily-coding
college wallah/Linkedlist/delete-alt.cpp
#include <bits/stdc++.h> using namespace std; class node { public: int val; node *next; node(int data) { val = data; next = NULL; } }; void insert(node *&head, int val) { node *temp = head; node *newnode = new node(val); newnode->next = head; head = newnode; } void ...
ALGO
0.998644
3.863792
7cfce39d-5479-45a6-a9bb-4174ec2fa58b
kakinumakoki/M2
50item_tests/testcase16/drone7/solve3.cpp
#include<iostream> #include<algorithm> #include<map> #include<queue> #include<stack> #include<set> #include<bitset> #include<vector> #include<string> #include <iomanip> #include <deque> #include<list> #include<cmath> #include<fstream> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; using ll=long long; usin...
ALGO
0.999806
3.48011
178d491e-e38b-4b7a-b93c-a4a73974c689
lixworth/cpp-playground
problems/nowcoder/2024_xunlian1_67741/2024_xunlian1_67741_A.cpp
/* * Created by LixWorth on 2024/02/02 13:06 * Github: https://github.com/lixworth/ * Website: https://blog.lix.moe/ * Contact: <EMAIL> **/ //#include <bits/stdc++.h> #include <iostream> #include <algorithm> using namespace std; typedef long long ll; int check(int n,string input,string str) { int p = 0; ...
ALGO
0.996665
5.373589
abbffdd8-c6c5-46ee-ac31-52ba1a9e4af2
delta4d/AlgoSolution
zoj/04/1389.cpp
#include <cmath> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; #define BELOW -1 #define ABOVE 1 #define IN 0 const double eps = 1e-2; const int MAXN = 50000; struct cistern { int b, h, w, d; cistern(int _b=0, int _h=0, int _w=0, int _d=0):b(_b), h(_h), w(_w), d(_d) {} bool input...
ALGO
0.999846
3.76926
d4da54e1-d2d9-4ec1-9939-29403e8fcae7
greenbeanpie/OI-training
NOIP2023-ZJ/ZJ-0714/dict/dict.cpp
#include<bits/stdc++.h> using namespace std; const int N = 3e3 + 57; int read(){ int x = 0, f = 1; char ch = getchar(); while(ch < '0' || ch > '9'){if(ch == '-') f = -f; ch = getchar();} while(ch >= '0' && ch <= '9'){x = (x << 1) + (x << 3) + (ch ^ 48); ch = getchar();} return x * f; } bool _u; int n, m; char s[N...
ALGO
0.999954
3.463726
11b1a60e-a836-462b-aa32-bb0f0fcddd1a
trandattin/CTDL-Course
Practice/TH7/02-abc.cpp
#include "stdio.h" #include "math.h" typedef int ElementType; typedef struct Node{ ElementType Data; Node* Next; }NodeType; typedef NodeType* NodePointer; struct LinkList{ NodePointer Head; NodePointer Tail; }; NodePointer createNode(ElementType x) { NodePointer np = new NodeType; if (np == NULL) printf("L...
ALGO
0.999962
3.521855
97501ff1-c879-483f-80c6-2fc3f8d5937d
lantian-fz/test_cpp
test_270/test_270/main.cpp
#define _CRT_SECURE_NO_WARNINGS 1 //ÿ¶ //ÿ бһбӦλõΪҪ۲⵽ߵ£Ҫȴ //֮󶼲ߣڸλ 0 档 //磬һб temperatures = [73, 74, 75, 71, 69, 72, 76, 73]Ӧ[1, 1, 4, 2, 1, 1, 0, 0] //ʾ бȵķΧ[1, 30000]ÿµֵľΪ϶ȣ[30, 100] Χڵ #include <iostream> #include <vector> #include <stack> using namespace std; vector<int> dailyTemperatures(vector<int>& T) { if ...
ALGO
0.999821
4.856949
e00f2d96-9fbc-49b1-8c32-d9c18eb564d8
AllenAndrew01123/Competitve-Programming
Codeforces/aaaaaaaaaaaaaaa.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; void solve() { map<ll,vector<ll>>mp; ll q; cin >> q; while (q--) { string s; cin >> s; if (s == "ADD") { ll x;cin>>x; for(int i=1;i*i<=x;i++) { if(x...
ALGO
0.997776
4.829269
b2497296-1204-48df-ae7e-4f0eca1a3b72
dong-minkim/algorithm
PROGRAMMERS/LEVEL1/두 개 뽑아서 더하기.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; vector<int> solution(vector<int> numbers) { vector<int> answer; for (int i = 0; i < numbers.size(); i++) { for (int j = i + 1; j < numbers.size(); j++) { answer.push_back(numbers[i] + numbers[j]); } }...
ALGO
0.999861
5.210861
e7f38869-6c6a-4477-b006-204b2a826d9e
AKASH-ALAM/Competitive-Programming
STL/comparator.cpp
/** * Author : Pnictogen * Task : * Algo : **/ #include <bits/stdc++.h> using namespace std; bool comparator(pair<int, int>x, pair<int, int> y) { return (x.first < y.first) or (x.first == y.first and x.second > y.second); } void solve() { vector <pair <int, int> > v; int n, x, y; cin >> n; for (int i...
ALGO
0.99988
4.794985
3b44350a-84e9-43ac-acc9-d4fde3c19823
amsraman/Competitive_Programming
ACM/ECNA/2022/K.cpp
#include <bits/stdc++.h> using namespace std; int main() { string t1, t2; getline(cin, t1); getline(cin, t2); auto trim = [](string s) { string res = ""; for(char c: s) if(c != ' ') res += c; return res; }; t1 = trim(t1), t2 = trim(t2); t1 = "(-1(" + t1 + "))"; ...
ALGO
0.99994
4.565154
b09d9730-b882-4b91-a229-83685acf3357
ekut-es/pulp-llvm
libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp
// <algorithm> // template <class InputIterator, class OutputIterator1, // class OutputIterator2, class Predicate> // constexpr pair<OutputIterator1, OutputIterator2> // constexpr after C++17 // partition_copy(InputIterator first, InputIterator last, // OutputIterator1 out_true...
TEST
0.98644
6.277772
0ad5c27a-f950-483e-8a10-6f8a393fe180
tahsinsoha/Problem-solving-
codechef/eventuall reduction.cpp
#include<bits/stdc++.h> using namespace std; long long arr[1000007]; long long cs[1000007]; long long ps[1000007]; int main() { int t; cin>>t; while(t--) { int n; cin>>n; string s; cin>>s; map<char,int>mpp; for(int i=0; i<s.size(); i++) { ...
ALGO
0.999902
4.410395
796f8c89-e298-4375-b906-2bf74a4f1c38
DionysiosB/CodeChef
WEIGHTBL.cpp
#include <cstdio> int main(){ long t; scanf("%ld", &t); while(t--){ long w1, w2, x1, x2, m; scanf("%ld %ld %ld %ld %ld", &w1, &w2, &x1, &x2, &m); printf("%d\n", (w1 + m * x1 <= w2) && (w2 <= w1 + m * x2)); } }
ALGO
0.999492
3.322953
a31925f3-2af9-49a2-8b84-6254b62b27f9
rohan-blah/cpp_codes_archive
cpp_algos/3.reverse_string.cpp
#include<iostream> using namespace std; string reverseString(string in,string out){ if(in.length()==0) return ""; else { char temp=in[0]; in=in.substr(1); return (reverseString(in,out)+temp); } } int main(){ string in; string out=""; cout<<"Enter a strin...
ALGO
0.994226
5.14731
488b8588-280f-4ce4-8a8f-21e3e44ad429
SunNailin/Optimization_HEVC
x265_2.3/source/common/md5.cpp
#include "common.h" #include "md5.h" namespace X265_NS { // private x265 namespace #ifndef ARCH_BIG_ENDIAN #define byteReverse(buf, len) /* Nothing */ #else static void byteReverse(uint8_t_t *buf, unsigned int nSize) { int i; uint32_t tmp; for (i = 0; i < nSize; i++) { tmp = ((unsigned int)...
ALGO
0.868092
6.322358
ab46ff2d-7b99-4ee4-b345-886b4b4be484
raincross7/code-similarity
codes/train_code/problem393/problem393_348.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long ll; int main() { string s; cin >> s; rep(i,s.size()){ if(s.at(i) == '7'){ cout << "Yes"; return 0; } } cout << "No"; }
ALGO
0.999124
3.450501
d6f17293-b108-4c66-8c32-abc395e663fa
Peilin-Yang/leetcode
c++/longest_increasing_subsequence.cpp
#include <vector> #include <iostream> using namespace std; void p(vector<int>& v) { for (int i = 0; i < v.size(); i++) cout << v[i] << ","; cout << endl; } class Solution { public: int bs(vector<int>& nums, int target) { int start = 0, end = nums.size()-1; while (start <= end) { in...
ALGO
0.999937
5.621694
2ee02deb-c386-4b66-96a7-ead912464a17
amemoia/PodstawyProgramowaniaCPP
LAB/lab08/06.cpp
/* Napisz funkcję rekurencyjną w języku C++, która oblicza rozmiar napisu (char str[]). Napisz program w języku C++, który przetestuje działanie tej funkcji. */ #include <iostream> // str[0] = *(str + 0) int strlen_recursive(char str[], int i = 0) { char *ptr = (str + i); if (*ptr == '\0') return ...
ALGO
0.998325
6.103333
f4e5e006-dfea-40ff-b2f2-141a7441a132
AtulSingh027/Legacy-DSA
Linked List.c++/stack+SLL.cpp
#include <iostream> using namespace std; struct node { int data; struct node *next; node(int data) { this->data = data; this->next = NULL; } }; class Stack_Using_SLL { public: node *top; Stack_Using_SLL() { top = NULL; } ...
ALGO
0.999451
4.785884
31d1535a-6b1b-4158-8911-b3ca06a165b2
Praveenkumar02023/LeetCode-DSA
0124-binary-tree-maximum-path-sum/0124-binary-tree-maximum-path-sum.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.999968
6.092451
baf10677-497e-4651-b096-b4911de60049
Anshtripathi079/C_Cpp_DSA
arrays/max_min_inarray.cpp
#include<iostream> using namespace std; int main(){ int i,n; int arr[10]; cin>>n; for(i=0;i<n;i++){ cin>>arr[i]; } int max=arr[0],min=arr[0]; for( i=0;i<n;i++){ if(arr[i]>max){ max = arr[i]; } if(arr[i]<min){ ...
ALGO
0.999911
3.513871
c41a128e-47da-47d5-8c39-9dd1fd4b0150
AlisonWen/Competitive-Programming-I-Homework
Tourists.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; vector <int> graph[200005]; int n; int depth[200005], pre[200005]; int ancestor[200005][20]; void BFS(){ memset(depth, -1, sizeof(depth)); depth[1] = 0; queue <int> q; q.emplace(1); while (!q.empty()){ int i = q.front(); ...
ALGO
0.999484
4.019569
e5afadc5-7fa6-418f-8c91-c73916efd5ce
zensen6/BOJ_350_solved-completed_code-partII
16938_acm.cpp
#include<bits/stdc++.h> using namespace std; int n,l,r,x,k, ans=0; vector<int> arr; void proc(int index, int chose, int sum, int least, int maximum){ if(index >= n){ if(maximum - least >= x && sum >= l && sum <= r && chose >= 2) ans += 1; return; } if(least == -1){ proc(index + 1, chose + 1, a...
ALGO
0.999965
3.849753
9576bf8c-9934-488e-a61e-644fd2e0a4a3
pranavjawale01/cp.exe
GFG/Easy/Find Transition Point/find-transition-point.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int transitionPoint(int arr[], int n) { // code here int low = 0, high = n - 1; int transitionIndex = -1; while (low <= high) { int mid = low...
ALGO
0.999867
5.967042
82a858c7-402d-46c3-9631-577d7cb49b19
SouvikGhosh644/Coding_Questions
Triangle_Square.cpp
#include<bits/stdc++.h> using namespace std; class Square{ private: int len; public: void input() { cout<<"Enter the length:"; cin>>len; } int area(); }; class Triangle{ private: int a,b,c; public: void input() { cout<<"Enter the sides:"; ...
ALGO
0.993717
4.115785
684533f1-1449-46fe-ac06-d278d23cacf6
vaishnavikaranjkar/CPP_Programs
operatorOverload/rationalNoOverload.cpp
#include <iostream> using namespace std; //program to add fractions class Rational { private: int p,q; public: Rational(int p=0, int q=0) { this->p=p; this->q=q; } Rational operator+(Rational r) { Rational temp; temp.p=(this->p*r.q)+(this->q*r.p); temp...
TOOL
0.990553
4.672864
6a198c24-2acf-42ef-a0dd-febdd0220b43
pinarbasieylulz/Data-Structures
23-24-Fall/Homework1/6421643.cpp
// @Author // StudentName : Eylül Zeynep Pınarbaşı // StudentID : 150220725 // Date : 10.29.2023 #include <iostream> #include <fstream> #include <sstream> #include <string> #include <time.h> using namespace std; class Employee { private: int id; int salary; int department; public: ...
TOOL
0.947101
4.805698