uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
2acf41fd-6215-4735-afd7-ec2af94a3bb1
baibolatovads/work
lab 5.1/e.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; int a[n]; for (int i=0; i < n; ++i){ cin >> a[i] ; } bool found = false; for (int i = 0; i < (n-1); ++i){ if (a[i] * a[i+1]>0){ found=true; break; } } if (found){ cout << "YES"; }else{ cout << "NO"; } return 0; }
ALGO
0.999973
4.404074
35ca64cb-4404-4ee0-aaf2-17672d036f53
bidisha-15/dsa-bidisha
0189-rotate-array/0189-rotate-array.cpp
//using reversal algorithm class Solution { public: void rotate(vector<int>& nums, int k) { int n=nums.size(); k=k%n; reverse( nums.begin(), nums.end()); reverse( nums.begin(), nums.begin()+k); reverse(nums.begin()+k, nums.end()); } };
ALGO
0.999995
5.741097
069010d5-cdcb-47a7-b129-4cc6b4647b1d
olimkamolov0809/instagram_app
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.998762
6.786404
42202607-b8b6-41a4-b8ce-5afbcfeb4d3d
ishandutta2007/codeforces
bigbag/normal/1586/C.cpp
/** * created: 17/10/2021, 14:19:51 **/ #include <bits/stdc++.h> using namespace std; const int max_n = 1000111, inf = 1000111222; int n, m, q; string s[max_n]; int sum[max_n]; int main() { //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); ios_base::sync_with_stdio(false); ...
ALGO
0.999945
4.46768
004fb818-8b85-4f54-b1b6-9bb30c119ace
vfolunin/archives-solutions
URI Online Judge/1663.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <string> using namespace std; bool solve() { int size; cin >> size; if (!size) return 0; vector<int> p(size); for (int &x : p) { cin >> x; x--; } for (int i = 0; i < ...
ALGO
0.999041
3.746985
393ce9ff-44ce-4a37-a2c2-82a644f5096a
saurav-kalsoor/6Companies30days
day9question2.cpp
class Solution { public: //Function to serialize a tree and return a list containing nodes of tree. vector<int> serialize(Node *root) { vector<int> a; ser(root, a); return a; } void ser(Node *root, vector<int> &a){ if(root == NULL){ a.push_back(-1); ...
ALGO
0.999886
5.806499
784e2f0b-80c3-4076-95fb-3bed0490f1e7
kahowang/sensor-fusion-for-localization-and-mapping
第一章 概述/lidar_localization/third_part/gtsam-4.0.2/gtsam/3rdparty/GeographicLib/dotnet/examples/ManagedCPP/example-MagneticCircle.cpp
using namespace System; using namespace NETGeographicLib; int main(array<System::String ^> ^/*args*/) { try { MagneticModel^ mag = gcnew MagneticModel("wmm2010",""); double lat = 27.99, lon0 = 86.93, h = 8820, t = 2012; // Mt Everest { // Slow method of evaluating the values at ...
ALGO
0.99605
3.183409
2c9b9ea4-55dd-4241-9bff-b5b453dc65e4
Oneflow-Inc/oneflow-hip
oneflow/core/ep/cpu/primitive/add.cpp
#include "oneflow/core/ep/include/primitive/add.h" #include "oneflow/core/ep/cpu/primitive/type_seq.h" #include "oneflow/core/ep/cpu/cpu_stream.h" #include "oneflow/core/ep/common/primitive/util.h" #include "oneflow/core/ep/common/onednn.h" namespace oneflow { namespace ep { namespace primitive { namespace { templa...
TOOL
0.981785
7.567505
76208f28-6522-4739-b919-9e1ab3da1537
ishandutta2007/codeforces
geothermal/normal/1467/A.cpp
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> pi; typedef pair<ll,ll> pl; typedef pair<ld,ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<l...
ALGO
0.999665
5.267485
654b3ad5-e918-4afb-9819-54048458317b
ruangustavo/ifrn-pc
lista-05/exe09.cpp
#include <iostream> using namespace std; int main() { const int N = 20; int arr[N]; for (int i = 0; i < N; i++) { cout << "Digite o " << i + 1 << "º número: "; cin >> arr[i]; } int x; cin >> x; int total_vezes_que_aparece = 0; for (int i = 0; i < N; i++) { if (arr[i] == x) { t...
ALGO
0.998776
4.964397
cabb207b-7aed-43e3-9816-7a1dcef771d9
sumit18cs/InterviewBit_Solution
Tree data structure/Merge two Binary Tree.cpp
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ TreeNode* fun(TreeNode* a,TreeNode* b){ if(a==NULL){return b;} if(b==NULL){return a;} a->val+=b->val; a->left=fun(a-...
ALGO
0.999991
5.787375
cc0ebb00-9083-48a1-b62a-94c8f31eae39
ipen47/git_test
demo.c++/.history/二分归并排序_20240411161200.cpp
#include <iostream> using namespace std; void merge(int *arr, int l, int mid, int r) { int i = l; int j = mid + 1; int k = l; int *temp = new int[]; while (i <= l && j <=r) { if (arr[i]<arr[j]) temp[] } } int main() { return 0; }
ALGO
0.999844
3.625365
4dd702ef-ad0f-4e91-8738-40856d597da7
geraldstanje/algorithms
math/all_permutations.cpp
#include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; class Solution { public: vector<string> all_permutations(string data) { vector<string> res; if (data.size() == 0) { return res; } if (data.size() == 1) { res.push_back(data); return res; } string tmp = data.subs...
ALGO
0.999886
5.579229
91fd5d64-1fae-4178-94be-7d4c1625e048
akatoch1/deepfake
opencv-master/modules/imgproc/src/color_lab.cpp
#include "precomp.hpp" #include "opencl_kernels_imgproc.hpp" #include "opencv2/core/hal/intrin.hpp" #include "opencv2/core/softfloat.hpp" #include "color.hpp" using cv::softfloat; static const float * splineBuild(const softfloat* f, size_t n) { float* tab = cv::allocSingleton<float>(n * 4); const softfloat f...
ALGO
0.997346
3.147151
50495f54-fa8f-42d7-8ddb-60b945fc868c
Trijalkhade/learning
ASS_HUT.CPP
#include<graphics.h> #include<conio.h> #include<stdio.h> #include<iostream.h> #include<dos.h> int main() { int gd=DETECT,gm,s; initgraph(&gd,&gm,"C:\\TURBOC3\\BGI"); //Draw Hut setcolor(WHITE); rectangle(150,180,250,300); rectangle(250,180,420,300); rectangle(180,250,220,300); li...
ALGO
0.983119
3.104054
1dee0c50-ab35-4e78-9dbf-4b77b6829646
LittleYang0531/CQ-CSP-S-2021
CQ-00125/traffic/traffic.cpp
#include<bits/stdc++.h> using namespace std; const int N=2e6+10; int n,m,t; int h[N],w[N],e[N],ne[N],idx; int col[N]; bool st[N],st2[N]; void add(int a,int b,int c) { e[idx]=b; w[idx]=c; ne[idx]=h[a]; h[a]=idx++; } long long dfs(int u,int f,int c) { // cout<<c; long long cnt=0; for(int i=h[u];i!=-1;i=ne[i]) { ...
ALGO
0.999838
3.836878
65bc68ec-004b-457e-8c00-6abd480c6532
Saieiei/Leetcode
week1_Functions_count_all_the_set_bits_of_the_number.cpp
#include <iostream> using namespace std; void decimalToBinary(int decimalNumber) { if (decimalNumber == 0) { cout << "Binary: 0" << endl; return; } int binaryResult = 0; int position = 1; int counter=0; while (decimalNumber > 0) { int remainder = decimalNum...
ALGO
0.997737
6.094197
d44580a2-1527-4ced-ad98-4e20ff21dd0e
ishandutta2007/codeforces
rivalq/normal/1490/G.cpp
// Jai Shree Ram #include<bits/stdc++.h> using namespace std; #define rep(i,a,n) for(int i=a;i<n;i++) #define ll long long #define int long long #define pb push_back #define all(v) v.begin(),v.end() #define endl "\n" #define x first #define y ...
ALGO
0.999946
3.688265
367a8518-f266-4d02-91fb-bb9930e6976e
priyanshu-upadhyay/DSA-Programs--C---
stack.cpp
#include <bits/stdc++.h> using namespace std; int capacity = 6; int* arr = new int[capacity]{0}; int i = -1, j = 6; void push1(int x) { if(i+1 == j) { cout<<"No Space\n"; } else { i++; arr[i] = x; } } void push2(int x) { if(i == j-1) { cout<<"No Sp...
ALGO
0.999484
3.764983
32f0ab7f-66ae-4f34-863f-f3cf43f5b148
jmfveneroso/code_problems
leet_code/best_time_to_buy_and_sell_stocks.cpp
#include <vector> #include <iostream> // https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ using namespace std; // Divide and conquer solution. Too complicated. O(n). vector<int> aux(vector<int>& prices, int start, int end) { if (start == end) return { prices[start], prices[start], 0 }; int mid...
ALGO
0.999762
5.945094
7f37ef2a-568c-4e62-b993-211d4f9b2812
sayedMabdullah/XPSC
Week 09/Day 06/Starters 135 Division 3/Change_A_to_B.cpp
/** * ---I'm starting in the name of Almighty ALLAH--- * * Date: "22-05-2024" * Time: "20:59:22" * * File: "Change_A_to_B.cpp" * **/ #include <bits/stdc++.h> #define totallyfast \ ios_base::sync_with_stdio(false); \ cin.tie(nullptr); \ cout.tie(nullptr) #define int...
ALGO
0.999808
4.669576
f5cd8041-1962-48da-a032-b60c731a4b15
deepuyadav004/DataStructure
practice/Tree/convert_sroted_array_into_height_balanced_BST.cpp
108. Convert Sorted Array to Binary Search Tree Easy 5606 334 Add to List Share Given an integer array nums where the elements are sorted in ascending order, convert it to a height-balanced binary search tree. A height-balanced binary tree is a binary tree in which the depth of the two subtrees of every node never...
ALGO
0.999994
7.200351
35e8ac9a-ae15-4431-8b89-5c87946fc9b5
Jeevan-kumar-Raj/Competitive-Programming
NumberTheoryAdvanced/PrimeFactorization.cpp
#include <iostream> #include <vector> using namespace std; vector<int> primeSieve(int *sieve, int n) { sieve[0] = sieve[1] = 0; sieve[2] = 1; for(int i=3;i<=n;i+=2) { sieve[i] = 1; } for(int i = 3; i<=n; i++) { if(sieve[i]) { for(int j = i*i; j <= n; j += 2*i) { sieve[j] = 0;...
ALGO
0.999616
4.020361
f46bc074-1241-4766-b4ba-db0242eed9dd
qhoa256/PTIT-CODE-DSA
Quy hoach dong/DSA05041_BIEN_DOI_VE_XAU_DOI_XUNG.cpp
#include <bits/stdc++.h> #pragma gcc optimize("Ofast") #define endl '\n' using namespace std; using ll = long long; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t; cin >> t; while (t--) { ...
ALGO
0.999633
4.501681
bf86a664-83ac-4ac5-a073-193ecff76a9c
coeing/cframework
framework/ext/boost/libs/graph/example/adjacency_list.cpp
#include <boost/graph/adjacency_list.hpp> #include <boost/graph/graph_utility.hpp> #include <boost/property_map/property_map.hpp> /* Sample Output graph name: foo 0 --joe--> 1 1 --joe--> 0 --curly--> 2 --dick--> 3 2 --curly--> 1 --tom--> 4 3 --dick--> 1 --harry--> 4 4 --tom--> 2 -...
ALGO
0.989393
6.182539
9b2f3bdb-cc70-4edd-b7b9-175c8a132933
NK590/CodingTestArchive
WEEK38, 39 ( 05-15 ~ 05-28 )/양과 늑대 - 최익호.cpp
#include <string> #include <vector> #include <iostream> #include <set> using namespace std; struct MyNode; vector<MyNode> _AllNodeV; int answer = 0; struct MyNode { int _Num, _Type; vector<MyNode*> _ChildnodeV; MyNode(int _num, int _type) { _Num = _num; _Type = _type; } }; void CustomDF...
ALGO
0.999794
5.054805
bb00ef24-762b-48a8-80bc-bc57d4a75bf7
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_1521_3.cpp
#include <bits/stdc++.h> using namespace std; inline int read() { int x = 0, f = 1; char ch = getchar(); while (!(ch >= '0' && ch <= '9')) { if (ch == '-') f = -1; ch = getchar(); } while (ch >= '0' && ch <= '9') { x = x * 10 + (ch - '0'); ch = getchar(); } return x * f; } const int N = 10...
ALGO
0.999644
3.84194
15c370e1-6fcc-4c06-9c5e-285f189057c3
ishandutta2007/codeforces
mhq/normal/1089/M.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector< vector<int> > g(n); vector< vector<int> > gr(n); for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { int q; cin >> q; if (q == 1) { g[i].push_back(j); ...
ALGO
0.99991
3.61956
d0f61c8d-17bb-46ba-9f03-3e00f222c3b0
zzerross/acmicpc
bfs/2178.maze/main.cpp
#include <stdio.h> #define S 100 int i, j, s, d, u, v, r = 0, I, J; char M[S][S+1]; int dy[] = { 0, 0, 1, -1 }; int dx[] = { 1, -1, 0, 0 }; int rng(int i, int j) { return 0 <= i && i <= I && 0 <= j && j <= J; } struct qu { int f, r; int a[S*S*9]; int b[S*S*9]; int c[S*S*9]; qu& init() ...
ALGO
0.999673
4.183656
7f5e78e5-9bbc-4a64-9a84-24c70c2a3430
andva/pathtracer
pathfinder/pathfinder.cpp
#include "pathfinder.h" #include <math.h> #include "searchspacepool.h" #include "searchspace.h" #include "node.h" namespace pathfinder { inline unsigned int PathFinder::distManhattan(const Vec2& posA, const Vec2& posB) { int dx = abs(posA.x - posB.x); int dy = abs(posA.y - posB.y); return dx + dy; } in...
ALGO
0.999927
6.178611
635c9410-d48c-4f63-b5c2-9edd45a47e88
Armaan42/Data-structure-and-algorithms-CPP
Day_18/exp_9.cpp
/* Question: Implement a function int integerSquareRoot(int n) that calculates the integer square root of a non-negative integer n using binary search, without using sqrt(). */ #include<iostream> using namespace std; int intergerSquareRoot(int n){ if(n < 0){ return -1; } if(n == 0 || n == 1){ ...
ALGO
0.99997
5.680031
76b10402-8bef-4bd8-ad5b-505b8d421341
jimlin2004/UVA
DFS/280/280.cpp
#include <iostream> #include <vector> #include <cstring> using namespace std; vector<int> G[105]; bool visited[105]; int visitedNum; void dfs(int u) { for (int v: G[u]) { if (!visited[v]) { visited[v] = true; // 起點不算visited ++visitedNum; dfs(v); } ...
ALGO
0.999485
3.670495
3074adc7-dcc2-4bb9-aa25-ad8f74d7dc82
alexandraback/datacollection
solutions_5634947029139456_0/C++/BreathOfZen/main.cpp
#include <iostream> #include <iomanip> #include <sstream> #include <utility> #include <fstream> #include <string> #include <vector> #include <cmath> #include <set> #include <map> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <assert.h> using namespace std; int getDist(string str1...
ALGO
0.999669
3.833014
a20ca412-9827-4314-8c34-b9c9c5ff559c
UtkarshSaxenautk/DSA
Disjoint/Kruskals.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; class Edge { public: int src, des, w; // Edge(int s, int d, int we) // { // src = s; // des = d; // w = we; // } }; bool comparison(Edge E1, Edge E2) { return E1.w < E2.w; } int find(int x, int ...
ALGO
0.99996
4.446996
9effcdc6-1970-4739-9c0b-97d98f6fb75a
trailofbits/llvm-wedlock
compiler-rt/test/fuzzer/AbsNegAndConstantTest.cpp
// abs(x) < 0 and y == Const puzzle. #include <cstddef> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { if (Size < 8) return 0; int x; unsigned y; memcpy(&x, Data, sizeof(x)); memcpy(&y, Data + sizeof(x), siz...
ALGO
0.923648
5.289382
63efee33-b62e-4599-913b-ecfc0ff87e10
alexandraback/datacollection
solutions_5690574640250880_1/C++/Svyat/main.cpp
#include <iostream> #include <stdio.h> #include <string.h> #include <vector> using namespace std; int T; const double eps = 1e-8; int R, C, M; char dp[51][51][2501]; vector<int> lens; void f(int row, int cur, int sum, int area) { if (sum > area) return; if (row == R) return; if (sum == area) dp[row]...
ALGO
0.999386
3.623714
dd38117e-2bfd-47a9-8bf0-d778f8561d77
zhangshiyun/LAMMPS_STABLE
LAMMPS_STABLE/random_park.cpp
// Park/Miller RNG #include "math.h" #include "random_park.h" #include "error.h" using namespace LAMMPS_NS; #define IA 16807 #define IM 2147483647 #define AM (1.0/IM) #define IQ 127773 #define IR 2836 /* ---------------------------------------------------------------------- */ RanPark::RanPark(LAMMPS *lmp, int see...
ALGO
0.999796
5.64232
779eb7f7-30a0-4838-ac8f-eceafd07dbc5
ljw020711/Problem_Solving
백트래킹/15652.cpp
#include <iostream> using namespace std; int num, len; int seq[8]; int available[9]; void func(int n) { if(n == len) { for(int i = 0; i < len; i++) { cout << seq[i] << ' '; } cout << '\n'; return; } int start; if(n == 0) { start = 1; } else { start = seq[n - 1]; ...
ALGO
0.999484
3.629096
4934e382-cf73-438f-86c1-d16faf90c37d
hansT-T/MyLeetcode
8.greedy/122.best-time-to-buy-and-sell-stock-ii.cpp
/* https://leetcode.cn/problems/best-time-to-buy-and-sell-stock-ii/description/ 2024-7-28 */ class Solution { public: int maxProfit(vector<int>& prices) { int profit = 0; for(int i=1;i<prices.size();i++){ if(prices[i]-prices[i-1] > 0){ profit += prices[i] - prices[i-1]...
ALGO
0.999809
6.012799
90854951-50ea-4d7b-bceb-528d9f3689b4
namratabose32/Leetcode
1523-count-odd-numbers-in-an-interval-range/1523-count-odd-numbers-in-an-interval-range.cpp
class Solution { public: int countOdds(int low, int high) { return (high+1)/2-low/2; } };
ALGO
0.999755
5.313673
9960bc9c-7177-41ec-a16e-278bd4cce82d
tiagosouzatfs/Real_Time_Systems
aulas_exercicios/Conceito de processo no SO/familia.cpp
// UFRN-CT-DCA // Disciplina: Sistemas Operacionais // Programa: familia.cpp // Objetivo: utilizar as funções getpid() e getppid() #include <sys/types.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <signal.h> int main () { // declaração de variáveis pid_t pid; // definindo um ident...
TOOL
0.995062
4.288913
5ea48e79-e261-4b38-88ac-fc2f1dad539b
smh997/Problem-Solving
Online Judges/Kattis/peggamefortwo.cpp
/* * https://open.kattis.com/problems/peggamefortwo * Author: https://github.com/smh997/ */ #include <bits/stdc++.h> using namespace std; map<pair<string, int>, int> dp; map<pair<int, int>, int> c2p; pair<int, int> p2c[15]; int arr[15]; int mvx[6] = {-2, 0, 2, 0, 2, -2}; int mvy[6] = {0, -2, 0, 2, 2, -2}; int mvx2...
ALGO
0.999977
4.116479
a99df7e6-62c5-4eac-8eca-b8b75a2bdc54
gnodipac886/ViT-FPGA-TPU
code/code_fpga/msa.cpp
#include <torch/torch.h> #include <iostream> #include <cmath> #include "msa.h" #include <chrono> #include "parallel_mm.cpp" #include "fpga.h" //#include "accel_driver/include/matrix_utils.h" using namespace torch::indexing; #define M_SIZE 16 #define TOLERANCE 1e-3 #include <torch/torch.h> bool are_tensors_close(tor...
ALGO
0.995501
3.44662
210cb975-90c1-4911-a155-6b86bb88d901
programmer-k/Baekjoon-Online-Judge-Submission
10430.cpp
/* ̸ : 10430.cpp : ¥ : 2017 4 2 ǥ : ڸ Է , ù° ٿ (A+B)%C, ° ٿ (A%C + B%C)%C, ° ٿ (AB)%C, ° ٿ (A%C B%C)%C Ѵ. */ #include <iostream> using namespace std; int main(void) { int num1, num2, num3; cin >> num1 >> num2 >> num3; cout << (num1 + num2) % num3 << endl; cout << (num1 % num3 + num2 % num3) % num3...
ALGO
0.999923
3.998789
07071352-ebf9-4978-b77c-15200a3c5c59
chano062400/Algorithm
프로그래머스/unrated/250121. [PCCE 기출문제] 10번 / 데이터 분석/[PCCE 기출문제] 10번 / 데이터 분석.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; bool cmp0(vector<int> v1, vector<int> v2) { return v1[0] < v2[0]; } bool cmp1(vector<int> v1, vector<int> v2) { return v1[1] < v2[1]; } bool cmp2(vector<int> v1, vector<int> v2) { return v1[2] < v2[2]; } bool cmp3(vector<int>...
ALGO
0.998639
4.806524
d2ae72b1-4c8a-4670-b53c-c3749653d62e
amj13/contest_c_plus
contest1/4.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a/b)*b<<"\n"; if(a==b)cout<<a<<endl; else cout<<(a/b+1)*b<<"\n"; return 0; }
ALGO
0.99886
3.297989
5de3a714-22e9-4338-bab1-acf7b689095f
gopoma/competitive-programming
tasks/abc412A.cpp
//* sometimes pragmas don't work, if so, just comment it! //? #pragma GCC optimize ("Ofast") //? #pragma GCC target ("avx,avx2") //! #pragma GCC optimize ("trapv") //! #undef _GLIBCXX_DEBUG //? for Stress Testing #include <bits/stdc++.h> using namespace std; //* Debugger string to_string(string s) { return '"' +...
ALGO
0.999707
4.866571
53786627-26d3-4f4f-b65a-ac1dc65df147
ArtemKovera/data-structures-cpp
hashtable.cpp
//hash table with C++ //this hash table uses open hashing utilizing chaining //to use the hash table most efficiently, the keys should be uniformly distributed #include <iostream> class HashTable { public: //default constructor creates an empty hash table HashTable (); //this constructor creates a ha...
ALGO
0.998134
5.688564
ed4a123a-a3f8-44e3-b878-3c00f239d8f8
omidasudeh/IP
__Coding/game_of_life_bit_manipulation.cpp
/* 289. Game of Life Medium According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970." Given a board with m by n cells, each cell has an initial state live (1) or dead (0). Each cell interacts with its ...
ALGO
0.999982
6.516076
f51ec30f-bc1a-41a3-b762-cf3dd84e8d2b
KADAMBHAKTI0219/BK-DSA
FiabancciSeries/series4.cpp
#include<iostream> using namespace std; int main (){ //Look at this series: 22, 21, 23, 22, 24, 23, ... int first = 22; int second = 21; for(int i = 1;i<=10;i++){ cout << first << " "<< second << " "; first++; second++; } }
ALGO
0.975601
3.157962
c24d479e-83f5-4aa7-b9b1-a18c4493e2f1
YuxiangJohn/Self_driving_car_term2
MPC/src/Eigen-3.3/bench/benchmarkXcwise.cpp
// g++ -O3 -DNDEBUG benchmarkX.cpp -o benchmarkX && time ./benchmarkX #include <iostream> #include <Eigen/Core> using namespace std; using namespace Eigen; #ifndef VECTYPE #define VECTYPE VectorXLd #endif #ifndef VECSIZE #define VECSIZE 1000000 #endif #ifndef REPEAT #define REPEAT 1000 #endif int main(int argc, c...
ALGO
0.94426
3.896122
2de15fe3-74ad-464b-ae9c-86d21204ccf6
harsh123-baba/DSA
code in cpp/131_tree/3_count/count.cpp
#include<iostream> #include "queue1.h" #include "stack1.h" using namespace std; class Tree { public: Node *root = NULL; Tree() { root = NULL; } void Tcreate(); int count(Node *p); }; void Tree ::Tcreate() { Node *p, *t; int x; Queue q(100); root = new Node; cout << ...
ALGO
0.999499
4.271532
46df8a8e-a272-482a-9f1d-4b28aecdfc5f
cmt1910/mvvm_todolist
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
1868e9f1-e2d8-40c6-8035-52658dab0df2
cassiesu/algorithms_lab
exercise/portfolio.cpp
// example: find the risk-optimal investment strategy // in Swatch and Credit Suisse shares (data as in lecture) #include <iostream> #include <cassert> #include <CGAL/basic.h> #include <CGAL/QP_models.h> #include <CGAL/QP_functions.h> // choose exact floating-point type #ifdef CGAL_USE_GMP #include <CGAL/Gmpzf.h> type...
ALGO
0.999968
5.874129
c3e716fb-5a02-4d95-8b1f-edbf8da05748
bugls/Worldcoin
src/pow.cpp
#include <pow.h> #include <auxpow.h> #include <arith_uint256.h> #include <chain.h> #include <worldcoin.h> #include <primitives/block.h> #include <uint256.h> #include <util.h> unsigned int Lwma3CalculateNextWorkRequired(const CBlockIndex* pindexLast, const Consensus::Params& params) { const int64_t T = params.nLWM...
ALGO
0.99956
7.079195
7bf12a3c-9239-4b3c-a3f2-46d7ab63f66a
vany152/FilesHash
console/src/boost_1_78_0/libs/sort/example/int64.cpp
// See http://www.boost.org/libs/sort for library home page. #include <boost/sort/spreadsort/spreadsort.hpp> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <algorithm> #include <vector> #include <string> #include <fstream> #include <sstream> #include <iostream> using namespace boost::sort::spreadso...
ALGO
0.976874
4.638695
6713da2e-523f-4803-a96f-4e1072a2052a
335633977/tcs
frameworks/cocos2d-x/cocos/math/Quaternion.cpp
#include "math/Quaternion.h" #include <cmath> #include "base/ccMacros.h" NS_CC_MATH_BEGIN const Quaternion Quaternion::ZERO(0.0f, 0.0f, 0.0f, 0.0f); Quaternion::Quaternion() : x(0.0f), y(0.0f), z(0.0f), w(1.0f) { } Quaternion::Quaternion(float xx, float yy, float zz, float ww) : x(xx), y(yy), z(zz), w(ww) ...
ALGO
0.963281
7.457779
3a049f7d-2c63-4cc7-ad07-820ae9e5903a
hhu1506010220/ACM_Repository
ICPC南宁/H.cpp
#include<bits/stdc++.h> using namespace std; int a[100]; int exchange(char s[]){ int len=strlen(s); int sum=0; for(int j=0;j<len;j++) { if(s[j]>='A'&&s[j]<='F') sum+=(s[j]-'A'+10)*pow(16,len-1-j);//Ҫ˼10 if(s[j]>='0'&&s[j]<='9') sum+=(s[j]-'0')*pow...
ALGO
0.998302
3.5388
6acb8c9c-e5f1-464b-a97d-f07414d758dd
aliasadipoor/tech_blog
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.998687
6.797341
57a89375-beb5-406f-82b3-73862926be11
tiandaochouqin1/leetcode
41-50/044 Wildcard Matching/WildcardMatching.cpp
#include <iostream> using namespace std; class Solution44{ public: bool match(string s,string p) { int slen=s.size(),plen=p.size(); int i=0,j=0; while(i<slen&&j<plen) { if(s[i]==p[j]||s[j]=='?') { ++i,++j; ...
ALGO
0.999676
3.797359
0225fa4b-c116-4eb9-8333-6d279e956877
nayuki/Reference-Huffman-coding
cpp/HuffmanCompress.cpp
#include <cstdint> #include <cstdlib> #include <fstream> #include <iostream> #include <stdexcept> #include <string> #include <vector> #include "BitIoStream.hpp" #include "CanonicalCode.hpp" #include "FrequencyTable.hpp" #include "HuffmanCoder.hpp" using std::uint32_t; int main(int argc, char *argv[]) { // Handle com...
ALGO
0.993747
6.400139
b8158a0a-66c9-4c92-a33a-89d1e77c9b46
mutablealligator/scalable-ndn-forwarding
boost_1_60_0/libs/math/example/policy_ref_snip6.cpp
// Note that this file contains quickbook mark-up as well as code // and comments, don't change any of the special comment mark-ups! //[policy_ref_snip6 #include <boost/math/distributions/negative_binomial.hpp> using boost::math::negative_binomial; // Use the default rounding policy integer_round_outwards. // Lower ...
ALGO
0.998232
4.85992
8eaaeb2c-01ba-4878-bbbe-75a790580b61
shehab-nabil/Ludo_Gane
Library/PackageCache/com.unity.ide.visualstudio@2.0.16/Editor/COMIntegration/COMIntegration~/COMIntegration.cpp
#include <iostream> #include <sstream> #include <string> #include <filesystem> #include <windows.h> #include <shlwapi.h> #include <fcntl.h> #include <io.h> #include "BStrHolder.h" #include "ComPtr.h" #include "dte80a.tlh" constexpr int RETRY_INTERVAL_MS = 150; constexpr int TIMEOUT_MS = 10000; // Often a DTE call m...
TOOL
0.954923
6.939089
08b3b1ef-fd5c-4886-ae10-cd59ca01c45f
threalwinky/cp_library
vnoj/bedaominicontest12/A.cpp
#include <bits/stdc++.h> using namespace std; //#pragma comment(linker, "/stack:200000000") //#pragma GCC optimize("Ofast,unroll-loops,tree-vectorize") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native") #define FASTIO ios::sync_with_stdio(fal...
ALGO
0.999967
3.480392
48df60d8-be7c-45a3-a30a-db0bc80f4d7d
mainframer/leetcode-solutions
cpp/0377-combination-sum-iv.cpp
/* Given an array of distinct integers nums and a target integer 'target', return the number of possible combinations that add up to target. Ex. nums = [1,2,3] target = 4 Possible Combinations: (1,1,1,1) (1,1,2) (1,2,1) (1,3) (2,1,1,) (2,2) (3,1). So, total number of combinations possible...
ALGO
0.999982
6.621906
e576f826-23fe-4def-ab0f-f877a83e2f2a
flexedor/Reverse-Polish-notation
lab2/lab2.cpp
// lab2.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include<string.h> using namespace std; struct Node { char ch; Node* link_on_next; }; class Stack { private: Node* first; Node* current_operator; public: Stack(char a){ // ...
ALGO
0.998242
4.156872
d1cb134c-8636-4cda-b7d8-ccd66da594d1
manikanta2901/ubuntu
.history/codingChallenges/cpp/Codechef/longChallenges/Year2021/May/ModularEquation_20210516172718.cpp
// #include<bits/stdc++.h> // #include<iostream> // using namespace std; // int Modulo(int m,int a ,int b){ // return (m % a) %b; // } // int main(){ // int t; // cin >> t; // while(t--){ // int n,m; // cin >> n >> m; // set< pair<int,int> > freq,guess; // for(int i = 1...
ALGO
0.99989
4.451845
eec525da-4813-42ce-a0cf-b690c633825f
jungwoohan72/Multi_Robot_Search_And_Rescue
src/navigation/base_local_planner/src/map_grid.cpp
#include <base_local_planner/map_grid.h> #include <costmap_2d/cost_values.h> using namespace std; namespace base_local_planner{ MapGrid::MapGrid() : size_x_(0), size_y_(0) { } MapGrid::MapGrid(unsigned int size_x, unsigned int size_y) : size_x_(size_x), size_y_(size_y) { commonInit(); } M...
ALGO
0.979681
5.428958
82914c27-9867-4416-a174-0a6d85840e06
AyushPandey003/Dsa
Extras/dphard1.cpp
#include <iostream> #include <vector> #include <numeric> #include <limits> #include <algorithm> using namespace std; class Solution { public: long long maximumValueSum(vector<int>& nums, int k, vector<vector<int>>& edges) { long long total = accumulate(nums.begin(), nums.end(), 0ll); long ...
ALGO
0.999992
6.284011
c6044fa8-cc4c-4d48-b5a3-2e09eebe1c9b
youhaveme9/she-builds
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.99887
6.783439
c5f3bbcd-25f0-4497-a1f3-ec72540196d0
marziel2001/Wirtualny-Swiat-Gra
Cpp/Zwierze.cpp
#include "../naglowkowe/Zwierze.h" #include "../naglowkowe/Swiat.h" #include <iostream> #include "../naglowkowe/KreatorOrganizmow.h" #include "../naglowkowe/Czlowiek.h" void Zwierze::Akcja() { this->Ruch(); } void Zwierze::Ruch() { Punkt noweMiejsce = this->swiat->LosujPoleObok(this->polozenie, ZASIEG_ZWIERZECIA); ...
ALGO
0.935162
5.599376
1479ce67-3220-4f4f-91f5-dbb9e6a69e78
Zero-Vec/cppACM
ACM/niuke/shujiaTrain/81597/H.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; typedef pair<int, int> PI; const int N = 2e5 + 9; int ph[N], pv[N], n, x, y; char s[N]; void solve() { cin >> n >> x >> y >> s + 1; if(x==0&&y==0){ cout << 1ll * n * (n + 1) / 2; return; } for (int i = 1; i <= n; i++){ ...
ALGO
0.999906
3.681548
64ca1810-61ea-41ce-8ec1-fad9e59251d0
Hide-in-blue/MyPAT
a1128.cpp
#include<iostream> #include<vector> #include<map> using namespace std; int k, n; int main(){ cin >> k; for (int i = 0; i < k;i++){ cin >> n; bool f = true; vector<int> v(n + 1), vplus(2*n + 1, 0), vrows(n + 1, 0); map<int, int> mminus; for (int i = 1; i <= n;i++){ ...
ALGO
0.999958
4.001743
c6d42e67-658f-46f1-bcb7-4bd002ce45e3
walkerning/Algorithm_PA
homework2/p1/algo/algo.cpp
#include "algo.h" int ReadFile(std::istream& is, std::vector<Point>& vec) { double p_x; double p_y; int next_char; int num = 0; is >> std::ws; while ((next_char = is.peek()) != EOF) { is >> p_x; is >> p_y; vec.push_back(Point(p_x, p_y)); num ++; is >> std::ws; } return num; } int W...
ALGO
0.999421
5.947392
7996cc2f-1a5c-4417-8ed2-e8574fcd138d
filipmazurek/spa-artifact
docker-share/parsec-benchmarks/artifact-parsec/pkgs/apps/facesim/src/Public_Library/Arrays/ARRAY_PARALLEL_OPERATIONS.cpp
using namespace PhysBAM; //##################################################################### // Function Array_Parallel_Operations_Helper //##################################################################### template<class T, class TS, class TV> void ARRAY_PARALLEL_OPERATIONS<T, TS, TV>:: Array_Parallel_Operation...
ALGO
0.979114
5.949843
da71db8a-4e4a-4482-a955-1dec25cba240
yyatsuo/atcoder
abc146/a.cpp
#include <bits/stdc++.h> #define INF INT_MAX #define ll long long #define ull unsigned long long #define rep(i,n) for(ll i=0; i<n; ++i) #define FOR(i, s, e) for(ll i=s; i<e; ++i) #define MOD 1000000007 using namespace std; template<class T> inline bool chmin(T& a, T b) { if(a>b) {a=b; return true;} return false;} temp...
ALGO
0.999864
3.69188
5450e25a-c510-486b-a181-cdd193bd5fd7
GuadaGT/App_Control_Gastos
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
0dc088da-18f1-4239-992d-ee758411eb2f
cachefish/LeetCode
mid/3_无重复字符的最长字串.cpp
/* 我们使用两个指针表示字符串中的某个子串(的左右边界)。 其中左指针代表着上文中「枚举子串的起始位置」,而右指针即为上文中的 r 在每一步的操作中,我们会将左指针向右移动一格,表示 我们开始枚举下一个字符作为起始位置,然后我们可以不断地向右移动右指针,但需要保证这两个指针对应的子串中没有重复的字符。在移动结束后,这个子串就对应着 以左指针开始的,不包含重复字符的最长子串。我们记录下这个子串的长度; 在枚举结束后,我们找到的最长的子串的长度即为答案 */ #include<set> #include<string> #include<iostream> #include<algorithm> using namespace std...
ALGO
0.999894
5.888682
377a88e9-e667-47fc-b4b5-044e28f68a1e
shivangi0110/24SS-AllTrans-main
benchmarks/benchmarks_source/8_level/p04030/s745383665.cpp
#include <iostream> #include <string> #include <cmath> #include <vector> int main() { std::string s; std::vector<char> v; std::cin >> s; for(int i=0;i<s.size();i++){ if(s[i] == 'B'){ if(v.size()) v.pop_back(); } else { v.push_back(s[i]); } } fo...
ALGO
0.999601
3.764381
b5c0fdd8-00d9-466d-b95e-8263d255d6c8
JhonatanBarboza/Simulacao_Universo
Projeto 1 /solar.cpp
#include <GL/glut.h> #include <math.h> #include <stdlib.h> #include <time.h> #include <stdio.h> #define NUM_PLANETAS 10 #define G 6.67430 // Constante gravitacional // Estrutura para armazenar as propriedades de cada planeta typedef struct { float x, y; // Posição do planeta float vx, vy; /...
ALGO
0.999826
5.764678
6c749bff-8721-4e90-8417-4909f4e8cb07
cduckling/Competitive-Programming
Codeforces/matrixpermutation.cpp
#include <iostream> #include <vector> #include <set> #include <map> using namespace std; #define tc int t {}; cin >> t; while (t--) {solve();} typedef long long ll; void solve() { int n {}, m {}; cin >> n >> m; vector<vector<int>> a (n, vector<int> (m)); for (int i {0}; i < n; ++i) { for (int j {0}...
ALGO
0.999894
3.218771
5fca6548-152f-40dc-93c6-dcd359e42a77
sanyamsinghal/ContestSolutions
Codeforces660_Div2/problemA.cpp
/* User:- sanyam */ #include <bits/stdc++.h> using namespace std; #define ip(x) \ ll x; \ cin >> x; #define op(x) cout << x; #define pb push_back #define mp make_pair #define ll long long int #define mod 1000000007 #define w(t) \ int t; \ cin >> t while (t--) #define triplet pair<int, pair<int, ...
ALGO
0.999818
3.614113
8095b7f3-1498-4f8b-a25d-be1234018fbc
Fi281001/c-
bai tap c/classDiem2.cpp
#include<iostream> #include<stdlib.h> #include<math.h> using namespace std; class diem{ float x,y,z; public: void nhap(); void xuat(); diem timdx(); void trung(int n, diem *d); float kc(diem d); void kc_max(int n, diem *d); float get_x(){ return x; } float get_y(){ return y; } float get_z(){ return z...
ALGO
0.999636
3.372615
9e42904b-2a4c-4fb1-bf39-6c9362633c4e
aphongdo/ardupilot_3.2.1mod
libraries/AC_PID/AC_P.cpp
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- /// @file AC_P.cpp /// @brief Generic P algorithm #include <AP_Math/AP_Math.h> #include "AC_P.h" const AP_Param::GroupInfo AC_P::var_info[] = { // @Param: P // @DisplayName: PI Proportional Gain // @Description: P Gain which pro...
TOOL
0.901647
3.574988
c9a51900-892c-43b9-b119-9cdf2db6eebe
Patolete/Programacion
Trabajos/C++/Potenciando num.cpp
#include <iostream> #include <conio.h> using namespace std; int main(){ int x, y, x2; cout<<"Digite X e Y: "<<endl; cin>>x>>y; x2 = x; if(y == 0){ cout<<"X a la Y es: 1"<<endl; } else{ for(;y > 1;y--){ x *= x2; } cout<<"X a la Y es: "<<x<<endl; } getch(); return 0; }
ALGO
0.999617
3.369549
71d8a919-3fb6-4b9f-bc09-313772573e1f
lidudagn/Flutter-Autistic-Parent-Communication
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.998762
6.786404
9de50c2e-08fd-429a-9285-7b22e0bbda1a
coschain/contentos
externals/binaryen/test/emscripten/tests/core/stack_overflow.cpp
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <emscripten.h> void recurse(unsigned int x); void act(volatile unsigned int *a) { printf("act %d\n", *a); unsigned int b = (int)(intptr_t)(alloca(*a)); if (b < *a) *a--; recurse(*a); } void recurse(volatile unsigned int x) { printf("re...
ALGO
0.999455
5.322681
c4a08dd8-c403-45ea-834f-09e45520b171
Purpleslz/templates
Others/Connectivity DP.cpp
/* 求环形最大路径 且至少为4格 */ #include <iostream> #include <cstdio> #include <cstring> using namespace std; const int MOD=69997,MAX=15; int n,m,tot; int p[20],c[20],t[2],use[20],pre=1,now=0; int q[2][1000010][2],ans=-100000000,pa[20]; int g[70000],next[1000010]; int change(int state,int a,int b,int pos) { for (int i=0...
ALGO
0.99995
3.405941
eb496c2f-721b-4ca4-ae22-e5051d942c66
Udipto-Mondal/Codechef
Sugarcane Juice Business.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--){ int n; cin>>n; int s=n*50; int p=s-(n*10+n*10+n*15); cout<<p<<"\n"; } return 0; }
ALGO
0.999401
3.379668
3efd1c91-da66-4a82-8e99-a2b4ef19ec9e
anh29/Ky5
Toán UD/GK/B1.cpp
#include <bits/stdc++.h> using namespace std; long long sum(long long n){ if (n==1) return 0; long long res=0; for (int i=1; i<n; i++) if (n%i==0) { res+=i; } return res; } bool kt(long long n){ return n==sum(n); } bool prime(long long n){ if (n==1) return false; for (int i=2...
ALGO
0.999909
4.230565
66f474ea-bc0b-40f8-abda-9d92394ebef6
Yashu3624/DSA-LEETCODE-GFG
1817-calculate-money-in-leetcode-bank/calculate-money-in-leetcode-bank.cpp
class Solution { public: int totalMoney(int n) { vector<int>dp(n,-1); dp[0] = 1; int sum = 1 ; for(int i = 1 ; i < n ; i++){ if(i<=6){ dp[i] = dp[i-1]+1; sum += dp[i]; } else{ dp[i] = dp[i-7]+1; ...
ALGO
0.999796
5.061087
80ab43c2-5325-4e69-8bd6-301eacd72161
boxnos/codeforces
1213B/main.cpp
#include <cstdio> #include <utility> #include <cctype> #include <climits> #include <vector> #include <algorithm> using namespace std; #ifdef __linux #define _U(s) s##_unlocked #else #define _U(s) _##s##_nolock #define _CRT_DISABLE_PERFCRIT_LOCKS #endif #define gcu _U(getchar) #define pcu _U(putchar) #define _DEF(r, n,...
ALGO
0.999223
4.599502
849f09bd-14f6-472f-a5fc-feb1bed8405a
yinglang/ImageRetrival
third_part_lib/matconvnet-1.0-beta20/matconvnet-1.0-beta20/matlab/src/bits/impl/pooling_cpu.cpp
// @file pooling_cpu.cpp // @brief Pooling block implementation (GPU) // @author Andrea Vedaldi // @author Karel Lenc #include "pooling.hpp" #include "../data.hpp" #include <algorithm> #include <limits> /* ---------------------------------------------------------------- */ /* ...
ALGO
0.998205
7.178321
59c64e23-988c-4411-807f-65df954975ab
korotindev/c-plus-plus-belts
solutions/black/week5/6_transport_catalog_t/src/solution/transport_router.cpp
#include "transport_router.h" #include "yellow_pages_catalog.h" #include "utils.h" using namespace std; TransportRouter::TransportRouter(const Descriptions::StopsDict& stops_dict, const Descriptions::BusesDict& buses_dict, const Json::Dict& routing_settings_json) : routing_settin...
TOOL
0.910653
6.57856
c5e508d6-fd33-484a-9f94-3cb14ddae489
hoho/dosido
nodejs/deps/icu-small/source/i18n/collationrootelements.cpp
#include "unicode/utypes.h" #if !UCONFIG_NO_COLLATION #include "collation.h" #include "collationrootelements.h" #include "uassert.h" U_NAMESPACE_BEGIN int64_t CollationRootElements::lastCEWithPrimaryBefore(uint32_t p) const { if(p == 0) { return 0; } U_ASSERT(p > elements[elements[IX_FIRST_PRIMARY_INDEX]]);...
ALGO
0.977183
7.239442
026c08b3-e306-45ff-9892-c05398e3782a
Khushi-Shah-1/Leetcode-progress
0169-majority-element/0169-majority-element.cpp
class Solution { public: int majorityElement(vector<int>& nums) { int elem=nums[0]; int count=0; for(int i=0;i<nums.size();i++){ if(count==0) elem=nums[i]; if(nums[i]==elem) count++; else{ count--; } } return elem; } ...
ALGO
0.999866
5.663853
af43b0e1-75e3-4a61-b2c3-88cc57c14620
int-i/2023-2-coding-test-study
이찬호/BaekJoon5522.cpp
#include <iostream> using namespace std; int main() { int score[5] = { }; int sum = 0; for (int i = 0; i < 5; i++) { cin >> score[i]; sum += score[i]; } printf("%d", sum); }
ALGO
0.998323
3.024997
613839e4-20e2-4e98-9f4a-61be4ca48332
sdasgup3/Leetmap
source/leetcode/Others/225_Implement_Stack_using_Queues.cpp
/* Problem Description Implement the following operations of a stack using queues. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. top() -- Get the top element. empty() -- Return whether the stack is empty. Notes: You must use only standard operations of a queue -- which means o...
ALGO
0.993539
5.935364
bf35e3b5-5f96-4d67-a5de-d0e8a667818f
Barlow13/RP2040-Test-Code
ThingPlus-TFMicro-CatDogPerson/pico-tflmicro/src/signal/src/window.cpp
#include "signal/src/window.h" #include <cstdint> // TODO(b/286250473): remove namespace once de-duped libraries namespace tflm_signal { void ApplyWindow(const int16_t* input, const int16_t* window, int size, int shift, int16_t* output) { for (int i = 0; i < size; ++i) { int32_t raw = (static_...
TOOL
0.97456
6.815027
cd65a9ab-0802-4681-9b01-7ee08856015b
SamarthKadam/CodingBlocksDataStructureAlgo
7 ChallengesString/2StringMaxFrequncyCharacter.cpp
#include<iostream> using namespace std; int main() { int arr[100]={0}; string s; getline(cin,s); int max=0; char ch; for(int i=0;i<s.length();i++) { arr[s[i]-'A']++; } for(int i=0;i<100;i++) { if(arr[i]!=0) { if(arr[i]>max) { max=arr[i]; ch='A'+i; } } } cout<<"The letter "<<ch<<"...
ALGO
0.999652
3.994655