uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
d62413da-10b5-4410-bd8c-e71f03fecd2e
samrustan/path-planning
src/Eigen-3.3/doc/examples/TutorialLinAlgSetThreshold.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix2d A; A << 2, 1, 2, 0.9999999999; FullPivLU<Matrix2d> lu(A); cout << "By default, the rank of A is found to be " << lu.rank() << endl; lu.setThreshold(1e-5); cout << "With threshold 1e-5...
ALGO
0.999677
4.090376
1d82f7e1-be05-4028-86af-858caca6433d
lmiletic/Operativni_sistemi_1
src/KERNELSE.CPP
#include"KERNELSE.H" #include"PCB.H" #include"SCHEDULE.H" #include"SYSTEM.H" ID KernelSem::semID = 0; KernelSem::KernelSem(Semaphore* mySem, int val) { this->id = KernelSem::semID++; this->mySem = mySem; this->val = val; this->blocked = new List(); this->sleeping = new List(); ((SemList*) KernelSem::allSems)->a...
ALGO
0.982994
3.384345
bf8201de-b29f-4cfd-967f-6f0cb2003994
treyfortmuller/CS9F
proj3/exercise2/CLLNode.cpp
#include "CLLNode.h" #include <iostream> #include <cassert> using namespace std; /** * Return the successor of the given node. * Precondition: this != 0. */ CLLNode* CLLNode::next() { assert(this != 0); assert(myPrevious != 0); // Consistency checks on circular list assert(myNext != 0); return myNex...
ALGO
0.959547
4.173721
f42ed683-1980-4355-88b5-6b19310c0fd6
sinian666/code_102_8
cpp_副本4/chapter_tree/binary_tree_dfs.cpp
/** * File: binary_tree_dfs.cpp * Created Time: 2022-11-25 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" // 初始化列表,用于存储遍历序列 vector<int> vec; /* 前序遍历 */ void preOrder(TreeNode *root) { if (root == nullptr) return; // 访问优先级:根节点 -> 左子树 -> 右子树 vec.push_back(root->val); preOrder...
ALGO
0.999446
6.116714
5109764b-69b6-4b9e-84bf-6d2d6b5825b8
mantidproject/mantid
Framework/CurveFitting/src/Functions/ThermalNeutronBk2BkExpBeta.cpp
#include <cmath> #include <gsl/gsl_sf_erf.h> using namespace std; using namespace Mantid; using namespace Mantid::CurveFitting; using namespace Mantid::API; namespace Mantid::CurveFitting::Functions { using namespace CurveFitting; DECLARE_FUNCTION(ThermalNeutronBk2BkExpBeta) //----------------------------------...
ALGO
0.978769
6.310222
ee86a79f-2c93-44bb-8ed2-f906482b8b07
Abhaywadkar04/DSA-in-C-
2490-circular-sentence/2490-circular-sentence.cpp
class Solution { public: bool isCircularSentence(string sentence) { int n=sentence.size(); if(sentence[0]!=sentence[n-1])return false; for(int i=1;i<n-1;i++){ if(sentence[i]==' '){ if(sentence[i-1]!=sentence[i+1]){ return false; ...
ALGO
0.999828
5.660923
c8a0b7c5-45c4-4afe-8537-35fd3f5bb984
shimwoojin/WoojinCpp
Baekjoon/Class/Class_4/1916.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; using pii = pair<int, int>; constexpr int INF = 2'000'000'000; int Dijkstra(const vector<vector<pii>>& graph, int start, int end) { int answer = 0; vector<int> lengths(graph.size(), INF); priority_queue<pii, vector<pii>, greater<pii>> pq; ...
ALGO
0.999906
4.879474
453c8bb7-3426-44b0-b178-fc9e36c44b20
kishanraj04/leetcode-solutions
greedy/2357. Make Array Zero by Subtracting Equal Amounts.cpp
class Solution { public: int minimumOperations(vector<int>& nums) { sort(nums.begin(),nums.end()); int c = 0; int i = 0; while(nums[nums.size()-1]>0){ while(nums[i]==0) i++; int sub = nums[i]; for(int t=i;t<nums.size();t++){ ...
ALGO
0.999973
5.795807
f5fbc4fd-2ab7-45ba-b066-d02b83533d5b
anuragsinghrajput123456789/DSA-Problems-Cpp
RandomQuestion/LL.cpp
//DELETEION OF A NODE #include <bits/stdc++.h> using namespace std; class Node { public: int data; Node* next; Node(int data) { this->data = data; this->next = NULL; } }; void printLinkedList(const Node* head) { const Node* ptr = head; while (ptr != nullptr) { cout <...
ALGO
0.999891
6.3776
c56ca5b0-269c-42fa-9932-0fa27c5288b0
xTayEx/xtayex-CompetitivePrograming
Nowcoder/arrindex.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string> #include <vector> #include <map> #include <stack> #include <queue> #include <set> #include <cctype> #include <cmath> #include <unordered_map> #define mst(a,b) memset((a),(b),sizeof(a)) #define debug printf("debug\n") #define...
ALGO
0.999983
3.70512
8ce204f6-300e-4a19-841a-a3683f2493f1
aurnabnil66/C-plus-plus-Programming-Basics
Pointers/Basic Knowledge (Pointers).cpp
#include<iostream> using namespace std; int main() { int val; cout << "Enter a variable = "; cin >> val; cout << "value of the variable = " << val <<endl; cout << "Address of the variable = " << &val << endl; int *ptr; ptr = &val; cout << "value of the pointer = " << *ptr << endl; ...
ALGO
0.994152
3.683302
6976fd63-76a3-4078-ac1f-3c5a2b01536f
MacroUniverse/SLISC-libs-x64-ubuntu20.04
mplapack-2.0.1/share/examples/mplapack/00_LinearEquations/Cgetri_test_mpfr.cpp
//public domain #include <iostream> #include <string> #include <sstream> #include <cstring> #include <algorithm> #include <mpblas_mpfr.h> #include <mplapack_mpfr.h> #define MPFR_FORMAT "%+68.64Re" #define MPFR_SHORT_FORMAT "%+20.16Re" inline void printnum(mpreal rtmp) { mpfr_printf(MPFR_FORMAT, mpfr_ptr(rtmp)); } in...
ALGO
0.99457
3.144046
2cba2d09-7319-45e8-b3e9-89ccc324e084
raincross7/code-similarity
codes/train_code/problem311/problem311_193.cpp
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(ll i=0;i<n;i++) #define repl(i,l,r) for(ll i=(l);i<(r);i++) #define per(i,n) for(ll i=n-1;i>=0;i--) #define lper(i,r,l) for(ll i=r-1;i>=l;i--) #define fi first #define se second #define mp make_pair #define pb push_back #define ins insert #define all(x) ...
ALGO
0.999881
4.335205
82bc88a0-7944-429f-b2ee-f13d9ad42a2f
829kong/Cpp_StudyCode
YoonCppStudy/Problem7-2/Problem7-2.cpp
#include <iostream> using namespace std; class Person { public: void Sleep() { cout << "Sleep" << endl; } }; class Student :public Person { public: void Study() { cout << "Study" << endl; } }; class PartTimeStudent : public Student { public: void Work() { cout << "Work" << endl; } }; int main() { Pe...
TOOL
0.881893
4.543365
383621d1-0393-4c9c-8972-62ab9d974e42
thefossilrecord/mame4all-rs97
src/cpu/ccpu/ccputabl.cpp
typedef CINESTATE (*opcode_func)(int); /* a lot of jump table entries evaluate to the same thing */ #define opINP_AA_AA opINP_A_AA #define opINP_BB_AA opINP_A_AA #define opOUTbi_AA_A opOUTbi_A_A #define opOUTbi_BB_A opOUTbi_A_A #define opOUT16_AA_A opOUT16_A_A #define opOUT16_BB_A opOUT16_A_A #define opOUT64_AA_A opOU...
ALGO
0.956449
4.757785
d95ed70b-9162-42b7-b81d-bfbe5c320df2
li-zihang/neon_learning
3rdparty/android-ndk-r17c/sources/third_party/shaderc/third_party/spirv-tools/source/opt/redundancy_elimination.cpp
#include "redundancy_elimination.h" #include "value_number_table.h" namespace spvtools { namespace opt { Pass::Status RedundancyEliminationPass::Process(ir::IRContext* c) { InitializeProcessing(c); bool modified = false; ValueNumberTable vnTable(context()); for (auto& func : *get_module()) { // Build t...
ALGO
0.995028
7.856258
2239a5a4-72db-4ccc-80e1-99853c9dc63a
Mugdha67/Codeforces
B. Star.cpp
#include<bits/stdc++.h> using namespace std; #define for0(i,n) for(i=0;i<n;i++) #define for(i,n) for(i=1;i<=n;i++) #define forn(i,n) for(i=n;i>=1;i--) #define forn0(i,n) for(i=n-1;i>=0;i--) #define ll long long int #define ld long double #define pb push_back #define endl "\n" #define pi acos(-1) #define YES cout<<"YES...
ALGO
0.999512
3.754936
8cde9ec9-c498-4930-abfc-33b481393093
ammarGamal123/Codeforces-Solutions
CodeForces/GNU C++20 (64)/1850E | Cardboard for Pictures/214907336.cpp
#include <bits/stdc++.h> using namespace std; using int64 = int64_t; #define all(x) (x).begin(), (x).end() #define ll long long #define rall(x) (x).rbegin(), (x).rend() #define int long long #define no return void (cout << "NO" << endl) #define yes return void (cout << "YES" << endl) #define lll __int128 #define ord...
ALGO
0.999852
3.303616
2a956c6c-b025-4638-a8dd-47ecaf28ed58
lakshmank6300/Leetcode
2465-shifting-letters-ii/shifting-letters-ii.cpp
class Solution { public: string shiftingLetters(string s, vector<vector<int>>& shifts) { int n=s.size(); vector<int>pref(n+1,0); for(int i=0;i<shifts.size();i++){ pref[shifts[i][0]]+=(shifts[i][2]==1)?1:-1; pref[shifts[i][1]+1]+=(shifts[i][2]==1)?-1:1; } ...
ALGO
0.999967
6.430358
fae0a68e-d631-4c11-8ce2-dca4aaf4be0b
gaurav7cpw/aps_100Codes
armstrong_number.cpp
// Program to check whether a number is an armstrong number or not #include <iostream> using std::cout; using std::cin; int main() { int n, k, d, s = 0; cout << "Enter a number:"; cin >> n; k = n; while (k != 0) { d = k % 10; s += d * d * d; k /= 10; } if (s == n) cout << n << "is an arm...
ALGO
0.999882
5.3115
bc2b0bfd-6005-4f3d-84a6-1d0dbf0f119e
yjnnlee/Algorithm
math/5622 다이얼.cpp
#include <iostream> #include <string> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string s; cin >> s; int len = s.length(); int res = 0; for (int i = 0; i < len; i++) { if (s[i] >= 65 && s[i] <= 67) res += 3; else if (s[i] >= 68 && s[i] <= 70) res += 4; els...
ALGO
0.997008
3.537435
ec9057b0-f84e-46eb-893d-2cfb1fd4d4bd
ismail-alnajjar/store_app
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
6bda56f9-5703-4a0f-a23a-a3321e27f606
gabrieldemoraes/Algorithm-With-C-
Day 7/code/_demo_upperbound.cpp
//g++ -O3 _demo_upperbound.cpp -o _demo_upperbound.exe //cl /Fo.\obj\ /EHsc /O2 _demo_upperbound.cpp /link /out:_demo_upperbound.exe #include "helpers_and_types.hpp" #include <vector> #include <algorithm> #include <iterator> #include <iostream> int main() { seed_rand(now_since_epoch()); std::vector<int> ints...
ALGO
0.99921
4.762701
5dff41a1-941d-4dad-acbc-1a5e15d0cd9f
ishandutta2007/codeforces
flashmt/normal/163/A.cpp
#include <iostream> #include <algorithm> #include <cstdio> #include <vector> #include <cstring> #include <string> #include <cmath> #include <utility> #include <map> #include <set> #include <queue> #include <stack> #include <sstream> #define fr(a,b,c) for (int a=b;a<=c;a++) #define frr(a,b,c) for (int a=b;a>=c;a--) #def...
ALGO
0.999969
4.252684
c0287807-87a2-41a0-b96e-e451fbc0c698
sanyukta111/-6companies30days
Intuit/Q2. word-search.cpp
#include <bits/stdc++.h> using namespace std; bool dfs(vector<vector<char>> &board, string word, int i, int j, int pos) { int m = board.size(); int n = board[0].size(); if (i < 0 || j < 0 || i >= m || j >= n) return false; if (pos == word.length()) return true; if (word[pos] == boa...
ALGO
0.999962
4.949919
2909c2e7-db70-4bbd-bad9-8ac0d8d5df7c
ishandutta2007/codeforces
dxqwq/normal/571/E.cpp
// Problem: E. Geometric Progressions // Contest: Codeforces - Codeforces Round #317 [AimFund Thanks-Round] (Div. 1) // URL: https://codeforces.com/problemset/problem/571/E // Memory Limit: 256 MB // Time Limit: 1000 ms // // Powered by CP Editor (https://cpeditor.org) //And in that light,I find deliverance. #include...
ALGO
0.999964
4.473583
c5caea4c-ebdb-4fba-812b-a2f945e9a74c
Deepakkumar586/CppBasic
FactorialFunction.cpp
#include <iostream> using namespace std; // Factorial // int fact(int n){ // int fact = 1; // for(int i = 1;i<=n;i++){ // fact = fact * i; // } // return fact; // } // according to Formula // int nCr(int n, int r){ // int num = fact(n); // int denom = fact(r)*fact(n-r); // ...
ALGO
0.999893
5.308661
8734fef2-98df-4b2d-a344-ce5bc0dcd3de
anhhducc/NMLT_IT001.L11
19522573_08/Bai206/Bai206.cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; struct phanso { int tu; int mau; }; typedef struct phanso PHANSO; void Nhap(PHANSO&); void Nhap(PHANSO[], int&); void Xuat(PHANSO); void Xuat(PHANSO[], int); int SoSanh(PHANSO, PHANSO); void HoanVi(PHANSO&, PHANSO&); void SapTang(PHANSO[],...
ALGO
0.99002
3.332329
73fc3cf1-d0c6-4a76-9176-da16b09c3981
sasuki-10/DAILY-CHALLENGE-2
Pattern(123)-1.cpp
#include<iostream> using namespace std; int main() { int i,j,n; printf("ENTER THE VALUE:"); scanf("%d",&n); for(i=0;i<=n;i++) { for(j=1;j<=i;j++) { printf("%d",j); } printf("\n"); } return 0; }
ALGO
0.999571
3.410172
1b2ad28e-474f-4b78-bb09-df35bd308e2d
bartobuddy/AlgorithmTasks
CodeForces/kThDivisor1400.cpp
#include <bits/stdc++.h> using namespace std; long long solution(long long n,long long k){ if(k == 1) return 1; int numberOfDivisors = 0; for (size_t i = 1; i < sqrt(n); i++){ if(n % i == 0) numberOfDivisors+=2; } if ((long long)sqrt(n) * (long long)sqrt(n) == n) numberOfDivisors++; if(...
ALGO
0.999982
4.6247
12c7b8f2-8726-483f-8b35-8a1b6e0a18cb
MarkDuLJ/c-demo
c++demo/bfs/bfs_cases.cpp
// // bfs_cases.cpp // c++demo // // Created by Mark Du on 2025-05-01. // #include <queue> #include "bfs_cases.hpp" /** BFS use queue to enqueue/dequeue each node n = number of nodes in graph g = adjacency list for unweighted graph s= start node e = end node && e >= 0, s < n function bfs(s, e) prev = solve(...
ALGO
0.999382
4.756225
e32db80f-f15c-4bdc-8928-bf20a83cae3c
zzxddyx/data_struct
cpp/C++/Prime/stl/algorithm/lambda/10-21.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main(void) { int sz; cin >> sz; auto fun = [&sz]() -> bool { if ( sz == 0 ) { return true; } else { while(sz) { ...
ALGO
0.999166
3.723183
80f33e0c-852e-4ed4-9f03-8d266bbcb350
Darylwanji/COSC3P93
Sequential/KNN/KNN.cpp
/* * Name: Aditya Rajyaguru * Student Number: 6582282 * * Name: Brandon Daryl Wanji * Student Number: 6151351 */ #include "euclidean.h" #include <iostream> #include <fstream> #include <sys/time.h> std::string filenames[4] = {"datasets/Prostate_Cancer_dataset.csv", "datasets/Breast_Cancer_dataset.csv","datasets/a...
ALGO
0.937797
5.649019
1971ffc0-a80d-4487-9f6c-926d1a4364eb
the-shoaib2/Sector-2.0
Data Structure/Link List/Bit_Sift_Right_Sift.cpp
// // #include <iostream> // using namespace std; // typedef struct Node // { // int data; // struct Node *next; // } Node; // int main() // { // Node *start; // Node *Node1 = (Node *)malloc(sizeof(Node)); // Node *Node2 = (Node *)malloc(sizeof(Node)); // Node *Node3 = (Node *)malloc(sizeof(N...
ALGO
0.999895
5.018832
da1bee6c-8fed-4093-a702-ec54c06810b5
YBRua/LeetCode
General/3306-count-of-substrings-containing-every-vowel-and-k-consonants-ii/optimized.cpp
#include <string> #include <unordered_map> using namespace std; class Solution { public: long countOfSubstrings(string word, int k) { // let atLeastK(word, k) be the number of substrings with at least k consonants // observation: // atLeastK(word, k) - atLeastK(word, k + 1) // = ...
ALGO
0.999955
6.142992
e7477624-e892-4ccf-8e15-19b53168cdf4
ADitHya7134/hackerrank-solutions
001. 2D Array - DS.cpp
// Problem: https://www.hackerrank.com/challenges/2d-array/problem // Score: 15 #include <iostream> using namespace std; int hourglass_sum(int arr[6][6], int i, int j){ int ans = 0; ans = arr[i][j] + arr[i][j + 1] + arr[i][j + 2] + arr[i + 1][j + 1] + arr[i + 2][j] + arr[i + 2][j + 1] ...
ALGO
0.999931
4.86773
5b1e0a32-e65a-48c9-b7d0-d33da94f46fd
ovsky/sumi-emu
src/sumi/game_list.cpp
#include <regex> #include <QApplication> #include <QDir> #include <QFileInfo> #include <QHeaderView> #include <QJsonArray> #include <QJsonDocument> #include <QJsonObject> #include <QList> #include <QMenu> #include <QThreadPool> #include <QToolButton> #include <fmt/ranges.h> #include "common/common_types.h" #include "co...
TOOL
0.909377
6.875588
6f854909-1e68-4acf-ba49-539eca4e9d61
iamaryankr/completeDSA
dynamicProgramming/lcs.cpp
#include<bits/stdc++.h> using namespace std; class dponstring{ public: int fun(int i, int j, string text1, string text2, vector<vector<int>> &dp){ if(i<0 || j<0) return 0; if(dp[i][j]!= -1) return dp[i][j]; if(text1[i]==text2[j]) return 1+fun(i-1, j-1, text1, text2, dp); return...
ALGO
0.999996
5.030707
f9c2cd5b-a1a1-47d4-9cc6-9bb63e6363ad
TALAPANENIVARSHITHCHOWDARY/LeetCode
2571-find-the-pivot-integer/find-the-pivot-integer.cpp
class Solution { public: int lsum(int x) { int sum = 0; for (int i = 1; i <= x; i++) { sum += i; } return sum; } int rsum(int x,int n) { int sum = 0; for (int i = n; i >= x; i--) { sum += i; } return sum; } int...
ALGO
0.999954
5.659358
c7bf8d9f-24ec-4b67-9b62-fb5ea36b4c7e
LLWWZW/Cpp_review
Part_05_Concurrency/01_Introduction_and_Running_Threads/03_Running_a_Single_Thread/quiz.cpp
#include <iostream> #include <thread> void threadFunctionEven() { std::this_thread::sleep_for(std::chrono::milliseconds(1)); // simulate work std::cout << "id of this Even concurrency: " << std::this_thread::get_id() << std::endl; std::cout << "Even thread\n"; } /* Student Task START */ void threadFunctio...
ALGO
0.895204
5.545022
289d179c-1354-4933-9377-ef2cc3a20aca
AlexeyOgurtsov/SpriteRender
Source/ThirdParty/boost_1_67_0/libs/bimap/example/population_bimap.cpp
// VC++ 8.0 warns on usage of certain Standard Library and API functions that // can be cause buffer overruns or other possible security issues if misused. // See http://msdn.microsoft.com/msdnmag/issues/05/05/SafeCandC/default.aspx // But the wording of the warning is misleading and unsettling, there are no // po...
TOOL
0.980822
5.798679
96096e24-9246-4b5c-8b76-c92cb926e902
james-sungjae-lee/2018_CPP
algorithmTest/20_30/21시험점수 분포/시험점수 분포Solution.cpp
#include<iostream> #include<fstream> #include<cstdlib> #include<cmath> using namespace std; void GetScore(int* arr, int size) { int i; int* checkarr = new int[size * 2]; int count = 0; int count2 = 2; checkarr[0] = arr[0]; checkarr[1] = 1; for (i = 0; i < size - 1; i++) { if (arr[i] == arr[i + 1]) check...
ALGO
0.99952
3.357231
12700bc4-7fff-4a1c-b98c-03a0337b5320
0xUvaish/LeetHub
485-max-consecutive-ones/485-max-consecutive-ones.cpp
class Solution { public: int findMaxConsecutiveOnes(vector<int>& nums) { int ans=0,cnt=0; for(auto x: nums) { if(x==1) cnt++; else cnt=0; ans = max(ans, cnt); } return ans; } };
ALGO
0.999969
5.9703
ef1dd4ae-706a-42c4-bd55-f8d5f119f387
a00012025/Online_Judge_Code
CodeForce/484-E.cpp
#include<stdio.h> #include<algorithm> #include<vector> #define INF 1000000001 using namespace std; const int maxn=100000+5 ; int left[20*maxn],right[20*maxn],root[maxn],ROOT[maxn] ; int llen[20*maxn],rlen[20*maxn],len[20*maxn] ; int cnt ; int a[maxn] ; vector<int> tmp ; int find_in_v(int x) { int l=0,r=tmp.size()...
ALGO
0.999975
4.014834
699083e8-d978-4dd5-a143-d02af03cb41c
flyingcow8/ble-location-lib
Bls.cpp
#include "Bls.h" #include "LevenbergMarquardt.h" //检查某个基站信息是否已经存在target数组中 static int isInTarget(BLS_TRANSMISSION *transmission, BLS_TARGET *target) { int i = 0; while (target[i].beacon) { if (transmission->beacon == target[i].beacon) { return i; //检测到该基站已存在target数组的第i个元素 } ...
ALGO
0.999901
3.852087
ce1c3346-4ad2-4f30-b3c1-fed6fb529821
weihaoysgs/ssvio
thirdparty/eigen/doc/examples/TutorialLinAlgExSolveColPivHouseholderQR.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix3f A; Vector3f b; A << 1,2,3, 4,5,6, 7,8,10; b << 3, 3, 4; cout << "Here is the matrix A:\n" << A << endl; cout << "Here is the vector b:\n" << b << endl; Vector3f x = A.colPivHouseholderQr...
ALGO
0.999942
3.356631
9a5c89e9-e875-41d7-9c3d-c45602e9b627
yysskk/Training
AtCoder/abc165_b.cpp
// SeeAlso: #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<int,int> pii; typedef pair<ll,ll> pll; #define MAX 100000 #define NIL -1 #define MOD 1000000007 typedef int _loop_int; #define rep(i,n) for(int i = 0; i < n; i++) #define FOR...
ALGO
0.999847
3.243474
c4102514-29d1-441b-9e31-a410698c25d7
Redleaf23477/ojcodes
codeforces/round694/B.cpp
// by redleaf23477 #include <bits/stdc++.h> // iostream macros #define endl '\n' #define var(x) "[" << #x << "=" << x << "]" // chrono macros #define chrono_now std::chrono::high_resolution_clock::now() #define chrono_duration(t1, t2) std::chrono::duration<double>(t2-t1).count() #define chrono_rand_seed chrono_now.tim...
ALGO
0.999962
4.143712
283195f0-84c6-4c01-a8eb-47d951b5008e
zhengranzhang/OpenCV3CookbookLearningRecord
version-3/OpenCV3Cookbook-master/src/Chapter03/colordetector.cpp
#include "colordetector.h" #include <vector> cv::Mat ColorDetector::process(const cv::Mat &image) { // re-allocate binary map if necessary // same size as input image, but 1-channel result.create(image.size(),CV_8U); // Converting to Lab color space if (useLab) cv::cvtColor(image, converted, CV_...
ALGO
0.920194
5.451173
3f144d8d-de2f-4c68-8c07-e055fedb6f6d
Bogzx/PBINFO
Problems/2913Proth/main.cpp
#include <iostream> using namespace std; bool test(long long n){ long long power2=2; while(power2<=n){ if(n%power2==0) if((n/power2)%2!=0 && (n/power2)<power2) return true; power2*=2; } return false; } int main(){ long long n; cin>>n; n=n-1; if(test(n)) ...
ALGO
0.999011
4.164466
21193d3d-2f18-4df0-b3e1-a354ac93a5b8
RashidAGP/parallel_gem5
src/systemc/tests/systemc/misc/cae_test/general/control/if_test/fsm/fsm.cpp
/***************************************************************************** fsm.cpp -- Original Author: Rocco Jonack, Synopsys, Inc., 1999-10-25 *****************************************************************************/ /***************************************************************************** M...
ALGO
0.96817
4.025086
bf49aa85-f9a4-467d-91f5-00379501f343
hihiroo/BOJ
STL/10773.cpp
// 제로 #include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define lli long long int int main(){ int n,a; stack<int> s; cin>>n; for(; n>0; n--){ cin>>a; if(a == 0 && !s.empty()) s.pop(); else s.push(a); } lli cnt = 0; while(!s.empt...
ALGO
0.99989
4.078661
9d79e529-ae74-47fa-b75e-5d48427df62d
sonalibante/ORE
QuantLib/ql/models/marketmodels/evolvers/svddfwdratepc.cpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #include <ql/models/marketmodels/evolvers/svddfwdratepc.hpp> #include <ql/models/marketmodels/marketmodel.hpp> #include <ql/models/marketmodels/evolutiondescription.hpp> #include <ql/models/marketmodels/browniangenerator.hpp> #include <ql/...
ALGO
0.999112
7.726229
e8d7cb1a-cc48-43c1-901c-a5919bc7f42d
altamsh04/DSA-Problem-Solutions
Leetcode/Easy/C++/Valid_Parentheses.cpp
class Solution { public: bool isValid(string s) { stack<char> stk; for (auto it : s) { if (it=='(' || it=='[' || it=='{') { stk.push(it); } else { if (stk.empty()) { return false; } char ch=stk.top(); st...
ALGO
0.999395
6.454877
cfce3695-12d3-4e92-ac38-a36ea59457bc
Hexzenberg/University-Codes
Sem 3/OOPs/Lab 5/3.cpp
// Create a class TIME with members hour, minute and second. Write a program that adds two // time objects.The objects must be passed as function arguments. #include<bits/stdc++.h> using namespace std; class TIME{ float h,m,s; public: void set(){cout<<"Enter time in Hours, minutes and seconds:\n",cin>>h...
TOOL
0.862037
4.546411
569b169c-6a33-4197-b2c6-3dee142a2b57
mannynav/Financial-Engineering-in-IR-and-FX
Lecture 4 - Path-Dependent - Monte Carlo Methods/Exercise 4.4/BSModel01.cpp
#include "BSModel01.h" #include <cmath> const double pi=4.0*atan(1.0); double Gauss() { double U1 = (rand()+1.0)/(RAND_MAX+1.0); double U2 = (rand()+1.0)/(RAND_MAX+1.0); return sqrt(-2.0*log(U1)) * cos(2.0*pi*U2); } void BSModel::GenerateSamplePath (double T, int m, SamplePath& S) { doub...
ALGO
0.979917
3.821034
e7c0d7cc-6002-4bba-adbb-31bab948b6f0
NCH2024/OPP-Learn
SelftaughtC++_[TongHop-baitap-Cpp]/Mang ky tu [baiTap#1].cpp
//Viết chương trình nhập vào một chuỗi ký tự từ bàn phím sau đó in ra độ dài của chuỗi đó. //Hoán đổi chuỗi đã tạo và in ra màn hình #include <iostream> using namespace std; int main() { char cha[200]; cout << "Moi nhap vao chuoi : "; cin.getline(cha, 200); int doDai = strlen(cha); cout << "Do...
ALGO
0.987283
3.40118
60135130-9fa5-4b85-a267-22bcc390ecdb
Malakdj/my-website
codes/Vigenere.cpp
#include <stdio.h> #include <string.h> #include <ctype.h> void encryptVigenere(char *plaintext, char *key, char *ciphertext) { int i, j = 0; int textLen = strlen(plaintext); int keyLen = strlen(key); for (i = 0; i < textLen; i++) { if (isalpha(plaintext[i])) { char base = isupper(p...
ALGO
0.999967
5.121317
eb43c74e-76ba-42a0-ae6a-cee8a089a488
libgeos/geos
benchmarks/algorithm/InteriorPointAreaPerfTest.cpp
#include <geos/geom/PrecisionModel.h> #include <geos/geom/GeometryFactory.h> #include <geos/util/GeometricShapeFactory.h> #include <geos/precision/SimpleGeometryPrecisionReducer.h> #include <geos/geom/util/SineStarFactory.h> #include <geos/geom/Geometry.h> #include <geos/geom/Polygon.h> #include <geos/geom/Point.h> #in...
TEST
0.887321
7.537567
bc94a487-708d-407d-bc9c-63785a5ff8a2
I-delver-I/exams
I term/Basics of programming/Dopka/Dopka/Arrays/src/functions.cpp
#include "functions.h" namespace arr { // PART 4 // PART 3 /*int** ReplaceCol(int **M, const int k, const int m, const int colIndex) { for (int i = 0; i < k; i++) { M[k][colIndex] = k - colIndex; } cout << "The array with replaced column is:" << endl; PrintM(M, k, m); return M; }*/ void Create...
ALGO
0.977165
3.309106
b6d4d925-d1df-486f-a600-550429b1c6be
fafa1899/BuildCppDependency
Source/boost-1.86.0/libs/multiprecision/example/safe_prime.cpp
//[safe_prime #include <boost/random.hpp> #include <boost/multiprecision/cpp_int.hpp> #include <boost/multiprecision/miller_rabin.hpp> #include <iostream> #include <iomanip> int main() { using namespace boost::random; using namespace boost::multiprecision; typedef cpp_int int_type; mt11213b base_gen(cloc...
ALGO
0.995867
6.033881
72eeb6e4-10ff-43a7-9b00-c495c34ef14c
amontoison/ColPack
Examples/SampleDrivers/Matrix_Compression_and_Recovery/ADOL-C/10_Column_compression_and_recovery_for_Jacobian_return_Row_Compressed_Format__unmanaged_usermem.cpp
// An example of Column compression and recovery for Jacobian /* How to compile this driver manually: Please make sure that "baseDir" point to the directory (folder) containing the input matrix file, and s_InputFile should point to the input file that you want to use To compile the code, replace the Main.cpp file i...
ALGO
0.998334
4.534326
e3329d0a-6f18-4b83-8335-cb591d7fbb57
GuessEver/ACMICPCSolutions
TopCoder/634D2/B/B.cpp
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <c...
ALGO
0.999671
3.377247
0536b80e-575b-49e3-bf2e-854d2b77ceb4
D-lana/N-Puzzle
CountMismatch.cpp
#include "Library.hpp" CountMismatch::CountMismatch(int size_p) : Heuristics(size_p) { type = 3; k = 2; } int CountMismatch::h(int num, int x, int y) { int x2 = dict[num] % 1000; int y2 = dict[num] / 1000; int _h = 0; if (x != x2) { _h++; } if (y != y2) { _h++; } return(_h); } int CountMismatch::init(P...
ALGO
0.997083
3.560593
2220be91-5cdd-4b2a-a735-0e7af084567f
Rafi-Shariar/Data-Structure-and-Cpp
function_swap_value.cpp
#include<bits/stdc++.h> using namespace std; void swap_values(int &a, int &b); int main(){ int a=10,b=16; swap_values(a,b); cout<<a<<" "<<b<<"\n"; return 0; } void swap_values(int &a, int &b){ int temp; temp=a; a=b; b=temp; return; }
ALGO
0.998042
4.140056
51dc19c1-c7e9-4726-a40f-69236e4bb0aa
Bhola18coding/Sonia-Maam-DSA
Dynamic Programming/Class01.cpp
#include <bits/stdc++.h> using namespace std; //// 3 Jan 2023 /// StairPath // int stairpath(int n, vector<int>&dp) // { // if(n==0) // { // return 1; // } // if(n<0) // { // return 0; // } // //if the value is present then return // if(dp[n]!=-1) // { // ...
ALGO
0.999985
4.748044
a241522f-e836-49f6-9a38-0c0807efd776
jcouyang/pyTao
zxing/symbian/QQrDecoder/zxing/oned/Code128Reader.cpp
#include "Code128Reader.h" #include <zxing/oned/OneDResultPoint.h> #include <zxing/common/Array.h> #include <zxing/ReaderException.h> #include <math.h> #include <string.h> #include <sstream> namespace zxing { namespace oned { const int CODE_PATTERNS_LENGTH = 107; const int countersLength = 6; static const in...
ALGO
0.990273
4.303802
6527046a-363d-403c-a3a4-486a7d17d0b3
0xPolygon/piltools
src/server.cpp
#include "hv.h" #include "hssl.h" #include "hmain.h" #include "iniparser.h" #include "HttpServer.h" #include "hasync.h" // import hv::async #include "engine.hpp" #include "service.hpp" hv::HttpServer g_http_server; hv::HttpService g_http_service; static int parse_confile(const char* confile); // short option...
WEB
0.944379
4.618927
60f350fc-79f8-470d-8493-30357dc11b5e
Phreak971/test2
architecture/src/code.cpp
#include <iostream> #include <bitset> #include <string> #include <boost/multiprecision/cpp_int.hpp> std::string bitsetToString(const std::bitset<128>& bs) { std::string result; for (int i = bs.size() - 1; i >= 0; --i) { result += bs[i] ? '1' : '0'; } return result; } int main() { std::bitse...
TOOL
0.93233
5.901767
33044236-2018-49b0-bdcd-40c96fda1df2
Nguyennhatthanh46/DSA---Thuc-Hanh-Tuan-1
Bài 2.cpp
#include <iostream> #include <string> using namespace std; bool KT(const string &s) { char Khonghople[] = {'.', '\\', '/', ' ', '\'', ','}; for (char c : s) { for (char x : Khonghople) { if (c == x) return true; } } return false; } string Xet(const string &s) { if (s.l...
ALGO
0.998386
3.666914
325eaff7-1e70-4864-8b8b-8691d432ee94
manmeet199/6Companies30daysChallenge
GoldmanSachs/08_Total_Decoding_Messages.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: int CountWays(string digits){ long long int n=digits.size(); int mod=1e9+7; int count[n+1]; count[0] = 1; count[1] = 1; if(digits[0]=='0') return 0; for (int i = 2; i <= n; i++) { count[i] =...
ALGO
0.999892
5.776287
d62e2f93-39c0-433a-8160-dd2c12ca4611
afterthat97/acm-solutions
POJ/3080.cpp
#include <iostream> #include <stdio.h> #include <cstring> #define maxn 65 using namespace std; int f[maxn]; char s[maxn][maxn], sub[maxn], inv[maxn], answ[maxn]; void getf(char *p) { int len = strlen(p); memset(f, -1, sizeof f); for (int i = 0, j = -1; i < len;) { while (~j && p[i] != p[j]) j = f[j]; i++; j++;...
ALGO
0.99995
3.724906
3dac61d2-f3ab-4ef1-94ab-28c2c4b563c7
The-No-Hands-company/RudeBase3D
third_party/libigl/libigl-2.5.0/include/igl/count.cpp
template <typename XType, typename SType> IGL_INLINE void igl::count( const Eigen::SparseMatrix<XType>& X, const int dim, Eigen::SparseVector<SType>& S) { // dim must be 2 or 1 assert(dim == 1 || dim == 2); // Get size of input int m = X.rows(); int n = X.cols(); // resize output if(dim==1) { ...
ALGO
0.992105
5.298262
d765b410-84a8-461b-9286-f57972cd8df1
miguelsndc/competitive-programming-lib
Solutions/Seletiva-2025/C6/B.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define MOD 1000000007 #define ii pair<int, int> #define fi first #define se second void solve() { int n; cin >> n; vector<int> v(n); for (int &x:v)cin>>x; vector<int> a = v; sort(begin(a), end(a)); int l = 0, r = n - 1; ...
ALGO
0.999985
4.245887
2282c9bb-4f9b-48f6-928d-5d3192699e8d
sarvex/leetcode-racket
solution/2000-2099/2007.Find Original Array From Doubled Array/Solution.cpp
class Solution { public: vector<int> findOriginalArray(vector<int>& changed) { int n = changed.size(); if (n & 1) { return {}; } sort(changed.begin(), changed.end()); vector<int> cnt(changed.back() + 1); for (int& x : changed) { ++cnt[x]; ...
ALGO
0.999991
5.555707
3961897a-e3af-4f58-a853-2a29fedfce3a
aj4941/Algorithm
프로그래머스/3/42884. 단속카메라/단속카메라.cpp
#include <bits/stdc++.h> using namespace std; typedef vector<vector<int>> vi; typedef pair<int, int> pii; vector<pii> v; bool cmp(pii &a, pii &b) { if (a.second != b.second) return a.second < b.second; return a.first < b.first; } int solution(vi routes) { for (auto to : routes) v.pus...
ALGO
0.997938
5.011621
a600207c-8c35-4eb6-b777-7c33e3280075
Zimse12345/Code
pyyz_Contest/2022PYYZ省选模拟第四十五测/number.cpp
#include <cstdio> #include <algorithm> #include <cstring> #include <vector> #include <cmath> #include <set> #include <map> #include <queue> #include <stack> #include <iostream> #include <cstdlib> #include <ctime> #define ll long long #define ull unsigned long long using namespace std; inline int read(){int qrx=0,qry...
ALGO
0.999826
3.229656
2e8cea1f-fe9a-4b81-9342-7599b466f428
pandeyankit123/CP-Solutions-by-Laidback
A_Vika_and_Her_Friends.cpp
/* __ ___ ______ ______ _____ ___ _____ _ __ / / / \ \ |__ __| | | \ \ | | \ \ / \ \ | ___| | | / / / / / /_\ \ || | | | | | |__/ / / /_\ \ | | | | / / / /___ / /---\ \ __||__ | | | | | | \ \ / /---\ \ | |___ | | \ ...
ALGO
0.999611
4.068205
0bdf2ff7-6b12-4888-8f4e-107ae05cd0d3
altera2015/ZMQVirtualCam
baseclasses/combase.cpp
#include <streams.h> #pragma warning( disable : 4514 ) // Disable warnings re unused inline functions /* Define the static member variable */ LONG CBaseObject::m_cObjects = 0; /* Constructor */ CBaseObject::CBaseObject(__in_opt LPCTSTR pName) { /* Increment the number of active objects */ InterlockedIncre...
TOOL
0.860542
6.764966
5b5a2017-7901-4f61-a920-e0c7dedc1541
semrich/cs302-23
challenge02/solution.cpp
// Challenge 02: Closest Numbers // Name: xxxxx // Brief description: // This code solves yyyy based on the following idea/implementation... #include <algorithm> #include <climits> #include <cstdlib> #include <iostream> #include <vector> using namespace std; // Main Execution int main(int argc, char *argv[]) { ...
ALGO
0.998352
3.68593
ebba2b4a-80e8-4fca-b2fd-44e70834b126
CrealityOfficial/Ender-series-gdmcu
buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.cpp
#include "pins_arduino.h" #ifdef __cplusplus extern "C" { #endif // Digital PinName array const PinName digitalPin[] = { PA_0, // Digital pin 0 PA_1, // Digital pin 1 PA_2, // Digital pin 2 PA_3, // Digital pin 3 PA_4, // Digital pin 4 PA_5, // Digital pin 5 PA_6, // Digital pin 6 PA_7, // Dig...
CONFIG
0.929981
6.350003
0bd67277-7393-4048-936e-dbd8bc05230d
HusseinYoussef/Interview-Preparation
leetcode/Easy/Self Dividing Numbers.cpp
#include <iostream> #include <vector> using namespace std; vector<int> selfDividingNumbers(int left, int right) { vector<int>ans; for(int i =left;i<=right;++i) { int n = i; bool f = 1; while(n) { int d = n % 10; if(d == 0 || i % d != 0) {...
ALGO
0.999868
4.754956
e06cdf6a-16ce-4b38-bfed-78a1833df973
rparit-stacks/Decode-cpp
Loops/ForLoop/series.cpp
#include<iostream> using namespace std; int main() { int a, sum = 0; cout<<"Enter a number"; cin>>a; //1-2+3-4+5-6....n for(int i = 1; i <= a; i++) { // if(a%2 != 0) sum = i - sum; // else sum = sum + i; cout<<i; if(i != a && i%2 == 0) { ...
ALGO
0.999866
3.68725
088de0c0-879f-47ea-b61b-f726c3b0db61
rohit9798/IB
Array/maxDistance.cpp
Given an array A of integers, find the maximum of j - i subjected to the constraint of A[i] <= A[j]. If there is no solution possible, return -1. Example : A : [3 5 4 2] Output : 2 for the pair (3, 4) int Solution::maximumGap(const vector<int> &A) { int n = A.size(); int Lmin[n], Rmax[n]; Lmin[0] = A[0]...
ALGO
0.999986
5.150136
01c22dec-75e7-4e30-af5f-90917229d1d3
KhokharHuzaifa/100-Programs-of-PF
Program 98.cpp
//Q98-Write a program that calls two functions, Draw_Horizontal() and //Draw_Vertical() to construct a rectangle according to call? #include<iostream> using namespace std; int Draw_Horizontal(){ for(int i=1;i<=3;i++){ for(int j=1;j<=10;j++){ cout<<"*"<<" "; } cout<<endl; } } int Draw_Vertical(){ for(int ...
TOOL
0.997946
3.856628
95b09474-e32d-4a3e-bf7a-5fd81ab482a8
mollnn/spoly
mts1/src/integrators/mlt/mlt_proc.cpp
#include <mitsuba/bidir/mut_bidir.h> #include <mitsuba/bidir/mut_lens.h> #include <mitsuba/bidir/mut_caustic.h> #include <mitsuba/bidir/mut_mchain.h> #include <mitsuba/bidir/mut_manifold.h> #include <mitsuba/bidir/util.h> #include "mlt_proc.h" MTS_NAMESPACE_BEGIN //#define MTS_BD_DEBUG_HEAVY static StatsCounter stat...
ALGO
0.981404
4.295379
e10fd074-ee97-49a9-9ced-4cf03b9772b0
mirinta/leet_code
dynamic_programming/knapsack/完全背包/0279_perfect_squares.cpp
#include <vector> /** * Given an integer n, return the least number of perfect square numbers that sum to n. * * A perfect square is an integer that is the square of an integer; in other words, it is the * product of some integer with itself. For example, 1, 4, 9, and 16 are perfect squares while 3 and * 11 are n...
ALGO
0.999934
6.790378
d6947d29-e4f6-4e25-ad00-8d4bba8d8b6e
hyudai28/cpp_module
cpp08/ex00/main.cpp
#include "easyfind.hpp" #include <vector> int main(void) { std::vector<int> v; int org_data[] = {4, 5, 6}; const std::vector<int> data(org_data, org_data + 3); std::cout << easyfind(data, 4) << std::endl; std::cout << easyfind(data, 5) << std::endl; std::cout << easyfind(data, 6) << std::endl; std::cout << eas...
ALGO
0.910027
4.323835
79a413ae-333f-4051-be34-27794fb171ea
Pankaj-krCP/DSA-And-CP
Coding Ninja - CP/18. Greedy Problem/winning_lottery.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int d; cin >> d; int num = n - 1; int *arr = new int[d]; int index = d; d--; arr[0] = 1; int rem = num % 9; int div = num / 9; if (div > 0) { while (div != 0) { a...
ALGO
0.999644
5.541645
e2ad8d4b-da24-46ec-a490-77416a0c92b3
PhearumSivmeng/learning-app-UI
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
dcc81c3f-d34c-43a7-a519-8d0e9eec5280
alexandraback/datacollection
solutions_5688567749672960_1/C++/ngochai94/asdf.cpp
#include <bits/stdc++.h> using namespace std; #define For(i,a,b) for(long long i=a;i<b;i++) #define pb push_back #define mod 1000000007 #define reset(s,val) memset(s,val,sizeof(s)) #define eps 1e-12 #define pi acos(-1) #define sqr(x) (x)*(x) #define two(x) (1<<(x)) long long t,n,p10[16],req[16],ans; vector<int> v; boo...
ALGO
0.999685
4.160116
042fd539-520a-411f-af65-11ba7ed90ef1
m4nn4t/DSA
reverseKnodesLL.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: int data; Node* next; Node* back; Node(int data1,Node* next1,Node* back1){ data=data1; next=next1; back=back1; } Node(int data1){ data=data1; next=nullptr; back=nullptr; } ...
ALGO
0.999958
5.05995
e4197587-4549-469f-a759-333686872aa3
oogamirei74/Spaces_Git
A_Creating_Words.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { string a, b; cin >> a >> b; // Swap the first characters char temp = a[0]; a[0] = b[0]; b[0] = temp; cout << a << " " << b << endl; } return 0; }
ALGO
0.99994
6.082768
e618b67a-bc9f-47f4-9b2f-3ef562e1f731
DEVESH307/Data-structures-and-Algorithms
1.C++/3.flow control/5.greatest_3.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n1,n2,n3; cout<<"enter three numbers"<<endl; cin>>n1>>n2>>n3; if(n1>n2 && n1>n3) cout<<"greatest number = "<<n1<<endl; else if(n2>n3 && n2>n1) cout<<"greatest number = "<<n2<<endl; else cout<<"greatest number = "<<n3<<endl...
ALGO
0.999432
3.675612
e5db4b13-fe70-4562-b360-eb7de108e4bf
Alexr03/FinalAssessment-Ada
AnagramSolver.cpp
// // Created by Alex on 01/11/2019. // #include "AnagramSolver.h" #include "Utilities/StringUtilities.h" AnagramSolver::AnagramSolver(std::string word) { this->word = word; cout << "Anagram Solver initialized. Please wait." << endl; this->englishWords = generateEnglishDictionary(); generatePossibleAn...
ALGO
0.989725
5.906049
0a014cce-74a8-4199-a555-e8afd80d6750
themuffinator/muffmode
src/bots/bot_debug.cpp
#include "../g_local.h" #include "bot_utils.h" #include "bot_debug.h" static const gentity_t *escortBot = nullptr; static const gentity_t *escortActor = nullptr; static const gentity_t *moveToPointBot = nullptr; static vec3_t moveToPointPos = vec3_origin; // how close the bot will try to get to the move to point goa...
TOOL
0.884494
4.259213
7f5704a9-0549-44ba-837c-907dba4e95f5
gajendra-iitm/parDS
sssp/sssp_omp.cpp
// g++ -O3 sssp_omp.cpp -o sssp_omp.out -fopenmp && ./sssp_omp.out inputs/USA-road-d.NY.egr #include <atomic> #include <climits> #include <algorithm> #include <tuple> #include <vector> #include <set> #include <sys/time.h> #include <stdio.h> #include <omp.h> #include <iostream> #include <chrono> #include "ECLgraph.h"...
ALGO
0.999622
3.546362
1c2760e4-e4e3-4a1e-aa59-f2d6ad57e933
sinian666/code_86_7
cpp_副本17/chapter_stack_and_queue/linkedlist_deque.cpp
/** * File: linkedlist_deque.cpp * Created Time: 2023-03-02 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* 双向链表节点 */ struct DoublyListNode { int val; // 节点值 DoublyListNode *next; // 后继节点指针 DoublyListNode *prev; // 前驱节点指针 DoublyListNode(int val) : val(val), prev(nullp...
ALGO
0.999325
5.936366
598c8bf2-fabc-417e-bf5e-28d630c6b6d1
almike129319/Object-Oriented-Programming-Lab
9.Geo-Solitare(LIS,Greedy)/main.cpp
#include<bits/stdc++.h> using namespace std; #define int long long class card{ //calss for representing the cards of different types public: virtual int area(){ //virtual function for getting the area of the given card return 0; } virtual void print(){ //for printing the card ...
ALGO
0.990033
3.852158
9a6eecd2-2982-41dc-8b1c-16a0392af84d
piebargallo/Functions
12_Optional/main.cpp
#include <iostream> #include <optional> std::optional<int> indice_numero(int numeros[], const size_t& contador, const int& numero) { for (size_t i{}; i < contador; i++) { if (numeros[i] == numero) { return i; } } return {}; // std::nullopt } int main() { int arr...
ALGO
0.9987
6.033696