uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
d3b0ce11-c20a-4e1b-87c7-b0951827d5c3 | HyperMachinex/golden_eagle_optimization_cpp | functions.cpp | #include <iostream>
#include <vector>
#include <cmath>
#include <numeric>
#include <functional>
#include <stdexcept>
using namespace std;
typedef vector<double> Vec;
double sum(const Vec &x) {
return accumulate(x.begin(), x.end(), 0.0);
}
double prod(const Vec &x) {
return accumulate(x.begin(), x.end(), 1.0... | ALGO | 0.999836 | 6.105687 |
e63bbdc7-8272-4ad0-9fda-449c996bce89 | kabu0330/ProgrammersCordingTest | Stack/Stack.cpp | #include <iostream>
#include <stack>
std::string Reverse(const std::string& _Str)
{
std::stack<char> Stack;
for (char Char : _Str)
{
Stack.push(Char);
}
std::string Res = "";
while (false == Stack.empty())
{
Res += Stack.top();
Stack.pop();
}
return Res;
}
... | ALGO | 0.999031 | 5.976727 |
e88a6e4f-dab4-48c5-8dae-ec711cf9b9ca | noanovo/TaskNoaNovogroder | NumbersProgram.cpp | #include "numbersProgram.h"
bool generateRandomNumbersN(std::vector<int>& nums, int n)
{
std::string funcName = "NumbersProgram::generateRandomNumbers";
std::random_device dev;
std::mt19937 rng(dev());
std::uniform_int_distribution<std::mt19937::result_type> dist6(1, 999); // distribution in range [1, 6]
if (n <... | TOOL | 0.862075 | 3.866981 |
041476a3-d65a-4a8c-b27f-81b4c25345c2 | sallyh0812/112-1Cpp | HW_LAB/Lab5.cpp | /*calculate what day is the date.
The main program should prompt user to input a date and
print out the corresponding day as well as the calendar
of the month of the date.
Hint: If the year is divisible by 4 and not by 100,
or the year is divisible by 400, it is a leap year.
Hint: The day of the first day of a year c... | TOOL | 0.997178 | 3.861916 |
73149a81-f6d1-4303-b4e7-18d52da47984 | sonixAnder/dz9 | The sum of integers/The sum of integers/The sum of integers.cpp | #include <iostream>
#include <Windows.h>
using namespace std;
int main()
{
setlocale(LC_ALL, "ru");
int a;
cout << "Введите значение a: ";
cin >> a;
cout << "Считаем, подождите... " << endl;
Sleep(3000);
if (a > 500)
{
cout << "АХТУНГ. Введёное число больше 500, а надо мень... | ALGO | 0.997965 | 3.016864 |
0d008ab8-a786-4659-a82e-d1422abadcce | anushka209/DSALeetCode_Problems | 1078-remove-outermost-parentheses/1078-remove-outermost-parentheses.cpp | class Solution {
public:
string removeOuterParentheses(string s) {
int count=0;
string ans="";
bool flag=true;
for(int i=0;i<s.size();i++)
{
if(s[i]=='(')
count++;
else if(s[i]==')')
count--;
if(count==1 && flag==true) // first open br... | ALGO | 0.999465 | 6.052268 |
8cd7f9bb-fb11-43d6-a782-b506ccdaec99 | varenyamBakshi/CSES-Solutions | Trees/Subordinates.cpp | #include<bits/stdc++.h>
using namespace std;
const int vsize = 2e5;
vector<int> adj[vsize+1];
int subtree[vsize+1];
void dfs(int x){
subtree[x] = 0;
for(auto child: adj[x]){
dfs(child);
subtree[x] += 1+subtree[child];
}
}
int main(){
int n; cin>>n;
for(int i = 2; i <= n; i++) {
... | ALGO | 0.999924 | 4.106296 |
de8600f6-4960-460b-ab27-6db19c2df6fc | ruizhermes/Data_Structures_and_Algorithms | linked_lists/doubly_linked_list/doubly_linked_list.cpp | #include <iostream>
#include "doubly_linked_list.h"
using namespace std;
doublyNode::doublyNode(){
this->data = 0;
prev = NULL;
next = NULL;
}
doublyNode::doublyNode(int data){
this->data = data;
prev = NULL;
next = NULL;
}
doublyLinkedList::doublyLinkedList(){
head = NULL;
tail = NU... | ALGO | 0.943713 | 3.899076 |
644a4586-cf6d-4e02-bfbe-f2166a6f1655 | ApurvSardana/LeetCode | 2349-Design-a-Number-Container-System.cpp | class NumberContainers {
public:
unordered_map <int, int> itn;
unordered_map <int, set<int>> nti;
NumberContainers() {
}
void change(int index, int number) {
if(itn.find(index) == itn.end()){
itn[index] = number;
nti[number].insert(index);
}
... | ALGO | 0.999905 | 5.723512 |
e11200c6-8379-4bdd-8de6-ab03fa862b0b | Freezecoke/UVA | December_5.cpp | #include<iostream>
using namespace std;
int main(){
/*int num=0;
char input;
while(cin>>input){
if(input == '!')
break;
num++;
}
int *box = new int[num];
cout << num << endl;
*/
int num = 16;
char box[num];
for(int i=0; i<num; i++){
cin >> box[i];
}
// while(){
int se... | ALGO | 0.999446 | 3.210682 |
d5f16fd5-dac6-4a96-9ba8-e8a653f6bbb7 | ishandutta2007/codeforces | lucaperju/normal/1607/E.cpp | #include <bits/stdc++.h>
using namespace std;
/*
const long long mod = 998244353;
long long lgput (long long a, long long exp)
{
long long rz=1;
while(exp)
if(exp&1)
exp^=1,rz=rz*1LL*a%mod;
else
exp>>=1,a=a*1LL*a%mod;
return rz;
}
long long fct[200005],invfct[20000... | ALGO | 0.999986 | 4.252841 |
946152d9-dd0e-42b0-b2f9-571f3b3505ad | AlexMelenchon/CITM_Physics2 | Physics2_class1_handout/Box2D/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.cpp | #include <Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h>
#include <Box2D/Common/b2BlockAllocator.h>
#include <Box2D/Dynamics/b2Fixture.h>
#include <new>
b2Contact* b2PolygonAndCircleContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator)
{
void* mem = allocator->All... | ALGO | 0.949144 | 7.301537 |
9a0541b0-94a6-40d2-8ae3-4a1ded4e12f5 | ishandutta2007/codeforces | zoli9/normal/1234/D.cpp | #include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
string s;
set<int> H[26];
int q;
int main()
{
ios::sync_with_... | ALGO | 0.999776 | 4.044646 |
cd59aa4a-2d85-4ba1-b622-6e0565951db0 | surendra-sketch/cprogram | c++/String/stringFunctions/palindrom.cpp | #include<bits/stdc++.h>
#include<string.h>
// palindrom string or not
using namespace std;
int main(){
/*
string str1,str2;
getline(cin,str1);
for(int i=str1.size()-1;i>=0;--i){
str2.push_back(str1[i]);
}
if(str1 == str2){
cout<<"YES"<<endl;
... | ALGO | 0.995162 | 3.01927 |
53713765-7822-4bf7-9147-78ae5fea7cd7 | Farrius/cp | harbour/module_2/week2/second_shortest_path.cpp | #include <bits/stdc++.h>
using namespace std;
int main () {
int n, m;
cin >> n >> m;
vector<pair<int, int>> g[n + 1];
for (int i = 0; i < m; i++) {
int u, v, w;
cin >> u >> v >> w;
g[u].emplace_back(v, w);
}
vector<vector<int>> dist(n + 1, vector<int>(2, 1e9 + 7));
vector<int> vis(n + 1);
priority_q... | ALGO | 0.999914 | 4.494207 |
76ab6052-c4ee-4322-a163-a0d3bda65321 | 1stcooldude/zybooks | testing zylabs/Module 2/2.28/main.cpp | #include <iostream>
#include <iomanip>
using namespace std;
int main() {
double age, weight, heartRate, minutes;
double men, women;
cin >> age >> weight >> heartRate >> minutes;
women = ((age * 0.074) - (weight * 0.05741) + (heartRate * 0.4472) - 20.4022) * minutes / 4.184;
men = ((age * 0.2017... | ALGO | 0.997737 | 3.169187 |
4c11ff3c-2074-4407-a775-9c7e5f7cfa19 | iceeyyy/DSA_Answers | 0205-isomorphic-strings/0205-isomorphic-strings.cpp | class Solution {
public:
bool isIsomorphic(string s, string t) {
//if their length is not equal they can't be isomorphic
if(s.length()!=t.length()){
return 0;
}
unordered_map<char,char>mp1,mp2;
for(int i=0;i<s.length();i++){
if((mp1[s[i]] && mp1[s[... | ALGO | 0.999984 | 6.182034 |
f57dffe4-4415-4ca6-9323-e3dbf7edddba | greengangsta/Coding | codehelp/copuLLwithRandomPointers_GFG.cpp | Node *copyList(Node *head)
{
//Write your code here
//create a clone List;
Node* newHead = NULL;
Node* tail = NULL;
Node* temp = head;
while(temp!=NULL){
insertAtTail(newHead, tail, temp->data);
temp = temp->next;
... | ALGO | 0.996967 | 3.639967 |
44f3989d-2576-4956-a7a5-158d305363fa | wizleysw/backjoon | 2959/solve.cpp | // https://www.acmicpc.net/problem/2959
// 거북이
// Written in C++ langs
// 2020. 08. 05.
// Wizley
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
vector<int> FOOTFALL(4);
int main(){
ios_base :: sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
for(int i=0; i<4... | ALGO | 0.99991 | 3.453261 |
2c640d72-4abc-4c7f-8347-0cd1ecce8fd8 | ishandutta2007/codeforces | timmyfeng/normal/1144/F.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 200001;
array<int, 2> edge[N];
vector<int> adj[N];
int color[N];
bool dfs(int u) {
for (auto c : adj[u]) {
if (color[c] == -1) {
color[c] = 1 - color[u];
if (!dfs(c)) {
return false;
}
... | ALGO | 0.999993 | 5.021491 |
b698b60d-6579-4e78-9470-b4e4d5762aaa | xoovakes/noi_practices | noi 1.5 45cc.cpp | #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int n;
cin>>n;
int m=1,i=1,tot=0;
for(;i<=n;i+=m){
tot+=m*m;
m++;
}
i-=m;
tot+=m*(n-i);
cout<<tot;
return 0;
}
| ALGO | 0.999936 | 3.505334 |
0c1863cf-2803-4ac2-b524-707a0a2c8ef3 | haris-mujeeb/Cpp-Basic | Object-oriented Programming C++ Simplified by Hari Mohan Pandey/exp_9.cpp | /*
From Book: Oobject Oriented Programming C++ Simplified.
Experiment-9 : Write a program which uses the following sorting methods for sorting
elements in ascending order. Use function templates :
(a) Bubble sort
(b) Selection sort
(c) Quick sort.
*/
#include <iostream>
template< typename T... | ALGO | 0.999745 | 5.58049 |
d973bf7b-3435-4132-a9db-c9d230c7cf6a | LorenzoMaci/Programmazione-II | Lista/listaConcatenata.cpp | #include <iostream>
using namespace std;
class Nodo{
public:
int valore;
Nodo* succ;
};
class ListaSemplice{
public:
ListaSemplice(){testa=nullptr;}
~ListaSemplice();
Nodo* getTesta(){return testa;}
// inserimento in testa
void inserisci(int val);
// inserimento dopo un nodo esistente
... | ALGO | 0.995025 | 4.763475 |
706093be-68eb-4cef-9dbe-af1e92880395 | poshithNandyala/cp-pratice | anonymous/important/BinarySearch/algo zenith/bitonic_array.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(nullptr);
int n;
vector<int> arr;
bool check(int mid)
{
return (mid == n - 1) || (arr[mid] > arr[mid + 1]);
}
int main()
{
fastio;
... | ALGO | 0.999938 | 4.996105 |
d134c9d9-84c5-4a82-8c94-01b722291a07 | himanshu062/geeks_for_geeks_problems | Difficulty: Medium/Buy Stock with Transaction Fee/buy-stock-with-transaction-fee.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
int maxProfit(vector<int>& arr, int k) {
// Code here
int n = arr.size();
int hold = -arr[0], cash = 0;
for (int i = 1; i < n; ++i) {
hold = max(hold, c... | ALGO | 0.998166 | 5.840671 |
8d8cdbf7-4a6e-49c2-8b5d-aa4d80188667 | MonashCybersecurityLab/measurement | Oblivious/Test/TestObliviousBucket.cpp | #include <unordered_map>
#include <vector>
#include "../Enclave/Sketch/ObliviousBucket.h"
using namespace std;
#define START_FILE_NO 1
#define END_FILE_NO 2
typedef vector<FIVE_TUPLE> TRACE;
TRACE traces[END_FILE_NO - START_FILE_NO + 1];
void ReadInTraces(const char *trace_prefix)
{
for(int datafileCnt = START... | DATA | 0.983498 | 4.08462 |
899e35e3-d5ca-430d-8107-e76ba5e6098a | myzk-a/atcoder_vscode | abc352/d/main.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
ll N, K;
cin >> N >> K;
vector<ll> P(N + 1);
for(ll i = 1; i <= N; ++i) cin >> P[i];
vector<ll> Q(N + 1);
for(ll i = 1; i <= N; ++i) Q[P[i]] = i;
set<ll> S;
for(ll i = 1; i <= K; ++i) S.insert(Q[i]);
a... | ALGO | 0.999947 | 3.996831 |
79c5eb16-7287-42fc-bccb-8221b2f17a49 | SRTINNI/DATA-STRUCTURE | Problem 20.cpp | /*In order traversal*/
#include<bits/stdc++.h>
using namespace std;
struct node
{
int data;
node *left,*right;
};
void inorder(node *root)
{
if(root==NULL)
{
return;
}
inorder(root->left);
cout<<root->data<<endl;
inorder(root->right);
}
node* GetNode(int data)
{
node* newNode = new node();
... | ALGO | 0.999985 | 5.149439 |
49199a12-7d36-42e4-a0ef-6e47ff734dbe | BanRuoBoLuo/LeetCodeSolution | BinaryTree/104_Maximum_Depth_of_Binary_Tree.cpp | /*******************************************************************************************
104. Maximum Depth of Binary Tree
Easy
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
Note: A leaf is a node wi... | ALGO | 0.99992 | 6.695584 |
0e7d9189-e809-4c46-b2d7-3c3b71ce1e65 | anmolk11/Data-structues-and-algorithm | Day 12/Practice Problems/odd-occ-no.cpp | // Prgram to find that one odd occuring number in an array where all other numbers are occuring
// even number of times
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int arr[n];
int res{0};
for(int i = 0; i < n; i++) {
cin >> arr[i];
res ^= arr[i];
}
... | ALGO | 0.99995 | 4.546662 |
9f4004df-fc28-4380-b1fe-a89b1bb59235 | Suvarnarajugera/cpp | mergesort.cpp | #include<bits/stdc++.h>
using namespace std;
void merge(int low, int high, int mid, int arr[]){
int left = low;
int right = mid + 1;
int ind = 0;
int temp1[1000];
while(left <= mid && right <= high){
if(arr[left] < arr[right]){
temp1[ind++] = arr[left++];
}
else{
... | ALGO | 0.999984 | 4.309224 |
06df95cf-420c-43ad-8bf6-ef2c684bd5a6 | chenlian2015/skia_from_google | experimental/Intersection/QuadraticIntersection.cpp | #include "CurveIntersection.h"
#include "Intersections.h"
#include "IntersectionUtilities.h"
#include "LineIntersection.h"
#include "LineUtilities.h"
#include "QuadraticLineSegments.h"
#include "QuadraticUtilities.h"
#include <algorithm> // for swap
static const double tClipLimit = 0.8; // http://cagd.cs.byu.edu/~tom/... | ALGO | 0.999223 | 6.134745 |
5f5320d0-9fc0-4bd5-b3b8-2dae723771b6 | esl000/CustomUE4VolumeRaymarching | Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/UniformGrid.cpp | #include "Chaos/ArrayFaceND.h"
#include "Chaos/ArrayND.h"
using namespace Chaos;
template<class T_SCALAR, class T>
T_SCALAR LinearlyInterpolate1D(const T_SCALAR& Prev, const T_SCALAR& Next, const T Alpha)
{
return Prev + (Next - Prev)*Alpha;
}
template<class T_SCALAR, class T, int d>
T_SCALAR LinearlyInterpolateHe... | ALGO | 0.971765 | 6.452353 |
8ada2f07-3bd5-4267-9a19-ec8ab19f89e3 | Rajat775/Leetcode | 0240-search-a-2d-matrix-ii/0240-search-a-2d-matrix-ii.cpp | class Solution {
public:
bool searchMatrix(vector<vector<int>>& matrix, int target) {
int n = matrix.size(),m=matrix[0].size();
int cr=0,cl=m-1;
while(cr<n && cl>=0)
{
if(matrix[cr][cl] == target)
return true;
if(matrix[cr][cl... | ALGO | 0.999966 | 6.130911 |
f4ceb332-dca3-4eb2-b90a-23b6c27514ac | jagrit-goyal/Leetcode_questions | 0011-container-with-most-water/0011-container-with-most-water.cpp | class Solution {
public:
int maxArea(vector<int>& height) {
int l =0;
int r = height.size()-1;
int ans =0;
while(l<r)
{
int width = r-l;
int h = min(height[l],height[r]);
int val = width * h;
if(ans<val)
ans = va... | ALGO | 0.999971 | 6.631094 |
90a8a31a-fe5b-498b-8e4a-57eb91204fd9 | chizhizhen/leetcode | algorithms/cpp/removeElement/removeElement.cpp | // Source : https://oj.leetcode.com/problems/remove-element/
// Author : Hao Chen
// Date : 2014-06-19
/**********************************************************************************
*
* Given an array and a value, remove all instances of that value in place and return the new length.
*
* The order of element... | ALGO | 0.999804 | 6.028716 |
157b1079-b237-47e6-a99b-633a2b435f8e | Reinn90/OOP | Prac4/Task4-4.cpp | #include <iostream>
#include <iomanip>
#include <string>
using namespace std;
#include "Task4-4.h"
int main() {
TicTacToe game;
game.play();
return 0;
}
| TOOL | 0.897485 | 4.925109 |
56136ccc-f5e6-4a6e-bda2-083e1e7d9409 | SeanMcGoff/NitroCppTest-SeanMcGoff | src/rectangle.cpp | #include "rectangle.h"
bool hasDuplicateParents(std::vector<Rectangle> &rects,
std::vector<std::string> &pr) {
std::sort(pr.begin(), pr.end());
for (Rectangle &r_i : rects) {
if (r_i.getParentRects() == pr)
return true;
}
return false;
}
std::vector<Rectangle> intersectionsO... | ALGO | 0.998999 | 6.603197 |
dd9b7244-db19-4cd8-849a-6eb97714fd61 | AsuraShanks/FishTxt | include/uchardet/CharDistribution.cpp | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
#include "CharDistribution.h"
#include "JISFreq.tab"
#include "Big5Freq.tab"
#include "EUCKRFreq.tab"
#include "EUCTWFreq.tab"
#include "GB2312Freq.tab"
#define SURE_YES 0.99f
#define SURE_NO 0.01f
//return confidence base on received ... | ALGO | 0.990986 | 5.768363 |
33169d9e-3dae-4e34-8ebd-b7d50642cb67 | javesshhh/DSA_codes | 2pointers/longestSubarrayKfreq.cpp | // https://leetcode.com/problems/length-of-longest-subarray-with-at-most-k-frequency/?envType=daily-question&envId=2024-03-28
class Solution
{
public:
int maxSubarrayLength(vector<int> &v, int k)
{
int n = v.size();
map<int, int> m;
int i = 0, j = 0;
int ans = 1;
while (... | ALGO | 0.999894 | 6.365686 |
53002540-e1d3-4be7-b560-4ff968460b8f | AndySer37/semantic_labels_sys | catkin_ws/src/ur_arms/ur_modern_driver/src/ros/lowbandwidth_trajectory_follower.cpp | #include "ur_modern_driver/ros/lowbandwidth_trajectory_follower.h"
#include <endian.h>
#include <ros/ros.h>
#include <cmath>
static const std::array<double, 6> EMPTY_VALUES = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
static const std::string TIME_INTERVAL("{{TIME_INTERVAL}}");
static const std::string SERVOJ_TIME("{{SERVOJ_T... | ALGO | 0.989643 | 6.867138 |
0c714c85-0b4e-498d-a1ad-f67b2ac83afc | nashiong/cantera | cantera18/changes/liquidTransportDevelop/Cantera/src/kinetics/AqueousKinetics.cpp | /**
* @file AqueousKinetics.cpp
*
* Homogeneous kinetics in an aqueous phase, either condensed
* or dilute in salts
*
*/
/*
* Copywrite (2006) Sandia Corporation. Under the terms of
* Contract DE-AC04-94AL85000 with Sandia Corporation, the
* U.S. Government retains certain rights in this software.
*/
/*
*... | TOOL | 0.952527 | 5.645811 |
b0433924-d7f0-43af-9f64-65f8c90b1202 | Icay12/LeetCode | Cpp/787_CheapestFlightsWithinKStops.cpp | //dp
class Solution {
public:
int findCheapestPrice(int n, vector<vector<int>>& flights, int src, int dst, int K) {
if(src == dst)
return 0;
vector<vector<int>> dp(n, vector<int>(K+2, INT_MAX));
//save the flights to a map
unordered_map<int, unordered_map<int, int>> f;
... | ALGO | 0.999616 | 5.407431 |
9d51aa84-6a1a-4eda-8d5b-bcd5c8023880 | micben-cs/Object-oriented-programming-OOP | Chapter15/ex09/student/main.cpp | #include <iostream>
using namespace std;
// Recursive function to reverse the digits of an integer
int reverseDigits(int num, int rev = 0) {
// Base case: when the number becomes 0
if (num == 0) {
return rev;
}
// Recur with the remaining number and update the reversed number
return revers... | ALGO | 0.997651 | 6.584042 |
fdb69014-6b8e-4d66-ac61-ab7970c333e5 | ishandutta2007/codeforces | peltorator/normal/1153/C.cpp | #ifdef ONPC
# define _GLIBCXX_DEBUG
#define deb(a) cerr << "========" << #a << " = " << a << endl;
#else
#define deb(a)
#endif
#define sz(a) (int)(a).size()
#include <bits/stdc++.h>
using namespace std;
//mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
mt19937 rnd(time(0));
typedef long lo... | ALGO | 0.999408 | 3.833703 |
01de1a61-67a0-4cbb-9874-dbd1acc057c7 | Abheast12/programming-contests | codeforces/misc/treecutting.cpp | #include<iostream>
#include<vector>
using namespace std;
vector<int>v[100100];
int vis[100100];
int tot = 0;
int dfs(int cur, int val){
vis[cur] = 1;
int ct = 1;
for(int i=0; i<v[cur].size(); i++){
if(vis[v[cur][i]] == 0){
// vis[v[cur][i]] = 1;
ct+=dfs(v[cur][i], val);
... | ALGO | 0.999962 | 4.857636 |
a735add1-ad9e-47be-bc01-ece3bb465557 | ChristianNemeno/School_repositories | Data_structures/Finals/prefixExpression.cpp | #include <bits/stdc++.h>
#include <string>
#include <stack>
using namespace std;
double evaluatePrefix(string expression){
int endPointer = expression.length();
stack<double> myStack;
double op1;
double op2;
for(int i = endPointer-1; i>=0; i--){
if(isdigit(expression[i])){
... | ALGO | 0.998443 | 5.887751 |
fc1ec592-fe93-4180-a8d1-edbcf8baa2b2 | blegal/Minimizers | apps/min_sorter_ref.cpp | #include <cstdio>
#include <vector>
#include <algorithm>
#include <omp.h>
#include <getopt.h>
#include "../src/hash/CustomMurmurHash3.hpp"
#include "../src/front/fastx/read_fastx_file.hpp"
#include "../src/sorting/std_2cores/std_2cores.hpp"
#include "../src/sorting/std_4cores/std_4cores.hpp"
#include "../src/sorting... | ALGO | 0.996976 | 4.333403 |
dc12a4d1-1fb6-43f7-bafe-71e6e9c5c389 | MuhammadUmerHussain/DSA | hello world.cpp | #include<iostream>
using namespace std;
#include<iostream>
using namespace std;
class Node{
public:
int data;
Node *next;
Node(int d,Node *ptr)
{
data=d;
next=ptr;
}
};
class singly{
public:
Node *head;
singly()
{
head=NULL;
}
void push_back(int value)
{
Node *n;
n=new Node(... | ALGO | 0.998809 | 3.980136 |
df9010a6-e5b0-4fff-bef9-26158f195ab9 | cao777/tlbb_client | 天龙八部客户端/boost/libs/numeric/ublas/bench1/bench11.cpp | #include "bench1.hpp"
template<class T, int N>
struct bench_c_inner_prod {
typedef T value_type;
void operator () (int runs) const {
try {
static typename c_vector_traits<T, N>::type v1, v2;
initialize_c_vector<T, N> () (v1);
initialize_c_vector<T, N> () (v2);
... | TEST | 0.916886 | 6.238277 |
15637161-3e25-44fc-973a-eb7dc4e90f96 | ChanHoHan/baekjoon | Graph/Dijkstra/getting_minimum_cost.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <cstring>
#define endl "\n"
std::vector<std::pair<int, int> > graph[1002];
std::priority_queue<std::pair<int, int> > pq;
int bus_cost[1002];
int N, M, start, end;
void io_faster()
{
std::ios_base::sync_with_stdio(false);
std::cin.tie(0);
std::cout.tie... | ALGO | 0.999859 | 4.306571 |
92e991e8-a629-4214-b599-6867bfb39878 | mainul3195/codes | Atcoder/abc344/E_Insert_or_Erase.cpp | #include <bits/stdc++.h>
using namespace std;
#define inf 2000000000
vector<int> v;
void solve()
{
int n;
cin >> n;
map<int, int> par, child;
vector<int> v(n);
for (auto &i : v)
cin >> i;
par[v[0]] = 0;
child[0] = v[0];
par[inf] = v[n-1];
child[v[n-1]] = inf;
for (int i ... | ALGO | 0.999985 | 4.567939 |
58ef4d93-6d7a-47c4-af16-c0cabef34e05 | Cyrus2D/agent2d-data-extractor | src/chain_action/self_pass_generator.cpp | // -*-c++-*-
/*!
\file self_pass_generator.cpp
\brief self pass generator Source File
*/
/////////////////////////////////////////////////////////////////////
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "self_pass_generator.h"
#include "dribble.h"
#include "field_analyzer.h"
#include <rcsc/action... | ALGO | 0.965391 | 4.233219 |
f6a39f94-3620-42d0-a0dd-59f34a7aa563 | saranake/DataStructutesAndAlgorithms | Algorithms/Week2/fibonacci_partial_sum/fibonacci_partial_sum.cpp | #include <iostream>
#include <vector>
using std::vector;
long long get_fibonacci_partial_sum_naive(long long from, long long to) {
if (to <= 1)
return to;
long long previous = 0;
long long current = 1;
for (long long i = 0; i < from - 1; ++i) {
long long tmp_previous = previous;
... | ALGO | 0.999928 | 4.373011 |
b73d1536-cb49-4935-9d20-f066858e0de4 | abdmrknjc/Programiranje_1 | Zadatak_PR1_1_of_55/Zadatak_PR1_1_of_55/Zadatak_PR1_1_of_55.cpp | #include <iostream>
#include <math.h>
using namespace std;
/*Postujuci sve faze programiranja, napisati program koji korisniku omogucava
unos realnog broja x i odabir funkcije za proracun datog izraza.
Korisnik bira funkciju unosom jednog od sljedecih karaktera: 's'(sin), 'c'(cos).
U slucaju da korisnik unese karakter... | ALGO | 0.995897 | 3.893826 |
8dd4d819-3be6-4afb-acb6-38fd3b405035 | linyasha/BSU | C++/8.1.cpp | #include <iostream>
#include <initializer_list>
#include <cassert>
#include <ctime>
#include <fstream>
const unsigned int size = 1000000;
using std::cin;
using std::cout;
using std::initializer_list;
using std::istream;
using std::ostream;
using std::ofstream;
using std::ifstream;
template<typename T>
class vector... | ALGO | 0.994376 | 3.604768 |
0e7b5c50-a7e9-4f8f-bcf4-5f824116f207 | ishandutta2007/codeforces | zjjws/normal/1481/D.cpp | #include <string>
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <algorithm>
#define LL long long
using namespace std;
const int N=1e3+3;
inline LL rin()
{
LL s=0;
bool bj=false;
char c=getchar();
for(;(c>'9'||c<'0')&&c!='-';c=getchar());
if(c=='-')bj=true,c=getchar();
for(;... | ALGO | 0.999918 | 3.066091 |
8363168f-f48b-4e09-8310-13244343d139 | kishanrajput23/Apna-College-CPP-Course | Week 1/3.3 Operators in C++/precedency_example_02.cpp | #include<iostream>
using namespace std;
int main() {
int a;
a=(1,2,3);
cout<<a<<endl; // a=3 because Priority for the values inside a brackets () assigned to any variable is given from right to left
return 0;
} | ALGO | 0.952339 | 3.219122 |
f911b373-22bc-4e6e-aedb-92a74edef0ab | ullasreddy-chennuri/Interview-Prep-Programs | Convert Sum Tree.cpp | /*
A SumTree is a Binary Tree where the value of a node is equal to sum of the nodes present in the left subtree and right subtree.
You are given a binary tree and the task is to covert that tree into SumTree.
Note -
You have to complete convertSumTree() function, no need to implement the tree.
Consider empty tree as... | ALGO | 0.999907 | 5.798002 |
9e2d2d91-7d4b-4f13-8347-016a1c37a802 | nobossage/learn_cpp | Глава 5/86-1.cpp | #include <iostream>
#include <algorithm> // для std::swap. В C++11 используйте заголовок <utility>
//#include <string>
int getLengh()
{
std::cout << "Сколько имен ждать? : ";
int a;
std::cin >> a;
std::cin.ignore(32767, '\n');
return a;
}
std::string getName(int count)
{
std::cout << "Введит... | ALGO | 0.994895 | 4.243963 |
2066d15a-e5d5-4106-b84c-d1adf66f8fb5 | Gaurav3646/DSA_problems | 2785-sort-vowels-in-a-string/2785-sort-vowels-in-a-string.cpp | class Solution {
public:
// Returns true if the character is a vowel.
bool isVowel(char c) {
return c == 'a' || c == 'e' || c == 'o'|| c == 'u'|| c == 'i'
|| c == 'A' || c == 'E' || c == 'O'|| c == 'U'|| c == 'I';
}
string sortVowels(string s) {
unordered_map<char, int>... | ALGO | 0.999931 | 6.76515 |
193cb8a3-8498-4369-9b62-ab813af61bbe | PotatoProject/frameworks_base | libs/hwui/SkiaInterpolator.cpp | #include "SkiaInterpolator.h"
#include "include/core/SkMath.h"
#include "include/private/SkFixed.h"
#include "include/private/SkMalloc.h"
#include "include/private/SkTo.h"
#include "src/core/SkTSearch.h"
typedef int Dot14;
#define Dot14_ONE (1 << 14)
#define Dot14_HALF (1 << 13)
#define Dot14ToFloat(x) ((x) / 16384.... | ALGO | 0.992014 | 7.318485 |
853f3833-ae73-4348-8ecd-4142816747ac | gustavomuller99/Algo | zOld/friends at the cafeteria/main.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
int n, m, ans=0; cin>>n>>m;
vector<pair<int,int>> a(20000003);
for (int i = 0; i < n; ++i) {
int l,t; cin>>l>>t;
a[l].first++, a[l+t].second++;
}
int l = ... | ALGO | 0.999955 | 4.124037 |
331d8151-b32c-444c-b174-e300ac734716 | Shubham1727/GfgCoding | Medium/Lowest Common Ancestor in a Binary Tree/lowest-common-ancestor-in-a-binary-tree.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// Tree Node
struct Node
{
int data;
Node* left;
Node* right;
Node(){
data = 0;
left = right = NULL;
}
Node(int x){
data = x;
left = right = NULL;
}
};
// } Driver Code Ends
/* A binary tre... | ALGO | 0.999984 | 6.359184 |
f9d790ce-8837-4a07-a560-5f8a19f3e3bd | Saurabh-269/Leetcode-Solved-Questions | Move all negative elements to end - GFG/move-all-negative-elements-to-end.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution{
public:
void segregateElements(int arr[],int n)
{
// Your code goes here
int arr1[n],temp=0;
for(int i=0;i<n;i++)
{
if(arr[i]>=0)
{
... | ALGO | 0.999596 | 6.096948 |
d7f2a709-d17e-405d-a212-92bc19a21cd5 | czxnek/CPE211-CPlus-Projects | Project_09.cpp | //*******************************************
// Program Title: Project_09
// Project File: Project_09.cpp
// Name: Caleb Keller
// Course Section: CPE-211-01
// Lab Section: 03R
// Due Date: 04/11/2021
// program description: Computes Boolean algebra results of OR, AND. and XOR of 2 two-dimensional arrays of binary di... | ALGO | 0.997653 | 4.172569 |
cea6d9d8-b306-47b3-ae7a-d5f0771451cd | yuhancv/PAT-Advanced | 1151 LCA in a Binary Tree/main.cpp | #include <iostream>
#include "bits/stdc++.h"
using namespace std;
int m, n;
vector<int> pre, in;
struct Node{
int val;
Node *left, *right;
Node(int val){
this->val = val;
}
};
Node* create(int root, int start, int end){
if (start > end)
return nullptr;
int mid = start;
whi... | ALGO | 0.999959 | 4.480121 |
cab3e9a3-5a1d-4805-a232-c0023f0911d9 | Yash-YC/Source-Code-Plagiarism-Detection | gcj/gcj/188266/sidky/144111/0/extracted/b.cpp | #include <iostream>
#include <cassert>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <set>
#include <map>
#include <functional>
#include <queue>
#include <bitset>
#include <sstream>
#include <vector>
using namespace std;
#define sz(v) (int)v.size()
#define rep(i,n) for((i)=0;(i) <... | ALGO | 0.999904 | 3.597298 |
4efa795a-fb8f-4a6b-915a-5fed69145047 | barkhayadav12/TLE_problems | 800_Rated/q9.cpp | #include<bits/stdc++.h>
using namespace std;
#define pb push_back
typedef long long ll;
bool isSorted(vector<int>&v)
{
for(int i=0;i<v.size()-1;i++)
{
if(v[i]>v[i+1])
{
return false;
}
}
return true;
}
int gcd(int a,int b)
{
if(b==0)
{
return a... | ALGO | 0.999833 | 4.079628 |
36c0d764-0378-465c-a958-1ef85416f760 | alexstar55/CarND-Path-Plan | src/Eigen-3.3/test/sparse_permutations.cpp | static long int nb_transposed_copies;
#define EIGEN_SPARSE_TRANSPOSED_COPY_PLUGIN {nb_transposed_copies++;}
#define VERIFY_TRANSPOSITION_COUNT(XPR,N) {\
nb_transposed_copies = 0; \
XPR; \
if(nb_transposed_copies!=N) std::cerr << "nb_transposed_copies == " << nb_transposed_copies << "\n"; \
VERIFY( (#XPR... | TEST | 0.925454 | 6.245759 |
9fc17e03-f4f1-40d9-a0e8-6ccd8d33f320 | CodeByAshuu/CipherSchools | Day44/Q1SimpleBinaryTree.cpp | #include <iostream>
using namespace std;
struct Node {
int data;
Node* left;
Node* right;
Node(int value) : data(value), left(nullptr), right(nullptr) {}
};
int main() {
Node* root = new Node(1);
root->left = new Node(2);
root->right = new Node(3);
root->left->left = new Node(4);
... | ALGO | 0.99703 | 4.969852 |
9fc9baf3-9b72-426c-864d-7e132af36c09 | Jevan-National-University-of-Singapore/CS2040C_Data_Structures_and_Algorithms_C- | Alfred/CS2040C Data Structures and Algorithms/CS2040C Data Structures and Algorithms/Problem Set Assignments/PS2/A_Sim.cpp | //#include <bits/stdc++.h>
#include <iostream>
//#include <vector>
#include <string>
//#include <deque>
#include <list>
//#include <iterator>
//#include <sstream>
//#include <cmath>
//#include <algorithm>
using namespace std;
int main() {
int T; string line; list<char> decoded; list<char>::iterator k;
cin >> T; ci... | ALGO | 0.991469 | 3.260537 |
6334213f-52e7-46df-b4d6-1b2b5314b7bc | MrKaktus/Ngine5 | src/resources/forsyth.cpp | /*
Ngine v5.0
Module : Forsyth algorithm
Visibility : Engine internal code
Requirements: none
Description : Contains set of functions that optimize
3D model meshes for faster rendering by
graphic card.
*/
#include <math.h>
#include "core/rendering/device.h"
#include "resou... | ALGO | 0.999327 | 5.424825 |
ca09d753-f9e0-45df-8ed7-6e58f8e3b28d | yngflow/persik | lab_03/main.cpp | #include <iostream>
using namespace std;
void clearBit(int &x, int i) {
x &= ~(1 << i);
}
int main() {
int x, i;
cin >> x >> i;
clearBit(x, i);
cout << x;
return 0;
}
| ALGO | 0.998976 | 3.424465 |
75cc7861-4c35-4ea7-a0eb-84166ba3b1cd | andyyang200/CP | Competitive Programming/Useful Stuff/MyBookcode/Simplex.cpp | #include <bits/stdc++.h>
using namespace std;
#define FOR(index, start, end) for(int index = start; index < end; ++index)
#define RFOR(index, start, end) for(int index = start; index > end; --index)
#define FOREACH(itr, b) for(auto itr = b.begin(); itr != b.end(); ++itr)
#define RFOREACH(itr, b) qfor(auto itr = b.rbeg... | ALGO | 0.999856 | 4.015382 |
e62288d1-80c1-48c7-bee5-05ccff72e431 | ishandutta2007/codeforces | irkstepanov/normal/1028/E.cpp | #include <iostream>
#include <fstream>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <cmath>
#include <algorithm>
#include <assert.h>
#include <vector>
#include <cstring>
#include <bitset>
#include <random>
#define all(a) (a).begin(), (a).end()
#define sz(a) (int)(a).size()
#define pb push_... | ALGO | 0.999993 | 3.343009 |
4af2ce2a-4230-4704-8980-4b0319e7aa44 | byu-magicc/moving_targets | src/path_manager/half_plane_manager.cpp | /**
* @file half_plane_manager.cpp
* @author Parker Lusk <<EMAIL>>
*/
#include "path_manager/half_plane_manager.h"
namespace motion {
bool HalfPlaneManager::manage_waypoints(const coord_t& pos, waypoints_t& waypoints, float& distance) {
if (waypoints.size() < 3) {
std::cout << "[HalfPlaneManager] ... | ALGO | 0.998866 | 6.617635 |
e33a479b-c6a4-4d0c-8573-9b704a8be534 | anuragtiwari3100/DSA | Love-Babbar-450-master codes/09_backtracking/19_kth_permutation_sequence_of_first_N_natural_no.cpp | /*
sol: https://www.geeksforgeeks.org/find-the-k-th-permutation-sequence-of-first-n-natural-numbers/
link: https://leetcode.com/problems/permutation-sequence/
video: https://youtu.be/wT7gcXLYoao
(watch the explanation)
*/
// ----------------------------------------------------------------------------... | ALGO | 0.999985 | 6.47896 |
30cea9d6-9fb0-4323-bff4-a87d436c76cb | radioactive1014/renew | src/utils/eigen/doc/examples/tut_arithmetic_redux_basic.cpp | #include <iostream>
#include <Eigen/Dense>
using namespace std;
int main()
{
Eigen::Matrix2d mat;
mat << 1, 2,
3, 4;
cout << "Here is mat.sum(): " << mat.sum() << endl;
cout << "Here is mat.prod(): " << mat.prod() << endl;
cout << "Here is mat.mean(): " << mat.mean() ... | ALGO | 0.998446 | 3.872858 |
4aef5591-508c-4d1a-8c24-efff1c3e6343 | Francrack22/Primer_parcial | Codigo final/Codigo final.cpp | // Emilio Gonzalez Rosete
// Franco Emmanuel Ortega Cervantes
#include <iostream>
#include <forward_list>
#include <string>
#include <cmath>
#include <stack>
using namespace std;
// BinarySearchTree.h
template <typename T>
class BinarySearchTree
{
public:
struct Node
{
T data;
Node* left;
Node* right;
};
N... | ALGO | 0.999811 | 4.303819 |
38aa6f80-8a90-47d4-ac9d-e87fd64ea5b0 | Shuv25/DSA | 1Bit Manupulation/17AppearsOnce.cpp | #include <iostream>
using namespace std;
int main()
{
int n;
cout << "Enter the size of the array:";
cin >> n;
int *arr = new int[n];
cout << "Enter the elements of the array:";
for (int i = 0; i < n; i++)
{
cin >> arr[i];
}
int res = 0;
for (int i = 0; i < n; i++)
... | ALGO | 0.999625 | 5.051293 |
82e17eff-ac1d-417c-b92c-c0ea217714c5 | a3rk/remix-ninja-core | src/CryptoNoteCore/CryptoNoteTools.cpp | #include "CryptoNoteTools.h"
#include "CryptoNoteFormatUtils.h"
using namespace CryptoNote;
template<>
bool CryptoNote::toBinaryArray(const BinaryArray& object, BinaryArray& binaryArray) {
try {
Common::VectorOutputStream stream(binaryArray);
BinaryOutputStreamSerializer serializer(stream);
std::string ... | TOOL | 0.885653 | 6.218729 |
673baea1-9521-457f-9eee-b726acc6276a | CunjunWang/leet-code-cpp | solution0071_SimplifyPath/main.cpp | //
// Created by 王存俊 on 2019-09-14.
//
#include <iostream>
#include <vector>
#include <unordered_map>
#include <map>
#include <stack>
#include <queue>
#include <sstream>
#include <cassert>
#include <list>
#include <set>
#include <unordered_set>
#include "TreeNode.h"
#include "ListNode.h"
#include "Helpers.h"
using na... | ALGO | 0.997284 | 5.30206 |
b9db5af7-f632-4012-86bf-878d0f9c20ba | RohanDoshi21/SE_PICT_SEM3 | DSL_Lab/Assignment10.cpp | //! Author: Rohan Doshi
//? Problem statement Group D - 27
/*
Implement C++ program for expression conversion as infix to postfix and its evaluation
using stack based on given conditions:
1. Operands and operator, both must be single character.
2. Input Postfix expression must be in a desired format.
... | ALGO | 0.999636 | 5.329403 |
f53d3812-65eb-4f0e-92a2-76fe8fb4abd7 | ishaankalsi/All_algos_ds_needed | code/backtracking/permutations_of_string/permutations_of_string.cpp | #include<bits/stdc++.h>
/* Function to swap values at two pointers */
// Part of Cosmos by OpenGenus Foundation
void swap(char *x, char *y)
{
char temp;
temp = *x;
*x = *y;
*y = temp;
}
/* Function to print permutations of string
This function takes three parameters:
1. String
2. Starting inde... | ALGO | 0.999984 | 5.624362 |
c6c186f9-0686-4088-bb9d-02c75e9105a2 | Yashsri18/gfg-potd | max_distance_bw_same_element.cpp | class Solution {
public:
int maxDistance(vector<int> &arr) {
// Code here
int ans =-1;
unordered_map<int,pair<int,int>>mp;
for(int i = 0 ; i <arr.size();i++){
if(mp.find(arr[i])==mp.end())mp[arr[i]].first=i;
mp[arr[i]].second=i;
}
for(auto i ... | ALGO | 0.999859 | 5.080799 |
56d12722-d664-4d76-97c2-85b0c8fc9a48 | shirishbahirat/algorithm | stones.cpp | #include <cstring>
#include <iostream>
using namespace std;
class Solution
{
public:
int numJewelsInStones(string jewels, string stones)
{
int count = 0;
for (int i = 0; i < jewels.size(); ++i)
{
for (int j = 0; j < stones.size(); ++j)
{
if (jewels[i] == stones[j])
count... | ALGO | 0.961918 | 5.681189 |
983719e2-86e2-46d8-bb7a-949fd4c475a9 | dittoo8/algorithm_cpp | SWEA/1859.cpp | #include <iostream>
using namespace std;
int num[1000002];
int main(){
int tc;
scanf("%d", &tc);
for(int t=1;t<=tc;t++){
int n;
long long res=0;
scanf("%d", &n);
for(int i=0;i<n;i++){
scanf("%d", &num[i]);
}
int mx = num[n-1];
for(int i=n-1... | ALGO | 0.998704 | 3.14956 |
a79212c3-962a-4751-ab58-ff9748325484 | ningnawang/Computer_Graphics | 4. An Animation Editor/src/texture.cpp | #include "texture.h"
#include <assert.h>
#include <iostream>
#include <algorithm>
using namespace std;
namespace CMU462 {
inline void uint8_to_float( float dst[4], unsigned char* src ) {
uint8_t* src_uint8 = (uint8_t *)src;
dst[0] = src_uint8[0] / 255.f;
dst[1] = src_uint8[1] / 255.f;
dst[2] = src_uint8[2] ... | ALGO | 0.933029 | 5.79247 |
2fbd8b71-b263-4527-bae0-f71c3a575500 | Corycle/OI-Codes | Bashu OnlineJudge/5166.cpp | /*====Corycle====*/
#include<algorithm>
#include<iostream>
#include<iomanip>
#include<cstring>
#include<cstdlib>
#include<complex>
#include<cstdio>
#include<vector>
#include<cmath>
#include<ctime>
#include<stack>
#include<queue>
#include<map>
#define ll long long
#define lson p<<1,l,mid
#define rson p<<1|1,mid+1,r
usin... | ALGO | 0.999754 | 3.689157 |
6d9daa6e-795a-4730-b819-4d401c14aaa9 | jevrii/storm_black | Solutions/CF/1471/D.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
//#pragma GCC optimize ("trapv")
using namespace std;
#define pii pair<int, int>
#define pll pair<long long, long long>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define DEBUG 1
#define cerr if (DEBUG) cerr
#define te... | ALGO | 0.999791 | 3.944225 |
8be0e4b8-72e1-4fbc-9238-c6e72780da50 | ymcki/llama.cpp-b4139 | examples/embedding/embedding.cpp | #include "arg.h"
#include "common.h"
#include "log.h"
#include "llama.h"
#include <ctime>
#if defined(_MSC_VER)
#pragma warning(disable: 4244 4267) // possible loss of data
#endif
static std::vector<std::string> split_lines(const std::string & s, const std::string & separator = "\n") {
std::vector<std::string> l... | DATA | 0.941104 | 6.519619 |
186cbd31-2585-428a-8539-cf8729169646 | mabseher/htd | src/htd/RandomVertexSelectionStrategy.cpp | #ifndef HTD_HTD_RANDOMVERTEXSELECTIONSTRATEGY_CPP
#define HTD_HTD_RANDOMVERTEXSELECTIONSTRATEGY_CPP
#include <htd/Globals.hpp>
#include <htd/RandomVertexSelectionStrategy.hpp>
#include <algorithm>
#include <random>
htd::RandomVertexSelectionStrategy::RandomVertexSelectionStrategy(std::size_t limit) : limit_(limit)
... | ALGO | 0.990475 | 6.459988 |
d694a217-00ad-4a38-94fa-c8c20d5d285a | NancyHu3245/WF-SLAM | Thirdparty/DBoW2/DBoW2/BowVector.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <cmath>
#include "BowVector.h"
namespace DBoW2 {
// --------------------------------------------------------------------------
BowVector::BowVector(void)
{
}
// -------------------------------------------------------------------... | TOOL | 0.940455 | 5.33147 |
a6868810-0362-4b4f-becb-c932c59ab75d | CarbonROM/android_frameworks_base | core/jni/android_os_SystemProperties.cpp | #define LOG_TAG "SysPropJNI"
#include <utility>
#include <optional>
#include "android-base/logging.h"
#include "android-base/parsebool.h"
#include "android-base/parseint.h"
#include "android-base/properties.h"
#include "utils/misc.h"
#include <utils/Log.h>
#include "jni.h"
#include "core_jni_helpers.h"
#include <nati... | TOOL | 0.869047 | 6.279308 |
d90132a9-2f06-469a-8b15-602b5d3aa31a | Zielon/3DScanning | Exercises/Exercise1/libs/Eigen/bench/spmv.cpp |
//g++-4.4 -DNOMTL -Wl,-rpath /usr/local/lib/oski -L /usr/local/lib/oski/ -l oski -l oski_util -l oski_util_Tid -DOSKI -I ~/Coding/LinearAlgebra/mtl4/ spmv.cpp -I .. -O2 -DNDEBUG -lrt -lm -l oski_mat_CSC_Tid -loskilt && ./a.out r200000 c200000 n100 t1 p1
#define SCALAR double
#include <iostream>
#include <algor... | ALGO | 0.936339 | 4.318557 |
6825fb58-a4c9-40b7-bb6d-7cccbf81a2ba | LazyPlanet/MX-Architecture | ThirdParty/boost_1_63_0/libs/numeric/ublas/doc/samples/vector_unary.cpp | #include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/io.hpp>
int main () {
using namespace boost::numeric::ublas;
vector<std::complex<double> > v (3);
for (unsigned i = 0; i < v.size (); ++ i)
v (i) = std::complex<double> (i, i);
std::cout << - v << std::endl;
std::cout ... | ALGO | 0.858414 | 3.086197 |
0a3d6294-6816-4fc4-8468-bcc7350da545 | vaudaine/Comparing_embeddings | Snap/snap-core/ggen.cpp | /////////////////////////////////////////////////
// Graph Generators
namespace TSnap {
PBPGraph GenRndBipart(const int& LeftNodes, const int& RightNodes, const int& Edges, TRnd& Rnd) {
PBPGraph G = TBPGraph::New();
for (int i = 0; i < LeftNodes; i++) { G->AddNode(i, true); }
for (int i = 0; i < RightNodes; i++)... | ALGO | 0.984567 | 5.357616 |
8ae9d315-2432-40e2-9bd2-d4e3929b65e4 | ChiyoYuki/xcpc | cf/gym/fireflycup/B_Nabi_Puzzle.cpp | /**
* author: ChiyoYuki
**/
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
#define st first
#define nd second
#define elif else if
typedef signed char i1;
typedef signed short int i2;
typedef signed int i4;
typedef signed long long int i8;
typedef unsigned char u1;
typedef unsigne... | ALGO | 0.999816 | 3.502935 |
2788cf5e-dd59-49ee-9102-dddb923cc31f | Sookmyung-Algos/2021algos | algos_assignment/team_pratice/ACM ICPC/AlgosZzang/9월 3주차/1149.cpp | // 1149 RGB거리
#include <iostream>
#include <algorithm>
using namespace std;
int rgb[1001][3];
int dp[1001][3];
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
int n; cin >> n;
for (int i = 1; i <= n; i++) {
for (int j = 0; j < 3; j++) {
cin >> rgb[i][j];
}
... | ALGO | 0.999639 | 4.804626 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.