uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
1bc5a334-c84c-40eb-936a-1ecacf568f07
ishandutta2007/codeforces
amnesiac_dusk/normal/402/D.cpp
/* * Just close your eyes * The sun is going down * You'll be alright... * No one can hurt you now * Come, morning light... */ #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std; #ifndef rd #define endl '\n' #endif #define deb cout<<"Line:...
ALGO
0.999941
3.818547
b60a64c4-8423-4132-9477-473731d525ce
Giangattt123/DSA_PTIT
DSA-li_thuyet_so-&&-to_hop/count_elements_repeat.cpp
#include <bits/stdc++.h> using ll = long long; using namespace std; int main(){ int t; cin >> t; while (t--){ int n; cin >> n; int a[n]; map<int, int> mp; for (int i = 0; i < n; ++i) { cin >> a[i]; mp[a[i]]++; } int cnt = 0; for (auto x : mp) { ...
ALGO
0.999909
4.034461
5a3d1a34-02b7-444d-afb7-539afab2c9e0
Ishwarendra/Contests
CODEFORCES_CONTEST/Previous Contests/Educational_Round_118/A.cpp
#include <bits/stdc++.h> using namespace std; #define FIO ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(0); using vi = vector<int>; using ll = long long; using ull = unsigned long long; //Gives TLE bool lessT(string a, string b) { if (a.length() != b.length()) return (a.length() < b.length())...
ALGO
0.999964
4.03218
e922e858-49f8-4e6a-b265-2b31de79359d
Aristocratishe/Technopark
Algorithms/HW1/task1.cpp
#include <iostream> #include <cassert> struct LSD{ unsigned char byte[8]; }; void countSort(LSD *&Array, unsigned int size){ for (int i = 0; i < 8; i++){ int C[256]; for (int k = 0; k < 256; k++) C[k] = 0; for (int j = 0; j < size; j++) C[Array[j].byte[i]]++; ...
ALGO
0.99949
4.250134
5f9a6483-a8e9-4725-aecc-8c58a4cb0159
PabloAlcoleaSesse/Practica_de_ejercicios-
Ej_2/main.cpp
// // Created by Pablo Alcolea Sesse on 3/11/24. // #include <iostream> using namespace std; int main () { double a; double b; double c; cout <<"Introduce tres numeros reales: "; cin >> a; cin >> b; cin >> c; double media = (a+b+c)/3; cout << "La media de los tres numeros es: " <<...
ALGO
0.937242
3.972564
40c3032b-60a6-470e-804f-9bcd1e932a3f
zzzieun/OpenCV
miniproject_1.cpp
#pragma once #include"opencv2/opencv.hpp" // iostream void detect_edge_by_mouse() { static cv::Rect box; cv::Mat img{cv::imread("Lenna1.png")}; if (img.empty()) { std::cout<<" "<<std::endl; return; } cv::namedWindow("Edge",cv::WINDOW_NORMAL); //WINDOW_NORMAL => âũⰡ static bool isFinish{ false }; static...
TOOL
0.888259
3.747085
d79425b8-1346-4758-adbc-c0ace51a99db
ishandutta2007/codeforces
user202729_/normal/1495/C.cpp
#if not LOCAL #define NDEBUG 1 #endif #include<bits/stdc++.h> void up(); int main(){ std::ios::sync_with_stdio(0);std::cin.tie(0); int numTest; std::cin>>numTest; while(numTest--) up(); } void up(){ int numRow, numCol; std::cin>>numRow>>numCol; std::vector<std::string> data(numRow); for(auto& it: data){ it.re...
ALGO
0.999666
4.225807
7c001fd5-f7f1-4f7c-b4d0-8f868edfd887
Taranum01/LeetCode
669-trim-a-binary-search-tree/669-trim-a-binary-search-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.999995
6.583301
c4a85f32-c85d-4b29-bbe6-7982e4a2d084
eliot-exdev/boost-morphos
libs/geometry/doc/index/src/examples/rtree/value_index.cpp
//[rtree_value_index #include <boost/geometry.hpp> #include <boost/geometry/geometries/point.hpp> #include <boost/geometry/geometries/box.hpp> #include <boost/geometry/index/rtree.hpp> #include <cmath> #include <vector> #include <iostream> #include <boost/foreach.hpp> namespace bg = boost::geometry; namespace bgi =...
ALGO
0.999833
6.078147
e4fbae3c-7b11-4425-aebf-06f63129a959
darshan-trivedi-10/Complete-DSA
4 Recursion and Backtracking/6_Permutations.cpp
// https://leetcode.com/problems/permutations/ #include <bits/stdc++.h> using namespace std; using lli = long long int; using ll = long long; #define endl '\n' class Solution { void Helper(vector<int> &nums, vector<vector<int>> &ans, int idx) { int n = nums.size(); if (idx == n) { ...
ALGO
0.999994
6.405926
47a03a49-21c1-4500-8e61-069dd5586898
UnpureRationalist/myLeetcodeAnswer
深搜/P1056. 2022.10.26-上班之路.cpp
#include <bits/stdc++.h> using namespace std; int dirs[4][2] = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}}; bool legal(int x, int y, int rows, int cols) { return x >= 0 && x < rows && y >= 0 && y < cols; } bool dfs(int last_dir, int x, int y, int tx, int ty, int change_dirs, int clear_barriers, int rows, int cols, c...
ALGO
0.999941
5.098865
d1593b5d-3ded-48c6-aaaa-d2f158f690a1
20MH1A0590/Leetcode
Hash Table/Easy/leetcode2325.cpp
class Solution { public: string decodeMessage(string key, string message) { //fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); string atoz = "abcdefghijklmnopqrstuvwxyz"; map<char,char>mp; int i = 0,start = 0; while(i < key.size()) ...
ALGO
0.999997
5.838041
1c807926-8a30-4302-9d98-372dac974636
MariaChrysafis/CompetitiveProgramming
CSES/Graph Algorithms/flightRoutes.cpp
#include <cmath> #include <iostream> #include <set> #include <climits> #include <cstdio> #include <algorithm> #include <cassert> #include <string> #include <vector> #include <iomanip> #include <unordered_map> #include <type_traits> #include <string> #include <queue> #define ll long long #include <map> using namespace ...
ALGO
0.999979
4.025804
66ecf64f-ff91-4baa-add2-d001b82b8287
METR-SWE-BENCH/pytorch__pytorch
third_party/nvfuser/csrc/scheduler/mma_utils.cpp
#include <expr_evaluator.h> #include <ir_printer.h> #include <lower_utils.h> #include <root_domain_map.h> #include <scheduler/mma_utils.h> #include <scheduler/utils.h> namespace torch { namespace jit { namespace fuser { namespace cuda { namespace mma_util { namespace { // Utility for mma dimension matching enum cl...
TOOL
0.950547
7.100746
757a0521-2aaf-4208-91b2-e0ecb5e3f038
jbisss/Sortings
sorter_2_insert.cpp
#include "sorter_2_insert.h" void Insertsorter::sort(QVector<int> arrToSort, QVector <QPushButton*>& arrButtons){ for(int i = 1; i < arrToSort.size(); i++){ int temp = arrToSort[i]; int j = i; arrButtons[j]->setDisabled(true); upAndDownButton(arrButtons[j], 10); for(; j> 0;j...
ALGO
0.994209
4.299156
3290196f-1d03-4f65-9521-7f259fe44c4c
n00bhax/MrRoboto
imu_calib/src/accel_calib/accel_calib.cpp
/** * \file accel_calib.cpp * \author Daniel Koch <<EMAIL>> * * Class for calculating and applying accelerometer calibration parameters */ #include "imu_calib/accel_calib.h" #include <yaml-cpp/yaml.h> #include <fstream> namespace imu_calib { const int AccelCalib::reference_index_[] = { 0, 0, 1, 1, 2, 2 }; con...
TOOL
0.917923
6.1714
1fedf01d-5f54-4ea0-8f5e-9d20ab0b7689
Firoz587/XPSC-4
week-6/day-2/Two Cakes.cpp
/******** Name :- Md Firoz Islam *********** University :- Northern University Bangladesh ********** Dhaka,Bangladesh ***************/ #include <bits/stdc++.h> using namespace std; #define ll long long int main() { ios::sync_with_stdio(false); cin.tie(NULL); ll n,a,b; cin>>n>>a>>b; auto ok = [&](...
ALGO
0.999741
3.345179
d1a04869-4928-41f5-8ce8-553931eb26b4
mjk25/BOJ-by-Topic
02_Sorting/16496.cpp
#include <iostream> #include <stdio.h> #include <algorithm> #include <vector> #include <string> using namespace std; int n, a; vector <string> v; string ans=""; bool compare(string a, string b){ return a+b>b+a; } int main(void){ cin>>n; for(int i=0; i<n; i++){ cin >> a; v.push_back(to_string(a)); } sort(...
ALGO
0.999737
5.079957
a260e3ca-9a41-4d18-96e5-9ea33f822695
ishandutta2007/codeforces
wucstdio/normal/1349/B.cpp
#include<cstdio> #include<algorithm> #include<cstring> using namespace std; int t,n,k,a[100005],pre[100005],suf[100005],m1[100005],m2[100005]; int main() { scanf("%d",&t); while(t--) { scanf("%d%d",&n,&k); for(int i=1;i<=n;i++) { scanf("%d",&a[i]); if(a[i]<k)a[i]=-1; else if(a[i]==k)a[i]=0; else a[...
ALGO
0.999977
3.495023
55973565-f361-4679-aca4-cf0d5ac3d004
princebansal7/DSA-Sheets-Code
TCS-NQT-Sheet/02.Numbers/20.PowerOfNum_BinaryExpo.cpp
#include <iostream> #include <math.h> using namespace std; #define nl "\n" #define ll long long //-------Iterative way: TC: O(N)------------------------------ int power1(int n, int p) { int res = 1; for (int i = 1; i <= p; i++) res = res * n; return res; } /* Binary Exponentiation way: ...
ALGO
0.999957
5.346918
892cec5b-ba79-4a3d-8a36-ab3660a15913
rmkrohn/AlgorithmsBootCamp
Aho-Corasick/multimatch.cpp
//Aho-Corasick String Matching //Rachel Krohn, 2016 //Demo program for Aho-Corasick String Multi-Matching //This contains the code necessary to build the trie, along with //the string search process #include <iostream> #include <string> #include <vector> #include <map> #include <set> #include <queue> using namespace ...
ALGO
0.99967
4.727463
806af3b8-beb8-4944-9994-d4d88c9d428d
zech-chi/CodeForces
training/A/A_Uncowed_Forces.cpp
/* * zech-chi */ #include <algorithm> #include <cstddef> #include <cstdlib> #include <iostream> #include <sstream> #include <iterator> #include <set> #include <vector> #include <numeric> #include <cmath> #include <stack> #include <iomanip> typedef long long ll; using namespace std; #define abs(a) (((a) > 0) ? (a) : (...
ALGO
0.999011
3.369645
1b8e6a81-f1ce-4a37-9b12-dead0195a20d
conradsoon/competitive_programming
codeforces/round713/f.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<string> vs; typedef vector<pii> vii; typedef vector<vi> vvi; typedef long int l; typedef unsigned long int ul; typedef long long int ll; typedef unsigned long long int ull; typedef long double ld; //templa...
ALGO
0.99992
3.460333
7c1a38bb-d8be-43d0-91c2-eb2746af4d3e
Xdydy/OJCode
板子/杂七杂八/二分.cpp
#include <bits/stdc++.h> using namespace std; bool check(int mid); int devide1(int min_val, int max_val) { int left = min_val-1; int right = max_val; while(left < right) { int mid = left + right + 1 >> 1; if(check(mid)) { left = mid; } else { right = mid...
ALGO
0.999931
3.089303
75635f32-2513-4551-bdc5-595a72469f08
kavehzare98/LeetCodePractice
Trees/TreeLevelTraversal.cpp
#include <iostream> #include <vector> #include <deque> using namespace std; // We want to run BFS and a Queue // struct TreeNode { int val; TreeNode* left; TreeNode* right; }; TreeNode* createNode(int data); vector<vector<int>> levelOrder(TreeNode* root); int main() { // Create Tree TreeNode* root = createNode...
ALGO
0.999895
5.437913
652d46d0-485a-4207-b6f2-270afff486cb
SPQRTeam/spqr2023
Src/Modules/BehaviorControl/Libraries/LibSpecProvider.cpp
/** * @file LibSpecProvider.cpp * * See LibSpec * */ #include "LibSpecProvider.h" MAKE_MODULE(LibSpecProvider, behaviorControl); void LibSpecProvider::update(LibSpec& libSpec) { DECLARE_DEBUG_DRAWING3D("module:LibSpecProvider:targetPosition", "field"); DECLARE_DEBUG_DRAWING3D("module:LibSpecProvider:corrid...
ALGO
0.939429
4.801023
1fb4ecee-c704-4a2e-bfc2-81e164541667
leonldy/Calabash
Petrozavodsk Winter-2017. Xiaoxu Guo Contest 5/H.cpp
#include <bits/stdc++.h> #define MAXN 100005 #define INF 1000000000 #define MOD 1000000007 #define F first #define S second using namespace std; typedef long long ll; typedef pair<int,int> P; typedef vector<int> vec; typedef vector<vec> mat; mat mul(mat A,mat B) { mat C(A.size(),vec(B[0].size())); for(int i=0;i...
ALGO
0.999956
3.91851
62164e24-0a1a-4476-bf6a-a472a28707f2
intel/quantum-intrinsics
libcxx/test/std/containers/sequences/vector/vector.cons/move_alloc.pass.cpp
// UNSUPPORTED: c++03 && !stdlib=libc++ // <vector> // vector(vector&& c, const allocator_type& a); #include <vector> #include <cassert> #include "test_macros.h" #include "MoveOnly.h" #include "test_allocator.h" #include "min_allocator.h" #include "asan_testing.h" TEST_CONSTEXPR_CXX20 bool tests() { { s...
TEST
0.866865
6.221698
413c9c22-f914-4a0e-841c-d8ee31a9da40
Architgupta001/LeetCode-Solutions
CPP/101_Symmetric_Tree.cpp
class Solution { public: bool flag = true; void traversal(TreeNode* rootleft,TreeNode* rootright){ if(rootleft== NULL && rootright == NULL){ return; } else if(rootleft != NULL && rootright != NULL){ traversal(rootleft->left, rootright->right); if(rootl...
ALGO
0.999997
6.356149
f8969743-ff2f-407a-bc4b-49d421b3a0fc
zhengzi12/moses
sigtest-filter/WIN32_functions.cpp
/////////////////////////////////////////////////////////////////////////////// // if you are using precompiled headers then include this line: /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // if you are n...
TOOL
0.952582
4.153981
879a7a92-b798-4a98-aff0-166e491f1f4a
a12-aruzhanamandykova/bonus-tasks-1-chapter
chapter2 AD.cpp
#include <iostream> #include <string> using namespace std; string toRoman(int num) { string result = ""; pair<int, string> roman[] = { {100, "C"}, {90, "XC"}, {50, "L"}, {40, "XL"}, {10, "X"}, {9, "IX"}, {5, "V"}, {4, "IV"}, {1, "I"} }; for (int i = 0; i < 9; ++i) { while (num...
ALGO
0.99984
5.736058
ad6f2bb9-d748-4bde-b91f-05ff8cd361e8
sinian666/codes_86_2
cpp_副本14/chapter_backtracking/preorder_traversal_iii_template.cpp
/** * File: preorder_traversal_iii_template.cpp * Created Time: 2023-04-16 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* 判断当前状态是否为解 */ bool isSolution(vector<TreeNode *> &state) { return !state.empty() && state.back()->val == 7; } /* 记录解 */ void recordSolution(vector<TreeNode *> &state, ve...
ALGO
0.999975
5.798366
8931793e-39fd-479c-b557-635401f9e863
17Aryan/Leetcode-Submissions
0306-additive-number/0306-additive-number.cpp
class Solution { public: bool isAdditiveNumber(string num) { return helper(num, 0, -1, -1, LONG_MAX/100); } bool helper(string num, int inx, long first, long second, long mx) { int n = num.length(); long val = 0; for(int i = inx ; i < n; i++) { va...
ALGO
0.999964
6.553971
1d62caef-a1af-4aed-b66b-e46f12970f88
naonao-cola/MyQt
qt5ch20/OpenCV_3.4.3-Source/modules/photo/src/align.cpp
#include "precomp.hpp" #include "opencv2/photo.hpp" #include "opencv2/imgproc.hpp" #include "hdr_common.hpp" namespace cv { class AlignMTBImpl CV_FINAL : public AlignMTB { public: AlignMTBImpl(int _max_bits, int _exclude_range, bool _cut) : name("AlignMTB"), max_bits(_max_bits), exclude_ra...
TOOL
0.965351
5.346542
3ee8798d-6729-429b-9d39-7cf75f5ae6ff
mateor/pdroid
android-2.3.4_r1/tags/1.2/frameworks/base/media/libstagefright/codecs/amrwb/src/isp_isf.cpp
/* ------------------------------------------------------------------------------ Filename: isp_isf.cpp Date: 05/08/2004 ------------------------------------------------------------------------------ REVISION HISTORY Description: -----------------------------------------------------------------------------...
ALGO
0.998516
5.640928
8054c651-a2f0-48bb-b0ae-77b40a164dee
sachinaralapura/Strivers-A2Z-DSA-Course
02-arrays/hard/subSumZero.cpp
#include <bits/stdc++.h> using namespace std; // Length of the longest subarray with zero Sum // Problem Statement : Given an array containing both positive and negative // integers, we have to find the length of the longest subarray with the sum of // all elements equal to zero. int maxLen(vector<int> &arr) { int ...
ALGO
0.999956
5.154175
c31112d3-e0b6-4c82-aca0-6e16a6487013
sarvex/leetcode-nativescript
solution/2200-2299/2271.Maximum White Tiles Covered by a Carpet/Solution.cpp
class Solution { public: int maximumWhiteTiles(vector<vector<int>>& tiles, int carpetLen) { sort(tiles.begin(), tiles.end()); int s = 0, ans = 0, n = tiles.size(); for (int i = 0, j = 0; i < n; ++i) { while (j < n && tiles[j][1] - tiles[i][0] + 1 <= carpetLen) { s...
ALGO
0.999661
5.983499
ae8ec199-b5bf-432b-8186-02756d62fa73
PhuocVinhLee/system_exam_quiz_programming
online_exam_system_backend/temp/p4u3y5w.cpp
#include <stdio.h> int main() { int number1, number2, sum; printf("Enter two integers: "); scanf("%d %d", &number1, &number2); // calculate the sum sum = number1 + number2; printf("%d + %d = %d", number1, number2, sum); return 0; }
TOOL
0.9788
4.438632
e7cdabf4-3087-4de7-bcf8-34f7611ba4e8
cthbst/Competitive-Programming
zerojudge/d072.cpp
#include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv[]) { int a,b=0; cin >>a; while (a--){ b++; int in1; cin >>in1; if (in1%400==0){ cout <<"Case " <<b <<": a leap year" <<endl ; } else if (i...
ALGO
0.99968
3.380026
e264b166-8cdf-433b-a838-5614993a14cd
Piau3425/Code-Practice
APCSS Summer Camp/C04.cpp
#include <iostream> #include <vector> using namespace std; int main(){ int row, col, pen, x, y, color, time; cin >> row >> col >> pen; vector<vector<int>> plot(row, vector<int>(col, 0)); for(int i = 0; i < pen; i++){ cin >> y >> x >> time >> color; if(time == 0) plot[y][x] ...
ALGO
0.998174
3.418392
136090ee-448c-4fda-9bc1-8147406b9da8
Gunteam9/BigData
Devoir_Visualisation_2021/proj_RechercheOutofCore.cpp
#include <string> #include <sstream> #include <iostream> #include <fstream> #include <vtkRenderWindow.h> #include <vtkRenderer.h> #include <vtkRenderWindowInteractor.h> #include <vtkDataSetReader.h> #include <vtkDataSetMapper.h> #include <vtkActor.h> #include <vtkLookupTable.h> #include <vtkRectilinearGrid.h> #include...
DATA
0.870284
3.244682
f4b55800-b452-456b-b842-0c811c432a11
hhu1506010220/ACM_Repository
HHU2018寒假训/第二周数据结构/F.cpp
#include<bits/stdc++.h> using namespace std; map <int,vector<int> >mp; int main(){ int n,m,k,v; int temp,cnt; map<int,vector<int>>::iterator iter; while(~scanf("%d%d",&n,&m)){ mp.clear(); for(int i=0;i<n;i++){ scanf("%d",&temp); mp[temp].push_back(i+1); } while(m--){ scanf("%d%d",&k,&v); ite...
ALGO
0.999956
3.747776
10f5f36b-9f9a-43bc-bec1-b672c79cf149
kazunetakahashi/atcoder
201510_201609/1114_codefes2015_final/E.cpp
#include <iostream> #include <iomanip> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <set> #include <map> #include <cmath> #include <tuple> #include <string> #include <cassert> using namespace std; typedef long long ll; int calc(string S, int x) { reverse(S.begin(), S.end()); f...
ALGO
0.999939
4.215497
c4bd7d4d-fd93-4019-9698-25e420ad0cfb
Uzer447/Code
Codeforces/Text Document Analysis.cpp
#include <bits/stdc++.h> #define forn(n) for (int i = 0; i < n; i++) #define endl "\n" #define ll long long using namespace std; int main() { // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); int n; cin >> n; string s; cin >> s; int open = 0; int out = 0; in...
ALGO
0.999623
3.86713
ab701da6-8ce3-4c25-8e5d-fba32c012483
Abindran/Cpp-Bootacmp
SwitchCases/RatingSwitchCase.cpp
#include <iostream> using namespace std; int main(){ int rating; cout<<"Enter the rating: "; cin>>rating; switch(rating){ case 1: puts("Your Rating is 1"); break; case 2: puts("Your Rating is 2"); break; case 3: puts("Your Rating is 3"); break; case 4: puts("Your Rating is 4"); br...
TOOL
0.873092
3.732008
f112776f-1d78-4d67-8e13-573928b2278f
pganesgh321/DSA0159-C-
90.cpp
#include <iostream> using namespace std; int main() { int arr[] = {1, 2, 3, 4, 5}; int* ptr = arr; // Pointer to the first element of the array cout << "Array elements: "; for (int i = 0; i < 5; ++i) { cout << *(ptr + i) << " "; // Access array elements through the pointer } cout << en...
ALGO
0.929509
3.737699
af197856-1fe2-4f7a-a87a-639e4081097c
HowardDreemurr/pl-slam-compat
depends/mrpt/libs/base/src/system/filesystem.cpp
#include "base-precomp.h" // Precompiled headers #include <mrpt/system/CDirectoryExplorer.h> #include <mrpt/system/filesystem.h> #include <mrpt/system/os.h> // for sprintf #include "mrpt/utils/bits.h" // for format #include "mrpt/utils/mrpt_macros.h" // for MRPT_END, MRPT_STA...
TOOL
0.856612
5.20113
3cceaf43-ed57-428d-b740-089f21f64bb1
sicupath/CSES
Introductory Problems/Tower of Hanoi.cpp
#include <iostream> #include <math.h> using namespace std; int n; void hanoi(int n,int a,int b){ if(n==1){ cout<<a<<" "<<b<<endl; } else{ hanoi(n-1,a,6-a-b); cout<<a<<" "<<b<<endl; hanoi(n-1,6-a-b,b); } } int main() { cin >> n; cout << pow(2,n)-1<<endl; hanoi(n...
ALGO
0.999904
3.902495
b5555be0-f6d3-469b-a121-611039c99f86
treeforest/algorithm
PAT/1140/main.cpp
//#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <string> #include <sstream> using namespace std; int main() { string s; int n; cin >> s; cin >> n; for (int i = 0; i < n; i++) { string t = ""; t += s[0]; int num = 1; for (unsigned int j = 1; j < s.length(); j++) { if (s[j - 1] == s[j]) {...
ALGO
0.999973
3.965277
1a22d42a-e987-402d-80d5-33a83b3a079d
rhasanrakib/Contests-Codes
Codeforces/B - Harry Potter and Three Spells .cpp
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c,d,e,f,i,j,k,l,m,n; double sl,lg,gs; scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f); bool chk=false; if((b*d*f)>(a*c*d)) { printf("Ron\n"); } else if(b==0 || f==0) { printf("Hermione\n"); } else...
ALGO
0.999768
3.208103
112fe4b8-445a-46f5-b440-f3dbc72744f9
gajgeospatial/boost_1_86_0
libs/math/test/compile_test/tools_toms748_inc_test.cpp
#define T double #define Tol boost::math::tools::eps_tolerance<double> typedef T (*F)(T); template std::pair<T, T> boost::math::tools::toms748_solve<F, T, Tol >(F, const T&, const T&, const T&, const T&, Tol, std::uintmax_t&); template std::pair<T, T> boost::math::tools::toms748_solve<F, T, Tol>(F f, const T& ax, con...
TOOL
0.999432
4.136859
f5436b5d-557d-4a87-b557-79c176e63b35
spacefarers/cp
problems/codeforces/problemset/buildingafence.cpp
#include <iostream> #include <fstream> #include <string> #include <cstring> #include <queue> #include <cmath> #include <map> #include <set> #include <algorithm> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<int,int> pi; typedef pair<ll,ll> pl; typedef vector<pi...
ALGO
0.999454
3.59833
24dd9821-cbbe-46f0-8bbf-9c6366a06b8e
mearth99/Problem
Prev_solve_problem/프로그래스머스/기능개발.cpp
#include <string> #include <vector> #include <iostream> using namespace std; vector<int> solution(vector<int> progresses, vector<int> speeds) { vector<int> answer; while(!progresses.empty()){ int value=1; int count=0; for(value;progresses[0]+speeds[0]*value<100;value++){ val...
ALGO
0.999603
4.812345
6f2219e4-2b9c-41df-bcbc-a6e9e5efa9e7
ishandutta2007/codeforces
gzchenben/normal/1515/F.cpp
#include<cstdio> #include<algorithm> #include<vector> using namespace std; int n,m,k,u[300005],v[300005]; long long a[300005]; bool flag[300005]; vector<pair<int,int> > vec[300005];//pair<To,EdgeID> int f[300005]; int Find(int x) { return f[x]==x ? x : f[x]=Find(f[x]); } void Merge(int x,int y) { x=Find(x); ...
ALGO
0.999998
3.288579
d2be05a7-e9d2-44b9-9f42-6af75b463d67
OmarAlSeddik/competitive-programming-codeforces
900/odd-divisor.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; bool ans[t]; for (int k = 0; k < t; k++) { long long x; cin >> x; while (x % 2 == 0) x /= 2; if (x == 1) cout << "NO"; else cout << "YES"; if (t) cout << "\n"; } return 0;...
ALGO
0.997356
5.152862
d704053a-612f-45e1-a10e-246d40af9e42
ishandutta2007/codeforces
ljc00118/normal/1500/A.cpp
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = a; i <= b; i++) #define per(i, a, b) for (int i = a; i >= b; i--) using namespace std; typedef unsigned long long ull; typedef pair <int, int> pii; typedef long long ll; template <typename T> inline void read(T &f) { f = 0; T fu = 1; char c = getchar(); ...
ALGO
0.999977
3.179475
d63ca2e2-908e-46f2-a52b-c80dca86d1c4
raihansyahrin/ecommerce_fakeapi_flutter
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
2f15b444-6e6f-40af-8989-7be568b0dd78
trong269/DSA_CODEPTIT
Sắp xếp - Tìm kiếm/ĐỔI CHỖ ÍT NHẤT.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t ; cin >> t ; while( t-- ){ int n ; cin >> n ; int a[ n ]; for( auto &x : a ) cin >> x ; int cnt = 0 ; for( int i = 0 ; i < n ; i ++ ){ int minx = a[ i ] ,vt = i ; for( int j = i + ...
ALGO
0.999824
4.080891
7df86021-c10f-42c6-808e-22acd6770160
suhailsherif/MySQL-5.1-
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp
#include <ndb_global.h> #include "InitConfigFileParser.hpp" #include "Config.hpp" #include "MgmtErrorReporter.hpp" #include <NdbOut.hpp> #include "ConfigInfo.hpp" #include <m_string.h> const int MAX_LINE_LENGTH = 1024; // Max length of line of text in config file static void trim(char *); static void require(bool v...
CONFIG
0.918649
6.120582
84de3b2b-6113-431a-b801-4b98dc1634bc
aman-anand-hub/DSA-HUB
ARRAY/ARRAY-P3/stockBUYandSELLnaive.cpp
#include<bits/stdc++.h> using namespace std; int maxProfit(vector<int> v, int start, int end) { if(start>=end) return 0; int profit=0; for(int i=start;i<end;i++) { for(int j=i+1;j<=end;j++) { if(v[j]>v[i]) { int curr_profit=v[j]-v[i]+maxProfit(v,s...
ALGO
0.999907
4.312925
52bdbfd5-b0e7-4944-9846-a2c9b2a8fdd1
CanftIn/leetcode
history/2023/35/so.1.cpp
class Solution { public: int searchInsert(vector<int>& nums, int target) { int n = nums.size(); int l = 0, r = n - 1; while (l <= r) { int mid = l + (r - l) / 2; if (nums[mid] < target) { l = mid + 1; } else { r = mid - 1; ...
ALGO
0.999958
6.525477
e90c9d60-3f32-4eac-86a1-035d0d3410f4
dileepmaloth/CPP
Queue.cpp
#include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl '\n' int solve(){ queue<int> Q; int q; cin>>q; for(int i=0; i<q; i++){ string s; cin>>s; if(s == "add"){ int num; cin>>num; Q.push(num); }...
ALGO
0.989026
5.019011
7fdf8d6b-9ff9-4761-abee-9dc3d9bf79e2
mbassale/computer-science
interviews/lc/06-array-intersection.cpp
#include "lc-utility.h" vector<int> intersectHash(const vector<int>& nums1, const vector<int>& nums2) { unordered_map<int, int> num1Freqs; for (const auto n : nums1) { num1Freqs[n]++; } vector<int> result; for (const auto n : nums2) { if (num1Freqs.count(n) > 0 && num1Freqs[n] > 0) { result.pus...
ALGO
0.999219
6.201071
10902885-3a1b-4387-b646-2a4e30369209
ALKYAYZZZ/TotalCompSci
AllCompSci/CSCE441GitHub/CSCE441/eigen-eigen-3215c06819b9/unsupported/doc/examples/PolynomialSolver1.cpp
#include <unsupported/Eigen/Polynomials> #include <vector> #include <iostream> using namespace Eigen; using namespace std; int main() { typedef Matrix<double,5,1> Vector5d; Vector5d roots = Vector5d::Random(); cout << "Roots: " << roots.transpose() << endl; Eigen::Matrix<double,6,1> polynomial; roots_to_mo...
TEST
0.999362
4.659281
8a65d5d2-a1fe-4ccc-a6d7-6935409a1c5d
ameybh/competitive-programming
codechef/PRACTICE/CLBRKT.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long const int MAXN = 1e7+10; int t,n,q; string s; vector<int> queries(MAXN); int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> t; while (t--) { cin >> s >> q; for (int i=0; i<q; i++) cin >> queries[i]; n = s.size(); sta...
ALGO
0.999881
3.534563
296a2417-3fae-4d7d-8dce-0881c2344272
sarvex/leetcode-hack
solution/0500-0599/0581.Shortest Unsorted Continuous Subarray/Solution.cpp
class Solution { public: int findUnsortedSubarray(vector<int>& nums) { vector<int> arr = nums; sort(arr.begin(), arr.end()); int left = 0, right = arr.size() - 1; while (left <= right && nums[left] == arr[left]) ++left; while (left <= right && nums[right] == arr[right]) --rig...
ALGO
0.999958
5.964485
da1bec3b-1149-43ad-8b7c-b5e4a32df122
notYnoj/Programming-Questions-in-CPP
LeetCode/Medium/DFS and BFS/1593. Split a String Into the Max Number of Unique Substrings.cpp
class Solution { public: int maxUniqueSplit(string s) { unordered_set<string> seen; return backtrack(0, s, seen); } private: int backtrack(int start, const string& s, unordered_set<string>& seen) { if (start == s.size()) { return 0; } int maxSplits = 0; ...
ALGO
0.999987
6.053061
36acbb76-dc4d-4b8e-bbe2-2f28c4cd89dd
owlpaw20/CPArchive
洛谷题库/[洛谷 P1429]【模板】平面最近点对.cpp
#include <cmath> #include <limits> #include <vector> #include <numeric> #include <iostream> #include <algorithm> #define endl '\n' using std::cin; using std::cout; using std::vector; using f64 = double; using PFF = std::pair<f64, f64>; int N; vector<PFF> pt; auto dist = [](const PFF x, const PFF y) { const f64 x...
ALGO
0.999773
4.430331
8fdfa61c-fbb3-4d85-9dda-fb95ca0415d4
cile/android_frameworks_av
media/libstagefright/codecs/amrnb/enc/src/pre_big.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/pre_big.c Functions: Date: 02/04/2002 ------------------------------------------------------------------------------ REVISION HISTORY Description: Updated template used to PV coding template. ...
ALGO
0.988176
6.295246
47a77067-ca57-43e1-a6e4-996cacdd49ed
freshmea/kuIotBigdataClass
openCV_study/ch13/weather.cpp
#include <fstream> #include <iconv.h> #include <iostream> #include <sstream> #include <string> std::string convertEUC_KRtoUTF8(std::string strEUCKR) { iconv_t conv = iconv_open("UTF-8", "EUC-KR"); if (conv == (iconv_t)-1) { perror("iconv_open"); return ""; } size_t inbytesleft, outbytesleft; inbytesleft = st...
TOOL
0.870926
4.587089
d94d764d-2930-4b7c-8085-7e9477f482a1
ishandutta2007/codeforces
ssamt/normal/1572/A.cpp
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <time.h> #include <iostream> #include <algorithm> #include <vector> #include <cmath> using namespace std; class AVLnode { public: int data; int len; int height; AVLnode* left; AVLnode* right; AVLnode* parent; AVLno...
ALGO
0.999923
3.95187
3978bed1-9a9a-4064-9d20-90c25d420a9f
aceyan/UE4.18.3_release
Engine/Source/ThirdParty/PhysX/PhysX_3.4/Source/SceneQuery/src/SqExtendedBucketPruner.cpp
#include "SqExtendedBucketPruner.h" #include "SqAABBTree.h" #include "SqPrunerMergeData.h" #include "SqAABBTreeQuery.h" #include "GuBounds.h" #include "CmBitMap.h" using namespace physx; using namespace Sq; using namespace Gu; using namespace Ps; #define NB_OBJECTS_PER_NODE 4 ////////////////////////////////////////...
ALGO
0.9106
6.328898
36978ad4-327f-422d-b583-5b161b3d34d3
AhmedEssamYassin/Problem-Solving
Topic-based Training/FFT, NTT/FWHT_AND.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define endl "\n" const ll mod = 1e9 + 7; #define double_size_t std::conditional_t<(mod > (1LL << 31)), __int128_t, long long> inline ll add64(const ll &a, const ll &b) { double_size_t res = double_size_t(a) + b; if (res >= mod) re...
ALGO
0.999966
5.095014
40c95cee-fc76-41fd-b432-abc6faed72c4
minblock/crackedcoin
src/versionbits.cpp
#include <versionbits.h> #include <consensus/params.h> ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const { int nPeriod = Period(params); int nThreshold = Threshold(params); int64_t nTimeStart =...
ALGO
0.99797
7.509752
8345c9cc-3e17-4f61-a795-9d935dd265cb
largetalk/leetcode
148_sort_list.cpp
/** * Sort a linked list in O(n log n) time using constant space complexity. Example 1: Input: 4->2->1->3 Output: 1->2->3->4 Example 2: Input: -1->5->3->4->0 Output: -1->0->3->4->5 **/ #include <stdio.h> #include <iostream> #include <vector> using namespace std; struct ListNode { int val; ListNode *next...
ALGO
0.999999
5.619641
75b2775a-27fa-47f4-a0bf-40ed52638525
AqeelHacker/flutter
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
0db7c933-1db8-425c-b8e6-de30d9ff349d
Refstop/VSLAM_Example
3rdparty/g2o/g2o/examples/icp/gicp_sba_demo.cpp
#include <stdint.h> #include <iostream> #include <random> #include "g2o/core/block_solver.h" #include "g2o/core/optimization_algorithm_levenberg.h" #include "g2o/core/solver.h" #include "g2o/core/sparse_optimizer.h" #include "g2o/solvers/eigen/linear_solver_eigen.h" #include "g2o/stuff/sampler.h" #include "g2o/types/...
ALGO
0.998873
5.241319
f12f6a2d-3ca3-43bf-a9db-cdc7b35bec0a
KhamchievAli06/CppFancProjects
Udalenye elemnta v massive po znachenyu.cpp
#include <iostream> #define random(min, max)(min + rand()%(max+1-min)) using namespace std; void fillArray(int** arr) { int size1 = _msize(arr) / sizeof(arr[0]); int size2 = _msize(arr[0]) / sizeof(arr[0][0]); for (int i = 0; i < size1; i++) { for (int j = 0; j < size2; j++) { arr[i][j] ...
ALGO
0.94977
3.658505
a70de191-5297-4b6b-a129-26e3bf600548
xiaopang59/multithreading
第三节/第三节/第三节.cpp
// .cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <vector> #include <map> #include <memory> #include <string> #include <thread> using namespace std; //void myprint(const int &i, char *pmybuf) //void myprint(const int i, char *pmybuf) void myprint01(con...
TOOL
0.874686
3.69154
d7fa32ff-79a2-43dc-8bab-06400ac9aa75
pmian/leetcode-75
Dynamic_Programming/min_cost_climbing_stairs.cpp
// https://leetcode.com/problems/min-cost-climbing-stairs/?envType=study-plan-v2&envId=leetcode-75 class Solution { public: int minCostClimbingStairs(vector<int> &cost) { int n = cost.size(); // Base cases if (n == 0) return 0; if (n == 1) return cost[0]...
ALGO
0.9999
6.67004
2d397247-6b8a-4296-b7ee-08428dfada21
Parul240/C_plus_plus-Programming
USER INPUT/Table_of_any_number.cpp
TABLE OF ANY NUMBER PROBLEM: /* Write a program to print the multiplication table of any number given by a user upto 10 */ Input : 4 Output: 4 x 1 = 4 4 x 2 = 8 4 x 3 = 12 4 x 4 = 16 4 x ...
ALGO
0.999231
3.276699
3b8bef90-bfb5-4e28-904d-90d41c146f38
shivangstreak/comp
Practise/Codeforces/Little_Girl_and_Game.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int c[26]; int main(){ char str[1005]; scanf("%s",str); int len=strlen(str); int k=0; for(int i=0;i<len;i++){ c[str[i]-'a']++; } for(int i=0;i<len;i++){ if(c[str[i]-'a']%2==1){ k++; } } if(k<=1){ printf("First\n"); } else{ if(k%2...
ALGO
0.999995
3.567339
a083f604-55da-4b6c-943d-dc1b4272496e
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/07/0702/personal_submission/cf1442b_Equinox.cpp
#include <bits/stdc++.h> using i64 = long long; using i128 = __int128; using PII = std::pair<int, int>; const int inf = 1e9 + 7, P = 998244353; struct Node { int x, pre, nxt, id; }; void solve() { int n, k; std::cin >> n >> k; std::vector<int> mp(n + 1), b(k); std::vector<Node> a(n + 1); for (...
ALGO
0.999949
4.632408
19134907-d0a3-4254-9854-f32a4e7dc842
mariaelisaaraya/ats
basicos/14-0.cpp
//Realice un programa que lea un valor entero y determine si se trata de un numero par o inpar #include<iostream> using namespace std; int main(){ int numero; cout << "Digite un numero= "; cin >> numero; if(numero == 0){ cout << "El numero es igual a cero"; } else if(numero%2 == ...
ALGO
0.992973
3.566615
97c3212c-5608-4b1e-9d89-68220fda6b93
suchetanrs/LeGO-LOAM-ROS2-Docker
home_dir/gtsam-4.0.0-alpha2/gtsam_unstable/slam/tests/testInvDepthFactorVariant1.cpp
/* * testInvDepthFactorVariant1.cpp * * Created on: Apr 13, 2012 * Author: cbeall3 */ #include <CppUnitLite/TestHarness.h> #include <gtsam_unstable/slam/InvDepthFactorVariant1.h> #include <gtsam/nonlinear/NonlinearEquality.h> #include <gtsam/nonlinear/LevenbergMarquardtOptimizer.h> #include <gtsam/nonlinear...
TEST
0.911319
6.804434
be9a59ba-e693-485f-a9e4-05dc576809da
Nakib-Arman/CSE318---ArtificialIntelligence
2105128/.history/2105128_20250722122251.cpp
#include<bits/stdc++.h> using namespace std; class Node { int column_num; string label; unordered_map<string,Node*> children; float threshold; public: Node(int column_num){ this->column_num = column_num; this->label = ""; this->threshold = 0; } Node(string labe...
ALGO
0.998105
4.916104
278ffab0-c2da-4bbb-9cf9-5efa070ff904
muhammadhasan01/cp
Online Judge/Atcoder/ABC/319/B.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; for (int i = 0; i <= n; i++) { bool flag = false; for (int j = 1; j <= 9; j++) { if (n % j == 0 && i % (n / j) == 0) { cout << j; ...
ALGO
0.99996
5.243545
16e729a9-6e5e-4af4-8137-afec120dbfc3
Vaibhavverma19/ReviseWithArsh-6Companies30Days-Challenge
day 21/_048_airplane_seating.cpp
f(n) = 1/n -> 1st person picks his own seat + 1/n * 0 -> 1st person picks last one's seat + (n-2)/n * ( ->1st person picks one of seat from 2nd to (n-1)th 1/(n-2) * f(n-1) -> 1st person pick 2nd'...
ALGO
0.999961
4.636601
2add0b59-a390-4d8b-9dce-86fb92e15ef1
csl-iisc/SBRP-ASPLOS23
simulator/src/intersim2/allocators/selalloc.cpp
// $Id: selalloc.cpp 5188 2012-08-30 00:31:31Z dub $ #include "booksim.hpp" #include <iostream> #include "selalloc.hpp" #include "random_utils.hpp" //#define DEBUG_SELALLOC SelAlloc::SelAlloc( Module *parent, const string& name, int inputs, int outputs, int iters ) : SparseAllocator( parent, name, inputs, o...
ALGO
0.919309
4.530046
34dadffe-af77-4942-b4b4-65b94b96265e
CSI-SRM-NCR-Chapter/100-Days-of-Code
ridam krishna/day-1/1b.cpp
class Solution { public: vector<string> fizzBuzz(int n) { vector<string> ans(n); for(int i=1; i<=n;i++){ if(i%3==0 && i%5==0) ans[i-1]="FizzBuzz"; else if(i%3==0) ans[i-1]="Fizz"; else if(i%5==0) ans[i-1]="Buzz"; else ans[i-1]=to_string(i); ...
ALGO
0.999875
6.638385
0b92ae58-10f6-4851-9825-018d17ded1c5
Esheta10/LeetCode-Solutions
0350-intersection-of-two-arrays-ii/0350-intersection-of-two-arrays-ii.cpp
class Solution { public: vector<int> intersect(vector<int>& nums1, vector<int>& nums2) { sort(nums1.begin(),nums1.end()); sort(nums2.begin(),nums2.end()); int i=0;// nums1 int j=0;// nums2 vector<int> result; while(i<nums1.size() && j<nums2.size()) { ...
ALGO
0.999994
5.677159
94d9fee2-bbb9-49fd-8e97-24ede0d637b7
stefdasca/CompetitiveProgramming
Infoarena/fi.cpp
#include<fstream> using namespace std; ifstream f("fi.in"); ofstream g("fi.out"); int m,n,a,b,c,d,tf,p,k,nrmaxLC,nrpLC,ok=1; int Stanga() { c=a; if(p<=b) {d=b-p+1; tf=p;} else if(p<2*b) {d=p-b+1; tf=b;} else d=tf=p-b+1; return 0; } int Completa() { int nrlin=p/(3*k+1); c=a+nrlin; b+=nrlin*k; p-=...
ALGO
0.999963
3.124232
500e2b7b-d473-457b-be7e-044accc6277d
Hamim-200/Introduction-to-Algorithms_Phitron
Module_5/cycle_detection_using_bfs.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; bool vis[N]; vector<int> adj[N]; int parrentArray[N]; bool ans; void bfs(int s) { queue<int> q; q.push(s); vis[s] = true; while (!q.empty()) { int parent = q.front(); q.pop(); for (int child : adj[parent]) ...
ALGO
0.999974
4.90815
af3cd718-6913-4ed6-865e-7cf93866ecc1
omaarsaaleh/Competitive-Programming
graphs/BFS/UVa/Knight-Moves.cpp
#include<iostream> #include <cmath> #include<vector> #include<algorithm> #include<set> #include<iomanip> #include <string> #include <map> #include<queue> #include<numeric> #include <sstream> using namespace std; #define ll long long #define all(x) x.begin(), x.end() #define for1(n) for (int i = 0; i<n; i++) #define v...
ALGO
0.999942
4.909423
4754085e-5575-4081-b80b-a6646a00a3ec
andreiavrammsd/archive
cpp-learn/templates/specialization_basic.cpp
#include <vector> #include <numeric> #include <string> #include <complex> #include <cassert> template<typename T> class Container { std::vector<T> v; public: Container(std::initializer_list<T> list) : v{list} {} T compute() { return std::accumulate(v.begin(), v.end(), T{}); } }; template<> cl...
TOOL
0.975218
6.766091
aaa30df9-455b-40fb-8158-bc5b818e1ac8
seregonwar/ShadPKG
common/string_util.cpp
#include <algorithm> #include <sstream> #include <string> #include "common/string_util.h" #include "common/types.h" #ifdef _WIN32 #include <windows.h> #endif namespace Common { std::string ToLower(std::string_view input) { std::string str; str.resize(input.size()); std::ranges::transform(input, str.begin...
TOOL
0.898723
6.867848
cf8f8da5-2e9e-4851-8642-55db2223b643
galacean/effects-native
core/plugin/particle/link_chain.cpp
// // link_chain.cpp // // Created by Zongming Liu on 2022/1/20. // #include "link_chain.hpp" #include "util/log_util.hpp" namespace mn { LinkNode::LinkNode() { pre_ = nullptr; next_ = nullptr; } LinkNode::LinkNode(std::vector<float> content) { content_ = content; pre_ = nullptr; next_ = nullp...
ALGO
0.998204
4.415785
17bbedd2-5fec-4ad9-9179-b2a450c61040
beastwaleed/CppCodes
SumandCount.cpp
#include<iostream> using namespace std; int main(){ int n1,n2,sum,count=0; cout<<"Enter Number for Addition and Couting Digits of Sum (Space for Second Num): "; cin>>n1>>n2; sum=n1+n2; cout<<"The Sum of Two Numbers is: "<<sum<<endl; while(sum!=0) { sum=sum/10; count++; ...
ALGO
0.997204
4.476707
fda1bfa5-6eae-4950-a474-f4bffec84646
JasmineHJM/learn_cpp
advanced/01_03.cpp
#define _CRT_SECURE_NO_WARNINGS 1 #include<iostream> using namespace std; template <class T1, class T2> struct pair { typedef T1 first_type; typedef T2 second_type; T1 first; T2 second; pair() : first(T1()), second(T2()) {} pair(const T1& a, const T2& b) : first(a), second(b) {} }; int main() { int...
TOOL
0.919309
3.655027
5cb9b001-f59a-48ba-8b8c-1565826e946c
SakshamSahgal/Competitive-Programming
Codeforces + Codechef/B. Integers Shop2.cpp
#include<iostream> #include<cstring> #include<vector> #include<set> #include<map> #include<algorithm> #include<cmath> #include<climits> #define lli long long int #define GO_FAST ios_base::sync_with_stdio(0);ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); using namespace std; const lli inf = 1e18; /* void pair_printer(...
ALGO
0.999587
3.769667