uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
0beb5fc1-65e0-4a6a-8f3a-016c3fdc7c53
RishabhSaini619/a015_fvd
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.998859
6.785645
2140ea1f-4d4d-4a96-8ae1-a0d7590d606f
Rasulid/epam_algorithms
algorithm/DataStructure_Stack_Queue_List/Stack/stack.cpp
#include<iostream> #include<stack> #include<string> using namespace std; bool isOpen(char ch) { return ch == '{' || ch == '(' || ch == '['; } bool isPair(char open, char close) { return open == '{' && close == '}' || open == '(' && close == ')' || open == '[' && close == ']'; } bool isBalan...
ALGO
0.999694
5.599579
09791d34-1b6b-4f79-abc2-8ef4790ec540
JuliaReach/AAAI22_RE
Sherlock/examples/tests/headers/eigen_file/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_visitors.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Eigen::MatrixXf m(2,2); m << 1, 2, 3, 4; //get location of maximum MatrixXf::Index maxRow, maxCol; float max = m.maxCoeff(&maxRow, &maxCol); //get location of minimum MatrixXf::Index minRow, m...
ALGO
0.999631
4.010038
5232f8f7-646d-49e6-a56c-30bd099bcf25
hk9088/LeetCode
374_Guess_Number_Higher_or_Lower.cpp
class Solution { public: int guessNumber(int n) { int l = 1; int r = n; int mid, num; while(l<=r){ mid = l + (r - l)/2; num = guess(mid); if(num == 0){ break; } else if(num == -1){ ...
ALGO
0.999995
6.03876
e2e12dfe-1005-45d2-ae4e-6ba4c489832d
Cookiefan/ZigZag
Zigzag/Augest/Aug 31/bz1036.cpp
#include <bits/stdc++.h> #define maxn 32000 using namespace std; int key[maxn], mx[maxn], sum[maxn], rev[maxn]; int fa[maxn], c[maxn][2]; int n,m; void update(int x) { if (!x) return ; mx[x]=max(key[x], max(mx[c[x][0]], mx[c[x][1]])); sum[x]=sum[c[x][0]]+sum[c[x][1]]+key[x]; } void reverse(int x) { if (!x) retur...
ALGO
0.999929
3.893609
58a86299-022e-4f7c-8a08-f05c2ef01a50
Ashutosh-Singh-10/LeetcodeQuestions
3556-final-array-state-after-k-multiplication-operations-ii/final-array-state-after-k-multiplication-operations-ii.cpp
#include <bits/stdc++.h> using namespace std; using std::cout; using std::cin; #define endl '\n' #define Endl '\n' #define ll long long #define loop(i,a,b) for(long long i=a;i<b;i++) #define roop(i,a,b) for(long long i=a-1;i>=b;i--) #define all(p) p.begin(),p.end() #define pb(p) push_back(p); long l...
ALGO
0.999988
3.941002
b72b8c88-1603-45ca-8031-97c2be6b8be0
matumoto1234/cp-crawler
AtCoder/jsc2019-qual/jsc2019_qual_b/18066631.cpp
// detail: https://atcoder.jp/contests/jsc2019-qual/submissions/18066631 #include<iostream> #include<vector> #include<algorithm> using namespace std; using ll = long long; const ll p = 1e9+7; int main(){ ll n,k; cin>>n>>k; vector<ll> a(n); for(ll i=0;i<n;i++){ cin>>a[i]; } vector<vector<ll>> cnt(2,vect...
ALGO
0.99998
3.953591
4b6591f4-224d-4242-870d-037a71efea98
JGU-HPC/parallelprogrammingbook
chapter5/knapsack/knapsack.cpp
#include <algorithm> // std::sort #include <iostream> // std::cout #include <vector> // std::vector #include <atomic> // std::atomic #include <random> // std::uniform_int_distribution #include "threadpool.hpp" // work sharing thread pool template < typename value_t_, typename...
ALGO
0.999947
5.443748
f0095a34-10ff-4be4-abca-ffee41fe4614
xtf0214/CPP
Contest/Nowcoder/67741/I.cpp
/** * @file : I * @author : Tanphoon * @date : 2024/02/02 16:23 * @version : 2024/02/02 16:23 * @link : https://ac.nowcoder.com/acm/contest/67741/G */ #include <bits/stdc++.h> using namespace std; inline void solve() { int n; cin >> n; double sum = 0; for (int i = 0; i < n; i++...
ALGO
0.985364
4.732226
d5fb17b2-91b4-4ac7-be3e-88f5c4c1f9ad
TETEURYAN/CompetitiveProgramming
Online Judges/CodeForces/0122A.cpp
#include<bits/stdc++.h> using namespace std; int main() { vector<int>x = { 4,7,47,74,447,444,44,77,777,774,477,744 }; int y; cin >> y; for (int i = 0; i < x.size(); i++) { if (y % x[i] == 0) { cout << "YES"; return 0; } } cout << "NO"; }
ALGO
0.99936
4.184257
d68b6e27-8464-4967-a9ce-9c828a7a5732
dks0101/Cpp_Algorithm
5week/11์˜ ๋ฐฐ์ˆ˜.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { int t; cin>>t; while(t--){ string str, result; cin >> str; while (str.length() > 1) { char c; // ๋งˆ์ง€๋ง‰ ์ž๋ฆฌ์ˆ˜๋ฅผ ๋–ผ์–ด๋‚ธ๋‹ค. int lastDigit = str.back() - '0'; ...
ALGO
0.999977
6.528178
2a0e855b-ba3c-4824-962d-421a936d7223
adhyan-jain/CodeVault
C++/Day-072 - InlineFunctions_Practice/01.cpp
/* Problem Statement Preethi is learning programming and she got interested in how inline functions work. So she has been practicing questions on that. Help her solve the code for the following question statement: Create an inline function isLeapYear() to check if a given year is a leap year. Note: This is a sample...
ALGO
0.996861
4.898002
cffeba54-a5bd-4e76-aac1-d4f9a7a1dd81
tmenet/Marlin-2.0-MendleMax-2.0
Marlin/src/gcode/bedlevel/abl/G29.cpp
/** * G29.cpp - Auto Bed Leveling */ #include "../../../inc/MarlinConfig.h" #if HAS_ABL_NOT_UBL #include "../../gcode.h" #include "../../../feature/bedlevel/bedlevel.h" #include "../../../module/motion.h" #include "../../../module/planner.h" #include "../../../module/probe.h" #include "../../queue.h" #if ENABLED(...
ALGO
0.981549
5.785818
f0d2569a-dd0b-4d1f-8e49-e031000b158d
KwanWaiPang/RGBD-GS-ICP-SLAM-Comment
submodules/fast_gicp/thirdparty/Eigen/bench/perf_monitoring/lazy_gemm.cpp
#include <iostream> #include <fstream> #include <vector> #include <Eigen/Core> #include "../../BenchTimer.h" using namespace Eigen; #ifndef SCALAR #error SCALAR must be defined #endif typedef SCALAR Scalar; template<typename MatA, typename MatB, typename MatC> EIGEN_DONT_INLINE void lazy_gemm(const MatA &A, const Ma...
TOOL
0.96498
6.08404
870510a5-f6a1-4f19-8778-19d62df1c72f
iamuday105/dsa
Linked List/ProblemsOnLL/flattenA_LL.cpp
// 430. Flatten a Multilevel Doubly Linked List class Solution { public: Node* solve(Node* head) { auto it = head; auto tail = it; //for tracking tail node while(it){ if(it->child){ auto childTail = solve(it->child); //tail node //flatten...
ALGO
0.999932
5.563006
4581ca06-d788-4ad8-b6a2-a9ee14ef819a
mokshashah0111/LeetCode
1063-best-sightseeing-pair/1063-best-sightseeing-pair.cpp
class Solution { public: int maxScoreSightseeingPair(vector<int>& values) { int ans = 0; int prev = values[0]; for(int j = 1;j<values.size();j++){ ans = std::max(ans, prev+values[j]-j); prev = std::max(prev,values[j]+j); } return ans; } };
ALGO
0.999962
6.267923
8dc8b014-f382-4697-bc04-486a1eb7c374
gabriaraujo/uri
src/cpp/1865.cpp
#include <iostream> #include <string.h> using namespace std; int main (){ int c, n; char nome[100]; cin >> c; for (int i = 0; i < c; i++){ cin >> nome; cin >> n; if (!strcmp(nome, "Thor")){ cout << "Y" << endl; } else cout << "N" << ...
ALGO
0.991533
3.328607
1763a269-3604-4bfc-a8cb-dba8157951c6
ishandutta2007/codeforces
kotatsugame/normal/600/B.cpp
#include<cstdio> #include<algorithm> using namespace std; int N,M; int A[2<<17]; main() { scanf("%d%d",&N,&M); for(int i=0;i<N;i++)scanf("%d",&A[i]); sort(A,A+N); for(int i=0;i<M;i++) { int B;scanf("%d",&B); printf("%d%c",(int)(upper_bound(A,A+N,B)-A),i+1==M?10:32); } }
ALGO
0.999949
3.213092
70689da2-a81f-4ccf-8a5a-9f3f37b67163
Priya-1305/chat-application
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
1e14fec6-04bb-4d25-8d4e-f714d70d4daf
AlexanderLukashuk/MyRepository
source/homework_STEP/priorityQueue/priorityQueue.cpp
#include <iostream> #include <queue> using namespace std; template <class T> class Element { public: T data; Element<T> *next; Element() : data(), next(nullptr) {} Element(const T &data) : data(data), next(nullptr) {} bool operator<(const Element<T> &r) { return this->data < r.data; ...
ALGO
0.998644
4.44099
37286186-ecd0-4cda-a8ef-472d0887a768
mgtruuuu/LeetCode
0225-implement-stack-using-queues/0225-implement-stack-using-queues.cpp
#include <queue> class MyStack { private: std::queue<int> q1; public: MyStack() { } void push(int x) { q1.push(x); auto length = q1.size(); while (--length > 0) { q1.push(q1.front()); q1.pop(); } } int pop() { ...
ALGO
0.985246
5.626603
cd19eb4d-c6a1-4d29-9a0b-475c36182a7e
Ujjwalbhatt/Data-Structure-and-Algorithm
Objects and Classes(OOPs)/polymorphism.cpp
#include <iostream> using namespace std; #include <iostream> using namespace std; class B { public: int a; int b; public: //Compile time overloading function int add() { return a + b; } void operator + (B (&obj)) { int value1 = this->a; int value2 = obj.a; co...
TOOL
0.890932
4.756079
bbdde6a4-3667-4ae4-a4dd-33dce90f3488
LAM-GROUP/LammpsWithPLIP
src/npair_full_bin_atomonly.cpp
#include "npair_full_bin_atomonly.h" #include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" #include "domain.h" #include "my_page.h" #include "error.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ NPairFullBinAtomonly::NPairFul...
ALGO
0.987028
5.409168
2518e22a-3e16-4660-b420-e79e2e3a6dc6
taskinahmadalfaruqe/CppInJUST
Day-17/MattrexMultiplay.cpp
#include <iostream> using namespace std; int main() { int row1 = 3, col1 = 2, row2 = 2, col2 = 3; // Check if multiplication is possible if (col1 != row2) { cout << "Matrix multiplication not possible!" << endl; return 0; } // Input first matrix int matrix1[row1][col1]; ...
ALGO
0.999928
4.231284
5dc5fd62-62bf-41cc-9a31-e6bef21bf3a0
AlokSingh04/LeetCode
0020-valid-parentheses/0020-valid-parentheses.cpp
class Solution { public: bool isValid(string s){ stack<char> st; for(char ch : s){ if(ch == '('){ st.push(')'); } else if(ch == '['){ st.push(']'); } else if(ch == '{'){ st.push('}'); } else { ...
ALGO
0.99895
6.51949
d9a71677-18a4-46b1-9702-901ee8453cf6
samarth2804/leetcode-challenge
April-2024/Day-10.cpp
# Reveal Cards In Increasing Order (Leetcode 950)# # Problem Link: https://leetcode.com/problems/reveal-cards-in-increasing-order/description/ vector<int> deckRevealedIncreasing(vector<int>& deck) { int n=deck.size(); sort(deck.begin(),deck.end()); queue<int> q; for(int i=0;i<n;++i) q.push(i); vect...
ALGO
0.999981
6.343046
62732d43-04e8-4f4f-98ba-265f6bc767c6
krishnasikarwar7/DSA-LEETCODE
374-guess-number-higher-or-lower/guess-number-higher-or-lower.cpp
/** * Forward declaration of guess API. * @param num your guess * @return -1 if num is higher than the picked number * 1 if num is lower than the picked number * otherwise return 0 * int guess(int num); */ class Solution { public: int guessNumber(int n) { long low=1,h...
ALGO
0.999995
5.861284
65f943d3-02fe-4285-80b7-ea5385a09178
reinalynconde/CMSC-190-2
backend/socket.io/boost_1_66_0/libs/geometry/doc/index/src/examples/rtree/value_shared_ptr.cpp
//[rtree_value_shared_ptr #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> #include <boost/shared_ptr.hpp> namespace ...
ALGO
0.999355
6.483366
99a82050-9a25-4821-9e38-a4d3a07ac892
adityakanu/Codeforces
codeforces/1788/A.cpp
/* Problem Name: A_One_and_Two Problem Link: https://codeforces.com/contest/1788/problem/A Author: Aditya Kanu (adityakanu) */ //----------HEADER---------- #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; //----------...
ALGO
0.999453
4.777342
2d971a8d-0dcb-460f-ac4e-e76736631652
captain24tyagi/DSA
arrsum.cpp
#include <iostream> using namespace std; int sumArr(int arr[], int size){ int sum = 0; for (int i = 0; i < size; i++) { sum += arr[i]; }; return sum; } int main(){ int a[] = {2, 7, -4, 1, 11}; int n; cin >> n; cout << "Sum of elements of array is given as: " << sumArr...
ALGO
0.997262
4.408506
a5a472c1-f988-47ea-abaa-369a9021dd2b
aniketbiswas21/codechef
pattern_rhombus.cpp
#include<iostream> using namespace std; int main(){ int n; cin>>n; int z; for(int i=1;i<=n;i++){ for(int j=2*(n-i);j>0;j--){ cout<<" "; } for(int h=1,g=i;h<=i;h++,g++){ cout<<g<<" "; } for(int j=2*(i-1);j>=i;j--){ cout<<j<<" "; } cout<<endl; } for(int i=1;i<=n-1;i++ ){ for(int j=1;j<=2*...
ALGO
0.999887
3.031562
59999121-533b-42ab-8231-4f80fb7c9560
mehedynoman11/Cpractises
String/class_array_object.cpp
#include <iostream> using namespace std; class Student { public: string name; int roll; int mark; // Student (string name, int roll, int mark) { // this->name=name; // this->roll=roll; // this->mark=mark; // } }; int main() { Student a...
TOOL
0.96626
3.353065
ec27dad3-7aca-4c84-bf7c-1f98f686d891
Gprojects1/Cpp-structs-and-algorithms
ll1/undirected_graph.cpp
#include "undirected_graph.h" #include <iostream> #include <queue> #include <set> graph::graph(int v, std::vector<std::vector<int>> list) { this->vertices = v; adjacencylist = list; } graph::graph(int v) { this->vertices = v; adjacencylist.resize(v); } int graph::get_vertices() { return vertice...
ALGO
0.998462
4.51976
187fdb95-2c5a-4691-a82b-b36b4e923db4
sahilmadaan048/Striver-From-Scratch
7. Recursion/2. Subsequence pattern/12. Letter Combinations of a phone number/main.cpp
// https://takeuforward.org/plus/dsa/problems/letter-combinations-of-a-phone-number // https://leetcode.com/problems/letter-combinations-of-a-phone-number/description/ class Solution { unordered_map<char, string> temp = { {'2', "abc"}, {'3', "def"}, {'4', "ghi"}, {'5', "jkl"}, {'6', "mno"}, {'7',...
ALGO
0.999919
7.06653
b5d3c193-78b8-4027-9db8-1b2ee3f3103a
bhanutejaindla/leetcode
0368-largest-divisible-subset/0368-largest-divisible-subset.cpp
class Solution { public: vector<int> largestDivisibleSubset(vector<int>& nums) { int n=nums.size(); sort(nums.begin(),nums.end()); vector<int>dp(n,1),hash(n); int maxi=1; int lastindex=0; for(int i=0;i<n;i++) { hash[i]=i; for(int prev=0...
ALGO
0.999996
5.378087
6b07be9f-5bb6-44ca-9edc-385ca95415cc
right-x2/Algorithm_study
2110.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int n,m; vector<int> v; int check(int k) { int cnt = 1; int s = v[0]; for (int i = 1; i < v.size(); ++i) { if(v[i]-s>=k) { cnt++; s = v[i]; } } return cnt; } int main(...
ALGO
0.999997
4.462936
dffa110e-abb6-4273-8c9a-59a4bdb022c9
trailofbits/llvm-wedlock
llvm/lib/IR/Dominators.cpp
#include "llvm/IR/Dominators.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Config/llvm-config.h" #include "llvm/IR/CFG.h" #include "llvm/IR/Constants.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/PassManager.h" #include "llvm/InitializePasses.h" #include "llvm/Sup...
TOOL
0.998121
7.947068
072a3b34-225b-4cc5-b940-00865512c777
EloToJaa/Testing
3. Przykล‚ady zadaล„ trudniejszych do testowania/bajtokomputer/rozwiazania/bajs1.cpp
/************************************************************************* * * * XX Olimpiada Informatyczna * * * * Zadanie: ...
ALGO
0.999891
4.094255
5dbbfe93-501b-4f62-a595-c04f5ff36967
ZDUC/CTDL-GT_PTIT
xau-nhi-phan-truoc.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { string a; cin >> a; int n = a.size(); a = "1" + a; for (int i = n; i >= 0; i--) { if (a[i] == '1') { a[i] = '0'; ...
ALGO
0.99997
3.868922
7d1c8c62-a8f8-4713-828a-3c64e4ea6f96
vavraj/leetcode
Medium/Longest Increasing Subsequence/longest-increasing-subsequence.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int optimalSol(int n,int a[]){ if(n==0) return 0; vector<int>ans; ans.push_back(a[0]); for(int i=1;i<n;i++){ if(a[i]>ans.back()){ ...
ALGO
0.999875
6.338859
9836b835-1075-4dcf-ae36-81a3ee728b3c
zkxshg/Test_of_LeetCode
1000-2000/1105_Filling_Bookcase_Shelves.cpp
// https://leetcode.com/problems/filling-bookcase-shelves/?envType=daily-question&envId=2024-07-31 // DP class Solution { public: int minHeightShelves(vector<vector<int>>& books, int shelfWidth) { int n = books.size(); vector<int> dp(n + 1, INT_MAX); dp[0] = 0; dp[1] = books[0][1]; ...
ALGO
0.999947
6.764818
f704adb6-7d02-4c25-8e2d-07d921121b71
shivanshi-s/CPP-Practices
BeginnersCode/Recursion_Practice/towerofHanoi_rec.cpp
#include<iostream> using namespace std; int toh(int n, int A, int B, int C) { if(n>0) // = no of rings { toh(n-1,A,C,B); cout<<"From "<<A<<"to "<<C<<endl; toh(n-1,B,A,C); } } int main() { toh(4,1,2,3); cout<<"tower of hanoi shift completed! "; return 0; }
ALGO
0.999937
4.801927
a4456652-aebb-4d8b-9d2a-24b29d7d0dc7
IDA-TUBS/CC_LinkMonitor
thirdparty/boost_1_73_0/libs/local_function/example/n2550_find_if.cpp
#include <boost/local_function.hpp> #include <boost/typeof/typeof.hpp> #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() #include <boost/detail/lightweight_test.hpp> #include <vector> #include <algorithm> struct employee { int salary; explicit employee(const int& a_salary): salary(a_salary) {} }; BOOST_TYPE...
TOOL
0.940729
5.087589
50fdf061-ca81-4b09-a287-94c341baa47c
arijitk930/LEETCODE-PROBLEMS
0001-two-sum/0001-two-sum.cpp
class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { map<int, int> mpp; for (int i = 0; i < nums.size(); i++) { int a = nums[i]; int more = target - a; if (mpp.find(more) != mpp.end()) { return {mpp[more], i}; } ...
ALGO
0.99992
6.357646
c5bc0563-97f7-403f-8d3f-0a559366c389
MoeinGhaniyoun/LLVM-SLH-RISCV
llvm/lib/Transforms/IPO/Inliner.cpp
#include "llvm/Transforms/IPO/Inliner.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/PriorityWorklist.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llv...
TOOL
0.925378
6.67464
0ce53971-0f8c-4ddc-ba35-8588059cf5c7
fernunex/CompetitiveProgramming
CodeForces/Jun16-21/maxMod.cpp
//Problem: https://codeforces.com/contest/2084/problem/A #include <bits/stdc++.h> using namespace std; void solve(){ int n; cin >> n; if (n % 2 == 1){ cout << n; for (int i = 1; i < n; i++){ cout << ' ' << i; } cout << endl; } else { cout << -1 <<...
ALGO
0.99585
5.404455
b49e64cf-e959-4245-b24e-af2a792380dd
Hafiz-Sakib/Data-Structure-Algorithms
Data Structures/05. Arrays/3. Alternate positive and negative numbers.cpp
/** 3. Alternate positive and negative numbers Easy Accuracy: 49.41% Submissions: 18302 Points: 2 Given an unsorted array Arr of N positive and negative numbers. Your task is to create an array of alternate positive and negative numbers without changing the relative order of positive and negative numbers. Note: Array ...
ALGO
0.9997
5.515945
18a650a3-79e2-4b14-9a6e-e54b99851628
lyccrius/OI-Solution
Luogu/P1127 ่ฏ้“พ .cpp
#include <iostream> #include <algorithm> #include <string> #include <deque> void promote() { std::ios::sync_with_stdio(0); std::cin.tie(0); std::cout.tie(0); return; } typedef std::string str; typedef std::deque<int> dic; const int maxN = 1000; int n; str m; int s; int t; namespace graph { struct Vertex { d...
ALGO
0.999983
4.449045
792badc4-1c16-4206-869c-f7aaf7db84f4
Arkhamknight78/Cpp-programs
charactercaseuplow.cpp
#include<iostream> using namespace std; int main() { char ch; cin>>ch; if(ch>=65 && ch<=90){ cout<<"UPPERCASE"; } else if(ch>=97 && ch<=122){ cout<<"lowercase"; } else{ cout<<"invalid"; } return 0; }
ALGO
0.993482
3.709717
d017eba4-f78b-4ee4-82e3-bd48be03419d
AnuragChouhanDEV/LeetCode
1716. Calculate Money in Leetcode Bank/Accepted/Solution.cpp
// https://leetcode.com/problems/calculate-money-in-leetcode-bank/?envType=daily-question&envId=2023-12-06 class Solution { public: int totalMoney(int n) { #if 1 if (n <= 7) return (n * (n+1))/2; int k = n/7; int l = n%7; int res = 0; int i = 0; for (; i < k;++i) { ...
ALGO
0.999931
5.394794
aaa4c459-c962-4441-8c7f-7806d35a8f5b
bolunli11/boost-1_71_0
libs/algorithm/test/sort_subrange_test.cpp
#include <boost/config.hpp> #include <boost/algorithm/sort_subrange.hpp> #include <boost/algorithm/cxx11/is_sorted.hpp> #define BOOST_TEST_MAIN #include <boost/test/unit_test.hpp> #include <vector> #include <iostream> #if (__cplusplus >= 201103L) || defined(BOOST_NO_CXX98_RANDOM_SHUFFLE) #include <random> std::defa...
TEST
0.860786
7.016408
2a9785c7-48ca-4d0f-b5a3-e9bf14a2a86b
marsalm/cis-1901-final-marissa-tarunyaa
wordle.cpp
#include <iostream> #include <string> #include <cctype> const std::string SECRET_WORD = "apple"; // The secret word to guess const int MAX_TRIES = 6; // Maximum number of tries void printGuessResult(const std::string &guess) { std::string result = ""; for (int i = 0; i < guess.size(); ++i) ...
ALGO
0.993422
4.637908
dd6b6c6e-c856-46f8-b331-c455348e9a8a
ProtikNag/Lightoj
1034 - Hit the Light Switches.cpp
#include<cstdio> #include<sstream> #include<cstdlib> #include<cctype> #include<cmath> #include<algorithm> #include<set> #include<queue> #include<deque> #include<stack> #include<list> #include<iostream> #include<fstream> #include<numeric> #include<string> #include<vector> #include<cstring> #include<map> #include<iterato...
ALGO
0.999812
4.411342
b1d4bb71-b970-4f33-825c-da32fb29475a
sagar-barapatre/Data-Structures-and-Algorithms
Hashing/22) efficiently_print_all_nodes_between_two_given_level.cpp
#include <iostream> #include <list> using namespace std; // Data structure to store a Binary Tree node struct Node { int key; Node *left, *right; Node(int key) { this->key = key; this->left = this->right = nullptr; } }; // Iterative function to print all nodes between two given // levels in a binary tree vo...
ALGO
0.999861
5.399805
a0bec099-00a2-40f5-8a11-f22184bb0b13
ishandutta2007/codeforces
rubikun/normal/1628/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; } #define all(x) (x).begin(),(x).end() #define fi first #define ...
ALGO
0.999861
3.871576
daa9098e-a9ed-4d40-9864-a1e250362446
Glyochi/Tilted-Facial-Detection
opencv-4.5.3/samples/cpp/tutorial_code/video/optical_flow/optical_flow_dense.cpp
#include <iostream> #include <opencv2/core.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/videoio.hpp> #include <opencv2/video.hpp> using namespace cv; using namespace std; int main() { VideoCapture capture(samples::findFile("vtest.avi")); if (!capture.isOpened()){ ...
ALGO
0.957533
4.525755
e6c96d6f-2641-4c2e-a7d9-0bc336d7b8f7
piyushsonawane07/A2OJ-Solutions
A_Beautiful_Matrix.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int main() { int n = 5; int arr[n][n]; int x, y; int count = 0; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { cin >> arr[i][j]; if (arr[i][j] == 1) { ...
ALGO
0.999896
3.304632
54411bb6-373a-4983-88c5-ed8376e656f0
riyaroy-tech/DSA
Binary Search/81. Search in Rotated Sorted Array II.cpp
// https://leetcode.com/problems/search-in-rotated-sorted-array-ii/submissions/909023275/ class Solution { public: bool search(vector<int>& nums, int target) { //Tc-> O(logN) int l = 0; int r = nums.size()-1; while(l<=r) { int m = l+(r-l)/2; // if m...
ALGO
0.999977
6.751189
05fa3bed-559f-423b-b90d-267c3c86a60b
ela60/Data-structure-All-problems
day8/linked list/remove_duplicates_from_unsorted_linked_list.cpp
/* C++ Program to remove duplicates in an unsorted linked list */ #include <iostream> using namespace std; /* A linked list node */ struct Node { int data; struct Node* next; }; // Utility function to create a new Node struct Node* newNode(int data) { Node* temp = new Node; temp->data = data; temp->next = NULL; ...
ALGO
0.999891
5.795908
58318df9-84ae-47ff-ad78-1b403eda6307
vinz321/Rectification
OpenCVProj/Main.cpp
#include <iostream> #include <set> #include <iterator> #include <vector> #include <fstream> #include <opencv2/core.hpp> #include <opencv2/imgcodecs.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> #include <sys/timeb.h> #include "image_search.h" #include "transformations.h" using namespace std; usi...
ALGO
0.996373
3.510708
be304eb7-49fb-4627-8a4b-d3035f086855
Vishu-hp/FJP-DSA
Level-1/Binary Tree/addNodeToBst.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int data; Node* left; Node* right; Node(int val) { data = val; left = nullptr; right = nullptr; } }; Node* construct(vector<int> & arr) { Node* root = new Node(arr[0]); pair<Node*, int> p = {root, 1}; stack<pair<Node*, in...
ALGO
0.999949
5.622727
e49f74f9-1ca3-4062-aef9-cc903dab9f6e
stephnet40/TheDragonProblem
ThroneRoomActions.cpp
#include <iostream> #include <string> #include <vector> #include "ThroneRoomActions.h" using namespace std; string NegotiateDragon() { string endResult; if (dragonWife.GetSpokeWith() == true) { cout << "According to his wife, the dragon is just a big ol\' softie. He\'ll listen, right? As you approach, he speaks...
TOOL
0.900827
5.094715
c617f688-3768-423f-a8f7-eeec1e6bd6a6
sankarvema/InnovationRoom
tess_ocr_demo_src/libraries/tess-two/jni/com_googlecode_tesseract_android/src/training/commontraining.cpp
#include "commontraining.h" #include "allheaders.h" #include "ccutil.h" #include "classify.h" #include "cluster.h" #include "clusttool.h" #include "efio.h" #include "emalloc.h" #include "featdefs.h" #include "fontinfo.h" #include "freelist.h" #include "globals.h" #include "intfeaturespace.h" #include "mastertrainer.h"...
DATA
0.931998
5.694452
3975cc4e-a702-4786-a178-494a924b4e5a
mmanzi/gradientdomain-mitsuba
src/samplers/ldsampler.cpp
#include <mitsuba/render/sampler.h> #include <mitsuba/core/qmc.h> MTS_NAMESPACE_BEGIN /*!\plugin{ldsampler}{Low discrepancy sampler} * \order{3} * \parameters{ * \parameter{sampleCount}{\Integer}{ * Number of samples per pixel; should be a power of two * (e.g. 1, 2, 4, 8, 16, etc.), or it will be...
ALGO
0.91901
7.282317
6d0da4e4-e652-4449-9f42-54eaaed33d78
MAbuzarH/learn_cpp
DSA/array/rotateArrtol.cpp
#include <bits/stdc++.h> using namespace std; int main() { int s = 5; int arr[s] = {1, 2, 3, 4, 5}; int temp = arr[0]; for (int i = 1; i < s; i++) { arr[i - 1] = arr[i]; } arr[s - 1] = temp; for (int j = 0; j < s; j++) { cout << arr[j] << ""; } return 0; }
ALGO
0.999809
3.614123
6920504a-0038-4409-ae53-9ac480cdc500
jpablo27/drone-navigation-super-pixels
include/new_planes_plot.cpp
#include <iostream> #include <pcl/point_types.h> #include <opencv2/opencv.hpp> #include <opencv2/features2d.hpp> #include <opencv2/videoio.hpp> #include <vector> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <pcl/common/common_headers.h> #include <pcl/visualization/cloud_viewer.h> #i...
ALGO
0.99493
3.504672
e20cc335-1e9e-43ff-b35a-169d16b069b0
cjimmyjohansson/AoC2023
day6/day6_part2.cpp
#include <iostream> #include <vector> #include <string> #include <vector> #include <fstream> #include <sstream> #include <map> #include <string_view> #include <math.h> #include <stdint.h> using namespace std; int main() { string line; ifstream myfile1; myfile1.open("input1.txt"); vector<int64_t> dis...
ALGO
0.99869
4.145887
a2758b99-ae6e-4a05-94a9-5d1643863cb9
briansfma/CarND-Path-Planning-Project
src/Eigen-3.3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple_rowwise.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; int main() { Eigen::MatrixXf mat(2,4); Eigen::VectorXf v(4); mat << 1, 2, 6, 9, 3, 1, 7, 2; v << 0,1,2,3; //add v to each row of m mat.rowwise() += v.transpose(); std::cout << "Broadcasting result: " << std::...
ALGO
0.993095
4.296038
e0cc1069-5e52-4143-80c1-b2141cf262a3
infuq/jdk-jdk8-b116
jdk/src/share/native/sun/font/layout/CanonShaping.cpp
#include "LETypes.h" #include "LEGlyphStorage.h" #include "CanonShaping.h" #include "GlyphDefinitionTables.h" #include "ClassDefinitionTables.h" U_NAMESPACE_BEGIN void CanonShaping::sortMarks(le_int32 *indices, const le_int32 *combiningClasses, le_int32 index, le_int32 limit) { for (le_int32 j = index + 1; j < li...
TOOL
0.975175
6.645166
6e11d8c5-c6f7-4ff2-a70c-def1d54b91a0
ishandutta2007/codeforces
koosha_mv/normal/1240/D.cpp
#include <bits/stdc++.h> using namespace std; #define erorp(x) cout<<#x<<"={"<<(x.F)<<" , "<<x.S<<"}"<<endl #define print(v,r) f(i,0,r) cout<<v[i]<<" "; cout<<endl #define eror(x) cout<<#x<<'='<<(x)<<endl #define f_(i,a,b) for(int i=a;i>=b;i--) #define f(i,a,b) for(int i=a;i<b;i++) #define nb(x) __builtin_popcount(x) #...
ALGO
0.999858
3.94003
a2dc75d2-d723-4d2c-ad84-12de3c0fd018
raincross7/code-similarity
codes/train_code/problem225/problem225_71.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<int, int> pii; typedef pair<ll, ll> pll; #define REP(i, n) for(int i=0; i<(n); ++i) #define FOR(i, a, b) for(int i=(a); i<(b); ++i) #define FORR(i, a, b) for...
ALGO
0.99999
4.220427
1cfe8708-1f94-43c7-9816-77db9a8526bf
DuckAndChips/traffic-simulator
Trip_Distribution.cpp
#include "Trip_Distribution.h" #include <iostream> #include <cmath> #include <QDebug> #include "City.h" using namespace std; /*** for trip distribution step (step 2), first, initiallize the 3 vectors containing all residential, revenue and health categories building respectively in the object ***/ Trip_Distribution::T...
ALGO
0.998601
5.149061
b2f4d386-80c8-46b6-aac2-2727e510688c
nobushi95/atcoder-archive-cpp
contest_cpp/abc269/E.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; const ll infl = 1LL << 60; const int inf = INT_MAX / 2; #define REP(i, left, right) for (ll i = left; i < right; i++) #define RREP(i, right, left) for (ll i = right; i >= left; i--) #define REPEQ(i, left,...
ALGO
0.99993
3.645696
289dfe2f-dcd9-4f99-accf-022c98fe1ff3
artiam99/GeeksforGeeks
1 Arrays/6 Sorting/9 Adjacent Difference at most K.cpp
#include<bits/stdc++.h> using namespace std; void Search(vector<int> &a , int n , int x , int k) { int c = -1 , i = 0; while(i < n) { c++; if(a[i] == x) cout << i << " "; int diff = ceil(abs(a[i] - x) / k); i += max((int)1 , diff); } } signed main() { vector<int> a = ...
ALGO
0.999899
4.105036
8ed8344e-5af5-41dc-92fe-0f25a1ca42b0
masari-project/masari-webwallet
src_native/common/i18n.cpp
#include <stdlib.h> #include <string.h> #include <ctype.h> #include <string> #include <map> #include "include_base_utils.h" #include "file_io_utils.h" #include "common/util.h" #include "common/i18n.h" #include "translation_files.h" #undef MONERO_DEFAULT_LOG_CATEGORY #define MONERO_DEFAULT_LOG_CATEGORY "i18n" static c...
TOOL
0.885968
6.175295
9858c37d-9c72-4087-ab36-f2006bfa24aa
Abhinav-2412/DSA-CP
cses/palindrome reorder.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long; void solve() { string s; cin>>s; map<char,int>mp; for(auto it: s) { mp[it]++; } int count =0; for( auto it : mp) { if(it.second %2 !=0) count++; } if(count>1) { cout <<"NO SOLUTION"<<endl; return; } stri...
ALGO
0.999999
4.655786
252bf224-c660-408a-8ff7-31fce74ee669
darrylys/spoj
AE1B.cpp
#include<cstdio> #include<algorithm> using namespace std; bool cmp(int a, int b) {return a>b; } int main() { int a[1010]; int n, k, s, sum; scanf("%d%d%d",&n,&k,&s); for(int i=0;i<n;i++) scanf("%d",&a[i]); sort(a, a+n, cmp); sum=0; for (int i=0;i<n;i++) { sum+=a[i]; if (su...
ALGO
0.999732
3.51751
c11e502a-4739-469e-861d-a153b56ae331
Anonymus123/AtomicCore-3.3.5a
dep/g3dlite/source/Matrix4.cpp
/** @file Matrix4.cpp @maintainer Morgan McGuire, http://graphics.cs.williams.edu @created 2003-10-02 @edited 2010-01-29 */ #include "G3D/platform.h" #include "G3D/Matrix4.h" #include "G3D/Matrix3.h" #include "G3D/Vector4.h" #include "G3D/Vector3.h" #include "G3D/BinaryInput.h" #include "G3D/BinaryOutput.h...
TOOL
0.948406
7.329837
63fb976a-83e8-485f-af6c-f469a84f19d0
haribo841/Cpp-challenges
ConsoleApplication1/019 Perimeter of a Rectangle.cpp
//Create a function that takes length and width and finds the perimeter of a rectangle. #include "019 Perimeter of a Rectangle.h" int findPerimeter(int length, int width) { return 2 * length + 2 * width; }
ALGO
0.998527
4.955663
a83f34a6-41e5-4ecc-950f-bd25227f360f
Amankr027/6Companies30Days-
Microsoft/Largest_Divisible_Subset.cpp
/* Given a set of distinct positive integers nums, return the largest subset answer such that every pair (answer[i], answer[j]) of elements in this subset satisfies: answer[i] % answer[j] == 0, or answer[j] % answer[i] == 0 If there are multiple solutions, return any of them. Example 1: Input: nums = [1,2,3] Output:...
ALGO
0.999994
5.51446
e3e1c797-5fca-49fd-8917-93fbf1dfe50e
arthurlee1996/HillClimbingVehicleRoutingProblem
Solution.cpp
// // Created by Adam Stelmaszyk on 30/12/2018. // #include "Solution.h" void Solution::laczenieTras(){ std::srand (time(NULL)); if(vehicles.size()<2){ return; } int v1 = rand() % vehicles.size(); int v2; do{ v2 = rand() % vehicles.size(); }while(v2==v1); vector <Custo...
ALGO
0.912875
3.871815
47474810-becf-4ac4-a8e3-617661e6d04c
devMooon/object-oriented-programming
๊ธฐ๋ง๋Œ€๋น„_์ตœ์ข…์ ๊ฒ€/์ถ”์ƒํด๋ž˜์Šค/์˜ˆ์ œ9-7/Adder.cpp
#include "Adder.h" int Adder::calc(int a, int b) { return a + b; }
TOOL
0.873424
4.819709
1912d1f5-13fe-415b-85ae-0d598f671cba
EdimarJunior/CompositionalTioco
symbolrt/CVC4/src/theory/arith/nl/ext/factoring_check.cpp
/********************* */ #include "theory/arith/nl/ext/factoring_check.h" #include "expr/node.h" #include "theory/arith/arith_msum.h" #include "theory/arith/inference_manager.h" #include "theory/arith/nl/nl_model.h" namespace CVC4 { namespace theory { namespace...
ALGO
0.972427
6.688065
87ac3c54-8e22-4e3b-8e08-31a9c585ac2a
afayek1/stanford
cs106b/simple-project/lib/StanfordCPPLib/stacktrace/call_stack_gcc.cpp
/* Linux/gcc implementation of the call_stack class. */ #ifdef __GNUC__ #include <stdio.h> #include <cxxabi.h> #ifdef _WIN32 #include <windows.h> #include <tchar.h> #include <stdio.h> #include <strsafe.h> # undef MOUSE_EVENT # undef KEY_EVENT # undef MOUSE_MOVED # undef HELP_KEY #else #include <execinfo.h> #include...
TOOL
0.933633
6.99418
f032cbff-6cbc-48eb-b0c8-001d78859c5a
IHPC-G6/Ant-Colony-Optimization
Archive/gen_nodes.cpp
#include<iostream> #include<fstream> #include<random> #include<cmath> #include<vector> using namespace std; bool occupied(int i, int j, const vector<vector<int>>& matrix){ if(i >= 0 && i < matrix.size() && j >= 0 && j < matrix[i].size() && matrix[i][j]) return false; return true; } bool add_point(int x_coord...
ALGO
0.980304
3.658007
473e3322-554c-475f-ac10-caa92f6240dc
maverickreal/leetcode-solutions
0621-task-scheduler/0621-task-scheduler.cpp
class Solution { public: int leastInterval(vector<char>& tasks, int n) { vector<int>freq(26); for(char ch : tasks){ ++freq[ch-'A']; } sort(begin(freq), end(freq)); int freeTimeUnits = n * (freq.back() - 1); for(int i=24; i>-1; --i){ if(freq[i]=...
ALGO
0.999956
6.782257
154fa7dd-de28-40ca-9dff-67995b4d4274
BeeEyeDmu/hmkim
ex3/ex3.cpp
// ex3.cpp : ์ด ํŒŒ์ผ์—๋Š” 'main' ํ•จ์ˆ˜๊ฐ€ ํฌํ•จ๋ฉ๋‹ˆ๋‹ค. ๊ฑฐ๊ธฐ์„œ ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰์ด ์‹œ์ž‘๋˜๊ณ  ์ข…๋ฃŒ๋ฉ๋‹ˆ๋‹ค. // #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main() { char old_ch, new_ch; int index; // ๋ณ€์ˆ˜ ์„ ์–ธ scanf("%c %d", &old_ch, &index); // ์ž…๋ ฅ๋ฐ›๊ธฐ if (old_ch >= 'a' && old_ch <= 'z') { // ์†Œ๋ฌธ์ž์ธ ๊ฒฝ์šฐ new_ch = 'a' + ((...
ALGO
0.969274
4.6136
c20ba2ff-aa79-4535-b7d2-5668f3b7b4c3
vartika2302/Crack-Your-Placement
115-distinct-subsequences/115-distinct-subsequences.cpp
class Solution { private: // RECURSIVE + MEMOIZATION int f(int i,int j,string& s,string& t,vector<vector<int>>& dp){ if(j==0) return 1; if(i==0) return 0; if(dp[i][j]!=-1) return dp[i][j]; if(s[i-1]==t[j-1]) { return dp[i][j] = f(i-1,j-1,s,t,dp)+f(i-1,j,s,t,...
ALGO
0.999992
6.789991
3af94dda-8e4d-4b2d-993f-0124f155d761
Lighter01/qgis_project
src/analysis/processing/qgsalgorithmroundness.cpp
#include "qgsalgorithmroundness.h" #include "qgscurvepolygon.h" ///@cond PRIVATE QString QgsRoundnessAlgorithm::name() const { return QStringLiteral( "roundness" ); } QString QgsRoundnessAlgorithm::displayName() const { return QObject::tr( "Roundness" ); } QStringList QgsRoundnessAlgorithm::tags() const { ret...
TOOL
0.868148
6.788936
0772b81d-fa1e-4dcc-90ca-135a1c29f9bf
MohammedRaafat1/Code-solutions-of-C-How-to-program-10th-edition
Excercises of chapter 2/2-4.cpp
#include <iostream> using std::cout; using std::cin; using std::endl; int main() { //the program calculates the product of 3 integers int x{ 0 }; int y{ 0 }; int z{ 0 }; int result{ 0 }; cout << "Enter 3 integers :"; cin >> x >> y >> z; result = x * y * z; cout << "the product i...
TOOL
0.979607
3.849536
0b81989b-ecd9-49b1-829a-d9b8b65ed9aa
aaryan-1104/Data-Structure-and-Algorithm-Codes
Algorithm Problems/Sorting/heapSort.cpp
#include <iostream> using namespace std; #include <vector> #include <algorithm> void heapify(vector<int> &v, int i, int n) { int currIdx = i; int left = 2 * i + 1; int right = 2 * i + 2; //? If left is greater than current assign left to currIdx if (left < n && v[left] > v[currIdx]) { ...
ALGO
0.999989
5.152267
64b2691f-2912-48ca-afd0-d46574932e85
vmalepati1/Prosim
Prosim/Source/Classical/Energy.cpp
#include "Energy.h" #include <iterator> #include <math.h> #include "Constants.h" #include "Geometry.h" #include "Utils/IterationTools.h" namespace classical { static const char *s_nonBondedForcesKernelSource = { #include "../../Kernels/NonBondedForces.cl" }; NonBondedEnergyGPUCalculator::NonBondedEnergyGPUCalc...
ALGO
0.980539
5.844643
d64081c0-72f9-45b0-9309-8ff6669c2895
Gleddson/Resolucao-Numerica-de-EDO
Odeint/WCH_XYZ_openmp.cpp
#include <iostream> #include <boost/array.hpp> #include <boost/numeric/odeint.hpp> #include <omp.h> #include <boost/numeric/odeint/external/openmp/openmp.hpp> using namespace boost::numeric::odeint; using namespace std; typedef boost::array< double , 6 > state_type; //typedef runge_kutta4< state_type > rk4; //Parall...
ALGO
0.99995
4.889997
8c9aecb9-873e-4748-a72e-44cefbb49b8b
MIPS/external-opencv3
modules/core/src/convert.cpp
#include "precomp.hpp" #include "opencl_kernels_core.hpp" #ifdef __APPLE__ #undef CV_NEON #define CV_NEON 0 #endif namespace cv { /****************************************************************************************\ * split & merge * \****...
ALGO
0.995479
6.050435
e018ea0d-64f2-48ce-9f94-ff0b9e48717b
yizhizhede/MOEATSD
problem/mop.cpp
#include <string.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include "mop.h" #include "matrix.h" #include "shape.h" #include "problem.h" #define PI 3.14159265358979323846264338327950288419716939937510 #define pi 3.14159265358979323846264338327950288419716939937510 #define NUM_SAMPLE 1.0e+4 // stati...
ALGO
0.999606
5.456397
bc263901-ff18-48c1-a92e-1cc52835b6f6
kminami0/AtCoder
atcoder.jp/abc005/abc005_3/Main.cpp
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) #define all(v) v.begin(), v.end() #define sz(v) v.size() #define INF 1000000000 // aใ‚ˆใ‚Šใ‚‚bใŒๅคงใใ„ใชใ‚‰ใฐaใ‚’bใงๆ›ดๆ–ฐใ™ใ‚‹ // (ๆ›ดๆ–ฐใ•ใ‚ŒใŸใชใ‚‰ใฐt...
ALGO
0.999995
4.872204
1a91e0cb-5c40-4ad1-a730-81fe7aadb48b
axxonite/algorithms
Algorithms/HashTables.cpp
#include "stdafx.h" #include "HashTables.h" #include "BinaryTrees.h" #include <unordered_set> #include <unordered_map> #include <algorithm> #include <stdexcept> using namespace std; // ---------------------------------------------------------- // 13.1 TEST FOR PALINDROMIC PERMUTATIONS bool TestForPalindromicPermutati...
ALGO
0.99923
6.558234
2da84762-0d6b-4882-a1a5-5013864fd93d
SkyFireArchives/SkyFireEMU_433
src/server/shared/Utilities/Util.cpp
#include "Util.h" #include "utf8.h" #ifdef USE_SFMT_FOR_RNG #include "SFMT.h" #else #include "MersenneTwister.h" #endif #include <ace/TSS_T.h> #include <ace/INET_Addr.h> #ifdef USE_SFMT_FOR_RNG typedef ACE_TSS<SFMTRand> SFMTRandTSS; static SFMTRandTSS sfmtRand; int32 irand(int32 min, int32 max) { return int32(sf...
TOOL
0.956155
5.365103
b7730577-eee5-44d3-acfe-053a628a09d5
rainbow-auto/rainbow-codes
Comp/24-07-16 MX/B_1.cpp
// USING TASK0 !!!! #include <iostream> #include <vector> using i64 = unsigned long long; const int maxk = 105; i64 n, k; i64 a[maxk]; std::vector <i64> p; inline void get_p (i64 x) { for (i64 i = 2; i <= x; i++) { if (x % i) { continue; } p.push_back (i); while (x % i == 0) { x /= ...
ALGO
0.999927
3.830041
85d458af-678f-4951-855d-4af2cc147b61
javics2002/MotorEngine
Dependencies/Ogre/src/OgreMain/src/OgreRotationSpline.cpp
#include "OgreStableHeaders.h" #include "OgreRotationalSpline.h" namespace Ogre { //--------------------------------------------------------------------- RotationalSpline::RotationalSpline() : mAutoCalc(true) { } //--------------------------------------------------------------------- R...
ALGO
0.992157
7.385064