uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
22ba519f-6303-4296-9ce1-a0b0da737586
Hongtae/FTVoxelEngine
Core/Libs/OpenAL/core/bs2b.cpp
#include "config.h" #include <algorithm> #include <cmath> #include <iterator> #include "alnumbers.h" #include "bs2b.h" /* Set up all data. */ static void init(struct bs2b *bs2b) { float Fc_lo, Fc_hi; float G_lo, G_hi; float x, g; switch(bs2b->level) { case BS2B_LOW_CLEVEL: /* Low crossfeed l...
ALGO
0.996278
6.495718
c0fc9ca4-8f39-4002-a97d-00ec519dccc3
sagarchapara/cp
AtCoder/abc256/f.cpp
// g++ -o out <filename>.cpp // .\out.exe #define SAGAR #include <bits/stdc++.h> using namespace std; /* *========================================== * Input *========================================== */ void read(){} void read(long long& a){scanf("%lld",&a);} void read(long& a){scanf("%ld",&a);} void read(int&...
ALGO
0.999641
3.93645
075d6fc2-42ba-4070-a888-0639f8f04ea6
ColinGilbert/GFX-SDK
SDK/common/bullet/gim_tri_collision.cpp
/*! \file gim_tri_collision.h \author Francisco Leon Najera */ #include "gim_tri_collision.h" #define TRI_LOCAL_EPSILON 0.000001f #define MIN_EDGE_EDGE_DIS 0.00001f class GIM_TRIANGLE_CALCULATION_CACHE { public: GREAL margin; btVector3 tu_vertices[3]; btVector3 tv_vertices[3]; btVector4 tu_plane; btVector4 tv_...
ALGO
0.999437
5.728266
fed7a7b5-c0ab-4683-9742-692bef3db859
SaveliyLipaev/Homework-1-course
Semestr_1/HomeWork_6/Number_4/Number_4/Number_4/ListFor6.4.cpp
#include <string> #include <iostream> struct ListNode { std::string name; std::string number; ListNode *previous = nullptr; ListNode *next = nullptr; }; struct List { int length = 0; ListNode *head = nullptr; ListNode *tail = nullptr; }; List* createList() { return new List; } bool isEmpty(List *list) { re...
ALGO
0.999479
5.005154
fe35f9f3-1909-42b5-8893-fe8eae8eae5d
Ayushsinhahaha/Codes
1619-mean-of-array-after-removing-some-elements/1619-mean-of-array-after-removing-some-elements.cpp
class Solution { public: double trimMean(vector<int>& arr) { sort(arr.begin(),arr.end()); int n=arr.size(); int number=(5*n)/100; double sum=0,terms=n-(2*number); double mean=0; for(int i=number;i<n-number;i++) { sum+=arr[i]; } ...
ALGO
0.999685
6.115721
b5d40865-2016-4945-9826-3b535b275201
ishandutta2007/codeforces
dorijanlendvaj/normal/1537/B.cpp
//DUEL #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #define x first #define y second #define pii pair<int,int> #define pb push_back #define eb emplace_back #pragma GCC optimize("unroll-loops") #define shandom_ruffle(a, b) shuffle(a, b, rng) #define vi vector<int> #define vl vector<ll> #define popcn...
ALGO
0.999005
3.893507
df30a1d0-17d9-4b30-b5e4-1940855c21e6
Jacob-Zhou/LRMR
Dependencies/extractFeatures/edison_matlab_interface/segm/RAList.cpp
/******************************************************* Mean Shift Analysis Library ============================================= The mean shift library is a collection of routines that use the mean shift algorithm. Using this algorithm, the necessary output will be generated needed to analyze ...
ALGO
0.99972
5.331563
68cc6aa4-80ea-433c-93b6-b62b7ee83475
seonha14/My-Codes
CodeChef/CHN15A.cpp
#include <iostream> using namespace std; int main() { int t; cin >> t; while (t--) { int n, k, count = 0; cin >> n >> k; long long int a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; a[i] += k; if (a[i] % 7 == 0) ...
ALGO
0.999862
3.402416
3b615dc0-8a61-4d2b-ad74-a24d89e5ae7f
AvansTi/TI2.4-CGR-Demos
lib/glm/test/gtx/gtx_fast_trigonometry.cpp
#include <glm/ext/scalar_ulp.hpp> #define GLM_ENABLE_EXPERIMENTAL #include <glm/gtc/type_precision.hpp> #include <glm/gtx/fast_trigonometry.hpp> #include <glm/gtx/integer.hpp> #include <glm/gtx/common.hpp> #include <glm/gtc/constants.hpp> #include <glm/gtc/vec1.hpp> #include <glm/trigonometric.hpp> #include <cmath> #i...
TEST
0.940582
6.277224
32ea27ce-ffe1-4cbc-932b-29161d3093b4
ishandutta2007/codeforces
mrdindows/normal/331/C1.cpp
#pragma comment(linker, "/stack:20000000") # include <iostream> # include <cmath> # include <algorithm> # include <cstdio> # include <cstring> # include <string> # include <cstdlib> # include <vector> # include <bitset> # include <map> # include <queue> # include <ctime> # include <stack> # include <set> # include <li...
ALGO
0.99982
4.011951
f22e23ee-42c9-49b8-aba0-1fae6802f25a
ishandutta2007/codeforces
cz_xuyixuan/normal/1208/H.cpp
#include<bits/stdc++.h> using namespace std; const int MAXN = 2e5 + 5; const int INF = 1e9 + 7; typedef long long ll; typedef long double ld; typedef unsigned long long ull; template <typename T> void chkmax(T &x, T y) {x = max(x, y); } template <typename T> void chkmin(T &x, T y) {x = min(x, y); } template <typename ...
ALGO
0.999923
4.408607
70a7b70b-e880-440a-a658-21a0bb5c414d
SJBiber/SJ_C-_study
study/func/func_4.cpp
#include <iostream> using namespace std; struct num_list { int num1; int num2; int num3; }; #if 1 /* 구조체 주소값을 활용한 case */ void forloop(num_list &num , int n) { for(int i = 0 ; i < n ; i++) { num.num1 ++; num.num2 ++; num.num3 ++; cout << "number1 : "<< num.num1...
ALGO
0.955675
3.591651
5b2436ee-83b6-4773-a221-87c638cc5179
juyipeng/personal_cpp
educoder_code_y1s2/5.1.cpp
#include <iostream> using namespace std; int scale, *nspace = nullptr; void percolate(int present){ while(present*2 <= scale){ if(nspace[present]<min(nspace[present*2],nspace[present*2+1])){ return; } else{ int tmp = nspace[present]; int tar = (nspace[pr...
ALGO
0.999945
3.291607
e66e85a2-b5ff-4ef6-80d1-67b8665b68d2
Rebel19405s/OS_Lab_Assignments
10_DiskSchdl_SSTF.cpp
#include<iostream> using namespace std; int main(){ int n; cout<<"Enter the Number of Disk Requests : "; cin>>n; int head; cout<<"Enter the Initial position of W/R head : "; cin>>head; int req[n]; for(int i=0; i<n; i++){ cout<<"Enter the requested Track : "; cin>>req[i...
ALGO
0.999992
4.033448
c24e3ccd-0528-4190-bf4f-4f9c645a4c62
demuko/ode_book
robosimu/bounce.cpp
// 簡単!実践!ロボットシミュレーション // Open Dynamics Engineによるロボットプログラミング // 出村公成著, 森北出版 (2007) http://demura.net/ // このプログラムは上本のサンプルプログラムです. // プログラム 1.2: ボールの跳ね返り bounce.cpp by Kosei Demura (2007-5-18) // // This program is a sample program of my book as follows //“Robot Simulation - Robot programming with Open Dynamics Engine, /...
ALGO
0.991941
4.790888
3b685e67-fd0f-47f3-b5ba-3bda045ab8ee
bakseoyong/BaekjoonAlgorithm
BFS/2146메모리초과.cpp
#include <iostream> #include <queue> #include <cstring> using namespace std; int N; int map[100][100]; int dy[4] = {-1, 1, 0, 0}; int dx[4] = {0, 0, 1, -1}; queue<pair<int, int> > islandPos; int islandNum = 2; int answer = 999999; bool visited[100][100]; //섬을 구별 void BFS(){ for(int i = 0; i < N; i++){ for...
ALGO
0.999392
4.834607
989a4b3d-0762-4168-905d-9bd839bff751
mazhar75/online-Judge
CodeForces/GNU C++17/299B/139062875.cpp
/** Author:Md.Mazharul Islam CSE,SUST*/ #include<iostream> #include<string> using namespace std; int main(){ long int n,k; cin>>n>>k; string s; cin>>s; long int flag=0,c=0; for(long int i=0;i<n;i++){ if(s[i]=='#'){ ++c; } else if(s[i]=='.'){ if(c+1>k) { ...
ALGO
0.999982
3.55711
c9d22adf-e7c6-48be-b2b8-82b62d6117aa
nickjhathaway/njhseq
src/njhseq/utils/numUtils.cpp
/* * numUtils.cpp * * Created on: Jun 22, 2014 * Author: nickhathaway */ namespace njhseq { std::vector<double> getRange(double start, double stop, uint32_t num) { double difference = stop - start; double step = difference / (num - 1); std::vector<double> ans; for (const auto i : iter::range<uint32...
TOOL
0.972012
5.183886
59313661-6483-43a3-aa18-f4ec42a7ee1d
alexandraback/datacollection
solutions_5766201229705216_0/C++/ACing/B.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; #define MaxN 2200 int top, g[MaxN], nxt[MaxN], head[MaxN], sz[MaxN], dp[MaxN], deg[MaxN]; void add_edge(int a, int b) { g[top] = b, nxt[top] = head[a], head[a] = top++; } void dfs(int u, int p) { int sons = 0; int rec[2] = {-1,...
ALGO
0.998956
5.284609
689f4bc9-2a09-4288-a991-5aea87df863d
kcalbCube/PVC-16
pvc-asm/syntaxer.cpp
#include "syntaxer.h" #include "utility.h" #include "../PVC-16/opcode.h" uint16_t Mnemonic::describeMnemonics(void) const { uint16_t result = 0, i = 0; for (auto&& m : mnemonics) result += (REGISTER + m.index()) << i++ * 4; return result; } std::vector<SyntaxUnit> Syntaxer::syntaxParse(std::vector<Lexema>& le...
TOOL
0.883599
5.771823
72035eeb-a52c-4130-95b9-ff6c5521e9c5
itanishajain/c-
example_Virtual.cpp
#include<iostream> #include<cstring> using namespace std; class CWH { protected: string title; float rating; public: CWH(string s, float r) : title(s), rating(r) {} virtual void display() {} }; class CWHVideo : public CWH { int videolength; public: CWHVideo(string s, float r, int vl) : CWH(s, ...
TOOL
0.877944
5.949872
936b417a-329c-40f2-9c82-6fde84a6f024
HJ1X/algorithms-on-graphs
week3_paths_in_graphs1/2_bipartite/bipartite.cpp
#include <iostream> #include <vector> #include <queue> using std::vector; using std::queue; int bipartite(vector<vector<int> > &adj) { //write your code here return -1; } int main() { int n, m; std::cin >> n >> m; vector<vector<int> > adj(n, vector<int>()); for (int i = 0; i < m; i++) { int x, y; ...
ALGO
0.999956
4.963869
5629d5d8-85bc-4d5a-aab8-2534fbf0b25e
shiridikumar/cp
907d.cpp
#include <iostream> #include <bits/stdc++.h> #define mod 1000000007; using namespace std; int getllog(long long num, long long base,vector<vector<long long > >&vec) { int ind = 0; while (vec[base][ind] <= num && vec[base][ind]>0) { ind += 1; } return ind - 1; } long long power(long long y,...
ALGO
0.999688
4.709447
5c73ab88-9212-407f-85ff-6825bea56fbd
jackKiZhu/Neon-csgo-cheat
SDKLauncher/Crypto/Include/iterhash.cpp
// iterhash.cpp - originally written and placed in the public domain by Wei Dai #ifndef __GNUC__ #define CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES #endif #include "iterhash.h" #include "misc.h" #include "cpu.h" NAMESPACE_BEGIN(CryptoPP) template <class T, class BASE> void IteratedHashBase<T, BASE>::Update(const byte ...
ALGO
0.999492
6.907722
a7d05aba-6a62-4339-9a89-5d77bebd540f
niyatid13/Coding_practice
Array/kadaneAlgo.cpp
#include <bits/stdc++.h> using namespace std; int maxSumarray(int arr[], int n){ int maxsum = arr[0]; int sum = 0; for(int i = 0; i < n; i++){ sum = sum + arr[i]; maxsum = max(maxsum, sum); if( sum < 0){ sum = 0; } } return maxsum; } int main(){ ...
ALGO
0.99989
4.726957
c0d420ba-629f-4a4f-9e32-e53fc431ae2d
SaminRahman1/DSA
Introduction to Algorithms/Assignment-02/Can_Go_Again.cpp
// https://www.hackerrank.com/contests/assignment-02-a-introduction-to-algorithms-a-batch-06/challenges #include <bits/stdc++.h> using namespace std; class Edge{ public: int a,b; long long int c; Edge(int a,int b, long long int c){ this->a = a; this->b = b; ...
ALGO
0.999899
4.730977
ad6b24e1-d10b-4c32-a428-934c4f58d7ab
raincross7/code-similarity
codes/train_code/problem281/problem281_241.cpp
#include <iostream> #include <vector> using namespace std; int main(void){ long n; cin >> n; vector<long> a(n); for(long i = 0;i < n;i++){ cin >> a[i]; } for(long i = 0;i < n;i++){ if(a[i] == 0){ cout << 0 << endl; return 0; } } ...
ALGO
0.999914
3.692607
4f7870da-9637-47f5-9ec6-5f51b556a990
animikhaich/NeRF-Editing-GP
TetWild/extern/libigl/include/igl/vertex_components.cpp
template <typename DerivedA, typename DerivedC, typename Derivedcounts> IGL_INLINE void igl::vertex_components( const Eigen::SparseCompressedBase<DerivedA> & A, Eigen::PlainObjectBase<DerivedC> & C, Eigen::PlainObjectBase<Derivedcounts> & counts) { using namespace Eigen; using namespace std; assert(A.rows()...
ALGO
0.99861
6.885439
a2812287-f0f6-4305-a65d-5d598fab8183
wohenniubi/codebattle
src/946_Validate_Stack_Sequences/main.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: //Runtime: 20 ms, faster than 22.91% //Memory Usage: 15.7 MB, less than 65.94% bool validateStackSequences(vector<int>& pushed, vector<int>& popped) { // 貌似我看出来怎么做了,借助一个stack存push数组,同时移动pop数组的指针 int len = ...
ALGO
0.999239
5.873181
4615b09f-cea2-405e-9fe3-c202c01f82d0
sjm150/ps
codeforces/rounds/961/b2.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { cin.tie(0); ios_base::sync_with_stdio(0); int t; cin >> t; while (t--) { int n; cin >> n; ll m; cin >> m; vector<pair<int, int>> ac(n); for (int i = 0; i < n; i++) cin >> ac[i].first; f...
ALGO
0.999943
3.822227
db5f134c-c58a-432d-a009-eab37b2af9a6
benyamindarmoni/Ex4a
calculate.cpp
#include <string> #include "calculate.hpp" #include <iostream> using namespace std; string bullpgia:: calculateBullAndPgia( string a, string b){ int bul=0; int pgia=0; int min=0; if(a.length()<b.length())min=a.length(); else min=b.length(); for(int i=0;i<min;i++){ if(a[i]==b[i]){ ...
ALGO
0.999403
4.225989
150774da-9720-4db5-90c8-86e6c8169664
PowerDiagram/PowerDiagram
src/cpp/sdot/DiracVec.cpp
#include "DiracVec.h" #include "Mpi.h" namespace sdot { DiracVec::~PD_NAME( DiracVec )() { } Vec<Pt,2> DiracVec::local_min_max() const { Vec<Pt,2> res; if ( local_size() ) { res[ 0 ] = local_pos( 0 ); res[ 1 ] = res[ 0 ]; for( PI i = 0, s = local_size(); i < s; ++i ) { co...
TOOL
0.889219
5.439728
e440a439-0ad1-4132-8d47-440805363a7a
Qucs/qucsator
src/math/cbesselj.cpp
/*!\file cbesselj.cpp \brief compute complex bessel J function Bibligraphy: [1] Bessel function of the first kind with complex argument Yousif, Hashim A.; Melka, Richard Computer Physics Communications, vol. 106, Issue 3, pp.199-206 11/1997, ELSEVIER, doi://10.1016/S0010-4655(97)00087-8 [2...
ALGO
0.999949
5.857354
1887acbd-8335-49c7-b7a6-5305a1437db3
RifianFernando/Competitive-Programming
Pre-UAS/ProbB.cpp
#include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a; cin >> b; int count = 0; while (a != b) { // if a dikurang tidak = 1 if ((a * 2) - b > 3) { a--; count++; } else { a...
ALGO
0.999786
3.848209
16af9a3d-b6cc-4d8f-b15d-e47eafca6a8f
xophiix/leetcode
sameTree.cpp
#include <iostream> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { public: bool isSameTree(TreeNode *p, TreeNode *q) { if ((p && !q) || (!p && q)) { return false; ...
ALGO
0.999919
5.787312
a13f32ef-c728-40d9-bb35-b194d9733e26
ArijitWayne/Algorithms
Hashing/2_Sum/sum_pair.cpp
#include <bits/stdc++.h> using namespace std; void printPairs(int arr[], int arr_size, int sum) { unordered_set<int> s; for (int i = 0; i < arr_size; i++) { int temp = sum - arr[i]; if (temp >= 0 && s.find(temp) != s.end()) cout << "Pair with given sum " << sum...
ALGO
0.999765
5.349181
913313c1-5840-42ee-926c-dd00080ada59
mayankAgg06/GFG-Solutions
Difficulty: Medium/Bottom View of Binary Tree/bottom-view-of-binary-tree.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; #define MAX_HEIGHT 100000 // Tree Node struct Node { int data; Node* left; Node* right; }; // Utility function to create a new Tree Node Node* newNode(int val) { Node* temp = new Node; temp->data = val; temp->left = NULL; ...
ALGO
0.999702
6.527455
a08cd222-030d-4c15-8378-fde6c8bd1781
Cloudytosunny/SLAM
ch5/opencv-3.4.16/modules/ml/src/lr.cpp
// // This is a implementation of the Logistic Regression algorithm // #include "precomp.hpp" using namespace std; namespace cv { namespace ml { class LrParams { public: LrParams() { alpha = 0.001; num_iters = 1000; norm = LogisticRegression::REG_L2; train_method = LogisticRe...
DATA
0.990513
7.404818
9ade6842-190a-4228-bad0-0e53f24abaa3
192210275/OS-CSA0437
waiting prcs vt high alg.cpp
#include <stdio.h> int main() { // Matrix for storing Process Id, Burst // Time, Average Waiting Time & Average // Turn Around Time. int A[100][4]; int i, j, n, total = 0, index, temp; float avg_wt, avg_tat; printf("Enter number of process: "); scanf("%d", &n); printf("Enter Burst Time:\n"); // User Input Bur...
ALGO
0.999967
3.130387
7536ab8f-e549-4414-ade9-e97a7d84fe50
TBradCreech/TJBotSDK
lib/boost_1_60_0/libs/math/example/brent_minimise_example.cpp
//! \file //! \brief Brent_minimise_example.cpp // Note that this file contains Quickbook mark-up as well as code // and comments, don't change any of the special comment mark-ups! // For some diagnostic information: //#define BOOST_MATH_INSTRUMENT // If quadmath float128 is available: //#define BOOST_HAVE_QUADMATH ...
ALGO
0.998467
5.726198
2f254cf7-0319-4046-9ecb-1fed7f0681f4
dcardin14/classwork
classWork33.cpp
/* Name: Gia Rivera Date: Feb 27 2021 Assignment #: classWork33 Status: Completed Language: C++ ------------------------------------------------------------------------- Comments ask users to enter integers until -999 -999 will terminate the users input; sentinel value */ #include <iostream> // for cin...
ALGO
0.92895
4.908617
1e59778f-f25a-4797-98e5-b57235c0e2dc
sanjeetboora/Launchpad_29Dec2019
Lecture33/subarrayWithSumZero.cpp
#include <bits/stdc++.h> #include <unordered_map> using namespace std; bool isSubarraySumZero(int* arr, int n) { unordered_map<int, int> mp; int prefixSum = 0; for (int i = 0; i < n; ++i) { prefixSum += arr[i]; if (prefixSum == 0 or (mp.count(prefixSum) and mp[prefixSum] != i)) { cout << mp[prefixSum] + 1 <...
ALGO
0.99941
5.2734
898a7e24-7924-442a-8bc6-7fa66c4e0785
archria/baekjoon
1934.cpp
#include <iostream> using namespace std; int gcd(int a, int b){ int tmp, n; if(a<b){ tmp = a; a = b; b = tmp; } while(b!=0){ n = a%b; a = b; b = n; } return a; } int main(){ int n; cin>>n; for(int i = 0; i < n ; i++){ int a...
ALGO
0.999972
4.363741
c92b6768-6a03-4e3b-b8c1-865efbdc2bd6
WANG-Ruipeng/DDMaya
DDMaya/include/igl/triangle_triangle_intersect_shared_vertex.cpp
#include "triangle_triangle_intersect_shared_vertex.h" #include "ray_triangle_intersect.h" #include "barycentric_coordinates.h" #include "matlab_format.h" #include <Eigen/Geometry> #include <iostream> #include <iomanip> #include <stdio.h> // std::signbit #include <cmath> //#define IGL_TRIANGLE_TRIANGLE_INTERSECT_SHARE...
ALGO
0.998991
6.685491
a4757927-958a-4166-95a3-9c0565f69829
sheetuchoudhary/Data_Structure
activity_1.cpp
#include <iostream> using namespace std; int main() { int size_num ; cout<<"Enter the size or array : "; cin>>size_num; int arr[size_num]; int i=0; for(int i=0;i<size_num;i++){ cout<<"enter the element "<< i+1 << " of array :"; cin>>arr[i]; } cout << "The array is: "; co...
ALGO
0.978658
3.492179
36b54eaa-5aae-4561-9d1d-ce56d10bc482
Lesords/ACM
牛客oj/小白月赛系列/牛客小白月赛31/D 坐标计数.cpp
#include<iostream>//ac #include<algorithm> #define ll long long using namespace std; //⣺е㶼ԱΪ(0,0)ԾӦ int main() { int t; cin>>t; while(t--) { ll x1,x2,y1,y2; cin>>x1>>y1>>x2>>y2;//x2y2ֵ cout<<(x2-x1+1)*(y2-y1+1)<<"\n"; } return 0; }
ALGO
0.998583
3.552231
f0ba0450-1868-4557-8304-43719d35b9a6
ishandutta2007/codeforces
alexluchianov/normal/1386/C.cpp
#include <iostream> #include <vector> #include <cassert> #include <cmath> #include <stack> using ll = long long; #define MIN(a, b) (((a) < (b)) ? (a) : (b)) #define MAX(a, b) (((a) < (b)) ? (b) : (a)) int const nmax = 200000; int v[1 + nmax][2]; namespace Dsu{ struct Data{ int x; int y; int szx; i...
ALGO
0.999994
4.35585
35c625d0-8418-4ca3-b10d-06cd45b2e47d
Raghavgarg12/Leetcode
283-move-zeroes/move-zeroes.cpp
class Solution { public: void moveZeroes(vector<int>& nums) { int n=nums.size(); int i,k=0; for (i=0;i<n;i++) if(nums[i]!=0) swap(nums[k++],nums[i]); } };
ALGO
0.999927
6.142421
2768970d-5d34-40ef-87ae-ee5d2c5a211e
tasneemria/Codeforces_Solved
Kefa and First Steps.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n,arr[100000]; cin>>n; for(int i=0;i<n;i++) { cin>>arr[i]; } int maxV = 1,cnt=1; for(int i=0;i<n-1;i++) { if(arr[i+1]>=arr[i]) { cnt++; } else { cnt = 1;...
ALGO
0.999906
4.118781
8165ac29-bbdb-48e5-8562-e5ef96c32beb
GaisaiYuno/OI-Record-exe-deleted
Grade 10-12/2018 autumn/NOIP/NOIP2018提高组Day1程序包/GD-Senior/answers/GD-0240/road/road.cpp
#include<iostream> #include<cstdio> #include<algorithm> #include<list> #include<queue> #include<functional> #include<cstring> #include<deque> #include<map> #include<set> using namespace std; long long n,a[100005],b[100005],ans; int main() { freopen("road.in","r",stdin); freopen("road.out","w",stdout); cin>>n; for(i...
ALGO
0.999957
3.219582
da23e326-1316-47de-aed9-e903713cc027
hsuan1117/I2P2-MiniChess
src/policy/MiniMax.cpp
#include "MiniMax.hpp" #include "../state/state.hpp" #include <cstdlib> using namespace std; #define mp std::make_pair /** * @brief Get a legal action using MiniMax algorithm * * @param state Now state * @param depth You may need this for other policy * @return <Move, value> */ std::pair<Move, int> MiniMax::get...
ALGO
0.999888
5.278721
27398219-a227-44c2-b5ed-0255ab6c023a
wenhui0815/club
AtCoder-374.cpp
#include <bits/stdc++.h> using namespace std; int main(){ double A, B; cin >> A >> B; double S = B/A; cout << fixed << setprecision(3) << S <<endl; }
ALGO
0.991531
3.852545
3c03d1a9-ab91-4c77-a3c2-ec19bdfb81af
Divyanshu-012/Arrays
Pattern Printing/pattern2.cpp
#include<iostream> using namespace std; int main(){ //code for this kind of pattern---> /*1111 222 333*/ int i=1,n; cin>>n; while(i<=n){ int j=1; while(j<=n){ cout<<i; j=j+1; } cout<<endl; i=i+1; } }
ALGO
0.999951
3.647655
ac79914e-01a3-41f3-9bd3-1752c080fcec
raincross7/code-similarity
codes/train_code/problem278/problem278_279.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll, ll> pll; #define FOR(i, n, m) for (ll(i) = (m); (i) < (n); ++(i)) #define REP(i, n) FOR(i, n, 0) #define OF64 std::setprecision(10) const ll MOD = 1000000007; const ll INF = (ll)1e15; ll dp[1005][1005]; int main() { string...
ALGO
0.999984
4.243853
a25858e6-8752-45cb-b96a-24f8930db374
fishy15/competitive_programming
online/atcoder/abc213/takahashi_tour.cpp
#include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <array> #include <algorithm> #include <utility> #include <map> #include <queue> #include <set> #include <cmath> #include <cstdio> #include <cstring> #define ll long long #define ld long double #define eps 1e-8 #define MOD 1000000007 ...
ALGO
0.999956
4.778198
9a049895-71b8-4b7c-bf09-00fdbd6383d4
bobser223/learning_c_cpp
eolimp/7849_2.cpp
// // Created by Volodymyr Avvakumov on 18.08.2024. // #include <iostream> using namespace std; void findMin(int *lst, int size, int &min){ min = lst[0]; for (int i = 1; i < size; i++){ int currNum = lst[i]; if (currNum < min){ min = currNum; } } } void findMax(int *ls...
ALGO
0.999977
4.927311
34e7d792-ee3b-4928-bfe7-d5ab8bb22a9c
PhillipDiCarlo/The-Corruptor
ASRC Systems Simulation Driver/boost_1_74_0/libs/mpi/example/random_content.cpp
// An example using Boost.MPI's skeletons and content to optimize // communication. #include <boost/mpi.hpp> #include <boost/serialization/list.hpp> #include <algorithm> #include <functional> #include <numeric> #include <iostream> #include <stdlib.h> namespace mpi = boost::mpi; int main(int argc, char* argv[]) { mpi...
ALGO
0.97484
4.402016
bdef6db1-89fd-44f8-afc4-5a074ac53193
snjumaheshwari/C-Cpp
Graph/Graph_DFS.cpp
#include<bits/stdc++.h> #define ll long long #define f first #define s second #define pb push_back #define pf push_front const int MOD = int(1e9)+7; using namespace std; list<int> *adj; int n; void dfsHelper(int node,bool* visited){ visited[node]=true; cout<<node<<" "; for(auto neib: adj[node]){ ...
ALGO
0.999985
5.1746
9d01cd15-2a62-41b0-aac5-a66b10954e64
vishwa099/Cpp_Learning
STL Trials/Priority_Queue.cpp
#include<iostream> #include<queue> using namespace std; int main(){ priority_queue<int> maxi; priority_queue<int, vector <int>, greater <int>> mini; maxi.push(2); maxi.push(23); maxi.push(12); maxi.push(18); maxi.push(16); maxi.push(11); maxi.push(148); int n=maxi.size(); ...
ALGO
0.999019
3.950113
065f0106-43dd-4730-a2db-25d3e85581d4
destinysam/cpp
reverse of array/main.cpp
#include <iostream> using namespace std; int main() { int i,j,n; int arr[100]; int arrr[100]; cout<<"ENTER THE NUMBER OF ELEMENTS"<<endl; cin>>n; cout<<"ENTER THE ARRAY ELEMENTS"<<endl; for(i=0;i<n;i++) { cin>>arr[i]; } for(i=n-1,j=0;i>=0||j==n;i--,j++) { ar...
ALGO
0.999781
3.438646
565309d7-67ac-455c-9c91-8d70d95a0e9e
Jamar-Brown/imp
modules/dnn/src/graph_simplifier.cpp
#include "precomp.hpp" #include "graph_simplifier.hpp" #include <queue> namespace cv { namespace dnn { Subgraph::~Subgraph() {} int Subgraph::addNodeToMatch(const std::string& op, int input_0, int input_1, int input_2, int input_3) { int nodeInputs[] = {input_0, input_1, input_2, i...
ALGO
0.974476
7.045115
9e75c6cd-3e12-4946-9c81-393df32a71ac
KarolGryc/advent-of-code-2024
Day_01/Day_01.cpp
#include <utility> #include <vector> #include <fstream> #include <iostream> #include <string> #include <sstream> #include <algorithm> #include <execution> #include <unordered_map> #include <numeric> std::vector<std::string> argsToString(int argc, char* args[]); using intVecPair = std::pair<std::vector<int>, std::vect...
ALGO
0.947183
5.347167
45213143-afdb-460b-9c96-41c8af24d16b
beet-aizu/library
linkcuttree/farthest.cpp
#ifndef call_from_test #include<bits/stdc++.h> using namespace std; #define call_from_test #include "base.cpp" #undef call_from_test #endif // https://ei1333.hateblo.jp/entry/2019/06/13/133736 //BEGIN CUT HERE template<typename Tp> struct NodeBase{ using T = Tp; NodeBase *l,*r,*p; bool rev; T val,ld,rd,smd; ...
ALGO
0.99992
4.775146
f4fb35c0-47d6-4a43-9221-1d77c94b222c
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/12/53/14.cpp
#include<cstring> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> #include<numeric> #include<map> #include<set> #include<cstdlib> #include<string> #include<cassert> #include<iostream> using namespace std; typedef vector<int> vi; typedef long long int64; #define FOR(i,n)for(int i=0;i<(int)(n);i++) ...
ALGO
0.999949
3.428065
af58e25c-c016-4dd3-a9f5-b163cf5f54e5
DivyamVJ0901/Love-Babbar-DSA-Youtube-Course-all-Codes
ArrayElementsSum(recursion).cpp
// CODE FOR SUM OF ARRAY ELEMENTS #include <iostream> using namespace std; int ArraySum(int arr[], int n) { if (n == 0) return arr[0]; else return arr[n - 1] + ArraySum(arr, n - 1); } int main() { int Dogesh[4] = {1, 2, 4, 5}; cout << ArraySum(Dogesh, 4); return 0; }
ALGO
0.999445
4.948157
062b3c3d-0390-46ec-b840-cb95d80d53e1
saurabhjn76/Competitive-Coding
CodeChef/Beginner/CHEFAPAR.cpp
#include "bits/stdc++.h" using namespace std; # define s(n) scanf("%d",&n) # define sc(n) scanf("%c",&n) # define sl(n) scanf("%lld",&n) # define sf(n) scanf("%lf",&n) # define ss(n) scanf("%s",n) #define R(...
ALGO
0.999286
3.683937
ef173f88-61b5-4e50-9159-ae21e2df3ab4
skjmp/ProCon
practice/abc136/a.cpp
#include <bits/stdc++.h> #define REP(i, a, n) for (long long i = (a); i < (long long)(n); ++i) #define REPC(i, a, n) for (long long i = (a); i <= (long long)(n); ++i) #define ALL(t) t.begin(), t.end() #define RALL(t) t.rbegin(), t.rend() #define MATINIT(type, row, col, init) \ ...
ALGO
0.999966
3.755217
3325cc3e-60ce-41be-b958-b16671b8b4b1
Mindjolt2406/Competitive-Programming
Codechef/COOK113/try.cpp
/* Rathin Bhargava IIIT Bangalore */ #include<bits/stdc++.h> #define mt make_tuple #define mp make_pair #define pu push_back #define INF 1000000001 #define MOD 1000000007 #define EPS 1e-6 #define ll long long int #define ld long double #define fi first #define se second #define all(v) v.begin(),v.end() #define pr(v) {...
ALGO
0.999972
3.838443
49f2ca14-1553-469d-a1a1-8a8690031364
sarvex/leetcode-jai
solution/0000-0099/0038.Count and Say/Solution.cpp
class Solution { public: string countAndSay(int n) { string s = "1"; while (--n) { string t = ""; for (int i = 0; i < s.size();) { int j = i; while (j < s.size() && s[j] == s[i]) ++j; t += to_string(j - i); t += ...
ALGO
0.999996
7.240852
bdf7102d-4693-4c3c-82ed-150f579050bc
BleynChannel/Civilization-Launcher
civilization_launcher/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.998556
6.786404
23292389-5060-422d-8ac2-57f137bc4dc6
Mayank9654/Bit-Manipulation
singlenumber2.cpp
/* Single Number II a={2,2,3,4,5,5,5,3,2,3}; find element which is appearing once */ #include <bits/stdc++.h> using namespace std; void singleelement2(vector<int>a) { int bucketone=0, buckettwo=0; for(int i=0;i<a.size();i++) { bucketone=(bucketone^a[i])&(~buckettwo); buckettwo=(buckettwo^a...
ALGO
0.99994
4.869795
e62563ad-d21e-4415-9a4b-9d5b18bc80cc
svn2github/qmcpack
branches/simd-20110220/src/QMCWaveFunctions/Fermion/RNDiracDeterminantBaseAlternate.cpp
#include "QMCWaveFunctions/Fermion/RNDiracDeterminantBaseAlternate.h" #include "Numerics/DeterminantOperators.h" #include "Numerics/OhmmsBlas.h" #include "Numerics/MatrixOperators.h" namespace qmcplusplus { /** constructor *@param spos the single-particle orbital set *@param first index of the first particl...
ALGO
0.992533
6.017476
6c200fbd-c00f-4290-876d-3e17f7d3d313
ra2003/Plagiarism
dataset/test/modification/1548_all/82/transformation_1.cpp
#include <iomanip> #include <iostream> #include <bits/stdc++.h> using namespace std; #define F first #define S second #define pb push_back #define gap ' ' #define fastIO {ios_base::sync_with_stdio(false);cin.tie(NULL)...
ALGO
0.995588
3.850481
5760c87e-13aa-4ea5-89e3-e2ae81a57bfc
liu-siri/C-code
L1-087(2).cpp
#include<stdio.h> int main() { int col[1000000]={0}; int row[1000000]={0}; int i=0,type=0,N=0,M=0,Q=0,tem=0,rows=0,cols=0; scanf("%d %d %d",&N,&M,&Q); for(i=0;i<Q;i++) { scanf("%d %d",&type,&tem); if(type)col[tem]=1; else row[tem]=1; } for(i=1;i<=N;i++) if(row[i])rows++; for(i=1;i<=M;i++) if(col[i...
ALGO
0.999893
3.225687
3ab6cf80-5aee-428f-ba5a-3c8601adbdde
nikox94/FMI_UP_1
2_2.cpp
#include <iostream> using namespace std; int main(){ cout<<"Dai chislo i shte ti kaja dokolko e prosto... :-)"<<endl; int p; cin>>p; for(int i=2;i<=p/2;p+=2) if(p%i==0) cout<<"Prosto"<<endl; else cout<<"Sustavno"<<endl; return 0; }
ALGO
0.999879
3.981333
54aae2f0-073b-4b09-af5e-63c5baff94d9
YMDragon/OJ-code
codeforces/495/A.cpp
#include <algorithm> #include <iostream> #include <cstdlib> #include <cstring> #include <cstdio> #include <cmath> using namespace std; int n,x,y,a[10]={2,7,2,3,3,4,2,5,1,2}; void work() { scanf("%d",&n); x=n/10,y=n%10; printf("%d",a[x]*a[y]); } int main() { freopen("A.in","r",stdin); freopen("A.out","w",stdout)...
ALGO
0.996301
3.514676
d55c0e3b-6073-45c4-b93b-ccd7403f0297
Surue/File_Ex_3.1
externals/Box2D/Box2D/Dynamics/Joints/b2FrictionJoint.cpp
#include "Box2D/Dynamics/Joints/b2FrictionJoint.h" #include "Box2D/Dynamics/b2Body.h" #include "Box2D/Dynamics/b2TimeStep.h" // Point-to-point constraint // Cdot = v2 - v1 // = v2 + cross(w2, r2) - v1 - cross(w1, r1) // J = [-I -r1_skew I r2_skew ] // Identity used: // w k % (rx i + ry j) = w * (-ry i + rx j) //...
ALGO
0.993968
7.574437
8f2efa45-3b67-410a-a3aa-857a18d4cfeb
priojeetpriyom/competitive-programming
uva/10651 - Pebble Solitaire bitmask dp backtracking .cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int dp[1<<12], n; char str[12]; int SET(int mask, int pos) { return mask | (1<<pos); } int RESET(int mask, int pos) { return mask & (~(1<<pos)); } int CHECK(int mask, int pos) { return mask & (1<<pos); } void print_mask(int mask) { ...
ALGO
0.999523
3.657665
5445082b-96df-48b7-a374-cf77d22e460c
rkr3o/LeetCode
1036-rotting-oranges/rotting-oranges.cpp
class Solution { public: int orangesRotting(vector<vector<int>>& grid) { int n = grid.size(); int m = grid[0].size(); queue<pair<pair<int,int>,int>>q; vector<vector<int>>vis(n,vector<int>(m,0)); for(int i = 0; i < n; i++) { for(int j = 0; j < m ; j++){ ...
ALGO
0.999969
6.099111
96d82d7c-f43e-4b1c-86bd-562da6d62829
IvanPsurtcev/zk-puzzles-solution
Addition/Add_cpp/calcwit.cpp
#include <iomanip> #include <sstream> #include <assert.h> #include "calcwit.hpp" extern void run(Circom_CalcWit* ctx); std::string int_to_hex( u64 i ) { std::stringstream stream; stream << "0x" << std::setfill ('0') << std::setw(16) << std::hex << i; return stream.str(); } u64 fnv1a(std::stri...
ALGO
0.995495
3.951875
3b08b831-09fb-405a-a918-cfed51242139
teichman/phd-code
ros-pkg/core/dst/src/program/evaluate.cpp
#include <dst/evaluator.h> #include <eigen_extensions/eigen_extensions.h> using namespace std; using namespace dst; namespace bfs = boost::filesystem; #define FTF (getenv("FTF")) string usageString() { ostringstream oss; oss << "Usage: ./evaluate WEIGHTS SEQ [SEQ ...] OUTPUT" << endl; oss << " where SEQ can b...
ALGO
0.991683
6.094012
e9fd982a-db64-4ca3-98d1-19a92f44702e
AkshatAggarwal14/Competitive-Programming
CodeForces/1365/b.cpp
#ifndef ONLINE_JUDGE #include "Akshat.hpp" #else #include "bits/stdc++.h" using namespace std; #define dbg(...) #define debug(...) #endif using ll = int64_t; using str = string; template <class T> using v = vector<T>; using vl = v<ll>; using vvl = v<vl>; #define fo(i, n) for (ll i = 0; i < n; i++) #define tr(it, a) fo...
ALGO
0.999959
4.18125
11351696-59ec-496c-80ab-28c7b54a31b5
ShaowuYang/ORB-SLAM2
Thirdparty/DBoW2/DBoW2/BowVector.cpp
#include <iostream> #include <fstream> #include <vector> #include <algorithm> #include <cmath> #include "BowVector.h" namespace DBoW2 { // -------------------------------------------------------------------------- BowVector::BowVector(void) { } // -------------------------------------------------------------------...
TOOL
0.940455
5.33147
6a0e7f3d-5137-4596-8ead-38a9bb21c058
akamya997/PracticeCode
201909_practice/arc061/f.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> PII; #ifndef ONLINE_JUDGE #define dbg(x...) do{cout << "\033[32;1m" << #x << "->" ; err(x);} while(0) void err(){cout << "\033[39;0m" << endl;} template<template<typename...> class T,typename t,typename... A> void err(T<t> a,A... ...
ALGO
0.999911
4.556712
02ebc116-9d54-49d6-9545-7239da984ebf
gustavoferreira/openholdembot
OpenHoldem/CSymbolEngineActiveDealtPlaying.cpp
#include "stdafx.h" #include "CSymbolEngineActiveDealtPlaying.h" #include <assert.h> #include "CPreferences.h" #include "CScraper.h" #include "CScraperAccess.h" #include "CStringMatch.h" #include "CSymbolEngineDealerchair.h" #include "CSymbolEngineUserchair.h" #include "CSymbolEngineTableLimits.h" #include "..\CTablem...
TOOL
0.912466
6.301017
7f0de255-e60a-422a-bd8c-8021b28d91f6
Pabfigueira/Maratona
URI/2404.cpp
#include <bits/stdc++.h> using namespace std; #define sc(a) scanf("%d", &a) #define sc2(a, b) scanf("%d%d", &a, &b) #define sc3(a, b, c) scanf("%d%d%d", &a, &b, &c) #define scs(a) scanf("%s", a) #define pri(x) printf("%d\n", x) #define prie(x) printf("%d ", x) #define mp make_pair #define pb push_back #define BUFF io...
ALGO
0.999956
4.236667
07ef68b8-c771-4250-bb05-ab7ccd72357a
UrviGoel/Apna-College-CppCourse
7.2 functions/nCr.cpp
#include<iostream> using namespace std; int fact(int n){ int factorial=1; for(int i=2;i<=n;i++){ factorial*=i; } return factorial; } int main(){ int n,r; cin>>n>>r; int ans = fact(n)/(fact(r)*fact(n-r)); cout<<ans<<endl; return 0; }
ALGO
0.999952
4.765643
78a0bbaf-a4ac-4a53-808d-c5fba0d8dff3
Vinu-1975/CPP
C++(old)/array-to-fn.cpp
#include<iostream> using namespace std; void show(int [],int); int main(){ int numbers[] {9,8,7,5,4,3,2}; int length=7; show(numbers,length); return 0; } void show(int numbers[],int length){ for(int i=0;i<length;i++){ cout<<numbers[i]<<endl; } }
ALGO
0.935345
3.981499
48602036-44da-40e5-9dad-e73dbfdcc451
jared-wallace/assembly3
part2/Backup/Assign03P2.cpp
#include <iostream> using namespace std; int GetOneIntByVal(const char vtdPrompt[]); void GetOneIntByAddr(int* intVarToPutInPtr,const char entIntPrompt[]); void GetOneCharByAddr(char* charVarToPutInPtr, const char prompt[]); void ValidateInt(int* givenIntPtr, int minInt, int maxInt, const char msg[]); void SwapTwoInts...
TOOL
0.885163
5.299227
953381cb-fc5e-4c46-be03-2c3c4b5894ed
JLake310/SS-Algo
BJ-PS/그래프1/BJ2252_줄세우기.cpp
#include <iostream> #include <queue> #include <vector> #include <cstring> using namespace std; int N, M; int a, b; int indegree[32001]; int main(int argc, char** argv) { ios_base::sync_with_stdio(0); cin.tie(0); vector<int> v[32001]; queue<int> q; queue<int> answer; cin >> N >> M; mems...
ALGO
0.99999
4.357336
2e323a6f-b4a5-4c24-83cc-38288b2fce33
lwcM/leetcode_solution
0050-powx-n.cpp
static const auto __=[]{ ios::sync_with_stdio(false); cin.tie(nullptr); return nullptr; }(); class Solution { public: double myPow(double x, int n) { return n >= 0 ? mod(x, n):1/mod(x, -n); } double mod(double x, int n) { if(n == 0) return 1; double tmp = mod(x, n/2); ...
ALGO
0.999902
5.520093
8b7e4af9-f3cb-49a8-b63f-e5ea236a1515
omarek386/Assiut-University-Training---Newcomers
Sheet_2 (Loops)/U-Some-Sums.cpp
#include <bits/stdc++.h> using namespace std; int gitSum(int m){ int sum = 0; while (m) { sum += m%10; m /= 10; } return sum; } main() { int a, b, c,sum=0,num; cin >> a >> b >> c ; for (int i = 1; i <=a; i++) { num = gitSum(i); if (num >= min(b,c)...
ALGO
0.999795
4.16985
9f667864-75c0-4417-9df9-1a31e372e4c0
rcedgar/newick
src/divconker.cpp
#include "myutils.h" #include "divconker.h" #include "quarts.h" #include "sort.h" #include <map> void GetGroupLeafNodeSet(const TreeX &T, const FeatureTable &FT, uint ValueIndex, set<uint> &LeafNodeSet); void GetConnComps(const vector<uint> &FromIndexes, const vector<uint> &ToIndexes, vector<vector<uint> > &CCs, b...
ALGO
0.991099
3.854566
3b95c41c-cbab-4b06-8fe9-7b046235ca2f
MJSoto123/notebook-2023
Codes/Data Structures/Persistent_Segment_Tree.cpp
using ll = long long ; class PersistentSegtree { private: struct Node { ll sum = 0; int l = 0, r = 0; }; const int n; vector<Node> tree; int timer = 1; Node join(int l, int r) { return Node{tree[l].sum + tree[r].sum, l, r}; } int build(int tl, int tr, const vector<int> &a...
ALGO
0.999622
5.183742
b53fbbb9-1ca5-4735-9d7b-f0bd9c51561b
Wang-Bio/DOJO_plant_vertex_model
src/2dvLine.cpp
/*************************************************************************************************/ // 2D Vertex Model for Plant Morphogenesis // Original Author: Yasuhiro Inoue (<EMAIL>), for animal morphogenesis simulation // Modified by: Zining Wang (<EMAIL>), for plant morphogenesis simulation based on cell divisio...
ALGO
0.996303
5.770156
c50c3c65-cf05-483e-a024-b6be9702a66d
jiyak12/DSA_IN_C-
String/prog12.cpp
//roman to integer #include <iostream> #include <unordered_map> #include <string> using namespace std; class Solution { public: int romanToInt(string s) { unordered_map<char, int> roman = { {'I', 1}, {'V', 5}, {'X', 10}, {'L', 50}, {'C', 100}, {'D', 500}, {'M', 1000} ...
ALGO
0.979377
6.954048
d713278b-0775-4eaf-bf5c-650e6696f2b4
Shrutikatyal/Interview-Preparation
Arrays & Strings/GFG Amazon/Rotate a 2D array without using extra space.cpp
/* * Author : Shruti Katyal * Date : 16 May, 2020 * * Compiler : g++ 5.1.0 * Flags : -std=c++14 * */ #include <iostream> #include <bits/stdc++.h> using namespace std; void rotateMatrix(vector<vector<int>> A, int n){ //transpose the matrix for(int i=0;i<n;i++) for(int j=i;j<n;j++) ...
ALGO
0.999178
5.759123
e2c5d4dc-9bd1-484d-80da-6cab68c0b146
jarus9350/leetmycodes
780-max-chunks-to-make-sorted/max-chunks-to-make-sorted.cpp
class Solution { public: int maxChunksToSorted(vector<int>& arr) { vector<int> newArr; newArr = arr; sort(newArr.begin(),newArr.end()); // for (auto a: newArr){ // cout<<a<<" "; // } // cout<<endl; int i = 0; int j = 0; unordered...
ALGO
0.999976
5.24332
1aaccc64-a7f4-49c8-a2a8-51ea0bf93480
dnx04/cp
archives/cses/Advanced Techniques/Signal_Processing.cpp
#line 1 "Signal_Processing.cpp" #include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; #line 1 "algo/convolution/fft.hpp" using cd = complex<double>; const double PI = acos(-1); void fft(vector<cd>& a, bool invert) { int n = a.size(); for (int i = 1, j = 0; i < n; ...
ALGO
0.999984
3.488672
c5020777-5de8-48a2-a540-993ef9f162c1
622201/floyd-parallel
floyd.cpp
#define INF 1e7 #include <omp.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <assert.h> #include <algorithm> #include <iostream> #include <openacc.h> //#pragma GCC optimize("O3") using namespace std; inline int index(const int i, const int j) { return i * SIZE + j; } // add your codes begin float...
ALGO
0.999815
3.080773