uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
dccceaad-387a-4f9e-ba4e-9975eeb649db
KamaruzzamanFahad/Newbie-Problem-Solving-with-Cpp
Week-1/B_Colourblindness.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin >> t; while(t--){ int n; cin >> n; string s1,s2; cin >> s1 >> s2; for(int i = 0; i < n; i++){ if(s1[i] == 'G') s1[i] = 'B'; } for(int i = 0; i < n; i++){ if(s2[i] == 'G') s2[i] = 'B'; } ...
ALGO
0.999814
4.523263
88d28e45-0078-4ca7-a965-609721698c5f
Laboratorio-de-Pedometria/spsann-package
src/updatePPLCpp.cpp
/******************************************************************************* Update the distance matrix x: coordinates of all points dm: matrix of distances idx: row and column of the distance matrix to be updated *******************************************************************************/ #include <Rcpp.h> usi...
ALGO
0.999353
5.851057
132dda71-c77c-4000-93f1-5b09ef94d3cc
hiranoo/atcoder
contests/OTHER_CONTESTS/typical90/011.cpp
#include <vector> #include <algorithm> #include <math.h> #include <stdio.h> #include <string> #include <sstream> #include <bitset> #include <stack> #include <queue> #include <bits/stdc++.h> #include <atcoder/segtree> #include <time.h> #define rep(i, s, t) for(int i = (s); i <= (t); i++) #define repd(i, s, t) for(int i ...
ALGO
0.999782
3.530304
a408780f-554e-47e9-9ef9-873f71b52a91
ishandutta2007/codeforces
thenymphsofdelphi/normal/1197/A.cpp
#include<bits/stdc++.h> using namespace std; // Shortcut #define int long long #define endl '\n' #define eb emplace_back #define pb push_back #define pob pop_back #define mp make_pair #define upb upper_bound #define lwb lower_bound #define fi first #define se second #define For(i, l, r) for (int i = l; i < r; i++) #d...
ALGO
0.999815
4.985914
640fbf15-c81a-4b70-a785-f46e58739853
ishandutta2007/codeforces
mhq/normal/1261/D2.cpp
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; typedef long double ld; typedef long long ll; const int mod = 998244353; int sum(int a, int b) { int s = a + b; if (s >= mod) s -= mod; return s; } int sub(int a, int b) { int s = a - b; ...
ALGO
0.999974
4.288123
0c4437e5-1eb7-4fd9-a1dc-6046f3fbcc95
Ash-codes18/Lpu-colab-CPP-DSA-Soln
CSE-205 DSA/Unit-2/Lecture 11/delete_nth_node (book_management_system).cpp
#include <iostream> using namespace std; int main(){ int n; cin>>n; int arr[n]; cout<<"Linked List before deletion: "; for(int i=0;i<n;i++){ cin>>arr[i]; cout<<arr[i]<<" "; } cout<<endl; int del; cin>>del; int ans[n-1]; int j=0; for(int i=0;i<n;i++){ ...
ALGO
0.999616
4.084144
770443c1-a103-44e2-bade-c9cfdf35fbf3
DinoKrso/CPP-Practice
c++ /Projekat nizovi/glavni.cpp
#include <iostream> #include <string> #include "Niz.h" using namespace std; int main() { try{ int vel1, vel2; cout << "Unesi velicinu niza A: "; cin >> vel1; Niz a(vel1); a.unesiNiz(); cout << "Unesi velicinu niza B: "; cin >> vel2; Niz b(vel2); b.unesiNiz(); int i(0),broj,pom...
TOOL
0.950917
3.751801
8d37098c-e6ca-4322-af01-388a4bee83d9
EthanKim8683/High-School-Competitive-Programming
Codeforces/Problemset/All/1641c.cpp
#include<bits/stdc++.h> using namespace std; using I=int; const I N=2e5; const I LOGN=18; const I MAX=1e9; const I MIN=-1e9; vector<pair<I,I>>qrys; vector<pair<I,I>>upps[N]; vector<tuple<I,I,I>>slvs; priority_queue<pair<I,I>>ques; I spas[N][LOGN]; I tims[N],ress[N]; vector<I>unks; I n; void bld(){ for(I i=1;i<LOGN;i+...
ALGO
0.999756
4.480161
8cc5908f-4a4b-4805-a905-8ed38d2c96fd
Cpasjuste/boost
libs/mpi/example/cartesian_communicator.cpp
// Authors: Alain Miniussi #include <vector> #include <iostream> #include <boost/mpi/communicator.hpp> #include <boost/mpi/collectives.hpp> #include <boost/mpi/environment.hpp> #include <boost/mpi/cartesian_communicator.hpp> namespace mpi = boost::mpi; // Curly brace init make this useless, but // - Need to support...
ALGO
0.929962
4.805208
6fd01aab-b424-41e5-a70b-2c69c555fc74
MuzamilDev/CPlusPlusMathLibrary
QoutientAndReminder.cpp
#include<iostream> using namespace std; int main() { int dividend, divisor , qoutient , reminder; cout<<"Enter Number which to be dividend "<<endl; cin>>dividend; cout<<"Enter divisor "<<endl; cin>>divisor; qoutient = dividend/divisor; reminder = dividend%divisor; cout<<"The qoutie...
ALGO
0.99278
3.199781
43f2eae6-065f-498c-a64d-da0d9a93b58a
YashiSri1/GFG_Practice
Difficulty: Easy/Search array with adjacent diff at most k/search-array-with-adjacent-diff-at-most-k.cpp
//{ Driver Code Starts // C++ program to search an element in an array // where difference between all elements is 1 #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // x is the element to be searched in arr[0..n-1] // such that all elements differ by at-most k. class Solution { public: int f...
ALGO
0.999437
5.338263
99b887a9-393a-4d34-8f27-aac4600a8e5f
lineageos-q-mean/android_frameworks_av
media/libstagefright/codecs/m4v_h263/enc/src/datapart_encode.cpp
#ifndef H263_ONLY #include "mp4def.h" #include "mp4lib_int.h" #include "bitstream_io.h" #include "mp4enc_lib.h" #include "m4venc_oscl.h" /* ======================================================================== */ /* Function : EncodeFrameDataPartMode() */ /* Date : 09/6/200...
TOOL
0.899765
5.804534
e5506a7d-f771-4a69-9d93-6641c03ea893
ThirdProject/android_external_icu
icu4c/source/i18n/stsearch.cpp
#include "unicode/utypes.h" #if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION #include "unicode/stsearch.h" #include "usrchimp.h" #include "cmemory.h" U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(StringSearch) // public constructors and destructors ----------------------------------- StringSearch::...
TOOL
0.93486
6.04107
51924bb9-0157-45ac-820f-1d216f1aedf8
Abhinav5678/1-year-codes.a
max. in array.cpp
#include<stdio.h> int main () { int n; scanf("%d",&n); int a[n]; for(int i=0;i<n;i++) { scanf("%d",&a[i]); } int max; max=a[0]; for (int i=0;i<n;i++) { if (a[i]>max) max=a[i]; } printf("MAXIMUM NUMBER IS = %d",max); } }
ALGO
0.99917
3.02832
b67d6afe-7e21-4f54-861c-61981569e9f5
RaykkonerD/Beecrowd
Cpp/q1045.cpp
#include <iostream> #include <algorithm> using namespace std; int main(){ float A, B, C, arr[3]; int t; cin >> arr[0] >> arr[1] >> arr[2]; t = sizeof(arr)/sizeof(arr[0]); sort(arr, arr+t); A = arr[2]; B = arr[1]; C = arr[0]; if(A >= B+C){ cout << "NAO FORMA TRIANGULO" << endl; } else if(...
ALGO
0.999881
5.209527
9603f6f3-cd75-4771-9735-9a8a2c5393b9
PedroDariva36/Desktop
Cses/rangeQueries/hotelQueries/a.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; const int N = 2*1e6+1; int n; ll t[N+N]; void build(){ for(int i = n-1; i > 0; i--) t[i] = max(t[i<<1], t[i<<1|1]); } void update(int p, ll v){ for(t[p] = v; p > 1; p >>= 1) t[p>>1] = max(t[p], t[p^1]); } int query(ll v){ ...
ALGO
0.99993
3.31293
d0e88ba8-2264-4b96-8622-fa360294fc3b
Syhaun/c
数据结构学习/大数相加.cpp
#include <stdio.h> #include <string.h> int main(void) { char a[20],b[20]; int af[20],bf[20],x,y,c[21],max; int num; //жǷλ scanf("%s %s",&a,&b); x=strlen(a); y=strlen(b); max= x>y?x:y; for(int i=0;i<x;i++) { af[i]=a[x-i-1]-'0'; //ַתΪ } for(int i=0;i<y;i++) { bf[i]=b[y-i-1]-'0'; } for(...
ALGO
0.999988
3.16912
937650fb-f11c-452e-a8b7-9e5460f536b0
NgNhatThanh/SPOJ-Tournament
PTITSU1A.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { int a; cin>>a; while(a--) { int n; cin>>n; set<int> v; int arr[n]; for(int &x : arr) { cin>>x; v.insert(x); } int res=0; for(int x : v) { int cnt=1; vector<int> tmp; for(int k : arr) { if(k!=x) tmp.pu...
ALGO
0.999742
4.159061
0db2c36e-3c7e-4099-8167-fa266c4a2acd
kurtsansom/pfss
src/laplaceSolver.cpp
#include "src/laplaceSolver.h" #include "src/ellipticalGrid.h" #include "engine/hcImageFITS.h" #include "engine/hcImage.h" #include "engine/math/hcFunction.h" #ifdef GUI #include "src/fluxtube.h" #endif #include <math.h> #include <stdlib.h> #include <fstream> //------------------------------------------------------...
ALGO
0.999922
4.541611
e5b321bd-4441-4640-b357-d3adf0c19b82
Pranav-2103/Data-Structures-and-Algorithms
DSA/LB/1. Patterns/04_pattern6.cpp
#include<iostream> using namespace std; int main() { int n; cin>>n; int i = 1; while(i<=n){ int j = 1; while(j<=i){ cout<<'*'<<' '; j++; } cout<<endl; i++; } return 0; }
ALGO
0.999937
3.665933
f7120d2c-e8c7-4bf6-9ef3-110d37b5eeb7
taylortao/myLeetcode
heap/215_kth_largest_heap.cpp
class Solution { public: int findKthLargest(vector<int>& nums, int k) { vector<int> heap; int len = nums.size(), halfK = k >> 1; if (k > len) { return -1; } for (int i=0; i<k; i++) { heap.push_back(nums[i]); int son = i, parent = son; while (son > 0) { parent = (son - 1) >>...
ALGO
0.999977
5.178335
f6f39d4a-3407-46d2-84f8-ee3677124ccc
Sarthak104/Jaynam-Sir-100-Programs
41.cpp
#include<iostream> #include<string.h> using namespace std; int main() { char s1[10],s2[10]; cin>>s1>>s2; int value; value=strcmp(s1,s2); if(value==0) { cout<<"Strings are equal"; } else cout<<"Strings are not equal"; return 0; }
ALGO
0.999965
3.608817
9a93d1f1-e9d9-4e1c-a9ae-efe997311ae3
avenortoz/LeetCodeProblems
hard/315_count_the_smaller_number_after_self.cpp
#include<set> #include<vector> // TODO read about ext module #include<ext/pb_ds/assoc_container.hpp> using namespace std; class Solution { public: // Actually for python such solutions works pretty fine with 99% // But for cpp it is TLE -_-(due to distance take linear time, other // implementation of multi...
ALGO
0.999997
5.672846
7f96eaf7-c04a-42b0-b2c2-4a0e1187cc65
yashgadhiyaa/Se---Introduction-To-Programming---May-2024
M3/3.2/5.4.cpp
//4. How many odd numbers are there //How many odd numbers are there #include<stdio.h> int main() { int num1,num2,i,counte=0,counto=0; printf("\nEnter the value of num1 = "); scanf("%d",&num1); for(i=1;i<=num1;i++) { printf("\n%d",i); if(i%2==0) { counte++; } else { counto++; } } prin...
ALGO
0.998321
3.447735
8c271f12-ebe4-429b-a098-ea8865e0b989
AtelierMizumi/C---Exercise
Data structure & Algorithm/Lab11.cpp
// Exercise related to Binary Tree data structure #include <bits/stdc++.h> using namespace std; struct Node { char data; Node* left; Node* right; }; void initTree(struct Node* node); void preOrderTraversal(struct Node* node);https://www.facebook.com/profile.php?id=100090228522285&sk=reels_tab Node* no...
ALGO
0.999842
5.277264
10fb3d51-dc6a-4f68-8635-2b0082c29009
hahlw/Datawhale_leetcode
tobehe/101.symmetric-tree.cpp
/* * @lc app=leetcode id=101 lang=cpp * * [101] Symmetric Tree */ /** * 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: bool isSymmetric(TreeNode...
ALGO
0.999937
6.947536
3ed9eaab-6f14-4c53-a4c8-7689d6d17f4c
onkcharkupalli1051/cpp
NPTEL/WEEK 2/swap.cpp
#include<iostream> using namespace std; void swap1(int *a, int *b) { int t; t = *a; *a = *b; *b = t; } //use const in function to stop change of value of reference variable : //eg : void swap(const int &a) void swap2(int &a, int &b) { int t; t = a; a = b; b = t; } int main() ...
ALGO
0.999125
5.117573
6944c33d-4386-451b-8717-135c4c5a1df3
divyansh2212/Practice-Problems
Lexicographically smallest string.cpp
// <--------------------------Jai Shree Babosa--------------------------> #include <bits/stdc++.h> using namespace std; #define ll long long #define inf INT_MAX const int mod = 1e9 + 7; class Solution { public: string lexicographicallySmallest(string s, int k) { int n = s.length(); if ((n & ...
ALGO
0.99998
5.2075
f22d35ee-0984-4eef-aff1-ef8bca67c0b0
ghugesachin0806/Data_Structure_n_Algorithm
13_Dynamic_programming/02_C_Climbing_stairs_DP_Tabulation.cpp
// https://leetcode.com/problems/climbing-stairs/ #include <bits/stdc++.h> using namespace std; class Solution { public: int climbStairs(int n) { // Memoization vector vector<int> DP(n + 1, -1); if (n == 0) return 0; if (n == 1) return 1; DP[n ...
ALGO
0.999987
6.404409
fb499798-57f8-4f34-828f-aefdd8cbdcdd
DugarRishab/Algo.io
data/leetCode Solutions/Q11_containerWithMostWater/Q11_container_with_most_water.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int maxArea(vector<int>& height) { int n = height.size(); int area, maxArea = 0; int i = 0, j = height.size() - 1; while(i<j){ area = (j - i) * min(height[i], height[j]); maxArea = max(area, maxArea); if(height[i] <= height[j...
ALGO
0.999798
5.882241
0cf2868d-abf5-4caf-ac5c-16dcdf46333e
sukhmani1303/cp
BINARY SEARCH/gfg_val_equal_ind_val.cpp
class Solution{ public: vector<int> valueEqualToIndex(int arr[], int n) { long int i = 1; vector<int> v; for(int it = 0; it<n; it++){ if(arr[it] == i){ v.emplace_back(arr[it]); } i++; } return v; } };
ALGO
0.999825
4.463048
7665724f-c8b0-4701-a8d2-4158f6d7da27
THUKEG/saedb
toolkit/LDA/tokenize.cpp
#include<iostream> #include<string.h> #include<vector> using namespace std; vector<string> line_tokenize(string a,string sep) { vector<string> result; int start=0,end=0,pos=0,len=sep.length(); while(a.c_str()[end]) { if(a.c_str()[end]!=sep.c_str()[pos]) { end++; if(pos!=0) pos=0; } else { ...
TOOL
0.966792
3.471745
1c357098-417a-44d5-b430-da6db63d63ef
himanshusingh/random-codes
coinTrouble.cpp
#include <iostream> #include <cstdio> using namespace std; const int mod = int(1e9)+7; typedef long long ll; ll dp[333][100101]; int a[333]; int to[333], in[333]; int coin[333], coins; bool vis[333]; int main() { int n, q, t; cin>>n>>q>>t; for (int i = 1; i <= n; i++) cin>>a[i]; for (int i = 1; i <= n; i++) to[i] ...
ALGO
0.999984
3.616696
a2b897f5-8825-48b4-9276-2385e902607c
aswathi603/C-Programming
function declaration inside the main.cpp
#include <stdio.h> int main() { int sum(int,int); int a=10,b=43; int c=sum(a,b); printf("Sum is equal to:%d",c); } int sum (int x, int y) { return(x+y); }
ALGO
0.989725
3.831826
3f6c6989-c6e9-4e04-891a-e1ea8ab840bc
ksin-dev/algorithm
baekjoon/1013.cpp
#include <iostream> #include <string> using namespace std; bool match(string &s) { if (s.size() == 0) return true; if (s.compare(0, 2, "01") == 0) { string sub = s.substr(2); return match(sub); } string m1 = "100"; string m2 = "1"; string pad = ""; while (true) { string pad2 = ""; ...
ALGO
0.999745
4.981177
4c3baa86-abe4-4991-b139-32e77f3d9a9b
Alex003Alex/rep
DZ 1.5/ConsoleApplication4/ConsoleApplication4.cpp
/*Сделать конвертер величин.Формат ввода : Направление_Перевода Величина. a.Длина(метры, версты, километры)*/ #include "pch.h" #include <iostream> #include <string> #include <fstream> using namespace std; int main() { setlocale(LC_ALL, "Russian"); ofstream f("qwe.txt"); string w,e; int r; float q=0; cout << "Пе...
TOOL
0.915462
3.915501
44b2a1a2-94d4-4906-8169-338825bc6505
maitreyeerai/Code
HackerRank/ProblemSolving/Warmup/Staircase.cpp
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); void staircase(int n) { for(int i=1; i<=n; i++){ cout << setw(n) << right << string(i,'#') << endl; } } int main() { string n_temp; getline(cin, n_temp); int n = stoi(ltrim(rtrim(n_...
ALGO
0.999624
4.17318
a8c11e84-3e59-4954-a7ce-e3d46e5ce70b
Syhawk/LeetCode
symmetric_tree.cpp
//uri: https://leetcode.com/problems/symmetric-tree/ /* * 判别一棵树是不是对称树,可以采用前序遍历(或者其他遍历方式)直接判断左右子树。 * 空间复杂度:O(1). * 时间复杂度:O(n). * */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) ...
ALGO
0.99997
6.46285
c59ffd53-056d-4590-97c2-28f17e78f8a0
shikha7124v/Data-Structures
Array/Hard/Four-sum/betterApproach.cpp
#include<bits/stdc++.h> using namespace std; vector<vector<int>> fourSum(vector<int>& nums, int target){ int n = nums.size(); set<vector<int>> st; for(int i=0; i<n; i++){ for(int j=i+1; j<n; j++){ set<long long> hashset; for(int k=j+1; k<n; k++){ long long s...
ALGO
0.999963
5.28607
4517a87f-994a-40c3-863e-43fc2bd4fd86
ishandutta2007/codeforces
zdolny_kaczor/normal/913/E.cpp
#include<bits/stdc++.h> using namespace std; #define PII pair<int,int> #define f first #define s second #define VI vector<int> #define LL long long #define MP make_pair #define LD long double #define PB push_back #define PLL pair <LL, LL> #define ALL(V) V.begin(),V.end() #define abs(x) max((x),-(x)) #define PDD pair<LD...
ALGO
0.999513
3.662304
85bb51cc-eb59-4c47-87a1-d739cfab95eb
codemonkeyricky/lc
439.cpp
#include <iostream> #include <vector> #include <cassert> #include <stack> #include <queue> #include <algorithm> #include <unordered_map> #include <unordered_set> #include <map> #include <set> #include <bitset> #include <numeric> #include <cmath> using namespace std; struct TreeNode { int val; TreeNode *left; ...
ALGO
0.999837
5.347761
f5afb683-bd8b-4f29-9f6c-4911d92e06bb
azhar2007112/DSA-CODE
implementationdoubly.cpp
#include<iostream> using namespace std; class node{ public: int info; node *next; node *prev; }; void creation(node **head,int data) { node *ptr=new node(); ptr->next=NULL; ptr->prev=NULL; ptr->info=data; if(*head==NULL) { *head=ptr; } else{ node *temp=*head; while...
ALGO
0.999951
3.957709
9faa6841-3584-4a98-8121-1b558ae7481e
Shubhambandgar27/Batch26_Shubham
Ass7.cpp
//WAP to display the array values in Ascending order #include<iostream> using namespace std; int sortbyarr(int no[]) { for(int si=0;si<5;si++) { for(int ci=si+1;ci<5;ci++) { if(no[si]>no[ci]) { int temp=no[si]; no[si]=no[ci]; ...
ALGO
0.999976
4.189688
0d0b93a6-8ad1-484f-b003-ac6d474f9ee9
hashiryo/Library
test/aoj/ITP2_4_B.WBT.test.cpp
// competitive-verifier: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/lesson/8/ITP2/all/ITP2_4_B // competitive-verifier: TLE 0.5 // competitive-verifier: MLE 64 // split, split3, operator+ の verify #include <iostream> #include "src/DataStructure/WeightBalancedTree.hpp" using namespace std; signed main() { cin.ti...
ALGO
0.999663
4.382432
8ea55cbe-0b1a-44f4-b2a4-d864c172fcce
magak/CarndTerm3
Project1/src/Eigen-3.3/test/sparse_solvers.cpp
#include "sparse.h" template<typename Scalar> void initSPD(double density, Matrix<Scalar,Dynamic,Dynamic>& refMat, SparseMatrix<Scalar>& sparseMat) { Matrix<Scalar,Dynamic,Dynamic> aux(refMat.rows(),refMat.cols()); initSparse(density,refMat,sparseMat); refMat = refMat * refMat.adjoint(); for (i...
TEST
0.926561
5.216745
3ca300cd-4652-47d0-90f9-91afbc2a43e2
KshitijShinde/competitive-programming-using-c-
expt 1 stl m to power n/main.cpp
#include <iostream> #include <cmath> using namespace std; int main() { double m, n, result; cout << "Enter the base (m): "; cin >> m; cout << "Enter the exponent (n): "; cin >> n; result = pow(m, n); cout << "Result of " << m << " raised to the power of " << n << " is: " << r...
ALGO
0.995786
5.255124
48218157-77b9-4afe-a525-4758eaf42c6b
r930709/frameworks_av
media/libstagefright/codecs/amrnb/enc/src/g_pitch.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/g_pitch.c Date: 06/12/2000 ------------------------------------------------------------------------------ REVISION HISTORY Description: Placed into template and began to optimize. Description...
ALGO
0.999243
5.62798
543f69b7-7a34-45aa-bd72-5eaf21424021
Sp-177/LEETCODE
0312-burst-balloons/0312-burst-balloons.cpp
class Solution { public: int func(int i,int j,vector<int>&v,vector<vector<int>>&dp){ if(i>j)return 0; if(dp[i][j]!=-1)return dp[i][j]; int m=INT_MIN; for(int k=i;k<=j;k++){ int x=v[i-1]; int y=v[j+1]; m=max(m,x*y*v[k]+func(i,k-1,v,dp)+func(k+1,j,v,...
ALGO
0.999995
5.433959
85090152-3ed7-4630-a726-e1eb9b2fe1dd
wsn1226/Mass-Spring-1D
extern/libigl/include/igl/ray_mesh_intersect.cpp
extern "C" { #include "raytri.c" } template < typename Derivedsource, typename Deriveddir, typename DerivedV, typename DerivedF> IGL_INLINE bool igl::ray_mesh_intersect( const Eigen::MatrixBase<Derivedsource> & s, const Eigen::MatrixBase<Deriveddir> & dir, const Eigen::MatrixBase<DerivedV> & V, const E...
ALGO
0.982855
6.905438
44ee8129-c70a-4360-9992-4004556d5fc2
SomenSin/LeetCode
2216-delete-the-middle-node-of-a-linked-list/delete-the-middle-node-of-a-linked-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* deleteMiddl...
ALGO
0.999892
5.807519
dad7b1b1-e6b2-4f4f-9ce2-ae969c7be31d
flyingSnow-hu/games202
2/prt/ext/tbb/examples/parallel_for/game_of_life/src/Evolution.cpp
/* Evolution.cpp: implementation file for evolution classes; evolution classes do looped evolution of patterns in a defined 2 dimensional space */ #include "Evolution.h" #include "Board.h" #ifdef USE_SSE #define GRAIN_SIZE 14 #else #define GRAIN_SIZE 4000 #endif #define TIME_...
ALGO
0.999785
4.758105
dafb4ffd-85c4-4f21-9ac3-6f38021110c2
abhishek18124/PPCPPFeb2025
Lecture 41/005Graphs_BipartiteUsingBFS.cpp
/* Given an undirected graph, check if it is bipartite or not ? */ #include<iostream> #include<vector> #include<queue> using namespace std; bool bfs(int src, int color, const vector<vector<int>>& adj, vector<int>& colorMap) { queue<int> q; q.push(src); colorMap[src] = color; while (!q.empty()) { int cur ...
ALGO
0.999929
5.412953
7be38f20-1ab7-405a-9c3b-be74daed7bf9
darkshuige/codecode
c code/Hashing (25).cpp
#include<bits/stdc++.h> #define int long long #define endl "\n" #define jiasu ios::sync_with_stdio(false),cin.tie(0),cout.tie(0) #define inf 0x3f3f3f3f3f3f3f3f using namespace std; const int maxn=1005; map<int,int>mp; vector<string>ans; int isp(int a) { if(a<=1) return 0; for(int i=2;i<a;i++) if(a%i==0) return 0; ...
ALGO
0.999954
3.675881
f0cafdfe-ee8b-4381-bc9a-d9a5b3b9d2af
BlueNightHawk/hl_new_tempents
utils/qcsg/qcsg.cpp
// csg4.c #include "csg.h" /* NOTES ----- check map size for +/- 4k limit at load time */ int brushfaces; int c_csgfaces; FILE* out[NUM_HULLS]; int c_tiny, c_tiny_clip; int c_outfaces; qboolean hullfile = false; static char qhullfile[256]; qboolean glview; qboolean noclip; qboolean onlyents; qboolean wadtext...
ALGO
0.90297
4.423796
995956c6-1d5d-4dab-aa81-b9f5ef3c5719
eXeC64/NightmareHouse
src/mathlib/almostequal.cpp
#include <float.h> #include <math.h> #include "mathlib/mathlib.h" static inline bool AE_IsInfinite(float a) { const int kInfAsInt = 0x7F800000; // An infinity has an exponent of 255 (shift left 23 positions) and // a zero mantissa. There are two infinities - positive and negative. if ((*(int*)&a & 0x...
TOOL
0.930341
6.349646
42507d46-27da-4003-a18d-2752738c0f70
insecurenet/FreeBSD-ports
textproc/randlm/files/patch-BloomMap.cpp
--- src/RandLM/BloomMap.cpp.orig 2017-03-07 00:13:58 UTC +++ src/RandLM/BloomMap.cpp @@ -272,7 +272,7 @@ namespace randlm { bool BloomMap::computePaths() { // determine the path lengths based on distribution for codes of each type - assert(stats_counters_ && root_ == NULL && max_code_ > 0); + assert(s...
ALGO
0.978707
6.830337
bfbd22cc-ec6f-4059-ab5a-e450e5d74dde
mdshadesh/Codeforcesall-problem-solution-
1748A.cpp
#include<iostream> #include<algorithm> #include<cstring> using namespace std; int t; int main() { cin>>t; while(t--) { int n; cin>>n; cout<<n/2+(n%2?1:0)<<endl; } return 0; }
ALGO
0.999656
4.375038
5fc2ec48-2d6a-4ba7-80b0-92c4b17b9800
luthfiarsd/tgslat-sem1
TLX/6-Perulangan/statistika-sederhana.cpp
#include <iostream> using namespace std; int main() { int N, maks = -999999, min = 999999; cin >> N; for (int i = 0; i < N; i++) { int x; cin >> x; if (x > maks) { maks = x; } if (x < min) { min = x; } } c...
ALGO
0.999974
4.585549
add357f5-fbec-4747-8bae-8fe85700ba2e
Saikiran-git/Cpp
Data Structures/Inorder Preorder Postorder traversal.cpp
/*Inorder preorder and postorder traversal*/ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #include <bits/stdc++.h> using namespace std; struct TreeNode { int x; struct TreeNode* L; struct TreeNode* R; }; typedef struct TreeNode TreeNode; TreeNode* newNo...
ALGO
0.999841
4.510864
29843581-792a-4e28-bbe0-6a3edb694d66
GauravVaria/CPP
Experiment 4 Static Members/2.cpp
// 1. Write a program to calculate percentage of a student by declaring function grade() as public in a class student. // Data members are rollno, mark1, mark2 and grade declare as by default access specifier. count is declared as static variable. // The value of count is assigned to rollno. // Create two objects as S1...
TOOL
0.887616
4.013738
741ab6ec-cf04-489b-94ff-3bbb43f1f5ad
JosephTseng1/leetcode-solutions
pascalTriangleII.cpp
class Solution { public: vector<int> getRow(int rowIndex) { if (rowIndex == 0) { return {1}; } if (rowIndex == 1) { return {1, 1}; } vector<int> result = {1, 1}; vector<int> curr; for (int i = 2; i <= rowIndex; i++) { curr.p...
ALGO
0.999952
6.416474
ef0cc14e-1443-43bb-8002-e078e9bcc6b7
heathkh/iwct
snap/opencv2/core/src/mathfuncs.cpp
#include "precomp.hpp" namespace cv { static const int MAX_BLOCK_SIZE = 1024; typedef void (*MathFunc)(const void* src, void* dst, int len); static const float atan2_p1 = 0.9997878412794807f*(float)(180/CV_PI); static const float atan2_p3 = -0.3258083974640975f*(float)(180/CV_PI); static const float atan2_p5 = 0.155...
ALGO
0.99768
3.573189
edef26ad-9e27-44c7-99f9-5fda69ed70a6
MoryaNischay/DS
Greedy Algorithms/Huffman.cpp
#include <bits/stdc++.h> using namespace std; //huffman coding struct node{ char data; int freq; node *left; node *right; node(char data,int freq){ this->data=data; this->freq=freq; left=right=NULL; } }; struct compare{ bool operator()(node *l,node *r){ ret...
ALGO
0.999924
4.119842
cbca596b-7045-4e0c-ae84-0b91b3340c57
Sudhir769/Sudhirleet769
Difficulty: Easy/Reverse a linked list/reverse-a-linked-list.cpp
//{ Driver Code Starts // Initial Template for C++ #include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <cstdio> #include <ios> #include <iostream> #include <random> #include <sstream> #include <stdio.h> #include <stdlib.h> #include <string> #include <vector> using namespace std; /* Link list Node *...
ALGO
0.999058
6.504623
7a08971a-03ce-4709-b184-7de9cf65a89d
savetree-1/LeetCode
LeetCode/744-network-delay-time/network-delay-time.cpp
class Solution { public: int networkDelayTime(vector<vector<int>>& times, int n, int k){ vector<vector<pair<int,int>>>graph(n+1); for(auto& edge:times) { graph[edge[0]].push_back({edge[1],edge[2]}); } vector<int>dist(n+1,INT_MAX); dist[k]=0; priority_queue<pair<int,...
ALGO
0.999988
6.101233
8d348082-7635-4e2b-b9f5-1d3fa4476d4c
orhaimwerthaim/AOS-Solver
nlohmann_json/test/thirdparty/Fuzzer/FuzzerSHA1.cpp
#include "FuzzerSHA1.h" #include "FuzzerDefs.h" /* This code is public-domain - it is based on libcrypt * placed in the public domain by Wei Dai and other contributors. */ #include <iomanip> #include <sstream> #include <stdint.h> #include <string.h> namespace { // Added for LibFuzzer #ifdef __BIG_ENDIAN__ # defi...
ALGO
0.903451
7.45007
94793c88-2f12-46b7-b400-e4c87d3589de
viswanadhchakravarthi/Strivers_SDE_Sheet_Challenge
Number of Distinct Substrings in a String.cpp
struct Node { Node * links[26]; bool containsKey(char ch) { return (links[ch - 'a'] != NULL); } Node * get(char ch) { return links[ch - 'a']; } void put(char ch, Node * node) { links[ch - 'a'] = node; } }; int countDistinctSubstrings(string &s) { Node * root = new Node(); int count...
ALGO
0.999984
5.874287
29becfae-d006-4d69-a2b3-27c1e25e274b
Henrik-Yao/NEUQ-ACM-Solution
winter-day1/陈益章/7-8.cpp
#include<iostream> #include<stack> #include<cstring> using namespace std; stack <char> Q; char s[11000]; int main() { int T,i; Q.push('#'); scanf("%d",&T); while(T--) { scanf("%s",s); int len=strlen(s); for(i=0;i<len;i++) { if(s[i]!='['&&s[i]!=...
ALGO
0.999782
3.588843
d8c6d403-018e-42b0-8a1d-5a0ad6355ae4
pawandev200/Leetcode_Dsa
0129-sum-root-to-leaf-numbers/0129-sum-root-to-leaf-numbers.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.999976
6.076847
053c9fd7-55f2-48ae-bf43-798c6f803a7d
kkoushik5669/competetive-programming
maths/phi_1_to_n.cpp
void phi_1_to_n(int n) { vector<int> phi(n + 1); for (int i = 0; i <= n; i++) phi[i] = i; for (int i = 2; i <= n; i++) { if (phi[i] == i) { for (int j = i; j <= n; j += i) phi[j] -= phi[j] / i; } } } //same approach as seives apparently so time comple...
ALGO
0.999562
5.219196
dea5680a-bae6-4593-8d9c-e40ae3a8beba
rangga2181/Praktikum-Struktur-Data-Assignment
MODUL 2 ARRAY/UNGUIDED/unguided1.cpp
#include <iostream> #include <vector> using namespace std; int main() { int n; cout << "Enter the number of elements: "; cin >> n; vector<int> data(n); vector<int> genap, ganjil; cout << "Enter the elements: "; for (int i = 0; i < n; i++) { cin >> data[i]; } for (int...
ALGO
0.999432
4.741686
c12ce1ab-1a11-4a96-b052-da5453c1b96f
HawaMuhumedAli/SERVICE_Finder
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.998733
6.76775
7947db3a-1aaf-41cd-b64a-198d7572f8a6
ishandutta2007/codeforces
ytkn/normal/1493/D.cpp
#include <iostream> #include <algorithm> #include <iomanip> #include <vector> #include <queue> #include <set> #include <map> #include <numeric> #include <functional> #include <cassert> #define debug_value(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << #x << "=" << x << endl; #define debug(x) cerr << "lin...
ALGO
0.999819
3.989677
ed885712-36c9-4465-a295-c6d0cb237efd
Saisriram01/LeetCode-et-al
Leetcode/Week 8/BinaryTreeLevelOrderTraversalII.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.999978
6.303432
0c0861fe-292b-4f95-8b4d-ca1e7c49449a
muhammedashikCQ/MytraApp
FrontEnd/mytra_app/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.998428
6.76073
e8392c7f-301a-440a-97af-d1f40cdc5e3d
vlluvia/algorithm
pat/甲级/1028.cpp
#include<bits/stdc++.h> #define INF 1<<29 using namespace std; struct student { int id; string name; int grade; }; int n, c; vector<student> students; bool cmp1(student s1, student s2) { return s1.id < s2.id; } bool cmp2(student s1, student s2) { if (s1.name.compare(s2.name) == 0) { re...
ALGO
0.999521
4.528191
fdbf9e04-9a55-4cd7-917c-ba6e24539f2c
yutachaan/kyoupuro
atcoder/other contest/math-and-algorithm/091.cpp
// #define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; // <----- alias -----> using ll = long long; const int inf = numeric_limits<int>::max() / 2; const ll infl = numeric_limits<ll>::max() / 2; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using vvl = vector<vl>; using ...
ALGO
0.999976
5.529615
8eaff3bb-7f8f-4329-aeb2-e304ed92f907
sauleddy/C_plus
data_structure/DoubleLinkedList/main.cpp
/* * File: main.cpp * Author: eddy * * Created on February 25, 2017, 8:36 PM */ #include <cstdlib> #include <iostream> #include "DoubleLink.h" using namespace std; /* * */ int main(int argc, char** argv) { DoubleLink<int> dlink; for (int i = 0; i < 10; i++) { dlink.insert(0, i+10...
ALGO
0.887292
3.476457
1b915217-fb7a-4fb7-a86a-cb960d854fc7
mansistic-0n3/LeetCode-Solutions
2134-minimum-swaps-to-group-all-1s-together-ii/2134-minimum-swaps-to-group-all-1s-together-ii.cpp
class Solution { public: int minSwaps(vector<int>& nums) { int op1 = minSwapsHelper(nums, 0); // Grouping all 0s together int op2 = minSwapsHelper(nums, 1); // Grouping all 1s together return min(op1, op2); } private: int minSwapsHelper(const vector<int>& data, int val) { ...
ALGO
0.999999
6.842706
ebf27a9a-19e9-42b2-a338-3f87bf74179a
pufengdu/UltraPse
PseModCorrelation.cpp
#include "PseModCorrelation.h" #include "PseCUI.h" using namespace std; using namespace UltraPse; PseModule *UltraPse::PseModCorrelation::Init(const char *n) { return new PseModCorrelation(n); } UltraPse::PseModCorrelation::PseModCorrelation(const char *n) :PseModule(n) { Length = 0; Lambda = 0; SubT...
ALGO
0.931375
4.19743
ef69f0db-b823-4ffa-a819-c7334fcd0a93
eosspark/eos-sidechain
SideChain/externals/binaryen/test/emscripten/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp
#include "BulletCollision/CollisionShapes/btConvexShape.h" #include "btGjkEpaPenetrationDepthSolver.h" #include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h" bool btGjkEpaPenetrationDepthSolver::calcPenDepth( btSimplexSolverInterface& simplexSolver, const btConvexShape* pConvexA, const btConvexShape...
ALGO
0.999532
5.955621
5228b1ae-62bb-4c27-883f-a564819c96ad
mono-1729/AtCoder_cpp
ABC/101/b.cpp
#include <bits/stdc++.h> #include <unordered_map> #include <stdlib.h> using namespace std; #define rep(i, a, n) for(ll i = a; i < n; i++) #define rrep(i, a, n) for(ll i = a; i >= n; i--) #define ll long long #define pii pair<int, int> #define pll pair<ll, ll> //constexpr ll MOD = 1000000007; constexpr ll MOD = 99824435...
ALGO
0.999992
4.731058
5dc566da-53ad-4255-a1fe-020e85ad78e6
HoangDai21/vs_code_full_primemium
lab3.cpp
#include<iostream> using namespace std; class Ts{ private: string ten; int diemtoan; int diemvan; public: Ts(string ten = "", int diemtoan = 0, int diemvan = 0){ this->ten = ten; this->diemtoan = diemtoan; this->diemvan = diemvan; ...
ALGO
0.993028
3.93641
2aa6e03d-0451-4de1-8b01-6e0cf6781778
SH4MDEL/boj-algorithm
Algorithm/Algorithm/16562 - 친구비.cpp
#include <iostream> #include <vector> #include <algorithm> #define inf 987654321 #define endl "\n" using namespace std; int n, m, k, sum_cost; int cost[10101]; int disjoint_set[10101]; int min_cost[10101]; int uf_find(int n) { if (disjoint_set[n] == -1) return n; return disjoint_set[n] = uf_find(disjoint_set[n]); ...
ALGO
0.999992
4.373304
35a84ea1-31be-4e00-8920-616e6ac88cbd
MaTb3a/Leetcode
0241-17-3394-check-if-grid-can-be-cut-into-sections/0241-17-3394-check-if-grid-can-be-cut-into-sections.cpp
class Solution { public: bool check(vector<vector<int>>& v,int d){ sort(v.begin(),v.end(),[&](vector<int>&a,vector<int>&b){ return a[d] < b[d]; }); int cnt = 0 , mx = v[0][d+2]; for(int i = 1 ; i < v.size();i++){ cnt+=(mx <= v[i][d]); mx = max(mx,v...
ALGO
0.999942
5.937492
0286bfa5-1ba8-4080-8c13-c936e9b22ba0
saarang123/Competitive-Programming
APIO/2021/practice/aplusb/cpp/grader.cpp
#include "aplusb.h" #include <cassert> #include <cstdio> int main() { int A, B; assert(2 == scanf("%d %d", &A, &B)); int result = add_two_numbers(A, B); printf("%d\n", result); return 0; }
ALGO
0.941139
4.334081
5c56e005-46f1-461f-91e1-2d7b0656e713
durgeshkk/2023_11_23_Codechef
Lunchtime/16-04-2022 April Lunctime/1.cpp
#include<bits/stdc++.h> #include <deque> #define ll long long int using namespace std; void solve() { ll x; cin>>x; if(x>=1 && x<=4){ cout<<"YES\n"; } else{ cout<<"NO\n"; } return; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ...
ALGO
0.999012
4.21048
51063d6e-a239-4925-b235-e70cff053430
kasa021/atcoder-archives
abc098/arc098_a_42104265_AC.cpp
/* * Author: kAsA02 * Submission URL: https://atcoder.jp/contests/abc098/submissions/42104265 * Submitted at: 2023-06-09 17:57:31 * Problem URL: https://atcoder.jp/contests/abc098/tasks/arc098_a * Result: AC * Execution Time: 18 ms */ #include <bits/stdc++.h> using namespace std; int main() { int n; st...
ALGO
0.999943
4.508261
56a62bc1-a26a-4a30-9e0e-1d7c7e4fc8d6
hieupm123/templateCP
A.cpp
// minum distance with point in Ox #ifndef DEBUG_TEMPLATE_CPP #define DEBUG_TEMPLATE_CPP #include <bits/stdc++.h> // #define cerr cout namespace __DEBUG_UTIL__ { using namespace std; /* Primitive Datatypes Print */ void print(const char *x) { cerr << x; } void print(bool x) { cerr << (x ? "T" : "F"); } ...
ALGO
0.999578
3.947409
e8f3f13b-7ea0-4677-9f6f-de53afa1d3d3
hungg261/baitap-thayHai
solutions/WISCHEDULE.cpp
/****************************************************************************** Link: WISCHEDULE Code: WISCHEDULE Time (YYYY-MM-DD-hh.mm.ss): 2025-02-05-20.38.00 *******************************************************************************/ #include<bits/stdc++.h> #define left sussy using namespace std; const int MA...
ALGO
0.999959
4.587567
dd8e128f-03da-42ad-b961-6368d0b44b71
ValeriiKoniushenko/VaKon2D
dependencies/boost_1_80_0/libs/compute/perf/perf_is_permutation.cpp
#include <algorithm> #include <iostream> #include <numeric> #include <vector> #include <boost/compute/system.hpp> #include <boost/compute/algorithm/is_permutation.hpp> #include <boost/compute/container/vector.hpp> #include "perf.hpp" int rand_int() { return static_cast<int>((rand() / double(RAND_MAX)) * 25.0); }...
TEST
0.979298
6.315448
b3bc25a3-59ff-403e-a5cc-267c3cf07ac3
Abdullah-Builds/Data_Structures_And_Algorithms
Binary_Tree/Sum_Tree.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *left; Node *right; Node(int v) { val = v; left = nullptr; right = nullptr; } }; Node *Built_Tree() { int data; cout << "Enter data (-1 for no node): "; cin >> data; if (data ...
ALGO
0.999918
5.938966
dbbdcfca-9b7d-41d1-99b2-014208034225
DavidLi7/Competitive-Programming
USACO/2021-2022/Gold/HILO4.cpp
#include <iostream> #include <set> #include <vector> using namespace std; const int MAXN = 2e5 + 5; int N, p[MAXN], t[4 * MAXN], s[4 * MAXN]; bool marked[4 * MAXN], hasHi[4 * MAXN]; void push(int v) { if (marked[v]) { t[v*2] = t[v*2+1] = t[v]; marked[v*2] = marked[v*2+1] = true; marked[v...
ALGO
0.999979
3.981964
cebc3638-895a-45e2-a2dc-b8e9ee1a7aa7
ronandoolan2/c-_codility_lessons_solutions
MinAvgTwoSlice.cpp
#include <algorithm> #include <limits.h> #include <numeric> // you can write to stdout for debugging purposes, e.g. // cout << "this is a debug message" << endl; int solution(vector<int> &A) { float min_slice = (std::accumulate(A.begin(), A.end(), 0))/A.size();//INT_MAX; int start_pos = 0; // write your co...
ALGO
0.99992
5.262684
77298bfa-cf72-4f05-8599-8752db3adc84
YunFeng0817/data-structures-exercise
lineStructure/operation.cpp
// // Created by Fitz on 2017/10/31. // #include <iostream> #include <math.h> using namespace std; string operation = "+-*/()%"; //άȼ /* + - * / ( ) % */ bool pority[7][7]={ /* + */{false,false,true,true,true,false,true}, /* - */{f...
ALGO
0.999919
3.801395
f1405224-786f-44fc-9955-dbed78b5d5c4
ToshihideMatsuda/atcoder
programs/ABC/ABC100-199/ABC180/D.cpp
#include <bits/stdc++.h> using namespace std; #define debug false #define rep(i,n) for(int i = 0; i < n; i++ ) #define reps(i,m,n) for(int i = m; i < n; i++ ) typedef long long ll; #define INF 1 << 28 #define MINF -1*(1 << 28) #define INF_LL 1LL << 60 #define MINF_LL - (1LL << 60) #define MOD 998244353 #if ...
ALGO
0.999565
4.237267
f56a61a0-f80a-49fc-89ed-9a8a8e23026c
raincross7/code-similarity
codes/train_code/problem430/problem430_270.cpp
#include <cstdio> using namespace std; int main(){ int a, b; scanf("%d %d", &a, &b); int d = a / b; int r = a % b; double f = 1.0 * a / b; printf("%d %d %.5lf\n", d, r, f); return 0; }
ALGO
0.999617
3.987209
8447bccf-657b-4ce7-ac25-0cdd36fa3efe
Wonkyu-Lee/CtCI-6th-cpp
ex_17_05.cpp
// // Created by blazeq on 2017. 12. 9.. // #include "catch.hpp" #include <vector> #include <unordered_map> #include <iostream> namespace ex_17_05 { using namespace std; namespace solution1 { bool hasEqualDigitsAlphabets(const vector<char>& array, int start, int end) { int delta = 0; for (int i = 0; i <= e...
ALGO
0.998527
6.030418
87905a9d-09bb-4ffe-a93a-98640aa889f1
mariiemik/algorithms-2024
median.cpp
/*Во время аккредитации эксперту необходимо провести собеседование с обучающимися по образовательной программе. Но студентов достаточно много и побеседовать со всеми у эксперта нет возможности, поэтому он попросил учебный отдел выбрать троих представителей: «слабый студент» — студент с самым низким «средним баллом заче...
ALGO
0.999577
3.553195
18cb6bc2-4394-4bef-8dfa-44f110dc89c7
HashirAKhan/135-Software-Analysis-and-Design-Labs
Project 3/dwarves B/state.cpp
#include "common.h" #include "state.h" #include <queue> #include <utility> #include <cassert> using namespace std; bool in_range(State &st, int r, int c) { return (r >= 0 && r < st.rows && c >= 0 && c < st.cols); } bool operator==(Loc &a, Loc &b) { return a.r == b.r && a.c == b.c; } bool is_agent(Object &obj) ...
ALGO
0.996864
4.030429