uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
86f883e7-89f9-469d-b884-78b6a113c328
FelipeGJofre/CS395T_Term_Project
gem5/src/systemc/tests/systemc/misc/sim_tests/biquad/biquad3/delay_line.cpp
/***************************************************************************** delay_line.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /*************************************************************************...
ALGO
0.986091
5.923184
cd8413cb-bb64-4884-82ec-9d3d4d0afe15
matthewmazzuca/bridge-construction
finite_element_analysis/contrib/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_maxnorm.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { MatrixXf mat(2,4); mat << 1, 2, 6, 9, 3, 1, 7, 2; MatrixXf::Index maxIndex; float maxNorm = mat.colwise().sum().maxCoeff(&maxIndex); std::cout << "Maximum sum at position " << maxIndex << std:...
ALGO
0.999832
4.220459
476f31a5-4d64-43af-93aa-b16d3c8e9648
codit04/8ca1
sum.cpp
#include <iostream> #include <omp.h> int main() { int n = 1000000; // Example: Sum of the first 1,000,000 numbers long long sum = 0; #pragma omp parallel for reduction(+:sum) for (int i = 1; i <= n; ++i) { sum += i; } std::cout << "Sum of the first " << n << " numbers is: " << sum << ...
ALGO
0.999886
4.861754
a4a2dba7-3bb7-4ed4-bf99-8816cc702e10
HUMANIAM/Algorithms_DataStructure_Specialization
Genome Assembly/W2/eulerian_cycle.cpp
#include <iostream> #include <string> #include <queue> #include <map> #include <vector> #include <set> #include <algorithm> #include <iterator> #include <sstream> #include <stdio.h> #define fora(i, f, t) for(int i = f; i<t; i++) using namespace std; typedef vector<vector<int>> Graph; int find_start_vertex(const map<i...
ALGO
0.999982
3.957277
291474dd-c42c-4ed4-9486-27da8463e375
muxu12/recursion-lab-task-2
recursion8.cpp
#include <stdio.h> int reverseNumber(int num, int reversedNum) { if (num == 0) { return reversedNum; } else { reversedNum = (reversedNum * 10) + (num % 10); return reverseNumber(num / 10, reversedNum); } } int main() { int num, reversedNum; printf("Enter a number: "); ...
ALGO
0.999767
5.553195
3fb73319-0c86-4f0d-8798-91c4747741db
khushi4452/Practice_Programs
Bubblesort.cpp
#include<iostream> using namespace std; int main() { int arr[1000]; int n; cout << "Enter the size of the array: "; cin >> n; cout << "Enter the elements: "; for(int i = 0; i < n; i++) { cin >> arr[i]; } for(int i = 0; i < n-1; i++) { for(int j = 0; j < n-i-1; j++) { ...
ALGO
0.999872
4.433658
6f816242-3ddd-4c57-9260-5109862e257c
ngthanhtrung23/CompetitiveProgramming
codeforces/488/E.cpp
#include <set> #include <map> #include <list> #include <cmath> #include <queue> #include <stack> #include <cstdio> #include <string> #include <vector> #include <cstdlib> #include <cstring> #include <sstream> #include <iomanip> #include <complex> #include <iostream> #include <algorithm> #include <ctime> #include <deque...
ALGO
0.999937
4.033092
5995423f-5cc4-4aa2-9e7e-e5b7332bcee2
commonapi-someip/boost_1_71_0
libs/fusion/example/performance/inner_product2.cpp
#include <boost/array.hpp> #include <boost/timer.hpp> #include <boost/fusion/algorithm/iteration/accumulate.hpp> #include <boost/fusion/algorithm/transformation/transform.hpp> #include <boost/fusion/container/vector.hpp> #include <boost/fusion/algorithm/transformation/zip.hpp> #include <boost/fusion/sequence/intrinsic...
TEST
0.99203
6.179477
edb8ca64-64fb-4d40-8c70-a6988d1a226f
somin-narain/C-
prime.cpp
#include <iostream> using namespace std; int main() { int num,i,f; cout<<"Enter a number "<<endl; cin>>num; f = 0; for(i = 2;i<num/2;i++) { if(num % i == 0) { f = 1; break; } } if(f == 1) { cout<<"number is not prime"<<endl; } else { cout<<"number is prime ...
ALGO
0.999093
3.072088
e3e89c95-aa30-4b43-9fc7-3bbfa53874ac
ishandutta2007/codeforces
theoneyouwant/normal/479/C.cpp
#include <iostream> #include <algorithm> #include <utility> using namespace std; int main() { int n; cin>>n; long long int x,y; pair <long long int,long long int> a[n]; for(int i=0;i<n;i++) { cin>>x>>y; a[i] = make_pair(x,y); } x=0; sort(a,a+n); for(int i=0;i<n;...
ALGO
0.999869
3.926798
fd4bf6b6-6b64-490b-b474-358e6aab50f9
Omkar11543/CSA1409-Compiler-Design
LA ID OP CO.cpp
#include <stdio.h> #include <ctype.h> #include <string.h> int main() { int i, ic = 0, m, cc = 0, oc = 0, j, n; char b[30], op[30], id[30]; int co[30]; printf("Enter the string:"); scanf("%s", b); n = strlen(b); for (i = 0; i < n; i++) { if (isspace(b[i])) { continue;...
ALGO
0.993374
3.203601
561ccd5c-6d6c-4b35-9c6c-e9b66a867990
menesesj6/ie0217
Previos/Previo3/EncabezadoYFuente.cpp
#include <iostream> #include "sum.hpp" using namespace std; int main() { int num1 = 5; int num2 = 3; int result = sum(num1, num2); cout << "El resultado de " << num1 << " + " << num2 << " es igual a: " << result << endl; return 0; }
ALGO
0.994744
5.026021
9f486e9d-3424-4bf3-b7ed-374f387c9fc1
Michaelkedik/Dynamic-Rule-Caching
Previous Work/NetAction_2021/src/stateful-bmv2/targets/simple_switch/tests/utils.cpp
/* * Antonin Bas (<EMAIL>) * */ #include <chrono> #include <string> #include <vector> #include <algorithm> // for std::copy, std::min #include "utils.h" NNEventListener::NNEventListener(const std::string &addr) : addr(addr), s(AF_SP, NN_SUB) { s.connect(addr.c_str()); int rcv_timeout_ms = 100; s.setsoc...
TOOL
0.88608
6.527719
28308403-14c2-4d2b-85fc-37c8b078b16a
shunr/competitive-programming
DMOJ/ds4.cpp
#include<bits/stdc++.h> using namespace std; struct node { int val; int size; int height = 0; node* left; node* right; }; node* make_node(int x) { node* n = new node(); n->val = x; n->left = n->right = NULL; n->size = 1; n->height = 0; return n; } node* get_min(node* root) { for (;root->left != NULL; roo...
ALGO
0.999985
4.11239
1a127557-b61e-43bf-a03b-88b02819b5d7
Vill21/cipher-util
third_party/boost_1_70_0/libs/math/example/naive_monte_carlo_example.cpp
#include <boost/math/quadrature/naive_monte_carlo.hpp> #include <iostream> #include <iomanip> #include <limits> #include <cmath> #include <thread> #include <future> #include <string> #include <chrono> #include <boost/math/special_functions/pow.hpp> #include <boost/math/constants/constants.hpp> using std::vector; using...
ALGO
0.995064
6.391666
b33e78b9-1f36-4c7a-b538-6a8bca5f7798
Raptor-Ryu/kyoupuro
Atcoder/ABC/61/B.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n,m; cin >> n >> m; vector<int> vec(m*2); vector<int> count(n); for(int i=0; i<m*2;i++){ cin >> vec.at(i); for(int j=1; j<=n;j++){ if(vec.at(i) == j){ count.at(j-1)++; } } } for(int i=0; i<n; i++){ ...
ALGO
0.999958
3.888398
80a06d2d-6273-4a24-8c4b-32b1222eceb9
aDDM-Toolbox/ADDM.cu
sample/addm_mle.cpp
#include <iostream> #include <vector> #include <fstream> #include <addm/cuda_toolbox.h> // Location of the aDDM simulations. const std::string SIMS = "results/addm_simulations.csv"; // Location to save the computed likelihoods to. const std::string SAVE = "results/addm_mle.csv"; // Parameter ranges. Change as desir...
ALGO
0.994517
6.744643
2a5528a0-8281-4b0b-8c5f-dbf1e6b2e701
bingps/llvm-project
clang-tools-extra/clang-tidy/utils/OptionsUtils.cpp
#include "OptionsUtils.h" #include "llvm/ADT/StringExtras.h" namespace clang { namespace tidy { namespace utils { namespace options { static const char StringsDelimiter[] = ";"; std::vector<StringRef> parseStringList(StringRef Option) { Option = Option.trim().trim(StringsDelimiter); if (Option.empty()) retur...
TOOL
0.974217
7.42374
5e5b0839-4372-4c83-a103-d249c590ca6f
ritikbanger/Hacktoberfest2022-DSA
28. Codechef Problems/CodeChef/CCSTART2/CodeChef_BUYPLEASE_Solved.cpp
/* -------------------------------------------------------------------------- */ /* Buy Please Problem Code: BUYPLSE */ /* -------------------------------------------------------------------------- */ /**Chef went to a shop and buys a pens and b pencils. * Each pen costs x u...
ALGO
0.998762
3.735286
54a88096-8a80-4a88-9297-3daf200a5a6f
jun-pac/PS
240202/3set/D.cpp
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define cediv(a,b) ((a)%(b)==0?((a)/(b)):((a)/(b))+1) #define rng(i,a,b) for(int i=int(a);i<=int(b);i++) #define rep(i,b) rng(i,0,b-1) #define gnr(i,b,a) for(int i=int(b);i>=int(a);i--) #define per(i,b) gnr(i,b-1,0) #define pb push_back...
ALGO
0.999958
3.915566
f60d93f5-4c62-422d-833b-1563a61d7566
ssahoo11742/CompetetiveProgramming
CODEFORCES/800/1806A.cpp
#include<bits/stdc++.h> #define ll long long #define fir first #define sec second #define pii pair<int,int> using namespace std; const int maxn=500005; const int inf=0x3f3f3f3f; signed main() { ios::sync_with_stdio(false); cin.tie(0),cout.tie(0); int T; cin>>T; while(T--) { int a,b,c,d; cin>>a>>b>>c>>d; if...
ALGO
0.998906
3.69736
408ae255-6468-4474-b91c-45bc27f714c7
morim3/atcoder
contest/typical90/i.cpp
// TODO #include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int i=0; i<(n); ++i) typedef long long ll; const int mod = 1000000007; //10**9+7 template <class T=int> T in(){ T x; cin >> x; return (x);} int N; vector<pair<double, double>> input; signed main(){ cin >> N; REP(i, N){ inp...
ALGO
0.999856
4.137833
343a1d4b-cd90-4d12-85d5-d33221e702fc
pathaksumanjeet18/DSA_CODES
StacxNQDQ/stackStl.cpp
#include <iostream> #include <stack> using namespace std; int main(){ stack<int> s; for(int i = 0;i<=5;i++){ s.push(i); } while(!s.empty()){ cout<<s.top()<<" "; s.pop(); } return 0; }
ALGO
0.999034
3.806907
ce4bd47f-1998-4151-b0ca-6f0399d23aa3
AllenJWZhu/LlamaInfer
kuiper/source/op/kernels/cpu/emb_kernel.cpp
#include "emb_kernel.h" namespace kernel { void emb_kernel_normal(const tensor::Tensor& input, const tensor::Tensor& weight, const tensor::Tensor& output, int32_t vocab_size, void* stream) { CHECK(!input.is_empty()); CHECK(!weight.is_empty()); const int32_t input_num = static_cast<int32_t>...
ALGO
0.984014
6.918243
208bc7d9-7bef-4164-a715-8af2506ef07c
DemonB95/Code
A_EhAb_AnD_gCd.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long long int lli; #define pb push_back #define va v.begin(), v.end() #define vd v.begin(), v.end(), greater<ll>() #define vi vector<int> #define vll vector<long long> #define pb push_back #define pii pair<int, int> #define si set<int> #define ...
ALGO
0.999702
4.433032
8ede0350-e5a1-41d3-8a76-4b7c185f8df2
Melell/Animation-Engine
cs562_miguel.echeverria/src/Components/Particles/ClothConstraints.cpp
/** * @file ClothConstraints.cpp * @author Miguel Echeverria , 540000918 , <EMAIL> * @date 2020/15/12 * @brief Contains the specific constraints that need to be solved for a cloth simulation. * * @copyright Copyright (C) 2020 DigiPen Institute of Technology . */ #include "pch.h" #include "ClothConstraints.h" #include ...
ALGO
0.992572
3.208519
ded98c21-5676-4d49-be61-1b41c02bb192
adityanjr/code-DS-ALGO
Mathematical Challenges/Permutation K Inversion.cpp
#include<bits/stdc++.h> using namespace std; const long int p=1000000007; int f[505][250005]={},g[505][250005]={}; long int perwithinv(int n,int k) { long int sum=0; cout << n << " " << k << "\n"; if(k!=0&&n!=0) { for(int i=k;k>=0;k--) { sum=sum+perwithinv(n-1,i); f[n][k]=sum; cout << sum << "=sum\n";...
ALGO
0.999845
3.708425
ac7e97c6-fdb6-43bd-aecb-cbe84ec242b5
Priyo002/DSA
Vivek_Gupta_RecomendedSheet/Sheet2/Lucky_Numbers.cpp
#include<bits/stdc++.h> using namespace std; bool check(int n) { while (n) { int r = n % 10; if (r == 7 || r == 4) n /= 10; else return false; } return true; } int main() { #ifndef ONLINE_JUDGE freopen("inputf.in", "r", stdin); freopen("outputf.in", "w", stdout); #endif int a, b; cin >> a >> b; boo...
ALGO
0.999395
4.409817
0e9de6e6-c52e-470b-9ed0-5d975411224f
FansaOrz/SLAM_Learning
ch06/gaussNewton.cpp
#include <iostream> #include <chrono> #include <opencv2/opencv.hpp> #include <Eigen/Core> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main(int argc, char **argv){ // 真实参数值 double ar = 1.0, br = 2.0, cr = 1.0; // 估计参数值 double ae = 2.0, be = -1.0, ce = 5.0; // 数据点 int ...
ALGO
0.999938
4.454552
25a3db5e-f43f-41d3-9867-52194ec4ba7e
SamyakJain2002/Coding-Solutions
Find the number of islands - GFG/find-the-number-of-islands.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: void bfs(int i, int j, int n, int m,vector<vector<char>>& grid){ if(i<0 || i>=n || j<0 || j>=m || grid[i][j]=='0') return; grid[i][j]='0'; bfs(i+1,j,n,m,grid); ...
ALGO
0.999957
6.986377
b7c5c0e7-4013-4071-8c9b-ab4e6a892721
varadkhadake2002/Striver-A2Z-DSA
LeetCode/Majority_Element.cpp
#include <iostream> #include <vector> using namespace std; int majorityElement(vector<int>& nums) { int freq = 0, ans = 0; int n = nums.size(); for (int val : nums) { if (freq == 0) { ans = val; } if (val == ans) freq++; ...
ALGO
0.999705
5.248372
b830d4bb-b737-4bff-b7c1-97982faa9f81
jinzcdev/PTA
浙大版_数据结构(第2版)_题目集/编程题/习题8.4 畅通工程之最低成本建设问题.cpp
// https://pintia.cn/problem-sets/434/exam/problems/type/7?problemSetProblemId=6544 #include <bits/stdc++.h> using namespace std; const int N = 1010, INF = 0x7fffffff; bool vis[N] = {false}; int e[N][N], d[N], n, m; void dfs(int u) { vis[u] = true; for (int i = 1; i <= n; i++) if (e[u][i] != INF && !vis...
ALGO
0.999823
4.18891
b9abd4f1-5adc-48d0-9379-724a2ea99c05
agul/contest-tasks
AMagaziniPonchikov.cpp
#include "base/header.hpp" class AMagaziniPonchikov { public: static constexpr bool kWriteCaseNumber = false; static constexpr bool kMultiTest = true; void solve(std::istream& in, std::ostream& out) { ll a, b, c; in >> a >> b >> c; if (a < c) { out << 1 << " "; } else { out << -1 << " "; } if (c ...
ALGO
0.999876
5.106777
c0899656-c115-40d1-b81a-44a99dac640e
Jaycelation/DSA-PTIT
DSA11014 - Tong node la ben phai.cpp
#include <bits/stdc++.h> #define _ 0 using namespace std; struct Node { Node* right; Node* left; int data; Node(int data) { this->data = data; this->left = this->right = NULL; } }; bool isLeaf(Node* node) { if (node != NULL && node->right == NULL && node->left == NULL) return true; return false; } Node*...
ALGO
0.999841
4.153521
ae06680b-b8b3-4748-8323-f320dc332cf4
hayden-donnelly/programming-problems
leetcode/search_in_rotated_sorted_array.cpp
// https://leetcode.com/problems/search-in-rotated-sorted-array/ class Solution { public: int search(vector<int>& nums, int target) { int l = 0; int r = nums.size()-1; int m = 0; while(l <= r) { m = l + (r - l) / 2; if(nums[m] == target) ...
ALGO
0.999992
6.446803
7f94da09-99dd-4782-b5a0-85fe31d9fc81
devdua-04/CP-Codes
2418-sort-the-people/2418-sort-the-people.cpp
class Solution { public: static bool comp(pair<string,int> &a,pair<string,int> &b){ return a.second>b.second; } vector<string> sortPeople(vector<string>& names, vector<int>& heights) { vector<pair<string,int>> sol; for(int i=0;i<names.size();i++){ sol.push_back({names[i],...
ALGO
0.999984
6.227388
5e5cc3ff-bddc-469c-98c6-0d5fb861235e
OpenTenBase/TXSQL
extra/icu/icu-release-73-1/source/common/loadednormalizer2impl.cpp
#include "unicode/utypes.h" #if !UCONFIG_NO_NORMALIZATION #include "unicode/udata.h" #include "unicode/localpointer.h" #include "unicode/normalizer2.h" #include "unicode/ucptrie.h" #include "unicode/unistr.h" #include "unicode/unorm.h" #include "cstring.h" #include "mutex.h" #include "norm2allmodes.h" #include "norma...
TOOL
0.893254
7.614707
4b51b817-1921-4250-a5ad-51bcf34781e9
wangzy0327/Leetcode-Practice
leetcode_0877/cpp/leetcode_0877.cpp
// // Created by wzy on 2022/7/12. // #include<iostream> #include<queue> #include<vector> #include <algorithm> #include <unordered_map> #include <unordered_set> #include <list> #include <deque> #include <stack> #include <sstream> #include <typeinfo> #include <climits> #include <random> #include <ctime> #include <cstri...
ALGO
0.999922
4.603308
2bd14cf8-39e5-4242-a76e-799b17d040b6
abubakaristiak/CSE-Fundamentals
Basic Data Structures/Week 04- (Stack and Queue)/Module -14/_05_Implement_Stack_using_Queues.cpp
//https://leetcode.com/problems/implement-stack-using-queues/description/ /* class MyStack { public: queue<int> q; MyStack() { } void push(int x) { q.push(x); } int pop() { queue<int> newQ; int last; while(!q.empty()){ int k = q.fron...
ALGO
0.997122
5.670615
86e73f20-e8fc-47e6-8dbb-03f0899897d6
Nafyaz/my-codes
Codeforces/1312A.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t, m, n; cin >> t; while(t--) { cin >> n >> m; cout << (n%m == 0? "YES" : "NO") << endl; } }
ALGO
0.999652
5.178935
85802c38-bcba-45d3-9910-c9e37ef74a4e
zhang-xpongz/structure_algorithm
linkedlist/singlelist.cpp
#include <iostream> using namespace std; struct ListNode{ int val; ListNode *next; }; bool find(ListNode *head, int val) { if(!head) { return false; } ListNode *tmp = head; for(; tmp!=NULL; ) { if(tmp->val == val) { return true; } ...
ALGO
0.999904
4.068193
0cb7ba1b-99a2-410d-804e-dd7bde19c5dd
KoJuJin/flutter_timer
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
4ee9d4cd-42eb-4199-9c72-6488b1585729
565353780/filter-socket
thirdparty/eigen-3.3.7/doc/examples/class_VectorBlock.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; template<typename Derived> Eigen::VectorBlock<Derived> segmentFromRange(MatrixBase<Derived>& v, int start, int end) { return Eigen::VectorBlock<Derived>(v.derived(), start, end-start); } template<typename Derived> const Eigen::Vec...
TOOL
0.987212
4.383477
fbec962b-4176-493c-a1db-870c5ea52b9d
vahancho/nkar
src/comparator.cpp
#include <vector> #include <map> #include <algorithm> #include <cassert> #include <stack> #include <set> #include "comparator.h" #include "point.h" namespace nkar { // Default width and height of the scan rectangle. Each of parameters should be // greater or equal to one. Smaller values correspond to the more precis...
ALGO
0.990655
6.757147
297b531b-a662-4b8a-a936-4bd6efc893fd
shivangptl099/LeetCode_Solutions
3375_Minimum_Operations_to_Make_Array_Values_Equal_to_K.cpp
class Solution { public: int minOperations(vector<int>& nums, int k) { set<int> mySet; for(int x : nums){ if(x < k) return -1; if(x > k) mySet.insert(x); } return mySet.size(); } };
ALGO
0.999913
5.44429
198f172c-56ac-4011-9724-4eb208613145
marovira/csc116_fall2018
lectures/week_4/code/q7.cpp
#include <vector> #include <iostream> void fill(std::vector<int>& vec, int a, int b) { for (int i = a; i <= b; ++i) { vec.push_back(i); } } void print(std::vector<int> const& vec) { for (auto val : vec) { std::cout << val << " "; } std::cout << std::endl; } int main() { ...
TOOL
0.991569
3.985479
28a5c702-4ba7-44e1-9724-73950ed0f2a8
LoiNguyennn/CompetitiveProgramming4_Solutions
UVa_OJ/852.cpp
#include <bits/stdc++.h> using namespace std; bool b, w, visited[9][9]; int dr[] = {-1, 0, 0, 1}, dc[] = {0, -1, 1, 0}; int size_cc; bool valid(int x, int y) { return (x >= 0 && x < 9 && y >= 0 && y < 9 && !visited[x][y]); } void dfs(const vector<string>& board, int r, int c) { visited[r][c] = true; ++s...
ALGO
0.999553
5.028027
3ae96ea8-d504-44f0-ac15-e2fcb50c5ba8
harsh6754/DSA-Problems
leetCodeDailyChallenge/SortThePeople.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; // Function to sort people by height vector<string> sortPeople(vector<string>& names, vector<int>& heights) { vector<pair<int, string>> people; int n = names.size(); // Combine names and heights into a vector of pairs ...
ALGO
0.999976
6.732184
cd39f684-4c9e-442f-af4f-e4f01887cb8e
replayan/Leetcode-Problems
0119-pascals-triangle-ii/0119-pascals-triangle-ii.cpp
class Solution { public: vector<int> getRow(int rowIndex) { vector<int> c; if (rowIndex < 0) { return c; } c.resize(rowIndex + 1); c[0] = 1; for (int i = 1; i <= rowIndex; ++i) { c[i] = 1; for (int j = i - 1; j > 0; --j) { ...
ALGO
0.999923
6.345022
ca9a42e7-cdeb-4e8a-931b-c7db0ffd1e36
li924579/ACM
其他比赛/CQUOJ月赛/2016.3/19762 爬山.cpp
const int INF_INT=0x3f3f3f3f; const long long INF_LL=0x7fffffff; const int MOD=1e9+7; const double eps=1e-9; const double pi=acos(-1); typedef long long ll; using namespace std; int dp[10010]; int n,m; vector<int> g[10010]; int dfs(int u) { if (g[u].size()==0) return 0; int &ret=dp[u]; if (ret!=-1) return dp[u]; ...
ALGO
0.998179
4.181139
c770075b-7a8f-4ab3-9dea-5a188bbae3e7
aardvark-project/Aardvark-coin
src/versionbits.cpp
#include "versionbits.h" #include "consensus/params.h" const struct BIP9DeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_BITS_DEPLOYMENTS] = { { /*.name =*/ "testdummy", /*.gbt_force =*/ true, }, { /*.name =*/ "csv", /*.gbt_force =*/ true, } }; Threshold...
ALGO
0.972028
7.568951
a6bb8568-9487-47ba-a353-af8ba9b73143
pimenta9/Competitive-Programming
cses/Range_Update_Queries.cpp
// Accepted! #include <bits/stdc++.h> using namespace std; #define int long long struct SegTree { int n; vector<int> tree; SegTree (int sz) { n = sz; tree.resize(4*n, 0); } void update (int ul, int ur, int x) { update_range(ul, ur, x, 0, n-1, 1); } void ...
ALGO
0.99977
5.581382
6bb4e171-5f50-46da-ba72-10b26b6f718a
kvm2116/vmtorrent
p2pfs/boost/libs/asio/doc/html/boost_asio/example/cpp03/invocation/prioritised_handlers.cpp
#include <boost/asio.hpp> #include <boost/function.hpp> #include <iostream> #include <queue> using boost::asio::ip::tcp; class handler_priority_queue { public: void add(int priority, boost::function<void()> function) { handlers_.push(queued_handler(priority, function)); } void execute_all() { while...
TOOL
0.948303
7.69276
e45d7d05-2f60-440f-9e8e-22f478722e4a
bdcbqa314159/leetCodeWork
474-ones-and-zeroes/474-ones-and-zeroes.cpp
class Solution { public: int findMaxForm(vector<string>& strs, int m, int n) { int sz = strs.size(); int dp[sz+1][m+1][n+1]; for (int i = 0 ; i<=sz; i++){ for (int j = 0; j<=m; j++){ for (int k = 0 ; k<=n; k++) dp[i][j][k] = 0; ...
ALGO
0.999938
6.214931
2d836a38-98d3-47cc-b8dd-9ed5df7a484d
0417yjy/algorithm-solutions
baekjoon/4344.cpp
/* 4344 평균은 넘겠지 ----------------------------------- 문제 ----------------------------------- 대학생 새내기들의 90%는 자신이 반에서 평균은 넘는다고 생각한다. 당신은 그들에게 슬픈 진실을 알려줘야 한다. ----------------------------------- 입력 ----------------------------------- 첫째 줄에는 테스트 케이스의 개수 C가 주어진다. 둘째 줄부터 각 테스트 케이스마다 학생의 수 N(1 ≤ N ≤ 1000, N은 정수)이 첫 수로 주어지고, 이어...
ALGO
0.99902
5.058113
355809ba-8547-4365-9ed0-2e6e15167f06
nishchyapratapsingh/DSA
1-61/44.cpp
//Decimal to binary #include<iostream> using namespace std; int dectobi(int decimal){ int var=0; int x=1; while(decimal>0){ var+=(x*(decimal%2)); decimal/=2; x*=10; } return var; } int main(){ int decimal; cin>>decimal; cout<<dectobi(decimal)<<endl; return 0; ...
ALGO
0.999773
4.962057
c9a45380-40fa-4df1-9766-c5653e268266
franciscomunoz/Sedgewick-algorithms-in-C-14--exercises-and-examples
03-elementary_data_structures/3.2-arrays/exercises/ex_3.10.cpp
#include<iostream> #include<array> int main() { constexpr int array_size = 99; std::array<int, array_size> a; for(std::size_t i = 0; i != a.size(); i++) a[i] = 98 - i; for(std::size_t i = 0; i != a.size(); i++) a[i] = a[a[i]]; return 0; }
ALGO
0.979685
4.053288
c2f29ed7-f606-4d12-9244-f9b3b7f82b14
dvbuiilds/dsa-prep
nqueens.cpp
#include<bits/stdc++.h> using namespace std; vector<vector<int>> chessboard(4, vector<int> (4, 0)); vector<int> qc(4, 0), leftd(8, 0), rightd(8,0); void printingchess(); bool validposition(int row, int q, int n){ if(row == n){ printingchess(); cout<<endl; return false; } for(int ...
ALGO
0.999896
3.266011
65428846-259f-4206-a74c-e4eda37dbf2e
kmjp/procon
codeforce/501-540/535/c.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
ALGO
0.999889
3.73283
f2825654-34a1-4e89-bc9c-a2b0a6a93751
Isaac-Paradox/MIT6.837-Assignments
Assignment_8/code/spline_parser.Cpp
#include "spline_parser.h" #include "spline.h" #include "curve.h" #include "surface.h" #include "triangle_mesh.h" #include "arg_parser.h" // ==================================================================== // ==================================================================== SplineParser::SplineParser(const cha...
TOOL
0.861305
5.580916
9b38e64d-d3b2-4f1a-ad2f-ae1724b77abe
aman-akv0/leetcodeAKV
413. Arithmetic Slices.cpp
class Solution { public: int numberOfArithmeticSlices(vector<int>& nums) { int n= nums.size(); vector<int>dp(n,0); int ans =0; for(int i=2;i<n;i++){ if(nums[i]-nums[i-1] == nums[i-1]-nums[i-2]){ dp[i]=dp[i-1]+1; ans+=dp[i]; } ...
ALGO
0.999847
6.105037
8c6a7db3-934e-480a-ae00-ab50698bab3f
Divyanshudhyani/leetcode-
0746-min-cost-climbing-stairs/0746-min-cost-climbing-stairs.cpp
class Solution { public: int solve(vector<int>& cost, int n,vector<int>& dp){ if(n==0){ return cost[0]; } if(n==1){ return cost[1]; } if(dp[n]!= -1){ return dp[n]; } dp[n] = cost[n] + min(solve(cost,n-1,dp...
ALGO
0.99995
6.080519
1cbfae40-5937-4a30-92a0-b2e443f54ad6
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/MixtralExpert/top0-100/minimum-time-to-finish-the-race-Solution.minimumFinishTime/177896_nan.cpp
static void become_daemon(const char *pidfile) { #ifndef _WIN32 pid_t pid, sid; pid = fork(); if (pid < 0) { exit(EXIT_FAILURE); } if (pid > 0) { exit(EXIT_SUCCESS); } if (pidfile) { if (!ga_open_pidfile(pidfile)) { g_critical("failed to create pidfile")...
ALGO
0.99418
4.685685
2da98699-8bdb-46f4-945e-c12c38e6f7a8
GiangHoGoVap/CO1027
Lab/Lab_6/CompleteNumber/completeNumber.cpp
#include <iostream> #include <fstream> using namespace std; bool completeNum(int N) { // TODO int sum = 0; for (int i=1; i<=N; i++){ if (N % i == 0) sum+=i; } if (sum == 2*N) return true; else return false; } int main(int narg, char** argv) { ifstream ifs; ifs.open(argv[1]); int N; try { while (ifs >...
ALGO
0.997954
4.896643
93894b9a-9810-468a-812e-623325c1c5d7
moinulhossainmahim/problem-solving
Codeforces/855A/855A.cpp
/* IN THE NAME OF ALLAH Author: Moinul Hossain Northern University Bangladesh */ #include<bits/stdc++.h> using namespace std; #define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); int main() { optimize(); int t; cin >> t; map<string, int> cnt; while(t--) { string s; cin >>...
ALGO
0.999678
4.740309
9eecb10f-a450-4ad8-94d1-7f502d2e0a2e
KIMSANGKYO/Programmer
프로그래머스/lv4/1831. 4단 고음/4단 고음.cpp
#include <iostream> #include <cmath> using namespace std; int check(int n, int m) { if (n == 3 && m == 2) return 1; else if (n < 3 || std::log(n) / std::log(3) * 2 < m) return 0; else if (n == 3 && m == 3) return 0; return check(n - 1, m + 1) + (n % 3 == 0 && m > 1 ? check(n / 3, m - 2) : 0); } int ...
ALGO
0.999649
4.66154
c0e37957-8143-4694-b7cb-a87215153255
ApexSentinelnn/ApexSentinelnn.github.io
Academico/Semestre_2/Materias/Programacion/main1 copy.cpp
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <locale.h> #define p printf // Prototipos de las funciones void llenarArreglos(int valores[], int matriz[][3]); void mostrarArreglos(const int valores[], const int matriz[][3]); void modificarArreglos(int valores[], int matriz[][3]); int main() { s...
TOOL
0.987736
3.814384
1e60758d-05fc-446a-ace2-d0d49e12b774
helenjw/CSC317
lab5/libigl/include/igl/knn.cpp
#include "knn.h" #include "parallel_for.h" #include <cmath> #include <queue> namespace igl { template <typename DerivedP, typename KType, typename IndexType, typename DerivedCH, typename DerivedCN, typename DerivedW, typename DerivedI> IGL_INLINE void knn(const Eigen::MatrixBase<DerivedP>& P, ...
ALGO
0.999963
6.514553
2b07d918-cfc8-4664-9da3-3fb66965a923
pjump3226/baekjoon
Q10866.cpp
#include <iostream> #include <deque> #include <string> using namespace std; int main() { int n; cin >> n; deque<int> dq; for (int i = 0; i < n; i++) { string s; cin >> s; if (s == "push_back") { int num; cin >> num; dq.push_back(num); } else if (s == "push_front") { int num; cin >> num; ...
ALGO
0.999398
4.68824
c3040bc3-a385-4574-b56c-32192490de38
ishandutta2007/codeforces
tadijasebez/normal/1340/C.cpp
//stavicu sutra oglas u novine //"jedan covjek srecu trazi //spavao bi u grazi //sta ce mu struja, krevet i prozori //samo si mu ti u glavi //budi dobra pa se javi" #include <bits/stdc++.h> using namespace std; #define pb push_back bool was[10005][1005]; int x[10005],n,m,r,g,ans=2e9; vector<int> q[10005]; void ckmn(int...
ALGO
0.999914
3.035706
50af3201-1926-4620-afab-4e20f35ac533
LuisEnilton/Maratona
CSES/Introductory Problems/Missing Number/solution.cpp
// // Created by Luis on 11/08/2023. // //Template By eduardocesb #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define optimize ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) #define INF 1000000010 #define INFLL 1000000000000000010LL #define ALL(x) x...
ALGO
0.999922
4.231727
9f05abba-6c46-4268-9548-b28defde9a3b
qminhminh/grapql
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
40d298b4-a7ec-4d96-b2ae-813e4a0fbf2c
ssh2457/Algorithms-and-Data-structures-practice
Week9/QuadTree/QuadTree/QuadTree.cpp
#include "include/QuadTree.h" #include <memory> #include <iostream> QuadTree::QuadTree(Rectangle& boundary, const size_t capacity) : Rectangle(boundary.GetX(), boundary.GetY(), boundary.GetWidth(), boundary.GetHeight()) , mCapacity(capacity) , mPoints(nullptr) , mSize(0) , mNorthWest(nullptr) , mNorthEast(nullp...
TOOL
0.92181
5.630909
8c3175c7-7671-46d4-82e9-e69e3e84467a
Dennitz/chdb
base/poco/Foundation/src/Semaphore_POSIX.cpp
#include "Poco/Semaphore_POSIX.h" #include <time.h> #include <sys/time.h> // // Note: pthread_cond_timedwait() with CLOCK_MONOTONIC is supported // on Linux and QNX, as well as on Android >= 5.0 (API level 21). // On Android < 5.0, HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC is defined // to indicate availability of non-sta...
TOOL
0.851225
7.431231
90a601f2-c38c-42b1-9de8-a554999deff7
ishandutta2007/codeforces
anz/normal/1143/D.cpp
#include <cstdio> #include <iostream> #include <cstring> #include <vector> #include <algorithm> #include <string> using namespace std; long long gcd(long long a, long long b) { while (b != 0) { long long r = a % b; a = b; b = r; } return a; } long long n, k, a, b; long long ma[4] = { -1,-1,1,1 }; long long ...
ALGO
0.999793
3.17887
49b742c9-893c-4f3c-bd65-a4879715c331
chisuhua/CoreRunner
gem5_ext/gpgpu/gpgpu-sim/src/intersim2/main.cpp
// $Id: main.cpp 5487 2013-02-27 08:16:18Z qtedq $ /*main.cpp * *The starting point of the network simulator *-Include all network header files *-initilize the network *-initialize the traffic manager and set it to run * * */ #include <sys/time.h> #include <string> #include <cstdlib> #include <iostream> #incl...
TOOL
0.879083
4.737022
78efebe7-fe6a-4383-9be0-08ee8fcabe0c
rasel3780/URI-SOLUTION
1072.cpp
#include<bits/stdc++.h> using namespace std; int main() { int in = 0; int out = 0; int t, number; cin>>t; while(t--) { cin>>number; if(number>=10 && number<=20) { in++; } else { out++; } } cout<<in<<" in"<<"...
ALGO
0.993592
3.450258
036f0346-2926-43b1-b755-6c73599d1dcf
ishandutta2007/codeforces
boook/normal/822/D.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #define REP(i,j,k) for(int i = j ; i < k ; ++i) #define RREP(i,j,k) for(int i = j ; i >=k ; --i) #define A first #define B second #define pb push_back #define mp make_pair #define PII pair...
ALGO
0.999983
4.138539
58701bb2-0710-4151-954a-8e924b042f9a
yl4df/Data-and-Program-Representation
hash-word-puzzle/wordPuzzle.cpp
//Yunlu Li, yl4df, 2019-10-19,wordPuzzle.cpp /* The big-Theta running time is (rows*cols*words). In word searching, we need two for-loops for each row and column and use “contains” function of hash table to check, of which running time depends on how many words we have. Actual running time: 3x3.grid.txt: 0.001115 s...
ALGO
0.994058
5.261645
f5ed9607-51e9-4551-a98e-998be0882bb2
MahdiShokrollahi/Flutter_Blog_Club_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.998693
6.797273
b969f580-239c-4fdb-8d91-4f2de4ee81dd
wtain/LeetCodeCpp
WordPattern/WordPattern.cpp
// WordPattern.cpp : Defines the entry point for the console application. // #include <string> #include <map> #include <iostream> #include <iomanip> using namespace std; /* Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between ...
ALGO
0.998964
6.48863
d2edbed8-2000-43eb-a4ac-1782fe4063e3
Asif3359/Learn_C_Language
Problem_1_codef/Comparison.cpp
#include <iostream> #include <iomanip> using namespace std; int main(int argc, char const *argv[]) { long long X, Y; char ch; cin >> X >> ch >> Y; if (ch == '>') { if (X > Y) { cout << "Right" << endl; } else { cout << "Wrong" << end...
ALGO
0.999879
3.036612
22fd48f6-a7db-4292-9e7c-ead38f1a4b94
djr111/Robot_Explorer_of_unknown_space_with_LiDAR_ROS_and_TurtleBot3
navigation/base_local_planner/src/voxel_grid_model.cpp
#include <base_local_planner/voxel_grid_model.h> #include <sensor_msgs/point_cloud2_iterator.h> using namespace std; using namespace costmap_2d; namespace base_local_planner { VoxelGridModel::VoxelGridModel(double size_x, double size_y, double size_z, double xy_resolution, double z_resolution, double orig...
ALGO
0.965522
7.219556
492b6c81-d36f-4f88-82d6-4dd520292f76
chawinkn/competitive-programming
Programming.in.th/Passed/New/codecube_058.cpp
#include<bits/stdc++.h> using namespace std; char s[309][309]; vector<vector<vector<int>>> dist(309, vector<vector<int>>(309, vector<int>(8, 1e9))); queue<tuple<int,int,int>> q; int dx[]={0,1,1,1,0,-1,-1,-1}, dy[]={-1,-1,0,1,1,1,0,-1}; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int r, c, n; cin ...
ALGO
0.999931
4.475924
000ee876-6979-4343-a6f9-288a49f0bd65
pnnv/hyprland-dotfiles
VSCodium/User/History/6f68f7ee/9j1m.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int32_t main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; ll x = 0; vector <vector <pair <ll, ll>>> g(n); for (int i = 0; i < n - 1; i++) { ll a, b, c; cin >> a >> b >> c; g[--a].push_back({--b, c}); g[b].pu...
ALGO
0.999858
4.017417
976b67e2-ef9c-44e3-adfd-c11700d01e5f
PealMazumder/Topicwise-Problems
Number Theory/Easy Tiling.cpp
//Problem Link: https://www.codechef.com/problems/TILE #include<bits/stdc++.h> #define mod 1000000007 #define ll long long #define pb push_back #define nl "\n" #define REP(i,n) for(int i = 1; i<=n; i++) using namespace std; ll I[3][3], T[3][3]; ll n; ll MatrixMul(ll A[][3], ll B[][3], ll dim) { ll res[dim+1][dim + 1];...
ALGO
0.999903
4.314829
50ab1e50-8235-4491-927b-6d84a4d15a85
ayushgarg2002/Placement-Preparation-Module
1328-break-a-palindrome/1328-break-a-palindrome.cpp
class Solution { public: bool isPalindrome(string p){ string pp = p; reverse(pp.begin(), pp.end()); return pp == p; } string breakPalindrome(string palindrome) { string temp = palindrome; int n = palindrome.length(); if(n == 1) return ""; if(palin...
ALGO
0.998654
4.907795
ee306454-0f5c-4e2a-979f-781534bf847c
Manish3Air/LeetCode
0122-best-time-to-buy-and-sell-stock-ii/0122-best-time-to-buy-and-sell-stock-ii.cpp
class Solution { public: long f(int idx,int buy,vector<int>& prices, int n,vector<vector<int>>& dp){ if(idx == n) return 0; if(dp[idx][buy] != -1) return dp[idx][buy]; int profit = 0; if(buy){ profit = max(-prices[idx] + f(idx + 1,0,prices,n,dp),0 + f(idx + 1,1,prices,n,dp)); }else{ ...
ALGO
0.999915
5.757438
23bf291d-d9eb-4732-bca0-e0c727706f9b
king-yyf/cpcode
codeforce/ecr143/c_hack.cpp
#include<bits/stdc++.h> using namespace std; void solve(){ int n;cin >> n; vector<long long>a(n + 2), b(n + 2), ans(n + 2), mod(n + 2), cop(n + 2); for(int i = 1; i <= n;i++)cin >> a[i]; for(int i = 1; i <= n;i++)cin >> b[i]; cop = b; for(int i = 1; i <= n;i++)b[i] += b[i - 1]; for(int i = ...
ALGO
0.999966
3.30288
b2c31c83-80c2-4e68-a616-4228bca0f2dd
mlibovych/Cpp-RedBelt
week6/part1/search_server.cpp
#include "search_server.h" #include "iterator_range.h" #include <algorithm> #include <iterator> #include <sstream> #include <string_view> #include <iostream> // void LeftStrip(string_view& sv) { // while (!sv.empty() && isspace(sv[0])) { // sv.remove_prefix(1); // } // } // string_view ReadToken(string_view&...
WEB
0.972725
4.770748
24530a42-62d0-4bd9-b7cb-ae765ea55226
son-of-mountain/problem-solving
leetcode/AWS-Prep/.history/E - Find in Matrix_20241023230159.cpp
// https://codeforces.com/group/5pUldkahAU/contest/510058/problem/E # include<bits/stdc++.h> using namespace std; int main(){ int x, n ,m ; int i,j; bool found = false; cin >> n >> m ; int arr[n][m]; for(i=0 ; i< n ; ++i){ for(j=0 ; j< m ; ++j){ cin >> arr[i][j]; ...
ALGO
0.99988
4.435906
825001d0-3b70-4c5b-84b3-17f6361a509c
jiebaomaster/fuckleetcode
data_structure/高级数据结构/460.LFU缓存.cpp
/** * https://leetcode-cn.com/problems/lfu-cache/ * 双hash法 * key->node 查找元素是否存在 * freq->list 查找各频率的元素 * 删除和移动时,可由 node 直接找到 list 中的节点 * lfu 中 node 的频率必定是单调增的 */ class Node { public: int key; int val; int freq; Node* prev; Node* next; Node(int key, int val) : key(key), val(val), freq(1) { prev =...
ALGO
0.999804
6.542284
a1603c8e-5f6d-4de9-9b59-780762d4dbe2
cheapcoder007/competitve_programming_codes
invert_tree.cpp
#include <bits/stdc++.h> using namespace std; typedef struct node { char ch; struct node *left, *right; }node; typedef void inorder(tree t) { if(t == NULL) return; inorder(t->left); cout << t->ch; inorder(t->right); } void insert(tree *t, char ch) { if(t
ALGO
0.999973
3.902449
4afd2143-7bce-4fbe-ae84-c251d2ac2d8a
maemako/fwatch
fwatch.cpp
// fwatch.cpp : R\[ AvP[Vp̃Gg |Cg̒` // Makoto Maekawa - IGS.IBM Japan. #include "stdafx.h" #include <windows.h> #include <string> #include <iostream> #include <vector> #include "fwatch.h" #include "misc.h" using namespace std; // Xbh\ typedef struct{ // Xbh̃nh HANDLE hThread; // Xbh̏ԁitrue=Jn”\j bool bStatus...
TOOL
0.941011
4.601099
34311a6d-9ac6-4593-8c49-50a33b02310f
Moon-Mind-Studio/moonmind-godot
thirdparty/bullet/BulletSoftBody/btDeformableBodySolver.cpp
#include <stdio.h> #include <limits> #include "btDeformableBodySolver.h" #include "btSoftBodyInternals.h" #include "LinearMath/btQuickprof.h" static const int kMaxConjugateGradientIterations = 300; btDeformableBodySolver::btDeformableBodySolver() : m_numNodes(0), m_cg(kMaxConjugateGradientIterations), m_cr(kMaxConjuga...
ALGO
0.999771
4.710789
b27147de-2a89-402f-9d73-fcb8b0e2c5ce
fordream/AIshe
cocos2d/cocos/math/Quaternion.cpp
#include "Quaternion.h" #include "base/ccMacros.h" NS_CC_MATH_BEGIN Quaternion::Quaternion() : x(0.0f), y(0.0f), z(0.0f), w(1.0f) { } Quaternion::Quaternion(float xx, float yy, float zz, float ww) : x(xx), y(yy), z(zz), w(ww) { } Quaternion::Quaternion(float* array) { set(array); } Quaternion::Quaterni...
TOOL
0.923296
7.349846
13ea0b34-f331-4b25-9485-33b1c62e9b9e
PiscesDante/LintCode
8. 旋转字符串.cpp
class Solution { public: /** * @param str: An array of char * @param offset: An integer * @return: nothing */ void rotateString(string &str, int offset) { if (!str.empty()) { reverse(str.begin(), str.end()); offset %= str.size(); auto pivot = str.b...
ALGO
0.999515
6.212983
2a4d2dc5-74d8-4440-85d9-21e745337066
anshgupta6031/Cpp
03_patterns/03.cpp
/* star triangle...... * ** *** **** output for n = 4. */ #include <iostream> using namespace std; int main(){ int n; cout<<"enter a number : "; cin>>n; for (int i=1; i<=n; i++){ for (int j=1; j<=i; j++){ cout<<"*"; } cout<<endl; } return 0; }
ALGO
0.999377
4.191299
a02e2b10-0e96-4c70-892a-edab3fe16dfa
SsageParuders/Android_Native_Surface
my_android_opencv/modules/core/src/utils/logtagconfigparser.cpp
#include "../precomp.hpp" #include "logtagconfigparser.hpp" namespace cv { namespace utils { namespace logging { LogTagConfigParser::LogTagConfigParser(LogLevel defaultUnconfiguredGlobalLevel) { m_parsedGlobal.namePart = "global"; m_parsedGlobal.isGlobal = true; m_parsedGlobal.hasPrefixWildcard = false; ...
TOOL
0.907154
6.875438
b0fd19f5-1327-4df2-b4e1-2711aef39a70
lessthanoptimal/ValidationBoof
thirdparty/fiducial/opencv/benchmark.cpp
#include <cstddef> #include <string> #include <iostream> #include <iterator> #include <boost/program_options.hpp> #include <boost/filesystem.hpp> #include <boost/algorithm/string/predicate.hpp> #include <fstream> #include <chrono> #include <iomanip> #include <opencv2/objdetect.hpp> #include <opencv2/imgcodecs.hpp> #inc...
TOOL
0.937716
6.306072