uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
77b2fcef-c4b3-4b95-b09f-fdb94d606e7e
Nanako7-ix/AlgorithmTemplate
TEST/kmp/P3375.cpp
#include <bits/stdc++.h> using namespace std; using i64 = long long; using u64 = unsigned long long; using u32 = unsigned; using u128 = unsigned __int128; using i128 = __int128; using f64 = double; using f128 = __float128; auto getFail (const std::string& s) { int n = s.size(); std::vector<int> fail(n + 1...
ALGO
0.999871
5.315315
5fced788-2fcb-4ee0-af97-a79d0af57835
drakeos/Dracore
dep/g3dlite/source/Welder.cpp
/** @file Welder.cpp @author Morgan McGuire, Kyle Whitson, Corey Taylor @created 2008-07-30 @edited 2009-11-29 */ #include "G3D/platform.h" #include "G3D/Vector2.h" #include "G3D/Vector3.h" #include "G3D/Sphere.h" #include "G3D/PointHashGrid.h" #include "G3D/Welder.h" #include "G3D/Stopwatch.h" // for profilin...
TOOL
0.994124
7.78546
63cf6448-5d38-4a5a-8a99-28e50ad60fce
GlistPlugins/gipOpenNN
libraries/eigen/bench/benchmark-blocking-sizes.cpp
#include <iostream> #include <cstdint> #include <cstdlib> #include <vector> #include <fstream> #include <memory> #include <cstdio> bool eigen_use_specific_block_size; int eigen_block_size_k, eigen_block_size_m, eigen_block_size_n; #define EIGEN_TEST_SPECIFIC_BLOCKING_SIZES eigen_use_specific_block_size #define EIGEN_T...
TOOL
0.903723
5.940717
3f69e573-5bda-4b7e-bec1-7045f4de6476
Akrobatik/ps
BaekJoon/34000/34012.cpp
// Title : DagDag구리 // Link : https://www.acmicpc.net/problem/34012 // Time : 88 ms // Memory: 2412 KB #include <bits/stdc++.h> using namespace std; int deg[100001]; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n, m; cin >> n >> m; while (m--) { int u, v; cin >> u >> v; ...
ALGO
0.999862
4.66358
d58f3b9d-49fe-4ef3-81b5-0a49f32d22f1
Anish9901/DSA
CC/Avoid_Fixed_Points.cpp
#include <bits/stdc++.h> using namespace std; void addele(int pos,int val,vector<int> &v) { v.insert(v.begin()+pos,val); } int ans(vector<int> &v, int n) { int res = 0; for(int i = 1; i <= n; i++) { if(v[i] == i) { addele(i,v[i]+1,v); res++; n++; ...
ALGO
0.999773
4.310526
441a6ff4-e6ad-4b22-ba1b-d7a14d1b72d4
pandora-cube/2024-PCUBE-PS-Study
4주차 - Dijkstra/김요한/1238 파티.cpp
#include<iostream> #include<math.h> #include<queue> #include<cstring> #include<algorithm> using namespace std; //1238 Ƽ typedef pair<int, int> PII; int N, M, X; int map[1001][1001]; int dist[1001]; int reverse_dist[1001]; void input(); void reverse_Dijkstra(int* dist); void Dijkstra(int* dist); void output() { int s...
ALGO
0.999873
4.220183
346aa685-182d-4837-b581-d79ddf0387a9
chocomacaroon/baekjoon
프로그래머스/2/131701. 연속 부분 수열 합의 개수/연속 부분 수열 합의 개수.cpp
#include <string> #include <vector> #include <set> #include <algorithm> #include <numeric> using namespace std; int solution(vector<int> elements) { int answer = 0; set<int> s; for(int i = 1; i <= elements.size(); i++){ int sum = 0; for(int j = 0; j < elements.size(); j++){ if(...
ALGO
0.999098
4.827424
679f3fd0-8ba2-4abc-9a35-940774ed9c4d
AGWDW/openGL-mesh-testing
openGl Mesh/Game/World/world_generation.cpp
#include "world_generation.h" #include <gtc/noise.hpp> #include "../../Helpers/Functions.h" #include "../../Helpers/BlocksEncoded.h" glm::ivec2 world_generation::treeCooldown = glm::vec2(4); float world_generation::heightAtPositon(glm::vec2 pos, NoiseOptions options, unsigned int seed) { // Begin iterating through ...
TOOL
0.957268
5.158185
31776c10-c561-430b-98e9-528cfba77b80
mohasarc/AlgoPrep
10-isomorphic_strings/isomorphic_strings.cpp
//PROBLEM: Two strings A and B are isomorphic if there exists character mapping // which replaces characters from A to get B. Rules for character mapping are: // all occurrences of one character (e.g. ‘x’) must be replaced with the same character (e.g. ‘y’) // no two different characters may map to the same character ...
ALGO
0.998787
5.19539
3c3c5cc1-8b38-49c6-be8a-78876a902329
abbash77/DSA
2482-difference-between-ones-and-zeros-in-row-and-column/2482-difference-between-ones-and-zeros-in-row-and-column.cpp
class Solution { public: vector<vector<int>> onesMinusZeros(vector<vector<int>>& mat) { int r=mat.size(); int c=mat[0].size(); vector<int> row(r,0); for(int i=0;i<r;i++){ int cnt=0; for(int j=0;j<c;j++){ if(mat[i][j]==1){ ...
ALGO
0.999975
6.17087
9176536e-03c5-4499-af78-5483f99ab3aa
AliOsm/CompetitiveProgramming
SPOJ/ADATEAMS - Ada and Teams.cpp
#include <bits/stdc++.h> typedef long long ll; using namespace std; int const N = 1e6 + 1; int const MOD = 1e9 + 7; int n, a, b, d, fact[N], ifact[N]; int fst(int b, int p) { if(p == 0) return 1; int res = 1ll * fst(b, p >> 1) % MOD; res = 1ll * res * res % MOD; if(p & 1) res = 1ll * res * b %...
ALGO
0.999851
4.888232
708e8c7d-c862-4444-9622-cadc9c160322
aufanam/Competitive-Programming
1725C.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define int long long #define ll long long #define ld ...
ALGO
0.999994
4.438703
fa4117c6-777d-49ce-9e14-b0e7f8faf47d
tomostler13/gpu-atomistic-code
src/util_exch_striction.cpp
// File: util_exch_striction.cpp // Author:Tom Ostler // Created: 18 Dec 2016 // Last-modified: 19 Oct 2016 14:33:06 // Contains useful functions and classes // that pertain to exchange striction #include "../inc/util.h" #include "../inc/llg.h" #include "../inc/arrays.h" #include "../inc/fields.h" #include "../inc/defi...
ALGO
0.97588
3.648655
6b15ffc8-23ff-4492-8488-e900a5ebb85a
Belgorodsky/CS_Algorithms
03_greedy_algorithms_starter_files/covering_segments/covering_segments.cpp
#include <algorithm> #include <iostream> #include <climits> #include <vector> #include <limits> using std::vector; struct Segment { int start, end; bool operator<(const Segment &rhs) const { return end < rhs.end; } }; vector<int> optimal_points(vector<Segment> &segments) { std::sort(segm...
ALGO
0.999997
5.012088
a9abaa25-9838-46a8-b324-c98d3550a023
aaryagawade30/Competitive-Programming
CSES/Searching and Sorting/Collecting_Numbers.cpp
// file: collect_numbers.cpp #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> pos(n + 1); // position map for (int i = 0; i < n; ++i) { int x; cin >> x; pos[x] = i; } int rounds = 1; for (int i = 2; i <= n; ++i) { if ...
ALGO
0.999967
4.413439
c94a4eb8-d567-4efb-9c2f-762a4f2a21d6
sagar2meena/Binary-Search-Problems
josepus problem.cpp
#include"bits/stdc++.h" using namespace std; // JOSEPUS PROBLEM int josepus( int n , int k){ if( n==1){ return 0; } return (josepus(n-1 , k)+k)%n; } int main() { cout<<josepus( 10 , 3); return 0; }
ALGO
0.999971
3.539433
b772ab08-5473-4964-8bc3-be133f381345
yashrajz/DSA-with-C-
Heap/EvenOddCountHeap.cpp
#include <iostream> using namespace std; //To find parent index. int parent(int i){ return (i - 1)/2; } //Hepify function for Max Heap void maxHeapify(int arr[], int n, int i) { int largest = i; int left = 2*i+1; int right = 2*i+2; if(left < n && arr[left] > arr[largest]){ largest = le...
ALGO
0.999759
4.554972
0ce49a1e-95d3-44e4-b8ca-06aa9ba2e06e
centixkadon/leetcode
cpp/cpp_leetcode/p02/p0287_Find_the_Duplicate_Number.cpp
#include "leetcode.hpp" class Solution { public: int findDuplicate(vector<int> & nums) { auto p = nums.front(), q = nums.front(); do { p = nums[p]; q = nums[nums[q]]; } while (p != q); p = nums.front(); while (p != q) { p = nums[p]; q = nums[q]; } return p; } }...
ALGO
0.999853
6.20324
48219863-70aa-4c12-b16f-bf7074cbe1f4
AswinSampath1401/DataStructures
Strings/sortacctofreq.cpp
/* Competitive programming template Author: Aswin Sampath */ #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<ll,ll> pll; typedef vector<ll>vl; typedef vector<int>vi; typedef priority_queue<ll,vl,greater<ll>()> pq_ll_min; typedef priority_queue<ll> pq_ll_max; ...
ALGO
0.999932
4.302099
688eee40-85eb-4e8b-b79f-ad89860d7a14
julianchatto/Lehigh_CSE
CSE375/final/palmieri/cuckoo/cuckoo_gemini.cpp
#include <iostream> #include <vector> #include <optional> #include <functional> // for std::hash #include <atomic> #include <mutex> #include <thread> #include <random> #include <chrono> #include <stdexcept> // for exceptions, stoi #include <cmath> // for std::ceil #include <memory> // for std::unique_ptr #includ...
ALGO
0.954704
7.543831
f54c5cbc-bf93-424a-834d-d837b50458a0
Rishi-11-2/CP
C_Fill_in_the_Matrix.cpp
#include <bits/stdc++.h> using namespace std; #define all(v) (v).begin(), (v).end() void solve(); signed main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.setf(ios::fixed); cout.precision(10); srand(time(NULL)); int t; cin >> t; while (t--) { solve(); } } voi...
ALGO
0.999885
3.63718
f49188f8-1470-401c-826b-43c28f8dd2dd
zkEloHub/LC-SourceCode
lc90_2.cpp
class Solution { public: vector<vector<int>> subsetsWithDup(vector<int>& nums) { sort(nums.begin(), nums.end()); vector<vector<int>> result = {{}}; int start; for(int i = 0; i < nums.size(); i++) { if(i == 0 || nums[i] != nums[i-1]) start = 0; // 遇到 "第一个数" ...
ALGO
0.999956
6.062948
c69b0c64-3bed-49d4-9f18-7c0b6ce0c2ad
KrongPan/problem_solving
opt/fin64_prizetable/fin64_prizetable.cpp
#include <bits/stdc++.h> using namespace std; int n,m,k; int c; int table[201][201]; int main() { cin >> n >> m >> k; for(int i = 1; i <= n; i++) { for(int j = 1; j <= m; j++) { cin >> table[i][j]; } } int max_t = 0; for(int j = 1; j <= m; j++) { ...
ALGO
0.999942
3.546112
5a40240b-b834-4d1d-a560-710cbb48f874
neko-huang/oi-code
P2357.cpp
#include <iostream> using namespace std; typedef long long ll; const int maxn=200005; struct node{ int l,r; ll sum,lzt; }; node tree[4*maxn]; ll a[maxn]; void upd(int x){ tree[x].sum=tree[x*2].sum+tree[x*2+1].sum; } void pushdown(int x){ if(tree[x].lzt){ tree[x*2].lzt+=tree[x].lzt; tree[...
ALGO
0.999847
4.060824
6654b4b2-be00-459d-a104-dfc3049d96df
aadityab7/Practice
700. Search in a Binary Search Tree.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.999997
6.008489
7980c062-4405-44d6-9148-8c98255ec1cc
kevin-lh/SoftwarePractice
myCalculator/cal.cpp
#include "dialog.h" #include"cal.h" void Dialog::calculate() { node Node[NUM_OF_NUMBER]; double num1=0; int len=s.length(); int i=0; //标记字符串位置 int num_of_point=0; //记录小数点个数 int num_and_op=0; //记录浮点数和操作符的个数 int isfloat=0; //标记为小数部分 //读取表达式 while(i<len){ if...
TOOL
0.896514
4.184483
f6cb13d4-a47a-48b8-93d0-892c0e1b7b59
theleastinterestingcoder/Thesis
trash/navigation/robot_pose_ekf/src/nonlinearanalyticconditionalgaussianodo.cpp
#include <robot_pose_ekf/nonlinearanalyticconditionalgaussianodo.h> #include <bfl/wrappers/rng/rng.h> // Wrapper around several rng libraries #define NUMCONDARGUMENTS_MOBILE 2 namespace BFL { using namespace MatrixWrapper; NonLinearAnalyticConditionalGaussianOdo::NonLinearAnalyticConditionalGaussianOdo(const Gaus...
ALGO
0.998469
4.842235
03ec69a3-1341-4b7d-bd29-0fe1fc874dd9
kellykhy/Algorithm-Practice-Cpp
백준7576 토마토/백준7576 토마토/소스.cpp
#include <iostream> #include <queue> using namespace std; int m, n; int graph[1000][1000]; queue<pair<int, int>> q; int dx[4] = { 0, -1, 0, 1 }; int dy[4] = { 1, 0, -1, 0 }; int target = 0; int bfs() { int cnt = 0; int result = 0; while (!q.empty()) { int x = q.front().first; int y = q.front().second; q.po...
ALGO
0.99979
4.650242
ee5d0cd9-64c9-43ff-b1f9-9bae048b21d7
Nitin-vohra92/Linked-List
InsertNode(function).cpp
// creating node class class Node { public: int data; Node *next; Node(int data) { this -> data = data; this -> next = NULL; } }; Node* insertNode(Node *head, int pos, int data) { int len=0; Node *temp=head; while(temp!=NULL) { len++; temp=temp->next; ...
ALGO
0.999788
4.494788
a237333d-19b1-4bfc-b35f-99ff4839c620
klister803/PandaCores548
src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
#include "NorthrendPCH.h" #include "nexus.h" enum Spells { SPELL_SPARK = 47751, H_SPELL_SPARK = 57062, SPELL_RIFT_SHIELD = 47748, SPELL_CHARGE_RIFT = 47747, //Works wrong (affect pl...
CONFIG
0.883128
4.713881
1b578d8a-4487-4c78-8585-da9608ab472c
tori209/Algorithm_Solving_List
baekjoon/1654.cpp
/* 1654 : ڸ Է: K(1 ̻ 10,000 ), ʿ N (1̻ 1,000,000 ) (K <= N) K : K Ͽ N 鶧, ִ . */ #include <iostream> typedef long long ll; using namespace std; int k, n; ll len[10001]; ll binary(ll start, ll end) { if (end - start == 1) return start; ll mid = (start + end) / 2; ll cnt = 0; for (int i = ...
ALGO
0.999913
3.476408
46d45756-b54e-4ed5-a3be-679bc609d629
amlj17/C_plus_plus
Kruskal 2.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; #define edge pair<int,int> class Graph { private: vector<pair<int, edge>> G; // graph vector<pair<int, edge>> T; // mst int *parent; int V; // number of vertices/nodes in graph public: Graph(int V); void AddWeigh...
ALGO
0.999936
4.870959
1888ef9b-b36f-4fbc-ba9a-7a98e4507635
kkyehit/AlgoPratics
Backjoon/2294.cpp
#include <stdio.h> #include <iostream> #include <vector> #define MAX_N 100 #define MAX_K 10000 using namespace std; int main(void){ int n, k; int coin[MAX_N]; scanf("%d %d",&n, &k); for(int i = 0; i < n; i++) scanf("%d",&coin[i]); int cache[MAX_N][MAX_K + 1] = {0}; int res = 2123456789; for(int i = 0; i < n...
ALGO
0.99978
3.573686
2a371fc0-fcf7-443b-a8fe-b7d305c6a184
MartinaColombo/Laboratorio_di_Simulazione_Numerica
Esercitazione_10/10.1/Circonferenza/main.cpp
#include <iostream> #include <cmath> #include <vector> #include <fstream> #include <algorithm> #include <iomanip> #include <random> #include "funzioni.h" using namespace std; int main(){ int length_cromosoma=32; //lunghezza del numero di geni che formano un cromosoma (=numero totale di città nel percorso) int...
ALGO
0.999925
4.263067
74db54f4-bbd6-40ce-af34-3cb626b6c11f
jerry20091103/Teensy_Harmonizer
lib/DaisySP/Filters/biquad.cpp
#include "biquad.h" #include <math.h> #include "../Utility/dsp.h" using namespace daisysp; void Biquad::Reset() { float con = cutoff_ * two_pi_d_sr_; float alpha = 1.0f - 2.0f * res_ * cosf(con) * cosf(con) + res_ * res_ * cosf(2 * con); float beta = 1.0f + cosf(con); float gamma ...
ALGO
0.998532
5.485104
1722379b-9095-4798-92d2-5d9ef12cf740
KyeongYeongDEV/beakjoon
10952.cpp
#include<iostream> using namespace std; int main(){ int num1, num2; while(cin >>num1>>num2){ cout<< num1+num2<<endl; } }
ALGO
0.98753
3.811053
16f2c2cd-722b-4c1b-911b-fe7a3e822479
JuanPE44/trabajos-practicos-cpp
introduccion-cpp/ejercicio6.cpp
/** Argumentos al programa: Escribir un programa que lea un mensaje desde el teclado, reemplace un carácter por otro e imprima el mensaje resultante por pantalla. El reemplazo de caracteres se realizará de acuerdo a los parámetros que recibirá la función main desde la línea de comandos (Por ejemplo: <proyecto.exe> A B,...
TOOL
0.957311
4.117038
dc1db707-1d97-4486-9c08-a372de0071cf
2RoN4eG/Regula-Test-Task
OpenCV/sources/samples/cpp/chamfer.cpp
#include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/contrib/contrib.hpp" #include <iostream> using namespace cv; using namespace std; static void help() { cout << "\nThis program demonstrates Chamfer matching -- computing a distance between an \n" "edge tem...
ALGO
0.977911
4.846354
dbf4dc57-8356-4b9d-a107-3bca9fc79925
matternet/ardupilot
ArduSub/commands.cpp
#include "Sub.h" // checks if we should update ahrs/RTL home position from the EKF void Sub::update_home_from_EKF() { // exit immediately if home already set if (ahrs.home_is_set()) { return; } // special logic if home is set in-flight if (motors.armed()) { set_home_to_current_loca...
TOOL
0.965322
6.671364
dc1a2945-9128-4e5d-956d-95bd1c067139
longnu/codetree-TILs
240716/겹치지 않게 선분 고르기/select-segments-without-overlap.cpp
#include <iostream> #include <algorithm> #include <vector> #include <tuple> #define MAX_N 15 using namespace std; int n; pair<int, int> segments[MAX_N]; int ans; vector<pair<int, int> > selected_segs; bool Overlapped(pair<int, int> seg1, pair<int, int> seg2) { int ax1, ax2; tie(ax1, ax2) = seg1; int b...
ALGO
0.999955
5.251356
f8da69f9-cfa0-4055-a606-4bc5e632a8d1
lemmy04/phoenix-firestorm-undeformbutton
indra/llcommon/lldependencies.cpp
/** * @file lldependencies.cpp * @author Nat Goodspeed * @date 2008-09-17 * @brief Implementation for lldependencies. * * $LicenseInfo:firstyear=2008&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, Linden Research, Inc. * * This library is free software; you can redistribute ...
ALGO
0.99916
7.881358
68aa003c-6b76-4bda-9f54-65c4de72a7bb
UltraGameCoder/SilverEngine
ExtLibs/glm-0.9.8.4/test/core/core_func_integer_find_msb.cpp
// This has the programs for computing the number of leading zeros // in a word. // Max line length is 57, to fit in hacker.book. // Compile with g++, not gcc. #include <cstdio> #include <cstdlib> // To define "exit", req'd by XLC. #include <ctime> #define LE 1 // 1 for little-endian, 0 for big-endian. ...
ALGO
0.998686
3.230461
d267f307-1a59-4f37-9706-26278f666471
kpeel5839/LeetCode
1325-delete-leaves-with-a-given-value/1325-delete-leaves-with-a-given-value.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.999903
6.620735
5dee3fee-c2b0-4db7-a35d-60b02f25c5c2
michaelarakel/hackerrank-solutions
Game of Thrones I.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <string> using namespace std; int main() { string s; cin >> s; int flag = 0; vector <int> bucket(26); for (int i = 0; i < s.size(); ++i) ++bucket[s[i] - 'a']; for (int i...
ALGO
0.999986
4.053884
d16dc8fe-c77d-4cf2-801c-cee030e4a6e5
youngcet/custom_error
example/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.998824
6.786404
ff9df5a3-6bf1-4d26-95f1-254004bd5411
apschauhan03/LB_Questions
Sorting/Bubble_Sort.cpp
#include<iostream> #include<vector> using namespace std; void bubble_Sort(vector<int> &arr) { for (int i = 0; i < arr.size(); i++) { bool flag = false; for (int j = 0; j < arr.size()-i; j++) { if(arr[j+1]<arr[j]) { swap(arr[j],arr[j+1]); ...
ALGO
0.999828
4.937522
2da04a76-cea5-48c7-a1a2-cbe2d13c25e3
graffegiraffe/university-labs
sem2/OAIP/laba6/main.cpp
// создание //добавление // просмотр //удаление всего дерева // балансировка // три обхода // решение #include <iostream> #include <functional> #include <string> using namespace std; struct TREE{ string name; int info; TREE* left; TREE* right; }; TREE* LIST(string na, int in) { TREE* t = new TREE...
ALGO
0.999818
4.880138
1ea8f251-d1df-47c2-a6c4-2f8daf520a22
gstchain/gstio.cdt
libraries/libc++/libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp
// <vector> // vector(); // vector(const Alloc&); #include <vector> #include <cassert> #include "test_macros.h" #include "test_allocator.h" #include "../../../NotConstructible.h" #include "test_allocator.h" #include "min_allocator.h" #include "asan_testing.h" template <class C> void test0() { #if TEST_STD_VER > 14 ...
TEST
0.866586
7.033237
3729eb04-0cb7-4f9c-8561-2a9bb44cf408
HongP0724/BOJ
9461.cpp
#include <bits/stdc++.h> using namespace std; long long int d[101]; int main(void) { ios::sync_with_stdio(0); cin.tie(0); d[1] = d[2] = d[3] = 1; d[4] = d[5] = 2; int t; cin >> t; for(int i=5;i<=100;i++) { d[i] = d[i-1] + d[i-5]; } while(t--) { int n; ...
ALGO
0.999937
4.245941
51e92568-9bd1-4b38-8931-4566b60fec99
apubambu/Marlin
Marlin/src/module/delta.cpp
/** * delta.cpp */ #include "../inc/MarlinConfig.h" #if ENABLED(DELTA) #include "delta.h" #include "motion.h" // For homing: #include "planner.h" #include "endstops.h" #include "../lcd/ultralcd.h" #include "../Marlin.h" #if HAS_BED_PROBE #include "probe.h" #endif #if ENABLED(SENSORLESS_HOMING) #include "../...
ALGO
0.974295
6.988939
addbf095-6320-46a9-9304-baeee127b363
DavidNester/ISPythonFA16
opencv/sources/modules/ocl/src/brute_force_matcher.cpp
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
ALGO
0.983074
5.210795
7610de75-a2af-4cd9-b860-6caef125c53b
alexandraback/datacollection
solutions_2449486_0/C++/scast/lawnmower.cpp
#include<cstdio> #include<algorithm> #include<vector> #include<set> #include<queue> using namespace std; #define MAXN 101 #define INF 0x3f3f3f3f int t, n, m, tab[MAXN][MAXN], r[MAXN], c[MAXN]; int main () { scanf("%d", &t); for (int T=1; T<=t; T++) { scanf("%d%d", &n, &m); memset(r, 0, sizeof r); memset(c, ...
ALGO
0.999664
3.177602
0dcc92f6-a834-4013-b8f5-08d527c53efb
raincross7/code-similarity
codes/train_code/problem296/problem296_30.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, a, b) for(ll i=(a); i<(b); i++) #define PER(i, a, b) for(ll i=(a); i>=(b); i--) #define rep(i, n) REP(i, 0, n) #define per(i, n) PER(i, n, 0) #define ALL(a) (a).begin(),(a).end() const ll INF = 1e18+18; const ll MAX = 200000; const ll M...
ALGO
0.999978
3.888444
c13e8636-d953-4bb8-be4a-a8af1ead16de
AmaVic/ElegonWorld
src/server/game/Movement/Spline/Spline.cpp
#include "Spline.h" #include <sstream> #include <G3D/Matrix4.h> namespace Movement{ SplineBase::EvaluationMethtod SplineBase::evaluators[SplineBase::ModesEnd] = { &SplineBase::EvaluateLinear, &SplineBase::EvaluateCatmullRom, &SplineBase::EvaluateBezier3, (EvaluationMethtod)&SplineBase::UninitializedSp...
ALGO
0.956156
6.395449
b1aac978-9bbc-4907-931b-71c7effca146
lucasxia01/Competitive-Programming-Problems
Codeforces/CF 673/CF 673/C.cpp
#include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <algorithm> #include <functional> #include <stdlib.h> #include <time.h> #include <complex> #include <iterator> #include <regex> #include <fstream> #include <utility> #include <vector> #include <string> #include <cstring> #include <stack>...
ALGO
0.999916
3.805675
a1f5001e-b5c3-4b42-ad16-8d962bcfed2a
Luisao4/DAA
P9/DAA034.cpp
#include <iostream> #include <climits> #include <vector> #include <queue> using namespace std; // Class representing a node class Node { public: vector<pair<int, int>> adj; // List of adjacent nodes bool visited; // Has the node been visited? int distance; // Distance from t...
ALGO
0.999903
6.17379
25a1d97e-9c89-4db0-a31a-dadd9400ce4a
Omnicode786/Data-Structures-Algo
LEETCODE1/base10.cpp
#include <iostream> // this is essentially 1's compliment using namespace std; int onescompliment(int n){ if (!n){ int m = (~n) & 1; return m; // or we could simply return 1 // return 1; } int m = n; int mask = 0; for (int i = 0; m != 0; i++) { m...
ALGO
0.999943
4.770175
5fb7c3d4-0d1d-42a6-bdcb-3ef471b29ea0
muskan300600/DSA
Array/26.avg_stream.cpp
#include <iostream> #include <vector> using namespace std; int main(){ vector<float> v; int a[]={12, 2}; int n = sizeof(a)/sizeof(a[0]); int sum=0; int count =0; float avg; for(int i=0;i<n;i++){ sum = sum+a[i]; count++; avg = float(sum/count); v.push_back(avg...
ALGO
0.998652
3.211008
0d7b6902-375d-471c-9aca-5a3128c02d62
szaranczuk/CP-Lib
Matma/NWDNWWirozszerzoneNWD.cpp
#include <iostream> #include <algorithm> using namespace std; int a, b; int gcd(int a, int b){ return b == 0 ? a : gcd(b, a%b); } int lcm(int a, int b){ return a / gcd(a,b) * b; } int gcd_ext(int a, int b, int& x, int& y){ if(b == 0){ x = 1; y = 0; return a; } int x1 = 0, y1 = 0; int d = gcd_ext(b, a%b...
ALGO
0.99982
3.505047
982f3154-fe5a-4a3b-ac24-aad24e5431ea
CoderXiaoLiu/Data_Structure_And_Algorithm
data_structure_and_algorithm/Postfix_Expression.cpp
#include<bits/stdc++.h> using namespace std; struct tree { string data; int lchild, rchild; }a[25]; int n; bool visited[25] = {false}; int buidl_tree() { scanf("%d", &n); for(int i = 1; i <= n; i++) { cin >> a[i].data >> a[i].lchild >> a[i].rchild; if(a[i].lchild != -1) visited[a[i].lchi...
ALGO
0.999857
4.104204
1bf5fa3a-ff9e-474e-93b3-850753787a15
iam-salman/Learn-Basic-OOPS
10. Operator Overloading 3/Fraction.cpp
#include <iostream> using namespace std; class Fraction { public: int numerator; int denominator; Fraction() { } Fraction(int numerator, int denominator) { this->numerator = numerator; this->denominator = denominator; } void display() const { cout << nu...
TOOL
0.964081
5.612616
639517dc-4f7b-416b-af7e-abee81baeed1
vbonnici/grafe-sim
analysis/data/p01314/s097112138.cpp
#include <iostream> #include <algorithm> #include <stdlib.h> #include <string> #include <queue> using namespace std; int main(){ int n,ans; while(cin>>n && n>0){ ans=0; for(int i=2;i<n;i++){ if(i%2==0){ if((2*n)%i==0 && n%i!=0 && n/i-i/2>=0 ) ans++; } else { if(n%i==0 && n/i>i/2) ans++; } } cout<<ans<<endl; } retur...
ALGO
0.999415
3.860363
34260e8c-4812-475d-8f56-419eb9f2b030
codingwithsale/Programming2
Tutorials/05.Functions/Q8/q8.cpp
#include<iostream> using namespace std; bool leapYear(int year){ bool leap = false; if (year % 400 == 0){ leap = true; } else if (year % 100 == 0 && year % 400 != 0){ leap = false; } else if (year % 4 == 0){ leap = true; } else{ leap = false; } re...
ALGO
0.99885
3.216805
1771e711-f4a5-4a2e-b499-870195181fab
juncas/NUC3d
src/upwind1st.cpp
#include "upwind1st.hpp" #include "schemes.hpp" nuc3d::upwind1st::upwind1st(){ } nuc3d::upwind1st::~upwind1st() { } void nuc3d::upwind1st::interpolationInner(const Field & fieldIN, const int uw,//uw=(1,-1) Field & fieldOUT, ...
ALGO
0.999666
4.259023
21ca3723-5f2c-4eaa-8fa7-63bae4ab2c08
Kimighwan/c-plus
5. practice_programing/10.cpp
#include <iostream> int main() { int count, i, j; std::cout << "출력할 행 수를 입력하십시오: "; std::cin >> count; for (i = 0; i < count; i++) { for (j = 1; j < count - i; j++) std::cout << "."; for (j = 0; j <= i; j++) std::cout << "*"; std::cout << "\n"; } }
ALGO
0.995028
3.922613
e84b25b0-9dd7-4e9d-a3d7-91d628c4168f
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_12981_1.cpp
#include <bits/stdc++.h> #pragma optimize("Ofast") using namespace std; bool Finish_read; template <class T> inline void read(T &x) { Finish_read = 0; x = 0; int f = 1; char ch = getchar(); while (!isdigit(ch)) { if (ch == '-') f = -1; if (ch == EOF) return; ch = getchar(); } while (isdigit(ch...
ALGO
0.999952
3.928828
880f094a-df05-4619-8390-708d1581d7a6
FadrialR/quiz_app_flutter
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.998756
6.772262
cb55fe6b-7019-49b5-90e3-6d2d74068c34
repos-cl/NumCSE
LectureCodes/MatVec/Dense/linsolvetest/Eigen/main.cpp
/////////////////////////////////////////////////////////////////////////// /// Demonstration code for lecture "Numerical Methods for CSE" @ ETH Zurich /// (C) 2016 SAM, D-MATH /// Author(s): Thomas Etterlin <<EMAIL>> /// Repository: https://gitlab.math.ethz.ch/NumCSE/NumCSE/ /// Do not remove this header. ////////////...
ALGO
0.998725
4.530895
0703df8b-ee6f-449d-8925-96bc530994dc
Satish-Raut/DSA-in-C-
code_179_recursion.cpp
//Print values from 1 to n #include<iostream> using namespace std; void print(int num, int n){ // Using 2 Arguments if(num == n) { cout<<num; return; } cout<<num<<endl; print(num+1, n); } void Print(int num){ //Using 1 Argument if(num == 1) { cout<<1<<...
ALGO
0.996735
4.970102
d7c28f40-66c8-4696-9243-a75d2c681dba
ishandutta2007/codeforces
alexandra_udristoiu/normal/842/A.cpp
#include<iostream> using namespace std; int i, k, a, b, x, y; int main(){ cin>> a >> b >> x >> y >> k; for(i = x; i <= y; i++){ if(i * 1LL * k >= a && i * 1LL * k <= b){ cout<<"YES"; return 0; } } cout<<"NO"; return 0; }
ALGO
0.999948
3.101665
937bafd2-8cf9-4887-9c31-0a8433fe0773
Monish67/DSA0158
array of floats and display its value.cpp
#include <iostream> using namespace std; int main() { const int size = 4; float array[size] = {1.1f, 2.2f, 3.3f, 4.4f}; float* ptr = array; cout << "Float array values:" << endl; for (int i = 0; i < size; ++i) { cout << "Value at index " << i << ": " << *(ptr + i) << endl; } cout <...
TOOL
0.859261
3.655772
fff2f5fc-e4aa-45d9-9c54-d61ef9eb347e
vshakha10/C-
binaryop3.cpp
#include<iostream> using namespace std; class box { int l,h,w; public: void setdata(int a,int b,int c) { l=a,w=b,h=c; } int getvolume() { return l*w*h; } box operator/(box &n) { box t; t.l=l/n.l; t.w=w/n.w; t.h=h/n.h; return...
TOOL
0.988562
3.695308
52723f33-a6f4-485c-97fa-b59cb09d0c0a
ahmedibrahim404/CompetitiveProgramming
Different Algorithms/Manacher/main.cpp
#include<bits/stdc++.h> using namespace std; int n, m; string str; int main(){ ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL); cin >> n >> m; cin >> str; vector<int> odds(n); int mxodd=1, mxeven=0; for (int i = 0, l = 0, r = -1; i < n; i++) { int k = (i > r) ? 1 : min(odds[l...
ALGO
0.999979
4.596753
8005876e-a656-435d-b9dc-3b8eeb88c28e
AlonsoPaulino/competitive-programming
Codeforces/Far Relative’s Birthday Cake.cpp
#include <bits/stdc++.h> #define vi vector<int> #define sz(x) x.size() #define debug(x) cout<<#x<<":"<<x<<endl #define test() cout<<"hola papa" typedef long long ll; typedef unsigned long long ull; using namespace std; int n; int main() { while (cin >> n) { char v[n][n]; for (int i = 0; i < n; ++i) { for (int...
ALGO
0.999318
3.704972
6dc2301b-e6ac-4497-a2ab-5b9c5d6f44dc
kaiwenzhou2000/wangdao_code
第五章_树与二叉树/5_5_树与二叉树的应用/第十一题/5_5_11.cpp
// // Created by kaiven on 2021/8/23. // #include "../public.h" /* * 构造哈弗曼树 * 并计算WPL * * */ BiTree make_haffman(int w[], int len){ // 首先将节点全部创建 BiTNode *p, *q, *t; int min_1 = maxN; // 最小的元素, 初值为一个很大的数 int min_1_index; int min_2 = maxN; // 第二小的元素,初值为一个很大的数 int min_2_index; in...
ALGO
0.999974
4.01106
91a4e27c-025e-4013-bd2e-60b148ae9251
u-wyh/luogu-code
P7492.cpp
#include<bits/stdc++.h> using namespace std; const int MAXN = 1e5+5; const int MAXB = 405; int n,m; int nums[MAXN]; int blen,bnum; int bi[MAXN]; int bl[MAXB]; int br[MAXB]; long long pre[MAXB]; long long suf[MAXB]; long long all[MAXB]; long long sum[MAXB]; long long tag[MAXB]; long long anspre; long long anssuf; lo...
ALGO
0.999939
4.565492
db3708c3-f1bd-4d64-a199-2dbe051910b9
Abhinav7076/My-Codes
Array/Find factorial of a large number.cpp
//more efficient way is to use linked lst coz it adds nums dynamically class Solution { public: struct Node { int data; Node* prev; Node(int val) { data = val; prev = NULL; } }; void multiply(Node* tail, int n){ Node *...
ALGO
0.999984
6.22006
efdd8610-4ac4-4226-8122-afd8f386ac47
michaelyhuang23/Competitive-Programming-Cpp
XC24C.cpp
#include<bits/stdc++.h> using namespace std; typedef long long llong; #define pb push_back #define mp make_pair #define mt make_tuple #define print(x) cout<<x<<endl struct NodeP{ llong val; NodeP(){val = 0;} NodeP(llong val_){val = val_;} void update(llong val_){ val = val_; } NodeP updateC(llong val_){ re...
ALGO
0.999955
4.258098
b399df48-49a3-435e-a936-cc16230d70b8
Worthy-Wang/LeetCode
Chapter3_String/Leetcode38/main1.cpp
#include <iostream> #include <vector> #include <algorithm> #include <iterator> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <cmath> #include <climits> #include <cctype> using namespace std; /* 题目:38. Count and Say 链接:https://leetcode-cn.com/problems/count-and-say/ begin: 12...
ALGO
0.999935
6.109783
4e4d9a50-e155-4a14-994c-5a3bbd1ebd38
haru-425/randomparty
project/randomparty/SourceCode/game_system.cpp
#include "all.h" using namespace input; // Q[̃VXeԂǗϐ int system_state; // OŒ`ꂽXRAǗp̍\ extern SCORE score; // VXȅ void system_init() { // VXȅԂ0ɐݒ system_state = 0; } // VXȅI void system_deinit() { // ł͓ɉsȂAŒlj”\ } // VXe̍XV void system_update() { // VXȅԂɉs switch (system_state) { case 0: //////// ݒ ////////...
ALGO
0.970546
3.415796
d741613d-0f6c-4385-9305-00655bd0bf05
AyaseCore/Noggit3
Noggit3libs/Boost/libs/geometry/doc/doxy/doxygen_input/sourcecode/doxygen_3.cpp
OBSOLETE #include <boost/foreach.hpp> #include <boost/geometry/geometry.hpp> void example_distance() { int a[2] = {1,2}; int b[2] = {3,4}; double d = boost::geometry::distance(a, b); std::cout << d << std::endl; } void example_length1() { std::vector<boost::tuple<double, double, double> > line; ...
TOOL
0.895493
4.480196
dc679a35-a4f1-4e8d-a3d1-4f530a392e46
Walker0710/CPP
LeetCode/Contest/BC_124/3040_Maximum_Number_of_Operations_With_the_Same_Score_2.cpp
#include <bits/stdc++.h> using namespace std; // << , int dp[2001][2001]; int solve(int l, int r, vector<int> &nums, int sum) { if (r - l + 1 < 2) return 0; if (dp[l][r] != -1) return dp[l][r]; int one = 0; int two = 0; int three = 0; if (l + 1 <= r && nums[l] + nums[l + ...
ALGO
0.999952
5.041398
0081098c-dc7f-41ef-9b49-f909b93735ac
jiachenwei/eigen
doc/tutorial.cpp
#include <Eigen/Array> int main(int argc, char *argv[]) { std::cout.precision(2); // demo static functions Eigen::Matrix3f m3 = Eigen::Matrix3f::Random(); Eigen::Matrix4f m4 = Eigen::Matrix4f::Identity(); std::cout << "*** Step 1 ***\nm3:\n" << m3 << "\nm4:\n" << m4 << std::endl; // demo non-static set....
TOOL
0.891422
4.181004
3a89cf60-5831-466b-a8e8-8135f291ea96
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_10490_11.cpp
#include <bits/stdc++.h> using namespace std; int main() { long long int n, a, b, c; cin >> a >> b >> c >> n; long long int total = n - (a + b - c); if (a + b < c || total <= 0 || a > c || b > c) { cout << "-1" << endl; } else { cout << total; } return 0; }
ALGO
0.999911
3.82761
475bb897-5d34-4443-b8eb-7150eed69129
John-Moore-UOA/University-Projects
leetCode/bubbleSort.cpp
#include <iostream> #include <vector> using namespace std; class Sorting { public: void swap(vector<int> &vec, int indexOne, int indexTwo) { int temp = vec[indexTwo]; vec[indexTwo] = vec[indexOne]; vec[indexOne] = temp; } int sort(vector<int> &vec, int length) { // bubble sort // O(n^2)...
ALGO
0.999409
5.216582
161a0d29-34b1-417d-a30e-13b8e6193bd7
dhalla-456/DSA
PainterPartitions.cpp
#include<vector> using namespace std; bool isPossible(vector<int> &boards, int k, int n, int mid) { int painter = 1; int unit = 0; for(int i = 0; i<n; i++) { if(unit + boards[i] <= mid) { unit += boards[i]; } else { painter++; if(pain...
ALGO
0.99997
5.03047
b863596e-16ab-4a71-9227-0590e7557b65
douglas-ee/exercicios_cplusplus
C++/10_sobrecarga_de_funcoes.cpp
#include <iostream> using namespace std; //declarando o prototipo das funcoes int soma(int n1, int n2); int soma(int n1, int n2, int n3); int main() { //chamdno a primeira funcao SOMA cout << "resultado da primeira funcao: " << soma(1, 2) << endl; //chamdno a segunda funcao SOMA cout << "resultado da segunda fun...
ALGO
0.990045
4.505232
f3bef3c0-934e-437e-8fb8-a75b54041cda
NastyaMortina/Lab_1.Sem_4
lab-algebra-polynomial/base/Postfix.cpp
#include "Postfix.h" #include "Stack.h" using namespace std; bool Postfix::isCorrect(string str) { string unacceptable = "!@#^&.,<>{}[]|=_?"; int count = 0, countOperation = 0, length = str.length(); if ((operands.find(str[0]) != string::npos) || (operands.find(str[length - 1]) != string::npos)) re...
ALGO
0.957533
3.442215
8bb2e9f8-c03b-45ea-95de-29a81266a5f0
wilderif/PS
BOJ/BOJ_1822.cpp
// BOJ_1822 // 차집합 #include <iostream> #include <vector> #include <map> #include <set> #include <algorithm> #include <string> #include <limits.h> #include <cstdio> using namespace std; int main() { cin.tie(NULL); ios_base::sync_with_stdio(false); int a, b, idx_a = 0, idx_b = 0, res_count = 0; cin >> a ...
ALGO
0.999991
3.594946
0c340e0e-1377-4a31-aaa4-2b1e784c9e2e
johannesgerer/jburkardt-cpp
cg_rc/cg_rc.cpp
# include <cstdlib> # include <iostream> # include <iomanip> # include <cmath> # include <ctime> using namespace std; # include "cg_rc.hpp" //****************************************************************************80 int cg_rc ( int n, double b[], double x[], double r[], double z[], double p[], double q[], i...
ALGO
0.999379
3.287981
c7359a19-df58-45cc-a179-928243d15693
sarvex/leetcode-q-sharp
solution/1800-1899/1838.Frequency of the Most Frequent Element/Solution.cpp
class Solution { public: int maxFrequency(vector<int>& nums, int k) { sort(nums.begin(), nums.end()); int n = nums.size(); int ans = 1; long long window = 0; for (int l = 0, r = 1; r < n; ++r) { window += 1LL * (nums[r] - nums[r - 1]) * (r - l); while ...
ALGO
0.999994
6.162896
e6313208-a23e-4057-be5d-a49950631922
yuforest/contests
arc_141/c/main.cpp
// ここは競プロではサボりがちです #include <bits/stdc++.h> using namespace std; // デバッグ用マクロです。詳しくは https://naskya.net/post/0002/ #ifdef LOCAL #include <debug_print.hpp> #define debug(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__) #else #define debug(...) (static_cast<void>(0)) #endif // 節操ないですが、競プロでは便利です。 using ll = long ...
ALGO
0.999896
4.338878
c8ab86a2-82d7-4be1-9594-0a3eb12a906b
willian-li/PX4
src/modules/mc_hover_thrust_estimator/MulticopterHoverThrustEstimator.cpp
/** * @file hover_thrust_estimator.cpp * * @author Mathieu Bresciani <<EMAIL>> */ #include "MulticopterHoverThrustEstimator.hpp" #include <mathlib/mathlib.h> using namespace time_literals; MulticopterHoverThrustEstimator::MulticopterHoverThrustEstimator() : ModuleParams(nullptr), WorkItem(MODULE_NAME, px4::w...
ALGO
0.883252
7.076881
0e3c91c7-722d-4f8d-b119-d2db85179e6a
Micronet-Ltd/sc600-android-system
core/init/import_parser.cpp
#include "import_parser.h" #include <android-base/logging.h> #include "util.h" namespace android { namespace init { Result<Success> ImportParser::ParseSection(std::vector<std::string>&& args, const std::string& filename, int line) { if (args.size() != 2) { retu...
TOOL
0.88819
5.190879
e84c2163-fce7-4162-8a65-3d57f5b18b29
mertpasacukur/riscv_llvm
libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.difference/set_difference_comp.pass.cpp
// <algorithm> // template<InputIterator InIter1, InputIterator InIter2, typename OutIter, // CopyConstructible Compare> // requires OutputIterator<OutIter, InIter1::reference> // && OutputIterator<OutIter, InIter2::reference> // && Predicate<Compare, InIter1::value_type, InIter2::value_type...
TEST
0.917733
6.880352
0e19e931-c27d-499f-90a0-1e985c0f85f6
kronic-staging/platform_external_libcxx
test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy_if.pass.cpp
// <algorithm> // template<InputIterator InIter, OutputIterator<auto, InIter::reference> OutIter, // Predicate<auto, InIter::value_type> Pred> // requires CopyConstructible<Pred> // constexpr OutIter // constexpr after C++17 // remove_copy_if(InIter first, InIter last, OutIter result, Pred pred)...
TEST
0.909692
7.547639
554ca368-dfa4-4e05-8e83-64247e6a4e44
VYCode-4065/DSA-CPP-Question
STRING/CheckPalindrome.cpp
#include <iostream> using namespace std; int length(char name[]) { int count = 0; int i = 0; while (name[i] != '\0') { count++; i++; } return count; } void reverse(char name[]) { int i = 0; int j = length(name) - 1; while (i < j) { swap(name[i++], name...
ALGO
0.996718
4.317397
e0385278-4011-4468-afb3-956ad071ebb0
satwikan/leetcode
flood-fill/flood-fill.cpp
class Solution { public: vector<vector<int>> fill(vector<vector<int>>& image, int sr, int sc, int oldColor, int newColor){ if (sr > 0 && image[sr-1][sc] == oldColor){ // left image = floodFill(image, sr-1, sc, newColor); } if (sc > 0 && image[sr][sc-1] == oldColor){ ...
ALGO
0.967544
6.455194
e2a74d25-28e7-4077-9a90-a350fe4bd47a
FinancialEngineerLab/foolingQuantlib
ql/models/marketmodels/evolvers/lognormalfwdrateeuler.cpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #include <ql/models/marketmodels/evolvers/lognormalfwdrateeuler.hpp> #include <ql/models/marketmodels/marketmodel.hpp> #include <ql/models/marketmodels/evolutiondescription.hpp> #include <ql/models/marketmodels/browniangenerator.hpp> #incl...
ALGO
0.998612
7.558311
523a38a0-360b-448b-9cd7-5ee629da4eb2
tjduu/image-optimisation-tools
src/Filter.cpp
/* * Group: Ziggurat * * Members: * - Xiaoye Zhang (GitHub: acse-xz4019) * - Melissa Sim (GitHub: acse-mys20) * - Wenhao Hong (GitHub: acse-wh623) * - Javonne Porter (GitHub: acse-jp2923) * - Tianju (Tim) Du (GitHub: edsml-td323) * - Wenxin Li (GitHub: edsml-wl123) */ #include <iostream> #include <cmath> #in...
ALGO
0.998425
6.838642