uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
a07afd71-8aa5-4f9d-920d-677019e1bd79 | bsh0315/BaekjoonPS | bronze/2609.cpp | // 2609 최소공배수 최대공약수
#include<bits/stdc++.h>
using namespace std;
#define MIN(x,y) x<y?x:y
int main(){
int N1 = 0, N2 = 0;
cin >> N1 >> N2;
int min = MIN(N1, N2);
int result1 = 0, result2 = 0;
for(int i = 1; i<=min; ++i){
if(N1 % i == 0 && N2 % i == 0){
result1 = i;
}
... | ALGO | 0.999955 | 4.593874 |
21c41fe6-4fb4-40cf-bb6e-c042f39a7e5a | yi-changha/pratice | CWorkSpace/cppBasic/94-1-함수포인터.cpp | // Լ
#include <iostream>
using namespace std;
bool compare(int a, int b) {
return a == b;
}
int main() {
bool(*fp)(int, int) = compare; // , int bool return
//fp = compare; // Լ , &compare == compare
bool res = fp(2, 2); // Լ , *fp() == fp()
cout << res << endl;
} | ALGO | 0.983858 | 3.761797 |
e661b859-e3ff-4919-9a0b-f1c6f4de2dfe | jhonnySarmaLegend/Striver-SDE | Day 7 : Linked List & Arrays/6_MaxConsecutiveOnes.cpp | /*
Question Link --> https://leetcode.com/problems/max-consecutive-ones/description/
*/
// T.C. = O(N) , S.C. = O(1)
int findMaxConsecutiveOnes(vector<int>& nums) {
int count=0,maxi=INT_MIN;
for(int i=0;i<nums.size();i++){
if(nums[i]==0)count=0;
else count++;
... | ALGO | 0.999984 | 6.328732 |
f0c5f362-5080-4ec3-8450-6e48c6b2c6d1 | PolytechRICM5/VISU | TP/TP3/Eigen/blas/single.cpp | #define SCALAR float
#define SCALAR_SUFFIX s
#define SCALAR_SUFFIX_UP "S"
#define ISCOMPLEX 0
#include "level1_impl.h"
#include "level1_real_impl.h"
#include "level2_impl.h"
#include "level2_real_impl.h"
#include "level3_impl.h"
float BLASFUNC(sdsdot)(int* n, float* alpha, float* x, int* incx, float* y, in... | TOOL | 0.889193 | 3.381595 |
11431d15-3955-44a4-907d-b679a1f9c0d8 | ishandutta2007/codeforces | u.m.r/normal/653/C.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int>PII;
typedef pair<ll, ll> PLL;
const int MAXN = 1e6 + 10;
const int MM = 1e9 + 7;
int a[MAXN];
vector<int> Q;
vector<PII> P;
int check(int i){
if (i & 1)
return a[i] < a[i+1];
else
return a[i] > a[i+1];
}
int main(){
int... | ALGO | 0.999964 | 3.68746 |
b364e716-7d88-4bc1-a3fa-e04282d94b36 | Shohan07/Problem-Solving | 47_LOJ_1006.cpp |
#include<bits/stdc++.h>
using namespace std;
int main() {
long long int arr[10005], i, caseno=0,cases, n;
cin>>cases;
while(cases--){
cin>>arr[0]>>arr[1]>>arr[2]>>arr[3]>>arr[4]>>arr[5]>>n;
for(i = 6; i <= n; i++){
arr[i]=(arr[i-1]+arr[i-2]+arr[i-3]+arr[i-4]+arr[i-5]+arr[i-6])%... | ALGO | 0.999848 | 4.004207 |
dedff3f9-81b0-455f-958f-cbd4e8c3bc6f | nissyjainy/Competitive-programming-and-DSA-using-Cpp | Love_Babbar/Binary_exponential_iterative.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long int
int main()
{ // recursion approach
int binExpRec(int a, int b)
{
if (b == 0)
{
return 1;
}
int ans = binExpRec(a, b / 2);
if (b % 2 == 0)
{
return (ans * ans) % mod;
... | ALGO | 0.999995 | 5.102275 |
e5c410b9-0cf4-42ee-9be7-7c8397451d48 | amanrahangdale24/100daysofcode | day49/main.cpp | class Solution {
public:
int toTime(std::vector<int>& from, std::vector<int>& to) {
int xDiff = std::abs(from[0] - to[0]);
int yDiff = std::abs(from[1] - to[1]);
return std::max(xDiff, yDiff);
}
int minTimeToVisitAllPoints(std::vector<std::vector<int>>& points) {
in... | ALGO | 0.999589 | 6.054124 |
15c63826-3c7e-4670-a3db-a853b6e24757 | Himanshi1207/DSA_2022 | 2023/Gfg/15Count_the_Substring.cpp | // Given a binary string S consists only of 0s and 1s. The task is to calculate the number of substrings that have more 1s than 0s.
// Example 1:
// Input:
// S = "011"
// Output: 4
// Explanation: There are 4 substring which
// has more 1s than 0s. i.e "011","1","11" and "1"
// Example 2:
// Input:
// S = "0000"
/... | ALGO | 0.999962 | 5.677021 |
432fc4b0-2856-4221-b896-99e1f6fbab60 | paoli7612/algorithms | Sort/Merge sort/main.cpp | #include <iostream>
using namespace std;
#define N 10
void print(int *array, const int start, const int end){
for (int i=start; i<=end; i++)
cout << array[i] << "\t";
cout << endl;
}
void merge(int *array, int start, int mid, int end) {
int i, j, k=0, b[N];
i = start;
j = mid+1;
while (i<=mid && j<=e... | ALGO | 0.999967 | 4.923125 |
ab68a3e3-3fbb-4a7d-b724-538e7d7fc529 | karasulh/STL_Tutorial | STL_Tutorial/_52_Rotating/rotate.cpp | #include <iostream>
#include <algorithm>
#include <iterator>
#include <vector>
using namespace std;
int main(){
vector<int> i {0,1,2,3,4,5,6,7};
for_each(begin(i),end(i),[](const auto& i){cout<<i<<" ";});
cout<<"\n";
//left rotate 2 times
rotate(begin(i),begin(i)+2,end(i)); //begin+2 => new fir... | ALGO | 0.998958 | 3.615642 |
f0103752-8459-4a87-a516-7bec7d1d4acf | ishandutta2007/codeforces | vercingetorix/normal/1150/B.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <ctype.h>
#include <deque>
#include <cstring>
#include <set>
#include <bitset>
#include <map>
#include <chrono>
#include <random>
#include <unordered_map>
#include <stdio.h>
using namespace std;
typedef long long ll;
typedef long do... | ALGO | 0.999979 | 3.836756 |
36b2cb47-53c8-4883-8426-8a066ddb107b | raincross7/code-similarity | codes/train_code/problem266/problem266_30.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cctype>
#de... | ALGO | 0.999991 | 3.796151 |
87fc44a4-372c-4bc6-b002-68d0fc0aec16 | jaforsadako/DSA | array sorting with selectiojn method.cpp | #include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int arr[n];
for(int i=0;i<n;i++)
{
cin>>arr[i];
}
for(int i=0;i<n-1;i++)
{
for(int j=i+1;j<n;j++)
{
if(arr[j]<arr[i])
{
int temp=arr[j];
arr[j]=arr[i];
... | ALGO | 0.999973 | 3.830249 |
3b103600-4d20-4714-b81b-fb2b23653501 | ping-72/DSA-Sheet-Algozenith | Backtracking_Prob1.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define LD long double
const int N = 100010;
int inf = 1e9;
int mod = 1e9 + 7;
vector<int> arr;
int n,k;
vector<int> sol;
void rec(int level){
//base Case
if(level == n){
if(sol.size() ==k){
f... | ALGO | 0.999944 | 4.507471 |
75bd4fdd-0abf-40d1-8d43-8891fb4e85d7 | dkp116/Quick-Algortithm-Pricing-BarrierOptions | Option.cpp | //Option.cpp
#include "Option.h"
#include <cmath>
#include <random>
#include <iostream>
#include <cassert>
#include <iomanip>
#include "Random_Generator.h"
#include "trapezium.h"
double DownAndOut::evaluate_gi(MJD stock, double a, double b, double t, double T1, double T2) { //Density of Crossing for the first tim... | ALGO | 0.999408 | 6.93356 |
58604025-f22d-482b-a78d-2d419cf0e1ff | brandoni27/CPlusPlus-ClassPrograms | P17_CoinConversion.cpp | //Brandon Washington
#include <iostream>
using namespace std;
int main(){
int q,d,n,p,total;
cout << "Please enter the total: ";
cin >> total;
q = total / 25;
if(q > 0){
cout << "You have " << q << " quarters. " << q*25 <<" cents in total.";
total -= q*25;
}
d = to... | ALGO | 0.990874 | 4.116593 |
9aa87d21-9948-413a-a021-fc16d9e956bc | nxp-imx/arm-computelibrary-imx | src/runtime/CPP/functions/CPPDetectionOutputLayer.cpp | #include "arm_compute/runtime/CPP/functions/CPPDetectionOutputLayer.h"
#include "arm_compute/core/Error.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/Validate.h"
#include "src/common/utils/Log.h"
#include "src/core/helpers/AutoConfiguration.h"
#include <list>
namespace arm_compute
{
namespace
... | ALGO | 0.995238 | 7.648834 |
4ce5e4a6-92ab-458a-b777-173d670b0f88 | aminjonshermatov/leetcode | algorithms/DesignCircularQueue/DesignCircularQueue.cpp | #include "bits/stdc++.h"
using namespace std;
class MyCircularQueue {
vector<int> _store;
int l, r, k, len;
public:
MyCircularQueue(int k_) : k{k_}, l{0}, r{-1}, len{0} {
_store.resize(k);
}
bool enQueue(int value) {
if (!isFull()) {
r = (r + 1) % k;
_stor... | ALGO | 0.999301 | 5.353804 |
a60e53c6-bd68-4954-afac-374e0560e7cd | tgrants/programming-problem-set-solutions | leetcode/subrectangle-querries.cpp | #include <vector>
class SubrectangleQueries {
private:
std::vector<std::vector<int>> rectangle;
public:
SubrectangleQueries(std::vector<std::vector<int>>& rectangle) {
this -> rectangle = rectangle;
}
void updateSubrectangle(int row1, int col1, int row2, int col2, int newValue) {
for (int i = row1; i <= row2... | ALGO | 0.99267 | 5.972327 |
d6916528-411a-46e7-b528-f5052eafe428 | ishandutta2007/codeforces | enkognit/normal/1099/F.cpp | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fi first
#define fr front()
#define se second
#define pll pair<ll,ll>
using namespace std;
const ll MOD=1000000007;
ll n, m, i, j, ans, Q, k, l, dp[300001], a[300001], w[300001];
string s;
ll d[8000001], g[8000001];
bool ... | ALGO | 0.99999 | 3.516723 |
95b07bac-e9f7-4b26-bac8-96dc1edf8c54 | coin-or/CppAD | test_more/general/ode_err_control.cpp | # include <cstddef> // for size_t
# include <cmath> // for exp
# include <cppad/utility/ode_err_control.hpp> // CppAD::OdeErrControl
# include <cppad/utility/near_equal.hpp> // CppAD::NearEqual
# include <cppad/utility/vector.hpp> // CppAD::vector
# include <cppa... | TEST | 0.988015 | 7.016062 |
4c100cbb-e822-49ac-ab1f-c268b445b395 | hikarimusic/Codeforces | 0466C_Number_of_Ways.cpp | #include <bits/stdc++.h>
using namespace std ;
#define ll long long
#define MAXN 500005
ll n, s[MAXN] ;
int main() {
scanf("%lld",&n) ;
ll a ;
for (int i=1;i<=n;++i) {
scanf("%lld",&a) ;
s[i]=s[i-1]+a ;
}
if (s[n]%3!=0) printf("%d",0) ;
else {
ll q1=s[n]/3 ,q2=s[n]*2/3 ... | ALGO | 0.999979 | 3.488122 |
7086d7b2-538b-41e4-898d-d197e61314e0 | JoydeepMallick/CODECHEF | 22.11.23 Starters 109 Division 3 (Rated)/minxor.cpp | /*
_________________________
| Written by silent_Joy |
---------~u~---------
*/
#include"bits/stdc++.h"
#pragma GCC optimize("O3,unroll-loops")
// #pragma GCC target("bmi,bmi2,lzcnt,popcnt")
// #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") //intel pentium porcessors released post 2020 support avx2, un... | ALGO | 0.999982 | 5.180882 |
b107345e-2dec-4e68-ab1c-c0779116f8ba | lmns1314HuHu/ACM_record | 基础/HDU_1021_基础_循环节.cpp | #include<stdio.h>
int main(){
int n;
while(scanf("%d",&n)!=EOF){
if((n-2)%4!=0)
printf("no\n");
else
printf("yes\n");
}
return 0;
} | ALGO | 0.999679 | 3.269167 |
d5f9eb5c-d585-452a-b727-b6778ab80e6a | Supermjork/IEEEXtreme | Codeforces/Sheet 2/N-histogram.cpp | #include <iostream>
using namespace std;
int main()
{
char s;
int n, x_i;
cin >> s;
cin >> n;
for (int i = 0; i < n; i++)
{
cin >> x_i;
for (int j = 0; j < x_i; j++)
{
cout << s;
}
cout << endl;
}
return 0;
}
| ALGO | 0.996011 | 3.281588 |
3c08e065-87cc-4c2d-a881-cdbedf0f9492 | vderic/gpdb6.24.3 | src/backend/gporca/libnaucrates/src/statistics/CStatsPredDisj.cpp | #include "naucrates/statistics/CStatsPredDisj.h"
#include "naucrates/statistics/CStatisticsUtils.h"
using namespace gpnaucrates;
using namespace gpopt;
//---------------------------------------------------------------------------
// @function:
// CStatsPrefDisj::CStatsPrefDisj
//
// @doc:
// Ctor
//
//------------... | ALGO | 0.951976 | 6.663305 |
fc9b125d-470f-49b9-8eb7-070d62c650b4 | sarvex/leetcode-kotlin | solution/2500-2599/2588.Count the Number of Beautiful Subarrays/Solution.cpp | class Solution {
public:
long long beautifulSubarrays(vector<int>& nums) {
unordered_map<int, int> cnt{{0, 1}};
long long ans = 0;
int mask = 0;
for (int x : nums) {
mask ^= x;
ans += cnt[mask];
++cnt[mask];
}
return ans;
}
}; | ALGO | 0.999985 | 5.794613 |
bfa53e9e-4235-4c9a-8d45-50ec4aa43f1e | sarvex/leetcode-free-pascal | solution/1500-1599/1574.Shortest Subarray to be Removed to Make Array Sorted/Solution.cpp | class Solution {
public:
int findLengthOfShortestSubarray(vector<int>& arr) {
int n = arr.size();
int i = 0, j = n - 1;
while (i + 1 < n && arr[i] <= arr[i + 1]) {
++i;
}
while (j - 1 >= 0 && arr[j - 1] <= arr[j]) {
--j;
}
if (i >= j) {... | ALGO | 0.999996 | 5.683673 |
9d08d2c6-82b0-4b93-b97a-fad0bc075d1f | Saber7X/DaiMaDaQuan | B. AquaMoon and Stolen String.cpp | #include<bits/stdc++.h>
using namespace std;
const int N = 10005;
int main()
{
int T; scanf("%d", &T);
while(T -- )
{
int n, m;
scanf("%d%d", &n, &m);
getchar();
char g[n + 5][m + 5];
char g2[n + 5][m + 5];
for(int i = 1; i <= n; i ++ )
{
for(int j = 1; j <= m; j ++)
{
//scanf("%c", &g[i][j])... | ALGO | 0.999773 | 3.157705 |
a476be84-17af-4cc2-ab57-41090f40c72e | redeff/cmp | icpc/2017-tap/C/la.cpp | #include <bits/stdc++.h>
#define forn(i, n) for(int i = 0; i < n; ++i)
#define forr(i, n) for(int i = n-1; i >= 0; --i)
using namespace std;
typedef long long int ll;
ll mod;
vector<ll> roots;
bool is_prime(ll p) {
if(p < 2) return false;
for(ll i = 2; i * i <= p; ++i) if(p % i == 0) return false;
return true;
}
... | ALGO | 0.999959 | 3.500765 |
cf68f4f7-8952-4bde-ae67-70e0236d7fa9 | abdoaligomaa/Assuit_sheets | sheet7 recursion/H_Inverted_Pyramid.cpp | #include <iostream>
using namespace std;
// int counter = 0;
void print_row(int row, int n)
{
// base case
if (row == 0)
{
return;
}
// print the spaces before the row
for (size_t i = 0; i < n - row; i++)
{
cout << " ";
}
for (size_t i = 0; i < 2 * (row - 1) + 1; i+... | ALGO | 0.999961 | 4.449562 |
4a0722ce-cefe-4247-9ecd-13d065745c47 | IshaanGaba97/LeetCode-Solutions | 0837-new-21-game/0837-new-21-game.cpp | class Solution {
public:
double new21Game(int N, int K, int maxPts) {
// Corner cases
if (K == 0) return 1.0;
if (N >= K-1 + maxPts) return 1.0;
// dp[i] is the probability of getting point i.
vector<double> dp(N + 1, 0.0);
double probability = 0.0; // dp of N or le... | ALGO | 0.999926 | 4.971503 |
e6d083d6-3308-46e1-9116-f5745736084a | wx-chevalier/algorithm-examples | 剑指 Offer/cpp/67_StringToInt/StringToInt.cpp | //==================================================================
// ָOfferԹپͱ⡷
// ߣκ
//==================================================================
// 67ַת
// ĿдһStrToIntʵְַתܡȻ
// ʹatoiƵĿ⺯
#include <cstdio>
long long StrToIntCore(const char* str, bool minus);
enum Status {kValid = 0, kInvalid};
int g_nSta... | ALGO | 0.997413 | 4.016382 |
af760502-92a4-48c8-ba87-966047f1e792 | alexandraback/datacollection | solutions_5753053697277952_1/C++/majk/A.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <sstream>
using namespace std;
int main(int,char**) {
int T;
cin >> T;
for (int t = 1; t <= T; ++t) {
int N;
cin >> N;
cout << "Case #" << t << ":";
int P[N];
int m = 0;
int n = 10000;
... | ALGO | 0.999336 | 4.525043 |
f56d0f43-ab03-465d-99a6-0d7ced3cbdb4 | yogesh-gophane/CPP-Code | CP /ifparagram.cpp | #include<iostream>
#include<vector>
using namespace std;
// Function Defination
bool checkIfPangram(string sentence) {
int arr[26] = {0};
for (auto c : sentence){
int x = c - 'a' ;
arr[x] ++;
}
for (auto item : arr){
if(item == 0){
... | ALGO | 0.998629 | 5.325978 |
a0f4b762-bbca-4611-863b-7911a5234a9e | Indreshkashyap/cpp | 20.cpp | #include <iostream>
using namespace std;
#define PI 3.14
class Shape {
public:
virtual void area()=0;
virtual void perimeter()=0;
};
class ractangle:public Shape {
float w;
float l;
public:
ractangle(float x, float y) {
w = x;
l = y;
}
void area() {
cout<<"Area of Ractangle is : "<<w*l<<endl;
}
vo... | ALGO | 0.958227 | 4.130427 |
83e92772-05e6-49fb-bb55-c98e0ac3b3f8 | eren-aydemir/Path-Planning | src/Eigen-3.3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_maxnorm.cpp | #include <iostream>
#include <Eigen/Dense>
using namespace std;
using namespace Eigen;
int main()
{
MatrixXf mat(2,4);
mat << 1, 2, 6, 9,
3, 1, 7, 2;
MatrixXf::Index maxIndex;
float maxNorm = mat.colwise().sum().maxCoeff(&maxIndex);
std::cout << "Maximum sum at position " << maxIndex << std:... | ALGO | 0.999774 | 4.220459 |
8f3ebfeb-5dbc-416e-9b95-a63daf9beea2 | tilera/test-suite | MultiSource/Benchmarks/7zip/CPP/Windows/FileFind.cpp | // Windows/FileFind.cpp
#include "StdAfx.h"
#include "FileFind.h"
#include "../Common/StringConvert.h"
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#ifdef ENV_HAVE_LSTAT
extern "C"
{
int global_use_lstat=1; // default behaviour : p7zip stores symlinks instead of dumping the files they point to
}
#e... | TOOL | 0.960266 | 6.133497 |
10a5592a-95be-4f57-9c9a-8cf9601a07ea | Zlin0509/Zlin_ACM | _CF/CONTEST/1500-1999/1929/C.cpp | #include<bits/stdc++.h>
using namespace std;
void solve()
{
long long k,x,a,all=1;
cin>>k>>x>>a;
for(int i=1,p;i<=x;i++)
{
all+=all/(k-1)+1;
if(all>a)
{
cout<<"NO"<<endl;
return;
}
}
all<=a?cout<<"YES"<<endl:cout<<"NO"<<endl;
}
int main()... | ALGO | 0.999761 | 3.963589 |
f7fe9ac3-5209-4b38-afa5-486b4926960e | ihaagrawal/GFG-Problem-Of-The-Day | Day-0110: Minimize the Heights II.cpp | // Minimize the Heights II (MEDIUM)
// https://www.geeksforgeeks.org/problems/minimize-the-heights3351/1
class Solution {
public:
int getMinDiff(vector<int> &arr, int k) {
int n = arr.size();
sort(arr.begin(),arr.end());
int diff=arr[n-1]-arr[0];
int maxi,mini;
for... | ALGO | 0.999936 | 5.035826 |
40ba054c-07db-4862-b467-05b4a7171b65 | iRevolutionDev/star-engine | src/utils/string_utils.cpp | #include "star/core/common.hpp"
#include <star/utils/string_utils.hpp>
namespace star::utils {
std::string string_utils::to_lower(std::string_view sv) noexcept {
std::string s(sv);
std::ranges::transform(s, s.begin(),
[](const unsigned char c) { return std::tolower(c); }
);
return s;
... | TOOL | 0.944442 | 7.074181 |
b45434fa-09fa-43ac-abd8-36ca534476f8 | shangwp/kalman_fusion | opencv_test/src/arucowaican.cpp | #include"stdafx.h"
#include<Windows.h>
#include <iostream>
#include <opencv2/eigen3/Eigen/Core>
#include <opencv2/eigen3/Eigen/Dense>
#include <opencv2/opencv.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/core/eigen.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/highgui/highgui.hpp>
#incl... | ALGO | 0.99529 | 3.289046 |
7493c833-3aad-409d-ac0f-4400e0b384ca | OpenDigitalTwin-Dev/FENGSim | toolkit/Geometry/cgal/examples/Minkowski_sum_3/cube_offset.cpp | #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Nef_polyhedron_3.h>
#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
#include <CGAL/minkowski_sum_3.h>
#include <fstream>
#include <iostream>
typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
typedef CGAL::Nef_polyhedron_3<Kerne... | TOOL | 0.976521 | 4.289102 |
2a8c9392-8562-4093-b3dc-901b5bfbfae7 | ixray-team/xray-vss-archive | Plugins/MAXEditorExport/LzHuf.cpp | // LzHuf.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#pragma hdrstop
#include <io.h>
#include <fcntl.h>
#include <sys\stat.h>
#define MODULE
//typedef unsigned char BYTE;
unsigned textsize = 0, codesize = 0;
char wterr[] = "Can't write.";
/********** LZSS compression ******... | TOOL | 0.943269 | 3.115748 |
aa44e2db-96f8-416c-91da-00956fc5d14b | jcarlosadm/tutorials | c_cpp/cplusplus/12/pointers03.cpp | #include <iostream>
using namespace std;
void print(const int *array, int size)
{
for(int i = 0 ; i < size ; i++)
{
cout<<array[i]<<endl;
}
}
int main()
{
int my_array[4]={1,2,3,4};
print(my_array,sizeof(my_array)/sizeof(int));
return 0;
}
| TOOL | 0.929663 | 3.76194 |
729677c8-2843-4d8f-a4d2-f8e685a3abac | slack2450/csgo-dma-overlay | dma/boost_1_69_0/libs/multi_index/example/ip_allocator.cpp | #if !defined(NDEBUG)
#define BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING
#define BOOST_MULTI_INDEX_ENABLE_SAFE_MODE
#endif
#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
#include <algorithm>
#include <boost/interprocess/allocators/allocator.hpp>
#include <boost/interprocess/containers/s... | TOOL | 0.986616 | 5.835283 |
bac8ab3d-555f-4f29-8b98-2e7377e0ca6f | RomanToropov/HZ | HZ/Source.cpp | #include<iostream>
using namespace std;
using std::cout;
using std::cin;
using std::endl;
#define tab "\t"
class Element
{
int Data;
Element* pNext;
Element* pPrev;
static int count;
public:
Element(int Data, Element* pNext = nullptr, Element* pPrev = nullptr)
{
this->Data = Data;
this->pNext = pNext;
thi... | ALGO | 0.998179 | 3.644164 |
315197b4-a8cd-4007-801a-5ecd38431dd1 | PaukIsUha/optimizing_formating_code | predictions/submissions-aizu-cot-gpt4/Codenet/p02272/734884683/response_6.cpp | #include <cstdint>
#include <iostream>
#include <vector>
using namespace std;
static void inputArray(uint32_t A[], int num) {
for (int i = 0; i < num; i++) {
cin >> A[i];
}
}
static void printArray(uint32_t A[], int num) {
if (num > 0) {
cout << A[0];
for (int i = 1; i < num; i++) {
cout << " ... | ALGO | 0.99983 | 5.063278 |
aa8294f5-276c-46a0-9095-22ddc0a1d38a | Gaurav-Tewatia/Leetcode | Reverse First K elements of Queue - GFG/reverse-first-k-elements-of-queue.cpp | //{ Driver Code Starts
// Initial Template for C++
#include <bits/stdc++.h>
using namespace std;
queue<int> modifyQueue(queue<int> q, int k);
int main() {
int t;
cin >> t;
while (t-- > 0) {
int n, k;
cin >> n >> k;
queue<int> q;
while (n-- > 0) {
int a;
... | ALGO | 0.999797 | 5.450098 |
288ac7a3-a86c-4ad2-b30a-b30155be1011 | kushal2060/Design-and-analysis-of-algorithms | 4queen.cpp | #include <iostream>
using namespace std;
#define N 4
void printSolution(int board[N][N]) {
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++)
cout << board[i][j] << " ";
cout << endl;
}
}
bool isSafe(int board[N][N], int row, int col) {
for (int i = 0; i < col; i++)
... | ALGO | 0.99986 | 4.621469 |
b4509031-6265-46e5-973f-b8f04de77a67 | Kunalkhuteta/leetcode | 1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array/1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array.cpp | class Solution {
public:
int minNumberOperations(vector<int>& target) {
int ans=target.front();
for(int i=1;i<target.size();i++)
{
if(target[i]>target[i-1])
{
ans+=target[i]-target[i-1];
}
}
return ans;
}
}; | ALGO | 0.999989 | 5.868265 |
1c698cad-d738-430c-857e-8ece3adcbb12 | ahmeddiab1234/LeetCode-Solving | LeetCode_75/Hash_Map -Set/2352.Equal_Row_and_Column_Pairs.cpp | // https://leetcode.com/problems/equal-row-and-column-pairs/description/?envType=study-plan-v2&envId=leetcode-75
#include<iostream>
#include<vector>
#include<unordered_map>
#include<unordered_set>
#include<map>
#include<set>
#include<algorithm>
using namespace std;
class Solution
{
public:
int equalPairs(vector<... | ALGO | 0.999909 | 5.958245 |
5521f618-5a91-460c-8aa2-b9a4937967c4 | ishandutta2007/codeforces | ikatanic/normal/452/A.cpp | #include <algorithm>
#include <cassert>
#include <cstring>
#include <iostream>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define TRACE(x) cout << #x << " = " << x << endl
#define _ << " _ " <<
typedef long long llint;
vector<string> v = {"vaporeon", "jo... | ALGO | 0.999438 | 3.572065 |
b107f4e7-a0f8-4cee-bc4f-281cd01fd977 | AndreiDaniDev/Informatica | Order.cpp | #include <fstream>
using namespace std;
ifstream in("order.in");
ofstream out("order.out");
///https://infoarena.ro/problema/order
///https://infoarena.ro/job_detail/3239802
int n, A[30002 << 2];
void build(int nod, int st, int dr){
if(st == dr){
A[nod] = 1;
}else{
int mij = (st + dr) >> 1;
... | ALGO | 0.999984 | 3.563589 |
d83d8099-499f-4d21-b784-282ed1dda424 | jeankevinl137/JeankevinProg | Revision/programa1 (3).cpp |
#include <iostream>
#include <cstdlib>
bool esPrimo(int n);
int sumaPrimos(int limite);
int main(int argc, char* argv[]) {
if (argc != 2) {
std::cerr << "Uso: " << argv[0] << " <numero>" << std::endl;
return 1;
}
int n = std::stoi(argv[1]);
std::cout << sumaPrimos(n) << std::endl;
... | ALGO | 0.999642 | 4.942588 |
c0f6cfe8-9f3b-405f-99e7-2662323dd7a3 | fedesassone/1c-2023-metodos-tp2 | src/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_maxnorm.cpp | #include <iostream>
#include <Eigen/Dense>
int main()
{
Eigen::MatrixXf mat(2,4);
mat << 1, 2, 6, 9,
3, 1, 7, 2;
Eigen::Index maxIndex;
float maxNorm = mat.colwise().sum().maxCoeff(&maxIndex);
std::cout << "Maximum sum at position " << maxIndex << std::endl;
std::cout << "The correspondin... | ALGO | 0.99983 | 4.271511 |
111a77c3-09ec-437b-9191-a7fb5d6247d5 | prince41773/Design-Of-Language-Processor | Pract-7/first-and-follow.cpp |
#include <bits/stdc++.h>
using namespace std;
void computeFirst(const map<char, vector<string>>& grammar, map<char, set<char>>& first, char symbol);
void computeFollow(const map<char, vector<string>>& grammar, map<char, set<char>>& first, map<char, set<char>>& follow, char symbol);
void computeFirst(const map<char, ve... | ALGO | 0.999482 | 4.979658 |
9a6ca212-8150-4e4e-8956-f349b577d669 | sidtechnical/hackerrank | math/find-digits/cpp/code.cpp |
#include <iostream>
#include <string>
using namespace std;
int main() {
int t;
cin >> t;
// Load each individual testcase
while (t--) {
long n;
cin >> n;
// Create an array to hold counts from 0 to 9 (even though we don't
// actually use zero) and initialize all the cells to z... | ALGO | 0.998709 | 5.535652 |
37e31548-57ba-4c85-8b59-b081651ec717 | MohdOves/DSA-Vault | week2/18rowSum.cpp | #include<iostream>
using namespace std;
// to print row wise sum
void printRowSum(int arr[][3], int row,int col){
cout <<" printing Row Sum -> "<<endl;
for(int row = 0;row<3;row++){
int sum = 0;
for(int col = 0;col<3;col++){
sum += arr[row][col];
}
cout << sum <<" ... | ALGO | 0.999788 | 4.393684 |
f4870727-8e3f-4c35-9c99-a5fd31c85c0a | Huste6/Thuat_toan_ung_dung | graph/duong_di_tu_s_sang_t_dfs.cpp | #include<bits/stdc++.h>
using namespace std;
vector<int> ke[1001];
bool visited[1001];
int n,m,s,t;
int parent[1001];
void dfs(int u){
visited[u]=true;
for(int x:ke[u]){
if(!visited[x]){
parent[x]=u;
dfs(x);
}
}
}
void inp(){
cin>>n>>m>>s>>t;
for(int i=1;i<... | ALGO | 0.999988 | 4.016407 |
6ed32a7e-a9ee-4ce5-aff1-c812f4ca7af6 | JY1Lnz/AKOJ | 2017.cpp | #include <iostream>
#include <cstdio>
using namespace std;
const int INF = 99999;
int map[110][110];
int main()
{
int n,m,l,r,len;
scanf("%d%d",&n,&m);
for (int i = 1;i<=n;i++)
for (int j = 1;j<=n;j++)
if (i == j)
map[i][j] = 0;
else
map[i][j... | ALGO | 0.999863 | 3.030369 |
43293e20-aa86-462d-a24d-b9ce3bd20b54 | Moein-Karami/OlympiadCodes | Codeforces/B. Fedor and New Game/main.cpp | ///DARK PROGRAMMER
#include <iostream>
using namespace std;
int a[3000];
int main()
{
int n,m,k;
cin>>n>>m>>k;
int ans=0;
int k1=0;
for(int i=1;i<=m+1;i++)
cin>>a[i];
for(int i=1;i<=m;i++)
{
for(int t=0;t<n;t++)
{
if((((a[i])^(1<<t))>a[i])&&(((a[... | ALGO | 0.99989 | 3.895305 |
4d600ef9-7c52-4b29-946e-2bca1cab43d7 | ayushb2489/Placement-Classess-G2 | 13 JUL/singleNumber3.cpp | class Solution {
public:
int singleNumber(vector<int>& nums) {
int n = nums.size();
int sNumber = 0;
for (int i = 0; i < n; i++)
sNumber ^= nums[i];
return sNumber;
}
}; | ALGO | 0.999603 | 5.621821 |
be0a54da-f3ea-4763-aeb5-18be6caef7e1 | Prabj0t/leetcode-and-gfg | merge-two-sorted-lists/merge-two-sorted-lists.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:
ListNode* mergeTwoLis... | ALGO | 0.999925 | 5.628316 |
5ca4d29f-4b1b-4b71-be09-b411e02b106c | yaboyd1/IntroductionToProgramming | 24/sets.cpp | #include <set>
using std::set;
#include <iostream>
using std::cin;
using std::cout;
/* TODO: practice with sets. As a very simple example, try to rewrite
* `sort -u` with sets (just read all lines into a set, and then print
* it back out!) */
int main()
{
set<int> S;
int x;
while (cin >> x) {
S.insert(x);
... | ALGO | 0.978428 | 4.523087 |
d13069d6-585f-4b97-9352-1252a7df1f11 | chrisdembia/coin | Bonmin/Osi/examples/opbdp_solve.cpp | #include "OsiConfig.h"
#include <cstdlib>
#include <cstdio>
#include <cassert>
#include <cmath>
#include <cfloat>
#include <string>
#include <iostream>
#include "CoinPragma.hpp"
#include "CoinHelperFunctions.hpp"
#include "CoinPackedVector.hpp"
#include "CoinPackedMatrix.hpp"
#include "CoinTime.hpp"
#include "opbdp_... | ALGO | 0.999796 | 4.850057 |
d38b32f9-8a0c-4b9d-b4c9-461e0e95978b | crystax/android-vendor-boost-1-62-0 | libs/compute/example/black_scholes.cpp | #include <cstdlib>
#include <iostream>
#include <boost/compute/command_queue.hpp>
#include <boost/compute/system.hpp>
#include <boost/compute/algorithm/copy_n.hpp>
#include <boost/compute/container/vector.hpp>
#include <boost/compute/utility/source.hpp>
namespace compute = boost::compute;
// return a random float be... | ALGO | 0.995987 | 6.934232 |
36b3ee48-d019-4a8e-9bd0-6a998deb4618 | NataschaPalhares/Beecrowd-Solutions-cpp | Contest/Contest de Natal 2021/A.cpp | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
char t[n][40];
int v[n];
int total[10] = {};
int x = 1, p = 0;
for (int i=0; i<n; i++)
cin >> t[i] >> v[i];
while (x < 11) {
for (int i=0; i<n; i++) {
if (v[i] == x)
total[p] += 1;
}
x++;
p++;
}
char cat[10][20] = {"B... | ALGO | 0.998122 | 3.82129 |
4a2abbcc-b931-4054-9358-d77df33a4ec3 | golemnik/Cpp-Neuron-net | Matrix.cpp | #include <iostream>
#include <vector>
#include "Matrix_Header.h"
using namespace std;
Matrix::Matrix() {
vector <vector <double> > matrix_data[1][1];
}
void Matrix::set_matrix(vector <vector <double> > matrix_data) {
matrix = matrix_data;
}
vector <vector <double> > Matrix::get_matrix() {
return matrix... | TOOL | 0.858138 | 3.654279 |
7ce569a8-c739-4895-beb9-09b9f4118e4c | BHAVISHAYA/GFG-Question-Solution | Level of a Node in Binary Tree - GFG/level-of-a-node-in-binary-tree.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
#define MAX_HEIGHT 100000
// Tree Node
struct Node
{
int data;
Node* left;
Node* right;
};
// Utility function to create a new Tree Node
Node* newNode(int val)
{
Node* temp = new Node;
temp->data = val;
temp->left = NULL;
temp->... | ALGO | 0.999912 | 6.176715 |
c43e3930-9af3-4006-8ef3-10560cae53af | KrishnoMD305/Leetcode | 205. Isomorphic Strings/Solution.cpp | class Solution {
public:
bool isIsomorphic(string s, string t) {
if(s.size()!=t.size()){
return false;
}
unordered_map<char,char> st;
unordered_map<char,char> ts;
for(int i=0; i<s.size(); i++){
char c1 = s[i];
char c2 = t[i];
if... | ALGO | 0.999981 | 6.246347 |
3d0635aa-9673-4f89-9efe-fff41c31fd9e | otavioon/COLA-2022-Tools | datasets/src/optz/poj_s/1/43_301.cpp | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
using namespace std;
int reverse(int);
int main()
{
int i,a[6];
for(i=0;i<=5;i++)
{
cin>>a[i];
}
for(i=0;i<=5;i++)
{
a[i]=reverse(a[i]);
cout<<a[i]<<endl;
}
return 0;
}
int reverse(int num)
{
int sum=0,i;
... | ALGO | 0.999556 | 3.729922 |
92ef9b62-9ef6-47ea-ac38-2c443a1f6d9d | shreyansh-gupta-hub/LeetCode | 0141-linked-list-cycle/0141-linked-list-cycle.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
bool hasCycle(ListNode *head) {
ListNode* slow = head;
ListNode* fast = head;
while(fast != NULL && fast->ne... | ALGO | 0.999732 | 5.289637 |
e9a00479-bcfd-4a1c-8e75-8857de8bf56a | Aishwarya7902/DSA-PREP | GRAPH/Kahn's Algorithm(Topological Sort using BFS).cpp | PROBLEM:https://practice.geeksforgeeks.org/problems/topological-sort/1?utm_source=gfg&utm_medium=article&utm_campaign=bottom_sticky_on_article
VIDEO:https://www.youtube.com/watch?v=uVl4ftleTes&list=PLpIkg8OmuX-LZB9jYzbbZchk277H5CbdY&index=8
/*
TC:same as bfs
SC:same as bfs
*/
class Solution
{
public:
//Function... | ALGO | 0.999992 | 5.859811 |
d82a0b06-04d4-48f2-83f5-cf8945cb16ee | evgeniyfeder/itmo | algo/labs/dfs/points.cpp | #include <iostream>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
std::string file_name = "points";
typedef std::pair<uint32_t, int32_t> pair;
std::vector<std::vector<pair>> g;
std::vector<bool> used;
std::vector<uint32_t> d, up, result;
uint32_t dfs(uint32_t cur_vert, int32... | ALGO | 0.999975 | 4.550282 |
351bd0a7-bbcc-413f-92c1-103d2207c47e | AniketAgra/CPP | pattern12.cpp | #include<iostream>
using namespace std;
int main(){
int row = 1;
int n;
cin>>n;
while(row<=n){
int col=1;
while(col<=row){
cout<<row-col+1;
col=col+1;
}
row=row+1;
cout<<endl;
}
}
// output:
// 1
// 12
// 123
// 1234 | ALGO | 0.999971 | 3.943167 |
e08e3afe-13d7-43bf-a52c-3743cb540858 | SideWang/lrj | aoapc-bac2nd-master/ch5/5-2.cpp | #include<iostream>
#include<algorithm>
using namespace std;
int main() {
long long a, b;
while(cin >> a >> b) {
cout << min(a,b) << "\n";
}
return 0;
}
| ALGO | 0.999805 | 4.092854 |
bf3c87b1-da8f-4183-9c51-cba4d40afe4d | polyak01/secondTask | polar_test_2/polar_test_2.cpp | // polar_test_2.cpp : Defines the entry point for the console application.
// DEVELOPED BY Polyakov Yaroslav AS TEST
// Program implements nearest palindrome search for integer value
#include "stdafx.h"
#include <string>
#include <vector>
#include <cmath>
#include <iostream>
#include <conio.h>
enum NUMBER_TYPE { EVEN... | ALGO | 0.99891 | 5.404958 |
a745d192-7573-4ea6-8443-ddc044d139ee | ismaeelbashir03/AOC24 | 3/main.cpp | #include <cstdlib>
#include <iostream>
#include <fstream>
#include <regex>
#include <vector>
std::string readFile() {
std::ifstream file("data.txt");
std::string bytes((std::istreambuf_iterator<char>(file)),
std::istreambuf_iterator<char>());
return bytes;
}
int main() {
std::str... | ALGO | 0.928437 | 4.968099 |
8297b4f6-cbc6-4ce3-9f4e-7d1f594c407a | lianhuaren/cocoa | rtmp01/live555-ios-master/src/live555/liveMedia/uLawAudioFilter.cpp | #include "uLawAudioFilter.hh"
////////// 16-bit PCM (in various byte orders) -> 8-bit u-Law //////////
uLawFromPCMAudioSource* uLawFromPCMAudioSource
::createNew(UsageEnvironment& env, FramedSource* inputSource, int byteOrdering) {
// "byteOrdering" must be 0, 1, or 2:
if (byteOrdering < 0 || byteOrdering > 2) {
... | TOOL | 0.913485 | 6.319759 |
84e2edf7-c741-4afa-becb-8d11b8030820 | suyu13020027161/BA-ZHOU-SUYU | modules/PX4Firmware/src/lib/tailsitter_recovery/tailsitter_recovery.cpp | /**
* @file tailsitter_recovery.cpp
*/
#include "tailsitter_recovery.h"
#include <math.h>
TailsitterRecovery::TailsitterRecovery():
_in_recovery_mode(false)
{
_att_p(0) = _att_p(1) = _att_p(2) = 4.0f;
}
TailsitterRecovery::~TailsitterRecovery()
{
}
void TailsitterRecovery::setAttGains(math::Vector<3> &att_p, fl... | ALGO | 0.989839 | 5.755165 |
b1d03782-7c54-4140-9084-513f69cab69d | paramesh014/genode_bionic_first_commit | contrib/bionic-3b7c7405f0cf0133ce44b79a7e9a4772cb103d26/src/lib/bionic/libc/bionic/tdestroy.cpp | #define _SEARCH_PRIVATE
#include <search.h>
#include <stdlib.h>
void tdestroy(void* root, void (*destroy_func)(void*)) {
node_t* root_node = (node_t*) root;
if (root_node == NULL) {
return;
}
if (root_node->llink) {
tdestroy(root_node->llink, destroy_func);
}
if (root_node->rlink) {
tdestroy(ro... | TOOL | 0.979591 | 4.761308 |
4011fd67-c623-4d7d-b0c1-848d96320261 | MuhammadShoaibKalim/100DaysOfDSAchallenge | Day01/100DaysOfDSAchalleng/Practice Question/pre.cpp | #include<iostream>
using namespace std;
int main() {
int number;
cout << "Enter the value of number: ";
cin >> number;
if (number > 1) {
for (int i = 1; i <= number; ++i) {
cout << i << " ";
}
} else {
cout << "The given number is not greater than 1.";
}
... | ALGO | 0.975937 | 3.990749 |
eee45faf-2e34-418c-bcd7-1290c6a46762 | Gopal2003/Codes | Brain Olympic/LB & KK/notes.cpp | #include <iostream>
using namespace std;
int main()
{
int amount, count = 0;
cout << "Enter the amount: " << endl;
cin >> amount;
int option;
cout << "Choose the option to know the number of notes associated with the notes " << endl;
cout << "1. Number of 100 notes " << endl;
cout << "2. Nu... | TOOL | 0.926851 | 4.000648 |
b014d95d-f460-4505-bb85-fe620fe7e0af | Raj-Bapat/usaco | concom/concom.cpp | /*
ID: a2g2gon1
PROG: concom
LANG: C++11
*/
#include <iostream>
#include <fstream>
#include <vector>
#include <cmath>
#include <cstring>
using namespace std;
long long ownagePercent[101][101];
bool used[101];
int N;
int numOfComps;
void findPer(int orig, int comp, int spaces) {
// for (int i = 0; i<spaces; i++... | ALGO | 0.999579 | 3.497705 |
4e874875-4ac2-49eb-aa35-51a77b1b4ef3 | shravan-d/Leetcode | 0102-binary-tree-level-order-traversal/0102-binary-tree-level-order-traversal.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.999925 | 6.053678 |
cc68015b-3b0b-4888-8ec4-3065c9260e5a | sourabmkalliyan/Sorting-Algorithm | bubble-sort.cpp | #include <iostream>
#include <bits/stdc++.h>
#include <array>
void bubble_sort(int arr[], int n) {
for (int i = n-1; i>=0; i--) {
for (int j = 0; j<n; j++) {
if (arr[j] > arr[j+1]) {
int temp = arr[j+1];
arr[j+1] = arr[j];
arr[j] = temp;
... | ALGO | 0.999903 | 5.499286 |
f869beb6-e5b1-4995-a22d-44ed6b5ea26d | PCMSolver/pcmsolver | src/utils/ChargeDistribution.cpp | #include "ChargeDistribution.hpp"
#include <iostream>
#include "Config.hpp"
#include <Eigen/Core>
#include "Molecule.hpp"
namespace pcm {
namespace utils {
Eigen::VectorXd computeNewtonPotential(const GFValue & gf,
const Eigen::Matrix3Xd & grid,
... | ALGO | 0.99425 | 5.847841 |
cca5172c-880c-4c0e-be7e-b6f1e194c061 | mahaoran1997/MemLiner | JDK/src/hotspot/share/services/diagnosticFramework.cpp | #include "precompiled.hpp"
#include "jvm.h"
#include "memory/oopFactory.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/mutexLocker.hpp"
#include "services/diagnosticArgument.hpp"
#include "services/diagnosti... | TOOL | 0.927375 | 7.108613 |
7bffd076-2521-4c1e-8a00-85067eed4c78 | splotchysnow/OurLeetCodeSolutions | 2022/06/19/Stella/Q67_Add_Binary.cpp | #include <iostream>
#include <string>
#include <map>
#include <unordered_map>
#include <stack>
using namespace std;
//Given two binary strings a and b, return their sum as a binary string.
class Solution {
public:
string addBinary(string a, string b) {
string result;
int carry=0;
for(int ... | ALGO | 0.999781 | 6.19134 |
ff682a7a-1750-4e7a-9148-c8982b033a32 | TheProjecter/cors-overlayrouting | CORS/src/utils/utilfunc.cpp | #include "utilfunc.h"
#include <arpa/inet.h>
#include <iostream>
#include <sstream>
using namespace std;
void
split(const string & s, const string & delims, vector<string> & v)
{
v.clear();
string::size_type bi, ei;
bi = s.find_first_not_of(delims);
while (bi != string::npos) {
ei = s.find_first_of(delim... | TOOL | 0.895335 | 4.513062 |
a3c048d4-1a9d-4025-8188-20ed33e24015 | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_7529_16.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, sum = 0;
cin >> N;
for (int i = 1; i <= N; i++) {
for (int j = 0; j <= N; j++) {
int tmp;
cin >> tmp;
if (i == j or (i + j) == (N + 1) or i == (N / 2 + 1) or j == (N / 2 + 1))
sum += tmp;
}
}
cout << sum << end... | ALGO | 0.999846 | 3.696533 |
dfc6289d-fa1f-4fe0-9c40-00317f9c30c8 | AdarshNandanwar/DSA-and-Competitive-Programming | Demux/20.04.04/698.cpp | // https://leetcode.com/problems/partition-to-k-equal-sum-subsets/
// Method 1 (optimization by sorting and without using Map)
class Solution {
public:
void helper(vector<int> nums, int k, int target, int left, vector<int> visited, bool & ans, int start){
if(target < 0){
return;
... | ALGO | 0.999993 | 5.909488 |
12b6f11a-20b8-4103-83cd-c49537ad234d | manoja450/DataCutForMichelelectronAnalysis | MichelMuonWithSpectrumDELt.cpp | //Muon and Michel Electron Analysis Code
//This code comprehensively analyses cosmic muon events and their subsequent Michel electron decay in a particle detector. The analysis includes:
//PMT calibration using LED data Muon event selection with SiPM shower rejection
//Michel electron identification in subsequent event... | ALGO | 0.951424 | 5.844138 |
b1147c2f-7d42-4e88-bb80-9ea015ca5d8d | divyanshgarg97/Coding-Practise | Leetcode/MInimum Number of Arrows to burst balloon.cpp | struct mycomp{
bool operator()(pair<int,int> p1,pair<int,int> p2){
if( p1.second < p2.second)
return true;
return false;
}
};
struct mycomp1{
bool operator()(vector<int> & a, vector<int> & b ) {
if( a[1] < b[1])
return true;
return false;
}
};
clas... | ALGO | 0.999951 | 5.742424 |
a776e2df-47db-4f87-97fc-1eb56e0bc1ed | absuii/Competitive-Programming | practice/tasks.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n; cin>>n;
vector<pair<long long,long long>> tasks(n);
for(long long i=0; i<n; i++){cin>>tasks[i].first>>tasks[i].second;}
sort(tasks.begin(), tasks.end());
long long ans = 0; long long t = 0;
for(long long i=0; i<n; i++){
... | ALGO | 0.999959 | 3.85438 |
a843714c-d80e-49eb-b341-e9afbdde24a4 | nickoosthuizen/A-Star-Delivery-System | DeliveryPlanner.cpp | #include "provided.h"
#include <vector>
using namespace std;
class DeliveryPlannerImpl
{
public:
DeliveryPlannerImpl(const StreetMap* sm);
~DeliveryPlannerImpl();
DeliveryResult generateDeliveryPlan(
const GeoCoord& depot,
const vector<DeliveryRequest>& deliveries,
vector<DeliveryCo... | ALGO | 0.97423 | 7.076247 |
adf17bd3-3b02-4b01-b739-7f75a3e692a7 | nicolashei1201/VLSILAB_SLAM | ICPORB_VO/Thirdparty/Eigen/eigen3/bench/benchEigenSolver.cpp |
// g++ -DNDEBUG -O3 -I.. benchEigenSolver.cpp -o benchEigenSolver && ./benchEigenSolver
// options:
// -DBENCH_GMM
// -DBENCH_GSL -lgsl /usr/lib/libcblas.so.3
// -DEIGEN_DONT_VECTORIZE
// -msse2
// -DREPEAT=100
// -DTRIES=10
// -DSCALAR=double
#include <iostream>
#include <Eigen/Core>
#include <Eigen/QR>
#in... | TOOL | 0.989572 | 5.772194 |
2651fbfa-4d79-47cc-825f-caa6fdc8f044 | Farhan0140/_CP__ | DATA_STRUCTURES_ALGORITHM/Graph/DFS/DFS.cpp | #include <bits/stdc++.h>
using namespace std;
//_______________________________________________________________________________________________
#define ll long long int
#define all(x) x.begin(),x.end()
#define fast_read() (ios_base :: sync_with_stdio(false), cin.tie(NULL));
const ll S = 1e5+5;
vector<int> Arr[S];
b... | ALGO | 0.999982 | 4.479213 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.