uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
65aff50d-8039-4291-ae9f-32ef71d11148
Harry-Neal/Chaos-in-Many-a-Many-Body-System-Out-of-Equilibrium
Figures/Fig 2/Heisenberg_Dr_MC_Hist_ensemble.cpp
#include <iostream> #include <cstdlib> #include <stdio.h> #include <math.h> #include <iomanip> #include <ctime> #include <random> using namespace std; //0.0 Declare global variables //0.01 Global system parameters int ssize= 20; double lambda= 1; double Jvar= 0.0001; double HField[...
ALGO
0.999006
4.115916
84adcf5a-f502-4919-bd8d-7e0c852c5113
akamya997/PracticeCode
201907_practice/nowcoder3/e.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> PII; #ifndef ONLINE_JUDGE #define dbg(x...) do{cout << "\033[32;1m" << #x << "->" ; err(x);} while(0) void err(){cout << "\033[39;0m" << endl;} template<template<typename...> class T,typename t,typename... A> void err(T<t> a,A... ...
ALGO
0.999926
4.725924
7c2063eb-9d3c-4739-85cd-d5cb1e2caed9
HPC-Fortran2CPP/Fortran2Cpp
data/readable_format/cpp/file2400.cpp
// E_kinetic.cpp #include <iostream> #include <vector> #include <array> #include <numeric> #include <cmath> #include <cassert> #define _REAL_ double void E_kinetic(_REAL_ &KE, int natom, const std::vector<_REAL_> &mass, const std::vector<_REAL_> &v, const std::vector<_REAL_> &oldv) { KE = 0.0; ...
ALGO
0.996418
6.05786
6022e4a7-4472-4290-abde-1a7768c6fa41
vargad/exercises
elementary/secret-message.cpp
#include <cassert> #include <iostream> #include <regex> #include <cctype> std::string secret_message(const std::string &text) { return std::regex_replace(text, std::regex("[^A-Z]"), ""); } std::string secret_message2(const std::string &text) { std::string result; for (auto c : text) { if (std:...
ALGO
0.992051
5.966827
ca38600e-499c-4d3f-bd94-37c0e84702eb
mandy-1/DSA-Practice-2022
Largest number in K swaps - GFG/largest-number-in-k-swaps.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: void solve(string str,int k,int n,int index,string &ans) { if(k==0) return; char maxchar=str[index]; for(int i=index+1;i<n;i++) { if(ma...
ALGO
0.999979
6.257909
0f434632-ba74-4665-bf76-6f6dcb0e7871
ishandutta2007/codeforces
sohsoh/normal/1407/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<ll, ll> pll; #define all(x) (x).begin(),(x).end() #define X first #define Y second #define sep ' ' #define endl ...
ALGO
0.999984
4.664221
5e74eee1-e184-44c2-9397-bba419fdc53e
dodle4532/BookParce
book.cpp
#include "book.h" #include "functions.h" #include <QDebug> #include <cctype> #include <sstream> #include <fstream> #include <algorithm> #include <tuple> #include <iostream> #include <string> int fileLen; Book::Book(std::string path, std::string parseName, Pos pagePos, std::string indexWord, bool isNoSubchaptersIndex)...
TOOL
0.871062
3.211569
c8f910af-d1ea-4889-809a-ff82a46c64dc
Gunhee-Lee/realestate-practice-2
lib/QuantLib-1.21/ql/experimental/finitedifferences/fdsimpleextoujumpswingengine.cpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*! \file fdsimpleextoujumpswingengine.cpp \brief Finite Differences engine for simple swing options */ #include <ql/termstructures/yieldtermstructure.hpp> #include <ql/experimental/processes/extouwithjumpsprocess.hpp> #include <ql/ex...
ALGO
0.995365
7.382579
9777fd67-8c92-47cc-a434-2c17c7519e42
sharmaUday0903/6Companies30days
Microsoft/LargestDivisibleSubset.cpp
class Solution { public: vector<int> largestDivisibleSubset(vector<int> &nums) { sort(nums.begin(), nums.end()); int n = nums.size(); vector<int> ans; vector<int> dp(n, 1); for (int i = 0; i < n; i++) { for (int j = i - 1; j >= 0; j--) { ...
ALGO
0.99998
4.893764
59f45f31-52d6-46d9-8854-2c550e200070
TinkerEdgeR-Android/frameworks_rs
cpu_ref/rsCpuIntrinsicColorMatrix.cpp
#include <sys/mman.h> #include <unistd.h> #include "rsCpuIntrinsic.h" #include "rsCpuIntrinsicInlines.h" #include <sys/mman.h> #include <stddef.h> #include <stdint.h> #include <stdlib.h> //#include <utils/StopWatch.h> /* uint kernel * Q0 D0: Load slot for R * D1: Load slot for G * Q1 D2: Load slot fo...
TOOL
0.904953
5.439581
f77ffe03-72c0-4cc7-ac28-85b5fcb4472f
rsparapa/bnptools
BART3/inst/cxx-ex/heterbartfuns.cpp
#include "heterbartfuns.h" //-------------------------------------------------- //heterlh, replacement for lil that only depends on sum y. double heterlh(double b, double M, double tau) { double t2 =tau*tau; double k = b*t2+1; return -.5*log(k)+.5*M*M*t2/k; } //------------------------------------------------...
ALGO
0.999791
4.419518
5623dac9-fa4d-48bc-b1f4-0f57e9a6ad95
Conchylicultor/ClientOnlineReid
src/transition.cpp
#include "transition.h" using namespace std; using namespace cv; size_t reconstructHashcode(const float *array); // TODO: Better inclusion static const int transitionDurationMin = -10; static const int transitionDurationMax = 10; // Duration limits of the transition Transition &Transition::getInstance() { stati...
ALGO
0.973671
3.916987
d7210342-3b52-4fbe-9ebf-944ea68beb83
anoopmenon/opencv-perl
cvaux/src/cvbgfg_common.cpp
#include "_cvaux.h" // Function cvRefineForegroundMaskBySegm preforms FG post-processing based on segmentation // (all pixels of the segment will be classified as FG if majority of pixels of the region are FG). // parameters: // segments - pointer to result of segmentation (for example MeanShiftSegmentation) ...
ALGO
0.962264
4.906278
0ae99840-3df4-4783-b970-e63fa2bfd652
ahmedbodi/tenebrix-0.8-coincontrol
src/checkpoints.cpp
#include <boost/assign/list_of.hpp> // for 'map_list_of()' #include <boost/foreach.hpp> #include "checkpoints.h" #include "main.h" #include "uint256.h" namespace Checkpoints { typedef std::map<int, uint256> MapCheckpoints; // How many times we expect transactions after the last checkpoint to // be slowe...
TOOL
0.853778
5.96199
542843a0-32e1-4f6b-a26d-7b6c9ca77118
rafa95359/programacionCOmpetitiva
bits/andProduct.cpp
#include <bits/stdc++.h> using namespace std; #define para(i,a,n) for(int i=a;i<n;i++) typedef long long Long ; int main(){ Long n; cin>>n; para(k,0,n){ Long a,b; cin>>a>>b; Long x=(a^b); Long i=__builtin_clz(x); a=a>>(32-i); a=a<<(32-i); cout<...
ALGO
0.999958
3.268462
f02d1492-a209-4f81-8327-50acb2b07016
ShazidMashrafi/LeetCode
Codes/372 - Super Pow/372.cpp
#include<bits/stdc++.h> using namespace std; const long long M = 1337; long long mypow(long long x, long long n, long long M) { long long ans = 1; while(n) { if(n&1) ans = (ans*x) % M; x = (x*x) % M; n >>= 1; } return ans; } long long get_b(vector<int>&v) { ...
ALGO
0.99993
4.571943
de78049e-fa02-45f9-a09d-94ced10519a9
Saleh7127/CPP-solution-by-Fellow_junior
UVA Judge/uva13091.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t; cin>>t; for(int cs=1; cs<=t; cs++) { char a[10][10]; ll i,j,k=-1,l=-1,m=-1,n; for(i=0;i<5;i++) { for(j...
ALGO
0.999902
3.456129
b6cb7468-5587-4b87-b004-89b71ec5cc92
SonLamHG/ICPC-PTIT-round2
J.cpp
#include<bits/stdc++.h> using namespace std; const int maxn = 2e5 + 5; int main(){ int n,m; cin>>n>>m; int a[n + 5]; map<int,int> mp; for(int i =1;i<=n;i++){ cin>>a[i]; mp[a[i]]++; } vector<int> v; for(auto x:mp){ v.push_back(x.second); } sort(v.begin(),v.end()); int t = unique(v.begin(),v.end()) - v...
ALGO
0.999998
4.096287
f71cce13-07aa-47a3-948b-56aade445722
LieGeee/task
niuke/课程/优先队列,并查集/tokitsukaze and Soldier.cpp
/* 链接:https://ac.nowcoder.com/acm/contest/22904/1004 来源:牛客网 在一个游戏中,tokitsukaze需要在n个士兵中选出一些士兵组成一个团去打副本。 第i个士兵的战力为v[i],团的战力是团内所有士兵的战力之和。 但是这些士兵有特殊的要求:如果选了第i个士兵,这个士兵希望团的人数不超过s[i]。(如果不选第i个士兵,就没有这个限制。) tokitsukaze想知道,团的战力最大为多少。 */ #include <bits/stdc++.h> using namespace std; priority_queue<int> q; int ans[100000...
ALGO
0.99997
3.762215
bef62880-a5cd-4d12-9767-3a761362b5a3
enigplay/enig
src/cryptonote/cn_values/cryptonote_format_utils.cpp
#include "include_base_utils.h" using namespace epee; #include "cryptonote_format_utils.h" #include <boost/foreach.hpp> #include "cryptonote_config.h" #include "miner.h" #include "crypto/crypto.h" #include "crypto/hash.h" namespace cryptonote { //--------------------------------------------------------------- voi...
TOOL
0.942504
5.969137
625517af-868d-46b2-b973-a42c664f9c21
nmpogg/CodePTIT
c++/so_buoc_dich_chuyen_it_nhat.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int t; cin >> t; while(t--){ int n; cin >> n; int a[n]; for(int i = 0; i < n; i++) cin >> a[i]; bool check = false; int cnt = 0; for(int i = 0; i < n; i++){ if(a[i] == 0){ check = true; cnt = -1; break; } // cout << "b0" << e...
ALGO
0.999926
4.513875
4df90a21-b450-48cb-89cd-778e5cade6f6
skyto0927/Programming-Contest
AtCoder_PastProblems/TDPC/F.cpp
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) #define REPR(i, n) for(int i = n; i >= 0; i--) #define FOR(i, m, n) for(int i = m; i < n; i++) #define ALL(obj) (obj).begin(), (obj).end() #define INF 1e9 typedef long long ll; const int MOD = 1e9+7; int main() { int N,K; ...
ALGO
0.999985
4.233069
33c2a16f-fbb0-4607-b40a-f79fde17d268
ttnghia/CppAlgorithms
Algorithms/Recursive/Partition_2.cpp
#include <iostream> #include <algorithm> #include <vector> #include <cassert> using namespace std; bool canDivide(const vector<int>& A, int& sum) { sum = 0; for(int x : A) sum += x; return !(sum % 1); } void printPartitions(const vector<int>& A, const vector<int>& group) { assert(A....
ALGO
0.999883
4.962134
312b2d5f-f237-49de-85ba-a8451d698de6
LucasSenandeLopez/C-Cpp
Cpp_Code/IntroductionToCpp/Chapter3/U_3_1/Ex_U_3_1.cpp
/* We are proposed to obtain the percentage of passing and failing students that we pass into the program */ #include <iostream> #include <iomanip> using namespace std; int main() { int passing; int failing; int total; float perc_passing; float perc_failing; cout << "Introduce th...
ALGO
0.890417
3.965906
5d029861-a89c-48e6-8740-1c50e9735b94
aksamota/geeksforgeeks_practice
stack/easy_string.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; cin.ignore(32767, '\n'); while (t--) { string s; string ans; cin >> s; int count = 1; char pre_c = tolower(s[0]); for (int i = 1; i < s.length(); i++) { char c = s[i...
ALGO
0.999992
5.325666
461a0ed6-3bae-4e10-845f-783744b57f5e
Lokesh-Kumar-121/leetcode
Find the number of islands - GFG/find-the-number-of-islands.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: // Function to find the number of islands. void dfs(int row,int col,vector<vector<char>>&grid) { if(row >= grid.size() || col >= grid[0].size()) return; ...
ALGO
0.999946
6.954949
862d3245-b312-41fe-9c23-6db6bdbf5cfe
tanvirtareq/programming
sphere online judge/crypton- the embarrassed cryptographer.cpp
#include<bits/stdc++.h> using namespace std; typedef long long unsigned ull; ll int main() { ull l, k; while(scanf("%llu%llu",&l,&k)!=EOF) { if(l==0&&k==0) break; llu d=check(l, k); } return 0; }
ALGO
0.999585
3.302032
e31f9152-e031-4884-bc6b-e0fe98a28a44
seb3mz/forth
ky/data_structure/2_linear_list_线性表/exercise/2_2线性表的顺序表示/07.cpp
#include <iostream> #include "../../21_sequence_table_顺序表/211_static_sequence_table_静态顺序表.h" using namespace std; /* 功能:将一个数组内的两个顺序表的位置互换 (a1,a2,...,am)和(b1,b2,...bn) 换为 (b1,b2,...bn)和(a1,a2,...am) 输入: SqList& sql; //待置换元素位置的顺序表 输出: void 分析思路: 将顺序表 a1,a2,...bn 逆序得到 bn,bn-1,...,a...
ALGO
0.998625
3.788924
21e3389e-d175-4221-a23a-c4443783a48b
nampallimohith/operating-systems
files using single directory.cpp
#include <stdio.h> #include <stdlib.h> // Structure to represent a process typedef struct Process { int pid; // Process ID int execution_time; // Execution time } Process; // Structure to represent a node in the priority queue typedef struct PriorityQueueNode { Process process; struct Prior...
ALGO
0.999987
5.769026
10ab6fb7-6541-411f-a376-bee636f69c92
arrows-1011/CPro
AtCoder/ABC/023/A.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int X,sum = 0; cin >> X; while(X > 0){ sum += X%10; X /= 10; } cout << sum << endl; return 0; }
ALGO
0.999793
4.130934
3af687ed-a3f0-4220-9b91-114f834b2fa1
yunusgumussoy/Data-Structure-in-C
veriyapilari10stack.cpp
#include <stdio.h> #include <stdlib.h> #include "veriyapilaristack.h" //Stack array //int dizi[2];// 2 elemanl dizi- statik kullanm ama bize dinamik lazm stack * tanim(){ stack *s =(stack*)malloc(sizeof(stack)); s->dizi=NULL;//diziyi dinamik kullanmak iin s->boyut=2; s->tepe=0; return s; } int pop(stack *s){//dizi...
TOOL
0.994985
3.001573
6219fd6e-c409-4172-b90a-081a365f53bf
anjalipathak13/Practice-Leetcode-Question
String Mirror - GFG/string-mirror.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: string stringMirror(string str){ // Code here int n = str.size(); int ind = 0; for(int i = 1; i<n; i++){ ...
ALGO
0.999947
6.116582
25dc01b1-1fa5-46b4-a368-966bb4eb1b48
melonattacker/atcoder
contests/ABC/ABC134/a.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int r; cin >> r; cout << 3 * r * r << endl; return 0; }
ALGO
0.999017
3.481553
8fb7b5c1-7773-49a4-b714-f87a65e1faee
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_9205_836.cpp
#include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a >> b; cout << a + b << endl; return 0; }
ALGO
0.995748
3.680648
35c28c88-1cf2-44fd-8fe7-99b68f3ac8a8
Vzenun/Codeforces-Problems-Solutions
1679B_Stone_Age_Problem.cpp
// Vidur Goel //Codeforcees Handle: Vidurcodviz #include<iostream> #include<string> #include<cmath> #include<climits> #include<algorithm> #include<cstddef> #include<cstdio> #include<cstdlib> #include<vector> #include<stack> #include<chrono> #include<random> #include<cassert> #include<array> #include<bitset> #include<...
ALGO
0.998172
4.380102
c00ce8ca-9d09-4172-8e96-72c24107f94e
iknoom/Problem_Solving
Kick Start/Round A/B.cpp
#include <bits/stdc++.h> #define sz(x) (int)x.size() #define all(x) x.begin(), x.end() #define fastio cin.sync_with_stdio(false); cin.tie(nullptr) using namespace std; using pi = pair<int, int>; const int MOD = 1e9 + 7; const int dx[] = {-1, 0, 1, 0, -1, 1, 1, -1}; const int dy[] = {0, 1, 0, -1, 1, 1, -1, -1}; int so...
ALGO
0.999823
5.298034
bdeb7603-2390-4bb3-891f-d912d45a8395
finyle/rank-cf
div1_2/2023/5_cf_884.cpp
#include <bits/stdc++.h> #define ru_(i,l,r) for(int i=(l);i<=(r);i++) #define ru(i,l,r) for(int i=(l);i<(r);i++) #define rd_(i,r,l) for(int i=(r);i>=(l);i--) #define rd(i,r,l) for(int i=(r);i>(l);i--) #define ll long long #define pli pair<ll,int> #define s1 first #define s2 second using namespace std; #ifdef LOCAL #in...
ALGO
0.99963
3.634169
96835b81-6917-490c-9a70-4129741a7b2c
karunon/practice_atcoder
easy100/sumitb2019_b.cpp
#include <bits/stdc++.h> using namespace std; int main() { double n; cin >> n; int x = (int)((n + 1.0) / 1.08); if (n <= x * 1.08 && x * 1.08 < n + 1) cout << x << endl; else cout << ":(" << endl; }
ALGO
0.998996
3.824679
55a4d900-ace6-4bc0-9621-fddb2a1dac12
rghanks/DSA
maxSubarraySum.cpp
#include<iostream> #include<vector> using namespace std; int maxSubarraySum(vector<int>& nums){ // nmax is maximum sum // nsum is the current sum // when hitting positive number, nsum should sum the current number if positive, otherwise update to the current number // when hitting nega...
ALGO
0.999944
5.598671
1994b0da-1e7d-4b28-b98f-4721316d5309
gabe-raulet/ParallelCoverTree
programs/build_graph.cpp
#include "Point.h" #include "CoverTree.h" #include "MyTimer.h" #include "read_args.h" #include "version.h" #include <iostream> #include <sstream> #include <chrono> #include <assert.h> #include <stdio.h> using namespace std; string return_current_time_and_date(); string program_str(int argc, char *argv[]); void write...
ALGO
0.872074
6.064713
4e2b22b2-0dca-4e10-93ff-5f3a28511817
Gnaroshi/practice-algorithm-solvedac
With_Levels/Silver/Silver_4/9322.cpp
// problem: 철벽 보안 알고리즘 // id: 9322 // tag: // time taken: #include <algorithm> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_map> #include <vector> using namespace std; using ll = long lo...
ALGO
0.999979
4.291007
5ec21382-3f00-472a-9306-816d3a082d52
ahmedelgendyfci/Assingment-3-Data-Structure
A3P1/A3P1/Source.cpp
#include <iostream> #include<string> using namespace std; class Exception { protected: string massage; public: Exception(const string &m) //constructor { massage = m; } void print() { cout << massage << endl; } }; //template<class type> template<typename type> class myList { protected: struct Node { ...
TOOL
0.979006
4.223672
f6e85101-7cad-43cc-affd-62d963282cb1
sreedhar111yu/C-
Zoho/pattern/11.cpp
// Pyramid star pattern in C++ //space 4 3 2 1 0 //star 1 3 5 7 9 twice the time #include<bits/stdc++.h> using namespace std; int main(){ int size; cin>>size; for(int i=0;i<size;i++){ //space 5-0-1=4 //5-1-1=3 for(int j=0;j<size-i-1;j++){ cout<<" "; } for...
ALGO
0.999945
4.203972
60b83592-481c-4a74-9ad7-2479eee915a4
jniedzie/LightByLight2018
STARlight_ALP_OLD/trunk/src/spectrum.cpp
#include "spectrum.h" #include <cmath> #include "beambeamsystem.h" #include <randomgenerator.h> #include <iostream> spectrum::spectrum(randomGenerator* randy, beamBeamSystem *bbs) : _bMin(5.0) ,_bMax(128000.0) ,_nBbins(6400) ,_probOfBreakup(_nBbins) ,_beamBeamSystem(bbs) ,_nK(10000) ,_fnSi...
ALGO
0.920194
4.164719
b39255d9-254e-45d4-8c8d-5ee5b81f4e7b
nayeem-alpha/cpp-program
addprogram.cpp
#include <iostream> using namespace std; int sumOfDigits(int n) { int sum = 0; while (n != 0) { // Extract the last digit int last = n % 10; // Add last digit to sum sum += last; // Remove the last digit n /= 10; } return sum; } int main() { int n...
ALGO
0.99953
6.450248
58512091-9bce-4f2d-9a31-64a8947f36e3
TrellixVulnTeam/project-ultra-classic_BCUF
gfx/skia/skia/src/pathops/SkOpCubicHull.cpp
#include "SkPathOpsCubic.h" static bool rotate(const SkDCubic& cubic, int zero, int index, SkDCubic& rotPath) { double dy = cubic[index].fY - cubic[zero].fY; double dx = cubic[index].fX - cubic[zero].fX; if (approximately_zero(dy)) { if (approximately_zero(dx)) { return false; }...
ALGO
0.999214
5.913484
59c4b87a-f3f1-4ba2-9d57-663391329f8c
OpenLiJiaying/zilu_benchmark
cpp_version/poly/01.cpp
extern void __assert_fail(); #define Depth(n) do{;} while(0) int main() { int x; int y; if(!(x*y>=0)) { return 0; } while(1) { if(x==0) { if (y>0) x++; else x--; } if(x>0) y++; else x--; if(!(x*y>=0)) { goto ERROR; } } return 0; ERROR: __assert_fail(); return ...
ALGO
0.991693
3.198811
82d9c46e-e6bc-42ae-88d8-d04dcd6e975d
uchechukwukene/C-DL
flashlight/pkg/speech/criterion/attention/SoftWindow.cpp
#include "flashlight/pkg/speech/criterion/attention/SoftWindow.h" #include "flashlight/fl/tensor/Index.h" #include "flashlight/pkg/speech/criterion/attention/Defines.h" namespace fl::pkg::speech { SoftWindow::SoftWindow() = default; SoftWindow::SoftWindow(double std, double avgRate, int offset) : std_(std), avgR...
TOOL
0.924801
6.615501
df028d04-3c17-4ea2-a787-79a70805c7bd
1tygoime/a
codefun/P373.cpp
#include <bits/stdc++.h> using namespace std; int main() { double r; cin >> r; double result = r * r * 22.0 / (double)7; cout << round(result); return 0; }
ALGO
0.998666
3.571167
11c50b75-c930-4eb0-bae3-ffe01e2e4432
ernestognw/cpp-fundamentals
firstSorting/firstSorting.cpp
// firstSorting // Ernesto García A00820783 // Creado en Wed Oct 3 21:32:29 CDT 2018 #include <bits/stdc++.h> using namespace std; int main() { int a[] = {5,4,3,2,1}; vector <int> b(a,a+5); //initialised b using elements of a. sort(a,a+5); sort(b.begin(),b.end()); for (auto i:a) { cout<<...
ALGO
0.999659
3.910038
f3eb495d-c4f8-4d85-a061-2f2c4e7e28fc
miemie2013/ncnn_ppyolov2
src/layer/x86/bias_x86.cpp
#include "bias_x86.h" #if __SSE2__ #include <emmintrin.h> #if __AVX__ #include <immintrin.h> #endif // __AVX__ #endif // __SSE2__ namespace ncnn { int Bias_x86::forward_inplace(Mat& bottom_top_blob, const Option& opt) const { int w = bottom_top_blob.w; int h = bottom_top_blob.h; int d = bottom_top_blob.d...
ALGO
0.975923
6.09572
c68c176b-cbcc-42b0-8bc6-cc733b69e0fa
ValentinaCherniaevskaia/cpp_1st_ht
11_valentina.cpp
#include <iostream> int main() { using namespace std; int s=0; double r=0; //объявляем переменную с плавающей точкой std::cout << "Enter the purchase amount: "; //ввод цену за товары std::cin >> s; if (s > 1000) //условие, что скидка только от 1000р { r = s - (s * 0.10) ; //рассче...
TOOL
0.933654
3.352482
c4ab1ccc-5998-4f76-9343-b280aaafa9c8
igorbragaia/algorithms
interviewbit/Linked Lists/Add-Two-Numbers-as-Lists.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ ListNode* Solution::addTwoNumbers(ListNode* A, ListNode* B) { ListNode* p1 = A,*p2 = B,*ans; while(p1 != NULL and p2 != NULL){ p1 = p1->next; ...
ALGO
0.999927
5.730843
f9b2bac5-0783-47e9-8a08-b7cedf9574cb
8bit-nyk/HSLAM
Thirdparty/opencv-3.4.6/samples/cpp/distrans.cpp
#include <opencv2/core/utility.hpp> #include "opencv2/imgproc.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" #include <stdio.h> using namespace std; using namespace cv; int maskSize0 = DIST_MASK_5; int voronoiType = -1; int edgeThresh = 100; int distType0 = DIST_L1; // The output and temporary...
ALGO
0.894839
5.601572
63667162-21e0-4ace-b43a-7665240bced0
wlrnfyd0329/algorithm
ssafy/3주차/14 01 Knapsack.cpp
// knapsack은 유명한 dp 문제다. 해당 가방의 무게가 m 일 때, // i번째 물건을 넣을 것인가 안넣을 것인가를 모두 계산해보면 된다. // dp 점화식을 처음부터 잘 생각해보자. 현재 가방의 무게에서 최대의 가치를 생각해보면 편하다. // 이후, 모든 가방의 무게를 조사하면서 가지고 있는 물건을 넣을지 안넣을지를 결정하면 된다. #include <iostream> using namespace std; int n, k; int dp[105][1005]; int item[105][2]; int main() { ios::sync_with_st...
ALGO
0.999962
4.837942
d79626c2-2f12-4290-b862-f295e6378f36
owlpaw20/CPArchive
省队选拔/[湖南 2008] GT 考试.cpp
#include <string> #include <vector> #include <iostream> const int MAX_M = 25; int N, M, MOD; std::string pat; int pi[MAX_M]; namespace VecMatrix { template <typename T> using Mat = std::vector<std::vector<T>>; template <typename T> void zeroify(Mat<T>& A, size_t R, size_t C) { A.assign(R, std::vector<int>(C...
ALGO
0.999996
5.001598
bd738238-568e-4d72-9e6b-1f8fb398a4ea
hutslib/Advanced-Computer-Graphics
Laplacian_Smoothing/MeshViewer/ext/eigen/bench/spbench/sp_solver.cpp
// Small bench routine for Eigen available in Eigen // (C) Desire NUENTSA WAKAM, INRIA #include <iostream> #include <fstream> #include <iomanip> #include <Eigen/Jacobi> #include <Eigen/Householder> #include <Eigen/IterativeLinearSolvers> #include <Eigen/LU> #include <unsupported/Eigen/SparseExtra> //#include <Eigen/Sp...
ALGO
0.99608
4.29849
b025cf56-c6dc-4300-b9a0-8817251f8ea0
katze-a0/Basic-cpp-problems
3.cpp
//function overloading //on the basis of types of arguments #include<iostream> using namespace std; void display(char); void display(int); void display(float); int main() { char ch='a'; int inum=25; float fnum=54.1; cout<<"character function:"; display (ch); //function call cout<<"integer funct...
TOOL
0.878221
4.91603
b29b3ef7-96fe-40a5-940f-1b37d4551d01
atul120838/e_commerce
e_commerce/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.998724
6.761023
69be98c2-ef5b-4011-a6f1-485bebacc9d5
Ujjwal2017099/leet-code
0023-merge-k-sorted-lists/0023-merge-k-sorted-lists.cpp
class Solution { public: ListNode* mergeKLists(vector<ListNode*>& lists) { if(lists.empty()) return nullptr; return fun(lists,0,lists.size()-1); } ListNode* merge(ListNode* p1,ListNode* p2){ if(!p1) return p2; if(!p2) return p1; if(p1->val<=p2->val){ ...
ALGO
0.999837
6.072254
c2e459b5-21c6-4c0c-a249-8304cf4d3d8d
LUIGGI2007/Luisalcivar_1946
Conjuntas/primer parcial/serie.cpp
#include <iostream> using namespace std; main() { int n, serie, contenedor = 1; double X = 0; int num = 2; int den = 1; cout << "Ingrese el numero de terminos de la serie: "; cin >> n; if (n <= 0) { cout << "El numero de terminos debe ser mayor a 0." << endl; return 1; ...
ALGO
0.999788
3.464691
f5cfa2c9-09ba-4d94-96b9-069df879f224
rohit-omar/Leetcode-Submission
0127-word-ladder/0127-word-ladder.cpp
class Solution { public: //STRIVER int ladderLength(string begin, string end, vector<string> &word) { unordered_set<string> st(word.begin(), word.end()); queue<pair<string, int>> qu; qu.push({ begin, 1 }); while (qu.empty() == ...
ALGO
0.999984
5.417224
309c9cd6-0ad9-4bfe-9564-b6deb8584040
glennlopez/Cpp.Playground
zyBooks/5 - Arrays and Vectors/5.8 - Loop-modify/5.8.4.cpp
#include <iostream> #include <vector> using namespace std; int main() { int maxVal; int NUM_POINTS; unsigned int i; cin >> maxVal; cin >> NUM_POINTS; vector<int> dataPoints(NUM_POINTS); for (i = 0; i < dataPoints.size(); ++i) { cin >> dataPoints.at(i); } for (i = 0; i < NUM_POINTS;...
ALGO
0.999854
3.349242
50de8e4b-f96a-4c8a-9727-b7a1698dee23
Ante-237/GAME_ENGINE_02
Dependencies/bullet/include/Bullet3OpenCL/Raycast/b3GpuRaycast.cpp
#include "b3GpuRaycast.h" #include "Bullet3Collision/NarrowPhaseCollision/shared/b3Collidable.h" #include "Bullet3Collision/NarrowPhaseCollision/shared/b3RigidBodyData.h" #include "Bullet3OpenCL/RigidBody/b3GpuNarrowPhaseInternalData.h" #include "Bullet3OpenCL/Initialize/b3OpenCLUtils.h" #include "Bullet3OpenCL/Paral...
ALGO
0.890283
3.163057
301131f5-f1ca-4876-8ecd-bceb0fb91338
lisa961010/cs100lab3
SelectionSort.cpp
#include "SelectionSort.h" SelectionSort::SelectionSort() { } void SelectionSort::sort(Container* container) { int i, j, first; base* temp; int numLength = container->size(); for (i= numLength - 1; i > 0; i--) { first = 0; // initialize to subscript of firs...
ALGO
0.998442
3.962015
a65688b4-e7c6-427d-b51d-0815e9346121
joat28/DSA-problems
Graphs/bfs.cpp
#include <bits/stdc++.h> using namespace std; void Bfs(vector<int> adj[], int v, bool *visited) { queue<int> q; q.push(v); visited[v] = true; while (!q.empty()) { int front = q.front(); q.pop(); cout << front << " "; for (int x : adj[front]) { if ...
ALGO
0.99999
5.078577
bc229016-ab7b-492b-b1dd-08d838263399
AtulJoshi1206/LeetCPP
Add two numbers.cpp
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list. You may assume the two numbers do not contain any leading zero, except the number 0 itself. ...
ALGO
0.999964
6.507355
17170603-0162-4872-9d3e-0ca09417114d
Juliy6666/Matrix_write_file
Matrix_write_file.cpp
// Matrix_write_file.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <fstream> #include <algorithm> #include <string> #include <vector> using namespace std; void writev(vector <int> V) { } int main() { vector<int> V; ifstream in("mat...
ALGO
0.99539
3.762747
8bf98ce3-93be-4dc6-98e3-cacd3438707f
kimchicaithao/kimchi
77_hangDoi2Dau.cpp
/* NEWPTIT */ #include<bits/stdc++.h> using namespace std; int main(){ vector<int> v; int t; cin>>t; while(t--){ string s; cin>> s; if(s=="PUSHBACK"){ int a; cin>>a; v.push_back(a); } else if(s=="PUSHFRONT"){ int a; cin>>a; v.insert(v.begin(),a); } else if(s=="PRINTBACK"){ if(v...
ALGO
0.999629
4.486807
9ba321bd-af13-4efc-a362-98114c417841
arjunkagwade/practise-programs
Merge2SortedListLL.cpp
//#include<iostream> // //#define STRUCT_LISTNODE_H // //using namespace std; // //struct ListNode //{ // ListNode(int val, ListNode* nextPtr); // int val; // ListNode* next; //}; //ListNode* head = NULL; //ListNode* mergeTwoLists(ListNode* list1, ListNode* list2) //{ // // // if list1 happen to be NULL // ...
ALGO
0.998799
4.367448
1552822f-b150-4f49-b44c-e846c0dab946
hrink/doit_algorithm
008번.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int main(void) { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; vector<ll> a(n, 0); for (int i = 0; i < n; i++) cin >> a[i]; sort(a.begin(), a.end()); int count = 0; for (int k = 0; k < n; k++) { ll sum = a[k]; int i = 0; in...
ALGO
0.999861
4.504201
d92c9115-fec2-4101-bce4-b6ad071c5159
NanQin555/Cpu0-a-new-backend-in-llvm
libcxx/test/std/algorithms/algorithms.results/in_found_result.pass.cpp
// UNSUPPORTED: c++03, c++11, c++14, c++17 // template <class I> // struct in_found_result; #include <algorithm> #include <cassert> #include <type_traits> #include "MoveOnly.h" struct A { explicit A(int); }; // no implicit conversion static_assert(!std::is_constructible_v<std::ranges::in_found_result<A>, std::ran...
TEST
0.92855
7.610383
4bd4e8ec-dedc-4b7c-b490-f7998c5c6e22
SteveT7321/EE6470-Electronic-System-Level-Design-and-Synthesis-HW1
mmfilter_FIFO/mmfilter.cpp
#include <cmath> #include "mmfilter.h" mmfilter::mmfilter(sc_module_name n) : sc_module(n) { SC_THREAD(do_filter); sensitive << i_clk.pos(); dont_initialize(); reset_signal_is(i_rst, false); } // mean_mask const int mask[MASK_X][MASK_Y] = {{1, 1, 1}, {1, 2, 1}, {1, 1, 1}}; // sum = 10 /*const int mask[MASK_N...
TOOL
0.957059
4.711599
6d8e19a9-1897-4658-a111-760f10734367
dihuibao/PKUACM
Box/main.cpp
#include <iostream> using namespace std; int bian[6][2]; int cmp(const void * a, const void * b){ int ia = *(int *) a; int ib = *(int *) b; int iaa = *((int *)a+1); int ibb = *((int *)b+1); if(ia!=ib){ return ia-ib; } else{ return iaa-ibb; } } int main() { int i,a,b; for(i=0;i<6;i++){ cin >> a >> b;...
ALGO
0.999466
3.698421
eaefbd0b-0290-429c-80a2-aae51547e37f
NUC-NCE/algorithm-codes
codes - ac/POJ/2018/17999285_AC_360ms_1696kB.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> using namespace std; typedef long long ll; using namespace std; typedef long long ll; const int maxn = 2e5 + 10; int n, f; double a[maxn]; double sum[maxn]; const double eps = 1e-6; bool check(double ave){ double ret = sum[f-1]-ave*(f-1); ...
ALGO
0.999932
3.405672
d7ec4993-6f14-458c-9405-647b7cd55a08
hidog/http_server
boost_1_63_0_source/libs/compute/perf/perf_stable_partition.cpp
#include <algorithm> #include <iostream> #include <numeric> #include <vector> #include <boost/compute/system.hpp> #include <boost/compute/algorithm/stable_partition.hpp> #include <boost/compute/container/vector.hpp> #include "perf.hpp" int rand_int() { return static_cast<int>((rand() / double(RAND_MAX)) * 25.0);...
ALGO
0.996009
6.12738
d7402426-7587-4faf-9fb0-3e4ee58f2be4
yennanliu/CS_basics
ref_code/leetcode/cpp/0019-remove-nth-node-from-end-of-list.cpp
/* Given head of a linked list, remove nth node from end of list Ex. head = [1,2,3,4,5], n = 2 -> [1,2,3,5] Create 2 pointers "n" apart, iterate until end, will be at nth Time: O(n) Space: O(1) */ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next...
ALGO
0.999948
6.55581
09649ab4-807a-4667-a8b3-6d2246f79453
KanishAnand/CompetitiveCoding
CodeforcesContests/contest#568/5.cpp
#include<bits/stdc++.h> using namespace std; #define lli long long int #define llu unsigned long long int #define fr(va,beg,end) for(lli va=beg;va<end;va++) #define pb push_back #define rt return 0; int main(void){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); lli n,a; vector<lli> diff; vec...
ALGO
0.999984
3.642523
57f172e6-f768-44cf-a744-e6c848eace30
Prahlad-07/Leetcode
0055-jump-game/0055-jump-game.cpp
class Solution { public: bool canJump(vector<int>& nums) { int val=nums[0]; if(nums.size()==1){ return true; } if(nums[0]==0)return false; for(int i=1;i<nums.size();i++){ val--; if(val<=0 && nums[i]==0 && i!=nums.size()-1)return false; ...
ALGO
0.999979
5.999314
0f968e11-b77c-4e31-a65b-346392d7b3c3
Kourin1996/CompetitiveProgramming
AtCoderProblems/ARC/060/a.cpp
// Shrotening #define fst first #define snd second #define pb push_back // Loop #define FOR(i,a,b) for(long i=(a);i<(b);++i) #define RFOR(i,a,b) for(long i=(a);i>=(b);--i) #define REP(i,a) for(long i=0;i<(a);++i) #define RREP(i,a) for(long i=(a);i>=0;--i) #define EACH(i,a) for(auto (i)=(a).begin(),_END=(a).end();i!=...
ALGO
0.999776
3.524972
d70d4bb0-ed6c-4c4d-9a50-afc67907eb3b
Baileyswu/code4fun
poj_code/1291/15349349_AC_0MS_184K.cpp
#include <cstdio> #include <iostream> #include <cstring> #include <queue> #include <algorithm> #include <cmath> using namespace std; #define N 1100 int p[N], a[N], s[N], r[N]; int get(int x){ if(p[x] != x){ int t = get(p[x]); a[x] += a[p[x]]%2; p[x] = t; } return p[x]; } bool merge(int x, int y, int d){ // pr...
ALGO
0.999581
4.126766
f845e35b-29cb-4c37-ac1e-517d55f29a1e
Aadi71/Data-Structures-and-Algorithms-with-Aadi
Striver SDE Sheet/String/longest-common-prefix.cpp
// https://leetcode.com/problems/longest-common-prefix/ class Solution{ public: string longestCommonPrefix(vector<string>& strs) { string temp = ""; for(int i = 0; i < strs[0].length(); i++){ for(int j = 0; j < strs.size(); j++) if(strs[0][i] != strs[j][i]) return temp; temp...
ALGO
0.9998
6.002468
1273fa4a-d5ec-4ec0-afa4-7c34c700edbb
momo-chenchuw/EC327
arrangements.cpp
#include "timer.h" using std::vector; using std::string; using std::cout; using std::sort; class Arrangements { private: // your private data int max_size; string names; vector<string> a, b, arrangements; public: // more stuff here. data and methods Arrangements() { names = "abcdefghijklmnopqrstuv...
ALGO
0.980203
5.749002
1d6103bf-0a49-4426-b0e1-11983cca01ec
sxs-collaboration/spectre
src/PointwiseFunctions/GeneralRelativity/WeylMagnetic.cpp
#include "PointwiseFunctions/GeneralRelativity/WeylMagnetic.hpp" #include <cstddef> #include "DataStructures/LeviCivitaIterator.hpp" #include "DataStructures/Tensor/Tensor.hpp" #include "DataStructures/VectorImpl.hpp" #include "Utilities/GenerateInstantiations.hpp" #include "Utilities/Gsl.hpp" #include "Utilities/Mak...
TOOL
0.980651
6.859912
59c0d9d9-351e-4f6c-9690-79067c636b62
zegiha/algorithm
gold/13913/13913.cpp
#include <iostream> #include <queue> #include <vector> using namespace std; vector <vector <int>> trace; int n, k; bool isArea(int i) { return 0 <= i && i <= 100'000; } void printTrace(int target, int idx) { // cout << "----------" << target << ' ' << idx << '\n'; if(idx == -1) { cout << n << ' '; ret...
ALGO
0.999984
3.996452
ea8a06ad-fb2d-48cb-80ea-2bd1a7579662
ysyszheng/TrafficCat
kdd/kdd99_cmake/src/IpReassembler.cpp
#include "IpReassembler.h" namespace FeatureExtractor { // IpReassembler::IpReassembler() : timeouts() , timeout_interval(timeouts.get_conversation_check_interval_ms()) { } IpReassembler::IpReassembler(Config &timeouts) : timeouts(timeouts) , timeout_interval(timeouts.get_conversation_check_interval_m...
TOOL
0.884451
6.275952
931df11e-9808-41f4-aa8d-1c8d6424ad16
maitreyeegohad/15-Recursion
add_n_integers.cpp
//addition of all integers upto n #include<iostream> using namespace std; int sum(int n) { if (n<=1) return n; else return n + sum(n-1); } int main() { int num; cout<<"Enter a number: "<<endl; cin>>num; cout<<"Sum is: "<<sum(num); } /* OUTPUT: Enter a number: 7 Sum is: 28 */...
ALGO
0.999053
4.209797
b5f1f048-0a64-44bf-9cb3-2268f0077488
ChilliCreek/Competiton-preparation
CSES/Introductory/problemsettask2205.cpp
//https://cses.fi/problemset/task/2205 #include<bits/stdc++.h> using namespace std; int main(){ int bitNum, curr = 1, len = 2; bool arr[16][65536]; cin >> bitNum; memset(arr, false, sizeof(arr)); arr[15][1] = true; while(curr < bitNum){ for(int i = 16 - curr; i < 16; i++){ for(int j = 0; j < len; j++){ ...
ALGO
0.999874
3.645676
9fa21bb4-cb28-4678-9375-185b1b5dc77f
memcpy0/LeetCode-Conquest
Solutions/2461-2470/2469. Convert the Temperature[数学] 简单.cpp
/* ** Problem: https://leetcode.cn/problems/convert-the-temperature ** Article: https://memcpy0.blog.csdn.net/article/details/129680088 ** Author: memcpy0 */ class Solution { public: vector<double> convertTemperature(double celsius) { return {celsius + 273.15, celsius * 1.8 + 32.0}; } };
ALGO
0.990364
6.231994
b0768072-5e33-404c-85a9-1b9ae91f5ea0
kabazoka/PC-Final
third_party/CGAL-5.6.1/examples/Polygon_mesh_processing/corefinement_parallel_union_meshes.cpp
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Polygon_mesh_processing/transform.h> #include <CGAL/Surface_mesh.h> #include <CGAL/Polygon_mesh_processing/corefinement.h> #include <CGAL/Polygon_mesh_processing/repair.h> #include <tbb/parallel_for.h> #include <tbb/blocked_range.h> typed...
ALGO
0.964104
5.263306
d51124eb-0753-493c-b225-0ad3c3fc5e54
ishandutta2007/codeforces
huangxiaohua/normal/1720/D2.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define b(x) (1<<((x)-1)) int i,j,k,n,m,t,f[10050000][2],g[10050000][2][2],it,res,sb; void add(int w,int id,int sb){ int i,j,k,cur=0,t1; for(i=29;i>=0;i--){ j=((w>>i)&1); k=((id>>i)&1); g[cur][j][k]=max(g[cur][j][k],sb); if(f[cur][j^k]==-1)f...
ALGO
0.999565
3.884238
1ae7f9b5-23d5-403d-9600-21c6f489a52a
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_12231_21.cpp
#include <bits/stdc++.h> using namespace std; const long long MXN = 2e5 + 7; const long long MOD = 1e9 + 7; void allday() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); } void relax() { freopen("txt.in", "w", stdin); freopen("txt,out", "r", stdout); } int n, a[MXN], f[MXN], ans[MXN]; vector<pair<int...
ALGO
0.999918
3.435611
3020e7ce-c515-4e14-a8b5-5d686a70d08e
samad-yar-khan/dsa-problemset
DP/catalanNumber.cpp
//https://practice.geeksforgeeks.org/problems/nth-catalan-number0817/1 // #include <boost/multiprecision/ull.cpp> // using boost::multiprecision::ull; #include<bits/stdc++.h> using namespace std; #define modVal 1000000007 #define ll long long #define ull unsigned long long //used to find - num of bsts , bts , bt stru...
ALGO
0.999965
5.806888
2828cd33-3260-4c5f-8e5b-5d441fa8ac61
kmjp/procon
leetcode/101-150/130/1019.cpp
typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define MINUS(a) me...
ALGO
0.999988
5.193173
156839ac-6ba3-45e6-a6b9-8383c4db2ffe
JaxFitch/code
csci-1010/lab/lab-12-practice-3.cpp
/* This program calculates the distance between a point and the origin using the distance formula. Then display the distance to the user. */ #include <iostream> #include <cmath> using namespace std; double calculateDistance(double x, double y) { //Initialize the distance variable and calculate the distance ...
ALGO
0.993187
6.533435
668d0f66-ad04-4cbe-866e-e16353132e1e
hajimeIppo-cmd/cp-codes
Codeforces/Hello 2024/C.cpp
// ans <= n - 2 // #pragma GCC optimize("O3") // #pragma GCC optimize("Ofast") // #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <cassert> using namespace std; #define ll long long #define ull unsigned long long #define ld long double #define pii pair<int, int> #define pll pair<ll, ll> #define...
ALGO
0.999769
5.288
6e12b31a-f2b3-4aa3-b0a3-619d4cf1da14
DanielGoncalves666/Programando
URI/C++/3065.cpp
#include<iostream> using namespace std; int main(){ int N,base,num,qtd = 0; char simbolo; while(true){ if(N == 0) break; if(qtd != 0) cout << endl; qtd++; cin >> base; for(int i=0; i<N-1; i++){ cin >> simbolo >> num; if(simbolo == '+') base += num; else base -= num; } cout...
ALGO
0.967786
3.659223
96ede54b-00fd-4e06-bb9c-dcfba5f64a22
sarvex/leetcode-scala
solution/0400-0499/0450.Delete Node in a BST/Solution.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
1
6.518231
11626925-0333-452d-ac46-e3cfe58b09b7
MetropoliaPeliohj/Peliohjelmointi_projekti2
3rdparty/Box2D_v2.3.0/Box2D/Collision/Shapes/b2PolygonShape.cpp
#include <Box2D/Collision/Shapes/b2PolygonShape.h> #include <new> b2Shape* b2PolygonShape::Clone(b2BlockAllocator* allocator) const { void* mem = allocator->Allocate(sizeof(b2PolygonShape)); b2PolygonShape* clone = new (mem) b2PolygonShape; *clone = *this; return clone; } void b2PolygonShape::SetAsBox(float32 hx,...
ALGO
0.9879
7.926646
abbbc253-7db7-49db-9338-e35bd7b1a9a3
tanawinvisa/DataStructure
movingmed.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(0); int n , w; cin >> n >> w; vector<int> v(n); int m = (w+1)/2; for(int i = 0 ; i < n ; i++){ cin >> v[i]; } if(n == w){ cout...
ALGO
0.999996
3.864508