uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
36c0eb37-ebbc-40e5-a1b9-908e47d4bc05
fixedperson/boj
boj12851/main.cpp
#include <bits/stdc++.h> using namespace std; class Node{ public: int x; int second; Node(int x, int second) : x(x), second(second) {} }; bool isValid(int x){return x >= 0 && x <= 100000;} int N, K; int second = 0, cnt = 0; void bfs(){ if(N == K) { cnt = 1; return; } queue...
ALGO
0.99982
4.499057
9776832e-1952-4519-b1bb-26675edfdecb
Fangqierin/Drone_Rxfire
farsite/src2/fsxwmech.cpp
/ } void MechCalls::LoadLocalFEData(FELocalSite* fe) { fe->GetEnvironmentData(&lmw); m_ones = lmw.ones; m_tens = lmw.tens; m_hundreds = lmw.hundreds; m_livew = lmw.livew; m_liveh = lmw.liveh; m_windspd = lmw.windspd; m_twindspd = lmw.tws; m_winddir = lmw.winddir; ld = fe->ld; if (m_winddir == -1.0) m_wi...
ALGO
0.908004
5.01168
f4623750-13f2-4648-81e5-8beb6ee66ec9
CarloNicolini/paco
src/eigen/doc/examples/Tutorial_ArrayClass_interop_matrix.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { MatrixXf m(2,2); MatrixXf n(2,2); MatrixXf result(2,2); m << 1,2, 3,4; n << 5,6, 7,8; result = m * n; cout << "-- Matrix m*n: --" << endl << result << endl << endl; result = m.array() * ...
ALGO
0.997139
4.306757
78077f48-083e-4fb8-b8df-6aad17fb8fd4
truongleipod2012/BaiTap_LTNC
BT01/B18.cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; int main() { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; double t; t = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); cout << fixed << setprecision(2) << d; return 0; }
ALGO
0.996921
3.905609
42339c8c-0a46-4993-b24a-6e741c83389b
smnahidhasan/Competitive-Programming
Codeforces/Ladder/Ladder 3 (1300=Difficulty=1400)/Equator(962).cpp
/* Author's Handle : Crazy_Dreamer Author's Name : S M Nahid Hasan */ #include<bits/stdc++.h> using namespace std; #define ll long long #define dl double #define forn(i,a,n) for (ll i=a;i<n;i++) #define per(i,a,n) for (ll i=n-1;i>=a;i--) #define pb ...
ALGO
0.999904
4.065904
9f34e3cd-a79c-4223-8aa1-9a3648791dae
AnishGuruvelli/miniature-fiesta
binarySearch/findPeakEle.cpp
// array method // class Solution // { // public: // int findPeakElement(vector<int> &nums) // { // int n = nums.size(); // int ans = 0; // if (n == 1) // return 0; // for (int i = 1; i < n; i++) // if (nums[i] > nums[i - 1]) // ans = i;...
ALGO
0.999996
5.595358
5c75e76d-6bce-4c37-a09b-24d037292ce9
TPamukchieva/Ray_Tracing_Course
Lecture2_Homework_Problem2/colored_figure.cpp
//Defining a figure and colouring it a different colour #define _USE_MATH_DEFINES #include <fstream> #include <cmath> using namespace std; //Output image resolution static const int imageWidth = 700; static const int imageHeight = 700; static const int maxColComp = 255; int rowCenter = imageHeight / 2; int colCente...
ALGO
0.999415
3.997359
36ef434b-683e-48b6-8edd-8e9feac02670
ChetanThorat18/LeetCode
Leetcode_Problems/1422-maximum-score-after-splitting-a-string/Approach2.cpp
class Solution { public: int maxScore(string s) { // Approach 2 : Two Pass int n = s.length(); int result = INT_MIN; // Count of total ones in the string int total_ones = 0; for(int i=0; i<n; i++){ if(s[i] == '1') total_ones++; }...
ALGO
0.999979
5.93901
5c5d1b4c-a56f-4b90-87a6-93ba04f43d17
agupta7654/Competitive_Programming
Problem_1_Logical_Moos.cpp
#include <iostream> #include <vector> #include <string> using namespace std; int solve(vector<int> b, vector<string> o){ for(int i = o.size()-1; i >= 0; i--){ if(o[i] == "and"){ b[i] = int(b[i] & b[i+1]); b.erase(b.begin() + i+1); o.erase(o.begin() + i); } ...
ALGO
0.999904
4.61779
17f74eef-053a-4a30-ad2f-637881600221
Soumyo001/Online_Judge_Solves
toph problems/mines.cpp
#include<bits/stdc++.h> using namespace std; int main(void){ int r,c,coun=0; cin>>r>>c; char s[25][25]; for(int i=0;i<r;i++){ for(int j=0;j<c;j++){ cin>>s[i][j]; } } for(int i=0;i<r;i++){ for(int j=0;j<c;j++){ if(s[i][j]=='.'){ coun=0; if(s[i][j+1]=='*')coun++; ...
ALGO
0.999874
3.194356
112d392c-1946-499f-8ac6-e90242cb4d54
ishandutta2007/codeforces
flashmt/normal/279/C.cpp
#include <iostream> #include <algorithm> #include <cstdio> #include <vector> #include <cstring> #include <string> #include <cmath> #include <utility> #include <map> #include <set> #include <queue> using namespace std; int n, q, a[100100], d[100100], firstDif[100100], leftmostInc[100100], leftmostDec[100100]; int main...
ALGO
0.999997
3.899917
81df5fc0-3f0e-48a9-b66e-8d8498790a98
Sachin1801/DSA_CPP_Leetcode_-_GFG
Difficulty: Medium/Two numbers with odd occurrences/two-numbers-with-odd-occurrences.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: vector<long long int> twoOddNum(long long int Arr[], long long int N) { // code here int XOR = 0,res1=0, res2=0; ...
ALGO
0.999879
5.077072
67f61d9a-2585-44e3-b5f5-d2f06fdff5f6
Jackfrost2639/ex
herding.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[100001] = {0,}; for(int i = 1; i <= n; i++) { cin >> a[i]; } sort(a+1, a+n+1); int start; int end; int mx = max(a[n]-a[2], a[n-1]-a[1]) - (n-2); int mn; bool flag = false; ...
ALGO
0.999855
3.828669
fb500976-8827-4862-8a11-c402ad1c7879
shashankballa/HELiKs
Aramis/3party-aramis/party0/src/tools.cpp
/* * BMR_BGW_aux.cpp * * Author: Aner Ben-Efraim, Satyanarayana * * year: 2016 * * Modified for crypTFlow and Aramis by Mayank Rathee */ #include "tools.h" #include <stdint.h> #include <mutex> #include <bitset> #include "../utils_sgx_port/utils_print_sgx.h" #include "../utils_sgx_port/utils_malloc...
ALGO
0.998673
3.406634
a4fde4ff-483b-499d-930c-5dafbe516023
mickybart/android_frameworks_av
media/libmedia/StringArray.cpp
// // Sortable array of strings. STL-ish, but STL-free. // #include <stdlib.h> #include <string.h> #include "StringArray.h" namespace android { // // An expanding array of strings. Add, get, sort, delete. // StringArray::StringArray() : mMax(0), mCurrent(0), mArray(NULL) { } StringArray:: ~StringArray() { ...
TOOL
0.96862
6.18276
5d46eaba-3e82-4d3b-be03-564fedd51b49
radajakub/FeedbackArcSetProblem
optimal/src/graph.cpp
#include "graph.h" co::DGraph::DGraph(std::vector<co::Edge> &edges) { this->E = edges.size(); // find max V this->V = 0; for (co::Edge e : edges) this->V = std::max(this->V, std::max(e.source, e.target)); ++this->V; this->edges = edges; // create adjacency list [V x Ni] and cost...
ALGO
0.963441
4.537173
9af5523a-a12a-4b4b-9695-2b962528021b
ishandutta2007/codeforces
raveman/normal/1091/B.cpp
#pragma comment(linker, "/STACK:60777216") #include <cassert> #include<iostream> #include<algorithm> #include<cstdio> #include<complex> #include<vector> #include<cstring> #include<set> #include<map> #include<cmath> #include<queue> #include<string> #include<cstdlib> #include<memory.h> #include<ctime> #include<bitset>...
ALGO
0.999833
3.274051
2129e762-17d9-45a6-a967-e6b08fcbac72
bhatiatanish225/DSA-Practice
Array/sumofelement.cpp
#include<iostream> using namespace std; int main(){ int arr[5]; for(int i=0;i<5;i++){ cin>>arr[i]; } int sum=0; for(int j=0;j<5;j++){ sum=sum+arr[j]; } cout<<"sum of the elements of array="<<sum<<endl; return 0; }
ALGO
0.995609
3.15505
5df6ec4a-34ce-46b3-aea1-45cad23815f0
koulritanshu/Learning_CPP
Pattern_problems/pr_05.cpp
/* * * * * * * * * * * * * * * * ......... upto n times */ #include <iostream> using namespace std; int main() { int n; cout << "Enter the value of n: "; cin >> n; for(int i = 0;i<n;i++){ for(int j = n-i-1;j>=0;j--){ cout << " "; } for(int k = 0; k <= i;k+...
ALGO
0.999669
3.672754
56fd26ea-03b2-4787-b6d0-9abade44754c
sarcilav/Manual
string_matching/sufarray.cpp
// Solution to substr using suffix arrays. // David Garcia Soriano. #include <algorithm> #include <cassert> #include <cstdio> #include <cstring> #include <set> #include <string> #include <vector> using namespace std; const int maxlen = 40000; char str[maxlen + 2]; int n, mintimes; int suf[maxlen], llcp[maxlen], rlcp[...
ALGO
0.999928
3.741158
6ee428ad-53c7-42e4-939c-de2de05f2471
PeterBee97/Homework2016
第一次作业/1.cpp
#include<iostream> using namespace std; class Cube { public: Cube(int h,int l,int w); void ShowVolume(); private: int height,length,width; }; Cube::Cube(int h,int l,int w) { height=h; length=l; width=w; } void Cube::ShowVolume() { cout<<height*length*width<<endl; } int main() { int h,l,w; cin>>h>>l>>...
TOOL
0.989052
3.629191
b7d3cc3f-e9f8-4b03-bbf9-f1d9b76f674a
dominichofer/RubiksCube2
Cubie/cube3x3.cpp
#include "cube3x3.h" #include "twister.h" #include <limits> static const AllTwister<Corners, uint16_t> c_ori_table( &Corners::ori_index, [](uint16_t i) { return Corners::from_index(0, i); }, Corners::ori_size ); static const AllTwister<Corners, uint16_t> c_prm_table( &Corners::prm_index, [](uint16_t i) { return ...
ALGO
0.998268
7.329336
5a519e0e-90f2-4f6a-ab49-bad95893af5a
danielhO9/PS
BOJ/3392.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; struct LazyPropagation { vector<ll> arr; vector<pair<ll, ll>> tree; vector<ll> lazy; ll sz; inline pair<ll, ll> merge(pair<ll, ll> a, pair<ll, ll> b) { if (a.first == b.first) return {a.first, a.second + b.second}; if (a.first < b.first) ret...
ALGO
0.99921
3.78763
891e509e-2bf5-4043-bdc5-ba5349da045b
android-la64/platform-system-connectivity-wificond
scanning/scanner_impl.cpp
#include "wificond/scanning/scanner_impl.h" #include <set> #include <string> #include <vector> #include <android-base/logging.h> #include "wificond/client_interface_impl.h" #include "wificond/scanning/scan_utils.h" using android::binder::Status; using android::sp; using android::net::wifi::nl80211::IPnoScanEvent; u...
TOOL
0.891547
6.528159
7433fa03-22ae-4558-bb31-d02ff88daad5
MinhPhuc2k3/CODE-PTIT
DSA08009.cpp
//Le Minh Phuc CN02 #include <bits/stdc++.h> #define all(x) x.begin(),x.end() using namespace std; const int mod=1e9+7; typedef long long ll; typedef pair<int,int> pii; typedef vector<int> vi; int main() { std::ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t; cin>>t; whil...
ALGO
0.999874
3.462013
62c00f5b-84d5-442b-ad03-488538866baa
Kenny3Shen/MyLeetcode
leetcode_by_cpp/2032.至少在两个数组中出现的值.cpp
/* * @lc app=leetcode.cn id=2032 lang=cpp * * [2032] 至少在两个数组中出现的值 * * https://leetcode.cn/problems/two-out-of-three/description/ * * algorithms * Easy (66.40%) * Likes: 43 * Dislikes: 0 * Total Accepted: 20.1K * Total Submissions: 28K * Testcase Example: '[1,1,3,2]\n[2,3]\n[3]' * * 给你三个整数数组 nums1、...
ALGO
0.999853
6.112336
48eedc07-c486-45ce-b886-76b465590245
sukenori/Competitive_Programming-Solved_Code
AtCoder/AtCoder_Beginner_Contest/300/310/C.cpp
#include<bits/stdc++.h> using namespace std; int N; set<string>S; int main(){ cin>>N; string Si; int a=0; for(int i=0;i<N;i++){ cin>>Si; if(!S.count(Si))a++; string rSi=Si; reverse(rSi.begin(),rSi.end()); S.insert(Si); S.insert(rSi); } cout<<a<<endl; }
ALGO
0.999859
3.99685
7bb9e06e-430c-4176-9f29-7aa98561faf3
fkdl0048/Algorithm
Programmers/삼각형의_완성조건_2.cpp
#include <vector> #include <algorithm> using namespace std; int solution(vector<int> sides) { int answer = 0; int longer = max(sides[0], sides[1]); int shorter = min(sides[0], sides[1]); answer += longer - (longer - shorter); answer += (shorter + longer) - longer - 1; return ans...
ALGO
0.998648
4.06673
250f051e-d8a1-426f-94b7-797ef5698280
stasik007-ui/Lab1.1
practicals/practicals/практична 5.cpp
#include <iostream> using namespace std; #include <limits> int main() { setlocale(LC_ALL, "uk_UA"); using namespace std; int n; cout << "Введiть кiлькiсть елементiв (n): "; cin >> n; double* A = new double[n]; cout << "Введiть елементи масиву: "; for (int i = ...
ALGO
0.999617
3.685194
d9845423-1b56-4d02-bcef-6acc7dd5bf6c
harryplusplus/textrenderer
third_party/source/icu4c-70.1/source/tools/gennorm2/gennorm2.cpp
#include "unicode/utypes.h" #include "n2builder.h" #include <fstream> #include <stdio.h> #include <stdlib.h> #include <string> #include <string.h> #include "unicode/errorcode.h" #include "unicode/localpointer.h" #include "unicode/putil.h" #include "unicode/uchar.h" #include "unicode/unistr.h" #include "charstr.h" #inc...
TOOL
0.956529
5.842305
c429afbd-ab1e-4e0e-852b-3d7d95dc3ee3
sadramanouch/leetcode
0028-find-the-index-of-the-first-occurrence-in-a-string/0028-find-the-index-of-the-first-occurrence-in-a-string.cpp
class Solution { public: int strStr(string haystack, string needle) { int n = haystack.size(); int m = needle.size(); for (int i = 0; i<=n-m; i++){ int j = 0; while (j<m && haystack[i+j] == needle[j]){ j++; } if (j == m){ ...
ALGO
0.999926
5.854733
f3be90f2-4583-4390-8b6d-8cb2ff4b20aa
s6alkuch/barelations
.gitignore/main.cpp
#include "main.hpp" using namespace std; using namespace lemon; namespace mpi = boost::mpi; extern "C" { #include "bgpdump/bgpdump_lib.h" } struct BGPData data; list<BGPData> bgplist; list<BGPData>::iterator it; string message_type; vector<string>hops_vector; vector<string>::iterator it_hops_vector; vector<vector<strin...
DATA
0.860853
3.595583
38fcae4c-ba3f-4461-b99b-79b8049fed73
Rahul-Palahwat/LeetCode_Problems
Remove duplicates from an unsorted linked list - GFG/remove-duplicates-from-an-unsorted-linked-list.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }; void print(Node *root) { Node *temp = root; while(temp!=NULL) { cout<<temp->data<<" "; temp=temp->next; } } // } Driver Code Ends /* The structure ...
ALGO
0.999846
5.928082
d97ef72e-1e4e-4bbf-9922-8276bc4424d4
madamsetty-pavan/DSA-Problem-Solving
0733-flood-fill/0733-flood-fill.cpp
class Solution { public: vector<vector<int>> floodFill(vector<vector<int>>& image, int sr, int sc, int color) { int directions[5] = {0,1,0,-1,0}; int n = image.size(), m = image[0].size(); if (sr>=n || sr<0 || sc >= m || sc<0 || image[sr][sc]==color) return image; int intColor = imag...
ALGO
0.9958
6.41542
31230a56-b4d6-4ede-9fb4-dd812b87300d
Nasir-Uddin-Mollah/XPSC_Club
week4/day1/B_Rock_and_Lever.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; map<int, int> mp; for (int i = 0; i < n; i++) { int x; cin >> x; mp[__lg(x)]++; } long long int ans = 0; ...
ALGO
0.999627
4.405877
c7b774b8-ffde-4303-b7f1-cd836b82795d
sweetherb100/PointLoc_2D
src/Eigen/doc/examples/TutorialLinAlgExComputeSolveError.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { MatrixXd A = MatrixXd::Random(100,100); MatrixXd b = MatrixXd::Random(100,50); MatrixXd x = A.fullPivLu().solve(b); double relative_error = (A*x - b).norm() / b.norm(); // norm() is L2 norm cout << "The ...
ALGO
0.999662
3.626518
edb41a34-d5ca-4878-a984-1a076d49d700
alexandraback/datacollection
solutions_5708921029263360_0/C++/PGoerlach/a.cpp
#include <iostream> #include <fstream> #include <string> using namespace std; int main(int argc, char *argv[]) { //Eingabe des Dateinamens ber Konsole oder bergabe als Eingabeparameter char* filename; if(argc > 1) { filename = argv[1]; } else { char buffer[256]; cout << "Input f...
ALGO
0.970604
3.216515
5264714e-cc60-4c1e-8244-397e697aaa16
xunilrj/sandbox
courses/columbia-cg-animation/week02/include/eigen/unsupported/doc/examples/PolynomialUtils1.cpp
#include <unsupported/Eigen/Polynomials> #include <iostream> using namespace Eigen; using namespace std; int main() { Vector4d roots = Vector4d::Random(); cout << "Roots: " << roots.transpose() << endl; Eigen::Matrix<double,5,1> polynomial; roots_to_monicPolynomial( roots, polynomial ); cout << "Polynomial:...
ALGO
0.99822
4.015535
6f20e339-7cae-4e50-8355-2628aa306e99
amyzhuzx/test
libsnark/common/routing_algorithms/profiling/profile_routing_algorithms.cpp
/** @file ***************************************************************************** Functions to profile the algorithms that route on Benes and AS-Waksman networks. ***************************************************************************** * @author This file is part of libsnark, developed by SCIPR Lab...
TEST
0.908104
6.83593
5843c6a7-c17a-483b-8021-d38064cce0eb
ShivamSharma19Ai/Coding-Questions
Anonymous/maxproductsubarray.cpp
int maxProduct(vector<int>& nums) { int n = nums.size(); //size of array. int pre = 1, suff = 1; int ans = INT_MIN; for (int i = 0; i < n; i++) { if (pre == 0) pre = 1; if (suff == 0) suff = 1; pre *= nums[i]; suff *= nums[n - i - 1]; ans = max(ans, max(pre, ...
ALGO
0.999982
5.633258
7fc0dddc-0e78-4d75-9498-5515bafd4801
code233trainee/lijiminbest
AtCoder/ABC/ABC_377/C.cpp
#include <bits/stdc++.h> using namespace std; int main() { long long n, m; cin >> n >> m; vector<int> dx = {2, 2, 1, 1, -1, -1, -2, -2}; vector<int> dy = {1, -1, 2, -2, 2, -2, 1, -1}; vector<pair<int, int>> p; for(int i = 0; i < m; i++) { long long a, b; cin >> a >> b; ...
ALGO
0.99994
3.478981
9d8ec42b-b4bc-472c-a9f4-542b9e847ad1
manishde1234/LeetcodeSolutions
3154-maximum-value-of-an-ordered-triplet-i/maximum-value-of-an-ordered-triplet-i.cpp
class Solution { public: long long maximumTripletValue(vector<int>& nums) { long long result = 0; int n = nums.size(); for(int i = 0; i < n; i++){ for(int j = i+1; j < n; j++){ for(int k = j+1; k < n; k++){ long long ans = ((nums[i]-nums[j])*(...
ALGO
0.999984
5.089612
48bb7cd4-0104-4532-b534-bd01ed7798ad
IamBorn/IOI-preparation
o/askask/askask.cpp
#include "askask.h" #include <vector> using namespace std; std::vector<int> find_bombs(int N){ vector<vector<int>> ans; int now = 2; for(; now <= N; now*=2){ vector<int> temp; for(int i = 0; i < N; i++){ if(i % now) temp.push_back(i); } ans.push_back(temp); } auto res = analyse(ans); ...
ALGO
0.999243
4.54437
c4f393dd-35e0-4dca-ab07-a5514bc33b91
shruti1421/Data-Structures-and-Algorithms
Graphs/Trees/AVL Trees/AVL_deletion.cpp
//Full Concept: https://www.geeksforgeeks.org/avl-tree-set-2-deletion/ //O(height of tree)=O(logn) #include<bits/stdc++.h> using namespace std; class Node { public: int key; Node *left; Node *right; int height; }; Node * newNode(int key) { Node *node = new Node(); nod...
ALGO
0.999992
5.214866
87db6e8d-49fe-4bfc-80e3-c90129a4f497
mattwata/ssl-H
_deps/nnabla-src/src/nbla/function/generic/round.cpp
/** Round */ #include <nbla/array.hpp> #include <nbla/function/round.hpp> #include <nbla/variable.hpp> #include <algorithm> namespace nbla { NBLA_REGISTER_FUNCTION_SOURCE(Round); } // namespace nbla
ALGO
0.962105
6.129433
3aa0420f-34ee-4889-9825-64761c9d7f61
kmoonn/Whut-IE-Experiment-Reports
C++/大作业/work1.cpp
#include <fstream> #include <iostream> #include <sstream> #include <string> #include <vector> using namespace std; void insertion_sort(int arr[], int len) //插入排序函数 { int i, j, temp; for (i = 1; i < len; i++) { temp = arr[i]; for (j = i; j > 0 && arr[j - 1] > temp; j--) arr[j] = ...
ALGO
0.999434
4.505369
51d77c6a-b9ae-4c5e-af62-1b3fe55c1f0a
utkarsh-shekhar/basic-programs
C++/fizz-buzz.cpp
#include<iostream> #include<string> using namespace std; int main(){ for(int i = 1;i <= 100;i++){ string output = ""; output += i % 3 == 0 ? "Fizz" : ""; output += i % 5 == 0 ? "Buzz" : ""; if(output == "") output = to_string(i); cout << output << endl; } return 0; }
ALGO
0.999675
4.97135
2f838800-6de2-4c88-a895-c0402ff9485b
kindem-s-study-room/assignments-of-games101
3rd/eigen3/bench/benchEigenSolver.cpp
// g++ -DNDEBUG -O3 -I.. benchEigenSolver.cpp -o benchEigenSolver && ./benchEigenSolver // options: // -DBENCH_GMM // -DBENCH_GSL -lgsl /usr/lib/libcblas.so.3 // -DEIGEN_DONT_VECTORIZE // -msse2 // -DREPEAT=100 // -DTRIES=10 // -DSCALAR=double #include <iostream> #include <Eigen/Core> #include <Eigen/QR> #in...
TOOL
0.993117
5.772861
14a1da57-bdba-4303-9449-39d83e3516f3
Stadly/Scaling-the-scales
RecommenderSystem/collaborative-filter/predictor/constant-distance.cpp
#include "constant-distance.h" ConstantDistance::ConstantDistance(int const maxDist) : m_maxDist(maxDist) { reset(); } // ConstantDistance void ConstantDistance::reset() { m_foundDist = -1; m_foundPredictors = 0; } // reset void ConstantDistance::found(std::pair<int, int> const &p) { m_foundDist = p.seco...
ALGO
0.998038
6.579233
f8a2b8cf-7aba-4604-b4b8-a4da0f9519a0
kornilov-mr/cses
sorting/arrayDivision.cpp
#include <bits/stdc++.h> using namespace std; /* Data Type */ #define ll long long #define pii pair<int, int> #define pdd pair<double, double> #define pll pair<long long, long long> #define vi vector<int> #define vll vector<long long> #define mii map<int, int> #define si set<int> #define sc set<char> /* Functions */...
ALGO
0.999982
4.050693
3cc905a8-755c-4591-9d50-dc75b7d58d99
gtianyi/robustReinforcementLearning
include/eigen3/unsupported/doc/examples/MatrixPower.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { const double pi = std::acos(-1.0); Matrix3d A; A << cos(1), -sin(1), 0, sin(1), cos(1), 0, 0 , 0 , 1; std::cout << "The matrix A is:\n" << A << "\n\n" "The matrix power A^(pi/4) is:\n"...
ALGO
0.999859
3.790203
b3461079-2450-42ae-84ef-986c5c394d17
Madhavan0210/ProblemSolving-GFG
Difficulty: Medium/Delete a node from BST/delete-a-node-from-bst.cpp
class Solution { public: // Function to delete a node from BST. Node *deleteNode(Node *root, int key) { // your code goes here if(root==NULL) return NULL; if(root->data==key) return helper(root); Node* dummy=root; while(root!=NULL) { if(root->data>k...
ALGO
0.999993
6.607256
06071715-ba3c-47f1-9178-fb3795189c0a
thepranaygupta/Data-Structures-and-Algorithms
02. Algorithms/01. Arrays/07. Cyclically Rotate an Array/cyclic_rotate.cpp
using namespace std; int main() { int t; cin >> t; while(t--) { int N,D,i; cin >> N; cin >> D; int a[N],b[N]; for(i=0;i<N;i++) cin >> a[i]; for(i=0;i<N;i++) { if((i+D)<N) b[i] = a[i+D]; else ...
ALGO
0.9998
3.005226
2a884939-a325-4242-8d2c-c0bcd0c18549
Nilabh2121/DSA_LEARN
STACK/reverseString.cpp
#include<iostream> #include<stack> using namespace std; int main(){ string str = "nilabh"; stack<char> s; for(int i=0 ; i<str.length(); i++){ char ch = str[i]; s.push(ch); } string ans= ""; while(!s.empty()){ char ch = s.top(); ans.push_back(ch); s.p...
ALGO
0.999877
4.530563
3565bd25-d066-4357-a691-41c375287796
RonSheoran123/rubik-s-cube-solver
Rubik-s-Cube-Solver-main/PatternDatabases/CornerPatternDatabase.cpp
// // Created by Lakshya Mittal on 17-02-2022. // #include "CornerPatternDatabase.h" CornerPatternDatabase::CornerPatternDatabase() : PatternDatabase(100179840) {} CornerPatternDatabase::CornerPatternDatabase(uint8_t init_val) : PatternDatabase(100179840, init_val) {} uint32_t CornerPatternDatabase::getDatabaseInde...
ALGO
0.979883
5.318014
0b488de2-6b9e-4333-9fcb-15c8560078c1
yashi2407/Leetcode-Submissions
0015-3sum/0015-3sum.cpp
class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { sort(nums.begin(), nums.end()); vector<vector<int>> ans; for (int i = 0; i < nums.size(); i++) { if (i > 0 && nums[i] == nums[i - 1]) continue; // Skip duplicate 'i' int j = i + 1; ...
ALGO
0.999941
6.590038
33b7b12a-7aaa-4b91-9c78-c0b2a431e08f
Jeelgor/DSA
PATTERN_DSA/practices/Pattern2.cpp
#include<iostream> using namespace std; int main() { int n; cin>>n; for(int row=0;row<n;row++) { for(int col=row+1;col<=n;col++) { if(col==row+1 || col==n || row==0) { cout<<col<<""; } else{ cout<<" "; } } cout<<endl; } retur...
ALGO
0.999881
3.619972
e218366e-2cc8-415d-ad44-3c5b6bdeaa37
ChoHR/DataStructure
BinarySearchTree.cpp
/* * title :Binary Search Tree * func : Find, Insert, Delete, Print(Inorder, Preorder, Postorder), Init * school : Hanyang univ * major : CSE * date : 2016-01-21 * writed by CHR * ׻ Lnode < parant < Rnode tree̴. * ȣ PrintԼ Ͽ. * FindMax ⼭ ʴ´. * Լ Ͽ. */ #include<stdio.h> #include<stdlib.h> #includ...
ALGO
0.999135
3.846082
9e9b83f9-0d51-4b1b-b314-812335867894
Saltykub/CP
codeforce/2018/2018A.cpp
#include<bits/stdc++.h> #define ll long long #define st first #define pii pair<ll,ll> #define nd second #define pb push_back using namespace std; const int N = 2e5+10; bool CASE = true; void solve (){ ll n,k; cin >> n >> k; vector<ll> arr(n,0); ll mx = 0; ll ans = 0; for(int i = 0; i < n; i++) ...
ALGO
0.999889
3.526409
adfe0d5f-fb76-450f-8377-3deef409ea53
dhesin/SDCND_Path_Planning
src/Eigen-3.3/lapack/eigenvalues.cpp
#include "lapack_common.h" #include <Eigen/Eigenvalues> // computes eigen values and vectors of a general N-by-N matrix A EIGEN_LAPACK_FUNC(syev,(char *jobz, char *uplo, int* n, Scalar* a, int *lda, Scalar* w, Scalar* /*work*/, int* lwork, int *info)) { // TODO exploit the work buffer bool query_size = *lwork==-1;...
ALGO
0.990218
4.671507
eca8c91c-2a9e-4cd9-90a1-73efbcabc487
biswass101/Phitron_DATA_STUCTURE
Module-6(SLL Operations)/insert_at_tail.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *next; Node(int val) { this->val = val; this->next = NULL; } }; void insertAtTail(Node *&head, int val) { Node *newNode = new Node(val); if (head == NULL) { head = newNode; r...
ALGO
0.999267
5.480339
3b9ce8b1-86b3-4b0a-9585-f939c96bf945
lbenc135/Cpp_codes
Drzavno_practice/rastav_palin/main.cpp
#include <cstdio> #include <cstring> using namespace std; char s[100]; int stanje[100][100]; bool isPalin(int a, int b) { int mid=(b-a+2)/2; for(int i=0;i<mid;i++) if(s[a+i]!=s[b-i]) return false; return true; } int rast(int a, int b) { if(a==b) return 0; if(stanje[a][b]!=-1) return stanj...
ALGO
0.999935
4.208152
d7342705-17a2-41a9-8cf7-440721596ecc
Giatroo/Competitive-Programming
Neps/163.cpp
#include <bits/stdc++.h> typedef long long int ll; typedef long double lld; #define fora(i, n) for (ll i = 0; i < n; i++) #define forai(i, n) for (ll i = 1; i <= n; i++) #define ford(i, n) for (ll i = n-1; i >= 0; i--) #define fordi(i, n) for (ll i = n; i >= 0; i--) #define forita(it, c) for(auto it = c.begin(); it != ...
ALGO
0.999747
3.657474
c6b00705-1a86-4051-aa0b-32305d6d86e0
x1rh/ACAutomaton
leetcode/0213-打家劫舍II/0213-打家劫舍II.cpp
class Solution { public: int rob(vector<int>& nums) { int n = nums.size(), ans = 0; vector<int> f(n+2); if(n == 1) { return nums[0]; } else if(n == 2) { return max(nums[0], nums[1]); } f[0] = f[1] = 0; for(int i=0; i<n-1; i++) { ...
ALGO
0.999953
5.743296
a5f2cce1-874d-47d9-ac22-3d0445a461c2
Leaves333/competitive-programming
cf/2094/b.cpp
#pragma optimize("O3") #include <bits/stdc++.h> using namespace std; #define all(x) begin(x), end(x) typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vll; typedef vector<vll> vvll; typedef vector<bool> vb; typedef vector<vb>...
ALGO
0.999844
3.112325
ee841109-c203-4683-8552-2dc2421620c1
MikamiTetsuro365/Atcoder
ABC088/A.cpp
#include "bits/stdc++.h" using namespace std; typedef long long int ll; typedef pair<ll, ll > pi; typedef pair<pair<ll, ll >, ll > pii; vector<ll > vec; vector<vector<ll > > vec2; ll MOD = 1000000007; ll INF = 1145141919454519; int main() { ll N, A; cin >> N >> A; ll tmp = N % 500; if(tmp <= A){ ...
ALGO
0.999889
3.022544
3165bfa6-a703-4e94-836c-5b293c0295eb
raincross7/code-similarity
codes/train_code/problem252/problem252_297.cpp
#include <iostream> #include <algorithm> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <string.h> #include <vector> #include <queue> #include <cmath> #include <bitset> #include <complex> #include <functional> #include <numeric> #include <iomanip> #define SPBR(w, n) std::cou...
ALGO
0.999876
3.72898
ab506b05-858e-4702-8d41-289f7aa806eb
timercoin001/BTCT-TimerCoin-PUB
src/ecwrapper.cpp
#include "ecwrapper.h" #include "serialize.h" #include "uint256.h" #include <openssl/bn.h> #include <openssl/ecdsa.h> #include <openssl/obj_mac.h> namespace { /** * Perform ECDSA key recovery (see SEC1 4.1.6) for curves over (mod p)-fields * recid selects which key is recovered * if check is non-zero, additional...
TOOL
0.959127
7.256937
b8c135fb-d14d-46f9-82ee-8c083f86fcc0
maragmodh/GFGCODE
Easy/Delete middle element of a stack/delete-middle-element-of-a-stack.cpp
//{ Driver Code Starts //Initial template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution { public: //Function to delete middle element of a stack. void deleteMid(stack<int>&s, int sizeOfStack) { vector<int>store; ...
ALGO
0.999551
6.560602
9aa3fcf1-6e8e-4bdf-b304-62a88de17485
ChaofanChen/ogs5_bhe
GEO/BruteForceClosestPair.cpp
/* * BruteForceClosestPair.cpp * * Created on: Jan 25, 2011 * Author: TF */ #include "BruteForceClosestPair.h" #include "MathTools.h" namespace GEOLIB { BruteForceClosestPair::BruteForceClosestPair( std::vector<GEOLIB::Point*> const & pnts, size_t& id0, size_t& id1) : ClosestPair (pnts, id0, id1) ...
ALGO
0.999053
5.360349
eb69d573-50fd-4cf7-a8aa-11b18a7a68eb
Mark-code-vein/C-ISD-21HomeWork2
Lab-2.11.2.cpp
#include <iostream> using namespace std; struct DATE { int h, m, result; } time; int main() { TryAgain: //------------------------------------------------- DATE math2; cout << "Enter your current time" << endl; cout << "Hours1: " << endl; cin >> time.h; cout << "Hours2: " << endl; cin >> math2.h; if (time.h >...
ALGO
0.996551
3.508928
b7a40c6c-aab1-4396-84a5-d3a4ab73bd13
lsj0822/Problem_Solving
C++/연습문제/16_다이나믹프로그래밍/0x10_[G5]2240.cpp
#include <bits/stdc++.h> using namespace std; int t, w, combo = 1, recent, idx = 0, arr[1005], ans[1005][30], res = -1; int main() { cin >> t >> w >> recent; if (recent == 2) idx++; for (int i = 1; i < t; i++) { int num; cin >> num; if (num != recent) { arr[idx++] = combo; combo = 0; } combo++; re...
ALGO
0.999899
3.763567
c50b1d70-c1cc-4f19-83c5-e51ad7d4d18e
anjalipathak13/Practice-Leetcode-Question
1833-maximum-ice-cream-bars/1833-maximum-ice-cream-bars.cpp
class Solution { public: int maxIceCream(vector<int>& costs, int coins) { sort(costs.begin(),costs.end()); int c=0; for(int i=0;i<costs.size();i++) { if(costs[i]<=coins) { c++; coins-=costs[i]; // cout<<coins<<" "...
ALGO
0.999595
5.71787
6e63d77e-ca2f-4116-8c4b-8dcd0ec88fbd
namhyemi/TIL
C++/0x05/0x05_01.cpp
// https://www.acmicpc.net/problem/10828 // 10828. #include <bits/stdc++.h> using namespace std; //////// int dat[100005]; int pos=0; void push(int num) { dat[pos++] = num; } int pop() { if(pos==0) return -1; return dat[--pos]; } int top() { if(pos==0) return -1; return dat[pos-1]; } int ...
ALGO
0.999585
4.886287
ff71b812-e393-4522-a7f1-cc288db23fb2
ishandutta2007/codeforces
tzc_wk/normal/1178/D.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define MOD 1000000007 #define FOR(i,l,r) for(int i=l;i<=r;i++) #define REP(i,n) for(int i=1;i<=n;i++) #define REP0(i,n) for(int i=0;i<n;i++) #define PB push_back #define MP make_pair #define PII pair<int,int> #define VI ...
ALGO
0.999897
3.479357
f6fd225d-2e06-4663-b149-aafa526ada51
Mohammed-BENHAMMOUTE/Competitve-programming-
NumberOfProvinces.cpp
#include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define endl "\n" using namespace std; class Solution { public: int findCircleNum(vector<vector<int>>& isConnected) { int n = isConnected.size(); vector<int> visited(n,0); ...
ALGO
0.999883
5.793292
22508745-8ade-4564-9546-9bbdacc2341f
davetcoleman/bolt
moveit_ompl/src/detail/constrained_sampler.cpp
/* Author: Ioan Sucan */ #include <moveit/ompl/detail/constrained_sampler.h> #include <moveit/ompl/model_based_planning_context.h> #include <moveit/profiler/profiler.h> moveit_ompl::ConstrainedSampler::ConstrainedSampler(const ModelBasedPlanningContext *pc, const co...
ALGO
0.997118
7.101243
b27b1e1d-95d0-40ee-af4f-b434eae705fc
UIT-Together-2022-Team-Nobita/Flowchart-CPP
Bai022/Bai022.cpp
#include <iostream> using namespace std; void Nhap(int&); int XuLy(int); int main() { int n; Nhap(n); int kq = XuLy(n); cout << "Chu so hang don vi cua so n la: " << kq; return 1; } void Nhap(int& n) { cout << "Nhap so nguyen duong n: "; cin >> n; } int XuLy(int n) { int dv = n % 10; ...
ALGO
0.998727
3.576876
4041329f-97f6-4a36-8272-0fcadf1c6747
42tatl/Exo2PhysNum-SLAY
poincare.cpp
#include <iostream> #include <fstream> #include <iomanip> #include "ConfigFile.h" // Il contient les methodes pour lire inputs et ecrire outputs #include <valarray> #include <cmath> // Se usi fun using namespace std; class Exercice2 { private: double t, dt, tFin; double m, g, L; double Omega, kappa; double t...
ALGO
0.990368
4.181043
c730ebab-ef87-4ce1-b511-a7d8ef88c0ed
akihikodaki/gfxstream
third-party/astc-encoder/Source/astcenc_ideal_endpoints_and_weights.cpp
#if !defined(ASTCENC_DECOMPRESS_ONLY) /** * @brief Functions for computing color endpoints and texel weights. */ #include <cassert> #include "astcenc_internal.h" #include "astcenc_vecmathlib.h" /** * @brief Compute the infilled weight for N texel indices in a decimated grid. * * @param di The weight gri...
ALGO
0.998208
3.27088
770f1ab3-d606-4a55-98b2-dfd5108a822d
3ffy0fut0n/FacialDetectionOpenCV
opencv_contrib-4.x/modules/face/src/mace.cpp
#include "precomp.hpp" #include "opencv2/face/mace.hpp" namespace cv { namespace face { // //! Rearrange the quadrants of Fourier image //! so that the origin is at the image center // static void shiftDFT(const Mat &src, Mat &dst) { Size size = src.size(); if (dst.empty() || (dst.size().width != size.width...
ALGO
0.999402
6.126385
77f03a4a-7cdb-40c9-b1bc-943f890e3769
bakhshipoor/PrayerTimes
lvgl/src/libs/thorvg/tvgSwImage.cpp
#include "../../lv_conf_internal.h" #if LV_USE_THORVG_INTERNAL #include "tvgMath.h" #include "tvgSwCommon.h" /************************************************************************/ /* Internal Class Implementation */ /**********************************************************...
TOOL
0.900512
6.669535
1708c869-81c0-418c-a247-b1ebc8f7d690
blackbeardONE/CheggHero
coursehero_auto_reg/account_registered_on_20180326/txtsource/255A-GregsWorkOut.cpp
#include <iostream> using namespace std; int main() { int arr[1001]; int n; cin>>n; for(int i=0;i<n;i++){ cin>>arr[i]; } int chest=0,bices=0,back=0; for(int i=0;i<n;i++){ if(i%3==0){ chest+=arr[i]; }else if(i%3==1){ bices+=arr[i]; }else{ back+=arr[i]; } } ...
ALGO
0.999923
3.798919
1291247f-0563-4274-b180-a251bf4c88c9
fsshoily/codeforces-solutions
Assuit ICPC/Sheet 01/J_Multiples.cpp
#include<iostream> using namespace std; int main() { long long A,B; cin>>A>>B; if(A%B==0 || B%A==0) { cout<<"Multiples"; } else{ cout<<"No Multiples"; } return 0 ; }
ALGO
0.999881
4.111861
6158d843-5774-4188-b639-fd78bed971fb
WEGFan/Algorithm-Contest-Code
contests/2018-HDU-Multi-University-2/HDU 6315 G.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; #define lson l, m, root << 1 #define rson m + 1, r, root << 1 | 1 const int maxn = 100007; int sum[maxn << 2]; int maxa[maxn << 2], minb[maxn << 2]; int lazy[maxn << 2]; int arr[maxn], n; void PushUp(int root) { s...
ALGO
0.999892
4.238328
717041c1-7de1-4097-9b3b-c83cc9202401
SOFTK2765/PS
BOJ/10799.cpp
#include <bits/stdc++.h> using namespace std; char a[100001] = {}; int main() { scanf("%s", a); int l = strlen(a); int cnt = 0, sum = 0; for(int i=0;i<l;i++) { if(a[i]=='(') { if(a[i+1]==')') { sum += cnt; i++; } ...
ALGO
0.999187
3.754746
ebdbe0e4-9658-48d6-9a87-a51234560d46
ISOLDE-Project/riscv-llvm
libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_comp.pass.cpp
// <algorithm> // template<class T, StrictWeakOrder<auto, T> Compare> // requires !SameType<T, Compare> && CopyConstructible<Compare> // const T& // max(const T& a, const T& b, Compare comp); #include <algorithm> #include <functional> #include <cassert> #include "test_macros.h" template <class T, class C> voi...
TEST
0.927953
5.54799
cc7c2521-6b10-4751-bfac-e3443a9b4206
Shirocpm/neetcode-solves
Stack/largest_rectangle_in_histogram.cpp
class Solution { public: int largestRectangleArea(vector<int>& heights) { int n = heights.size(); vector<pair<int, int > > v; for (int i = 0; i < n; i++) { v.push_back({heights[i], i + 1}); } sort(v.begin(), v.end()); vector<int > h; int j = 0; set...
ALGO
0.999969
6.251903
dd307bd1-248d-4521-bac8-221f9f4d4505
stefanix/VirtualAwesome
addons/vaSound/libs/stk/src/BiQuad.cpp
/***************************************************/ /*! \class BiQuad \brief STK biquad (two-pole, two-zero) filter class. This class implements a two-pole, two-zero digital filter. Methods are provided for creating a resonance or notch in the frequency response while maintaining a constant filter ga...
ALGO
0.984392
5.870546
22593966-3bc3-4a71-9fd6-dc468372fbf9
Dhruvthakur873/complete_DSA_questions
arrays_all_DSA/changeOddEvenIndexValue.cpp
#include<bits/stdc++.h> using namespace std; int main(){ vector<int>v; cout<<"enter the elements of array"; for(int i = 0;i<10;i++){ int x; cin>>x; v.push_back(x); } for(int i =0; i<10;i++){ if(i%2==0){ v[i]+=10; }else{ v[i] *=v[i]; ...
ALGO
0.997484
3.033185
e3cccda9-68f8-4287-9a0f-41765c3c4e49
XinShuo-ph/gaussian_splatting_with_eye_tracking
submodules/diff-gaussian-rasterization-amr/third_party/glm/test/core/core_func_integer_bit_count.cpp
// This has the programs for computing the number of 1-bits // in a word, or byte, etc. // Max line length is 57, to fit in hacker.book. #include <cstdio> #include <cstdlib> //To define "exit", req'd by XLC. #include <ctime> unsigned rotatel(unsigned x, int n) { if (static_cast<unsigned>(n) > 63) { std::printf("r...
ALGO
0.99912
4.846448
407f3132-29fa-4fb1-9e6a-ef29144a6622
AgrVanshit/DataStructures-and-Algorithms
11.Binary Search Tree/Binary Search Tree PART-1/G)Find the inorder predecessor & successor of a given Key in BST.cpp
//*****https://www.geeksforgeeks.org/problems/predecessor-and-successor/1***** /* BST Node struct Node { int key; struct Node *left; struct Node *right; Node(int x){ key = x; left = NULL; right = NULL; } }; */ //Iterative Approach: //T.C: 2*O(log(n)); //S.C: O(1); class Solution { public: ...
ALGO
0.999997
5.584409
719bcf8a-1698-4434-abb5-1fe65bed7d64
vbonnici/grafe-sim
analysis/data/p02240/s652633741.cpp
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = a; i < (b); i++) #define rrep(i, a, b) for (int i = a; i >= (b); i--) #define all(x) (x).begin(), (x).end() using namespace std; using ll = long long; using P = pair<int, int>; template <class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; ...
ALGO
0.999987
4.679037
024488c0-a811-47c7-8417-f1c6bef4b3a5
AndroidOpenDevelopment/android_frameworks_av
media/libstagefright/codecs/amrwb/src/homing_amr_wb_dec.cpp
/* ------------------------------------------------------------------------------ Filename: homing_amr_wb_dec.cpp Date: 4/25/2007 ------------------------------------------------------------------------------ REVISION HISTORY Description: --------------------------------------------------------------------...
ALGO
0.998593
5.766362
d31bd267-d56f-4720-9708-ceab2aa89003
ishandutta2007/codeforces
siberian/normal/1025/C.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <cmath> using namespace std; signed main() { string str; cin >> str; str = str + str; int ans = 0, t = 0; for (int i = 1; i < str.size() - 1; i++) { if (str[i] == str[i + 1]) { ans = max(t, ans); t = 0; } else ...
ALGO
0.999939
3.923722
1bf2638a-4ace-4fd4-a0c9-0b4a03162831
wywhpsmaq/h
c++code/T7codes/[12]/[12]-1/BC103.cpp
#include <bits/stdc++.h> using namespace std; struct uu { int x; vector<int> v; } t[1001]; bool vis[1001]; void dfs(int x) { cout << t[x].x << " "; vis[x] = true; for (auto i : t[x].v) { if (!vis[i]) { dfs(i); } } } int main() { int n, m; cin >> n >> m; f...
ALGO
0.999991
4.607107
d4e5b3eb-3d4e-4b17-86fd-716ed60acbf9
Sumitmore161/Html
codechef.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define v vector<int> #define en endl #define l1 1e6 #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define pb push_back #define sz(a) (int)a.size() #define loop(ii, n) for (int ii = 0; ii < n; ii++) void solve() { loop...
ALGO
0.999732
4.344214
7c8fe5b2-30bd-4f8e-a83c-565124f79338
Anuj-er/Testpad-Solutions
Assignments/22CS006-Object Oriented Programming in C - 3rdSem/C++ Problem Solution/C++ Problem Solution.cpp
#include <iostream> #include <iomanip> using namespace std; class Patient { // Paste After this line private: int id; int age; string name; string bGroup; public: // Constructor Patient(int id, int age, string name, string bGroup) { this->id = id; this->age = age; ...
ALGO
0.89773
5.007595
64985c91-a2a7-424f-8ed9-12e35597dfa3
ishandutta2007/codeforces
autumnkite/normal/1403/A.cpp
#include <bits/stdc++.h> struct segment { int l, r; }; void solve() { int n; std::cin >> n; std::vector<segment> a(n); std::vector<int> L(2 * n); for (int i = 0; i < n; ++i) { std::cin >> a[i].l >> a[i].r; ++a[i].r; L[i] = a[i].l; L[i + n] = a[i].r; } std::sort(L.begin(), L.end()); L.erase(std::uniqu...
ALGO
0.999846
4.311451
5c7ce258-af60-48fe-a576-9beb757a0547
GitCodeBoy/unreal-editor-dev
Engine/Source/ThirdParty/OpenSubdiv/3.2.0/opensubdiv/osd/ompKernel.cpp
#include "../osd/ompKernel.h" #include "../osd/bufferDescriptor.h" #include <cassert> #include <cstdlib> #include <omp.h> #include <vector> namespace OpenSubdiv { namespace OPENSUBDIV_VERSION { namespace Osd { template <class T> T * elementAtIndex(T * src, int index, BufferDescriptor const &desc) { return src ...
ALGO
0.95404
5.083361