uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
4df91d42-15fe-42b4-8e66-b1c4fa6e41bb
multitudinous/mapgen
src/vaser_agg_curve4.cpp
// this code is isolated from AGG, // for cubic bezier curve rendering using recursive subdivision #include "vaser.h" #include <math.h> namespace VASEr { namespace VASErin { //VASEr internal namespace #ifndef M_PI #define M_PI 3.141592653589793238462643 #endif real calc_sq_distance(real x1, real y1, real x2, re...
ALGO
0.99973
5.589635
1d554264-ad86-46a7-91d7-3a0eac8e10ff
Soulflayer1337/Homework
First_Semester/8/2/main.cpp
#include "MyString.h" #include "tree_queue.h" //It works like priority queue. #include <fstream> void dijkstra(Pair<int, int> ***way, int *numberOfWays, int n) { TreeQueue *queue = createTree(); push(queue, makePair(0, 0)); bool *visited = new bool[n]; for (int i = 0; i < n; i++) visited[i] =...
ALGO
0.999831
3.772645
98ccae24-5414-46e0-a3d6-5642cc1537d6
ant-6112/CP
USACO/P7.cpp
#include <bits/stdc++.h> #include <cmath> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pi; typedef vector<int> vi; typedef vector<long long> vll; typedef vector<pair<int, int>> vpi; #define pb push_back #define pf push_front #define all(x) begin(x), end(x)...
ALGO
0.999967
4.450954
7ba42725-79d6-434b-b8c8-f2b94f662a99
TNBerkman/gameModMidterm
idlib/math/Matrix.cpp
#include "../precompiled.h" #pragma hdrstop //=============================================================== // // idMat2 // //=============================================================== idMat2 mat2_zero( idVec2( 0, 0 ), idVec2( 0, 0 ) ); idMat2 mat2_identity( idVec2( 1, 0 ), idVec2( 0, 1 ) ); /* ============ i...
TOOL
0.975872
6.915164
d4c955e5-e81b-47f7-9949-17e07b85bbf7
rzuccolo/rz-Model-Predictive-Control-MPC
src/Eigen-3.3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_colwise.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; int main() { Eigen::MatrixXf mat(2,4); mat << 1, 2, 6, 9, 3, 1, 7, 2; std::cout << "Column's maximum: " << std::endl << mat.colwise().maxCoeff() << std::endl; }
ALGO
0.999423
3.779679
6d4e36af-a8ee-48f9-93f0-dba4206092c5
Shyam-Makwana/leetcode
142-linked-list-cycle-ii/142-linked-list-cycle-ii.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *detectCycle(ListNode *head) { if(!head || !head->next) return NULL; ListNode *slow = head, *fast = head...
ALGO
0.999922
5.571304
2bf12463-0c17-4df2-b8c4-b015a6e67dae
falk-dev/maratona-de-programacao
Beecrowd/2377 - Pedágio/main.cpp
// 2377 - PEDÁGIO | RESOLVIDO EM C++ #include <iostream> using namespace std; int main() { int L = 0; int D = 0; int K = 0; int P = 0; int CG = 0; int CP = 0; int i = 0; int CT = 0; cin >> L >> D; cin >> K >> P; CG = L * K; if (L >= D) { do { ...
ALGO
0.99935
3.196219
50d0294d-a094-4b59-ada0-6afec888ff4b
artneer/boost_1_65_0
libs/geometry/doc/src/examples/geometries/adapted/boost_range/uniqued.cpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // QuickBook Example //[boost_range_uniqued //` Shows how to use a Boost.Geometry ring, made unique by Boost.Range adaptor #include <iostream> #include <boost/assign.hpp> #include <boost/geometry.hpp> #include <boost/geometry/geometries/point_xy.hpp> #include <b...
TOOL
0.884224
6.023591
cac42808-6409-4759-a632-d441ef8ba4cc
ugeneunipro/ugene-old
src/plugins_3rdparty/hmm3/src/hmmer3/impl_sse/decoding.cpp
#include <hmmer3/p7_config.h> #include <stdio.h> #include <math.h> #include <xmmintrin.h> /* SSE */ #include <emmintrin.h> /* SSE2 */ #include <hmmer3/easel/easel.h> #include <hmmer3/easel/esl_sse.h> #include <hmmer3/hmmer.h> #include "impl_sse.h" /***************************************************************...
ALGO
0.999962
6.084991
ba5b1a32-11bd-48d5-bc0f-407c6d0419bc
kryag/ct-itmo-algorithms
sem-3/solutions/5D.cpp
#include <iostream> #include <queue> #include <vector> using namespace std; const int N = 10'000; const int INFINITY = INT32_MAX; struct Node { vector<int> edges; }; vector<int> bfs(vector<Node>& graph, int from, int to) { vector<int> dist(graph.size(), INFINITY); dist[from] = 0; vector<int> p(graph...
ALGO
0.999926
4.919288
c3572fd1-4d9a-4651-a620-c0d447f2424c
andrewqt/Competitive-Programming
CodeForces/_1107_F_VasyaAndEndlessCredits/_1107_F_VasyaAndEndlessCredits.cpp
// Problem : F. Vasya and Endless Credits // Contest : Codeforces - Educational Codeforces Round 59 (Rated for Div. 2) // URL : https://codeforces.com/contest/1107/problem/F // Memory Limit : 0 MB // Time Limit : 0 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) #include <bits/stdc++.h> using names...
ALGO
0.999938
3.873183
c464ac17-0502-4504-8f22-4ee98f2907ab
lauragalbraith/AdventOfCode2022
day02/main.cpp
// main.cpp: Laura Galbraith // Description: Solve Day 2 of Advent of Code 2022 // What would your total score be if everything goes exactly according to your strategy guide? // Compile and run: rm main.out ; g++ -std=c++17 -static-liblsan -fsanitize=leak main.cpp -o main.out -Wall -Werror -Wextra -pedantic -Wshadow -W...
ALGO
0.998391
6.556435
1dda1329-045c-4c07-93bb-d8033ba1e04b
urvashiparashar/Leetcode_prac
977-squares-of-a-sorted-array/977-squares-of-a-sorted-array.cpp
class Solution { public: vector<int> sortedSquares(vector<int>& nums) { vector<int>ans(nums.size()); int l=0,r=nums.size()-1,k=nums.size()-1;//k is piche se kyunki last ele sorted hota ja rha h at each iteration while(l<=r) { if(abs(nums[r])>abs(nums[l])) { ...
ALGO
0.999987
5.81129
85de2703-e1b5-42e9-a2ec-e0691b6a138b
dipesh-m/Data-Structures-and-Algorithms
LeetCode Submissions/Rotate List.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: int size(ListNode* he...
ALGO
0.999977
5.634952
47f62820-ca4a-4d94-bbca-fb2ace00c9c9
fyw4/C-plus-plus-learning-example
第10章 泛型程序设计与C++标准模板库/10_12.cpp
#include <iostream> #include<map> #include<utility> #include<string> using namespace std; int main() { multimap<string, string>courses; typedef multimap<string, string>::iterator CourseIter; courses.insert(make_pair("C++", "2-6")); courses.insert(make_pair("COMPILER", "3-1")); courses.insert(make_pair("COMPILER...
ALGO
0.982229
3.604823
9e37198b-8110-4263-8769-31e72b6e6ded
trinhminhtriet/leetcode
solutions/0700-0799/0730.count-different-palindromic-subsequences/Solution.cpp
using ll = long long; class Solution { public: int countPalindromicSubsequences(string s) { int mod = 1e9 + 7; int n = s.size(); vector<vector<vector<ll>>> dp(n, vector<vector<ll>>(n, vector<ll>(4))); for (int i = 0; i < n; ++i) dp[i][i][s[i] - 'a'] = 1; for (int l = 2; l <=...
ALGO
0.999943
5.978534
c4571a37-1700-4149-b4c3-fa0f3e32021f
PlasmaControl/FreeMHD
OpenFOAM-v2206/ThirdParty/sources/boost/boost_1_74_0/libs/sort/example/randomgen.cpp
// See http://www.boost.org/libs/sort for library home page. #include <boost/random/mersenne_twister.hpp> #include <boost/random/uniform_int_distribution.hpp> #include <stdio.h> #include "stdlib.h" #include <fstream> #include <iostream> using namespace boost; int main(int argc, const char ** argv) { random::mt1993...
TOOL
0.987282
4.155019
304f25bc-5b18-4407-89c9-176acf15bd1d
revectores/linear-equations-solver-desktop
dashboard/dashboard.cpp
#include <cstdio> #include <cmath> #include "demo_eqs.h" #include "dashboard.h" enum method { GAUSSIAN_ELIMINATOIN, GAUSSIAN_ELIMINATOIN_WITH_COLUMN_PIVOT, DOOLITTLE_DECOMPOSE, CROUT_DECOMPOSE, CHOLESKY_DECOMPOSE, REFINED_CHOLESKY_DECOMPOSE, JACOBI_ITERATION, GAUSS_SEIDOL_ITERATION, ...
ALGO
0.98223
5.33545
3a17b7a0-f086-4386-9892-74c93e12f515
Shashank-GVS/100-days-code-challenge
Medium/Power Of Numbers/power-of-numbers.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: const long long mod = 1e9+7 ; //You need to complete this fucntion long long pwr(int N , int R){ long long ans = 1 ; while(R) { if(R&1) ans =(ans * N) % mod ; ...
ALGO
0.999966
5.996691
62bad667-9277-4640-9813-2aeaeccbd416
ShubhamSharma1309/Interview-DSA-Questions
Segment Tree/Range Sum Query - Mutable.cpp
/* Scroll below to see JAVA code also */ /* MY YOUTUBE VIDEO ON THIS Qn : https://www.youtube.com/watch?v=82HaBghHuDU Company Tags : META Leetcode Link : https://leetcode.com/problems/range-sum-query-mutable/description/ */ //Range Queries are generally asked to check if the person kno...
ALGO
0.999725
7.272785
aa446fbc-87d3-4d61-a399-aa52a6bb81c0
srijon-32/CP-Library
Math Related/Permutation & Combination/Binomial_Coefficients.cpp
/* SRIJON SINGHA SAMANTA */ #include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double ld; #define nl "\n" #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() #define yes cout << "YES" << nl #define no cout << "NO" << nl #define fi first #define sec ...
ALGO
0.999901
4.642897
deab8f6f-f0d0-41b7-b9d4-5080557c4e93
sinian666/code_102_8
1cpp_副本7/chapter_backtracking/n_queens.cpp
/** * File: n_queens.cpp * Created Time: 2023-05-04 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* 回溯算法:N 皇后 */ void backtrack(int row, int n, vector<vector<string>> &state, vector<vector<vector<string>>> &res, vector<bool> &cols, vector<bool> &diags1, vector<bool> &diags2) { ...
ALGO
0.999423
5.923316
3d54cf22-c44d-4939-883a-eb04809a4724
SemicolonExpected/Spong
ext/eigen/doc/examples/Tutorial_ArrayClass_accessors.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { ArrayXXf m(2,2); // assign some values coefficient by coefficient m(0,0) = 1.0; m(0,1) = 2.0; m(1,0) = 3.0; m(1,1) = m(0,1) + m(1,0); // print values to standard output cout << m << endl << endl; ...
ALGO
0.975438
3.536336
cda7482f-8dd5-4628-bf76-cf3aad7ca204
shubhansu-kr/DailyChallenge-2022-LeetCode
08_August_2022/11_LowestCommonAncestor.cpp
// https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/ #include <bits/stdc++.h> using namespace std ; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(nullptr) ...
ALGO
0.999993
6.13392
46aabcc0-abfa-4a76-b129-cbdfbc476c2a
sehes2solve/Clock-Format-Converter
Final-Project.cpp
// Course: CS213 - Programming II - 2018 // Title: Assignment I - Task 1 - Problem 1 // Program: CS213-2018-A1-T1-P1 // Purpose: Skeleton code for the student to start working // Author: Dr. Mohammad El-Ramly // Date: 10 August 2018 // Version: 1.0 #include <iostream> #include <iomanip> //#include <cassert> u...
ALGO
0.950437
3.165846
16234994-310f-4238-9842-2c3d3bfa84ae
ishandutta2007/codeforces
rush_d_cat/normal/1071/D.cpp
#include <iostream> #include <queue> #include <map> #include <vector> #include <set> #include <algorithm> using namespace std; const int N=1000000+10; const int B=25; bool cmp(int x,int y){ return x>y; } int prime[N],d[N],vis[N],flag[N]; void init(){ for(int i=2;i<N;i++){ if(vis[i]==0){ prim...
ALGO
0.999711
4.195694
476dacd0-4187-493b-a44c-a1b39a279927
ciwomuli/NOIP2017exercise
2018-10-14/A.cpp
#include <iostream> #include <algorithm> using namespace std; int a[4]; int main(){ cin>>a[0]>>a[1]>>a[2]; sort(a, a + 3); if(a[0]+a[1]>a[2]) cout<<"0"; else{ cout << (a[2] + 1 - a[0] - a[1]); } }
ALGO
0.999915
3.787956
9726cbef-477a-464e-9203-bf1f6246b234
abhishekmahajan3711/SeCompDSAL
Assignment Group E20/Abhi_Priority.cpp
// Consider a scenario for Hospital to cater services to different kinds of patients as Serious // (top priority), b) non-serious (medium priority), c) General Checkup (Least priority). // Implement the priority queue to cater services to the patients. #include<iostream> using namespace std; #define size 30 class P...
ALGO
0.996689
4.471527
a3151e85-0f1f-483c-a8da-5c721d1dfa77
aryangupta02092002/AugustChallenge2023
GFG/FractionPairsWithSum1.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution { public: int countFractions(int n, int numerator[], int denominator[]) { unordered_map<int, unordered_map<int, int>> freq; i...
ALGO
0.999688
6.094825
b1ec37bb-7e98-4246-b4c9-78dff46906d2
LteFroggy/codetree-TILs
240423/영문 소문자의 개수/number-of-lowercase-letters.cpp
#include <iostream> using namespace std; int main() { int N; cin >> N; int small_count[26] = {0}; for (int i = 0; i < N; i++) { char val; cin >> val; if (val >= 'a' && val <= 'z') { small_count[val - 'a']++; } else { for (int j = 0; j ...
ALGO
0.999562
4.023551
a34a7a2f-fdc2-4e55-8756-070d9141a15e
bitcoin-pp/bitcoin
src/test/util/blockfilter.cpp
#include <test/util/blockfilter.h> #include <chainparams.h> #include <node/blockstorage.h> #include <validation.h> using node::ReadBlockFromDisk; using node::UndoReadFromDisk; bool ComputeFilter(BlockFilterType filter_type, const CBlockIndex* block_index, BlockFilter& filter) { LOCK(::cs_main); CBlock block...
TOOL
0.908405
6.779096
3a9b25af-778e-4d50-9efe-e1420e382389
keversmithd/CSCODE
CS261/Labs/Lab1/ArrayInt.cpp
#include "ArrayInt.h" ArrayInt::ArrayInt() : n_elements(0), m_data(nullptr), n_used(0) //Inits a default size of 10. { resize(10); } ArrayInt::ArrayInt(int size) : n_used(0), n_elements(0), m_data(nullptr) { if(size > 0) //If size is not zero resize the array and set the elements to...
TOOL
0.933224
4.484122
52bc6cfd-7a7f-46e9-b6a1-c8716dc28848
srivaayush/LeetHub-Practice
90-subsets-ii/90-subsets-ii.cpp
class Solution { private: void helper(vector<int>& nums,int i,int n,vector<int> &sub,set<vector<int>> &ans){ if(i==n){ ans.insert(sub); return; } //condition to pick sub.push_back(nums[i]); helper(nums,i+1,n,sub,ans); //condition to don't pick ...
ALGO
0.999978
5.880788
3358dcc0-fea9-439e-8c9f-06f244fefdf1
EcutDavid/oj-practices
coursera/algorithmic-toolbox/w5/lar-sub-seq-two.cpp
#include <iostream> #include <vector> using namespace std; int main() { int aC, bC; cin >> aC; vector<int> a(aC); for (int i = 0; i < aC; i++) { cin >> a[i]; } cin >> bC; vector<int> b(bC); for (int i = 0; i < bC; i++) { cin >> b[i]; } vector<vector<int>> m(b.size() + 1); for (int i = 0...
ALGO
0.999891
3.841405
6cf1f1f7-81b5-4f90-81a5-926f28326c02
sangam-verma9/DSA_ARSH
trees/predecessor-and-successor.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: void solvepre(Node *root, Node *&pre, int key) { if (root == NULL) { return; } if (root->key >= key) { return solvepre(root->left, pre, key); } else if (root->ke...
ALGO
0.999998
4.789298
2f1ccf8e-1747-4035-a39d-277ccc0dd63a
BHOJANE-VARUN/MyVscode
cp/CSES sheet/Searching_Sorting/Subarray_with_k_distinct.cpp
#include <bits/stdc++.h> #define int long long int #define yes cout << "YES" << endl; #define no cout << "NO" << endl #define MOD 1000000007 // const int maxsize = 1e5; // int arr[maxsize+1]; #define test \ int monu; \ cin >> monu; \ while (monu--) using namespace std; signed main() { int n, k; ...
ALGO
0.999771
3.527631
91253880-6d27-4a77-ba9b-d8a00a5d31cd
dheeraj557/PROBLEM-SOLVING
39-combination-sum/39-combination-sum.cpp
class Solution { public: void findcombination(int ind,int target,vector<int>&arr,vector<vector<int>>&ans,vector<int>&ds) { if(ind==arr.size()){ if(target==0){ ans.push_back(ds); } return; } if(arr[ind]<=target){ ds.push_back(arr[ind]); findcombination(ind,target-arr[ind],arr,ans,ds); ...
ALGO
0.999975
6.41958
7ebd235f-ae75-4a6b-8818-f15e7c787b32
dongb94/algorithm
sc/4.cpp
// // Created by Donggeon Byeon on 2024-10-15. // #include <string> #include <vector> #include <queue> using namespace std; // head => node1 class weightTree { public: weightTree(vector<int> truck) { truckNum = truck.size(); int treeSize = 1; while (treeSize < truckNum) treeSize *= 2; treeSize = 2 * treeSiz...
ALGO
0.999992
5.66183
05743624-ffb3-400d-8fce-2d5aae57c5d3
ishandutta2007/codeforces
memset0c/normal/1148/A.cpp
// ================================= // author: memset0 // date: 2019.06.01 22:36:30 // website: https://memset0.cn/ // ================================= #include <bits/stdc++.h> #define ll long long #define debug(...) ((void)0) #ifndef debug #define debug(...) fprintf(stderr,__VA_ARGS__) #endif namespace ringo {...
ALGO
0.999696
3.935656
bdc39311-dc2a-45e1-be6e-d60870cb252d
araso2000/Repo_Cpp_CAP_2022
Lab1CAP/Source.cpp
#include <iostream> #include <mpi.h> #include <stdlib.h> #include <time.h> using namespace std; int prob(); int main() { MPI_Init(NULL, NULL); int yosoy,world_size,pelota,puntos,pelota_backup,suspuntos; yosoy = world_size = pelota = puntos = pelota_backup = suspuntos = 0; MPI_Comm_rank(MPI_COMM_WORLD, &yosoy);...
ALGO
0.999822
3.33068
2894b9e6-581a-4894-a80c-db5eb7536e37
sahrish-salman/Practice_1
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
25873bf9-dc75-4315-9d84-0a24efce4805
RealChaser/Cpp_Lecture
C++_3/8_타입추론2.cpp
// 8_Ÿ߷2 #include <iostream> using namespace std; // Ģ 2. ø ڰ Ÿ϶ - 130 page // T Ҷ Լڷ ޵Ǵ ü Ӽ Ѵ. // const volatile Ӽ ȴ. template<typename T> void foo(T& param) { cout << "T : " << typeid(T).name() << " "; cout << "param : " << typeid(param).name() << endl; } int main() { int n = 10; in...
TOOL
0.913845
4.288858
783e9e3a-f6ce-42d7-af57-ba379ec7b761
PANISHAR/Programming
random practice problem /facr.cpp
#include <stdio.h> void prime(int n) { if (n <= 1) { printf("Invalid number. \n"); return; } printf("Prime factors of %d are: ", n); int Factor = -1; for (int i = 2; i <= n; i++) { while (n % i == 0) { if (Factor != i) { printf("%d ", i...
ALGO
0.998872
4.78006
f1c9aff5-0ef9-4331-8575-6b4af4571a47
SemihCaglar/Pc-Olympic
Codes/Yarismalar/Usaco/2016 US Open Contest/Silver/c.cpp
#include<semih/competitive.h> const int N=3005; int n,m; set<int> mark; vi g[N]; bool vis[N]; void dfs(int node){ if(vis[node] or mark.count(node)==0) return; vis[node]=true; for(auto i: g[node]) dfs(i); } int main(){ fast; test("closing"); cin>>n>>m; for(int i=0;i<m;...
ALGO
0.999808
4.042614
a9aa0863-2398-4fa1-b134-9425973e11c5
FIngerFrings/leetcode
Easy/leetcode559.cpp
/* * 给定一个 N 叉树,找到其最大深度。 * 最大深度是指从根节点到最远叶子节点的最长路径上的节点总数。 * N 叉树输入按层序遍历序列化表示,每组子节点由空值分隔(请参见示例)。 */ //方法一:层序遍历 //思路:按层遍历N叉树,每遍历一层将结果+1,最后可以得到深度 /* // Definition for a Node. class Node { public: int val; vector<Node*> children; Node() {} Node(int _val) { val = _val; } Node(int _val, v...
ALGO
0.9997
6.786332
daf54370-91a4-47c4-bb75-c9e88364ea3a
refainHub/ACM-ICPC
做题记录/数据结构/线段树/poj3468线段树 A Simple Problem with Integers.cpp
#include <cstdio> #include <iostream> using namespace std; #define lson l,m,rt<<1 #define rson m+1,r,rt<<1|1 #define LL long long #define maxn 100005 LL add[maxn<<2]; LL sum[maxn<<2]; void pushup(int rt) { sum[rt]=sum[rt<<1]+sum[rt<<1|1]; } void pushdown(int rt,int m) { if(add[rt]) { add[rt<<1]+=add[rt...
ALGO
0.998535
3.643146
fcdd0a57-30b0-4d01-aa9b-7c97df071a22
raincross7/code-similarity
codes/train_code/problem025/problem025_481.cpp
#include<iostream> #include <complex> using namespace std; int main() { int n; cin>>n; while(n--){ pair<double,double>a[4]; for(int i=0;i<4;i++){ cin>>a[i].first>>a[i].second; } if(abs((a[1].first-a[0].first)*(a[3].second-a[2].second)-(a[3].first-a[2].first)*(a[1...
ALGO
0.999815
3.537283
3ad89198-bff4-4344-bfb2-094da181f804
ishandutta2007/codeforces
smallling/normal/519/B.cpp
#include<cstdio> #include<algorithm> using namespace std; int n,a[100010],b[100010],c[100010]; int main() { scanf("%d",&n); for(int i=1;i<=n;i++) scanf("%d",&a[i]); sort(a+1,a+1+n); for(int i=1;i<n;i++) scanf("%d",&b[i]); sort(b+1,b+n); for(int i=1;i<=n;i++) if(a[i]!=b[i]) { printf("%d\n",a[i]); ...
ALGO
0.999906
3.193802
1bfbe8c4-987b-4d4e-a2dd-0145dbf2b359
kanu-CH/Code360-Solution
Partial_BST.cpp
#include <bits/stdc++.h> /************************************************************* Following is the Binary Tree node structure class BinaryTreeNode { public : T data; BinaryTreeNode<T> *left; BinaryTreeNode<T> *right; BinaryTreeNode(T data) { this ...
ALGO
0.999899
6.115373
39555ee6-dc81-4cf2-9308-520bd50bc118
KennethYangle/CMPCC
Eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_rowwise.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; int main() { Eigen::MatrixXf mat(2, 4); mat << 1, 2, 6, 9, 3, 1, 7, 2; std::cout << "Row's maximum: " << std::endl << mat.rowwise().maxCoeff() << std::endl; }
ALGO
0.999691
3.867317
2ed5f6af-005d-4d6c-adff-ced55423ed0a
crazyrinchik/hse_cpp_first_course
sem09_10/problem11_cipher/main.cpp
#include <fstream> #include <iostream> #include <cctype> // For isalpha() and tolower() char caesarCipher(char ch, int shift) { if (std::isalpha(ch)) { char base = std::islower(ch) ? 'a' : 'A'; return (ch - base + shift) % 26 + base; } return ch; } void encryptFileContent(const std::str...
TOOL
0.900112
6.079862
f62d0a47-5df3-4f8c-9ce8-f693c2b69688
ismdeep/ICPC
lightoj/1004/main.cpp
// Project name : 1004 ( Monkey Banana Problem ) // File name : main.cpp // Author : iCoding // E-mail : <EMAIL> // Date & Time : Thu Aug 9 12:13:15 2012 #include <iostream> #include <stdio.h> #include <string> #include <cmath> #include <algorithm> using namespace std; /*****************************...
ALGO
0.999914
3.352932
21609f5e-09c2-4afb-900b-bc8e3fca574f
ch1y0q/algorithm-course-code
P1028.cpp
#include <algorithm> #include <iostream> #include <set> #include <string> #include <vector> #define rep(a, b, c) for (int a = b; a <= c; a++) #define per(a, b, c) for (int a = b; a >= c; a--) #define MAXN 505 #define MAXE 10005 #define INF 1e7 using namespace std; int n, E, s, t; int u, v, w; std::vector<std::pair<int...
ALGO
0.999919
4.400685
1f461bb2-b457-4b41-9f57-5baaf919863d
JovanStjepanovic/Flutter_shop_test
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
2ce07634-b88b-4a98-a365-5985300c8d8a
flyingU-ai/IN203
TravauxDiriges_n.3/Sources/ProdMatMat.cpp
#include <algorithm> #include <cassert> #include <iostream> #include <thread> #if defined(_OPENMP) #include <omp.h> #endif #include "ProdMatMat.hpp" namespace { // void prodSubBlocks(int iRowBlkA, int iColBlkB, int iColBlkA, int szBlock, // const Matrix& A, const Matrix& B, Matrix& C) { // for (in...
ALGO
0.995257
4.892536
6756f584-8fdc-47dc-95e7-bb2284beb245
Hieu0112/Data-Structure-and-Algorithms-ptit
2QuayLuiNhanhCan/3DiChuyentrongMeCung1.cpp
#include<bits/stdc++.h> using namespace std; int a[10][10],n,t; string str=""; bool check; void nhap(){ check=true; cin>>n; for(int i=1;i<=n;i++) for(int j=1;j<=n;j++) cin>>a[i][j]; } void solve(int i,int j,string s){ if(i==n&&j==n) { check=false; cout<<s<<" "; } else{ if(a[i+1][j]&&i+1<=n){ a[i][j]=0...
ALGO
0.999896
4.302415
b7d5802b-e472-4c49-9aea-c61caf7e5e43
cpvrlab/SLProject
externals/libigl/include/igl/faces_first.cpp
#include <vector> #include <Eigen/Dense> template <typename MatV, typename MatF, typename VecI> IGL_INLINE void igl::faces_first( const MatV & V, const MatF & F, MatV & RV, MatF & RF, VecI & IM) { assert(&V != &RV); assert(&F != &RF); using namespace std; using namespace Eigen; vector<bool> in_...
ALGO
0.999545
5.283256
448375db-f130-41a5-9b19-3deb36c19738
FuChaolei/leetcode_ago
501.二叉搜索树中的众数.cpp
/* * @lc app=leetcode.cn id=501 lang=cpp * * [501] 二叉搜索树中的众数 * * https://leetcode-cn.com/problems/find-mode-in-binary-search-tree/description/ * * algorithms * Easy (50.64%) * Likes: 308 * Dislikes: 0 * Total Accepted: 54.4K * Total Submissions: 107.4K * Testcase Example: '[1,null,2,2]' * * 给定一个有相...
ALGO
0.999996
6.040828
b6d84c8d-27c4-4e5b-9fea-9ae1427f111c
Felipe-Tagawa/C02
Strings/Pedra, papel e tesoura.cpp
#include <iostream> using namespace std; int main(){ int t; string jogadaA, jogadaB; cin >> t; // Casos de teste. for(int i = 0; i < t; i++){ getline(cin >> ws, jogadaA); getline(cin >> ws, jogadaB); if(jogadaA == jogadaB){ cout << "Empate" << end...
ALGO
0.999973
4.496235
a958337f-fb63-4201-9ffb-36de904903e5
stevenmsl/cpp_w_a_527
solution.cpp
#include "solution.h" #include "util.h" #include <unordered_map> #include <unordered_set> #include <numeric> #include <algorithm> #include <string> #include <queue> using namespace sol527; using namespace std; /*takeaways - the key is to get the abbreviation right first; especially the edge case where you should...
ALGO
0.999903
6.116066
7462a881-f05e-4620-852d-b4f415ede80c
deiraar/Deira_Aisya_Refani_Praktikum_Pemrograman
Week_4/Problem_2/multiplication_table.cpp
#include<iostream> using namespace std; int main() { // header cout << "----------------------------" << endl; cout << "Multiplication Table Program" << endl; cout << "----------------------------" << endl; int n; // declare an integer called n cout << "Input: "; cin >> n; // input an integer...
TOOL
0.971948
3.625272
a356dbe8-fdae-4509-ba03-19cd4672b615
core-code/MiscApps
TerraCore/Foreign Code/cml/tests/timing/dynamic_mat_et1.cpp
/** @file * @brief */ #define CML_ENABLE_MATRIX_BRACES // for operator[][] to load/print a matrix #include <iostream> #include <cml/cml.h> using namespace cml; /* For convenience: */ using std::cerr; using std::endl; typedef matrix<double, dynamic<>, cml::col_basis> matrix_d44; #define MATINIT(_m_) _m_(4,4) #i...
TOOL
0.979613
3.126262
230ba329-b398-4f2c-b067-3f0a77e8d4de
MikaelVallenet/R-Type
libs/boost/libs/xpressive/tools/perl2xpr.cpp
#include <stack> #include <string> #include <iostream> #include <boost/xpressive/xpressive_static.hpp> #include <boost/xpressive/regex_actions.hpp> namespace x = boost::xpressive; using namespace x; int main(int argc, char *argv[]) { int i = 1, j = 1; bool nocase = false; char const *dot = " ~_n "; ch...
TOOL
0.975151
5.024327
ce347e1f-356c-4235-b77d-dd5eab702b55
nobugsanurag08/Leetcode-POTD
9feb2025.cpp
/* Q: 3173. Count of Pairs With Equal Sum of Digits Link - https://leetcode.com/problems/count-number-of-bad-pairs/description/?envType=daily-question&envId=2025-02-09 You are given a 0-indexed integer array nums. A pair of indices (i, j) is a bad pair if i < j and j - i != nums[j] - nums[i]. Return the total number ...
ALGO
0.999947
6.020203
5f644371-54fd-413d-b3dc-29aeab4a664f
parthoMalakar/Data-Structure
Tree/leafNodes.cpp
/* Code : Count leaf nodes Send Feedback Given a generic tree, count and return the number of leaf nodes present in the given tree. Input format : Elements in level order form separated by space (as per done in class). Order is - Root_data, n (No_Of_Child_Of_Root), n children, and so on for every element Output Forma...
ALGO
0.999285
5.733273
162b48dd-62ca-4fdc-9f87-e43894ee0b01
slitvinov/lammps-swimmer
src/USER-OMP/pair_gran_hooke_history_omp.cpp
/* ---------------------------------------------------------------------- Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ #include "math.h" #include "pair_gran_hooke_history_omp.h" #include "atom.h" #include "comm.h" #include "fix.h" #inclu...
ALGO
0.995804
7.241726
a82a04c4-f009-4f65-8edc-46cc42cdf533
Deeksha2501/Leetcode-Submissions
692.cpp
class Solution { public: static bool cmp(pair<int , string> a, pair<int , string> b){ if(a.first == b.first)return a.second<b.second; return a.first > b.first; } vector<string> topKFrequent(vector<string>& words, int k) { unordered_map<string , int> m; int n=words.s...
ALGO
0.999983
6.35629
1d70311b-a8d8-4a31-aa11-101a39daa9f0
ElinaBohomaz/Project1
bot.cpp
#include "bot.h" Bot::Bot() { } Bot::Bot(int trump) { this->trump = trump; } int Bot::getMinCardIndex(const std::vector<Card>& cards, int trump, bool onlyTrump) { int minIndex = -1; for (int i = 0; i < cards.size(); i++) { if (onlyTrump && cards[i].suit != trump) { contin...
ALGO
0.980464
5.428148
193317ea-410c-4f12-9fe2-629543e60541
lechwolowski/GRK
dependencies/physx-4.1/source/lowleveldynamics/src/DyConstraintSetup.cpp
#include "foundation/PxMemory.h" #include "DyConstraintPrep.h" #include "PxsRigidBody.h" #include "DySolverConstraint1D.h" #include "PsSort.h" #include "DySolverConstraintDesc.h" #include "PxcConstraintBlockStream.h" #include "DyArticulationContactPrep.h" #include "PsFoundation.h" namespace physx { namespace Dy { // ...
ALGO
0.996366
4.715968
8df18e1e-3dd4-4ef7-8dcb-bb0549cab30b
morris821028/UVa
temp/1481 - Genome Evolution.cpp
#include <stdio.h> #include <algorithm> using namespace std; // find A and A', #(set(A[l, r]) = set(A'[p, q])) #define MAXN 4096 int A[MAXN], B[MAXN], R[MAXN]; int main() { int n; while (scanf("%d", &n) == 1 && n) { for (int i = 0; i < n; i++) scanf("%d", &A[i]); for (int i = 0; i < n; i++) scanf("%d", &B[...
ALGO
0.999434
3.577064
c8f7809f-df52-4cd5-ab9d-0f608fa41ec7
SoraeCodingMasters/AlgorithmStudy
김남주/20920_영단어암기.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; #define fastio cin.tie(0),cout.tie(0),ios::sync_with_stdio(false); #define read_input freopen("input.txt","r",stdin); #define MAX 100'000 int main() { fastio; //read_input; int n, m; cin >> n >> m; string tmp; vec...
ALGO
0.999988
3.897202
83681f7b-ae4b-42b8-b297-49d3ca32e986
raincross7/code-similarity
codes/train_code/problem261/problem261_463.cpp
/* ______ _______ /\ |``\ | | / | / \ |__/ |____ |/ | / _ _\ | \ | |\ | / \ | \ |______ | \ Dept. of CSE Comilla University */ #include<bits/stdc++.h> #define pi 2*acos(0.0) #define ll long long #define F...
ALGO
0.999573
3.28362
dd3d4f9b-e0ab-4a27-9e79-6b8cc93200e8
ferri17/CPP_Modules
CPP_Module_02/ex03/bsp.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* bsp.cpp :+: :+: :+: ...
ALGO
0.998621
5.75617
5eb2d8b7-e176-4765-893b-f08714b20855
artem-barsov/CP
codeforces/743/B.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int n; std::cin >> n; std::vector<int> pa(2 * n); for (int i = 0; i < n; i++) { int a; std::cin >> a; pa[a] = i; } int mdist = INT_MAX; int lasta = 1; for (int i = 0; i < n; i++) { int bi; ...
ALGO
0.99983
4.962141
67efe555-7913-4915-b667-131e743d6565
aymanshawki/app_food_screen
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
357fe416-dfcd-4c78-b2ed-65fe090b095b
ishandutta2007/codeforces
yosupo/normal/650/E.cpp
#include <iostream> #include <cstdio> #include <cassert> #include <cstring> #include <vector> #include <valarray> #include <array> #include <queue> #include <set> #include <unordered_set> #include <map> #include <unordered_map> #include <algorithm> #include <cmath> #include <complex> #include <random> using namespace ...
ALGO
0.99983
4.215919
30118819-c66c-4395-b3ad-59786442d24b
coolcoolhua/Thesis_AntColonyOnDNASequence
AntColony/main.cpp
// 完成朴素信息素更新矩阵 // 完成朴素方向选择函数 // 完成单线程蚂蚁觅食 // 完成多线程蚂蚁并行觅食 // 完成阶梯时变函数 // 完成阶梯函数更新信息素模式 // 完成限定方向选择函数 // 未完成重做收敛函数 tggagcgtcctctgaaaaatgtcttagatactgaagtctgccgtcgataatg // 每一轮保留当前分数最高的序列,作为当前的最优比对 tgcgagcgtcctatgaaaaagtctagataactgaagtcctgccgacgattatg // 实在没找到方向函数到底哪里出错了。。。。。。。。。。。。。。。。...
ALGO
0.999749
3.0007
ea79065a-2058-47cc-85e4-ebd5d7f24afa
Jamesweng/leetcode
0129-sum-root-to-leaf-numbers.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { private: void sumTrees(TreeNode*root, int cur, int& sum) { if (!root) return; cur = cur...
ALGO
0.999889
6.775374
1acef2ec-dab7-436e-8149-4f6b73b2fc6a
tcpan/fastde
src/cpp11_sparsemat.cpp
#include "utils_sparsemat.hpp" #include "cpp11/doubles.hpp" #include "cpp11/integers.hpp" #include "cpp11/list.hpp" #include "cpp11/matrix.hpp" #include "cpp11/r_vector.hpp" #include "cpp11/list_of.hpp" #include <R.h> #include <vector> #include "fastde/sparsemat.hpp" // adapters for cpp11 r_vector to c++ implementat...
TOOL
0.906032
5.126797
8b89d3e2-9b27-496c-92be-5e34ca7426f6
tic40/atcoder
abc/abc242/a/main.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace atcoder; using namespace std; #define REP(i,n) for(int i=0;i<(int)(n);i++) int main() { double a,b,c,x; cin >> a >> b >> c >> x; double ans = 0; if (a >= x) ans = 1; else if (b >= x) ans = c / (b - a); cout << fixed << setprecision(10) << an...
ALGO
0.998778
3.600976
e8c0ba87-bc42-4c99-a83a-a834e6513c60
assem2002/Problem_Solving
UVA1174 - IP-TV.cpp
// std::ios_base::sync_with_stdio(false); // (removes the interoperability that happens between C's stdio.h and iostream ) // std::setvbuf(stdout, nullptr, _IOFBF, BUFSIZ); //(will neglect the c's stdio.h property of doing inline flushing with every line of code) #include <iostream> #include<numeric> #include...
ALGO
0.999725
4.665667
3c0ba8b4-d721-4ec6-97e0-80e840d2ecb6
twindb/twindb-xtrabackup-80
boost_1_68_0/libs/numeric/ublas/doc/samples/vector_slice.cpp
#include <boost/numeric/ublas/vector.hpp> #include <boost/numeric/ublas/vector_proxy.hpp> #include <boost/numeric/ublas/io.hpp> int main () { using namespace boost::numeric::ublas; vector<double> v (3); vector_slice<vector<double> > vs (v, slice (0, 1, 3)); for (unsigned i = 0; i < vs.size (); ++ i) ...
ALGO
0.953117
3.141449
5959e97d-6e09-4637-9d0b-83d1877e32ce
ishandutta2007/codeforces
irkstepanov/normal/1081/D.cpp
#include <bits/stdc++.h> #define all(a) (a).begin(), (a).end() #define sz(a) (int)(a).size() #define pb push_back #define mp make_pair using namespace std; typedef long long ll; typedef double ld; typedef pair<int, int> pii; typedef pair<ll, int> pli; vector<int> parent; vector<int> size; vector<int> cnt; struct e...
ALGO
0.999985
4.269984
8a755d48-0190-4b24-bf85-0ce0c732e6d1
blackbeardONE/CheggHero
coursehero_auto_reg/txtsource/321b.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int,int> ii; #define fill(a,x) memset(a,x,sizeof(a)) #define pb push_back #define sz(x) (int)x.size() #define F first #define S second #define FOR(i,a,b) for(int i = a; i<=b; ++i) #define NFOR(i,a,b) for(int i =...
ALGO
0.999935
3.611927
838fd555-fe5f-492a-b2d2-a1e48ebc0786
eng-arvind/Codeforces_problem
lucky_div.cpp
#include <iostream> using namespace std; int main() { int n; cin>>n; bool flag=0; int arr[12]={4,7,47,74,44,444,447,474,477,777,774,744}; for(int i=0;i<12;i++){ if(n%arr[i]==0){ flag=true; } } if(flag) cout<<"YES"; else cout<<"NO"; return 0; }
ALGO
0.999437
4.036367
d29baa5a-4002-4299-bd95-6b976e28c2c3
adithyar262/CPP_Programming
LeetCode/Blind75/Binary/Counting Bits/Solution.cpp
/* 338. Counting Bits https://leetcode.com/problems/counting-bits/ Given an integer n, return an array ans of length n + 1 such that for each i (0 <= i <= n), ans[i] is the number of 1's in the binary representation of i. Example 1: Input: n = 2 Output: [0,1,1] Explanation: 0 --> 0 1 --> 1 2 --> 10 Example 2: Input:...
ALGO
0.999984
6.858549
7eb1dea3-80ae-4572-9039-1d5b4b0d0e97
Shweta2762/LeetCode
Union of two arrays - GFG/union-of-two-arrays.cpp
// { Driver Code Starts //Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template in C++ class Solution{ public: //Function to return the count of number of elements in union of two arrays. int doUnion(int a[], int n, int b[], int m) { ...
ALGO
0.999744
5.716307
5fc11f18-f6c7-44b8-a829-e873718e72f5
FarmerJohnLYH/shareOI
JZOJ/2019.1.28/5393.cpp
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #define fo(i,x,y) for (int pq = (y),i = (x);i <= pq;++ i) #define fd(i,x,y) for (int pq = (y),i = (x);i >= pq;-- i) #define oo 2139062143 using namespace std; typedef double db; typedef long long ll; int lowbit(int x) {return((x)&(-x));} int ...
ALGO
0.999808
3.328408
9934295c-f4c8-48e4-b032-13a175f30898
KenzoKuroki/aprendizagem-cpp
modulo_5/5.1/Bhaskara.cpp
// // Created by Lucas Kenzo Kuroki on 22/03/25. // #include "Bhaskara.h" Bhaskara::Bhaskara(double a, double b, double c){ setParameters(a,b,c); } void Bhaskara::setParameters(double a, double b, double c){ char cmd; cout << "Voce deseja usar os valores pré-definidos? (y) - sim, (n) - nao. >>> "; cin >> cmd...
ALGO
0.987481
4.190786
8d05fc05-4906-4bab-bb47-03b13dfe7eb0
binomial14/Excellent_computer_program_project
Leo_Code/week_9_practice_from_leo.cpp
#include <iostream> using namespace std; #include "MJtile.h" class MJhand{ friend ostream& operator << (ostream&, const MJhand&); public: MJhand(); MJhand(MJtile*, int); ~MJhand(); int faceup_len() const ; int caneat(const MJtile&); bool canpong(const MJtile&); bool cangone(co...
ALGO
0.971516
4.117405
84fffc94-e280-40bf-ab79-53b2c7278927
em3ly/axon_training
Those who can not remember the past are condemned to repeat it - DP/Solutions/luismo/B/B - Petr and a Combination Lock.cpp
/* Author: Luis Manuel Díaz Barón (LUISMO) Problem: Petr and a Combination Lock Online Judge: codeforces.com Idea: Bitmask at the face + some geometry + some modulus */ #include<bits/stdc++.h> // Types #define ll long long #define ull unsigned long long // IO #define sf scanf #define pf printf #define mkp make_pair...
ALGO
0.999975
3.644745
3ed23aad-6ae0-493d-bf2c-0e5514a6ce43
kolevTKD/NBU-Programming
Semestre - 1/04.10. - Program development. Program text components/Exercise - DigitByDigit/Exercise - DigitByDigit.cpp
#include <iostream> using namespace std; int main() { int number; cin >> number; cout << "First digit is " << number / 100 << endl; number %= 100; cout << "Second digit is " << number / 10 << endl; number %= 10; cout << "Third digit is " << number << endl; return 0; }
ALGO
0.954619
3.52061
d6705bd2-abb6-4d7a-bc5a-aca5472ba656
openjdk/jdk16u
src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <Windows.h> #include <tchar.h> // This is the default buffer size used for RegQueryValue values. #define DEFAULT_ALLOC MAX_PATH // only allocate a buffer as big as MAX_ALLOC for RegQueryValue values. #define MAX_ALLOC 262144 static...
TOOL
0.896177
4.368389
ea3cd676-b79a-4cc5-b184-d3b51c22f6f4
obsolescenceL/obsolescenceL
CodeForces/E-codeforces#19/797e.cpp
/************************************************************************* File Name: E.cpp ID: obsoles1 PROG: LANG: C++ Mail: <EMAIL> Created Time: Fri 28 Apr 2017 09:59:18 AM EDT ************************************************************************/ #include<iostream> #include<cma...
ALGO
0.999869
3.475536
5f342dc4-105d-4935-971c-39ee393ebbd5
EdwardKYC/code-space
CSEC/Ferris_Wheel.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define pii pair<int, int> int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); ll n , x , ans = 0; cin >> n >> x; vector<ll> p(n); for(auto &i : p) cin >> i; sort(p.begin() , p.end()); int i = 0, j = n...
ALGO
0.999966
5.034137
442bfbc4-bf5d-4303-ad55-48ec4d9270df
kmjp/procon
leetcode/401-450/445/a.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)...
ALGO
0.999881
3.895888
56d6b988-f3b6-41bb-b95f-ac848dc12aa2
ishandutta2007/codeforces
lhic/normal/837/F.cpp
#include <bits/stdc++.h> #define mp make_pair #define pb push_back typedef long long ll; typedef long long llong; typedef long double ld; typedef unsigned long long ull; using namespace std; template <typename T> void dprint(T begin, T end) { for (auto i = begin; i != end; i++) { cerr << (*i) << " "; ...
ALGO
0.999989
3.974111
8d505797-ddb4-483b-9a17-7d7e7ba9702f
Istiaq66/Cp
Codeforces/800/Elephant.cpp
/// *** --- || In the name of ALLAH ||| --- *** /// #include <bits/stdc++.h> #define ll long long int #define nl "\n" using namespace std; int main() { ll n; cin >> n; ll a = n / 5; if (n <= 5) { cout << "1"; } else if (n % 5 == 0) { cout <<...
ALGO
0.999895
4.160335
50e77613-af3b-401e-bf0e-a9d4c331457d
L3b1n/course_2
Algorithms (C++)/Data structures/task 0.2 (task of sum)/sum.cpp
#include <cmath> #include <vector> #include <string> #include <numeric> #include <fstream> #include <iostream> int main() { freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); std::ios_base::sync_with_stdio(0); std::cin.tie(0); std::cout.tie(0); std::string info; long l...
ALGO
0.999062
4.971811
ecf65955-c040-49fc-b617-5051f84f81d6
VoltageOS/packages_inputmethods_LatinIME
native/jni/src/dictionary/utils/forgetting_curve_utils.cpp
#include "dictionary/utils/forgetting_curve_utils.h" #include <algorithm> #include <cmath> #include <stdlib.h> #include "dictionary/header/header_policy.h" #include "dictionary/utils/probability_utils.h" #include "utils/time_keeper.h" namespace latinime { const int ForgettingCurveUtils::MULTIPLIER_TWO_IN_PROBABILIT...
ALGO
0.995019
7.818139