uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
eba46baf-be1d-420a-9863-d56b685bb9d8
YooJuno/ORB-SLAM3_tensorRT
Thirdparty/g2o/g2o/types/types_seven_dof_expmap.cpp
#include "types_seven_dof_expmap.h" namespace g2o { VertexSim3Expmap::VertexSim3Expmap() : BaseVertex<7, Sim3>() { _marginalized=false; _fix_scale = false; } EdgeSim3::EdgeSim3() : BaseBinaryEdge<7, Sim3, VertexSim3Expmap, VertexSim3Expmap>() { } bool VertexSim3Expmap::read(std::istream&...
ALGO
0.88759
5.916917
bc7952f2-5d1d-4539-bc65-3675e6a862b1
YerkinBS/PP1_2020
lab6/k.cpp
#include <bits/stdc++.h> using namespace std; void sumFinder(string s){ int sum = 0; for(int i = 0; i < s.size(); i++){ sum += s[i] - '0'; } cout << sum; } int main(){ string s; cin >> s; sumFinder(s); }
ALGO
0.99933
4.509255
da856ff8-fd0b-4d59-99f1-efc2edc032b4
a-y-u-s-h/competitive
codechef/KNIGHT2.cpp
#include <bits/stdc++.h> int main(int argc, char const *argv[]) { int T; std::cin >> T; for (int t = 0 ; t < T; t += 1) { int X1, Y1, X2, Y2; std::cin >> X1 >> Y1 >> X2 >> Y2; /* ====================================== Chef has an 8x8 chessboard. He placed the knight on the squar...
ALGO
0.999861
4.491979
bbd5c870-8e76-4945-bca4-afaa593b5a8e
henrymound/2018-Summer-Research
Golang/Tello/references/opencv/modules/videostab/src/deblurring.cpp
#include "precomp.hpp" #include "opencv2/videostab/deblurring.hpp" #include "opencv2/videostab/global_motion.hpp" #include "opencv2/videostab/ring_buffer.hpp" namespace cv { namespace videostab { float calcBlurriness(const Mat &frame) { CV_INSTRUMENT_REGION() Mat Gx, Gy; Sobel(frame, Gx, CV_32F, 1, 0); ...
ALGO
0.955569
5.552778
8f199d7f-8a58-4657-9a49-c9354796ff77
Viranchee/leetcode
TIHandbook/Arrays/LinkedList.cpp
#include <algorithm> #include <deque> #include <iterator> #include <list> #include <numeric> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} Li...
ALGO
0.999471
5.906721
a6493757-e017-4965-a804-e03b72636bd5
MySummertime/leetcode
704.Binary Search.cpp
#include <vector> using std::vector; class Solution_1 { public: // binary search (l, r] int search(vector<int>& nums, int target) { int len = nums.size(); return binarySearch(nums, 0, len - 1, target); } private: int binarySearch(const vector<int>& nums, int l, int r, const int& targe...
ALGO
0.999988
6.316106
b14d41ff-3e14-43aa-822b-c01ffc306683
PercibalVasquez/shoop
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
3b72f249-0ea5-4b00-b724-0abeccc3ca6b
krishna-bansal/lift-of-c-
assignment week-1/practice questions/question5.cpp
#include <iostream> using namespace std; int main() { float side1, side2, side3; cout << "Enter the lengths of the three sides of the triangle: "; cin >> side1 >> side2 >> side3; if (side1 == side2 && side2 == side3) { cout << "It is an equilateral triangle." << endl; } else if...
ALGO
0.99642
4.632396
5992778f-13c0-4035-9121-370893a5c773
prisma-lab/Tethering-human-with-quadruped
idyntree/src/core/src/SpatialInertiaRaw.cpp
#include <iDynTree/Core/SpatialInertiaRaw.h> #include <iDynTree/Core/SpatialForceVector.h> #include <iDynTree/Core/SpatialMotionVector.h> #include <iDynTree/Core/PositionRaw.h> #include <iDynTree/Core/Utils.h> #include <iDynTree/Core/PrivateUtils.h> #include <Eigen/Dense> #include <iostream> #include <sstream> #incl...
ALGO
0.964668
6.730886
31578150-9478-44c7-ac1a-2c3122f5ac6b
NikitaUssyukin/PP1_2024_Spring
Practice/G3/Week13/lab10b_2.cpp
#include <iostream> #include <algorithm> #include <vector> #include <cmath> using namespace std; int N = 0; long long gen_func() { long long power = powl(N, N); N++; return power; } int main() { int n; cin >> n; n++; vector<long long> v(n); generate(v.begin(), v.end(), gen_func); ...
ALGO
0.999539
3.877519
070414ff-ccce-46c3-a1f6-12b560603d76
giri69/StriverSheet-solutions
Stacks and queues/2104. Sum of Subarray Ranges.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: long long subArrayRanges(vector<int>& nums) { int n = nums.size(); vector<int> leftMin(n, 0), rightMin(n, 0); vector<int> leftMax(n, 0), rightMax(n, 0); stack<int> minStack; stack<int> maxStack; f...
ALGO
0.999829
4.903175
1eb0d439-819f-4c44-b6eb-6fcacf3dcbd1
GauravK15062003/Data-Structure-and-Algorithm
Array/2DArray/matrixMultiplication.cpp
#include<iostream> using namespace std; int main(){ int m; cout<<"Enter no. of rows of 1st matrix : "; cin>>m; int n; cout<<"Enter no. of cols of 1st matrix : "; cin>>n; int p; cout<<"Enter no. of rows of 2nd matrix : "; cin>>p; int q; cout<<"Enter no. of cols of 2nd matrix :...
ALGO
0.999569
3.237452
4be80fb3-fb86-4eb7-b932-f30b66e4de0d
voe09/CPPPlayGround
Round1/DFS/ZumaGame.cpp
/* Think about Zuma Game. You have a row of balls on the table, colored red(R), yellow(Y), blue(B), green(G), and white(W). You also have several balls in your hand. Each time, you may choose a ball in your hand, and insert it into the row (including the leftmost place and rightmost place). Then, if there is a group...
ALGO
0.999982
5.459946
0c2027f8-68c6-45f2-ba6d-4086a4761b4d
mannpandya28/HackerRank-Solutions
Algorithmic Challenges/Utopian Tree.cpp
#include <math.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> #include <limits.h> #include <stdbool.h> int main(){ int t; scanf("%d",&t); for(int a0 = 0; a0 < t; a0++){ int h=1; int n; scanf("%d",&n); for(int a1=0;a1<=n;a1++) { ...
ALGO
0.999755
3.80344
c3850e8c-4d89-443d-b8b0-8d5170a05e1a
Akimi-coder/pilot
libraries/AP_Proximity/AP_Proximity_RangeFinder.cpp
#include "AP_Proximity_RangeFinder.h" #if HAL_PROXIMITY_ENABLED #include <AP_HAL/AP_HAL.h> #include <ctype.h> #include <stdio.h> #include <AP_RangeFinder/AP_RangeFinder.h> #include <AP_RangeFinder/AP_RangeFinder_Backend.h> // update the state of the sensor void AP_Proximity_RangeFinder::update(void) { // exit imm...
TOOL
0.959442
5.922794
6b375166-dcb0-4c45-9402-a0a21e33e1b4
michaelboccara/new-chronotext-toolkit
src/chronotext/utils/glUtils.cpp
#include "chronotext/utils/glUtils.h" #include "chronotext/utils/Utils.h" #include "chronotext/utils/MathUtils.h" using namespace std; using namespace ci; const Matrix44f getPerspectiveMatrix(float fovy, float aspect, float zNear, float zFar) { float ymax = zNear * math<float>::tan(fovy * PI / 360); float ymi...
TOOL
0.860135
6.066525
932a90ec-ab5a-4cb1-8f2c-b583e68d2ebf
raysjoshua/UnrealEngine
Engine/Source/ThirdParty/nvTextureTools/nvTextureTools-2.0.8/src/src/nvmath/SphericalHarmonic.cpp
// This code is in the public domain -- <EMAIL> #include <nvmath/SphericalHarmonic.h> using namespace nv; namespace { // Basic integer factorial. inline static int factorial( int v ) { if (v == 0) { return 1; } int result = v; while (--v > 0) { result *= v; } return result; } // Double fa...
TOOL
0.999396
6.800396
edb6e567-bc4e-4a2a-ac45-f4aa85fa93e6
mhilmyh/algo-data-struct
leetcode/search-position-insert.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int searchInsert(vector<int>& nums, int target) { int j = nums.size()/2; int i = 0; while(j) { if (i+j >= nums.size() || nums[i+j] > target || j >= nums.size()) j /= 2; else ...
ALGO
0.999922
6.099441
a6f447ff-dc4f-4c58-a229-2dcf832dcb26
Kurkuzabra/NetLibpp
netlibpp/src/include/linalg/linalg.cpp
#pragma once #include <cinttypes> #include <cmath> template <typename T> T norm(T *x, std::size_t length) { T sum = 0; for (std::size_t i = 0; i < length; i++) { sum += x[i] * x[i]; } return sqrt(sum); } template <typename T> void scalar_div(T *x, T r, std::size_t length, T *y) { for...
ALGO
0.99497
6.555868
53bf5207-0c1b-4cc3-ad2f-e384422f3f33
astrixsanath14/LeetCode
171-excel-sheet-column-number/171-excel-sheet-column-number.cpp
class Solution { public: int titleToNumber(string s) { return accumulate(s.begin(), s.end(), 0, [](const int&a, const char&b){return 26 * a + (b - 'A') + 1;}); } }; /* A - 26^0 * 1 B - 26^0 * 2 AA - 26^1 * 1 + 26^0 * 1 BA - 26^1 * 2 + 26^0 * 2 AAA - 26^3 * 1 + 26^2 * 1 + 26^0 * 0 */
ALGO
0.999923
6.480376
6de8a18e-9ade-4572-a186-d0e514ff3ca1
CodeWizard-Ishu/Leetcode-GFG
Medium/Bottom View of Binary Tree/bottom-view-of-binary-tree.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; #define MAX_HEIGHT 100000 // Tree Node struct Node { int data; Node* left; Node* right; }; // Utility function to create a new Tree Node Node* newNode(int val) { Node* temp = new Node; temp->data = val; temp->left = NULL; ...
ALGO
0.999661
6.54035
a897012f-4ff7-473f-87a8-f560f3e9f37d
yoo-jimin127/2020_2_algorithm
assignment10/monte_carlo.cpp
#include<stdio.h> #include<time.h> #include<stdlib.h> int W[7] = { 0,2,10,13,17,22,42 };// κ int sum_W = 52;//κ int estimate_sumofsubset(int n); //Monte Carlo ˰ ð ȿ ϴ Լ int promising(int start, int weight, int sum); // Ȯϱ Լ int main(void) { printf(" ġ -> %u", estimate_sumofsubset(6)); //κ 6 ڷ ѱ return 0;...
ALGO
0.999618
3.161874
ad71f742-ce5c-4d96-b83d-a965bccb7bd9
wells-wei-wei/smplify-x_in_docker
opencv-4.2.0/samples/cpp/pca.cpp
/* * pca.cpp * * Author: * Kevin Hughes <kevinhughes27[at]gmail[dot]com> * * Special Thanks to: * Philipp Wagner <bytefish[at]gmx[dot]de> * * This program demonstrates how to use OpenCV PCA with a * specified amount of variance to retain. The effect * is illustrated further by using a trackbar to * change the value...
ALGO
0.965398
6.821888
664aed2d-a8be-47b2-896a-48af98ac7952
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Phi/top0-100/cherry-pickup-Solution.cherryPickup/177857_nan.cpp
plan_a (char const *filename) { char const *s; char const *lim; char const **ptr; char *buffer; lin iline; size_t size = instat.st_size; /* Fail if the file size doesn't fit in a size_t, or if storage isn't available. */ if (! (size == instat.st_size && (buffer = malloc (size ? size : (size_t) ...
ALGO
0.99161
4.595113
09c7479a-5626-4b0b-b430-9168c68d90d8
aYaFish/leetcode
489.robot-room-cleaner.cpp
/* * @lc app=leetcode id=489 lang=cpp * * [489] Robot Room Cleaner */ // @lc code=start /** * // This is the robot's control interface. * // You should not implement it, or speculate about its implementation * class Robot { * public: * // Returns true if the cell in front is open and robot moves into th...
ALGO
0.99898
7.080854
7e62756f-b543-434a-9d00-58e5af208551
Hamsik2rang/Today-I-Solved
Problems/Math/2525.cpp
#include <iostream> using namespace std; int main() { int h, m, t; cin >> h >> m >> t; m += t % 60; h += t / 60; int carry = m / 60; m %= 60; h += carry; h %= 24; cout << h << " " << m; return 0; }
ALGO
0.998512
4.593663
c9d540d9-fe62-48de-9c9b-8ff82c5ce03e
satyamgupta0202/Interview-Preparation
14-longest-common-prefix/14-longest-common-prefix.cpp
class Solution { public: string longestCommonPrefix(vector<string>& str) { string ans = ""; int n = str.size(); string temp = str[0]; for(int i=0;i<temp.size();i++) { char k = temp[i]; cout<<k<<endl; int c=0; ...
ALGO
0.999781
5.162813
65844e71-b5b5-4c81-9a5e-8511ec42dec0
ManuScript07/Mirea_course
Spinners/2.cpp
#include <iostream> using namespace std; int main(){ int m; cout<<"m = "; if (!(cin>>m)){ cout<<"Incorrect digit"; return 0; } int l4 = m % 3; int l3 = (m - 4 * l4) / 3; if (l3 >= 0) { cout<<l3<<endl<<l4; } else cout<<"0\n0"; return 0; }
ALGO
0.999827
3.542099
fb2cc48b-f13a-429d-80ae-6214da0e476b
LyTruongsinh/DSA
Algorithms/Back_Tracking/Day_so_co_tong_bang_so_cho_truoc.cpp
#include <iostream> #include <vector> using namespace std; void findCombinations(int n, int start, vector<int> &current) { if (n == 0) { for (unsigned i = 0; i < current.size(); i++) { cout << current[i]; if (i == current.size() - 1) { cout << ...
ALGO
0.999994
5.464178
fb9c8cbe-4066-48aa-b3f8-dd7df9da00b9
Tushar-Harsora/AdventOfCode2024
Day10/a.cpp
#include <algorithm> #include <functional> #include <iostream> #include <map> #include <set> #include <sstream> #include <string> #include <vector> #include <cassert> using namespace std; using ll = long long; array<int, 4> dx = {-1, 1, 0, 0}; array<int, 4> dy = {0, 0, -1, 1}; int dfs(const vector<vector<int>>&g, set...
ALGO
0.999441
6.250337
4e1fe8a8-3293-4176-98a1-d832589f8b07
SocialTermite/FlappyBirdCocosx
FlappyBirds/FlappyBirds/cocos2d/cocos/storage/local-storage/LocalStorage.cpp
/* Local Storage support for the JS Bindings for iOS. Works on cocos2d-iphone and cocos2d-x. */ #include "LocalStorage.h" #include "platform/CCPlatformMacros.h" #if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID) #include <stdio.h> #include <stdlib.h> #include <assert.h> #include <sqlite3.h> static int _initialized ...
TOOL
0.85345
5.911682
93c9081d-8334-4128-9800-9a3521b3490f
TenshiJP/Cpp-Data-Structures-Projects
Listas_Simples-Tarea/main.cpp
/* Nombre: Angel Roberto Jacinto Payes No.Carnet: 5990-20-1756 */ #include <iostream> #include <conio.h> #include <stdio.h> #include <stdlib.h> #include <cstring> using namespace std; //Nodo que representar la lista. typedef struct nodo{ int codigo; //El cdigo del cliente sern unicamente nume...
TOOL
0.98271
3.791845
7dc8d412-c08e-421b-ab1a-caedce087cc4
titsuki/AOJ
Volume_23/2350_A-B_Problem.cpp
#define _USE_MATH_DEFINES #include <iostream> #include <sstream> #include <cmath> #include <algorithm> #include <queue> #include <stack> #include <limits> #include <map> #include <string> #include <cstring> #include <set> #include <deque> #include <bitset> using namespace std; typedef long long ll; typedef pair<int,...
ALGO
0.999854
3.725082
113cf758-41b7-4853-91f0-abf534611f25
Naman200111/Implementations
generate_parenthesis.cpp
void generate_parenthesis(int n, int close, int open, string tmp) { if(open == close && close == n) { cout<<tmp<<endl; return; } if(open > close) { // closing parenthesis tmp.push_back(')'); generate_parenthesis(n, close+1, open, tmp); tmp.pop_back(); if(open < n) { // apply opening paren...
ALGO
0.999918
4.469725
fd710aad-9aff-4899-b4e3-37f5abc0cd93
abhishek18124/LVCPPSept2023
Lecture 27/01 Strings Problem Solving/001Strings_PalindromicSubstrings.cpp
#include<iostream> #include<string> using namespace std; // worst-case n/2 steps bool isPalindrome(const string& s) { int i = 0; int j = s.size() - 1; while (i < j) { if (s[i] != s[j]) { // s is not a palindrome return false; } i++; j--; } // s is a palindrome return true; } // O(n^3) int c...
ALGO
0.999865
6.67309
c9683e78-70e7-4aa0-be1d-0e8f8b363f1c
Hrusteckiy/07rc1
3rd party/boost/libs/graph/example/print-adjacent-vertices.cpp
using namespace boost; template < typename Graph, typename VertexNamePropertyMap > void read_graph_file(std::istream & graph_in, std::istream & name_in, Graph & g, VertexNamePropertyMap name_map) { typedef typename graph_traits < Graph >::vertices_size_type size_type; size_type n_vertices; typena...
ALGO
0.973278
5.745994
0758efb8-92cb-49e4-ba69-4172cc8cbca8
anubhvshrma18/100-Days-LeetCode-Challenge-Insta
Day-003/Starting Node of Loop in LL.cpp
// Leetcode - https://leetcode.com/problems/linked-list-cycle-ii/ // Part-1 Brute Force class Solution { public: ListNode *detectCycle(ListNode *head) { unordered_map<ListNode*, bool> mp; ListNode* temp=head; while(temp!=NULL) { if(mp[temp]) { return temp; ...
ALGO
0.999874
5.98789
09cf5743-9605-4d62-a222-77df6382827c
junewaves/contests
NCKU_CP/Class_contest_5/60.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; vector<vector<int>> a, an; vector<int> dep; void dfs(int u, int p, int d) { dep[u] = d; for (int v : a[u]) { if (v == p) continue; an[v][0] = u; for (int i = 1; i <= log2(d + 1); i++) { if (an[v][i - 1] != -1...
ALGO
0.999988
4.933925
146d2603-792c-4407-9468-fcbdc86e1e37
Tamimkhan7/CF-Contest
540/A Water Buying.cpp
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> #define faster \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ ...
ALGO
0.999809
3.545018
c260f230-69bb-4424-b3cd-28b874c11b8d
salahedine2008/code3
nlsolver.cpp
// file NLSOLVER.CPP #include "nlsolver.h" #include "skyline.h" #include "flotarry.h" #include "dictionr.h" #include "domain.h" #include "linsyst.h" #include "timinteg.h" #include "constantstiffness.h" #include "newtonraphson.h" #include <stdio.h> #include <iostream> #include "stdafx.h" using namespace std; NLSolv...
ALGO
0.998757
4.908154
af35971b-9832-4162-90a5-ffb733885a81
scpunctual6/ecommerce-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.998799
6.776823
e378801f-7095-4457-8311-bba89033775b
ishandutta2007/codeforces
ljecll/normal/1012/C.cpp
/* PROG: source LANG: C++11 _____ .' '. / 0 0 \ | ^ | | \ / | \ '---' / '._____.' */ #include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; struct chash { int operator()(int x) const ...
ALGO
0.999988
3.70658
acabe2c5-a832-4da8-bfb7-d32e5d40da84
jeremycollake/firmware-mod-kit
src/others/squashfs-4.0-realtek/lzma/CPP/Windows/FileFind.cpp
// Windows/FileFind.cpp #include "StdAfx.h" #include "FileFind.h" #ifndef _UNICODE #include "../Common/StringConvert.h" #endif #ifndef _UNICODE extern bool g_IsNT; #endif namespace NWindows { namespace NFile { #if defined(WIN_LONG_PATH) && defined(_UNICODE) #define WIN_LONG_PATH2 #endif bool GetLongPath(LPCWSTR f...
TOOL
0.954496
5.979875
edb8ec9f-fa0e-44a9-90c3-1bfb0688bd91
arthurpham/quantlib-full
QuantLib/ql/pricingengines/vanilla/fdvanillaengine.cpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #include <ql/pricingengines/vanilla/fdvanillaengine.hpp> #include <ql/instruments/payoffs.hpp> #include <ql/grid.hpp> #include <ql/methods/finitedifferences/operatorfactory.hpp> #include <ql/instruments/oneassetoption.hpp> namespace Quant...
ALGO
0.968405
7.643599
baa962f1-30b9-4b07-a7d2-45cf9f9fec30
CarlosDv1010/CP-problems
CSES/Removal Game.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<vi> vvi; typedef vector<vll> vvll; typedef pair <int,int> pii; typedef pair <ll,ll> pll; typedef vector<pii> vpii; typedef vector<pll> vpll; typedef vector<vpii> v...
ALGO
0.999915
3.620405
b25fdb47-08a8-428a-b37e-19ecb902a594
droy249/DSA
PepCoding Level 1/Recursion and Backtracking - Level 1/print encoding.cpp
// Question Link: https://www.pepcoding.com/resources/online-java-foundation/recursion-on-the-way-up/print-encodings-official/ojquestion // Video Link: https://youtu.be/2ClSccwnq1Y?list=PL-Jc9J83PIiFxaBahjslhBD1LiJAV7nKs #include <iostream> using namespace std; void printEncoding(string encoded, string decoded = ""){ ...
ALGO
0.999739
5.643991
5341aecd-e142-46f6-8653-88e862174968
DG492003/CrackYourPlacement
Day 15/SearchinRotatedArr.cpp
// Approach -> O(logn) // steps-> // Place the 2 pointers i.e. low and high // Calculate the ‘mid’ // Check if arr[mid] = target: If it is, return True. // Check if arr[low] = arr[mid] = arr[high]: // if this condition is satisfied, we will just increment the low pointer and decrement the high ...
ALGO
0.999993
6.544975
b55c4c2b-40e1-4e05-b200-f2267ae3d0d6
prakosobay/tugas-pemrograman-bergerak
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.998799
6.776823
9f9dbc3f-4f5b-44d9-a027-6a5817dda2ad
cicuvc/LLVM-LA32R
libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.max_element.pass.cpp
// <algorithm> // UNSUPPORTED: c++03, c++11, c++14, c++17 // template<forward_iterator I, sentinel_for<I> S, class Proj = identity, // indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less> // constexpr I ranges::max_element(I first, S last, Comp comp = {}, Proj proj = {}); // // template<forward_r...
TEST
0.974609
6.847912
961b2c08-547b-492b-a69e-1b89bfb8f636
Vishwabvs/Algorithms
Dynamic Programming/Longest Increasing Subsequnce/Print_LIS.cpp
//https://www.geeksforgeeks.org/construction-of-longest-increasing-subsequence-using-dynamic-programming/ //Print LIS //Solution (DP): #include<iostream> #include<climits> #include<vector> #include<cstring> using namespace std; void lis(int arr[],int n,int& max_len) { vector<vector<int>> result(n); //int *look...
ALGO
0.999937
4.305574
e30b5091-36f0-4778-88cb-ea7ba5e2eaa6
ashish4538/competetvite_programming_stuff
some.cpp
#include <bits/stdc++.h> #define int long long #define FOR(i,a,b) for(int i=(a);i<(b);++i) using namespace std; const int inf=1e18; const int MAXN=1e5+10; const int MAXK=0; int arr[MAXN], tree[MAXN<<2]; struct data { int l,mx,mi; data(){}; data(int v){ mx=mi=v; l=0; } }; data combi...
ALGO
0.99964
4.314861
8bfd5b5b-e92c-4528-91b3-38e9e77dcf04
bayashi-cl/procon-submission
codeforces/1613/A/137641180.cpp
#line 2 "byslib/template/bys.hpp" #ifndef LOCAL #define NDEBUG #endif #include <algorithm> #include <array> #include <cassert> #include <cmath> #include <complex> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <map> #include <numeric> #include <queue> #include <set> #include <sta...
ALGO
0.999856
4.924159
f30e1bd7-873b-4396-89b2-55b87fb09b96
chenshaolong/C-Design-Patterns-and-Derivatives-Pricing-Exercises-Chapters-9-13
C++ Design Patterns and Derivatives Pricing Exercises Chapters 9-13/Chapter 9/SolveMain2.cpp
// C++ Design Patterns and Derivatives Pricing, Listing 9.8, page 170 /* Needs BlackScholesFormulas.cpp BSCallTwo.cpp Normals.cpp */ #include <iostream> #include <cmath> #include "NewtonRaphson.h" #include "BSCallTwo.h" #include "BlackScholesFormulas.h" #include "Format.h" using namespace std; int main(...
ALGO
0.997305
6.438589
b5b1bbe7-4734-4511-bccc-328ffae70ba8
Bob8percent/Programming-Abstractions-in-C-
01/Ex04.cpp
/* 入力した数だけ1から小さい順に奇数の和を計算するプログラム */ #include <iostream> int calcSumOddNums(int n); int main() { while (1) { int n = 0; std::cout << "入力:"; std::cin >> n; std::cout << n << "個の奇数の和:" << calcSumOddNums(n) << "\n"; } } int calcSumOddNums(int n) { int sum = 0; ...
ALGO
0.999343
5.13142
703b3270-a477-4e56-976b-2d7cc24808b6
zdzhaoyong/Map2DFusion
PIL/Thirdparty/fast/src/nonmax_3x3.cpp
// This function is taken from libCVD. The only change is the return type which // returns the index of the maxima scores and not a new vector of scores! // Created on: Dec 18, 2012 // Author: cforster #include <fast/fast.h> #include <vector> namespace fast { //This function has been moved from fast_corner.cxx. ...
ALGO
0.999777
6.738665
36fa7d32-d555-42f5-a011-f5561741a003
hjiang13/LLMs-in-IR
POJ-104/80/1319.cpp
#include <iostream> using namespace std; int main() { int i,t; int startyear,startMonth,startDay; int endyear,endMonth,endDay; int day,a,b,m=0,n=0; cin >> "%d%d%d",&startyear,&startMonth,&startDay); cin >> "%d%d%d",&endyear,&endMonth,&endDay); if((startyear%4==0 && startyear%100!=0) || (startyear%400==0)) { switch(star...
ALGO
0.999955
3.791012
4a4296be-b666-4d14-ba25-23cb88fd2433
Xaunther/AdventOfCode
2022/day2/src/main.cpp
#include <iostream> #include <list> #include <numeric> #include "year.h" #include "day.h" #include "FileUtils.h" #include "CMatch.h" #include "CFixedMatch.h" namespace { using namespace std::literals; static const std::string INPUT_FILE_NAME = "../../../../"s + YEAR + "/"s + DAY + "/input.txt"s; static const std::...
ALGO
0.875966
4.869506
aaedd59f-c923-4369-867f-72ebf814cac3
W0dichka/BSU
2nd Year/Algorithm/Dynamic Programming/Palindrom/main.cpp
#include <iostream> #include <fstream> #include <string> using namespace std; int main() { ifstream fin("input.txt"); ofstream fout("output.txt"); string s; fin >> s; int n = s.length(); int ** matrix = new int* [n]; for(int i = 0; i < n; i++) { matrix[i] = new int[n]; } ...
ALGO
0.999997
3.55163
5484b039-3907-4490-a93c-266cee25e69a
teswayze/rengar
src/syzygy_probe.cpp
# include "syzygy_probe.hpp" # include "movegen.hpp" # include "endgames.hpp" // This is all copied and adapted from python-chess's syzygy.py (as of version 1.10.0) const std::array<uint8_t, 64> TRIANGLE = { 6, 0, 1, 2, 2, 1, 0, 6, 0, 7, 3, 4, 4, 3, 7, 0, 1, 3, 8, 5, 5, 8, 3, 1, 2, 4, 5, 9, 9, 5, 4, 2...
ALGO
0.999337
6.68234
b8e1d13b-cfb4-439d-b4fe-7820da722608
Watunder/NEO-DOT
thirdparty/oidn/mkl-dnn/src/cpu/jit_sse42_convolution.cpp
#include "mkldnn_types.h" #include "c_types_map.hpp" #include "jit_sse42_convolution.hpp" #include "mkldnn_thread.hpp" namespace mkldnn { namespace impl { namespace cpu { using namespace mkldnn::impl::status; using namespace mkldnn::impl::utils; #define src_blk_off(f, n, c, h, w) \ (pd()->ndims() == 3) \ ? ...
ALGO
0.995607
6.811933
12c513cc-5df2-46f1-a7f9-70d66626d4df
NahulRahman/C-_For_Noob_Steps
l5loop.cpp
#include<iostream> using namespace std; int main(){ int i,j,n,k=1; cin>>n; for(i=1;i<=n;i++){ for(j=1;j<=n-i;j++) cout<<" "; for(j=1;j<=i;j++) { (k%2==0)?cout<<"A ":cout<<"B "; k++; } cout<<endl; } for(i=1;i<=n;i++){ for(j=...
ALGO
0.999673
3.135714
358a4572-11ab-4da2-afc4-54e0c2b9f590
adithya-tp/uva
12015/sol.cpp
#include <bits/stdc++.h> using namespace std; /* Maintain a hash map from relevance to a vector of websites with that relevance value. Keep track of the max releveance seen so far. At the end, simply print out the vector corresponding to the max relevance. */ #define pb push_back #define forn(i, l, r) for...
ALGO
0.999856
4.439132
32608aee-a2d1-411c-960e-b8e3385be756
heesooyaam/hesoyam
university/1st_sem/lessons/september/090923/A.cpp
// найти подмножество наибольшей длины для которого выполняется 2 * min >= max #include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define eb(x) emplace_back(x) #define all(x) (x).begin(),(x).end() #define print(x); for(auto& val : x){cout << val << ' ';}cout << endl; #defi...
ALGO
0.999684
4.543436
617a8825-b955-4399-8e8b-a7989996f450
yagyeshgoyal/LeetCode
2161-stock-price-fluctuation/2161-stock-price-fluctuation.cpp
class StockPrice { public: map<int,int>mp; multiset<int>st; set<int>st2; int curr = 0; StockPrice() { } void update(int timestamp, int price) { curr = max(curr,timestamp); if(mp.count(timestamp)){ auto it = st.find(mp[timestamp]); st.era...
ALGO
0.998643
6.494682
ebbaa505-165a-4a8d-8c2a-7e3fe67f0b99
FPMManagers/gmsh-fork
contrib/Netgen/libsrc/csg/revolution.cpp
#include <mystdlib.h> #include <linalg.hpp> #include <csg.hpp> namespace netgen { void RevolutionFace :: Init(void) { const LineSeg<2> * line = dynamic_cast<const LineSeg<2>*>(spline); const SplineSeg3<2> * spline3 = dynamic_cast<const SplineSeg3<2>*>(spline); if(line) { checklines_start.Appen...
ALGO
0.992794
3.627567
9016753b-e3c8-441f-a45c-a2bb0533adf0
Yehia-Nour/LeetCode
0111-minimum-depth-of-binary-tree/0111-minimum-depth-of-binary-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999936
6.929546
fccd1e5f-b506-41c3-9056-a3e82dcb3e97
Hikari9/UVa
10422 - Knights in FEN.cpp
/** UVa 10422 - Knights in FEN by Rico Tiongson Submitted: October 17, 2013 Accepted 0.349s C++ O(?) time */ #include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<queue> #include<set> #include<ctime> using namespace std; struct state; typedef pair<state, int> edge; struct state{ char c...
ALGO
0.999706
4.708588
6f76f20a-a584-45d1-b18a-55cc86476911
monman53/online_judge
AtCoder/ABC/014/a.cpp
// header {{{ // #define NDEBUG #include <bits/stdc++.h> using namespace std; // {U}{INT,LONG,LLONG}_{MAX,MIN} #define ALPHABET (26) #define INF INT_MAX #define MOD (1000000007LL) #define EPS (1e-10) #define EQ(a, b) (abs((a)-(b)) < EPS) #define CILING(a, b) (((a)+(b)-1)/(b)) temp...
ALGO
0.999805
3.459536
75022af2-f635-4440-a624-48d8c5a40c02
LorenzoMaci/Programmazione-I
Laboratorio/Programmazione 1/Esami/OOP/AL/Esame_28_02_2019_B/esame.cpp
#include<iostream> #include<cstdlib> #include<cmath> #include<typeinfo> #include<climits> #define DIM 50 using namespace std; class A { private: char *ptr; short len; protected: char get(short i){ return ptr[i % len]; } public: A(short m, char c){ ...
TOOL
0.859537
3.560169
8f54b776-0ea1-498a-bd45-5d9c2efe8bf2
vasiliisokolov/Phonebook
Phonebook.cpp
#include <iostream> #include <map> #include <string> #include <vector> enum command { add = 1, find_surName = 2, find_telNumber = 3, out = 4 }; void insert_data(std::map<std::string, std::map<std::string, int>>&, std::map<std::string, std::map<std::string, int>>&); void find_surname(std::map<std::str...
TOOL
0.861214
4.123781
937e8ed7-8386-4cc1-8bcc-4f1d38fe35a8
sambhav228/Data_Structure_Algorithm
CodeChef/TWSTR.cpp
#include <cstdio> #include <cstring> using namespace std; #define MAXN 1000 #define MAXL 1000 #define B 31 #define MOD 1000000009 char s[MAXN][MAXL + 1],q[MAXL + 1]; int L[MAXN],prior[MAXN]; long long hash[MAXN][MAXL]; int main(){ int N,Q; scanf("%d",&N); for(int i = 0;i < N;++i){ scan...
ALGO
0.999983
4.022135
64244f1e-4027-4d55-a96e-b3cfe32fba88
H-Shen/MyCodeCollection
Luogu/P2504.cpp
#include <bits/extc++.h> using namespace std; using namespace __gnu_pbds; constexpr double EPS = 1e-7; inline static int sgn(const double &x) { if (x > EPS) return 1; if (x > -EPS) return 0; return -1; } namespace DSU { vector<int> father; vector<int> Size; void init(int n) { vector<in...
ALGO
0.99993
4.489002
cedc85f9-4863-4a8c-b4ce-daa9b5d926fd
OpenCAXPlus/OpenCAXPlus
OpenDigitalTwin-main/tools/cgal/demo/CGAL_ipelets/hilbert_sort.cpp
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/hilbert_sort.h> #include <CGAL/CGAL_Ipelet_base.h> // -------------------------------------------------------------------- namespace CGAL_hilbert_sort{ typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; con...
ALGO
0.99993
6.329237
00bbd6aa-919b-41bc-98e8-be786df4a1dd
siddharthranchi/fslab
lab1.cpp
#include<iostream> #include<stdio.h> #include<string.h> #include<fstream> using namespace std; int main() { string name; int len; int tmp; char temp; int x,i; int ch; fstream s1,s2; cout<<"Enter 1 for standard input and 2 for input from files"<<endl; cin>>ch; switch(ch) { case 1: cout<<"Enter the strin...
TOOL
0.96617
3.011015
f63fa88c-8769-4a67-9039-3cb8e3ba1a97
luaman/modplug
OpenMPT/include/unrar/find.cpp
#include "rar.hpp" FindFile::FindFile() { *FindMask=0; FirstCall=true; #ifdef _WIN_ALL hFind=INVALID_HANDLE_VALUE; #else dirp=NULL; #endif } FindFile::~FindFile() { #ifdef _WIN_ALL if (hFind!=INVALID_HANDLE_VALUE) FindClose(hFind); #else if (dirp!=NULL) closedir(dirp); #endif } void FindFile::Set...
TOOL
0.876366
4.336623
888b9543-4dd2-4b47-bda0-17cb88811c53
wuc567/Pattern-Mining
SNP-Miner/C++/GSgrow.cpp
# include <afxwin.h> # include <iostream> # include <string> # include <vector> # include <fstream> # include <map> using namespace std; #define K 1000 //The sequence number of sequence database #define M 100 //The length of pattern #define N 20000 //The length of sequence struct seqdb { int id;...
ALGO
0.997128
3.413467
15b2e7b6-1906-4f5a-89f8-75a8651e951a
pokaa3a/LeetCode
problems/0254_Factor_Combinations.cpp
class Solution { public: void helper(vector<vector<int>> &result, vector<int> &row, int n){ int i = row.empty()? 2:row.back(); for(; i<=n/i; i++){ if(n%i==0){ row.push_back(i); row.push_back(n/i); result.push_back(row); row....
ALGO
0.99983
6.084
400410a0-e5fc-4730-9f36-6453733253bb
sbillin/IMLP
cisstICP/cisstICP/ExtraAlgorithms/algICP_IMLP_ClosestPoint.cpp
#include "algICP_IMLP_ClosestPoint.h" #include "cisstICP.h" #include "PDTreeNode.h" #include "RegisterP2P.h" #include "Ellipsoid_OBB_Intersection_Solver.h" #include "utilities.h" #define COMPUTE_ERROR_FUNCTION //#define DEBUG_IMLP //#define REMOVE_OUTLIERS double algICP_IMLP_ClosestPoint::ICP_EvaluateErrorFunction() ...
ALGO
0.999338
5.053234
b1a813da-5a0e-4fea-b058-9f0e38e825f1
khadija1114/Online-Judge-Solutions
Codeforces/318A even odd.cpp
#include<stdio.h> int main() { long long int n,k; scanf("%lld %lld",&n,&k); if(n%2==0) { if(k<=n/2) printf("%lld",k*2-1); else { k=k-n/2; printf("%lld",2*k); } } else { if(k<=n/2+1) printf("%lld",2*k-1);...
ALGO
0.999849
3.072128
dac8b26b-747b-46e5-b60a-3ff939b856ff
GYPpro/ACM
1_Contests/CF901.2/A_Jellyfish_and_Undertale.cpp
#define _USE_IOSTREAM_ #define _PRIV_TEST_ #ifndef _USE_IOSTREAM_ #define _USE_STDIO_ #endif #ifdef _USE_IOSTREAM_ #include <iostream> #endif #ifdef _USE_STDIO_ #include <stdio.h> #endif #include <stdlib.h> #include <math.h> #include <algorithm> #include <string> #include <string.h> #include <vector> #define ll lon...
ALGO
0.999821
4.475312
7776c09a-7eb1-40c4-825d-667806dd2353
atul21mangla/DSA-code
2262-solving-questions-with-brainpower/2262-solving-questions-with-brainpower.cpp
#define ll long long int class Solution { public: long long mostPoints(vector<vector<int>>& questions) { ll n = questions.size(); vector<ll>dp(n+1,0); dp[n-1] = questions[n-1][0]; for(int i=n-2;i>=0;i--){ ll solveThis = questions[i][0]; ll skips = questions[i...
ALGO
0.999874
5.61835
ecea561b-6175-48db-889f-710d84126cc7
Thalisson-Alves/Competitive-Programming
submissions/CodeForces/1092/c.cpp
#include <bits/stdc++.h> using namespace std; #ifdef DEBUG #include "debug.cpp" #else #define dbg(...) #endif using ll = long long; void solve() { int n; cin >> n; unordered_multiset<string> all; vector<string> v; string a, b; for (string s; cin >> s;) { if ((int)s.size() == n-1) { if (a.empty(...
ALGO
0.999606
3.306151
541e4309-fb6a-42b8-9c77-a790f250e1f7
OKR9871/DataStructure
19.9.9.2-2.cpp
#include <iostream> using namespace std; int main() { int arr[10000] = { 0 }; int Korea = 0; int Japan = 0; int China = 0; int Num; int Client; cin >> Num; for (int i = 0; i < Num; i++) { cin >> Client; for (int j = 0; j < Client; j++) { cin >> arr[j]; } for (int k = 0; k < Client; k++) { ...
ALGO
0.998015
3.120351
b15f4be0-0192-4161-80c8-9c447463d093
witchiman/GitDemo
LeetCode-master/algorithms/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.999856
6.245693
18eaedcc-c851-4102-b485-dd28d4f57b60
ardiloot/NonlinearTMM
NonlinearTMM/src/eigen-3.4.0/bench/benchFFT.cpp
#include <iostream> #include <bench/BenchUtil.h> #include <complex> #include <vector> #include <Eigen/Core> #include <unsupported/Eigen/FFT> using namespace Eigen; using namespace std; template <typename T> string nameof(); template <> string nameof<float>() {return "float";} template <> string nameof<double>() {r...
TEST
0.873809
6.391927
022d155c-d910-4403-ae2c-3528ab4eab69
RoboJackets-Software-Training/week-1-programming-exercise-domputer3
project_1_3/project_1_3_answer.cpp
#include <iostream> #include <vector> std::vector<double> readInVector(std::string s) { int prev_location = 0; int next_location = 0; std::vector<double> result; while(s.find(',', prev_location) != std::string::npos) { next_location = s.find(',', prev_location); //std::cout << "prev_location: " << prev...
ALGO
0.998605
3.554328
b7d691ab-d5cf-45ea-92aa-bfea7e6deaaf
AndrewGlebovski/Language
source/grammar.cpp
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include "libs/tree.hpp" #include "image_parser.hpp" #include "symbol_parser.hpp" #include "grammar.hpp" #include "dif.hpp" #define IS_TYPE(_type) ((*s) -> type == TYPE_##_type) #define IS_OP(_op) ((*s) -> type == TYPE_OP && (*s) -> value.op == OP_##_op) /// ...
ALGO
0.98207
3.347203
ab798e9c-638b-44bf-ae83-015fa83330b4
waifod/learningcpp
exp/reference_wrapper.cpp
// https://www.sandordargo.com/blog/2024/08/21/std-ref #include <functional> #include <iostream> void f(int& p1, int& p2, const int& p3) { std::cout << "In function: " << p1 << ' ' << p2 << ' ' << p3 << '\n'; ++p1; // increments the copy of n1 stored in the function object ++p2; // increments the main()'...
TOOL
0.969705
5.961861
2a88646a-6f52-45a2-860c-15f0d5f8438e
Mohammad-Atif/codeforces
practice/SymmetricMatrix.cpp
// #include <boost/multiprecision/cpp_int.hpp> // using namespace boost::multiprecision; #pragma GCC optimize("O2") #include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define deb(x) cout << x << "\n"; #define deB(x, y) cout << x << " " << y << "\n"; #define Deb(x, y, z) cout << x ...
ALGO
0.999783
4.777767
a137359d-0a9e-48ad-958d-923cf098a122
abovethe-clouds/ACM
c++/cf/Educational Codeforces Round 9/A.cpp
#include<bits/stdc++.h> using namespace std; #define fir first #define sec second #define endl "\n" typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int mod = 1e9 + 7, inf = 0x3f3f3f3f, P = 131; int read() { int x = 0, w = 1; char ch = 0; whi...
ALGO
0.999751
4.250762
f728886f-a61a-487c-a44a-0a98a28ddcbb
fy-meng/position-based-fluid
ext/nanogui/ext/eigen/doc/examples/tut_matrix_coefficient_accessors.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; int main() { MatrixXd m(2,2); m(0,0) = 3; m(1,0) = 2.5; m(0,1) = -1; m(1,1) = m(1,0) + m(0,1); std::cout << "Here is the matrix m:\n" << m << std::endl; VectorXd v(2); v(0) = 4; v(1) = v(0) - 1; std::cout << "Here is the vector v:\n...
ALGO
0.998336
3.687909
78906540-b20d-4667-a0a7-165a2305933a
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/03/0308/personal_submission/cf1185d_Arrogant_sword.cpp
// 删a0, 删a1,都不删公差就确定了。 #include<bits/stdc++.h> #define int long long #define all(a) a.begin(), a.end() #define endl '\n' #define pb push_back using namespace std; void print(vector<int> vi) { for (auto t : vi) cout << t << ' '; cout << endl; } ////////////////////////////////////////////////// bool judge(int...
ALGO
0.999879
4.241191
842991c0-0a04-4a68-9341-396bf56b3ef1
gtkn/atcoder
ABC_259_C.cpp
//title #include <bits/stdc++.h> using namespace std; //#include <atcoder/all> //using namespace atcoder; #define rep(i,n) for (ll i = 0; i < (n); ++i) #define rep1(i,n) for (ll i = 1; i <= (n); ++i) #define repr(i,n) for (ll i = (n)-1; i >= 0; --i) #define rep1r(i,n) for (ll i = (n); i > 0; --i) #define bit(n,k) ((n>>...
ALGO
0.999951
3.743913
50026614-5b0f-4e89-8377-1102f0ec4447
nirvana369/UVA-problem-solved
347.cpp
/* Hoang Linh */ #include <cstdlib> #include <stdio.h> #include <string.h> #include <math.h> #include <map> #include <queue> #include <iostream> #define fi "347.inp" #define fo "347.out" /**/ using namespace std; /**/ int d[15]; char kq[15]; long isround[10000010...
ALGO
0.999425
3.12977
e68b6fdb-08af-49d7-95ad-892d7579a9c0
qadir0108/DataStructures
chapter7/linked_list_two_way_insert.cpp
/* Two Way Linked List - Insert 1. At Specified Location Data Structures using C++ - Examples Version:1.0 Date: 2020-12-08 Author: Kamran Qadir (<EMAIL>) */ #include<iostream> #include<conio.h> using namespace std; struct Node { Node* previous; int data; Node* next; }; class TwoWayLinkedList { private: No...
ALGO
0.999932
4.729507
a3298a31-1da6-41d4-a8dc-250f16c536a1
matYang/DroneTime
arduino-1.6.5/libraries/Robot_Motor/src/lineFollow.cpp
//#include <ArduinoRobotMotorBoard.h> #include "LineFollow.h" //#define KP 19 //0.1 units //#define KD 14 //#define ROBOT_SPEED 100 //percentage //#define KP 11 //#define KD 5 //#define ROBOT_SPEED 50 //#define INTEGRATION_TIME 10 //En ms /*uint8_t KP=11; uint8_t KD=5; uint8_t robotSpeed=50; //percentage uint8_t in...
CONFIG
0.93773
3.965613
406585ac-29e6-47c0-8948-133fed20cd95
Iltwats/Competitive-Programming-SolvedProblems
CodeForces/Multiply-by-2-divide-by-6.cpp
// Problem Statement:https://codeforces.com/problemset/problem/1374/B #include <bits/stdc++.h> #include <numeric> using namespace std; #define ll long long #define fastio \ ios_base::sync_with_stdio(0); \ cin.tie(0), cout.tie(0) const ll mod = 10e9 + 7; int main() { fastio; int tc; cin >> tc...
ALGO
0.999753
5.070134
91aa7503-3cc5-4923-a3f0-8bd872a371d3
adammagnotte/Classwork
C++/Factorial Calculator with Recursion/Source.cpp
#include <iostream> #include <conio.h> using namespace std; int fact(int x) { //cout << "fact called with x = " << x << endl; int result = 0; // Base Case if (x == 1) result = 1; //general equation else result = x * fact(x - 1); return result; } int main() { int factor = 0; int res = 0; cout << ...
ALGO
0.997364
3.605116
dd6edfeb-cc91-4c23-88ea-1a9980ec640c
Jungeun-Park-kr/CodingTest
SWEA/SWEA7456.cpp
#include <iostream> #include <set> using namespace std; int N, M, parent[101]; // 부모 담음 set <int> result; int findParent(int a) { if(parent[a] == a) return a; return findParent(parent[a]); } void unionParent(int a, int b) { // a, b 부모 합치기 a = findParent(a); b = findParent(b); if(a < b) parent[b] = a...
ALGO
0.999521
4.724107
bb0169c6-0b66-47ea-b02f-d3552cf2e08f
ishandutta2007/codeforces
dragonslayerintraining/normal/1146/B.cpp
#include <iostream> std::string S,T; int main(){ std::cin>>T; int cnt=0; for(char c:T){ if(c!='a') cnt++; } S=T.substr(0,T.length()-cnt/2); std::string T2=S; for(char c:S){ if(c!='a'){ T2+=c; } } if(T2==T){ std::cout<<S<<std::endl; }else{ std::cout<<":("<<std::endl; } ...
ALGO
0.998252
3.183637