uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
ebf9e431-f696-4645-884a-95fd3ef08ddb
hey-rum-ba/G4G-DSA
Absolute difference divisible by K.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: long long countPairs(int n, int arr[], int k) { // code here map<int, int> mp; for (int i = 0; i < n; i++) { arr[i] ...
ALGO
0.999859
5.485364
26cea9d9-4e86-41fb-8071-050e1098886b
chao89/-C-Tutorial
day02/refarg.cpp
#include <iostream> using namespace std; int maximum (int x, int y) { return x < y ? y : x; } int max_min (int x, int y, int* z) { *z = x < y ? x : y; return x < y ? y : x; } int max_min (int x, int y, int& z) { z = x < y ? x : y; return x < y ? y : x; } void swap1 (int x, int y) { int z = x; x = y; y = z; } vo...
ALGO
0.982827
3.186853
43361c4a-17c4-4333-a19b-e22bd4e090e7
BeeEyeDmu/Practice2024
020_sum3/020_sum3.cpp
#include <stdio.h> int main() { int n1, n2, n3; int sum = 0; scanf_s("%d %d %d", &n1, &n2, &n3); for (int i = n1; i <= n2; i++) { if (i % n3 == 0) { printf("%d ", i); sum += i; } } printf("\n"); printf("%d부터 %d까지 %d의 배수의 합 : %d\n", n1, n2, n3, sum); }
ALGO
0.999864
3.542555
f7fe33dd-bf82-43bc-b7e6-4578871e767a
PranshuSrivastava/Data-Structures-And-Algorithms
find-numbers-with-even-number-of-digits/find-numbers-with-even-number-of-digits.cpp
class Solution { public: int countDigits(int n) { int count =0; do{ n/=10; count++; }while(n); return !(count & 1); } int findNumbers(vector<int>& nums) { int count = 0; int n = nums.size(); for(int i=0;i<n;i++) { ...
ALGO
0.999963
6.314056
07cd233b-843a-4757-9866-88857fd0ed68
manuelTorrealba/tofu
src/cfd/finiteVolume/finiteVolume/snGradSchemes/uncorrectedSnGrad/uncorrectedSnGrads.cpp
#include "finiteVolume/finiteVolume/snGradSchemes/uncorrectedSnGrad/uncorrectedSnGrad.hpp" #include "finiteVolume/fvMesh/fvMesh.hpp" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // makeSnGradScheme(uncorrectedSnGrad) // *****************************************************************...
ALGO
0.856928
5.3457
cfb324bc-99b2-45ab-9778-6484ce3cf2ce
M7moudHussein/Http-Protocol
models/http_utils.cpp
#include <asm/ioctls.h> #include <sys/ioctl.h> #include "http_utils.h" std::string http_utils::get_content_type(std::string url) { std::string file_extension = url.substr(url.rfind('.') + 1); if (file_extension == "txt") { return "text/plain"; } else if (file_extension == "html") { return "...
WEB
0.910355
4.874996
7a0247e8-7ff3-4440-a4f5-727a287f7e71
ElTantawy/mimd_to_simt
SSDE/LLVM/llvm/lib/Support/APInt.cpp
#include "llvm/ADT/APInt.h" #include "llvm/ADT/FoldingSet.h" #include "llvm/ADT/Hashing.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/raw_ostream.h" #include <cmath>...
TOOL
0.892768
4.275618
dbae40b0-0d14-49c4-bd1b-3c39efa03560
Tapesh-1308/cpp-journey
love_babbar_dsa_sheet/10_Stacks & Queues/30_first_circular_tour_petrol_pump.cpp
// C++ program to find circular tour for a truck #include <bits/stdc++.h> using namespace std; // Approach - TC O(N) SC O(1) // A petrol pump has petrol and distance to next petrol pump class petrolPump { public: int petrol; int distance; }; // The function returns starting point if there is a // possible solution...
ALGO
0.999973
5.548907
341642f9-6c44-4cab-bb20-7d0590e5953a
PrinceTimilsina/SEE-ComputerEngineering-
OOPs(C++)/armstrong.cpp
#include<iostream> using namespace std; int main(){ int n,r,c,s=0; cout<<"Enter a number"; cin>>n; c=n; while(n>0){ r=n%10; s=(r*r*r)+s; n=n/10; } if(c==s){ cout<<"The number is armstrong"; } else{ cout<<"The number is not armstrong"; } return 0; }
ALGO
0.999946
4.356699
9ca1b8ce-334d-4df9-8037-22a37cb6ee35
falcaoanderson/CompetitiveProgramming
CodeForces/cf-1166-C.cpp
/* 26/07/25 */ #include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL) #define PB push_back #define EB emplace_back #define FF first #define SS second #define sz(x) (int)(x).size() typedef pair<int, int> pii; typedef tuple<...
ALGO
0.999983
4.160476
1d59c6bf-38c8-427e-9880-d3d1e65711b7
sarvex/leetcode-ruby
solution/0500-0599/0513.Find Bottom Left Tree Value/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.999996
6.459081
93ef38b5-ac66-425e-8c24-8b1d030d9294
kknaks/study
코딩테스트/0주차 예제/15_ex_che.cpp
#include <bits/stdc++.h> using namespace std; const int max_n = 40; bool che[max_n+1]; vector<int> era(int mx_n) { vector<int> v; for (int i = 2; i <= max_n; i++){ if(che[i]) continue; for (int j = 2*i; j <= mx_n; j += i){ che[j] = 1; } } for(int i = 2; i <= mx_n; i...
ALGO
0.998929
4.755184
e29d91c3-f32b-4b75-945d-79f73a312fa0
IbrahimRashiid/Data-structure-
Assignment2/A2_P3.cpp
// // main.cpp // p3 // // Created by Fatma Ahmed on 14/05/2022. #include <iostream> using namespace std; template<class t> class queue{ struct node{ t number; node*next; }; node*head=NULL; int size=0; public: int SIZE(){ return size; } bool isempty(){ ...
ALGO
0.988075
4.109902
ffb48b7a-6136-4f3c-a97f-06e51ea2c021
tajwone17/Competitive-programming
CodeForce/A_Deranged_Deletions.cpp
#include <bits/stdc++.h> using namespace std; #define freePalestine \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define int long long int #define endl "\n" #define no cout << "NO" << endl #define yes cout << "YES" << endl #define technologia return 0 // const...
ALGO
0.999895
4.318282
620ffd19-8af6-47bd-bd62-c1a33db9c424
ishandutta2007/codeforces
eddy1021/normal/1107/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int N=5252; bitset<N> b[N]; int n; char buf[N]; inline int chg(char ctmp){ if(isdigit(ctmp)) return ctmp-'0'; return ctmp-'A'+10; } bool sr[N], sc[N]; int main(){ scanf("%d", &n); for(int i=0; i<n; i++){ scanf("%s", buf); for(int ...
ALGO
0.99985
3.8583
abc88fc8-25b6-471b-afc0-ab5524a9de29
hieu-ln/IT81-14
CodeC3/MinhNhat_C3_Bai1.cpp
#include <iostream> using namespace std; #define MAX 100 int a[MAX]; int n; void nhap() { cout << "Nhap vao so luong phan tu: "; cin >> n; cout << "Nhap vao cac gi tri cho phan tu: "; for (int i = 0; i < n;i++) { cin >> a[i]; } } void xuat() { cout << "Gia tri cac phan tu cua danh sach laf: "; for (int i = ...
ALGO
0.999876
3.841848
00dd9954-2b78-4173-a346-dbc3a2dcea10
pawelswoboda/LP_MP-QAP
src/graph_matching_mcf_left.cpp
#include "graph_matching.h" #include "visitors/standard_visitor.hxx" using namespace LP_MP; using namespace LP_MP::TorresaniEtAlInput; int main(int argc, char** argv) { MpRoundingSolver<Solver<LP<FMC_MCF<PairwiseConstruction::Left>>,StandardTighteningVisitor>> solver(argc,argv); solver.ReadProblem(parse_problem<Solve...
ALGO
0.998626
3.103805
1a952a9f-eb08-4b8f-ae70-cb4f90f1c735
AyaseCore/Noggit3
Noggit3libs/Boost/libs/intrusive/example/doc_erasing_and_disposing.cpp
using namespace boost::intrusive; //A class that can be inserted in an intrusive list class my_class : public list_base_hook<> { public: my_class(int i) : int_(i) {} int int_; //... }; //Definition of the intrusive list typedef list<my_class> my_class_list; //The predicate function struct is_e...
TOOL
0.941137
6.384149
5ff2e98d-80eb-48bb-86b3-b0de93c3ef0d
ishandutta2007/codeforces
maroonrk/normal/1184/C1.cpp
#include <bits/stdc++.h> using namespace std; using ll=long long; #define int ll #define rng(i,a,b) for(int i=int(a);i<int(b);i++) #define rep(i,b) rng(i,0,b) #define gnr(i,a,b) for(int i=int(b)-1;i>=a;i--) #define per(i,b) gnr(i,0,b) #define pb push_back #define eb emplace_back #define a first #define b second #defi...
ALGO
0.999942
3.558381
d79c9fde-6648-46a7-9aee-7ba5c6f387e5
vvviktor/LeetCode_Problems
2707_Extra_Characters_in_a_String/solution.cpp
#include <algorithm> #include <string> #include <string_view> #include <vector> class Solution { class Trie { public: struct Node { int next[26] = {}; bool is_terminal = false; }; Trie() : trie_(1) {} void AddWord(std::string_view word) { ...
ALGO
0.999818
6.255362
200face0-756c-450b-84ad-49826e54fb36
hayd1n/CS2002302-Data-Structure
homeworks/bonus/main.cpp
#include "bellman_ford.hpp" #include "dijkstra.hpp" #include "global.h" #include <climits> #include <cstdio> #include <cstring> #include <iostream> using namespace std; int findVar(char **vars, size_t vars_size, int *vars_num, char *target) { for (int i = 0; i < *vars_num; ++i) { if (strcmp(vars[i], target) ==...
ALGO
0.999707
3.986484
809cdbd5-b2d1-437a-a440-74c5ccd2539f
ginkage/aoc2017
10/10b.cpp
#include "../lib.hpp" int main() { string s; getline(cin, s); vector<int> in; //= split_i(s, ","); for (char c : s) in.push_back(c); in.insert(in.end(), { 17, 31, 73, 47, 23 }); vector<uint8_t> v(256); for (int i = 0; i < 256; i++) v[i] = i; int cur = 0, skip = 0; ...
ALGO
0.999607
4.620063
70eb7128-89f0-4513-a96b-853f4363a5f7
htaniguchi88/cpp_study
atcoder/abc133b.cpp
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int N, D; cin >> N >> D; vector<vector<int>> vector2d; for (int i=0; i<N; ++i) { vector<int> vector1d; vector2d.push_back(vector1d); for (int j=0; j<D; ++j) { int number; cin >> number; vecto...
ALGO
0.999705
3.149661
4f1ceba8-d91f-41ed-9bd0-eda924e2c726
Sofia1401/import-proyect-2
thirdparty/msdfgen/core/edge-segments.cpp
#include "edge-segments.h" #include "arithmetics.hpp" #include "equation-solver.h" namespace msdfgen { void EdgeSegment::distanceToPseudoDistance(SignedDistance &distance, Point2 origin, double param) const { if (param < 0) { Vector2 dir = direction(0).normalize(); Vector2 aq = origin-point(0); ...
ALGO
0.998901
5.225875
e31a6180-edf6-46e2-a5f2-a38fe60cd5d4
MridulGupta75/Leetcode-Daily-challanges-all
2316-count-unreachable-pairs-of-nodes-in-an-undirected-graph/2316-count-unreachable-pairs-of-nodes-in-an-undirected-graph.cpp
class Solution { public: void dfs(vector<int>adj[],int src,vector<bool>&vis,int &counter){ if(vis[src]) return; vis[src]=true; counter++; for(auto ele:adj[src]){ if(!vis[ele]){ dfs(adj,ele,vis,counter); } } } long long countPai...
ALGO
0.999963
5.558761
0d5b0bb4-a2be-4874-ae85-eb006cfd1d86
Utkarsh9799/LeetCode-Solutions
Reverse Linked List II.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* reverseBetw...
ALGO
0.999996
5.860195
e652e025-f19f-410d-80f3-f579ca287fc3
Dishant402955/DSA
Practice-Questions/Leetcode/2491.Divide-Players-Into-Teams-of-Equal-Skill.cpp
class Solution { public: long long dividePlayers(std::vector<int>& skill) { std::sort(skill.begin(), skill.end()); int left = 0, right = skill.size() - 1; int teamSkill = skill[left] + skill[right]; long long totalChemistry = 0; while (left < right) { if (teamSki...
ALGO
0.999951
5.833034
ba3f3f97-84ee-41bf-aee0-097de58b2311
LovelyBika/DSA-Practice
LovelyCode/Graph/graph.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e3 + 10; int Graph1[N][N]; vector<pair<int, int>> Graph2[N]; int main() { int n, m, wt; cin >> n >> m; // n->Nodes || m->edges int v1, v2; for (int i = 0; i < m; i++) { cin >> v1 >> v2 >> wt; Graph1[v1][v2] = wt; Graph1[v2][v1] = wt; ...
ALGO
0.999982
3.997946
1d6723f6-b738-4f3b-a263-75c365fe66e0
Lotu527/ElGamal
key.cpp
#include "key.h" #include "tool.h" #include "md5.h" #include<iostream> #include<stdio.h> #include<QDebug> Key::Key() { } Key::Key(int bitlen) { initRandom(); bigNumber p = GeneratePrime(bitlen); bigNumber g = GenerateRandomMax(p); bigNumber x = GenerateRandomMax(p); bigNumber y = Pow(g,x,p); /...
TOOL
0.935467
4.149155
34e946b1-9d74-4f2b-bbcf-74da8402a15c
iagoCL/ActorFramework
ActorFramework/src/ExecutionUnit.cpp
#include <algorithm> #include <iostream> #include "../include/ExecutionUnit.h" #include "../include/Logger.h" namespace ActorFramework { ExecutionUnit::ExecutionUnit() : newActorId(0) { MPI_Init(NULL, NULL); MPI_Comm_rank(comm, &rank); Logger::printMessage(0, rank, Logger::LogLevel::ALL_ST...
ALGO
0.919838
6.910864
26d20150-67f7-4f90-aeb6-a36f2e7a51b1
HasaliEdirisinghe/ProgrammingConcepts
Homework4/HW 4.5.cpp
#include <iostream> using namespace std; // function to compute the greatest common divisor of two integers read from input data. void greatestCommonDivisor() //define the function { int n1, n2, gcd, i; //n1,n2 - user input integers , gcd-greatest common devisor , i-iterator value to find gcd //getting us...
ALGO
0.992544
4.163968
f11bd4dc-ebd0-4f16-877b-c52cbb98872d
adarsh-1262/Leet-Code-Solutions
35. Search Insert Position.cpp
// 35. Search Insert Position // Solution:- // CODE: class Solution { public: int searchInsert(vector<int>& nums, int target) { int low = 0; int high = nums.size()-1; int mid=0; int ans; while(low <= high){ mid = (low+high)/2; if(nums[mid] == ...
ALGO
0.999996
6.348568
fd84b318-8afc-4fdd-8f09-86adb8bfef5b
canzalon/algorithm-runtime-analysis
algoOption.cpp
/***************************************************************************** Project: algorithm-runtime-analysis Author: Christopher Anzalone File: algoOption.cpp Description: In this project I have implemented an insertion, heap, and quick sort to sort arrays of randomly generated numbers of varying length. There ...
ALGO
0.992519
4.28295
15fed775-4986-44c5-aa96-6534f63ce52f
j343my/spectrogarm-qt
thirdparty/opencv/modules/photo/src/hdr_common.cpp
#include "precomp.hpp" #include "opencv2/photo.hpp" #include "hdr_common.hpp" namespace cv { void checkImageDimensions(const std::vector<Mat>& images) { CV_Assert(!images.empty()); int width = images[0].cols; int height = images[0].rows; int type = images[0].type(); for(size_t i = 0; i < images.s...
TOOL
0.982843
5.92583
5324f554-2b84-4b9f-befe-80e9b3a496f1
Partha-SUST16/100_Days_Coding_Challange
CodeForces/From Begining/Div3-14-05-20/C.cpp
#include <iostream> #include <vector> #include <cmath> #include <set> #include <queue> #include <map> #include <cstdio> #include <cstring> #include <string> #include <stack> #include <algorithm> #include <limits.h> #include <bits/stdc++.h> #define fw(x) freopen("x.txt", "w", stdout) #define For(i, a, b, c) for (int i =...
ALGO
0.999915
3.995626
82855d58-c7a5-43de-9d5d-04349dd92790
yash0307jain/codechef-solutions
C Programs/closestpointsqueries.cpp
#include<stdio.h> int main() { long int cases,j,k,i=0,d,max=0; int a[600],b[600]; char c[600]; scanf("%ld",&cases); while(cases--) { printf("yash"); scanf("%c%d%d",&c[i],&a[i],&b[i]); max=0; if(i>0) { for(j=i;j>=0;j++) { for(k=j-1;k>=0;k++) { if((c[j]=='+')&&(c[k]=='+'...
ALGO
0.999808
3.330001
ace1f155-e459-409f-a768-1ba1634495eb
Ayush-Uniyal/GEEKSFORGEEKS-SOLUTIONS
Difficulty: Easy/Right View of Binary Tree/right-view-of-binary-tree.cpp
/* A binary tree node has data, pointer to left child and a pointer to right child struct Node { int data; struct Node* left; struct Node* right; Node(int x){ data = x; left = right = NULL; } }; */ // Should return right view of tree class Solution { public: // Function t...
ALGO
0.999923
5.876438
78faca44-1c95-49d3-bfdd-a281aef629c5
interdpth/RD1Engine
SimpleJSON-master/src/demo/example.cpp
#include <string> #include <sstream> #include <time.h> #include "../JSON.h" #include "functions.h" using namespace std; // Just some sample JSON text, feel free to change but could break demo const wchar_t* EXAMPLE = L"\ { \ \"string_name\" : \"string\tvalue and a \\\"quote\\\" and a unicode char \\u00BE and a c:\\\...
TOOL
0.863823
5.357932
addcfdd8-9c27-4f71-97a1-eda8de3d8732
Shree987/Year-of-CP
Days 41-50/Day 48/Path Sum III.cpp
/* Author : Shreeraksha R Aithal Problem name : Path Sum III Problem link : https://leetcode.com/problems/path-sum-iii/ Difficulty : Medium Tags : Binary Tree, Depth-first Tree, Tree */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * ...
ALGO
0.999938
6.233565
b878ce2a-c41c-4fd8-a23c-64e6e495220f
Nanored4498/Code-Forces
1500/1535B.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; typedef vector<int> vi; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while(t--) { int n; cin >> n; vi a(n); for(int &x : a) cin >> x; sort(a.begin(), a.end(), [](int i, int j) { return (i&1)...
ALGO
0.999636
4.167865
76094d9f-167f-46bc-870c-2860cb7a1370
sarvex/leetcode-holy-c
solution/0800-0899/0828.Count Unique Characters of All Substrings of a Given String/Solution.cpp
class Solution { public: int uniqueLetterString(string s) { vector<vector<int>> d(26, {-1}); for (int i = 0; i < s.size(); ++i) { d[s[i] - 'A'].push_back(i); } int ans = 0; for (auto& v : d) { v.push_back(s.size()); for (int i = 1; i < v.si...
ALGO
0.99999
6.32804
fb7f39be-e88c-4a5b-96da-c40408a9e619
rishisingh3301/DSA
GRAPH/11_Cycle_In_UG_BFS.cpp
#include<queue> bool detect(vector<int> adj[], int src, int vis[]){ vis[src]=1; queue<pair<int,int>> q; q.push({src,-1}); while(!q.empty()){ int node=q.front().first; int source=q.front().second; q.pop(); for(int i=0; i<adj[node].size();i++){ if(vis[adj[node][...
ALGO
0.999996
5.774175
e9ee76b5-f59b-4619-a53a-f29846e3b548
Amylo-jh/baekjoon
21000s/21567.cpp
#include <iostream> #include <vector> using namespace std; int main() { long long a = 1, temp; for(int i = 0; i < 3; i++) { cin >> temp; a *= temp; } vector <int> arr(10); while(a) { arr[a%10]++; a /= 10; } for(int i = 0; i < 10; i++) { ...
ALGO
0.99959
3.608303
db0cd54e-b541-4425-95ae-cb6e7100df06
thehashmap/leetcode
2133-check-if-every-row-and-column-contains-all-numbers/2133-check-if-every-row-and-column-contains-all-numbers.cpp
class Solution { public: bool checkValid(vector<vector<int>>& matrix) { int n = matrix.size(); set<int> horz , vert; for(int i = 0;i<n;i++){ for(int k = 1;k<=n;k++){ horz.insert(k); vert.insert(k); } for(int j = 0;j<n;j++){ ...
ALGO
0.999929
6.02552
b183c67d-d04c-4b6e-ac46-30fcbfbd560e
SalahuddinAfridi/cms
perimeter.cpp
# include <iostream> using namespace std; int perimeter(int lenght, int width); int main() { int lenght, width,peri; cout<<"enter the lenght :"; cin>>lenght; cout<<"enter the width :"; cin>>width; peri = perimeter(lenght,width); cout<<peri; return 0; } int perimeter(int lenght , int w...
ALGO
0.988747
3.379305
dd9ac864-8341-4e37-a564-5d912a448dab
VurtneWk/Arithmetic
Cpp/15_堆排序/15_堆排序.cpp
/** * @file 15_堆排序.cpp * @author vurtnewk * @brief */ #include <iostream> using namespace std; // 堆的下沉调整 void siftDown(int arr[], int i, int size) { // int val = arr[i]; while (i < size / 2) { int child = 2 * i + 1; if (child + 1 < size && arr[child + 1] > arr[child]) { chi...
ALGO
0.999948
5.005366
9c9e1a3f-310f-4364-befc-136677ce88ee
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_1103_7.cpp
#include <bits/stdc++.h> using namespace std; const long long mod = 1e9 + 7; const long long N = 1e5 + 5; int main() { ios::sync_with_stdio(0); cin.tie(0); ; long long k; string n; cin >> k; cin >> n; long long sn = n.size(); long long sum = 0; for (__typeof(sn - 1) i = 0; i <= sn - 1; ++i) sum += (...
ALGO
0.999987
4.681103
09128b7a-72da-4e4a-b7be-6a561ac8ba28
ShawnTSH1229/XEngine
ThirdParty/boost_1_78_0/libs/numeric/ublas/doc/samples/banded_adaptor.cpp
#include <boost/numeric/ublas/banded.hpp> #include <boost/numeric/ublas/io.hpp> int main () { using namespace boost::numeric::ublas; matrix<double> m (3, 3); banded_adaptor<matrix<double> > ba (m, 1, 1); for (signed i = 0; i < signed (ba.size1 ()); ++ i) for (signed j = (std::max) (i - 1, 0); j...
ALGO
0.963736
3.642051
06f0bae4-de6c-4f45-92ce-2869fea7a2a1
ishandutta2007/codeforces
andrew/normal/879/A.cpp
#include <bits/stdc++.h> #define p_b push_back #define endl "\n" #define m_p make_pair #define fi first #define se second #define pll pair <ll,ll> using namespace std; typedef long long ll; template <typename T> T sqr(T x) { return x*x; } const ll shl=1; const ll maxn=1000000; vector <ll> tt[1000]; set <ll> ss; map...
ALGO
0.999916
3.439649
7a555940-0c8f-42b6-80fd-e7bca7bd02f0
iAbhayRajput/DSA
C++/10-20/12.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: string armstrongNumber(int n){ int val=0; int y=n; while(y>0){ val+=pow(y%10, 3); y/=10; } if(val==n){ return "true"; } else return "false"; } }...
ALGO
0.999463
5.517853
b396b9b5-ab00-48eb-bdbb-1a9c4f5c7e8b
npnkhoi/Competitive-programming
SPOJ/QBPOINT.cpp
using namespace std; #include <stdio.h> #include <algorithm> struct point { double X, Y;}; const int N = 2000 + 10; const double EPS = 0.0000000000000001; const double oo = 1e18; point p[N]; double coe[N]; long long res; int main() { //freopen("in.txt", "r", stdin); int n; scanf("%d", &n); for (int i = ...
ALGO
0.999489
3.808298
dfc13336-da99-4522-b200-47956ab81268
FENGZHANG123/tf_time_CPP
Thirdparty/orocos-bayesian-filtering-master/orocos_bfl/src/wrappers/matrix/matrix_wrapper.cpp
#include "matrix_wrapper.h" #include <math.h> #include <vector> using namespace std; namespace MatrixWrapper { bool SymmetricMatrix_Wrapper::cholesky_semidefinite(MyMatrix& a) const { // apply cholesky to *this // put result in a // result is lower triangular matrix a = (*...
ALGO
0.999951
5.340517
073f2b8b-ff0c-4a15-a92b-5ee79022117a
bipulhstu/C-Programming
C Programming Basic/nCr and nPr.cpp
///Find nCr and nPr #include<iostream> using namespace std; long factorial(int); long find_ncr(int, int); long find_npr(int, int); int main() { long ncr, npr; int n, r; cout<<"Enter the value of n and r: "; cin>>n>>r; ncr=find_ncr(n,r); npr=find_npr(n,r); cout<<n<<"C"<<r<<" is "<<ncr<<endl...
ALGO
0.995714
4.040172
1169da27-ce43-4a9e-992c-3054b59496fc
Gaurang2908/HacktoberFest2022
DSA IN C & C++/LINKED LIST/SwapSecondBiggestAndSecondSmallestElementInArray.cpp
#include<iostream> using namespace std; int main () { int A[10], n, i, j, x; cout << "Enter size of array : "; cin >> n; cout << "Enter elements of array - "; for (i = 0; i < n; i++) cin >> A[i]; for (i = 0; i < n; i++) { for (j = i + 1; j < n; j++) { ...
ALGO
0.999816
3.260779
403c2293-2476-48f7-b8c6-f1d665009a5e
silviusCODES/week1-DP4-CipherSchools
14/intersection of two linked lists.cpp
// https://leetcode.com/problems/intersection-of-two-linked-lists/ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) ...
ALGO
0.999726
5.810499
b439b104-1ba7-40e4-a0c6-422ced125343
SwapnanilAdhikary/DSA_Source_codes
deletion of node in bst.cpp
class Solution { public: TreeNode* deleteNode(TreeNode* root, int key) { if(root == NULL){ return NULL; } if(root->val == key){ return helper(root); } TreeNode *dummy = root; while(root !=NULL){ if(root->val > key){ ...
ALGO
0.999999
6.433849
46acbd04-d058-4346-9724-b4c7e2f2e68b
ishandutta2007/codeforces
nuip/normal/1270/C.cpp
#include <string> #include <vector> #include<iostream> #include<cstdio> #include<cstdlib> #include<stack> #include<queue> #include<cmath> #include<algorithm> #include<functional> #include<list> #include<deque> #include<bitset> #include<set> #include<map> #include<unordered_map> #include<unordered_set> #include<cstring>...
ALGO
0.999657
3.227696
97efd65d-795f-4b7b-8f47-c0a881bc6b4f
CoraZhang/Computer-Graphics
a4/libigl/tutorial/204_Gradient/main.cpp
#include <igl/avg_edge_length.h> #include <igl/barycenter.h> #include <igl/grad.h> #include <igl/jet.h> #include <igl/readDMAT.h> #include <igl/readOFF.h> #include <igl/opengl/glfw/Viewer.h> #include <iostream> #include "tutorial_shared_path.h" int main(int argc, char *argv[]) { using namespace Eigen; using names...
ALGO
0.878085
6.006644
ca38abdc-5ac7-4968-bb15-4b07209cdfa2
luyiming112233/PatCodeRepo
PatCodeRepo/PatAdv/A1145.cpp
#include<cstdio> #define maxn 100010 int num[maxn] = { 0 }; int hash[maxn] = { 0 }; int TSize; bool isPrime(int a) { if (a == 1) return false; if (a == 2) return true; for (int i = 2; i*i <= a; i++) { if (a%i == 0) return false; } return true; } int getTsize(int MSize) { while (true) { if (isPrime(...
ALGO
0.999249
3.354778
b6ab780e-ce53-4bae-b5f6-94eb3c2dc8d9
Md-Minhajul-Islam/Codeforces
_Random/The_Humanoid.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vii; typedef vector<ll> vll; typedef long double ld; #define fi first #define se second #define pb push_back #define yes cout << "YES\n" #define no cout << "NO\n" int test_c...
ALGO
0.999501
3.962866
fd9d1e68-0281-442c-9133-8b371f009310
Bluesbreaker45/Competitive-programming
PKU/19/F.cpp
#include <iostream> using namespace std; bool can(int n, string s) { if (n == 2) { return false; } if (n == 3) { return s == "AB." || s == "A.B"; } int bCount = 0; for (int i = 1; i < n; i++) { if (s[i] == 'B') { bCount++; } } return 2 <= b...
ALGO
0.999384
5.014954
e97fc02c-1e6e-4adf-9ecd-bbc8df18f13e
bradly0cjw/AlgoLAB
algo/hw7_2.cpp
#include <vector> #include <algorithm> #include <iostream> void countingSort(std::vector<int> &arr, int exp) { int n = arr.size(); std::vector<int> output(n); std::vector<int> count(10); for (int i = 0; i < n; i++) count[(arr[i] / exp) % 10]++; for (int i = 1; i < 10; i++) count[i...
ALGO
0.999901
5.911591
101142ed-25a3-4078-9879-287bc3be23d0
Jean-Hsudasu/CPE_1_Star
Code/948_Fibonaccimal Base.cpp
#include<stdio.h> #include<stdlib.h> /* o@DݦAèSQxANQiରOƦCC OƦC: qi=2}lA̧DZNVWӼƦCۥ[AEX: i 0 1 2 3 4 x 1 2 3 5 8 tk: Aؤ@ӶOƦCAAJڭn]Xj(times)AJݭnഫ(number)AXOƦC */ int main() { int Fib[2002];//OƦC int times;//j int number;//ݭnഫ int flag;//P_O_}lA int i,j; Fib[0]=1; Fib[1]=2; for(i=2;i<39;i++)//ضOƦCAi=39Nn ...
ALGO
0.999741
3.14047
ebabb91a-aa30-438c-9c89-4277d4c4a35a
Sivanvitha06/DSA0196-C-
15.cpp
#include<iostream> using namespace std; int main(){ int a=7; int fact=1; for(int i=1;i<=a;i++){ fact=fact*i; } cout<<"factorial of a number is : "<<fact; }
ALGO
0.999102
3.380091
a5afad15-3c2b-4ce3-b9c1-698715307240
ANYCUBIC-3D/AnycubicSlicer_Prusa
src/libigl/igl/repmat.cpp
template <typename DerivedA, typename DerivedB> IGL_INLINE void igl::repmat( const Eigen::MatrixBase<DerivedA> & A, const int r, const int c, Eigen::PlainObjectBase<DerivedB> & B) { assert(r>0); assert(c>0); // Make room for output B.resize(r*A.rows(),c*A.cols()); // copy tiled blocks for(int i = 0...
ALGO
0.923136
4.148574
51b23e85-5c4b-4d45-ad8d-ce02b9436306
EricChangGo/leetcode
cplusplus/122.best-time-to-buy-and-sell-stock-ii.cpp
/* * @lc app=leetcode id=122 lang=cpp * * [122] Best Time to Buy and Sell Stock II */ // @lc code=start class Solution { public: int maxProfit(vector<int>& prices) { int t_profit = 0; int buy_idx = 0; int sale_idx = 0; /** 1. better min -> change holding stock, (buy, sale) = (...
ALGO
0.999908
6.42075
5b294d23-74c5-4607-b804-5d2855208613
wrhwrhwrhsf/original
src/crypto/randomx/superscalar.cpp
#include "crypto/randomx/configuration.h" #include "crypto/randomx/program.hpp" #include "crypto/randomx/blake2/endian.h" #include "crypto/randomx/superscalar.hpp" #include "crypto/randomx/intrin_portable.h" #include "crypto/randomx/reciprocal.h" namespace randomx { static bool isMultiplication(SuperscalarInstructio...
CONFIG
0.854626
6.982541
c48f418d-6180-427d-ab7a-91dcf04c26c8
z1shivam/sem4-DAA--archive-
prism.cpp
#include <iostream> #include <vector> #include <queue> #include <limits> using namespace std; #define INF numeric_limits<int>::max() // Structure to represent a vertex in the graph struct Vertex { int index, key; }; // Comparator for priority queue struct CompareKey { bool operator()(const Vertex& v1, const...
ALGO
0.999994
6.104239
58028e24-01b4-47dd-9822-1c1a5623317b
joshhan619/motion_planning_bench
src/Project4Pendulum.cpp
/////////////////////////////////////// // COMP/ELEC/MECH 450/550 // Project 4 // Authors: Joshua Han, Alan Huang ////////////////////////////////////// #include <iostream> #include <ompl/base/ProjectionEvaluator.h> #include <ompl/control/SimpleSetup.h> #include <ompl/control/ODESolver.h> #include <ompl/base/spaces...
ALGO
0.998359
7.403786
f5a444da-49bf-4de8-8e0b-1dba5ce0fdc6
Erdaulet0341/2Course_1Semester
Algorithm/LinkedList/clear.cpp
#include <bits/stdc++.h> using namespace std; struct node{ int data; node* link; }; class LinkedList{ private: node *head; int size; public: LinkedList(){ head = NULL; } void push_front(int x){ node *newNode = new node(); newN...
ALGO
0.998894
4.04403
f88c82bf-8b7d-4263-8dc3-844414408c18
dlrtn/algorithm
problem-solving-project/04주차_연산량과시간복잡도/버블정렬 (1).cpp
#include<cstdio> #include<iostream> using namespace std; void bubbleSort(int data[], int n) { int temp; // swqp ӽ÷ س for (int i = n - 1; i > 0; i--) { // ε ʴ i° ε 0~i° ε ̿ ִ ;ϱ for (int j = 0; j < i; j++) { //j 0 i if (data[j] > data[j + 1]) { // j j+1ε ū temp = data[j]; //swap data[j] = data[j ...
ALGO
0.999924
3.589243
a4070852-326a-438d-9620-c8e3547064d5
xavierenti/Asteroids2D
Asteroids 2d/Library/PackageCache/com.unity.ide.visualstudio@2.0.9/Editor/COMIntegration/COMIntegration~/COMIntegration.cpp
#include <iostream> #include <sstream> #include <string> #include <filesystem> #include <windows.h> #include <shlwapi.h> #include "BStrHolder.h" #include "ComPtr.h" #include "dte80a.tlh" constexpr int RETRY_INTERVAL_MS = 150; constexpr int TIMEOUT_MS = 10000; // Often a DTE call made to Visual Studio can fail after ...
TOOL
0.954156
6.947423
51e07dab-26d8-4fc2-af04-44d94d8be8ea
Hybrid-Rom/frameworks_av
media/libstagefright/codecs/amrnb/dec/src/dec_gain.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/dec_gain.c Funtions: dec_gain Date: 01/31/2002 ------------------------------------------------------------------------------ REVISION HISTORY Description: Updating include file lists, and othe...
ALGO
0.999637
5.641545
2381ab5f-792b-407f-9425-04ebe9d97d15
dhrubo326/randomcollection
tiragleCount.cpp
// Add some code #include<bits/stdc++.h> using namespace std; int main(){ #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int t; cin>>t; int kase = 1; while(t--){ int n; cin>>n; vector<int>arr(n); for(int i=0; i<n; i++...
ALGO
0.999723
4.679288
15e37935-6bab-4b18-8eb6-352a59943e6e
apallath/network_flow
hopcroft-karp.cpp
//References - CP3 (Halim, S. and Halim, F.) #include<bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; int INF = numeric_limits<int>::max(); int NIL = -1; //special vertex bool BFS(vvi &adjList, vi &L, vi &match, vi &dist){ queue<int> q; for(int i = 0; i < L.size(); i++){ ...
ALGO
0.999873
4.072524
8fcd4727-2e3a-4942-bbfc-dc9e0a066b55
Charan4569/COMPUTER-GRAPHICS
LAB3/bresenham.cpp
#include <GL/freeglut.h> #include <cmath> // Window dimensions #define WIDTH 800 #define HEIGHT 600 // Draw point void drawPoint(int x, int y) { glBegin(GL_POINTS); glVertex2i(x, y); glEnd(); } // Bresenham's circle drawing algorithm void drawCircle(int xc, int yc, int radius) { int x = 0; int y ...
ALGO
0.991448
6.405022
0c15196f-9b69-4962-af36-2dd74d295a3d
Soumya1201/DSA
2727-number-of-senior-citizens/number-of-senior-citizens.cpp
class Solution { public: int countSeniors(vector<string>& details) { int count = 0; for(const string& s : details) { int age = stoi(s.substr(11, 2)); if(age > 60) count++; } return count; } };
ALGO
0.995033
6.208879
a527a92c-a74b-4b3b-9a09-7024d08f9741
emilio-kariuki/GDSC-Dekut-v2
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
35987900-d6c5-4942-9b5f-4145720e746f
Srajan-Jaiswal/Leetcode-Problems
Longest Common Prefix.cpp
// Runtime: 8 ms, faster than 42.46% of C++ online submissions for Longest Common Prefix. // Memory Usage: 9.7 MB, less than 34.01% of C++ online submissions for Longest Common Prefix. class Solution { public: string longestCommonPrefix(vector<string>& strs) { if(strs.size() == 0){ return ""; ...
ALGO
0.999636
5.31134
c0f7d30a-e503-41eb-8689-e554057115a1
CoolSunflower/Automated-AIG-Analysis
abc/src/sat/cadical/cadical_ccadical.cpp
#include "global.h" #include "cadical.hpp" #include <cstdlib> #include <cstring> ABC_NAMESPACE_IMPL_START namespace CaDiCaL { struct Wrapper : Learner, Terminator { Solver *solver; struct { void *state; int (*function) (void *); } terminator; struct { void *state; int max_length; int ...
TOOL
0.983542
6.484292
4d711091-7a48-4ec6-90cb-0655da0493bf
ilrexho2011/Project-EULER-Possible-Solutions-Problems-601_to_700
Exercise 651/Exercise 651.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; const LL MOD = 1000000007; LL powmod(LL a, LL n){ if(n == 0) return 1; if(n % 2) return (a*powmod(a,n-1)) % MOD; LL c = powmod(a, n/2); return (c*c) % MOD; } LL inv(LL a){ return powmod(a, MOD-2); } LL fact[110000]; LL invfact[110000]; LL ncr(LL...
ALGO
0.999909
4.629861
17a01cde-58fd-41a7-971b-726ad5c208d2
ishandutta2007/codeforces
fizzydavid/normal/866/B.cpp
//by yjz #include<bits/stdc++.h> using namespace std; #define FF first #define SS second #define PB push_back #define MP make_pair #define bged(v) (v).begin(),(v).end() #define foreach(it,s) for(__typeof((s).begin()) it=(s).begin();it!=(s).end();it++) typedef long long ll; const int Imx=2147483647; const ll Lbig=2e18; ...
ALGO
0.999836
3.116257
049195cb-1b8f-4ebd-ac29-aeba21284f49
compiler-tree-technologies/cil
llvm/lib/Transforms/IPO/MergeFunctions.cpp
#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/IR/Argument.h" #include "llvm/IR/Attributes.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/CallSite.h" #include "llvm/IR/Constant.h" #include "llvm/IR/Constants.h" #inc...
TOOL
0.992418
5.320135
7b50e007-f45e-4718-b957-e55c39b8e697
ehnryx/acm
usp-tryouts-2018-cf101879/d.cpp
#include <bits/stdc++.h> using namespace std; #define _USE_MATH_DEFINES typedef long long ll; typedef long double ld; typedef pair<int,int> pii; typedef complex<ld> pt; typedef vector<pt> pol; const char nl = '\n'; const int INF = 0x3f3f3f3f; const ll INFLL = 0x3f3f3f3f3f3f3f3f; const ll MOD = 1e9+7; const ld EPS = 1...
ALGO
0.999693
4.359962
c039f068-d309-42f3-9e8d-541902d58b6b
checkoutb/LeetCodeCCpp
ge1200/LT1221_Split_a_String_in_Balanced_Strings.cpp
#include "../header/myheader.h" class LT1221 { public: // D D // if(a=='L') // nums+=1; // else // nums-=1; // if(!nums) // ans++; // if (c == 'L') // left++; // else // right++; // ...
ALGO
0.999962
5.289934
df17864a-124a-4b9b-8eef-76196ec24120
VinayBhupelli/Striver-Sheet
2 ARRAYS/16_sort_colors.cpp
#include <bits/stdc++.h> using namespace std; // Method 1: Sort the array class Solution { public: void sortColors(vector<int> &nums) { sort(nums.begin(), nums.end()); } }; // Method 2: Count frequencies void sortArray(vector<int> &arr, int n) { int cnt0 = 0, cnt1 = 0, cnt2 = 0; for (int i = 0; i < n; i++) { ...
ALGO
0.999748
5.780026
f7741455-6a45-4583-babe-ba4abc649f25
sathwik-09/Leetcode-solutions
1976-number-of-ways-to-arrive-at-destination/1976-number-of-ways-to-arrive-at-destination.cpp
class Solution { public: int countPaths(int n, vector<vector<int>>& roads) { vector<pair<int,int>> adj[n]; for(auto it:roads){ adj[it[0]].push_back({it[1],it[2]}); adj[it[1]].push_back({it[0],it[2]}); } priority_queue<pair<long long,long long>, vector<pair<lon...
ALGO
0.999951
5.581973
4edd1806-12a6-44b4-9581-5696020d5313
ishandutta2007/codeforces
emorgan5289/normal/1523/C.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const int inf = 1e9+10; const ll inf_ll = 1e18+10; #define all(x) (x).begin(), (x).end() #define pb push_back #define cmax(x, y) (x = max(x, y)) #define cmin(x, y) (x = min(x, y)) #ifndef LOCAL #define debug(...) 0 #else #include "../../debug.cpp" #e...
ALGO
0.999655
3.918387
de9045c1-7a89-4654-84b0-166990ab73b4
webaman58/techali
Arrayandoperaators.cpp
#include<stdio.h> int main() { int price[3]; printf("enter price of 3 items:"); scanf("%d %d %d",&price[0],&price[1],&price[2]); float cost[3]; cost[0]=price[0]+0.18*price[0]; cost[1]=price[1]+0.18*price[1]; cost[2]=price[2]+0.18*price[2]; printf("final price is %f",cost[0]+cost[1]+cost[2]); return 0; }
ALGO
0.992877
3.165138
99e22e3a-11e7-4b37-a52f-f986cc0cc3b1
Ansuban/CPlusPlus
star_pattern.cpp
#include<iostream> using namespace std; int main() { int row = 5, i, j; for(i=0; i<row ; i++) { for(j=0; j<row-i; j++) { cout<<"*\t"; } cout<<"\n"; } return 0; }
ALGO
0.99967
3.85119
b6a60884-67e0-4dba-9a03-20a13507f12f
ishandutta2007/codeforces
keywet06/normal/1423/J.cpp
#include <bits/stdc++.h> using int64 = long long; const int P = 1000000007; int t; int64 n, r, aux; int main() { std::ios::sync_with_stdio(0); std::cin.tie(0), std::cout.tie(0); std::cin >> t; while (t--) { std::cin >> n; n /= 2; aux = ((n + 1) / 2) % P; r = aux * (au...
ALGO
0.999834
4.645971
33e74a5b-bf7b-4e3e-9169-32b3c32c41bc
shreyans00/DSA
CP/SRI/detect_cycle2.cpp
#include <bits/stdc++.h> using namespace std; #define int long long const int mod = 1e9 + 7; int n; vector<int> v; void solve() { cin >> n; v.resize(n); for (int i = 0; i < n; i++) cin >> v[i]; cout<<rec(0) } signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ...
ALGO
0.999577
4.214728
e2982ce8-9d49-4829-9b79-1bd9cab5819d
bikash990/assessment
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
3ef4dcb1-2152-4059-930e-6f53fbad617e
chihyu-box/112pd-pa1
fm/src/main.cpp
#include <iostream> #include <fstream> #include <vector> #include <chrono> #include "partitioner.h" using namespace std; using namespace chrono; int main(int argc, char** argv) { auto start = high_resolution_clock::now(); fstream input, output; if (argc == 3) { input.open(argv[1], ios::in); ...
DATA
0.902199
4.830171
4dac05f4-d57b-4999-8443-4536976da1b0
xanarry/source-code
CPP/线索二叉树.cpp
#include <iostream> using namespace std; struct Node { int data; bool ltag, rtag;//0指向孩子, 1为前后趋线索 Node *left, *right; }; Node *insert(Node *root, int key) { if (root == NULL) { root = new Node(); root->data = key; root->ltag = 1; root->rtag = 1; root->left =...
ALGO
0.999996
4.158935
76eb700e-7626-4fa7-a0d9-0bf92ee3e5aa
MartinaAshraf/cpp_my_notes
Structured programming/50 Problems/23.cpp
/* Write a C++ program to calculate x, where 𝑥 = −𝑏 ± (√(𝑏^2 − 4𝑎𝑐))/2𝑎 and a = 2,b = -10, c = 12 (use cin to input the data) */ #include<iostream> #include<cmath> usingnamespacestd; intmain() { float a,b,c,x,y; cin>>a>>b>>c; x=-b+sqrt(b*b-4*a*c)/2*a;//الموجب y=-b-sqrt(b*b-4*a*c)/2*a;//السالب cout<<x<<endl<<y; ...
ALGO
0.999789
3.622129
1e827af3-c70c-4cbc-bb10-346201d359d1
f4nyc/dalyoj
UVa/UVa1586.cpp
#include<iostream> #include<cctype> #include<string> using namespace std; int main(){ string a="CHON"; float b[4]={12.01,1.008,16.00,14.01}; int n; cin>>n; while(n--){ string s; float m=0; cin>>s; for(int i=0;i<s.length();i++){ if(isalpha(s[i])){ ...
ALGO
0.991087
3.351004
ef53f2ee-69ae-475b-8aa1-107724a30641
amulpatle/data-structure-and-algrotithm
Shorting/QucikSort.cpp
#include <iostream> using namespace std; int partition(int arr[], int s, int e) { int pivot = arr[s]; int cnt = 0; for (int i = s + 1; i <= e; i++) { if (arr[i] <= pivot) { cnt++; } } int pivotindex = s + cnt; swap(arr[pivotindex], arr[s]); int i = ...
ALGO
0.999986
5.420229
378c0601-cf70-4964-bdad-1d944a0859d3
ishandutta2007/codeforces
fattypenguin/normal/120/F.cpp
#include <iostream> #include <string.h> #include <algorithm> #include <cstdio> using namespace std; const int maxn = 107 , maxm = maxn*4; int n , test , tot , root , Tmax; int now[maxn] , pre[maxm] , y[maxm]; bool use[maxn]; void cnt( int fir , int lst ) { pre[++tot] = now[fir] , now[fir] ...
ALGO
0.999179
3.946309
7a5fb1ec-7a03-443a-8682-569924cbb195
Krishna-13-cyber/pipeline-llvm
libc/src/math/generic/fmaximum_num.cpp
#include "src/math/fmaximum_num.h" #include "src/__support/FPUtil/BasicOperations.h" #include "src/__support/common.h" namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(double, fmaximum_num, (double x, double y)) { return fputil::fmaximum_num(x, y); } } // namespace LIBC_NAMESPACE
ALGO
0.996251
5.850137