uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
c0f627e6-9084-4bcb-b9d1-4a1cd97892cc
VatsalP117/dsa-questions
Dynamic Programming/DP on LIS/Knapsack/count_subsets_sumK.cpp
//link: https://www.codingninjas.com/studio/problems/count-subsets-with-sum-k_3952532?utm_source=striver&utm_medium=website&utm_campaign=a_zcoursetuf&leftPanelTab=1 int solve(int ind,int sum,vector<int> &nums,vector<vector<int>> &dp){ if(ind<0){ if(sum==0){ return 1; } ...
ALGO
0.999989
5.983477
65db146e-85d0-4eb7-8af6-89fb537b2083
azakrytnoi/uva
vol004/u437/u437.cpp
#ifdef _WIN32 #define UVA_API_EXPORT __declspec(dllexport) #else #define __cdecl #define UVA_API_EXPORT #endif #include "u437.h" #include <iostream> #include <iomanip> #include <vector> #include <string> #include <algorithm> #include <iterator> #include <numeric> #include <limits> extern "C" { UVA_AP...
ALGO
0.997331
4.933609
1026247c-874d-4c73-aef7-f523d35f3be3
UDAY2031/Logic_Building
pattern2/code.cpp
#include<iostream> using namespace std; void pattern(int n){ for(int i=0;i<n;i++){ for(int j=0;j<=i;j++){ cout<<"* "; } cout<<endl; } } int main(){ int t; cout<<"Enter the number of test cases"<<endl; cin>>t; for(int i=0;i<t;i++){ int n; cout<<...
ALGO
0.999844
4.705348
417349be-3edb-452a-9651-dbd248090457
junaidrahim/Hacktoberfest-KIIT-2021
ROHIT KUMAR SINGH (Hacktober Contribution)/DS topics/SinglyLinkList.cpp
//Implementation of Singly Link List #include<iostream> using namespace std; class Node { public: int key; int data; Node *next; Node() { key = 0; data = 0; next = NULL; } Node(int k,int d) { key = k; data = d; } }; class SinglyLinkLis...
ALGO
0.999689
4.916617
e5e44c11-e465-4eca-a748-9d9528a7c75a
senthilnathan01/DSA
Basics/Problems/Arrays/union_of_two_sorted_arrays.cpp
#include <iostream> #include<vector> using namespace std; /* Given two sorted arrays of size n and m respectively, find their union. The Union of two arrays can be defined as the common and distinct elements in the two arrays. Return the elements in sorted order. */ class Solution{ public: //arr1,arr2 : the...
ALGO
0.99998
4.888194
67955bf4-de4f-4e28-9c92-ab7fb5384579
mayank7jha1/LG
LGSoft/Good.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; #define int long long bool IsPrime(int x) { if (x < 2) { return false; } if (x % 2 == 0) { if (x == 2) { return true; } else { return false; } //return x == 2; } for (int i = 3; i <= sqrt(x); i += 2) { if (x % i == 0) { ret...
ALGO
0.999963
4.404254
bd13031a-134d-47b2-8b0a-2b2a00d0f22f
thegamer1907/Code_Analysis
CodesNew/793.cpp
#include<iostream> #include<vector> #include<cmath> #include<string> #include<algorithm> using namespace std; int main(){ int n,m,c=0;cin>>n>>m; vector<string> v(n),g(m); for(int i = 0 ; i < n ; i ++){ cin>>v[i]; }for(int j = 0 ; j < m ; j ++){ cin>>g[j]; for(int i =...
ALGO
0.999992
3.504798
93380bbe-b806-4706-abd5-86ebe793a970
GiantPay/GiantCore
src/primitives/block.cpp
#include "primitives/block.h" #include "hash.h" #include "script/standard.h" #include "script/sign.h" #include "tinyformat.h" #include "utilstrencodings.h" #include "util.h" uint256 CBlockHeader::GetHash() const { if(nVersion < 6) return HashQuark(BEGIN(nVersion), END(nNonce)); return Hash(BEGIN(nVer...
ALGO
0.976435
6.472555
55fb0a24-b662-4376-a7cc-a58e6e9f2b14
adolfomunoz/FoC
src/listint/listint.cpp
#include "listint.h" ListInt create() { ListInt li; li.first = nullptr; return li; } void push(ListInt& li, int value) { Node* new_node = new Node; new_node->next = li.first; new_node->data = value; li.first = new_node; } int add_all(const ListInt& li) { int sol = 0; Node* node = li....
ALGO
0.950171
4.463861
aeca889b-09a0-4861-b034-deb06f139af5
muawiyaKaleem/Semester-1
C++Loops/Task 2.cpp
#include<iostream> using namespace std; int Pelindrome(int num) { int left,final=0; while(num!=0) { left = num%10; final = (final*10) + left; num/=10; } return final; } int main() { int n,final; cout<<"Enter the number to check => ";cin>>n; final = Pelindrome(n); if (final == n) { cout<<n<<" is a Pe...
ALGO
0.999769
3.971447
3f72bccb-f239-4bd1-81a2-99a06adefb11
ishandutta2007/codeforces
0wuming0/normal/1622/C.cpp
#include"bits/stdc++.h" using namespace std; #define ll long long ll a[200005]; int main() { int t; cin>>t; while(t--) { int n; ll k; cin>>n>>k; ll sum=0; for(int i=0;i<n;i++) { scanf("%lld",a+i); } ll ans=1e18; sort(a,a...
ALGO
0.999968
3.637115
191ec9e2-42dd-47d5-95d7-4eb84a8a75c4
harsha-vardhan905/DSA0151-OOPS
Day-4[16-05-2024]/11.Matrix_multiplication.cpp
#include <iostream> int main() { const int rows1 = 3, cols1 = 3, rows2 = 3, cols2 = 2; int matrix1[rows1][cols1] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; int matrix2[rows2][cols2] = {{9, 8}, {7, 6}, ...
ALGO
0.999722
4.73983
4794aced-a385-4f60-9919-226f84d07ab3
ishandutta2007/codeforces
abeker/normal/855/B.cpp
#include <cstdio> #include <algorithm> using namespace std; typedef long long ll; const int MAXN = 100005; const ll INF = 4e18; int N, P, Q, R; int a[MAXN]; ll pref[MAXN], suff[MAXN]; int main() { scanf("%d%d%d%d", &N, &P, &Q, &R); for (int i = 0; i < N; i++) scanf("%d", a + i); for (int i = 0; i < N; i++) {...
ALGO
0.999874
3.191732
57d9aaf4-fe2a-40d8-8d4e-c5c6ff2f2251
dong-xt/PATtest
PAT basic/1046.cpp
#include<iostream> using namespace std; int main() { int n; cin >> n; int as, ag, bs, bg; int ad = 0, bd = 0; for(int i = 0; i < n; i++) { cin >> as >> ag >> bs >> bg; if(as + bs == ag && as + bs != bg) { bd++; } else if(as + bs != ag && as + ...
ALGO
0.998412
3.892307
c2b78ada-977b-478d-a704-d9187b6d771e
Dongubak/DataStructureAndAlgorithm
복습/자료구조알고리즘/그래프/[G]O(17143)낚시왕.cpp
#include <iostream> #include <vector> #include <map> #include <tuple> using std::cin; using std::cout; using std::vector; using std::pair; using std::map; using std::tuple; using std::make_tuple; int R, C, N; /// N은 상어의 마리 수 class ob { public: int r, c, s, d, z; ob(int R = 0, int C = 0, int S = 0, int D = 0,...
ALGO
0.999556
4.319152
14bb4469-462b-48ee-87bc-d34d30cc46b2
lkm543/Algorithm
Chapter06/06_05_majorityElement.cpp
/* LeetCode#169 多數元素 Majority Element A. 題目 給定一個長度為 n 的整數陣列 nums,回傳「多數元素」。這裡多數元素指的是「出現多於 ⌊n/2⌋ 次的元素」。測資中的每個陣列中都存在一個多數元素。 B. 出處: https://leetcode.com/problems/majority-element/ */ class Solution{ // 傳入整數陣列、下界的索引值與上界的索引值 // 回傳介於傳入下界與上界間的區間中的多數元素 int majority_range( vector<int>& nums, int lower, int up...
ALGO
0.999989
5.685625
73981cc3-39dc-469e-8520-8a09807426cf
ConnectNitish/cp_practice
src/codechef/BFLSEQ.cpp
#include<bits/stdc++.h> #define ll long long int #define MOD 1000000007 using namespace std; vector<ll> arr; vector<vector<ll>> dp; ll dfs(int index,int k, int p){ if(index >= arr.size()) return 0; if(k == 0){ return 1; } ll n = arr.size(),ans = 0; for(int i = index+1;i<n-k+1;i++){ if((arr[i] - arr[...
ALGO
0.999923
3.667185
2b849d9c-e4fa-4b0d-912f-ca914b39b0c3
FernandoDenis/API
api/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.998386
6.76775
b541c2cc-1626-4203-9257-e31660fe7398
ZlozieCode/Leetcode-Solved-Questions
572-subtree-of-another-tree/572-subtree-of-another-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.999942
6.045412
4fc13dac-cc43-4ea4-9c2a-1d404feb77a0
DevilHeartlesss/DSA
loops2/sumofdigitsofgivenno.cpp
#include<iostream> using namespace std ; int main() {int n; cout<<"Enter A number:"; cin>>n; int lastdigit=0;//jaruri nahi hain phir bhi karlo int sum =0; while (n>0) { lastdigit=n%10;//last digit find hota h isse sum+= lastdigit;//sum ke andar last digit ko add kardo n/=10; } cout<<sum; }
ALGO
0.999588
3.836415
684eafe2-7888-4da2-843a-db4a2723ce70
dreamsxin/example
algorithm/算法的乐趣代码/code23/fir/OdEvaluator.cpp
#include "StdAfx.h" #include "OdEvaluator.h" #include "GameState.h" #include "Support.h" OdEvaluator::OdEvaluator(void) { } OdEvaluator::~OdEvaluator(void) { } int OdEvaluator::Evaluate(GameState& state, int max_player_id) { int min = GetPeerPlayer(max_player_id); /* int ev = (state.CountPosValue(max_player...
ALGO
0.998331
3.204182
d73a165c-deb7-4de6-9a75-af2fce977ccc
ashrafabuelrai/CSES-Solution
CSES-main/Sorting and Searching/Sum of Three Values.cpp
#include<bits/stdc++.h> using namespace std; const int mod = 1e9+7; #define ll long long #define mx 2000005 int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n,x;cin>>n>>x; vector<int>a(n); vector<pair<int,int>>v(n); for(int i=0;i<n;++i) { int xx; cin>>xx; a[i]=xx...
ALGO
0.99997
3.922303
342f3891-0814-4bdb-affb-e6292b438e46
tfg1434/cp
Codeforces/1542B.cpp
#include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; #define ll long long #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define IN(A, B, C) assert(B <= A && A <= C) constexpr int MOD = 1e9 + 7; constexpr int INF = 1e9; constexpr ll INFF = 1e18; int main() { io...
ALGO
0.999672
4.918432
00ac4ae0-f893-48c5-9bfb-09b9a73af350
darshanp2005/My-DSA-Codes
18Graphs/graph 2 codes/undirected dfs.cpp
class Solution { public: bool checkCycle(int src,unordered_map<int,bool>& vis, int parent,vector<int> adj[]) { vis[src] = true; for(auto nbr: adj[src]) { if(nbr == parent) { continue; } if(!vis[nbr]) { bool ans = checkCyc...
ALGO
0.999621
5.839162
8386dba8-3c25-4a07-9d43-2ef9e6b77c19
ShubhamKumaR-96/DSA_Question
Intermediate DSA/PatternQues/Hollow_Rectangle_Pattern.cpp
#include <iostream> using namespace std; void hollowReactnglePattern(int n) { for (int i = 1; i <= n; i++) { cout << "*"; // First for (int j = 1; j <= n - 1; j++) { if (i == 1 || i == n) { cout << "*"; } else {...
ALGO
0.99125
4.99278
77309c0e-9276-4eea-9042-8c95cd06fdd1
MadingleyR/MadingleyR
SourceCode/madingley/src/Dispersal.cpp
#include "Dispersal.h" Dispersal::Dispersal( ) { ; } /** \brief Run the dispersal implementation */ void Dispersal::Run( Grid& gridForDispersal, Cohort* cohortToDisperse, const unsigned& currentMonth ) { std::cout << "Called virtual dispersal runner: probably not what you want" << std::endl; } void Dispersal...
ALGO
0.995997
5.972717
9368974b-df61-4696-8c7d-fe012d45ce0d
Rasul230405/E_Olymp
e_1952.cpp
// e_1952.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> using namespace std; int main() { int n; int max = 0; int min = 0; cin >> n; int* arr = new int[n]; for (int i = 0; i < n; ++i) cin >> arr[i]; max = arr[0]; for (in...
ALGO
0.999848
4.42522
d9dfbf61-4ed8-40bc-b31b-2d7973dc1215
Snake-Edition/P32-FW
lib/Prusa-Firmware-MMU/src/modules/crc.cpp
/// @file #include "crc.h" #ifdef __AVR__ #include <util/crc16.h> #endif namespace modules { namespace crc { #ifdef __AVR__ uint8_t CRC8::CCITT_update(uint8_t crc, uint8_t b) { return _crc8_ccitt_update(crc, b); } #else uint8_t CRC8::CCITT_update(uint8_t crc, uint8_t b) { return CCITT_updateCX(crc, b); } #en...
TOOL
0.867862
6.583109
6784e8ef-8f0a-49ac-83da-9fd44b085af2
Uday-Mi/Interview-Bit
Programming Interview Bit/Strings/amazing_subarrays.cpp
/* You are given a string S, and you have to find all the amazing substrings of S. Amazing Substring is one that starts with a vowel (a, e, i, o, u, A, E, I, O, U). Input Only argument given is string S. Output Return a single integer X mod 10003, here X is number of Amazing Substrings in given string. Constraints ...
ALGO
0.999879
4.612774
e7cee612-ad4d-473e-a9b8-562b0c0aa5c5
XiaoyuNoFish/Data-Structrue
HFUT_Data_Structure/Lab_Expansion_linear_problems/1/spmatrix.cpp
/*㷨ʵϡӦ 1ϡࣻ 2ʵnϡˡ*/ #include "matrix.h" using namespace std; int main(void) { vector<spmatrix> s = reset(); insert(s); plus_spmatrix(s); cout<<endl; multiply_spmatrix(s); system("pause"); return 0; }
ALGO
0.980406
3.428812
5761035b-70ea-43e9-a457-da145b253341
xshuo/BasicAlgorithm
USACO_Training/USACO_Training/gift1.cpp
#ifdef __GIFT1__ /* ID: shuoxie1 PROG: gift1 LANG: C++ */ #include <iostream> #include <fstream> #include <string> #include <map> using namespace std; typedef struct Money_Node { int start, end; Money_Node(int s, int e): start(s), end(e){} } Node; int main(int argc, char** args) { ifstream fin("gift1.in"...
ALGO
0.999023
3.491147
91db46da-6e7f-4f20-a6da-00e700b8851d
Zlin0509/Zlin_ACM
_CF/CONTEST/2000-2499/2046/C.cpp
// // Created by Zlin on 2025/2/3. // #include "bits/stdc++.h" #define endl "\n" using namespace std; typedef double db; typedef long double ldb; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<long long> vll; typedef pair<int, int> pii; typedef pair<long long, long long> ...
ALGO
0.999953
4.993721
06b95f64-2567-43f7-868e-3a8cce84bbb4
manikanta2901/ubuntu
.history/SRM/elab/AlgorithmAnalysisAndDesign/Random/InsertionSort_20210121154058.cpp
#include<bits/stdc++.h> using namespace std; vector<int> insertionSort(vector<int> numbers){ for (int i = 1; i < numbers.size(); i++) { int value = numbers[i]; int j = i - 1; while (j >= 0 && numbers[j] > value) { numbers[j + 1] = numbers[j]; j = j - 1; ...
ALGO
0.999993
5.352668
0e20fd75-a67d-4ec3-b9da-e2ae9477e00d
jielmn/MyProjects
Work/监护仪校准_1/监护仪校准_1/common.cpp
#include <time.h> #include "common.h" #include <setupapi.h> #include <locale.h> #include "resource.h" #include "CustomControls.h" #include "WaitingBarUI.h" CGlobalData g_data; BOOL EnumPortsWdm(std::vector<std::string> & v) { // Create a device information set that will be the container for // the device interfac...
TOOL
0.878019
3.400042
2d2ac5d4-8587-415a-b96b-f9de68914622
Manav-Agg/Coding-Blocks-2023
Data Structure and Algorithm/October 2023/October 19 Binary Tree/Input and printing Level Order Tree.cpp
#include<iostream> #include<queue> using namespace std; class node{ public: int data; node* left, *right; node(int d){ data = d; left = right = NULL; } }; node* buildLevelOrder(){ int data, left, right; cout << "Enter the data for root node : "; cin >> data; if(data...
ALGO
0.999291
4.48313
c00a54b0-8a3f-4e15-8a8a-e6bb54759b64
BarDavid2394/Projects
Leetcode Questions/0290-word-pattern/0290-word-pattern.cpp
// class Solution { // public: // bool wordPattern(string pattern, string s) { // unordered_map<char,string> map; // unordered_map<string, char> usedWords; // int index = 0; // int word_counter = 0; // for(char c : pattern){ // string word = ""; // whi...
ALGO
0.995406
6.22438
9089a6a1-6a7e-4101-80cb-d0e1528d450c
Octo-Siddharth/C-and-CPP-Programming-Chapterwise
Stack_and_Queue/Stack_Array_Implementation.cpp
#include<iostream> #include<stack> using namespace std; class Stack { public : int * arr; int top; int size; //Constructor Stack(int s) { this -> size = s; arr = new int[s]; top = -1; } //Stack functions ...
ALGO
0.993896
4.286281
d942aee2-1b40-4d73-9342-fd691e4532e5
amanbelwal/dsa-C-
math program/stacktry.cpp
#include<iostream> #include<stack> using namespace std; int main() { stack<int> s1; s1.push(3); s1.push(4); cout<<s1.size(); int i=s1.size()-1; while(!s1.empty()) { cout<<s1.top(); s1.pop(); } return 0; }
ALGO
0.998578
3.831842
f55c02ef-f839-4730-9ea7-d3f0ad4e1747
jmr1/bcpost
pp/generator/CircleGenerator.cpp
#ifdef _MSC_VER #pragma warning(disable : 4348) #endif #ifndef NDEBUG #define BOOST_SPIRIT_DEBUG #endif #include "CircleGenerator.h" #include <iomanip> #include <map> #include <string> #include <boost/config/warning_disable.hpp> #include <boost/phoenix/bind.hpp> #include <boost/spirit/include/classic_position_itera...
TOOL
0.975179
5.757545
1b04a073-d4f7-4ba9-a29b-2d70c842309f
sarvex/leetcode-j
lcci/16.19.Pond Sizes/Solution.cpp
class Solution { public: vector<int> p; vector<int> size; vector<int> pondSizes(vector<vector<int>>& land) { int m = land.size(), n = land[0].size(); for (int i = 0; i < m * n; ++i) { p.push_back(i); size.push_back(1); } for (int i = 0; i < m; ++i) { ...
ALGO
0.999874
6.235014
d93c1c84-2d72-48a8-91e3-24b0236e6728
IRMV-Manipulation-Group/SpherizedURDFGenerator
third_party/header_only/igl/copyleft/cgal/extract_feature.cpp
#include "extract_feature.h" #include "../../unique_edge_map.h" #include "../../PI.h" #include <CGAL/Kernel/global_functions.h> #include <CGAL/Exact_predicates_exact_constructions_kernel.h> template< typename DerivedV, typename DerivedF, typename DerivedE > IGL_INLINE void igl::copyleft::cgal::extract_feature( ...
ALGO
0.891349
6.970203
1421b407-e42e-420e-8881-fcca8dca2616
gitADITYAhub/LEETcode
0133-clone-graph/0133-clone-graph.cpp
/* // Definition for a Node. class Node { public: int val; vector<Node*> neighbors; Node() { val = 0; neighbors = vector<Node*>(); } Node(int _val) { val = _val; neighbors = vector<Node*>(); } Node(int _val, vector<Node*> _neighbors) { val = _val; ...
ALGO
0.999981
6.302727
8f72341b-87d0-47cf-96d2-04a40db3eb58
luoyu-xingu/practising-luoyu
practicing/contest/7-5/b.cpp
#include<bits/stdc++.h> void solve(); int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); solve(); return 0; } void solve() { int n; std::cin >> n; int a = n % 10; n /= 10; int b = n % 10; std::cout << b << a << "\n"; }
ALGO
0.999505
5.455799
650fbebf-b0a0-4eae-ae47-78f98ab132e6
K14KHaNaSa/bojPractice
2294.cpp
#include <iostream> using namespace std; int coin[100]; int cnt[10001]; int main(void) { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, k, cn; int okcoin = 0; // count only coin <= k cin >> n >> k; for (int i = 1; i <= k; i++) { cnt[i] = 100001; } for (int i = 0; i < n; i++) { cin >> ...
ALGO
0.999915
3.839699
cca72e21-68ab-45e4-a1f4-42882c0d61c7
langningchen/Luogu
B2042.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll n; int main() { cin >> n; cout << ((n % 3 == 0 && n % 5 == 0) ? "YES" : "NO") << endl; return 0; }
ALGO
0.999927
4.034495
80cec7b2-14ac-419e-8a93-ef0b96af2d3b
ChuyingHe/duckdb-master-rl
src/optimizer/expression_rewriter.cpp
#include "duckdb/optimizer/expression_rewriter.hpp" #include "duckdb/common/exception.hpp" #include "duckdb/planner/expression_iterator.hpp" #include "duckdb/planner/operator/logical_filter.hpp" #include "duckdb/function/scalar/generic_functions.hpp" #include "duckdb/planner/expression/bound_function_expression.hpp" ...
TOOL
0.890143
7.877953
08c055e0-8bb1-493d-833d-705b3bb237e3
frbaroni/spoj
POPULAR/main.cpp
#include <iostream> #include <vector> using namespace std; int main() { int n; while(cin >> n && n != 0) { int bv = 0, v; vector<int> votos; votos.reserve(n); for(int i=0; i<n; i++) votos[i] = 0; for(int i=0; i<n; i++) for(int j=0; j<n; j++) { cin >> v; if(v == 1) { votos[j]++; ...
ALGO
0.999402
3.853024
e21f4aeb-f584-4eb0-8492-482c9bfd0d78
Solus-sano/sduwh_data_structure
2024/homework1.cpp
#include<iostream> #include<vector> #include<string> #include<fstream> #include<sstream> #include<algorithm> using namespace std; vector<double> get_data(){ ifstream file("hw1_data.txt"); string line; vector<double> values; if (file.is_open()) { // check if file is successfully opened while (g...
ALGO
0.999555
4.305218
0b38fc36-0d69-4d9f-b623-b61c5d330333
sourcegraph/lsif-clang
libcxx/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp
// <numeric> // UNSUPPORTED: c++03, c++11, c++14 // template<class InputIterator, class OutputIterator, class T, class BinaryOperation> // OutputIterator // exclusive_scan(InputIterator first, InputIterator last, // OutputIterator result, // T init, BinaryOperation binary_...
TEST
0.974174
6.51299
e03734b4-6567-4cd4-a7bc-c36c8266f43f
M-Salameh/codeforces-problems
D - Smithing Skill.cpp
#include <bits/stdc++.h> #define int long long #define mid (l+r)/2 #define endl '\n' using namespace std; const int inf = 2e18+5; const int NN = 1e6+2; int tc=1; int n,m; pair<int,int> arr[NN]; pair<int,int> brr[NN]; int c[NN]; int dp[NN]; int get_index(int val) { int l = 1 ; int r = n; int idx = 0; ...
ALGO
0.999973
3.724482
dc0e38d3-be26-4a0d-a72e-3925c9c86e1c
benpye/Engine
Engine/Private/Filesystem/Filesystem.cpp
#include "Filesystem.h" #include "StdioSearchPath.h" #include "ZipSearchPath.h" #include "PathUtils.h" #include <algorithm> #include <cstdio> #ifdef WIN32 #define WIN32_LEAN_AND_MEAN #include <windows.h> #endif std::string Filesystem::GetApplicationDirectory() { #ifdef WIN32 TCHAR buffer[MAX_PATH]; GetModuleFileNa...
TOOL
0.962979
5.876502
05a25b77-0a87-4430-884d-8750a04d73e2
fyrsta7/LLM_on_ASAC
result_api_backup/en_without_annotation_mzn/deepseek-coder_loop10/Earthworms-0.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int N, M, Q, u, v, t; cin >> N >> M >> Q >> u >> v >> t; vector<int> A(N); for (int i = 0; i < N; ++i) { cin >> A[i]; } vector<vector<int>> S(M + 1, vector<int>(N + M)); vector<int> pos(M)...
ALGO
0.999933
3.841702
aa848f7a-e3f2-4810-8433-cbc0d4614e2d
ishandutta2007/codeforces
kshitij_sodani/normal/1491/B.cpp
//#pragma GCC optimize("Ofast,unroll-loops") #include <bits/stdc++.h> using namespace std; typedef long long llo; #define mp make_pair #define pb push_back #define a first #define b second #define endl '\n' llo it[101]; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); llo t; cin>>t; while(t--){ llo ...
ALGO
0.999917
4.315154
a5a728be-fcd0-4521-ae6f-b7f60a8ad4c5
codedeprived/CSES-ProblemSet-Solutions
IntroductoryProblem/IncreasingArray.cpp
#include<iostream> using namespace std; #define ll long long #define ld long double int main() { ll n; cin>>n; ll op = 0; ll prev; for(int i = 0; i<n ; i++) { ll temp ; cin>>temp; if(i!= 0 && prev > temp) { op += prev - temp; prev = temp + (p...
ALGO
0.999908
3.53415
5f642a7b-2cf6-485f-885e-3d85011348af
ishandutta2007/codeforces
sonechko/normal/731/C.cpp
#include<bits/stdc++.h> using namespace std; const long long MOD = 1000000000000000; const int N = 200000+10; const int M = 1000; const string st2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; const string s1 = "abcdefghijklmnopqrstuvwxyz"; #define mod % MOD #define filesio(x) freopen(x ".in", "r", stdin); freopen(x ".out", "w", s...
ALGO
0.999961
3.81477
3b417d2b-8b00-4257-8e15-a92e32bd3936
blacksea3/leetcode
cpp/leetcode/5256. reconstruct-a-2-row-binary-matrix.cpp
#include "public.h" // //̰, жupper+lowercolsum //Ȼ2, ȫ1, Ȼ1, class Solution { public: vector<vector<int>> reconstructMatrix(int upper, int lower, vector<int>& colsum) { int tot = accumulate(colsum.begin(), colsum.end(), (int)0); if ((upper + lower) != tot) return vector<vector<int>>{}; else { int colSize...
ALGO
0.999832
5.085778
3cdaedaa-25b8-4132-9f99-fb6521396a87
knavoid/just-algorithm
sw-expert-academy/D3/적고 지우기.cpp
#include <iostream> #include <string> #include <unordered_set> using namespace std; int main() { int T; cin >> T; for (int t = 1; t <= T; t++) { string numbers; unordered_set<int> note; cin >> numbers; for (char c : numbers) { int n = c - '0'; // n이 적혀있지 않은 경우 if (note.find(n) == note.end()) ...
ALGO
0.999371
4.677219
873c8b5d-6eed-4bbb-87f7-ec467f7025bc
MdRifat-Hossen/DSA
2. Queue/Dequeue.cpp
class Deque { int *arr; int front; int rear; int size; public: // Initialize your data structure. Deque(int n) { size = n; arr = new int[n]; front = -1; rear = -1; } // Pushes 'X' in the front of the deque. Returns true if it gets pushed into the deq...
ALGO
0.999256
5.099429
8934379c-bc47-4c25-94db-1fa2cbdf88ee
vsprojects87/DS-Codes
2D Matrix Operations.cpp
#include <iostream> int main() { int a[3][3] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; int i = 0; // Enter Matrix element // std::cout << "Enter the matrix elements" // << "\n"; // for (; i < 3; i++) { // for (int j = 0; j < 3; j++) { // std::cin >> a[i][j]; // } // } // Print matrix : ...
ALGO
0.932927
3.281981
c4782752-68a7-40ec-b323-9c41ccffacd7
MING-ZCH/exercises-Introductory-Classics-for-Algorithmic-Competitions
chapter_6/UVa_572.cpp
/* * @Description: 例题6-12 油田(Oil Deposits, UVa 572) * @Author: Xiaobin Ren * @Date: 2020-03-26 16:26:40 * @LastEditTime: 2020-03-26 16:38:53 */ #include <bits/stdc++.h> using namespace std; #define rep(i,a,n) for(int i = a; i< n; i++) #define per(i,a,n) for(int i=n-1; i>=a; i--) #define pb push_back #define mp ma...
ALGO
0.999805
4.041911
3504a7e0-a4a1-4d24-bd1a-49db54d0acc9
Sofia1401/import-proyect-2
thirdparty/basis_universal/encoder/basisu_resample_filters.cpp
#ifndef M_PI #define M_PI 3.14159265358979323846 #endif namespace basisu { #define BOX_FILTER_SUPPORT (0.5f) static float box_filter(float t) /* pulse/Fourier window */ { // make_clist() calls the filter function with t inverted (pos = left, neg = right) if ((t >= -0.5f) && (t < 0.5f)) return 1.0f; else ...
ALGO
0.99754
5.548262
4e5d30a2-cd40-4e2f-bcc9-1ce496620772
CSCI-3010-CUBoulder/Fall20-002-Team1
functions_to_implement.cpp
/* String functions section */ // Splits a single string on separator into a vector of strings std::vector<std::string> Split(std::string whole, std::string separator); // takes two strings and returns a new string that is the result of removing all occurrences of s2 from s1. std::string RemoveAllSubstrings(std::stri...
TOOL
0.979751
5.51851
037a19fc-007a-4001-b47a-dab660331a13
smhemel/Codeforces-Online-Judge
Codeforces Round #276 (Div. 2) - Valuable Resources/Codeforces Round #276 (Div. 2) - Valuable Resources/main.cpp
#include <iostream> #include <algorithm> #define ll long long using namespace std; int main() { ll x,y,n,xmin = 9999999999,xmax = -99999999999,ymin = 9999999999,ymax = -99999999999; cin >> n; for(int i=0; i<n; i++){ cin >> x >> y; xmin = min(xmin,x); xmax = max(xmax,x); ymin ...
ALGO
0.999719
4.198025
37430581-6409-436d-ba4c-e5ae4093fb09
harshil9705/DSA
loops/for4.cpp
#include<iostream> using namespace std; int main() { for (int i = 0; i < 5; i++) { for (int j = i; j <= 5; j++) { cout << i << " " << j << endl; } } return 0; }
ALGO
0.988697
3.043095
4c61b865-2641-485d-9901-0d5888b76c09
smshaqib/Solved_by_shaqib
CF 1914A.cpp
#include<bits/stdc++.h> #define ll long long #define VI vector<int> #define YES cout<<"YES\n"; #define yes cout<<"yes\n"; #define NO cout<<"NO\n"; #define no cout<<"no\n"; #define endl "\n"; using namespace std; void solve( ){ int n; cin>>n; int l[26+5]; for(int i=0; i<26+5; i++){ l[i]=0; ...
ALGO
0.999775
4.248609
8ac53086-991d-417b-b3b9-b96e7ff06db0
timstellar/labs
Lab4/main.cpp
#include <iostream> #include <vector> #include <algorithm> #include <numeric> #include <string> #include <sstream> float mean(const std::vector<float>&); std::pair<float, float> minMax(const std::vector<float>&); void sort(std::vector<float>&); bool remove_first_negative_element(std::vector<int>& vec, int& removed_ele...
ALGO
0.993782
4.794947
24d5a43e-f033-4b3f-864f-2fa71337681d
ltf0501/NoName
Contest/2009 NEERC, Moscow/J.cpp
#include <bits/stdc++.h> using namespace std; const int kN = 505; char s[kN][kN], ans[kN][kN]; int main() { freopen("japanese.in", "r", stdin); freopen("japanese.out", "w", stdout); int n, m; scanf("%d%d", &n, &m); for(int i = 0; i < n; i++) scanf("%s", s[i]); vector<vector<int>> left, up; for(int i = 0; i < ...
ALGO
0.999892
3.190119
19abdd74-ff4b-4aa4-b0fa-8fba21991af1
qingbot/UEngine
Engine/Source/ThirdParty/Catch2/v3.0.1/src/catch2/internal/catch_commandline.cpp
#include <catch2/internal/catch_compiler_capabilities.hpp> #include <catch2/catch_config.hpp> #include <catch2/internal/catch_string_manip.hpp> #include <catch2/interfaces/catch_interfaces_registry_hub.hpp> #include <catch2/interfaces/catch_interfaces_reporter_registry.hpp> #include <catch2/internal/catch_console_colou...
TOOL
0.969005
7.573955
8ea09ba9-c8bb-425f-82b5-e13727cc462e
shivkumar-github/codes
dsa love babbar/Lecture94 Floyd Warshall by striver/floydwarshal.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: void shortest_distance(vector<vector<int>>&matrix){ //initially we are given adjMatrix int n = matrix.size(); for(int i = 0;i<n;i++){ for(int j = 0;j<n;j++){ if(matrix[i][j] == -1){ matrix[i][j] =...
ALGO
0.999956
5.39343
2258e77b-91df-4093-b5d5-5660b2aada64
DaniloTato/algoritmos_clase
proyecto/src/sorter.cpp
#include "../include/header.hpp" #include <iostream> #include <vector> #include <tuple> sorter::sorter(){} std::tuple<std::vector<int>*, std::vector<int>> sorter::next_step(){ if(_i > _history.size() - 2){ return {nullptr,{0}}; } _i++; return {&_history[_i],_iterator_position[_i]}; } void s...
ALGO
0.999481
4.888564
a3a0c6ed-e989-42d8-9e62-528314815191
ishandutta2007/codeforces
low_/normal/1067/B.cpp
#include<iostream> #include<fstream> #include<vector> #include<queue> #include<deque> #include<algorithm> #include<cmath> #include<set> #include<map> #include<cstdio> #include<sstream> #include<bitset> #include<ctime> using namespace std; #define int long long #define inf 444444444444444444 #define mn 100005 #define FL...
ALGO
0.999991
3.805601
34bed636-cadf-40e1-af73-28226a3591db
colin-arnet/DSL-crypto-bench-tls
Vitis_Libraries/quantitative_finance/L2/tests/PopMCMC/src/kernel/mcmc_kernel.cpp
#include "xf_fintech/pop_mcmc.hpp" #include "mcmc_kernel.hpp" #ifndef __SYNTHESIS__ #include <iostream> #endif /** * @brief Top level Kernel function. * *@tparam DT - Data type used in whole kernel (double by default) *@tparam NCHAINS - Number of chains *@tparam NSAMPLES_MAX - Maximum N...
ALGO
0.994934
4.962916
e1911d56-5f0f-4c01-9857-5071fab0b7d4
vfolunin/archives-solutions
MCCME/3848.cpp
#include <iostream> #include <algorithm> #include <vector> #include <unordered_set> #include <map> #include <string> using namespace std; int main() { freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); unordered_set<int> values; int value; while (cin >> value) values.ins...
ALGO
0.991676
4.472855
f33e432a-4b49-42c7-91e2-f3c3081073d9
Aranch422/Algorithm_Study
2022/UnionFind/1717_set.cpp
#include <iostream> using namespace std; int n,m; int parent[1000001]; // O(h) int Find(int a){ if(parent[a]==-1) return a; else{ int ori = a; while(parent[a]!=-1){ a=parent[a]; } int root = a; a = ori; while(parent[a]!=-1){ ori = a; a = parent[ori]; parent[ori] = root; } return root;...
ALGO
0.999978
4.63525
c647017d-d195-448f-9df6-30a3cc78f887
passlab/spmm-bench
src/bcsr/bcsr_omp.cpp
#include "matrix.h" template<uint64_t K> double _calculate(uint64_t num_blocks, uint64_t block_rows, uint64_t block_cols, uint64_t *colptr, uint64_t *colidx, double *values, double *B, double *C, uint64_t cols) { double start = SpM::getTime2(); for (uint64_t n1 = 0; n1<num_blocks; n1++) ...
ALGO
0.999885
4.365444
37782922-e5c0-43dd-a9f0-79ddad0996e7
tamannachowdhuryy/csci135
Labs/lab 2/edit-array.cpp
/* Author: Tamanna Chowdhury GitHub: tamannachowdhuryy Course: CSCI-135 Instructor: Mike Zamansky Assignment: Using arrays to store, update, and retrieve numbers. Lab2C */ #include <iostream> int main(){ //these are our values for our array int myData = 10; int i,v; //i is cell index and v is new value do...
ALGO
0.991711
3.837745
d58404e9-f42b-493f-a061-c86777fa7b84
nguyenquanghuy111/BT-C
ss14_ex6.cpp
#include <stdio.h> #include <string.h> int main() { char str[100]; printf("Nhap mot chuoi: "); fgets(str, sizeof(str), stdin); size_t len = strlen(str); if (str[len - 1] == '\n') { str[len - 1] = '\0'; } int word_count = 0; char *token = strtok(str, " "); while (token != NUL...
TOOL
0.952863
3.654278
ce48c6d0-04c2-4490-a8dc-7a00ee1d1d01
Zip000000/DataStructure
2.HaiZei/283.cpp
/************************************************************************* > File Name: 283.cpp > Author: Zip > Mail: <EMAIL> > Created Time: 2019年08月21日 星期三 17时34分21秒 ************************************************************************/ #include<iostream> #include<cstdio> #include<cstdlib> #include<cstring...
ALGO
0.999941
4.14692
7bddcf86-37a6-400c-ac4b-9f0061e850b1
pavan-2001/competitive_programming
Time Complexity/Two Queens Problem/main.cpp
/* Problem Statement : Given an N X N chess board , count the number of ways to place 2 Queens on the board in such a way that they do not attack each other. Time Complexity : O(1). q(n) = (n^4/2) - 5(n^3)/3 + 3(n^2)/2 - n/3; */ #include<bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(f...
ALGO
0.999837
5.224267
eca87a30-4254-4e1f-b99a-bbc2dfbcc426
dddddasdf/ParkSoHyeon
과제제출/자료구조/리스트/단일연결리스트/소스.cpp
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> typedef struct _node { int data; struct _node * next; } Node; void FreeRecursion(Node *Tmp) { if (Tmp->next == NULL) free(Tmp); else { FreeRecursion(Tmp->next); free(Tmp); } } int main(void) { Node * head = NULL; // NULL ʱȭ Node...
ALGO
0.999143
3.287112
686288d2-0fd1-458b-acc3-40ef08d1e6b8
tao73bot/codes
codechef_FCTRL2.cpp
#include <bits/stdc++.h> using namespace std; #define MX 10000 int process(int x,int a[],int a_size) { int carry=0; for(int i=0;i<a_size;i++){ int p=a[i]*x+carry; //p=product a[i]=p%10; carry=p/10; } while(carry) { a[a_size]=carry%10; carry/=10; ...
ALGO
0.999958
4.603849
a81ae807-7fea-4f00-b721-6bd7cc8f36c7
JuanNeftaly/algorithms
Practicas/selection.cpp
#include <iostream> using namespace std; int main() { // arreglo int A[] = {10, 1, 9, 7, 6, 5, 3, 1}; // variables para recorrer int i, j, min = 0, aux = 0; int size = sizeof(A) / sizeof(A[0]); cout << "Arretglo original: "; for (i = 0; i < size; i++) { cout << A[i] << " "; } cout << endl; // recorrer e...
ALGO
0.999861
4.310904
45c3a583-5760-4406-b832-95122d191e6d
Tonyrobs/algoritmos
ALP/Mostrar dois inteiros em ordem.cpp
#include <iostream> using namespace std; int main() { int n1=0, n2=0; cout<<"Mostrar dois inteiros em ordem"; cout<<"\nInsira o primeiro numero: "; cin>>n1; cout<<"Insira o segundo numero: "; cin>>n2; if (n1>n2) { cout<<"Crescente: "<<n2<<", "<<n1; cout<<"\nDecrescente: "...
ALGO
0.999057
3.858569
27affe05-8a95-4ba1-b287-387b38744858
kishore-github1/Striver-A2Z-Sheet-Practice
16.DP/16.3 2D,3D DP/minFallingPathSum.cpp
#include <bits/stdc++.h> using namespace std; int f(int i, int j, vector<vector<int>> matrix, vector<vector<int>> &dp) { if (i < 0 || j < 0 || j >= matrix.size()) return 1e9; if (dp[i][j] != -1) return dp[i][j]; if (i == 0) { return matrix[i][j]; } int l = matrix[i][j...
ALGO
0.999989
4.916198
e8f8716b-bfaa-4e43-b827-6aca847a059f
haoel/leetcode
algorithms/cpp/sentenceSimilarity/SentenceSimilarity.III.cpp
// Source : https://leetcode.com/problems/sentence-similarity-iii/ // Author : Hao Chen // Date : 2021-04-06 /***************************************************************************************************** * * A sentence is a list of words that are separated by a single space with no leading or trailing *...
ALGO
0.999774
6.04776
686e2184-bd2b-468b-8bab-1814b130fe19
Debashis7307/CPP
10_Strings/anagram.cpp
#include<iostream> #include<string.h> #include<algorithm> using namespace std; int main(){ string s,t; cout<<"Enter a string:\n"; cin>>s; cout<<"Enter another string:\n"; cin>>t; sort(s.begin(),s.end()); sort(t.begin(),t.end()); cout<<((s==t)?"Anagram":"Not anagram"); return 0; }
ALGO
0.999956
3.186793
744e3a53-99c8-4ee2-99ab-4cc6c7f8286b
NilFoundation/zkllvm-circifier
libcxx/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp
// bitset(unsigned long long val); // constexpr since C++23 #include <bitset> #include <cassert> #include <algorithm> // for 'min' and 'max' #include <cstddef> #include "test_macros.h" TEST_MSVC_DIAGNOSTIC_IGNORED(6294) // Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed. temp...
TEST
0.866888
7.361681
0d622b52-d3a1-4057-b999-a2f199046624
Yuhahak/CodingTest
241223/별 그리기/star-drawing.cpp
#include <iostream> using namespace std; int main() { int a; cin >> a; for(int i = 0; i < a ; i++){ for(int j = 0; j < a- (i+1); j++){ cout << " "; } for(int k = 0; k < ( 2 * i) + 1 ; k ++){ cout << "*"; } cout << endl; } for( int i =...
ALGO
0.999962
3.625612
afea1c6e-fde7-4163-b9bb-bcc73549c25c
raincross7/code-similarity
codes/train_code/problem303/problem303_292.cpp
#include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(false); cin.tie(0); #define st first #define nd second #define endl '\n' #define what_is(x) cerr << #x << " is " << x << endl; #define what_is_v(x) cerr << #x << " is "; for(auto&e: (x)) cerr << e << ' '; cerr << '\n'; //vector, set #define...
ALGO
0.999984
4.577302
2fa46930-513f-4d2c-864a-adfa31ee47bb
santavyM/chess
stockfish/src/thread.cpp
#include "thread.h" #include <algorithm> #include <cassert> #include <deque> #include <memory> #include <string> #include <unordered_map> #include <utility> #include "movegen.h" #include "search.h" #include "syzygy/tbprobe.h" #include "timeman.h" #include "types.h" #include "uci.h" #include "ucioption.h" namespace S...
TOOL
0.994824
6.960628
1ab69c52-f0da-469d-9bbe-42993af40784
manikanta2901/ubuntu
.history/codingChallenges/cpp/codeforcesCp/contest/C_20210125213810.cpp
#include <bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #include<queue> using namespace std; #define trav(dataType,DataStruct,name) for(dataType<DataStruct>::itt ip = name.bb(); ip != name.ee(); ip++) //Pre processors & typedefs ...
ALGO
0.993372
4.104681
cfdb9a51-8f9a-456c-9646-807774c88a12
xiyanykt/code
Templates/RMQ.cpp
#include<bits/stdc++.h> using i64 = long long; constexpr int inf = 1e9 + 13; struct Info { int max = -inf, min = inf; }; Info operator+(const Info& a, const Info& b) { return {std::max(a.max, b.max), std::min(a.min, b.min)}; } struct Tag { int v = -1; }; const int N = 2e5 + 1; Info info[N << 2]; Tag tag[N << 2]...
ALGO
0.999958
4.734437
7285f7a5-c712-4f0e-b443-661938969feb
Sue217/PracticeCodeFolder
CodeForces/DisjointSetsUnion/2a.cpp
/** * author: subobo * created: 22.04.2022 20:54:37 **/ #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__) #else #define debug(...) 42 #endif int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n...
ALGO
0.999946
4.122283
a519d19a-b807-4f58-b5d6-57b548915064
Makufff/competitive
POSN_I/Hospital.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n , s , nurse = 7 ; cin >> n ; int hospital = 0 , outdoor = 0 ; while (n--){ cin >> s ; if (s > nurse){ hospital += 7 ; outdoor += nurse - 7 ; nurse ++ ; }else hospital += nurse ; ...
ALGO
0.999827
3.169593
1eb109be-cbf4-471f-bd2d-f0cdc8d13670
pratyush2331/DSA_Love-Babbar
XX. AAA_Platform/LeetCode/3_LeetCode_POTD/2024_Dec_03.cpp
// 2109. Adding Spaces to a String // LeetCode : https://leetcode.com/problems/adding-spaces-to-a-string/ #include<bits/stdc++.h> using namespace std; /* TC : O(n) SC : O(n + m) */ class Solution { public: Solution() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); } strin...
ALGO
0.999676
5.787505
82ab4c98-d194-4576-bc60-e329389cbd7e
jkjan/Baekjoon
14501.cpp
#include <iostream> using namespace std; int N; int T[16], P[16]; int tos(int total, int i); int main() { cin >> N; for (int i = 1; i <= N; i++) { cin >> T[i] >> P[i]; } cout << tos(0, 1); return 0; } int tos(int total, int i) { // 모든 상담 일정을 확인 if (i > N) { return total; } // 남은 상담 일정이 전부 1일 짜리 일 때 ...
ALGO
0.999817
4.096523
06a8b3f5-e4e2-4988-9488-d9f38a4abab2
AdhamHammoda/Competitive-Programming
CODEFORCES_RATING/900/A- Is it rated.cpp
/// ______ __________ _____ _____ _____ /// /// \\\ ||__|| \\\ ||| ||| || || |||\\\ ///||| /// /// \\\ ||__|| \\\ |||_____||| || || ||| \\\ /// ||| /// ///______\\\ ||__|| \\\ |||_____||| || || ||| \\\ /// ...
ALGO
0.998224
4.317
24d38a10-07e9-4114-99cf-e6ded575708e
kushalsinha/LIGGGHTS
lib/poems/sphericalFlexiblejoint.cpp
#include "sphericalFlexiblejoint.h" #include "point.h" #include "matrixfun.h" #include "body.h" #include "fastmatrixops.h" #include "norm.h" #include "eulerparameters.h" #include "matrices.h" #include <iomanip> #include <math.h> #include <cmath> #include <unistd.h> //for using the function sleep #include <stdi...
ALGO
0.88175
4.994283
ada913b5-766f-403a-858a-f335a30b8c18
NoLimitCoder/Leetcode
LeetCode-Solutions/2006-find-the-student-that-will-replace-the-chalk/solution.cpp
class Solution { public: int chalkReplacer(vector<int>& chalk, int initialChalkPieces) { long long totalChalkNeeded = 0; for (int studentChalkUse : chalk) { totalChalkNeeded += studentChalkUse; } int remainingChalk = initialChalkPieces % totalChalkNeeded; ...
ALGO
0.999913
5.199553
46eebdfd-0f9e-4a3c-bd81-f717f4b7429d
code-walker-23/LeetCode-Prep
0048-rotate-image/0048-rotate-image.cpp
class Solution { public: void rotate(vector<vector<int>>& matrix) { // we will always be using on the square matrix int n = matrix.size(); // we can try to solve without or with lesser space than (n*m) vector<vector<int>>res(n,vector<int>(n)); for(int i = 0; i < n; i++){ ...
ALGO
0.999977
6.577871