uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
e2bb54a7-e184-4086-9993-a33754f2f979
competitive-verifier/zzz_idat50me_cpp_lib
test/aoj_ALDS1_10_C.test.cpp
// competitive-verifier: PROBLEM https://onlinejudge.u-aizu.ac.jp/problems/ALDS1_10_C #ifndef call_include #define call_include #include <bits/stdc++.h> using namespace std; #endif #include "dp/lcs.cpp" int main() { int Q; cin >> Q; while(Q--) { string X, Y; cin >> X >> Y; cout << LCS(X, Y) << endl; } }
ALGO
0.999768
4.80338
f1982f35-a1a7-43fb-a96f-e64445e84f71
tmuttaqueen/MyCodes
Online Judge Code/[Other] Online-Judge-Solutions-master_from github/TJU/3993 - Only One Bag II.cpp
#include <cstdio> #include <cstring> #include <vector> #include <queue> using namespace std; int main(){ int T,n,m,in[100],ans[100]; vector<int> L[100]; scanf("%d",&T); while(T--){ scanf("%d %d",&n,&m); for(int i = 0;i < n;++i) L[i].clear(); memse...
ALGO
0.999883
3.872138
b6a2b9b4-7726-4d09-b7c6-1fa63ab8c3ba
InclinedScorpio/coding_ultimate_series
leetcode/medium/linked_list/add_two_numbers.cpp
// https://leetcode.com/problems/add-two-numbers/ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */...
ALGO
0.999751
6.599378
3c9fe183-4d95-4782-a1b8-40f217a72f6e
junkiyoshi/Insta20200401
Mover.cpp
#include "Mover.h" //-------------------------------------------------------------- Mover::Mover(glm::vec2 start) { this->start = start; this->next = this->think(); log_list.push_back(this->start); } //-------------------------------------------------------------- void Mover::update(int separation_rate) { // p̃...
ALGO
0.880012
4.606514
ad460081-1581-496c-9c73-0ae70a11fc79
ayush-kumar774/Competitive-Programming
Codeforces/29 - A. Spit Problem.cpp
// In the name of Aadi Shakti // We are nothing and you are everything // Jai Mata Di #include <bits/stdc++.h> using namespace std; #define int long long #define fast ios_base::sync_with_stdio(false) ; cin.tie(0) ; cout.tie(0) ; #define endl '\n' #define sz(v) ( (int) ( (v).size() ) ) #define all(v) ( (v).begin() ) , ...
ALGO
0.999984
4.249169
9531497b-d2c5-47f4-a6f8-985a25997f1d
Lunaris-AOSP/external_skia
src/pathops/SkDCubicLineIntersection.cpp
#include "include/core/SkPath.h" #include "include/core/SkPoint.h" #include "include/core/SkTypes.h" #include "include/private/base/SkDebug.h" #include "src/pathops/SkIntersections.h" #include "src/pathops/SkPathOpsCubic.h" #include "src/pathops/SkPathOpsCurve.h" #include "src/pathops/SkPathOpsDebug.h" #include "src/pa...
ALGO
0.999913
4.826314
fd971da1-98ff-46f0-988e-29fdd2504060
deepak-ky/cpp-codes
cpp-codes/counting_divisors.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; #define int long long #define varname(name) #name #define mod 1000000007 #define wer(x) cout<<"\n"<<varname(x)<<" here : "<<x #define test int t;...
ALGO
0.999794
5.364337
8f8bd754-a83a-4011-bc93-13310ebdc2bb
morix1500/atcoder
atcoder/ABC013/A/main.cpp
#include <bits/stdc++.h> using namespace std; int main() { char x; cin >> x; switch (x) { case 'A': cout << 1 << endl; break; case 'B': cout << 2 << endl; break; case 'C': cout << 3 << endl; break; case 'D': cout << 4 << endl; break; case 'E': cout << 5 << endl; ...
ALGO
0.999557
3.743255
22de44e2-8a53-47bc-97bf-51c8882070f2
woozway/PAT
PAT (Advanced Level) Practice/1115 Counting Nodes in a BST (30).cpp
#include <iostream> using namespace std; struct node { int v; node *l, *r; }; void insert(node *&r, int v) { node *t = new(node); *t = {v, NULL, NULL}; if (r == NULL) r = t; else if (v <= r->v) insert(r->l, v); else insert(r->r, v); } int d[1010], dmax = 0; void dfs(node *r, int depth) { d[depth]++; if (r->l =...
ALGO
0.999913
3.848017
827fb661-b0aa-4c5e-8256-8c33dc98e244
shubham-githb/LeetCode-Accepted-Solutions
length-of-last-word/length-of-last-word.cpp
class Solution { public: int lengthOfLastWord(string s) { int n = s.size(); int res=0; while(n>0){ if(s[--n]!=' ') res++; else if(res>0) return res; } return res; } };
ALGO
0.999389
5.562702
e840ee36-07e5-4a5a-8c3b-e423704e96c6
tianbingsz/SVRGDL
paddle/utils/CommandLineParser.cpp
#include "CommandLineParser.h" #ifndef PADDLE_USE_GFLAGS #include "paddle/utils/StringUtil.h" #include <algorithm> #include <iostream> #include <iomanip> #include <stdlib.h> #include <string> #include <vector> #include <utility> #include <tuple> namespace paddle { static constexpr int kStatusOK = 0; static constexpr ...
TOOL
0.896773
6.815814
6067c60a-b7ad-4fe2-b914-d786938787f4
leomaurodesenv/contest-codes
contests/uri/uri-1187.cpp
/* * Problema: rea Superior * https://www.urionlinejudge.com.br/judge/pt/problems/view/1187 */ #include <iostream> #include <iomanip> #include <cstdio> #include <cstdlib> #include <numeric> #include <string> #include <sstream> #include <iomanip> #include <locale> #include <bitset> #include <map> #include <vector> #incl...
ALGO
0.994317
3.127472
568a6afd-f56a-4ab0-b0e5-a813d8c77af2
Arya-Abhishek/cpp-ECC11
exp-2/sorting.cpp
#include <iostream> #include "space.h" using namespace std; void swap (int *a, int *b) { int temp = *a; *a = *b; *b = temp; } void merge (int a[], int si, int mid, int ei) { int i = si; int j = mid + 1; int size = ei- si + 1; int *arr = new int[size]; int k = 0; while (i <= mid ...
ALGO
0.999753
4.41622
dfe80275-b449-491d-ba7c-46cce7f55eaa
stonewinter/LeetcodeEx
cpp_LeetCode_algo_66.cpp
#include <iostream> #include <vector> using namespace std; vector<int> plusOne(vector<int>& digits); int main(){ vector<int> digits = {9,9,9,9,9,9}; plusOne(digits); for(auto each : digits){ cout << each << " "; } return 0; } vector<int> plusOne(vector<int>& digits) { vector<int> ...
ALGO
0.999669
5.901169
eab0ff62-3dad-4b77-9392-2558f77a3636
codyjrivera/int-dreal-artifact
ibex-lib/src/predicate/ibex_PdcHansenFeasibility.cpp
#include "ibex_PdcHansenFeasibility.h" #include "ibex_Newton.h" #include "ibex_Linear.h" #include "ibex_VarSet.h" #include "ibex_FncProj.h" namespace ibex { PdcHansenFeasibility::PdcHansenFeasibility(Fnc& f, bool inflating) : Pdc(f.nb_var()), f(f), _solution(f.nb_var()), _unicity_box_ignored(f.nb_var()), inflating(in...
ALGO
0.999858
6.528664
aa85d540-0abf-4aa3-b462-5e3aa6d7b434
pn11/benkyokai
competitive/AtCoder/ABC105/D.cpp
// TLE #include <iostream> using namespace std; int main() { long N, M; cin >> N; cin >> M; long long *cumA = new long long[N + 1]; long long A; long long cum = 0; cumA[0] = 0; for (int i = 1; i < N+1; ++i) { cin >> A; cum += A; cumA[i] = cum; } ...
ALGO
0.99982
3.752889
a78720a4-bb6e-48a7-aa45-c754658be1e8
El-limon-mecanico/Quack-Engine
QuackEngineSol/dependencies/Bullet/Src/Extras/Serialize/BulletXmlWorldImporter/string_split.cpp
#include <assert.h> //#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "string_split.h" ///todo: remove stl dependency namespace bullet_utils { void split(btAlignedObjectArray<std::string> &pieces, const std::string &vector_str, const std::string &separator) { char **strArray...
TOOL
0.920687
5.71519
5648e650-fb12-40a8-9650-98df9b8348b6
germanohn/competitive-programming
codeforces/896/a.cpp
#include<bits/stdc++.h> #define pb push_back using namespace std; typedef long long ll; int n, m; char s[105]; int main() { scanf(" %d %d", &n, &m); scanf(" %s", s); for (int i = 0; i < m; i++) { int l, r; char c1, c2; scanf(" %d %d %c %c", &l, &r, &c1, &c2); l--, r--; ...
ALGO
0.999981
3.318731
3e36f5f2-7e8a-4b06-94d0-a92157991882
Glazomer/MATI_IT_ALL
14/6.2.14.cpp
#include <iostream> int* fib(int n, int* result) { int a = 0, b = 1; while (n-- > 1) { b += a; a = b - a; } result[0] = a; result[1] = b; result[2] = b + a; return result; } int main(int argc, char **argv) { int n; std::cin >> n; int* result = new int[3]; r...
ALGO
0.999691
4.080754
915944ab-624a-4f7b-8dac-1516b819fa21
lenardxu/CC_AF
src/sliding_window_node.cpp
#include <opencv2/imgcodecs.hpp> #include <opencv2/opencv.hpp> #include <string> #include <vector> #include <algorithm> #include <chrono> #include <numeric> #include <limits> #include "sliding_window_node.hpp" #include "PolynomialRegression.hpp" #include "cv_bridge/cv_bridge.h" std::vector<cv::Point2f> temp_rightpoi...
TOOL
0.936195
3.188126
cea3ba05-13b2-479a-96f2-60e98b6ed3af
Saifur-Rahman03/Codes
Codes/2-1/CSE 2102/Module - 3/Lab 8/9.cpp
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; void inputArray(int *a, int *b, int n); void outputArray(int *a, int n); void bubbleSort(int *a, int n); int linearSearch(int *a, int n, int x); int binarySearch(int *a, int n, int x); int bi_com; int li_com; int main() { int n, x; cout << "...
ALGO
0.99906
4.799708
1d43829a-8497-4848-8b50-5a98cd1835e8
sun1f/orbslam2_experiment
Thirdparty/DBoW2/DBoW2/ScoringObject.cpp
#include <cfloat> #include "TemplatedVocabulary.h" #include "BowVector.h" using namespace DBoW2; // If you change the type of WordValue, make sure you change also the // epsilon value (this is needed by the KL method) const double GeneralScoring::LOG_EPS = log(DBL_EPSILON); // FLT_EPSILON // ------------------------...
ALGO
0.995184
5.906807
a137c2f3-8ce9-4a2a-a727-30e1ac911ef2
mirandaftiago/firebase_setup
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
e9d22530-814d-48c0-b43c-59e5d9c5b6e3
ishandutta2007/codeforces
jakube/normal/920/G.cpp
#include <bits/stdc++.h> using namespace std; vector<int> prime_factors(int x) { vector<int> f; for (int i = 2; i * i <= x; i++) { if (x % i == 0) { f.push_back(i); while (x % i == 0) x /= i; } } if (x > 1) f.push_back(x); return f; } ...
ALGO
0.999993
4.413801
026319ab-ce0d-42c6-aa29-e65cd730d027
thermotools/lammps_mie_fh
src/KOKKOS/atom_vec_spin_kokkos.cpp
// clang-format off /* ------------------------------------------------------------------------ Contributing authors: Julien Tranchida (SNL) Aidan Thompson (SNL) Please cite the related publication: Tranchida, J., Plimpton, S. J., Thibaudeau, P., & Thompson, A. P. (2018). Massivel...
TOOL
0.890425
7.420277
e36f2be5-fb43-4176-a0ce-0d181c6e06d7
Arnob342/Code_Chef_Practices
Candy_Distribution.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int a, b; cin >> a >> b; // Ensure a is exactly divisible by b if (a % b != 0) { cout << "No" << endl; } else { int d = a / b; if (d % 2 == ...
ALGO
0.999781
6.149424
bbd5a90d-e9ac-4ccf-8a9e-4393b237c15f
lyh2009/leaper
engine/3rdparty/glm/test/perf/perf_matrix_transpose.cpp
#define GLM_FORCE_INLINE #include <glm/matrix.hpp> #include <glm/ext/matrix_float4x4.hpp> #include <glm/ext/matrix_double4x4.hpp> #include <glm/ext/matrix_relational.hpp> #include <glm/ext/vector_float4.hpp> #if GLM_CONFIG_SIMD == GLM_ENABLE #include <glm/gtc/type_aligned.hpp> #include <vector> #include <chrono> #inclu...
TEST
0.851086
6.841862
9b88cba3-a664-4493-97d9-d2a8f9301bd0
yiyuezhuo/drone-tracking
object_detector.cpp
#include "dnn_utils.cpp" #include <opencv2/opencv.hpp> using namespace cv; using namespace std; class ObjectDetector{ public: ObjectDetector(); Rect detect(Mat mat); int quota=0; int max_quota=1; }; class HumanDetector{ public: HumanDetector(); bool detect(Mat...
TOOL
0.952516
5.209973
33705a2d-bf7c-45e9-aff6-1987b32dee62
markcda/unitech-bop-1st-gr-2023-cpp
9/2-6.cpp
#include <iostream> #include <cmath> #include <vector> std::vector<int> read(int n) { std::cout << "Введите " << n << " чисел, начиная с новой строки." << std::endl; std::vector<int> v; int tmp; for (int i = 0; i < n; i++) { std::cout << "Введите n<" << i << ">: "; std::cin >> tmp; v.push_back(tmp)...
ALGO
0.999583
4.828353
56539c61-3e6d-4aff-82ba-e853590ea455
paBlo01420/Basic-cplus
Pointer/Intrucation pointer.cpp
#include <iostream> using namespace std; main(){ int nilai[3], *intruksi; nilai[0] = 87; nilai[1] = 123; nilai[2] = 680; intruksi = &nilai[0]; cout<<"Nilai "<<*intruksi <<" ada di alamat memori "<<intruksi; cout<<"\nNilai "<<*(intruksi+1)<<" ada di alamat memori "<<intruksi+1; cout<<...
ALGO
0.982061
3.260057
6adb8d74-48ea-46b3-9746-f4d65afce8c7
TheSadMuffinMan/muffinman_academia
4.0 CS3 Algorithms Sherine CPP/1. Lecture/13.0 Priority Queues and Heap Sort/main.cpp
/* Priority Queues use a binary heap data structure. Our goal is to insert items, and then remove either the largest or smallest item. EXAMPLE: *insert "P"* *insert "Q"* *insert "E"* return max; *returns "Q"* etc... Client Example Problem: "Find the largest M items in a stream of n items." */ /* Usin...
ALGO
0.999893
6.010801
29cf75b7-3921-4299-b3d8-de7bf54d4e63
SonuLohani-1/LeetcodeProblems
LeetCode150/191.cpp
#include<bits/stdc++.h> using namespace std; // This is the solution of the problem 191 on leetcode - Number of 1 Bits // https://leetcode.com/problems/number-of-1-bits/ class Solution { public: int hammingWeight(uint32_t n) { // Optimized method since we know that 'n & (n-1)' will drop the lowest 1 bit so ...
ALGO
0.99922
6.350999
ebc067b3-b707-4b30-a194-5551f1225e42
joseppii/Path-Planning-Project
src/Eigen-3.3/doc/examples/DenseBase_template_int_middleRows.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; int main(void) { int const N = 5; MatrixXi A(N,N); A.setRandom(); cout << "A =\n" << A << '\n' << endl; cout << "A(1..3,:) =\n" << A.middleRows<3>(1) << endl; return 0; }
ALGO
0.877244
3.245548
c7189bbf-0894-4260-b510-4482b141c33b
shah-zx/plus-plus-C
Hackerrank/equalizearr.cpp
#include <bits/stdc++.h> #include <stack> #include <queue> #include <math.h> #include <limits.h> #include <algorithm> #include <unordered_set> #include <unordered_map> using namespace std; #define vi vector<int> #define vii vector<pair<int, int>> #define pii pair<int, int> #define rep(i, a, b) for (int i = a; i < b; i+...
ALGO
0.999889
3.934234
972cfc66-2284-4a85-af46-e0f8675b2ff1
a-ism256/Coding-Challenges
leetcode/pascal_triangle.cpp
class Solution { public: std::vector<std::vector<int>> generate(int numRows) { std::vector<std::vector<int>> ans(numRows); ans[0] = {1}; if(numRows==1) return ans; ans[1] = {1, 1}; if(numRows==2) return ans; for(int i=2; i<numRows; ++i) { ...
ALGO
0.999906
5.697874
0ddde404-9ad4-475d-b5a5-640f20dc73cd
SarahElkheshin/LeetCode
55-jump-game/jump-game.cpp
class Solution { public: bool canJump(vector<int>& nums) { //we will check if arr[i] + i is >= nums.size() int reach = 0; for(int i=0;i<=reach;i++){ reach = max(reach,i+nums[i]); if(reach >= nums.size()-1) return true; } return false; } };
ALGO
0.999981
6.231147
6f940576-0519-475e-929a-87fdc46b0453
shubhjain22/Cpp-Codes
bstart.cpp
#include <bits/stdc++.h> using namespace std; int main(void){ std::ios::sync_with_stdio(false); int t; cin >> t; while(t--){ int64_t a,b; cin >> a >> b; string stra = to_string(a); string strb = to_string(b); string ans = ""; if(stra.size() > strb.size()){ string temp = stra.substr(0,stra.size()-strb...
ALGO
0.999831
5.145741
2c106546-7d7b-44bb-84a2-8114a3d04fb0
sogood99/cpp-comp
capacity-to-ship-packages-within-d-days/capacity-to-ship-packages-within-d-days.cpp
#include <bits/extc++.h> #include <bits/stdc++.h> #define LSOne(S) ((S) & -(S)) using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ii> vii; typedef vector<ll> vll; typedef __gnu_pbds::tree<ll, __gnu_pbds::null_type, less<ll>, __gnu_pb...
ALGO
0.999989
5.094165
e5a1c22f-9278-4591-9046-9c1277caa673
sonal-8240/FDS-code
parathesis.cpp.cpp
#include <iostream> using namespace std; #define size 10 class stackexp { int top; char stk[size]; public: stackexp() { top=-1; } void push(char); char pop(); int isfull(); int isempty(); }; void stackexp::push(char x) { top=top+1; stk[top]=x; } char stackexp::pop() {...
ALGO
0.997698
5.194004
9ee20cff-e6eb-4a3f-a947-095b1f750308
Karnnxz/Lab17
lab17_1.cpp
#include<iostream> #include<iomanip> using namespace std; int main(){ int nA,nB; int *A,*B,**C; cout << "Length of A: "; cin >> nA; A = new int[nA]; cout << "Input Array A: "; for(int i=0; i < nA; i++) cin >> A[i]; cout << "Length of B: "; cin >> nB; B = new int[nB]; cout << "Input Array B: "; for...
ALGO
0.99893
3.303257
6ed762d6-ee6b-480d-829b-edc546b925aa
gamal019/labs
16/3.cpp
// ConsoleApplication67.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы. // #include <iostream> int main() { int a[10]; int n, i; printf_s("N: "); scanf_s("%d", &n); printf_s("A: "); scanf_s("%d", &a[0]); printf_s("B: "); scanf_s("%d", &a...
ALGO
0.995918
3.820949
b00eb9e0-d0df-4dea-bce1-d89baf34ee8e
drdolgosheev/algo.stud
Floyd-warshall algorithm/main.cpp
#include "ReadWriter.h" //string, fstream, iostream, vector, Edge.h - included in ReadWriter.h //Можно создавать любые классы и методы для решения задачи using namespace std; //Так как здесь есть несколько способов вывода ответа, то я предлагаю вам самим реализовать метод вывода, //определенный в классе ReadWriter. ...
ALGO
0.999931
4.698884
9a2a78f0-a8dc-4738-99e1-2122f17b025b
yeahsilver/algorithm
백준/implementation/2504.cpp
#include <iostream> #include <stack> #include <string> using namespace std; int main(void) { string s; cin >> s; bool isPossible = true; stack<char> stack; int temp = 1; long long total = 0; for(int i = 0; i < s.size(); i++) { if(s[i] == '(') { temp*=2; ...
ALGO
0.99988
4.55437
cfc7c633-6658-4db7-87b1-013fe6d231e5
Shikhar2929/Leetcode
Medium/RottingOranges.cpp
class Solution { public: int x[4] = {0, 0, -1, 1}; int y[4] = {1, -1, 0, 0}; int visited[15][15]; void dfs(int nodei, int nodej, int depth, vector<vector<int>> grid) { if(nodei < 0 || nodej < 0 || nodei >= grid.size() || nodej >= grid[0].size()) return; if(grid[nodei][nod...
ALGO
0.999811
6.13536
0611eebc-9c71-4879-ba9f-9a3d0ea8a183
shubham7347/PPT-ASSIGNMENT
binaryseaarch.cpp
#include <iostream> using namespace std; int binarySearch(int arr[],int n,int key){ int s=0; int e=n; while(s<=e){ int mid = (s+e)/2; if(arr[mid]==key){ return mid; } else if(arr[mid]>key){ e=mid-1; } else if(arr[mid...
ALGO
0.99993
5.859112
30de9e40-bea1-44e3-9b24-9fe66de19458
hex-programmer/code
cp/phitron/main-course/module/Semester 1 - c++ for dsa/phitron.io module-2/dynamic-array.cpp
// platform : phitron.io // contest : module-1 // problem : dynamic-array // date : 2024-05-20 #include <bits/stdc++.h> #define kl '\n' #define ll long long #define sort(v) sort(v.begin(), v.end()) #define count(v, x) count(v.begin(), v.end(), x) #define optimize \ ios_base::sync_with_stdio(f...
ALGO
0.989846
3.923767
f9907d3c-b97f-4fc1-9550-13c28014c978
raymondlee2020/leetcode-practice
problems/#347/v1.cpp
class Solution { public: static bool cmp(pair<int, int> a, pair<int, int> b) { return a.second > b.second; } vector<int> topKFrequent(vector<int>& nums, int k) { map<int, int> m; for (auto num: nums) { ++m[num]; } vector<pair<int, int>> tmp; for (...
ALGO
0.999984
6.162663
0fff112e-22d2-48ce-a7ee-30d41132ba56
TriNguyenThanh/DSA
LinkedList/Learn/Bai2.cpp
/*###Begin banned keyword - each of the following line if appear in code will raise error. regex supported define include [ ###End banned keyword*/ #include <iostream> using namespace std; //###INSERT CODE HERE - struct Node{ int info; Node *pNext; }; struct List{ Node *pHead, *pTail; }; Node * getNode(i...
ALGO
0.998453
4.407707
55e6cba9-52b3-4f01-801a-bfcda7410b53
haxbos/Vscode_Backup
04ex/03hard/子序列宽度之和.cpp
#include <bits/stdc++.h> using namespace std; const int mod = 1e9 + 7; class Solution { public: auto sumSubseqWidths(vector<int>& nums) { typedef long long ll; ll res = 0; int n = nums.size(); sort(nums.begin(),nums.end()); vector<int> path; vector<vector<int>> arr;...
ALGO
0.999989
4.583104
4a843518-48d4-44d7-abbd-2b5f0425c71b
EoinDavey/Competitive
UVa/C++/136.cpp
#include <stdio.h> #include <iostream> #include <string> #include <sstream> #include <cmath> #include <climits> #include <stdlib.h> #include <vector> using namespace std; int main(){ long long int count[]={0,0,0}; vector<long long int> digits; digits.push_back(1); while(digits.size() != 1500){ long long int minV ...
ALGO
0.999942
3.837457
3f4685ec-648c-4f00-b18c-e413f530e198
stefaNoleo/pila
Coda-main/Coda.cpp
#include <iostream> #include "Coda.h" using namespace std; int inserisci(coda &c, int e) /* * Inserisce in coda l'elemento e * Implementare anche il controllo di coda piena. * restituisce 0 se l'inserimento è avvenuto * restituisce -1 se non è stato possibile inserire il nuovo * elemento */ { int temp = -1; ...
ALGO
0.993231
4.513721
9f679ea7-9714-49bf-a1a5-e403f6908932
ixray-team/xray-vss-archive
net.ssa/xr_3da/xrGame/AI/ai_monster_jump.cpp
#include "stdafx.h" #include "ai_monster_jump.h" #include "../custommonster.h" #include "../phmovementcontrol.h" CJumping::CJumping() { active = false; } void CJumping::Init(CCustomMonster *pM) { pMonster = pM; Reset (); } void CJumping::Reset() { active = false; time_next_allowed = 0; } void CJumping::Loa...
TOOL
0.894924
4.285553
7f94c24e-d61c-4ac0-b7e3-b5ba1d030ca7
Shell-Wataru/AtCoder
Utility/rolling_hash.cpp
#include <iostream> #include <algorithm> #include <vector> #include <deque> #include <queue> #include <set> #include <map> #include <limits> #include <cmath> #include <iomanip> #include <functional> #include <random> using namespace std; using ll = long long; template< unsigned mod > struct RollingHash { vector< un...
ALGO
0.999809
4.82463
f8b34149-3f5f-4402-ac57-181b6801cd1c
jjentaa/Competitive-pro
cses/Sorting and Searching/Stick_Lengths.cpp
#include <bits/stdc++.h> using namespace std; vector<int> v; int main(){ ios_base::sync_with_stdio(0), cin.tie(0); int n, x; cin >> n; for(int i=0; i<n; i++){ cin >> x; v.push_back(x); } sort(v.begin(), v.end()); long long sum=0; int mid=v[n/2]; for(auto i: v){ ...
ALGO
0.999875
4.971197
1daaf6a7-e739-4426-8ff2-36f5ce79974a
mint6421/kyopro
atcoder/Other/tkppc2016/tkppc2016_b.cpp
#include<bits/stdc++.h> using namespace std; #define inf INT_MAX #define INF LLONG_MAX #define ll long long #define ull unsigned long long #define M (int)(1e9+7) #define P pair<int,int> #define FOR(i,m,n) for(int i=(int)m;i<(int)n;i++) #define RFOR(i,m,n) for(int i=(int)m;i>=(int)n;i--) #define rep(i,n) FOR(i,0,n) #d...
ALGO
0.999981
4.360744
bc8986e7-15fe-4861-ae75-f916d42774cb
adityakhare86/programming
Striver A2Z/DP/2d DP/unique_paths_II.cpp
/* We are at (0, 0) and we have to reach (n-1, m-1) but there are some obstacles marked with 1 in the grid. We have to find the number of unique paths to reach (n-1, m-1). */ #include <bits/stdc++.h> using namespace std; class uniquePathsII{ private: int recursive_find(int x, int y, const vector<vector<int>> &obs...
ALGO
0.999767
5.911032
6ace6fa0-e01e-45b1-a62e-bb35ca298915
Saifu0/Competitive-Programming
CP/211B.cpp
#include<bits/stdc++.h> using namespace std; const int N = 150010; int main(){ int n,k; cin >> n >> k; int a[N]; int s[N]; a[0] = 0; s[0] = 0; for(int i=1;i<=n;i++){ cin >> a[i]; s[i] = s[i-1] + a[i]; } int j=0,ind; int min = INT_MAX; for(int i=k;i<=n;i++){ int x = s[i]-s[j]; if(min > x){ min ...
ALGO
0.999986
3.827982
74980c6f-e198-49c3-8978-44f45358ecbd
bbipp/08-bloomFilter
implementation/io/testMaker.cpp
#include <iostream> #include <math.h> #include <bitset> #include <vector> #include <string> using namespace std; int main() { long numToAdd; long numToTest; cin >> numToAdd; cin >> numToTest; cout << numToAdd << ' ' << numToTest << '\n'; srand(time(0)); vector<long> nums; for (lon...
TEST
0.985985
3.756158
a7ba7cd4-1ee1-4957-a89f-d6288537339d
servo/skia
experimental/Intersection/LineCubicIntersection.cpp
#include "CurveIntersection.h" #include "CubicUtilities.h" #include "Intersections.h" #include "LineUtilities.h" /* Find the interection of a line and cubic by solving for valid t values. Analogous to line-quadratic intersection, solve line-cubic intersection by representing the cubic as: x = a(1-t)^3 + 2b(1-t)^2t ...
ALGO
0.999928
5.420282
7266a221-d4ef-4bb5-9f59-af54e2c83009
zjkang/algorithm
leetcode/240. Search a 2D Matrix II.cpp
/* Author: Zhengjian Kang Email: <EMAIL> Problem: Search a 2D Matrix II Source: https://leetcode.com/problems/search-a-2d-matrix-ii/?tab=Description Difficulty: Medium Tags: {Binary Search}, {Divide and Conquer} Company: Amazon, Google, Apple Note: Write an efficient algorithm that se...
ALGO
0.999959
6.570959
29981c46-dc7a-4699-b428-4e4d83c34157
Tail-Wag-Games/frag
thirdparty/Jolt/Physics/Collision/CollideSphereVsTriangles.cpp
#include <Jolt/Jolt.h> #include <Jolt/Physics/Collision/CollideSphereVsTriangles.h> #include <Jolt/Physics/Collision/Shape/ScaleHelpers.h> #include <Jolt/Physics/Collision/CollideShape.h> #include <Jolt/Physics/Collision/TransformedShape.h> #include <Jolt/Physics/Collision/ActiveEdges.h> #include <Jolt/Physics/Collisi...
ALGO
0.995141
7.604709
5b4c45a6-82fe-4b6e-bd80-8405e8d579e1
yumiyachav2/Signal-Transmission-in-Networks-of-Neurons-Project-Code
FHN_complex_sys_13_04_2024.cpp
#include "mvector.h" #include "mmatrix.h" #include <cmath> #include <random> #include <iostream> #include <fstream> #include <cassert> #include <iomanip> #include <string> #include <vector> #include <stdexcept> #include <typeinfo> // globals double AMP = 5, ALPHA = 1, BETA = 1, GAMMA = 1, STEP = 5e-5, TIME = 1e-2, MA...
ALGO
0.996679
3.463
38adf80a-5559-4bf5-8a6e-6bf151ee3792
DamianArado/LeetCode-tracker
counting-bits/counting-bits.cpp
class Solution { public: vector<int> countBits(int num) { vector<int> v(num + 1, 0); // when you multiply a number by 2, you simply shift all the bits to the left. // If it's even, you're done, if it's odd, you add 1 more. for(int i = 1; i <= num; i++) v[i] = v[i ...
ALGO
0.999991
5.987879
432e8a11-1236-4eac-ad66-4ace625dc9a9
suxutao/LeetcodeList
cn/3066-minimum-operations-to-exceed-threshold-value-ii .cpp
#include "../../../stdc.h" using namespace std; //leetcode submit region begin(Prohibit modification and deletion) class Solution { public: using ll = long long; int minOperations(vector<int>& nums, int k) { priority_queue<ll,vector<ll>,greater<>>q(nums.begin(),nums.end()); ll ans=0; wh...
ALGO
0.999887
5.323539
56483a7a-ee4a-4a66-88ce-e042192218f6
18-RAJAT/ONLINE-JUDGE
A_Cashier.cpp
#include<bits/stdc++.h> using namespace std; #define int long long void sol() { int n,l,a; cin>>n>>l>>a; vector<pair<int,int>>vp; for(int i=0;i<n;++i) { int x,y; cin>>x>>y; vp.emplace_back(x,y); } sort(vp.begin(),vp.end()); int ans=0,res=0; for(int i=0;i<n;++i...
ALGO
0.999924
3.808529
f7ba1c02-0f98-46ff-be42-75129bf3e0d4
MohammadSalam1/C-
Betyg/Betyg.cpp
#include <iostream> using namespace std; int main() { int grades[] = {13, 19, 20, 24, 6, 18, 18, 15, 26, 10, 17}; int countU = 0, count3 = 0, count4 = 0, count5 = 0; for (int i = 0; i < 11; i++) { if (grades[i] >= 25) { count5++; } else if (grades[i] >= 20) { count...
ALGO
0.994669
4.600404
b283aada-24c5-49d3-ae2f-c708b8985858
mjkweon17/algorithm-study
2021_BAEKJOON_C++/07. 문자열/2908.cpp
#include <iostream> #include <algorithm> //reverseԼ using namespace std; int main(void) { string num1, num2; cin >> num1 >> num2; reverse(num1.begin(), num1.end()); reverse(num2.begin(), num2.end()); /* string reverse_num1 = num1, reverse_num2 = num2; for (int i = 2; i >= 0; i--) { reverse_num1[2 - i] =...
ALGO
0.999678
3.356762
0301abd4-bdc9-42d1-b348-883868b76f22
ishandutta2007/codeforces
autumnkite/normal/996/E.cpp
#include <bits/stdc++.h> std::mt19937 rnd(time(0)); const int N = 100005; const long long LIM = 1500000ll * 1500000ll; int n; struct Node { int x, y; Node() { x = 0, y = 0; } Node(int _x, int _y) : x(_x), y(_y) {} Node operator + (const Node &rhs) const { return Node(x + rhs.x, y + rhs.y); } Node operato...
ALGO
0.99996
3.778047
0848d7c2-694c-4c15-b943-a53bd88a5fc0
Amit-Jaydeepsingh-Thakur/SDE-Sheet
c++/backtracking/print_all_permuatation_string_array.cpp
/* * Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. Example 1: Input: nums = [1,2,3] Output: [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]] * */ class Solution { public: vector<vector<int>> ans; void combination(vector<int>& n...
ALGO
0.999849
6.172833
9bfdc93e-324f-4bb4-b9a1-8c139e39c415
Hanna111111/while_c-from-book-C-
while2.cpp
#include <iostream> using namespace std; /* While2◦. Даны положительные числа A и B (A > B). На отрезке длины A размещено максимально возможное количество отрезков длины B (без наложений). Не используя операции умножения и деления, найти количество отрезков B, размещенных на отрезке A. */ int main() { int A,B;...
ALGO
0.998034
3.612473
0221aee6-218c-4443-91e1-60105e34244f
MatSciTools/HFCalc
boost_1_79_0/libs/compute/test/test_sort.cpp
#define BOOST_TEST_MODULE TestSort #include <boost/test/unit_test.hpp> #include <boost/compute/system.hpp> #include <boost/compute/algorithm/sort.hpp> #include <boost/compute/algorithm/is_sorted.hpp> #include <boost/compute/container/vector.hpp> #include <boost/compute/types/struct.hpp> struct Particle { Particle...
TEST
0.861718
7.194312
714b30c7-c032-49a1-a6e1-3329cd04bd3d
oisy92/Software-in-The-Loop-2.0
libraries/AP_Math/vector3.cpp
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- #pragma GCC optimize("O3") #include "AP_Math.h" #define HALF_SQRT_2 0.70710678118654757f // rotate a vector by a standard rotation, attempting // to use the minimum number of floating point operations template <typename T> void Vector3<T>...
ALGO
0.920209
6.781009
1f2d9d3a-2a33-4029-be59-43b8d272ee00
XifanYu/codeforces
1042/F.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pi; typedef pair<ll,ll> pl; typedef double db; typedef complex<db> cd; ll qpow(ll x,ll k,ll mod) { ll ret=1; while(k) { if(k&1) { ret=ret*x; ret=ret%mod; } x=x*x; x=x%mod; k=(k>>1); }...
ALGO
0.999946
3.962292
0ef37554-5958-402a-9755-97078deeb3ad
bayashi-cl/procon-submission
atcoder/abc187/abc187_f/31790369.cpp
/** * @file core.hpp * @author bayashi_cl * @brief core/all * * C++ library for competitive programming by bayashi_cl * Repository: https://github.com/bayashi-cl/byslib * Document : https://bayashi-cl.github.io/byslib/ */ #ifndef LOCAL #define NDEBUG #endif /** * @file stdlib.hpp * @brief STL Template */ #i...
ALGO
0.999649
5.027743
ef210a65-c737-46ee-8139-db99c34b1021
javpalomino-zz/OnlineJudges
uva/Topological Sort/124 - Following Orders.cpp
#include<bits/stdc++.h> using namespace std; char toChar(int n){return n+'a';} int toNumb(char c){return c-'a';} queue<int> v[28]; bool used[28]; int f[28]; int times; list<int> li; void dfs_visit(queue<int> *v, int u, int* c, int* p){ int _p; c[u] = 1; times++; while(v[u].size()){ _p = v[...
ALGO
0.999931
3.766079
6a194409-f35a-46b1-970e-fabe5b827e13
jjvelezo/Cplusplus_Learning
Codes/Proyecto1ArbolBinarioC.cpp
//Arbol Binario #include <iostream> using namespace std; struct Nodo { int data; struct Nodo *izq; struct Nodo *der; }; struct Nodo *newNodo(int data) { size_t sizeNodo = sizeof(struct Nodo); struct Nodo *nodo = (struct Nodo *) malloc(sizeNodo); nodo->data = data; nodo->izq = nodo->...
ALGO
0.999851
5.11886
64111585-5b95-4579-ac6d-bf70bf85e36c
sakshi8707/NextLeap
GRAPHS/course_scedule.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: bool canFinish(int numCourses, vector<vector<int>>& prerequisites) { vector<int> adj[numCourses]; vector<int> indegree(numCourses,0); queue<int> q; vector<int> topo; for(auto it : prerequisites) { adj...
ALGO
0.999944
5.766374
6bf79b80-2fb6-49db-9b1a-ab5edb553a40
thekritikatyagi/Authentication-process
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.998859
6.785645
0cf724c0-88eb-4f1c-93f6-6229c27ac5eb
chrislea/aggdraw
agg2/src/agg_bspline.cpp
#include "agg_bspline.h" namespace agg { //------------------------------------------------------------------------ bspline::~bspline() { delete [] m_am; } //------------------------------------------------------------------------ bspline::bspline() : m_max(0), m_num(0...
ALGO
0.997984
6.21909
628997dc-5993-46cb-932e-1d4e41f79980
linkeLi0421/no-remove-no-reorder
clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
#include "AST.h" #include "FindTarget.h" #include "ParsedAST.h" #include "Selection.h" #include "SourceCode.h" #include "refactor/Tweak.h" #include "support/Logger.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclBase.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/Rec...
TOOL
0.919766
5.574542
2e412c0a-c133-4e51-8ec3-0a225c63b6bd
manikanta2901/ubuntu
.history/SRM/elab/DataStructures/MPE_20201111144740.cpp
// #include<bits/stdc++.h> // using namespace std; // int main(){ // stack<int> data; // for(int i = 0; i < 3; i++){ // int a; // cin >> a; // cout << a << " pushed to stack" << endl; // data.push(a); // } // cout << data.top() << " popped from stack" << endl; // da...
ALGO
0.997964
3.964059
02c9248f-56f9-4ad1-b1ca-9d0767f397ca
neha-mundase20/DSA_Problems_GFG
Difficulty: Hard/Minimum sum partition/minimum-sum-partition.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: /*Recursion and Memoization Approach bool f(int index,int target,int arr[],vector<vector<int>>&dp){ if(target==0){ return true; } if(index==0){ ...
ALGO
0.999795
6.053519
ed4f8225-0597-4ec1-b003-fb2b7badd3d7
amithasan16Hstu/Computer_Network
CRC.cpp
#include <bits/stdc++.h> using namespace std; string convert( string polynomial) { int highest = 0; vector<int> binary; stringstream ss(polynomial); string term; while (getline(ss, term, '+')) { term.erase(remove_if(term.begin(), term.end(), ::isspace), term.end()); int power = 0; ...
ALGO
0.999925
6.360764
24869226-ed4e-4e16-af40-f2eb201da4ad
choudhary29/Github-Kanchan
Sem 3/Data-Structure/linked list/linked_list_odd_even_count.cpp
<<<<<<< HEAD #include<iostream> #include<stdlib.h> using namespace std; struct node{ int info; struct node *next; }; // *************************************** struct node *start; // *************************************** struct node *getnode(){ struct node *p; p=(struct node*)malloc(sizeof(struct node...
ALGO
0.997289
4.218505
7fdec3f9-dead-43c6-a80a-b91cc594c2a6
troyhe/leetcode_2021Fall
1382_Balance 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.99999
6.543082
754877dd-e20c-478e-a6d2-059b5a8f1d56
ThedRk1607/CPtemplates
InterviewPrep/linkedList/flattenList.cpp
Node*merge(Node*a,Node*b){ if(a==NULL)return b; if(b==NULL)return a; Node* result; if (a->data < b->data) { result = a; result->bottom = merge(a->bottom, b); } else { result = b; result->bottom = merge(a, b->bottom); } result->bottom = NUL...
ALGO
0.998451
3.43523
c6b4522c-d811-4e38-909b-5f3024534ba5
JeansAthiwat/CU_2ndYear-1stSemester
IntroData/queueReverse/main.cpp
#include <iostream> #include <string> #include "queue.h" #include "student.h" using std::cin; using std::cout; using std::string; using std::endl; int main() { std::ios_base::sync_with_stdio(false);cin.tie(0); int n,a,b; CP::queue<int> q; cin >> n >> a >> b; for (int i = 0;i < n;i++) { int x; cin >...
ALGO
0.999684
3.066256
969cfdba-bb1b-4dca-99b3-044acc74cf64
AlexMagargiu/School
CPP/Week-5/Exercise-9/ex9.cpp
/* Fiind dat un tablou bidimensional cu n linii şi m coloane, afişaţi cea mai mare componentă şi poziţiile pe care le ocupă. */ #include <iostream> using namespace std; int main() { int a[50][50], m, n, maxComp = 0, maxCompI = 0, maxCompJ = 0; cout << "Introduceti nr de linii:"; cin >> n; cout << "Intoduceti n...
ALGO
0.999111
4.098845
daed752e-1551-4854-a971-33f9faefc5cc
Mutter-Liam/Plane-Scheduler
flight/src/main.cpp
#include <schedule.h> int main(int argc, char* argv[]) { if (argc != 6) { cerr << "Usage: " << argv[0] << " <num_producers> <num_consumers> <bb_size> <leader_file> <scheduling_alg_type>\n" << endl; exit(-1); } int p = atoi(argv[1]); // number of producer threads int c = atoi(argv[2]); // ...
ALGO
0.889836
3.086023
36d6e7b4-e7b3-48e5-89fc-957a967f6bd4
flucloxin500/CSE
CSE-2321-22/Lab Assignment 4/QuickSort.cpp
#include <bits/stdc++.h> using namespace std; int QuickSort(const void *a, const void *b) { return (*(int *)a - *(int *)b); } int main() { int n; cin >> n; int arr[n + 5]; for (int i = 0; i < n; i++) cin >> arr[i]; qsort(arr, n, sizeof(int), QuickSort); for (int j = 0; j < n; j++) ...
ALGO
0.999903
4.547635
8809c434-322f-48e6-a40d-57e4daf1da97
ishandutta2007/codeforces
bench0310/normal/1132/A.cpp
#include <iostream> using namespace std; int main() { int a,b,c,d; cin >> a >> b >> c >> d; if(a>0&&d>0&&a==d) cout << 1 << endl; else if(a==d&&c==0) cout << 1 << endl; else cout << 0 << endl; return 0; }
ALGO
0.999571
3.316688
63719692-b209-4e03-bbd7-80e66b207e94
marine0131/rgbd-slam
src/joinPointCloud.cpp
#include <iostream> //eigen #include <Eigen/Core> #include <Eigen/Geometry> #include <opencv2/core/eigen.hpp> #include <pcl/common/transforms.h> #include <pcl/visualization/cloud_viewer.h> #include "slamBase.h" int main(int argc, char** argv) { ParamReader pr; FRAME f1, f2; f1.rgb = cv::imread("./data/r...
ALGO
0.967896
5.182166
c20e90ec-d040-492b-b1bf-7e0b4f89b3b5
nimrodpar/Obfvious
clang/test/CodeCompletion/function-templates.cpp
namespace std { template<typename RandomAccessIterator> void sort(RandomAccessIterator first, RandomAccessIterator last); template<class X, class Y> X* dyn_cast(Y *Val); } class Foo { public: template<typename T> T &getAs(); }; template <typename T, typename U, typename V> V doSomething(T t, const U &u, V ...
TOOL
0.91214
6.011407
72384b0b-76b3-4856-bde2-b6f2aa7b73b5
tasddc1226/Algorithms
백준/문자열/10809.cpp
/* date : 2021.09.06 problom : 10809 title : 알파벳 찾기 discribe : 한 단어에서 각 알파벳이 처음 등장하는 위치를 찾는 문제 */ #include <iostream> using namespace std; int main() { string arr; cin >> arr; for(int i=97; i<=122; i++){ int j=0; while(arr[j] != 0){ if (arr[j] == (char)i) break; ...
ALGO
0.99993
4.505777
7c220e8b-186a-4b99-a621-2e862385fd7f
kamnajain06/CrackYourPlacement
0101-symmetric-tree/0101-symmetric-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.999962
6.505277
ae4e1218-d50d-4aad-8bd8-ca56eaac53f6
ResistancePlatform/resistance-core
src/rpc/client.cpp
#include "rpc/client.h" #include "rpc/protocol.h" #include "util.h" #include <set> #include <stdint.h> #include <univalue.h> using namespace std; class CRPCConvertParam { public: std::string methodName; //!< method whose params want conversion int paramIdx; //!< 0-based idx of param to convert }; ...
CONFIG
0.944766
6.775881
47b99387-63fa-4836-8c21-a530dd1f989d
Manojit-Das-10/Coding
Recursion/Coin_chain_problem.cpp
#include<bits/stdc++.h> using namespace std; int solve(vector<int>&arr , int target){ // Base Case if(target == 0){ return 0; } if(target < 0){ return INT_MAX; } // 1 case solve karo int mini = INT_MAX; for (int i = 0; i < arr.size(); i++) { int ans = solve(a...
ALGO
0.999972
5.312323
0dd90e1b-2878-4675-9eb3-24e2c6273633
diederickh/roxlu_experimental
addons/Box2D/src/box2dwrapper/Simulation2D.cpp
#include <box2dwrapper/Simulation2D.h> namespace roxlu { namespace box2d { Simulation2D::Simulation2D() :gravity(0.0f, 10.0f) ,world(gravity) ,velocity_iterations(10) ,position_iterations(8) ,timestep(1.0f/30.0f) // ,pixels_per_meter(100) // 1 meter is 100 pixels { world.SetDebugDraw(&debug_draw); uint32 fla...
ALGO
0.916684
5.85261
23fbb068-2d2d-44cf-af61-d96c6e99141c
theashwinabraham/CS101-Resources
Labs/Lab10/union.cpp
/* * AUTHOR: ASHWIN ABRAHAM */ #include <iostream> int main(){ int N, M; std::cin >> N >> M; char arrA[N], arrB[M]; for(int i = 0; i<N; i++){ std::cin >> arrA[i]; } for(int i = 0; i<M; i++){ std::cin >> arrB[i]; } char un[M+N]; for(int i = 0; i<M+N; i++){ un[...
ALGO
0.999995
3.576741
5351f897-872f-4e4b-b834-c64bc8b58ab9
st1v4n/Data_Structures_Algorithms
Additional/RepeatedDNASequences.cpp
/* The DNA sequence is composed of a series of nucleotides abbreviated as 'A', 'C', 'G', and 'T'. For example, "ACGAATTCCG" is a DNA sequence. When studying DNA, it is useful to identify repeated sequences within the DNA. Given a string s that represents a DNA sequence, return all the 10-letter-long sequences (substr...
ALGO
0.998757
6.702273