uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
f08f41f2-4b3e-4604-920c-c19baac1fccd
Mari-Jun/BAEKJOON-ALGORITHM
이분탐색/2512.cpp
#include <iostream> #include <algorithm> using namespace std; int N, M; int Base[10000]; void Setting(); bool Cut(int Mid); int Solve(); int main() { cin.tie(NULL); ios::sync_with_stdio(false); Setting(); cout << Solve(); return 0; } void Setting() { cin >> N; for (int i = 0; i < N; i++) cin >> Base[i]; ...
ALGO
0.99997
4.311008
64940b60-db5c-43d5-a580-28497cc0127c
salim002/Cpp-Codes
52_Codeforces/17_Codeforces 3/21.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<ld> vd; #define fi first #define se second #define mp make_pair #define pb push_back const int mod = 1000000007; // const int mod = ...
ALGO
0.999239
4.614086
c5683739-b6dc-490c-87af-52737bdf1e24
ryank157/asm
ch3 - core2/L3/code.cpp
#include <iomanip> #include <iostream> using namespace std; extern "C" void CalcMatrixSquares_(int *y, const int *x, int nrows, int ncols); // Corrected function signature void CalcMatrixSquaresCpp(int *y, const int *x, int nrows, int ncols) { for (int i = 0; i < nrows; i++) { f...
ALGO
0.998177
4.676047
ee24ebb8-2289-4b56-9b4c-c5692d541d75
xmyqsh/leetcode2016
881_boats-to-save-people.cpp
class Solution { public: int numRescueBoats(vector<int>& people, int limit) { sort(people.begin(), people.end()); int b = 0, e = people.size() - 1; int ret = 0; for (; b < e; ) { if (people[b] + people[e] > limit) { --e; } else { ...
ALGO
0.999995
6.025201
fb053c9c-0a84-4346-bb14-dc37aff7a979
ishandutta2007/codeforces
mangooste/normal/47/D.cpp
#include <algorithm> #include <cassert> #include <cmath> #include <iomanip> #include <iostream> #include <functional> #include <map> #include <queue> #include <random> #include <set> #include <string> #include <vector> using namespace std; using ll = long long; void Main(); signed main() { ios::sync_with_stdio(fal...
ALGO
0.99994
4.108717
871adac6-82b6-402b-abd3-ebc84b2b95e0
francistec/gdal-react-native
deps/libgdal/gdal/alg/gdalmediancut.cpp
#include "cpl_port.h" #include "gdal_alg.h" #include "gdal_alg_priv.h" #include <climits> #include <cstring> #include <algorithm> #include <limits> #include "cpl_conv.h" #include "cpl_error.h" #include "cpl_progress.h" #include "cpl_vsi.h" #include "gdal.h" #include "gdal_priv.h" CPL_CVSID("$Id: gdalmediancut.cpp b...
ALGO
0.996774
4.61014
5292baa2-e825-493d-b305-b549a158db59
xilingyi/sx_MBene
Figure5/RFR/src/mex_regressionRF_predict.cpp
#ifdef MATLAB #include "mex.h" #endif #include "math.h" #include "reg_RF.h" #define DEBUG_ON 0 void regForest(double *x, double *ypred, int *mdim, int *n, int *ntree, int *lDaughter, int *rDaughter, SMALL_INT *nodestatus, int *nrnodes, double *xsplit, double *avnodes, int ...
ALGO
0.995688
5.038113
b0937264-a2e6-45cd-b62f-f932ac05fc49
Tushar2009/DSA
Graph/Cheapest_Flights_with_K_stops.cpp
#include <bits/stdc++.h> using namespace std; int CheapestFLight(int n, vector<vector<int>> &flights, int src, int dst, int K) { // Code here vector<pair<int, int>> adj[n]; for (auto it : flights) { adj[it[0]].push_back({it[1], it[2]}); } //{stops,{node,dist}} queue<pair<int, pair<in...
ALGO
0.999805
5.05399
1cab5fc6-0c9a-4d5d-bc7b-87ce866a65a5
WJ-self/algorithm
.history/acwing/basic/动态规划/计数dp/900_整数划分_20230906120732.cpp
#include<bits/stdc++.h> using namespace std; const int N=1010; int n; int dp[N]; // 容量(n)=i时的最多划分 // dp[j] = dp[j-1] + dp[j-2] + ... + dp[j-i] (j>=i) int main() { cin >> n; dp[0] = 1; for(int i=1; i<=n; i++) { // n个物品 for (int j=i; j<=n; i++) { //容量 dp[j] = (dp[j-i] + dp[j]) % mod; ...
ALGO
0.999986
4.319537
fe026ba3-5f4f-4daf-b922-decea32b44e2
AlNahianFatin/Cplusplus_Basic_Codes
Lab 1/4.Eligibility for admission.cpp
#include<iostream> using namespace std; int main() { int m, p, c, sum1=m+p+c, sum2=m+p; cout<<"Type maths number: "<<endl; cin>>m; cout<<"Type physics number: "<<endl; cin>>p; cout<<"Type chemistry number: "<<endl; cin>>c; if(m>=65 && p>=55 && c>=50 && sum1>=190) { cout<<"Th...
ALGO
0.986358
3.378544
0891ac61-eee2-4e2d-bc5e-29b3e9a65d85
ishandutta2007/codeforces
joisino/normal/390/E.cpp
#include <bits/stdc++.h> #define FOR(i,a,b) for( ll i = (a); i < (ll)(b); i++ ) #define REP(i,n) FOR(i,0,n) #define YYS(x,arr) for(auto& x:arr) #define ALL(x) (x).begin(),(x).end() #define SORT(x) sort( (x).begin(),(x).end() ) #define REVERSE(x) reverse( (x).begin(),(x).end() ) #define UNIQUE(x) (x).erase( unique( AL...
ALGO
0.999864
4.31004
1393c319-927a-47ec-af89-8c80cf1709d8
jvrmaia/exceptions
graph/undirected-euler.cpp
void visit(const Graph &g, vector<vector<int> > &adj,int s,vector<int> &path){ EACH(e, g[s]) if (adj[e->src][e->dst]) { --adj[e->src][e->dst]; --adj[e->dst][e->src]; visit(g, adj, e->dst, path); } path.push_back(s); } bool eulerPath(const Graph &g, int s, vector<int> &path) { int...
ALGO
0.9998
4.410065
3ee18b0a-ed70-40b4-af79-3f902086f903
1005-AsadUllah/DSA-Phitron
module 13(stack)/stack_using_array.cpp
#include <bits/stdc++.h> using namespace std; class myStack { private: vector<int> v; public: void push(int val) { v.push_back(val); } void pop(void) { v.pop_back(); } int top(void) { return v.back(); } int size(void) { return v.size(); ...
ALGO
0.943799
4.165754
3afc99a4-5e96-408e-9d6e-8710544e552c
dreal/dreal3
src/contractor/contractor_pseq.cpp
#include "contractor/contractor_pseq.h" #include <algorithm> #include <atomic> #include <exception> #include <functional> #include <future> #include <initializer_list> #include <iostream> #include <iterator> #include <memory> #include <queue> #include <set> #include <thread> #include <unordered_map> #include <unordere...
ALGO
0.940598
4.811528
0310484f-4d65-434b-a7fb-7140770bc768
w181496/OJ
LeetCode/1002.Find_Common_Characters.cpp
class Solution { public: vector<string> commonChars(vector<string>& A) { vector<int>cnt(26, 1e9); vector<string>ans; for(int i = 0; i < A.size(); ++i) { vector<int>tmp(26, 0); for(int j = 0; j < A[i].size(); ++j) { tmp[A[i][j] - 'a']++; } ...
ALGO
0.99995
5.683149
32831665-2833-46dc-be61-da9fdc3f6d05
Gabrielasl18/CEFET_RJ-PROJETO-DE-ALGORITMOS-COMPUTACIONAIS_2021
lista3/n1.cpp
//RETORNA A MEDIA DOS NUMEROS DO VETOR. #include <iostream> using namespace std; float Mediavet(int inteiros,int vet[], int quantNum) { float media,soma=0; int i; for (i = 1; i <= quantNum; i++) { soma += vet[i]; } for (i = 1; i <= quantNum; i++) { cout << vet[i] << "\n"; } cout << "a soma dos numeros i...
ALGO
0.974417
4.707067
ec9646f4-be56-4f71-bee0-f6235f2b6ec3
Zgmyr/Efficient-Polynomial-Evaluations
EfficientPolyEval.cpp
// Zachary Gmyr // 3130-001 // October 25, 2024 // Project 1: Evaluating Polynomials /* Description: This program uses three different algorithms to evaluate the polynomial P(x) = a_0 + a_1x^1 + a_2x^2 + ... + a_nx^n. (1) Brute Force -> O(n^2) (2) Repeated Squares -> O(nlogn) (3) Horner's Rule -...
ALGO
0.999156
6.300912
6a1b1205-0fb7-46af-b86f-9891bfd9ff6f
Oracynx/Source-Code
Contest/Codeforces/2038/C.cpp
#include <algorithm> #include <cstdio> #include <map> #include <utility> #include <vector> constexpr int MaxN = 2e5 + 5; int n; int p[MaxN]; std::vector<int> v; std::map<int, int> map; inline void solve() { v.clear(); map.clear(); scanf("%d", &n); for (int i = 1; i <= n; i++) { scanf("%d", &...
ALGO
0.999833
3.815962
10305b05-0486-4b6f-b9f8-5102121cb46b
code-fans/books-source
基础算法/第8章_高精度算法/8.2.2高精度幂/data/evolution.cpp
//߾ #include <bits/stdc++.h> using namespace std; const int MAXN=1000; int a[MAXN+1],N,key,ans[MAXN+1]; string s; void Out(int *ans,int i=1) { for(; key!=1 && i<MAXN && ans[i]==0; i++);//key=0,δ1000λ,ʡǰ0 for(; i<=MAXN; ++i) printf("%d",ans[i]); puts(""); } int Mul(int u[],int v[],int ansn[]) //u*v=a...
ALGO
0.999968
3.246631
82f6e475-a8ea-4e7b-a141-94e2f903a654
fkallen/CARE
dependencies/cccl-2.2.0/libcudacxx/libcxx_old/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/set_intersection.pass.cpp
// <algorithm> // template<InputIterator InIter1, InputIterator InIter2, typename OutIter> // requires OutputIterator<OutIter, InIter1::reference> // && OutputIterator<OutIter, InIter2::reference> // && HasLess<InIter2::value_type, InIter1::value_type> // && HasLess<InIter1::value_type, InIte...
TEST
0.941378
7.021585
0490aa61-89bb-42cf-8caa-8b6fd3f34963
dushimsam/deep-dive-into-algorithms
algo-expert-premium/Arrays/apartment_hunting.cpp
#include<bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef vector<vector<int>> vii; vi getDistanceFromEachBlock(vector<unordered_map<string, bool>> blocks, string req){ vi distancesFromEachBlock(blocks.size()); int closestIdx= INT_MAX; // Fill distances from left to right for(int i=0; i < b...
ALGO
0.996447
5.279691
be174de8-21c8-4983-a246-466c2c5e427e
ishandutta2007/codeforces
yfhuang/normal/1301/E.cpp
#include <cstdio> #include <algorithm> #include <cstring> #include <set> #include <iostream> #include <stack> #include <vector> #include <string> #include <map> #include <cmath> #include <queue> using namespace std; int n, m, q; const int maxn = 505; char s[maxn][maxn]; string p = "RGYB"; int pre[4][maxn][maxn]; ...
ALGO
0.999334
4.2234
47212666-b5fa-4731-92d0-51d245a73eb6
vedbaek/r5
Source/Developer/DerivedDataCache/Private/Http/HttpClient.cpp
#include "HttpClient.h" #include "Containers/LockFreeList.h" #include "HAL/Event.h" #include "Memory/MemoryView.h" #include "Misc/AsciiSet.h" #include "ProfilingDebugging/CpuProfilerTrace.h" #include "String/Find.h" namespace UE { FAnsiStringView LexToString(const EHttpMethod Method) { switch (Method) { case EHtt...
WEB
0.93456
7.056594
7159ff3b-1665-491b-9059-d7d9cdb4e084
Mo2Hefny/Competitive_Programming
CodeWars/C++/5 kyu/Greed_is_Good.cpp
#include <vector> int score(const std::vector<int>& dice) { std::vector<int> value = dice; int point[][6]{ {1000, 200, 300, 400, 500, 600},{100, 0, 0, 0, 50, 0} }; int count[6]; int points = 0; for (int i = 0; i < 6; i++) { count[i] = std::count(value.begin(), value.end(), i+1); if (count[i] > 2) { points +...
ALGO
0.99821
5.830771
990988f9-f176-47aa-bec4-dec50ac89e79
sohag16030/BattleOfBrainOnlineJudgeProject
Project/hoj/media/user 1/soln_QXQE3Cm.cpp
#include<bits/stdc++.h> using namespace std; #define sz 1000006 #define EPS 1e-9 #define PI acos(-1.0) #define INF 10000007 #define LLINF 100000000000000007 #define F first #define S second #define pb push_back #define mk make_pair #define all(x) x.begin(),x.end() #define FastIO ios::sync_with_stdio(0); typedef l...
ALGO
0.999954
3.641396
4f64d985-73b9-42d4-9e3f-039cd393a84f
macmir/nnetwork
src/nnetwork_node.cpp
#include "nnetwork/nnetwork_node.hpp" namespace nnetwork { auto custom_qos = rclcpp::QoS(rclcpp::KeepLast(1), rmw_qos_profile_sensor_data); NnetworkNode::NnetworkNode(const rclcpp::NodeOptions & options) : Node("nnetwork", options), neural_network_(3, 2, 2) { srand(static_cast<unsigned>(time(nullptr))); auto cus...
ALGO
0.994622
5.704212
874b3086-e878-47d8-b762-70db44d7750a
Vamsi-027/Pantheon-Assignment3
third_party/proto-quic/src/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
#include <assert.h> #include <algorithm> #include <memory> #include <set> #include <string> #include "clang/AST/ASTContext.h" #include "clang/ASTMatchers/ASTMatchFinder.h" #include "clang/ASTMatchers/ASTMatchers.h" #include "clang/ASTMatchers/ASTMatchersMacros.h" #include "clang/Basic/CharInfo.h" #include "clang/Basic...
TOOL
0.992726
3.286051
9984bca3-b92f-4157-9ba3-01c25a760477
mohit-thakre/DSA
DAY48/Solution143.cpp
#include <iostream> #include <queue> #include <stack> using namespace std; class Node { public: int data; Node *left; Node *right; Node(int val) { this->data = val; this->left = NULL; this->right = NULL; } }; int inorderSuccessor(Node *root, int key) { int success...
ALGO
0.999996
5.65067
812410d3-8ff1-49bc-a737-23e1edb03597
Abhishek-dourbi/dsa-bust
pattern/number-patterns/number-pattern-8/index.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; int i = 1; while(i <= n) { int j = i; while(j > 0) { cout << j << " "; j--; } cout << endl; i++; } } /* n = 4 1 2 1 3 2 1 4 3 2 1 */
ALGO
0.99999
4.679984
8668cb89-b986-41ff-b3f6-935ac449bbaa
Peipeilvcm/CPP_Exercise
practice/查找表TwoSum.cpp
#include<stdio.h> #include<vector> #include<unordered_map> using namespace std; //Two Sum nums,i,jʹnums[i]+nums[j]=target vector<int> twoSum(vector<int>& nums,int target){ //𲽷map unordered_map<int,int> record; for(int i=0;i<nums.size();++i){ int comp = target - nums[i]; if(record.find(comp) != record.end()){...
ALGO
0.999988
4.811333
5df06790-96ba-4131-9eb5-8adc6f072529
jmsman3/C-Language-Week-03-_Part-02
juber.cpp
#include <bits\stdc++.h> using namespace std; int main(){ int n; cin>>n; int a[n]; for(int i= 0; i<n ; i++) { cin>>a[i]; } sort(a, a+n); for(int i= 0; i<n ; i++) { cout<<a[i]<<" "; } return 0; }
ALGO
0.999474
3.92773
c0e36cb8-5d51-43aa-a0e9-a0a9a76e08dd
jongkeshjuit/NMLT_UIT
baitap/bai59/main.cpp
//Bài 59: Hãy kiểm tra số nguyên dương n có phải là số đối xứng hay không #include <iostream> using namespace std; int KiemTraDoiXung(int n); int main() { int n; do { cout<<"\nNhap n: "; cin>>n; }while(n<0 && cout<<"Nhap lai n." ); int check=KiemTraDoiXung(n); } int KiemTraDoiXung(in...
ALGO
0.998824
3.499084
31e9b9bb-bbc4-4c56-b530-bec1e5bbb9ab
TomRiu/Data_Structures_and_Algorithms_PTIT
Stack (Ngăn xếp)/ĐẾM SỐ DẤU NGOẶC ĐỔI CHIỀU.cpp
//#Created by Tôm Riu #include <bits/stdc++.h> #include<iostream> #define endl '\n' #define ll long long //#pragma GCC optimize("Ofast") #define faster() \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); #define fio() \ ...
ALGO
0.998102
4.653678
47cac4aa-55cb-4fd5-82ff-d5e882001e35
zaifee/Course_Codes
DynamicProgramming/coinChange.cpp
class Solution { public: int solveUsingRecursion(vector<int>& coins, int amount){ //base case if(amount == 0){ return 0; } int mini = INT_MAX; //processing for(int i=0; i<coins.size(); i++){ int coin = coins[i]; // valid case ...
ALGO
0.999993
5.989734
033bbc0b-ea7b-4cca-b463-cc717b7c3cc3
ttamx/Competitive-Programming
codeforces/2072B.cpp
#include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; using ll = long long; using db = long double; using vi = vector<int>; using vl = vector<ll>; using vd = vector<db>; using pii = pair<int,int>; using pll = pair<ll,ll>; u...
ALGO
0.999811
4.403735
4fb1dc6f-b1c7-4d4a-a4fd-593d7368e5d3
a01ixxx/ardupilot_redcaps
libraries/AP_Math/location.cpp
/* * this module deals with calculations involving struct Location */ #include <stdlib.h> #include "AP_Math.h" #include "location.h" // return horizontal distance between two positions in cm float get_horizontal_distance_cm(const Vector3f &origin, const Vector3f &destination) { return norm(destination.x-origin....
TOOL
0.923434
5.863018
147eecb4-7cd7-4f91-9f6f-54ca6df59fa6
ChrisBobotsis/data-structures-and-algorithms
advanced-algorithms-and-complexity/week2/energy_values/energy_values.cpp
#include <cmath> #include <iostream> #include <vector> const double EPS = 1e-6; const int PRECISION = 20; typedef std::vector<double> Column; typedef std::vector<double> Row; typedef std::vector<Row> Matrix; struct Equation { Equation(const Matrix &a, const Column &b): a(a), b(b) {} Matr...
ALGO
0.99947
4.081225
72bb297a-8138-4bfb-9638-89046451a308
shakin-emon01/CodeForces-Problem-Solves
N - Char.cpp
#include <iostream> using namespace std; int main() { char x; cin>>x; if(x>='a' && x<='z'){ x=x-32; } else if(x>='A' && x<='Z'){ x=x+32; } cout<<x<<endl; return 0; }
ALGO
0.983479
4.400429
a450cb04-ab34-4080-a211-ecc47a6ad2c2
amaan-272/StriversSheetChallenge
164. Maximum Product Subarray | LC - 152 | Dynamic Programming-1.cpp
//CodeStudio Code #include <bits/stdc++.h> int maximumProduct(vector<int> &arr, int n) { int ans = INT_MIN, maxi {1}, mini {1}; for(int i:arr){ if(i < 0) swap(maxi, mini); maxi = max(i, maxi*i); mini = min(i, mini*i); ans = max(maxi, ans); } return ans; } //LeetCode Cod...
ALGO
0.999985
5.991809
af420428-54f3-4aa9-b0f1-451d2f7f364b
UnsterblichW/Self-Study
Self-Study/main.cpp
#include <iostream> #include <list> //************************************************* ThreadPool *********************************// #include "ThreadPool.h" template<typename T> std::list<T>pool_thread_quick_sort(std::list<T> input) { if (input.empty()) { return input; } std::list<T> result...
TEST
0.969785
4.524992
2ef86d25-2802-40dc-94d6-dfa47f69a48e
vtchitruong/Recursion
Population/population.cpp
#include <bits/stdc++.h> using namespace std; double population(int y) { if (y == 2021) return 98.4E+6; return population(y - 1) * (1 + 0.01); // the growth rate is 1.00 % } int main() { int year; cout << "Enter a year: "; cin >> year; cout << "The population of Vietnam will be " << setpreci...
ALGO
0.997585
4.164977
ac8a4dc9-cf41-42cb-9c33-a84fee1a7437
bsc-com-24-23/Lab6
DynamicAllocation/MemoAllocation.cpp
#include <iostream> using namespace std; int main(){ int numberOfElements = 0; int *DynamicArray = nullptr; //Numbers of Elements user wants to keep cout << "Enter number of elementys you would keep: "<<endl; cin >> numberOfElements; //Dynamic allocation of elements DynamicArray = ne...
TOOL
0.88795
3.087778
8a5c31b9-9c96-45e3-830c-04f6b99cb9c8
muhammedBkf/Competitive-Programming
HackerRank/Problem Solving/Algorithms/Debugging/Zig Zag Sequence.cpp
void findZigZagSequence(vector<int> a, int n) { sort(a.begin(), a.end()); int mid = (n) / 2; // i changed (n-1) to (n) swap(a[mid], a[n - 1]); int st = mid + 1; int ed = n - 2; // i changed (n-1) to (n-2) while (st <= ed) { swap(a[st], a[ed]); st = st + 1; ed = ed - 1; // i changed (ed+1) ...
ALGO
0.999972
3.904823
857437f1-cc55-4f8f-ac15-3ff3363a1779
cv-rmvl/rmvl
extra/detector/src/rune_detector/match.cpp
/** * @file match.cpp * @author RoboMaster Vision Community * @brief match * @version 1.0 * @date 2021-10-04 * * @copyright Copyright 2021 (c), RoboMaster Vision Community * */ #include <unordered_set> #include "rmvl/detector/rune_detector.h" #include "rmvl/group/rune_group.h" namespace rm { static void ma...
ALGO
0.977839
5.668587
9ca8af92-7938-4204-aaaf-2d44224769c3
DrZhang818/my-first-project
Problems/LeetCode/C450/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double db; typedef pair<int,int> PII; typedef unsigned long long ull; const int inf = 1000000000; class Solution { public: struct info { int v, w; }; vector<int> minimumWeight(vector<vector<int>>& e, vector<vector<int>>& Q)...
ALGO
0.999964
4.853242
c616c420-14d3-4f0d-9411-8ccc811c0f97
victorimans/CP_ANS
A_Tricky_Template.cpp
/* #include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(), (x).end() typedef long long ll; typedef unsigned long long int ull; const ll md = 1e9+7; const int ukr = 2e5+1; int read() { int ketek = 0; bool ne=0; register char c = getchar(); while(c == ' ' or c =='\n') c =getchar(); if(c=...
ALGO
0.999807
4.617008
236e3d8b-1112-42c9-86ac-e1eb45924936
dg1223/cs-fundamentals-with-phitron
semester2/data_structures/problem_solving/d_counting_elements.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int n; cin >> n; vector<int> a(n); // a for (int i=0; i<n; i++){ cin >> a[i]; } int count = 0; for (int i=0; i<n; i++){ int next = a[i] + 1; auto it = find(a.begin(), a...
ALGO
0.999934
4.04144
3302dcde-2c63-44f5-9784-507685eafb00
Prathameshp98/dsa_cpp
Lec2 - If-else, while, pattern-1/while.cpp
#include <iostream> using namespace std; int main() { int sum{0}, n, i{1}; cin >> n; while(i<=n){ sum += i; i += 1; } cout << "Sum is " << sum << endl; }
ALGO
0.999704
4.45673
1ec45d73-d947-47e6-8cc7-3e649aa5a28a
Goelshiva1611/Leetcode_Problems
3893-generate-tag-for-video-caption/generate-tag-for-video-caption.cpp
class Solution { public: string generateTag(string caption) { string answer = "#"; int n = caption.size(); int w = 0; for (int i = 0; i < n; i++) { if (caption[i] == ' ') { if (i + 1 < n && caption[i + 1] != ' ' && w != 0) { if (caption...
ALGO
0.999631
5.668783
b560c982-4781-4a57-a07b-73f8df698fef
SouvikChan/-Leetcode_Souvik
732-my-calendar-iii/732-my-calendar-iii.cpp
class MyCalendarThree { public: map<int,int>mp; MyCalendarThree() { } int book(int start, int end) { mp[start]++; mp[end]--; int maxi = 0, sum = 0; for(auto &i : mp) { sum =sum+ i.second; maxi = max(maxi, sum); } return maxi; } }; /** * Your MyCalendarTh...
ALGO
0.999956
5.913516
9759cbfc-54c4-4cee-97a4-1d5d92607607
AbdoWael2003/Graduation-Project-QAgent2.0-
FlowChartGeneration/CPPSamples/Sample1105/sample_code1105.cpp
#include <iostream> #include <string> int digits(int n) { int product = 1; int odd_count = 0; std::string str_n = std::to_string(n); for (char digit : str_n) { int int_digit = digit - '0'; if (int_digit % 2 == 1) { product = product * int_digit; odd_count++; ...
ALGO
0.999806
5.966404
7e12efc5-b4ba-41ac-9a50-577b552b6abe
Juniadul/CodeChef
Fever(contest).cpp
#include <iostream> using namespace std; int main() { int t; cin>>t; while(t--){ int x; cin>>x; if(x>98){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } } return 0; }
ALGO
0.999661
4.097256
f3d2d3d7-9a0f-4f42-be36-d121b4301475
Sparsa/bhim
include/boost/geometry/example/06_b_transformation_example.cpp
#include <ctime> // for std::time #include <algorithm> #include <fstream> #include <iostream> #include <limits> #include <sstream> #include <boost/geometry/geometry.hpp> #include <boost/geometry/geometries/point_xy.hpp> #include <boost/geometry/geometries/polygon.hpp> #include <boost/geometry/algorithms/centroid.hpp> ...
TOOL
0.924287
7.059472
2d817141-ce62-44aa-8953-b09e7c09f569
AmishaKP/bmicalculator
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
6cbb44bf-7484-4288-bdc9-9453b318d199
qzylalala/CSP
201903/4.cpp
// 90 分 #include <iostream> #include <cstring> #include <algorithm> #include <sstream> using namespace std; const int N =10010; int n, T; bool solve(vector<vector<string>>& g, vector<vector<vector<int>>>& st) { vector<int> idxs(n, 0); // 维护每行当前走到的位置 while(true) { vector<int> nidxs = idxs; ...
ALGO
0.999831
4.119185
10cac528-86e0-4b5a-810c-97ad97f09c63
Satish-Raut/DSA-in-C-
code_78_Vector.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ //Searching element: vector<int>v1 = {11, 22, 43,22, 5, 8}; sort(v1.begin(),v1.end()); cout<<binary_search(v1.begin(), v1.end(), 5)<<endl; //Find the index of an element: cout<<find(v1.begin(), v1.end(), ...
ALGO
0.998327
4.564228
e3d1030a-0f75-4bf9-83d8-dd1fb2e01bd1
Wibben/WCIPEG
ccc03s1.cpp
#include <iostream> using namespace std; int main() { int cur=1,roll; while(cur!=100) { cin >> roll; if(roll==0) { cout << "You Quit!" << endl; return 0; } cur+=roll; if(cur==9) cur = 34; else if(cur==40) cur = 64; else if(cur==54) cur = 19; else if(cur==67) cur = 86; else...
ALGO
0.999516
3.562476
54a7df31-d96c-471f-8479-5d8202e9a701
zeynepcindemir/Psychology-Project
PlayMain.cpp
#include <iostream> #include <fstream> #include <cmath> #include <iomanip> #include <string.h> #include "World2D.hpp" #include "Agent2D.hpp" #include "Target.hpp" #include "Vector.hpp" using namespace std; // distanceVec method static Vector distanceVec(Target t, Agent2D a) { return Vector(t.getX() - a.getX(), t.g...
ALGO
0.999451
4.331742
c5b74d37-3fee-4580-a824-6f1d4f5af7e3
mrakotosaon/diff-surface-triangulation
postprocessing/flip-geodesics-demo/deps/geometry-central/src/surface/vector_heat_method.cpp
#include "geometrycentral/surface/vector_heat_method.h" namespace geometrycentral { namespace surface { VectorHeatMethodSolver::VectorHeatMethodSolver(IntrinsicGeometryInterface& geom_, double tCoef_) : tCoef(tCoef_), mesh(geom_.mesh), geom(geom_) { geom.requireEdgeLengths(); geom.requireVertexLumpedMassMatr...
ALGO
0.999222
6.873047
9259b5d2-743d-4121-afc1-03d0a1198354
mlrlima/programmingSolutions
beecrowd/bee1221.cpp
#include<iostream> #include<map> using namespace std; map<long long, bool> primo; void calcular(long long num){ if(num <2 || num%2==0){ return; } for(long long i=3;i*i<num;i+=2){ //cout<<it.first<<endl; if(num%i==0){ return; } } primo[num]=true; } in...
ALGO
0.999648
4.039664
2e7bf35a-0781-4e69-82f8-460ee12f9f14
onecode369/CompetitiveProgramming
CodeChef/IARCSJUD/TILES01.cpp
#include <bits/stdc++.h> #define DEBUG(x) cerr << #x << " " << x << endl using namespace std; int main(){ #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); #endif ios::sync_with_stdio(0); cin.tie(0);cout.tie(0); int n; cin >> n; int arr[n+1]; arr[0] = 1; arr[1] = 1; f...
ALGO
0.999959
4.165598
16c9bc7b-90b5-4875-b65e-534a62c51d1a
r2sakib/uni
IP/Misc/nested_array.cpp
#include<iostream> using namespace std; int main(){ char arr[2][4]; cout<<"Enter the elements of the array:"<<endl; for(int row = 0; row < 2; row++) { for(int col = 0; col < 4; col++) { cin>>arr[row][col]; } } cout<<"Inputted Elements:"<<endl; for(int ro...
ALGO
0.988638
3.230372
a0769d70-38af-4a56-a55f-93bb035ae1ee
pondonwanya/NewRepo36
Project1/Project1/Source.cpp
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <conio.h> int main() { int m[4][5], sum_i[4], sum_j[5], total = 0; printf("Matrix 4x5 : \n\n"); for (int i = 0; i <= 3; i++) { printf("Row %d : \n", i); for (int j = 0; j <= 4; j++) { printf("Input Matrix[%d][%d] : ", i, j); scanf_s("%d", &m[i][j]...
ALGO
0.999656
3.506874
0d456ed5-eade-40bb-a377-eb11c8322597
Upasana-Shakya/LeetCode-Problem
1656-count-good-triplets/count-good-triplets.cpp
class Solution { public: int countGoodTriplets(vector<int>& arr, int a, int b, int c) { int n = arr.size(); int count = 0; for(int i=0 ; i<n-2 ; i++){ for(int j = i+1 ; j<n-1 ; j++){ for(int k=j+1 ; k<n ; k++){ if((abs(arr[i] - arr[j]) <= a) &...
ALGO
0.99978
5.960937
20af6e4f-ff43-44e4-b674-78d3ee94b35f
vanthang10tin/Project1
Tuan4/STORE_SEARCH_STRING.cpp
#include <bits/stdc++.h> #define Task "bai1" #define int long long #define maxn 1000005 using namespace std; int n, a[maxn]; map<string, int> dd; main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); if (fopen(Task".inp", "r")) { freopen(Task".inp", "r", stdin); freopen(Tas...
ALGO
0.999069
3.748411
ba9b7b57-b0e1-403b-9f65-7c44b2fd0b06
Stefanstud/leetcode-env
data/leetcode_solutions/solutions/1467. Probability of a Two Boxes Having The Same Number of Distinct Balls/1467.cpp
enum class BoxCase { kEqualBalls, kEqualDistantBalls }; class Solution { public: double getProbability(vector<int>& balls) { const int n = accumulate(begin(balls), end(balls), 0) / 2; return cases(balls, 0, 0, 0, 0, 0, n, BoxCase::kEqualDistantBalls) / cases(balls, 0, 0, 0, 0, 0, n, BoxCase::kEqu...
ALGO
0.999277
5.94143
2c18ecc8-bce2-4c19-963d-75cd62f65b0d
bfeng/CryptoGRU
third_party/cryptoTools/thirdparty/linux/miracl/miracl_osmt/source/ecsgen2.cpp
/* * Proposed Digital Signature Standard * * Elliptic Curve Variation GF(2^m) - See Dr. Dobbs Journal April 1997 * * This program generates one set of public and private keys in files * public.ecs and private.ecs respectively. Notice that the public key * can be much shorter in this scheme, for the s...
ALGO
0.995605
5.078191
11a58792-eda8-4ca3-9ce8-5bbf7fe97954
spfrood/CPP-references
Book/GaddisSourceCode/Chapter 10/Pr10-13.cpp
// This program uses the function nameSlice to cut the last // name off of a string that contains the user's first and // last names. #include <iostream> using namespace std; void nameSlice(char []); // Function prototype int main() { const int SIZE = 41; // Array size char name[SIZE]; // To hold the user...
TOOL
0.979927
4.911023
87b98278-488c-41cd-adb9-9067a298fce6
VishalSoni2005/OpenGL
PR/chit2.cpp
//left click on two diagonal points #include <GL/glut.h> #include <stdlib.h> #include<iostream> using namespace std; void displayPoint(int x, int y) { glColor3f(0, 1, 0); glPointSize(2); glBegin(GL_POINTS); glVertex2i(x, y); glEnd(); } float x01, x2, y01, y2; int ch; void SimpleLine(float x1, float ...
ALGO
0.972494
4.697361
fd2a61f8-3ec6-4682-a1a1-78f033319d05
UnivSchool/rexec
rexec/analyse/complete/src_dos/compl.cpp
/* completion - (Unix-'where') TAB completion on DOS, Version 0.0 This utility only writes on the 'tab-cache' ! */ #include "macro.h" #include "targ.h" #include "tdirw32.h" #include "main.h" #define FNAME "compl" int processPath (TyListStr& O, char* pathStr, char* wildCard) { if ( pathStr==0 ) return 0; TShortBuffe...
TOOL
0.869714
4.719846
7e59f65e-4425-4a4b-8de6-55f0128c961a
yanshiwei/leetcode-go
cpp/454.cpp
class Solution { /* 给你四个整数数组 nums1、nums2、nums3 和 nums4 ,数组长度都是 n ,请你计算有多少个元组 (i, j, k, l) 能满足: 0 <= i, j, k, l < n nums1[i] + nums2[j] + nums3[k] + nums4[l] == 0 */ public: int fourSumCount(vector<int>& nums1, vector<int>& nums2, vector<int>& nums3, vector<int>& nums4) { //A 和 B,我们使用二重循环对它们进行遍历,得到所有...
ALGO
0.999857
5.987864
19bb4917-d48c-412c-9c99-b7e8d15bfae6
BaBa0525/competitive-programming
qualification/monotone.cpp
#include <cmath> #include <iostream> #include <string> #include <vector> using ull = unsigned long long; class BigInt { public: std::vector<int> digits; ull get_last_n_digits(int n) { ull val = 0; for (int i = 0; i < n; i++) { if (i == digits.size()) { return val; } val += digi...
ALGO
0.999742
4.314391
510af0c4-ebf1-414a-b672-ea336c1a4e5a
ljb233/android_packages_apps_DotOTA
jni/boost_1_57_0/libs/msm/doc/HTML/examples/SimpleWithFunctors.cpp
#include <vector> #include <iostream> // back-end #include <boost/msm/back/state_machine.hpp> //front-end #include <boost/msm/front/state_machine_def.hpp> // functors #include <boost/msm/front/functor_row.hpp> #include <boost/msm/front/euml/common.hpp> // for And_ operator #include <boost/msm/front/euml/operator.hpp> ...
TOOL
0.862108
6.584952
9b3dfe13-15fa-44e2-8bf7-4bc058b1f315
pkprajapati7402/Cpp-Notes
43-Binary-Decimal.cpp
// C++ Program to convert Binary number into decimal. #include <iostream> #include <cmath> using namespace std; int main(){ int n, rem = 0, p = 0, total = 0; cout << "Enter Binary Number: "; cin >> n; while(n != 0){ rem = n % 10; total += (rem * pow(2,p)); p++; n /= 10; ...
ALGO
0.999026
5.880884
991d4883-94d3-4a75-9a57-4abbe8915ddd
SolutionClinic/Hostile-Takeover-formaly-known-as-Warfare-Incorporated
mpshared/decompress.cpp
#include "mpshared/decompress.h" #include "mpshared/misc.h" #include "inc/rip.h" #include <string.h> namespace wi { word DecompressChunk(byte **ppbCompressed, byte *pbDecompressed, byte *pbCacheEnd, word cbMax) { byte *pbSrc = *ppbCompressed; byte *pbDst = pbDecompressed; bool fChunk = true; if (pb...
ALGO
0.981109
4.626568
3b89556f-8672-4774-8c95-d42ef105726e
amitabhsoni2004/DSA-PRACT-IN-PYTHON
prac-1.cpp
// perform addition, subtraction,division ,multiplication, and transpose of 2D matrix #include<iostream> // Include the iostream library for input and output const int rows = 2; // Define the number of rows in the matrix const int cols = 2; // Define the number of columns in the matrix using namespace std; // Use th...
ALGO
0.999031
4.99916
7f0dcd7f-1e8f-4b2e-a00d-24b05e66491a
codulluiandrei/pbinfo
pbinfo-3778/main.cpp
#include <cstdio> #include <vector> #include <cstring> using namespace std; const int NMAX = 100000; const int VMAX = 1000000; int v[NMAX + 5], f[VMAX + 5], n; vector <int> d[NMAX + 5]; vector <int> sol; int gcd(int a, int b) { int r; while (b != 0) { r = a % b; a = b; b = r; } r...
ALGO
0.999945
3.417406
1d2742a3-f198-42ef-ae4b-8e449d182609
TenaCity23/CPP
OOP_projects/ComplexNumbers.cpp
//============================================================================ // Name : ComplexNumbers.cpp // Author : TenaCity23 // Description : Calculations on complex numbers using a Class function //============================================================================ #include <iostream> usi...
ALGO
0.956363
4.721411
27e975a4-d558-444b-99c2-d838441ad486
mgarson/multi-stage-compiler
3-static-semantics/scanner.cpp
//CS4280 Project 3 //Author: Maija Garson //Date: 04/21/2025 //Description: Contains functions and structure to read input from a file, process characters while determining their types, and use an finite state automation table to classify characters and generate different tokens based on their found states. #include "...
ALGO
0.883179
6.390071
f1066d4d-2c6d-4eeb-b440-b535c743fceb
sreakdgeek/Model-Predictive-Control
src/Eigen-3.3/bench/sparse_transpose.cpp
//g++ -O3 -g0 -DNDEBUG sparse_transpose.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out // -DNOGMM -DNOMTL // -DCSPARSE -I /home/gael/Coding/LinearAlgebra/CSparse/Include/ /home/gael/Coding/LinearAlgebra/CSparse/Lib/libcsparse.a #ifndef SIZE #define SIZE 10000 #endif #ifndef...
ALGO
0.982701
5.110691
6fe8cc62-c738-40ea-b621-9a0fc592040a
lammps-qmdff/lammps-qmdff
lammps-modified/src/MOLECULE/pair_tip4p_cut.cpp
/* ---------------------------------------------------------------------- Contributing author: Pavel Elkind (Gothenburg University) ------------------------------------------------------------------------- */ #include <math.h> #include <stdlib.h> #include "pair_tip4p_cut.h" #include "atom.h" #include "force.h" #inc...
ALGO
0.997912
5.944557
b5cadadb-3ce3-445d-967b-57ec964ce1be
wyhong3103/codenection-2023
final/source-codes/school-supplies.cpp
#include <bits/stdc++.h> using namespace std; const int INF = 1e9; int n; map<string, int> vit; void solve() { cin >> n; int ans = INF; for (int i = 0; i < n; i++) { int c; string s; cin >> c >> s; sort(s.begin(), s.end()); if (vit.count(s) == 0) { vit...
ALGO
0.999715
4.278623
eac25c59-8d74-4251-a351-8a3c70b03871
r0cket007/450_DSA_Question
Arrays/next_permutation.cpp
/* Count Inversions Link: https://practice.geeksforgeeks.org/problems/inversion-of-array-1587115620/1 Q. Given an array of integers. Find the Inversion Count in the array. Inversion Count: For an array, inversion count indicates how far (or close) the array is from being sorted. If array is already sorted t...
ALGO
0.999783
5.056273
36b787ba-576a-429d-831f-f51014520139
saif-karnawi/Depth-and-Breadth-First-Search-Algorithms
CODE/pa2/priority.cpp
/* * File: priority.cpp * Description: Implements a priority ordering structure specially made for determining the * order of neighbours visited in PA2's filler::fill function. * Note that this does NOT serve the same purpose as the stack/queue * ordering structure which y...
ALGO
0.994059
6.20393
269b5e11-666b-41ff-a9f4-8212b1f7a9f5
princegoyal-dev/Coding-Ninja-Data-Structure-using-Cpp-Assignment
recursion 1b/stringToNum.cpp
//Program to convert given string to a number //Sample input : "12321" //Sample output : 12321 #include<bits/stdc++.h> using namespace std; int strToNum(string strNum) { if(strNum.length() == 0) { return 0; } int num = strToNum(strNum.substr(1, strNum.length() - 1)); int firstDigit = str...
ALGO
0.998848
5.579366
ea3bb97a-6b16-4dcd-a2ab-fe4207456638
jbellogo/Algorithms
data-structures/strings/problems/executionTime/question.cpp
#include <vector> #include <iostream> #include <cassert> using namespace std; string ltrim(const string &); string rtrim(const string &); /* * Complete the 'getMinimumOperations' function below. * * The function is expected to return an INTEGER. * The function accepts following parameters: * 1. INTEGER_ARRAY e...
ALGO
0.999904
4.796206
9d86115c-a9c4-4b9b-9857-608731a19ebc
Scony/brainfuck-evolution
src/Interpreter.cpp
#include <stack> #include "Interpreter.hpp" using namespace std; string Interpreter::interpret(string & code) { Memory memory; int hashLen = code.length(); int hash[hashLen]; for(int i = 0; i < hashLen; i++) hash[i] = 0; stack<int> hill; string out = ""; for(int i = 0; i < code.length(); i++) ...
ALGO
0.980446
4.653833
759a0292-96de-4b12-8bff-4abd09347efe
zavodil/ton-test-liteclient
crypto/ellcurve/Montgomery.cpp
#include "ellcurve/Montgomery.h" #include <assert.h> #include <cstring> namespace ellcurve { using namespace arith; class MontgomeryCurve; void MontgomeryCurve::init() { assert(!((a_short + 2) & 3) && a_short >= 0); } void MontgomeryCurve::set_order_cofactor(const Bignum& order, int cof) { assert(order > 0); ...
ALGO
0.992387
6.374845
1c9f504b-dc7e-4da0-8adc-eab89b78a21f
kevinlimapena/flutter_TensorFlow
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
561e701a-62a5-4ac7-8351-db303562c521
ishandutta2007/codeforces
abc864197532/normal/54/C.cpp
#include <bits/stdc++.h> using namespace std; #define lli long long int #define mp make_pair #define pb push_back #define eb emplace_back #define test(x) cout << "Line(" << __LINE__ << ") " #x << ' ' << x << endl #define printv(x) {\ for (auto i : x) cout << i << ' ';\ cout << endl;\ } #define pii pair <int, int> #de...
ALGO
0.999206
3.869341
107add4b-5b21-4296-9562-802a34762725
jtm0609/SmartSignageApp
ML/dlib-19.19/examples/learning_to_track_ex.cpp
/* This example shows how you can use the dlib machine learning tools to make an object tracker. Depending on your tracking application there can be a lot of components to a tracker. However, a central element of many trackers is the "detection to track" association step and this is the part of the ...
ALGO
0.979313
7.955399
15b7b510-fdd9-4ee2-a410-3af0532634bb
TanRai/Online_Judge_Solves
Leetcode/144. Binary Tree Preorder Traversal.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.999991
6.23584
b163b5f9-9673-4aa0-9e3d-dbe59887b9ac
jatakchatterjee12/practice_problems
Arrays/Binary Search/Search Insert Position.cpp
//************************************** C++ **************************************// //Lower bound Concept class Solution { public: int searchInsert(vector<int>& nums, int target) { // lower bound code int n = nums.size(); int l = 0; int h = n-1; int ans = n; whil...
ALGO
0.999833
6.556921
b465758e-4cf8-4ab2-a4d7-4fa52b52cfe4
funkey/sopnet
sopnet/sopnet/inference/SegmentationCostFunction.cpp
#include "SegmentationCostFunction.h" #include <imageprocessing/ConnectedComponent.h> #include <sopnet/segments/EndSegment.h> #include <sopnet/segments/ContinuationSegment.h> #include <sopnet/segments/BranchSegment.h> #include <sopnet/slices/Slice.h> #include <util/ProgramOptions.h> logger::LogChannel segmentationcost...
ALGO
0.989398
6.823887
55a67caa-a9ec-432e-acc2-e99897a04a5e
lmenigau/irc
utils.cpp
#include "utils.hpp" #include <cstdarg> #include <iostream> #include <sstream> #include <string> #include "channel.hpp" #include "client.hpp" #include "ircserv.hpp" #include "messageBuilder.hpp" void remove_backslash_r( std::string& c ) { size_t idx = c.find( '\r' ); if ( idx != std::string::npos ) c.erase( idx, 1...
TOOL
0.920143
4.845407
404531ad-89ba-4f33-92ba-269acd1288a9
sizzle0121/leetcode
Top 100 Liked Questions/p114-flatten binary tree to linked list.cpp
/* Preorder traversal Use a pointer to connect all TreeNodes with preorder traversal Since we travel in preorder way, the return pointer will be the tail of the linked list which should be the preorder of the original tree so we only need to keep connecting nodes to its right Time complexity: O(n) Space complexi...
ALGO
0.999987
5.400301
401915f0-2251-4c01-b246-961a9d1f192e
srisatish/openjdk
jdk/src/share/native/sun/font/layout/CanonShaping.cpp
#include "LETypes.h" #include "LEGlyphStorage.h" #include "CanonShaping.h" #include "GlyphDefinitionTables.h" #include "ClassDefinitionTables.h" void CanonShaping::sortMarks(le_int32 *indices, const le_int32 *combiningClasses, le_int32 index, le_int32 limit) { for (le_int32 j = index + 1; j < limit; j += 1) { ...
TOOL
0.989502
6.551583
02a8e3c4-388e-48d0-92b6-90ab192a055c
slam-code/cpp
cpp-Concurrency-in-Action-C++并发编程实战/ch4/listing_4.6.cpp
#include <iostream> #include <future> int N=1000000000; int find_the_answer_to_ltuae() { for (int i = 0; i <N ; ++i) { i++; } return 42; } void do_other_stuff() { for (int i = 0; i < N; ++i) { i++; } } /*future:针对一次性事件. * std::async启动一个异步任务,返回一个std::future对象, * 此对象持有最终的返回...
TOOL
0.96226
4.00156
049ffb91-6409-42ff-a713-72a3d1519db3
marysaka/mina32-llvm
libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/binary_transform.pass.cpp
// <algorithm> // template<InputIterator InIter1, InputIterator InIter2, class OutIter, // Callable<auto, const InIter1::value_type&, const InIter2::value_type&> BinaryOp> // requires OutputIterator<OutIter, BinaryOp::result_type> && CopyConstructible<BinaryOp> // constexpr OutIter // constexpr after C...
TEST
0.988466
6.919359
ceee3210-81f4-4cc5-91be-718115b88173
esl000/CustomUE4VolumeRaymarching
Engine/Plugins/Experimental/ProxyLODPlugin/Source/ThirdParty/UVAtlasCode/UVAtlas/isochart/barycentricparam.cpp
#include "pch.h" #include "isochartmesh.h" #include "sparsematrix.hpp" using namespace Isochart; using namespace DirectX; namespace { const size_t BC_MAX_ITERATION = 10000; class CBoundaryIter { private: uint32_t m_dwInit; uint32_t m_dwPrev; uint32_t m_dwCurr; ISOCHART...
ALGO
0.966911
6.483991