uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
4cea7510-d833-4947-b7eb-ffb0166d2122
lyronctk/competitive_programming
USACO/visitfj.cpp
#include <cstdio> #include <iostream> #include <algorithm> #include <vector> #include <climits> #include <queue> #include <stack> #include <string> #include <cstring> #include <set> #include <cmath> #include <map> #include <functional> #define ull unsigned long long using namespace std; // clang++ -std=c++11 -stdlib=li...
ALGO
0.999889
4.151541
937d6adb-3e12-4b25-b14e-96f9f6e8727a
chm15/kattis
twostones.cpp
#include <iostream> int main() { int n; std::cin >> n; std::cout << (n%2==0 ? "Bob" : "Alice"); return 0; }
ALGO
0.999783
4.295311
58fd3b2c-ea1d-42e3-b639-6a205cd67637
jarvisye01/algorithm
leetcode_practice/20220827_5/solution.cpp
#include <algorithm> #include <stdio.h> #include <string> #include <vector> using std::string; using std::vector; /* * 1.这道题目就是O(n^2),正常做就行了; * 2.不要想太多; */ class Solution { public: int expandLen(const string & s, int i, int j, vector<int> & pos) { if (i < 0 || j >= s.size() || i > j) { ...
ALGO
0.999985
5.687891
27c381f6-33e9-4e07-aca0-d3afb0749bad
dannyqiu/advent-of-code
2020/day04/p2.cpp
#include <iostream> #include <string> #include <string_view> #include <sstream> #include <vector> #include <unordered_set> #include <unordered_map> #include <regex> std::vector<std::string> split(const std::string& s, char delimiter) { std::vector<std::string> tokens; std::string token; std::istringstream ...
ALGO
0.958361
7.005451
860f373c-da27-4a09-a81a-94dbfc7e15d9
facebookresearch/TransCoder
data/evaluation/geeks_for_geeks_successful_test_scripts/cpp/STACK_PERMUTATIONS_CHECK_IF_AN_ARRAY_IS_STACK_PERMUTATION_OF_OTHER.cpp
#include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include <bits/stdc++.h> using namespace std; bool f_gold ( int ip [ ], int op [ ], int n ) { queue < int > input; for ( int i = 0; i < n; i ++ ) input . push ( ip [ i ] ); queue < int > output; ...
ALGO
0.99967
4.919434
d971618b-8c16-4665-96aa-dc45ef889ebf
Mayankjain2624/Dsa
1058-lexicographically-smallest-equivalent-string/1058-lexicographically-smallest-equivalent-string.cpp
class Solution { public: vector<int> par, size; int findParent(int u){ if(par[u] == u) return u; return par[u] = findParent(par[u]); } void Union(int u, int v){ int up = findParent(u); int vp = findParent(v); if(up == vp) return; if(size[up] > size[vp]){...
ALGO
0.999986
6.229954
681be6f0-aafe-49e6-bd22-a36d6e13b39b
sinian666/codes_102_2
cpp_副本60/chapter_backtracking/preorder_traversal_iii_template.cpp
/** * File: preorder_traversal_iii_template.cpp * Created Time: 2023-04-16 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* 判断当前状态是否为解 */ bool isSolution(vector<TreeNode *> &state) { return !state.empty() && state.back()->val == 7; } /* 记录解 */ void recordSolution(vector<TreeNode *> &state, ve...
ALGO
0.999944
5.798366
50ce7932-2e42-4ee1-89b1-cc13fcaed8f0
webaverse-studios/webaverse
packages/engine-wasm/PhysX/physx/source/geomutils/src/sweep/GuSweepSphereCapsule.cpp
#include "GuSweepSphereCapsule.h" #include "GuSphere.h" #include "GuCapsule.h" #include "GuDistancePointSegment.h" #include "GuSweepSphereSphere.h" #include "GuIntersectionRayCapsule.h" using namespace physx; using namespace Gu; bool Gu::sweepSphereCapsule(const Sphere& sphere, const Capsule& lss, const PxVec3& dir, ...
ALGO
0.974892
6.966771
b428f7ee-5ab9-4d9a-b5b4-d4216d4f39d0
jan-mic/ASD2_W2_Spotkanie
ASD2_W2_Spotkanie/ASD2_W2_Spotkanie.cpp
//niestety nie zdazylem rozwiazac problemu w sytuacji kiedy do spotkania nie dochodzi #include <iostream> #include <vector> #include <algorithm> using namespace std; class Street { public: // age - ulica ze wzgledu na wiek M/D, type - typ ulicy J/D // a - miejsce poczatkowe, b - miejsce koncowe, effort - wysi...
ALGO
0.999417
4.093387
554fecba-7351-4b7d-97dc-107056074740
ahmedalgarbani/doctors_appointment-flutter
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
f258991c-a5f6-4870-9f7e-a2858d2b7dca
ydb-platform/nbs
library/cpp/linear_regression/welford.cpp
#include "welford.h" #include <util/generic/ymath.h> void TMeanCalculator::Multiply(const double value) { SumWeights *= value; } void TMeanCalculator::Add(const double value, const double weight /*= 1.*/) { SumWeights += weight; if (SumWeights.Get()) { Mean += weight * (value - Mean) / SumWeights...
ALGO
0.995679
5.729257
d4cd76cd-3974-4fa0-9417-49581bb45d38
tynnp/CP-Practice
USACO/Daisy Chains.cpp
// #include <iostream> // using namespace std; // int n, ans; // int p[101]; // int main() { // cin >> n; // for (int i = 0; i < n; i++) // cin >> p[i]; // for (int i = 0; i < n; i++) { // for (int j = i; j < n; j++) { // int k = j - i + 1; // int s = 0; // ...
ALGO
0.999861
4.098354
a62b1a67-b849-4c20-b217-9d1687bf657e
Aman-Jain-14/customizedMesos
src/authentication/cram_md5/auxprop.cpp
#include "authentication/cram_md5/auxprop.hpp" #include <mutex> #include <stout/strings.hpp> #include "logging/logging.hpp" // We need to disable the deprecation warnings as Apple has decided // to deprecate all of CyrusSASL's functions with OS 10.11 // (see MESOS-3030). We are using GCC pragmas also for covering c...
TOOL
0.870739
7.468298
fefd5d77-f8f6-4c15-9b27-7e86b21675d4
praveen-AIT/codeforces
topological sort graph.cpp
#include <bits/stdc++.h> #define ll unsigned long long int using namespace std; int max_health(int a[], int n, int s) { if(n < 0) return 0; return max(max_health(a, n-1, s+1), s*a[n] + max_health(a, n-1, s)); } void topoUtil(vector<vector <int> >a, int v, bool visited[...
ALGO
0.999963
4.127864
a65e7691-fef5-43d0-8b58-bbc268ccdb67
ishandutta2007/codeforces
mateocv/normal/1305/F.cpp
#include <bits/stdc++.h> #define pb push_back #define fst first #define snd second #define fore(i,a,b) for(ll i=a,ggdem=b;i<ggdem;++i) #define SZ(x) ((int)x.size()) #define ALL(x) x.begin(),x.end() #define mset(a,v) memset((a),(v),sizeof(a)) #define FIN ios::sync_with_stdio(0);cin.tie(0);cout.tie(0) using namespace std...
ALGO
0.99995
3.50715
21c1c068-8c6e-4003-a0fa-71bbbefbb3ae
krishjagetiya17/Module-3
Conditional Assignment/15_professional course.cpp
/*15. Write a C program to determine eligibility for admission to a professional course based on the following criteria Eligibility Criteria : Marks in Maths >=65 and Marks in Phy >=55 and Marks in Chem>=50 and Total in all three subject >=190 or Total in Maths and Physics >=140 ---- Input the marks obtained in P...
ALGO
0.998872
3.354634
4cd455db-4b50-4017-a4e7-49372a4b7d6f
cdht/Algorithm
ArrayCandy.cpp
/* There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following requirements: Each child must have at least one candy. Children with a higher rating get more candies than their neighbors. What is the minimum candies you m...
ALGO
0.999988
5.340562
be6ec422-f423-4112-90c6-6fce1e310d78
ishandutta2007/codeforces
fishcathu/normal/1411/C.cpp
#include<bits/stdc++.h> #define ls i<<1 #define rs i<<1|1 #define fi first #define se second #define min amin #define max amax #define pb push_back using namespace std; using ll=long long; using pii=array<int,2>; constexpr int N=1E5+10; constexpr int inf=1E9; constexpr int p=998244353; int qpow(int x,int n=p-2){int y=1...
ALGO
0.999884
4.659544
1a00e5be-9083-46c9-8a5e-ed19e6838a2f
thenameisvir/Recursion
Code of fibonacci using recursion.cpp
#include<iostream> using namespace std; int fibonacci(int n){ if(n==0){ return 0; } if(n==1){ return 1; } int f = fibonacci(n-1)+fibonacci(n-2); return f; } int main() { cout<<fibonacci(4); }
ALGO
0.999624
4.432324
abd43a48-627e-4a5c-bf02-333d4f7b6caf
agx/icedove
mozilla/gfx/skia/skia/src/pathops/SkDLineIntersection.cpp
#include "SkIntersections.h" #include "SkPathOpsLine.h" /* Determine the intersection point of two lines. This assumes the lines are not parallel, and that that the lines are infinite. From http://en.wikipedia.org/wiki/Line-line_intersection */ SkDPoint SkIntersections::Line(const SkDLine& a, const SkDLine& b) ...
ALGO
0.998406
6.122826
59849df2-0ff1-49b8-8b6c-e7857d371921
shivam0210/Code-Library
Kallipolis.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ll n; cin>>n; ll a[n], p, result=-1; for(ll i=0;i<n;i++) { cin>>a[i]; } ll max = *max_element(a,a+n); auto itr = find(a, a+n, max); int flag=1; for(ll i=0;i<n;i++) { ...
ALGO
0.999981
3.740463
63506399-b6e5-4097-a3e3-3598900939c9
avineet4/Leetcode-Track
100-same-tree/same-tree.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.999923
6.773306
b6d36c3c-2e76-4021-b2fd-bfa53b0d1a23
yogaagungk/hackerearth_array
BinQue.cpp
#include <bits/stdc++.h> using namespace std; int main() { int sz, in; scanf("%d %d", &sz, &in); int arr[sz+1]; int que; for(int i=1;i<=sz;i++){ scanf("%d", &arr[i]); } for(int i=0;i<in;i++){ scanf("%d", &que); if(que==1){ int a; scanf("%d", &a); arr[a] = !arr[a]; }else if(que==0){ int a,b...
ALGO
0.999949
4.234789
34e46c5e-59d6-4c95-8bd5-28fa9362f002
George-Creekbed/Algorithms
Graphs and Data Structures/medianMaintenance/main.cpp
// compute median maintenance of a series of numbers // organising data either: // 1) in two heaps (running time: O[log(n)]) // 2) in a balanced binary tree (r.t: O[n]) #include <iostream> #include <string> #include <fstream> #include <queue> // priority_queue #include <set> // set #include <functional> // ...
ALGO
0.999794
5.573454
d2d06b55-67c8-4f51-9eef-652932a6639d
Subodhk305/cpp_practiced_codes
cppcodesgit3/20240119-190600.cpp
#include<iostream> #define n 50 using namespace std; int queue[n]; int front=-1; int rear=-1; void enqueue(int x) { if(front ==-1 && rear==-1) { front=rear=0; queue[rear]=x; } else if(rear==n-1) { cout << "queue is full!!" << endl; } else { rear++; queue[re...
ALGO
0.958187
3.944526
2c12edf9-c8cc-4a6f-89f5-eb7df2fbb4b1
PayamEmami/OpenMS
src/openms/source/ANALYSIS/MAPMATCHING/ConsensusMapNormalizerAlgorithmThreshold.cpp
#include <OpenMS/ANALYSIS/MAPMATCHING/ConsensusMapNormalizerAlgorithmThreshold.h> #include <OpenMS/ANALYSIS/MAPMATCHING/ConsensusMapNormalizerAlgorithmMedian.h> #include <OpenMS/CONCEPT/ProgressLogger.h> #include "OpenMS/MATH/STATISTICS/StatisticFunctions.h" using namespace std; namespace OpenMS { ConsensusMapNorma...
CONFIG
0.965909
7.351276
cf71360b-af06-44ec-968f-9d1463d2740c
danielvitor2d/Problem-Set
Dijkstra/Museum/Museum.cpp
/* Author: [UFC-QXD] Daniel Vitor Pereira Rodrigues <<EMAIL>> Problem: Museum Link: https://neps.academy/problem/613, https://www.urionlinejudge.com.br/judge/pt/problems/view/2308 Origin: OBI 2006 - First Phase - Level 2 */ #include <bits/stdc++.h> using namespace std; typedef long long i64; typedef pair<int, int>...
ALGO
0.999955
4.633359
beaf16ab-0f6c-48e3-a611-afa1daff02c9
ranjit-dey/DSA_IN_CPP
JUL_18/08_pattern.cpp
#include<iostream> using namespace std; /* n = 3 A B C A B C A B C */ int main() { cout << endl; int n; cout << "Enter a number : "; cin >> n; int i = 0; while(i < n){ int j = 0; while(j < n){ cout << char(65+j); j++; } cout << endl;...
ALGO
0.999529
3.85201
aec52466-4d95-4bf9-9a10-716909da8ddb
ishandutta2007/codeforces
nikarabika/normal/238/C.cpp
//sobskdrbhvk #include <bits/stdc++.h> using namespace std; typedef long long int LL; typedef pair<int, int> pii; typedef pair<LL, LL> pll; #define PB push_back #define MP make_pair #define L first #define R second #define sz(x) ((int)(x).size()) #define smax(x, y) ((x) = max((x), (y))) #define smin(x, y) ((x) = min...
ALGO
0.999657
3.932577
986b5903-141a-43d8-a323-fd5ac01e4217
wildanrizqiakbari/labdesaindananalisisalgoritma
Pertemuan 1/Praktek/BubleSort.cpp
#include <iostream> using namespace std; void bubbleSort(int arr[], int n){ int i, j, tmp; for(i = 0; i < n; i++){ for(j = 0; j < n - i - 1; j++){ if(arr[j] > arr[j+1]){ tmp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = tmp; } } } } int main(){ int array[100], n, i,j; cout<<"Masukan banyak elem...
ALGO
0.999686
4.801232
837e6077-aaf5-4e1b-a6f3-f4a3b155a8f4
sapnasinghal22/DSA_CPP
Strings/remobve all duplicates in a string II.cpp
// leetcode:-1209 // method1 class Solution { public: bool areLastK_1CharSame(string &ans,char & newch,int j) { int it = ans.size()-1; for(int i=0;i<j;i++) { if(ans[it]!=newch) { return false; } it--; } return true; } string removeDuplicates(string s, ...
ALGO
0.999989
6.14902
e08533c5-a4dd-47a7-8225-b0018e26d8f7
AnasImloul/Leetcode-Solutions
scripts/algorithms/I/Incremental Memory Leak/Incremental Memory Leak.cpp
// Runtime: 8 ms (Top 53.78%) | Memory: 6 MB (Top 85.78%) class Solution { public: vector<int> memLeak(int memory1, int memory2) { int time = 1; while (max(memory1, memory2) >= time) { if (memory1 >= memory2) { memory1 -= time; } else { memory2...
ALGO
0.999608
5.360943
e2261bde-9845-4763-8b93-6cc90799e28b
nikitanosov1/parallel-programming
lab3/simple.cpp
#include <stdio.h> #include <stdlib.h> #include <time.h> #define N_SIZE 3200000 #define ITERATION 12 #define Q 28 int main(int argc, char* argv[]) { int i, j, count; double sum, total_time = 0; double* a = new double[N_SIZE]; double* b = new double[N_SIZE]; double* c = new double[N_SIZE]; for ...
ALGO
0.999377
3.704493
37d36d03-2cf4-4083-9845-85defc1edbd4
Jaypatel18/SchoolWork
CS 327/Assignment1.08/TA_1.08/turn.cpp
#include <stdio.h> #include "character.h" #include "core.h" #include "debug.h" #include "heap.h" #include "turn.h" static int compare(const void *cv, const void *dv) { Character *c = (Character *) cv; Character *d = (Character *) dv; int cturn = c->getTurn(); int dturn = d->getTurn(); if (cturn == dturn) r...
ALGO
0.897113
4.098117
6cb85216-e486-4bb8-8209-82a52d4c8c60
kentony54/C-dungeon
Assignment02_TO.cpp
#include <iostream> #include <iomanip> using namespace std; int main() { float netBalance; int d1; //Number of days of billing cycle. int d2; //Number of days payment is made before billing cycle. float payment; float averageDailyBalance; float interest; float interestRate; cout << "E...
ALGO
0.96636
3.778557
b9939599-7fe1-48bb-8f2e-ac8a415cdad0
tenstorrent/tt-metal
ttnn/cpp/ttnn/operations/experimental/reduction/fast_reduce_nc/device/kernels/reduce_nc.cpp
#include "compute_kernel_api/common.h" #include "compute_kernel_api/eltwise_binary.h" namespace NAMESPACE { void MAIN { // compile-time args constexpr uint32_t num_output_tiles = get_compile_time_arg_val(0); constexpr uint32_t num_input_tiles = get_compile_time_arg_val(1); constexpr uint32_t input_gran...
ALGO
0.997078
7.590149
aed65bec-825f-4964-808f-e3ac91686a71
shanefarris/CoreDependencies
Ode/OPCODE/OPC_OBBCollider.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////...
ALGO
0.963404
7.755217
25cd4963-1440-4825-85d5-f72abf4d9be8
wsyunine/ACM
2025/001/school_summer_contest/E.cpp
#include <bits/stdc++.h> #include <algorithm> #include <queue> using namespace std; #define N 200010 template <typename T> inline void read(T &x) { x = 0; bool flg = 0; char c = getchar(); for(; !isdigit(c); c = getchar()) if(c == '-') flg = 1; for(; isdigit(c); c = getchar()) x = x * 10...
ALGO
0.99994
3.847364
d527a0e4-234e-418b-87d8-c77e16518b98
nikakogho/codeforces
Problems/1220A.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string s; cin >> s; int ones = 0; for(char c : s) ones += c == 'n'; int zeroes = (n - 3 * ones) / 4; for(int i = 0; i < ones; i++) cout << "1 "; for(int i = 0; i < zeroes; i++) cout << "0 "; }
ALGO
0.999926
3.907893
a3c6302c-86c2-421b-8c8e-8769b2dcbfdc
maciejcie2/study_exercises
c++/c++_3(sortowanie)/main.cpp
#include <iostream> #include <cstdio> using namespace std; int main() { double a,b,c,min,max,s; cout<<"program sortuje liczby od najwikszej do najmniejszej"<<endl; cout<<"Podaj liczb a: "<<endl; cin>>a; cout<<"Podaj liczb b: "<<endl; cin>>b; cout<<"Podaj liczb c: "<<endl; cin>>c; cout<<endl; if(( a >= b) && (...
ALGO
0.998919
3.092749
6da526d8-40bb-4ef3-9dc4-80119712079e
AnujLo1c/AI_chat
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
0c2260b0-4451-49c2-9a19-ff7efaecb0cc
agusnurwanto/konversi-bilangan
latihan-lain/Single link list non circular Agus Nurwanto/main.cpp
#include <iostream> #include <conio.h> #include <iomanip> using namespace std; struct node { int data; node* next; } node* head; node* tail; node* curr; node* entry; node* del; void inisialisasi() { head = NULL; tail = NULL; } void input (int dt) { entry = (node* )malloc(sizeof(node)); entry-...
ALGO
0.998785
3.960724
85f2ea5c-afe6-44d9-ad73-c9f26034b790
raincross7/code-similarity
codes/train_code/problem015/problem015_233.cpp
#include <bits/stdc++.h> #define ll long long #define MODV 1000000007 #define INF INT_MAX // 2147483647 #define INFLL LLONG_MAX // 9223372036854775807 #define rep(i, n) for(ll i=0, i##_len=(ll)(n); i<i##_len; i++) #define repf(i, n) for(ll i=1, i##_len=(ll)(n+1); i<i##_len; i++) #define per(i, n) for(ll i=((ll)(n))-1; ...
ALGO
0.999981
4.315087
47c5d1e3-54ed-4932-b3ef-94b9b7d2a8a1
brown0394/algorithm_practice
leetcode/1792.cpp
class Solution { static bool compareD(vector<int>& one, vector<int>& two) { double oned = ((one[0] + 1) / (double)(one[1] + 1)) - (one[0] / (double)one[1]); double twod = ((two[0] + 1) / (double)(two[1] + 1)) - (two[0] / (double)two[1]); return oned < twod; } public: double maxAverag...
ALGO
0.999631
5.633952
5673b902-a381-4f24-9aa5-65ef9902850d
sunbinlangchao/CPlusPlusThings
learn_class/modern_C++_30/compilercompute/WhileLoop.cpp
// // Created by light on 20-1-5. // #include <iostream> using namespace std; // 使用template实现while循环 template<bool condition, typename Body> struct WhileLoop; template<typename Body> struct WhileLoop<true, Body> { typedef typename WhileLoop< Body::cond_value, typename Body::next...
ALGO
0.994889
3.207526
670c3f59-d4ee-4f0d-af6b-7e8bd42400d6
coin3d/coin
src/base/SbDPLine.cpp
/*! \class SbDPLine SbDPLine.h Inventor/SbDPLine.h \brief The SbDPLine class represents a line using double precision coordinates. \ingroup coin_base SbDPLine is used by many other classes in Coin. It provides a way of specifying a directed line (also known as a ray) through a specified point (origin) an...
TOOL
0.857243
6.264215
092e589e-bfd6-43e7-b580-52b806257907
kimziou77/algorithm
boj/동전2.cpp
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <climits> using namespace std; int n, k; vector<int> coin; int check[101]; int min_coin_num = INT_MAX; //int min_coin(int node) { // queue<int> q; q.push(node); // int price = 0, num = 0; // while (!q.empty()) { // int sz = q.size(); ...
ALGO
0.999977
4.129426
cef194f1-2acd-47b8-8383-3dc4b2f42a5d
nckuasrlab/QOPS
xacc-pgo/tpls/antlr/runtime/src/atn/ProfilingATNSimulator.cpp
#include "atn/PredicateEvalInfo.h" #include "atn/LookaheadEventInfo.h" #include "Parser.h" #include "atn/ATNConfigSet.h" #include "support/CPPUtils.h" #include "atn/ProfilingATNSimulator.h" using namespace antlr4; using namespace antlr4::atn; using namespace antlr4::dfa; using namespace antlrcpp; using namespace std...
ALGO
0.99449
5.63354
8641661e-4efd-4594-9fc1-e84da624315c
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/MixtralExpert/top0-100/maximum-value-sum-by-placing-three-rooks-ii-Solution.maximumValueSum/177883_nan.cpp
hook_print (struct t_weechat_plugin *plugin, struct t_gui_buffer *buffer, const char *tags, const char *message, int strip_colors, t_hook_callback_print *callback, void *callback_data) { struct t_hook *new_hook; struct t_hook_print *new_hook_print; if (!callback) return ...
ALGO
0.970809
4.148953
465d4ee1-5b5a-454e-9083-ca5e2fc05b37
peperontino39/9gatusinsakai
hit.cpp
#include "hit.h" //_Ǝlp̓蔻 bool hitting_square(Vec2f pos, Vec2f box_pos, Vec2f box_size) { return (pos.x() >= box_pos.x()) && (pos.x() <= (box_pos.x() + box_size.x())) && (pos.y() >= box_pos.y()) && (pos.y() <= (box_pos.y() + box_size.y())); } /////////////////////////////ubN //P@߂荞񂾂߂ //߂͕ʁX // //C[ẂɁ~ //@@ ...
ALGO
0.987235
3.67756
c6226f2c-d13f-49e0-96f1-cc98fbfbabdc
hadiharb/semaudio
GFFT.cpp
#include "GFFT.h" #include "math.h" GFFT::GFFT(long length){ len = length; xc = new Complex[len]; } GFFT::~GFFT(){ delete [] xc; } void GFFT::fft(CArray& x) { const size_t N = x.size(); if (N <= 1) return; CArray even = x[std::slice(0, N/2, 2)]; CArray odd = x[std::slice(1, N/2, 2)]...
ALGO
0.978015
4.135225
42200934-1ad2-47a2-8689-d2293153deed
NUKEDO/practice_coding
at_coder/ABC/ABC081_B.cpp
#include <bits/stdc++.h> using namespace std; int main() { int N, min_num = INT_MAX, sum; scanf("%d\n", &N); vector<int> num(N); for (int i = 0; i < N; i++) { scanf("%d", &num.at(i)); sum = 0; while(sum <= min_num && num.at(i) % 2 == 0){ sum++; num.at(i) /= 2; } min_num = min(su...
ALGO
0.999972
4.475594
b73d5990-ae1f-4ffd-a9b6-9d70d983b2ff
suryanshu-09/leetcode
283.Move_Zeroes.cpp
class Solution { public: void moveZeroes(vector<int>& nums) { int i = 0; for(int j = 0; j < nums.size(); j++){ if(nums[j] != 0) { swap(nums[i++], nums[j]); } } } };
ALGO
0.99992
6.36707
ba68b2eb-b12c-4847-824e-6d12c20d528e
luxalatium/q_phase
KleinKramers4d.cpp
// ============================================================================== // // KleinKramers4d.cpp // QTR // // Created by Albert Lu on 10/28/19. // <EMAIL> // // Last modified on 3/4/20 // // Note: // // ============================================================================== #include <algorithm> ...
ALGO
0.999872
3.388354
b93e6831-9721-4e60-bcb1-32b63a09940e
hk-117/UVa_solves
vol 109/p10963.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--){ int columns; getchar(); cin>>columns; int possible=1; int northest,southest,differences[columns]; for(int i=0;i<columns;i++){ cin>>northest>>southest; ...
ALGO
0.999717
3.653518
4a756b4c-b6a9-48da-9c76-5aad99a4e1d6
rupav/cp
competitive_coding/contests/Edu77_virtual/B.cpp
#include<bits/stdc++.h> using namespace std; #define fr(i,n) for(int i=0; i<n; i++) #define rep(i, st, en) for(int i=st; i<=en; i++) #define repn(i, st, en) for(int i=st; i>=en; i--) #define sq(a) (a*a) typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; ll mod = 1e9+7; ll gcdll(ll a, ll b){ ...
ALGO
0.999896
4.692504
e16028f0-1b20-46da-8284-bc13b8163ff6
NUC-NCE/algorithm-codes
codes - ac/HDU/4828/12504643_AC_639ms_9512kB.cpp
#include<bits/stdc++.h> #define rep(a,b,i) for(int i=a;i<=b;i++) #define reps(a,b,i) for(int i=a;i>=b;i--) #define sd(x) scanf("%d",&x) #define ss(x) scanf("%s",x) #define sc(x) scanf("%c",&x) #define sf(x) scanf("%f",&x) #define slf(x) scanf("%lf",&x) #define slld(x) scanf("%lld",&x) #define me(x,b) memset(x,b,sizeof(...
ALGO
0.999793
3.886375
8d141162-e45f-47ed-acab-bf1dfcceda9f
dengbohhxx/vscode
leetcode/打家劫舍.cpp
/* class Solution { public: int rob(vector<int>& nums) { int n=nums.size(); if(n==0) return 0; vector<int> dp(n,0);//以i结尾的最高偷盗金额 dp[0]=nums[0]; dp[1]=nums[1]; for(int i=2;i<n;i++) { int max1=0; for(int j=0;j<i-1;j++) ...
ALGO
0.999894
5.449609
20773908-dc2a-4740-8b61-01371573548b
paulamib123/Google-CodeJam
reversort.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; int reversort(vector<int> &arr, int n) { int minimumValIndex = 0; int minimumVal = 0; int cost = 0; for (int i = 0; i < n - 1; i++) { minimumValIndex = i; minimumVal = arr[i]; for (int j = i; j...
ALGO
0.999898
4.994307
d017896f-3ee5-4e7b-a057-2abd4e554c68
premkhandelwal/DSA
LinkedList/Add2Nos.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* addTwoNumbe...
ALGO
0.99962
6.402877
66d97023-f103-483e-9199-37756fd0cd99
thfProjects/Physecs
src/BoundsUtil.cpp
#include "BoundsUtil.h" #include "Components.h" #include "Transform.h" #include <glm/gtx/quaternion.hpp> physecs::Bounds physecs::getBounds(entt::registry& registry, entt::entity entity) { auto transform = registry.get<TransformComponent>(entity); auto col = registry.get<RigidBodyCollisionComponent>(entity); ...
TOOL
0.939365
7.704014
eb9f5115-c8d7-4d2b-9676-3fdcaef3afd0
pranavbharadwaj007/Data-structure-and-Algorithm
LinkedList/intersection-of-two-linked-lists.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *detectCycle(ListNode *head) { if(head==NULL || head->next==NULL) return NULL; ListNode *slow=head; ...
ALGO
0.999872
5.302644
24386e2f-b12d-4d37-a6ae-1ed87fa5c6f9
Mariam-H-Mostafa/Extended_Kalaman_Filter_udacity_p05
src/tools.cpp
#include "tools.h" #include <iostream> using Eigen::VectorXd; using Eigen::MatrixXd; using std::vector; using std::cout; using std::endl; Tools::Tools() {} Tools::~Tools() {} VectorXd Tools::CalculateRMSE(const vector<VectorXd> &estimations, const vector<VectorXd> &ground_truth) { /**...
ALGO
0.989012
6.001514
6665742a-1d4a-414c-989e-2e9975cde4a4
Xan-ca/CF-Submissions
Pricatice-D/P41.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int mincost(int curr,int k,int removedsum,vector<int>&a,vector<int>&b){ if(curr>=size(a))return 0; int t1=0,t2=0; if(k<size(b)){ t1+=mincost(curr, k+1,removedsum,a,b); t1+=0; } int remov=0; int addc=0; for(int i=curr;i<size(a);i++){ if(k>0 && k-1...
ALGO
0.999877
3.895997
d0f7d3aa-0dfb-4832-9eb4-c4b32fb21557
Priyatosh11/DSA-Sheet
SplitLL_inKparts.cpp
class Solution { public: int getlength(ListNode*head) { int len=0; while(head) { head=head->next; len++; } return len; } vector<ListNode*> splitListToParts(ListNode* head, int k) { int listlength=getlength(head); ...
ALGO
0.999708
5.432731
91788d71-1a95-4c9a-aebd-4d884136b87a
kavita121/Coding
ImpartialOfferring_CodeJam.cpp
//code jam women i/o //Impartial Offerrings //Solved #include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; for(int c=0; c<t; c++) { int n; cin>>n; map<int, int> m; int x; for(int i=0; i<n; i++) { cin>>x; if(m...
ALGO
0.999241
4.189699
b84fbe7c-72cd-4962-922e-cee827a6a2e2
hypnorose/spoj_legacy
FLAMASTE.cpp
#include <iostream> using namespace std; int main() { char a[100000]; int j,k,i; cin >> k; for(int b=0;b<k;b++) { cin >> a; j=1; for(i=0;a[i]!=NULL;i++) { if(a[i]==a[i-1])j++; else { if(j>2)cout << j; else if(j==2)cout << a[i-1]; cout << a[i]; j=1; } } if(j>2)cout << j...
ALGO
0.999966
3.371346
84e17971-d606-4abd-ba60-7f17fa490c0c
hjiang13/LLMs-in-IR
POJ-104/3/1775.cpp
#include <iostream> using namespace std; int main(){ int n,k,c,h=0; cin >> "%d%d",&n,&k); int*za=(int*)malloc(sizeof(int)*n); for(int i=0; i<n; i++){ cin >> "%d",&(za[i])); } for(int m=0; m<n-1; m++){ for(c=m+1; c<n; c++){ if(za[m]+za[c]==k){ h++; } } } if(h>0){ cout << "yes"); } else{ cout << "no"); } free(za); return...
ALGO
0.999951
3.784947
052b5524-d58a-4d89-942a-5e241b787aa2
Johannyjm/c-pro
AOJ/AOJ-ICPC/250/5.cpp
#include <bits/stdc++.h> #define rep(i, n) for(int i = 0; i < (n); ++i) #define rep1(i, n) for(int i = 1; i < (n); ++i) using namespace std; using ll = long long; int n; vector<vector<int>>t, dp; int rec(int s, int v){ if(dp[s][v] != 0) return dp[s][v]; if(s == (1<<n)-1) return 0; int ret = 1001001001; ...
ALGO
0.999591
4.702013
b0762963-c446-40fe-9b5d-2571fcfae7ee
ishandutta2007/codeforces
cheetose/normal/1612/C.cpp
#include <bits/stdc++.h> #define mp make_pair #define pb push_back #define X first #define Y second #define y0 y12 #define y1 y22 #define INF 987654321987654321 #define PI 3.141592653589793238462643383279502884 #define fup(i,a,b,c) for(int (i)=(a);(i)<=(b);(i)+=(c)) #define fdn(i,a,b,c) for(int (i)=(a);(i)>=(b);(i)-=(c...
ALGO
0.999889
4.097398
eeea47cd-0b9c-45ac-9dcd-355acdccd40a
BME-MIT-IET/iet-hf-2022-smells-like-team-spirit
code/online_challenges/src/hackerrank/array_manipulation/array_manipulation.cpp
#include <iostream> #include <vector> #include <algorithm> int main() { int n; int m; int a; int b; int k; std::cin >> n >> m; std::vector<std::pair<int, int> > v; for (int i = 0; i < m; ++i) { std::cin >> a >> b >> k; v.push_back(std::make_pair(a, k)); v.push_...
ALGO
0.99991
4.06963
c9718384-a804-4941-8230-d7f39431a2a1
hwk0911/Algorithm
Chapter 33. Greedy algorithm [ING]/BOJ 1931 회의실배정.cpp
#include <iostream> #include <algorithm> #define MAX 4294967295; using namespace std; struct conference { unsigned int start; unsigned int end; unsigned int usingTime = start - end; }; bool cmp(const conference &p1, const conference &p2); int main() { ios::sync_with_stdio(false); cin.tie(NULL); int N; //ȸ ...
ALGO
0.999934
4.360098
266d8169-9bfc-43bb-bf2f-d2c48eac0fc0
potterLim/programming-studio
Lab/DS-CPP/Coding-Test/DS101/main.cpp
#include <iostream> #include "SortLibrary.h" using namespace std; int main() { int count; cin >> count; int* numbers = new int[count]; for (int index = 0; index < count; ++index) { cin >> numbers[index]; } BubbleSortDescending(numbers, count); for (int index = 0; index < c...
ALGO
0.999652
5.36184
09b4a6b4-c33c-49bc-9468-6d2e632a807b
danieltrt/SBFL
TransCoder_tokenized_test_set_functions/cpp/CHECK_IF_ALL_THE_ELEMENTS_CAN_BE_MADE_OF_SAME_PARITY_BY_INVERTING_ADJACENT_ELEMENTS.cpp
bool flipsPossible ( int a [ ], int n ) { int count_odd = 0, count_even = 0; for ( int i = 0; i < n; i ++ ) { if ( a [ i ] & 1 ) count_odd ++; else count_even ++; } if ( count_odd % 2 && count_even % 2 ) return false; else return true; }
ALGO
0.978509
4.202244
302f2ee8-475e-49f4-9c33-f46eeeb9bc9b
nikpopesku/competitive_programming
atcoder/200-299/d/abc241_d.cpp
#include <iostream> #include <set> int main() { int q, type, k; long long x; std::cin >> q; std::multiset<long long> s; for (int i = 0; i < q; ++i) { std::cin >> type; if (type == 1) { std::cin >> x; s.insert(x); } if (type == 3) { ...
ALGO
0.999898
5.050333
ecdf7d0a-a362-4e9b-b023-0d2e16d9a3aa
Mohamed-khattab/LeetCode-Problems
12. Integer to Roman.cpp
class Solution { public: string intToRoman(int num) { string ones[]={"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"}; string tens[]={"", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"}; string hundreads[]={"","C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM"}; ...
ALGO
0.998905
6.190997
ea78258b-0371-477e-a7a5-528344151b71
Taejin1221/Re-PS
Baekjoon/Baekjoon16168.cpp
// Baekjoon16168.cpp #include <iostream> using namespace std; bool visited[3'001]; vector<int> adjList[3'001]; void dfs(int i) { visited[i] = true; for (int& adjV : adjList[i]) if (!visited[adjV]) dfs(adjV); } int main(void) { ios_base::sync_with_stdio(false); cin.tie(0); in...
ALGO
0.99999
4.594726
ab78da10-8912-4f27-a838-9475bd63d166
MiguelRavello/ICC2
set2/set2.cpp
#include<iostream> #include<cmath> #include<cstdlib> //rand() #include<ctime> //time() using namespace std; /* problema 3.1 */ /* Se declara el prototipo de la funcion, para informar al compilador * que existe, y luego definir el cuerpo de la funcion en cualquier lugar */ void printNum(int); /* problema 3.2 */ /* vo...
TOOL
0.98037
3.575925
e614e221-7732-41d5-bd8a-5cc30a432892
anwar-opu/problem-solving-using-C_and_C_plus_plus
1633A.cpp
#include<bits/stdc++.h> #define ll long long int #define FastIO ios_base::sync_with_stdio(false), cin.tie(0) using namespace std; int main(){ FastIO; ll t; cin>>t; while(t--) { ll n,ans = 0; cin >> n; if (n % 7 == 0) { cout << n << endl; } else { ...
ALGO
0.999656
3.918598
f2f83d2a-bc16-405d-bfc5-3110c7a5fa7d
dotOS-FE/android_frameworks_av
media/libeffects/lvm/lib/Common/src/FO_2I_D16F32Css_LShx_TRC_WRA_01_Init.cpp
/*-------------------------------------------------------------------------*/ #include "BIQUAD.h" #include "FO_2I_D16F32Css_LShx_TRC_WRA_01_Private.h" /*-------------------------------------------------------------------------*/ /* FUNCTION: */ /* FO_2I_D...
ALGO
0.99659
5.721498
f4864793-ff19-4a70-a2cc-00cc8a5692f9
taskul/tictactoeGame
ttt.cpp
#include <iostream> #include "ttt.hpp" // ttt.hpp header file bring in the following variables: player_name_1, player_name_2, winner using namespace std; int main() { gameIntro(); playerNames(); while (winner == ' ') { printboard(); cout << player_name_1 << " turn" << endl; ma...
ALGO
0.951898
4.110098
5014aeec-a5a0-4634-9a43-54260dd30e9d
vuthanhlan/Subjects
LAP TRINH HUONG DOI TUONG/O3/O3.2.cpp
#include<iostream> #include<fstream> using namespace std; class HTG { private: int a,b,c; public: float operator++(); friend istream& operator>>(istream &in,HTG &x); friend ostream& operator<<(ostream &out,HTG y); }; float HTG::operator++() { return (float)(a+b+c); } istream& operator>>(istream& in,HTG &x)...
ALGO
0.990187
3.040503
cdf2d36f-e2df-4ced-8100-e72553f53a6c
musnows/Lets-OJ
oj/poolblue/牛客网/HJ64 MP3光标位置.cpp
//https://www.nowcoder.com/practice/eaf5b886bd6645dd9cfb5406f3753e15?tpId=37&tqId=21287&ru=/exam/oj //HJ64 MP3λ #include <iostream> #include <string> using namespace std; int main() { int n=0; string cmd(""); int num=1; while(cin>>n>>cmd) { //б1-10numǰţfirstǵǰҳĵһ׸ if(n<=4)//Сڵ4 ...
ALGO
0.999809
3.428843
f5c2d7c2-4a1c-4ada-8567-d9f7f308c03e
AdityaKarn/cp-cpp
codeforces/388Div2/D.cpp
#include <bits/stdc++.h> #define REP(i, n) for (int i = 1; i <= n; i++) #define mod 1000000007 #define pb push_back #define ff first #define ss second #define ii pair<int, int> #define vi vector<int> #define vii vector<ii> #define lli long long int #define INF 1000000000 #define IOS \ ios::sync_wi...
ALGO
0.999939
3.865789
42eb381b-94d1-4eb1-bd47-4ae2407d7da4
Account-LJY/codetree-TILs
231218/palindrome 여부 판단하기/determine-whether-palindrome-is-present.cpp
#include <iostream> #include <string> using namespace std; bool aaa(string s) { int size = s.length(); for (int i = 0; i < size / 2; i++) { if(s[i] != s[size - i - 1]) { return false; } } return true; } int main() { // 여기에 코드를 작성해주세요. string str; cin >> str; ...
ALGO
0.999752
5.289114
6f435a22-2c01-4aa9-83c0-69a87ed7ceeb
imyourm8/arena.io
server/box2c/Box2C/Box2D_v2.1.2/Box2D/Box2D/Dynamics/Contacts/b2CircleContact.cpp
#include <Box2D/Dynamics/Contacts/b2CircleContact.h> #include <Box2D/Dynamics/b2Body.h> #include <Box2D/Dynamics/b2Fixture.h> #include <Box2D/Dynamics/b2WorldCallbacks.h> #include <Box2D/Common/b2BlockAllocator.h> #include <Box2D/Collision/b2TimeOfImpact.h> #include <new> b2Contact* b2CircleContact::Create(b2Fixture*...
ALGO
0.921017
6.931972
28c8e472-78dd-45b0-9f75-ebf51ef2ffb1
VeerSinghLodhi/100-Days-Series
100-Days-Series/Day 28/LCMUsingRecursion.cpp
#include<iostream> using namespace std; // Recursion Method to find GCD int getGCD(int num1,int num2){ if(num2==0){ return num1; } return getGCD(num2,num1%num2);// Recursion Step. } // method to find LCM using the recursion GCD. int getLCM(int num1,int num2){ return (num1*num2)/getGCD(num1,num2...
ALGO
0.999796
5.041372
5ea31fdf-68f7-4201-8ee7-2e0848b649a3
flxcsx/Cf_solved
41a.cpp
/* ALTXT */ #include <bits/stdc++.h> using namespace std; #define ll long long const int inf = 1e9 + 5; const int64_t INF = 1e18 + 5; void solve() { string s, t; cin >> s >> t; int n = s.size(); for (int i = 0; i < n; i++) { if (s[i] != t[n - (i + 1)]) { cout << "NO"; ...
ALGO
0.999989
4.47696
ae708388-865c-463d-874c-c963dd390652
TarunSaini063/Coding
DataStructure/codeforces/267_4.cpp
#include <bits/stdc++.h> using namespace std; #define ld double #define ll long long #define pb emplace_back #define mk make_pair #define mod 1000000007 #define ff first #define ss second #define sz(x) (int)x.size() #define FIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define all(x) x.begin(),x....
ALGO
0.999808
4.598014
7adbe986-60ca-49d1-8dda-f0959d3db787
manikanta2901/ubuntu
.history/codingChallenges/cpp/Codechef/longChallenges/Year2021/January/WatchingCpl_20210101180630.cpp
#include<bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #define vv vector #define F first #define S second #define MP make_pair #define EXECUTE_FASTER ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define printM...
ALGO
0.999983
3.968487
8ea3a108-1122-4b69-a9c0-fa20f241993d
alexandraback/datacollection
solutions_5670465267826688_1/C++/vishalkarve15/C.cpp
#include<bits/stdc++.h> using namespace std; #define pii pair<int,int> #define mp make_pair #define pb push_back #define ll long long char a[800010]; int main() { int t; scanf("%d",&t); map<char,char> Ne; Ne['i']='j'; Ne['j']='k'; Ne['k']='i'; for(int tt=1;tt<=t;tt++) { int...
ALGO
0.999933
3.206651
28e481d6-e285-4f5a-ae76-16d8ece84d17
raincross7/code-similarity
codes/train_code/problem099/problem099_85.cpp
#include<bits/stdc++.h> using namespace std; int a[20009],b[20009]; int main(){ int n; int p[20009]; cin>>n; for(int i=1;i<=n;i++){ cin>>p[i]; } for(int i=1;i<=n;i++){ a[p[i]]+=i; b[p[i]]+=i; } for(int i=1;i<=n;i++){ a[i]+=a[i-1]; } for(int i=n;i>=1;i--){ b[i]+=b[i+1]; } f...
ALGO
0.999905
3.062312
2ba287d1-1253-40ab-9fbc-dae195ccab2f
siluhuayu/LeetCode
LeetCode18.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; vector<vector<int>> fourSum(vector<int>& nums, int target){ int n = nums.size(); vector<vector<int>> res; if(n < 4) return res; sort(nums.begin(),nums.end());// for(int i = 0; i < n - 3; i++){//ȹ̶һԪ if(i > 0 && nums[i] == nums...
ALGO
0.999958
3.529923
0ab27533-53a5-49a6-a0ba-afd65ed8aae4
Andre-Natu/AlgoritmoVND
ILS.cpp
#include "ILS.h" #include <random> #include "AlgoritmoGuloso.h" #include "SwapAdjacencia.h" #include "VND.h" bool criterioAceitacao(PedidoData& pedidos, std::vector<Solucao>& solucao , std::vector<Solucao>& novaSolucao,int melhorMultaNovaSolucao, int melhorMultaTotal) { // se a nova solução for melhor, copia ela...
ALGO
0.999911
4.430089
eb43388d-f98e-4907-bd8e-e92e7c171229
SPHewitt/fsi-workshop
src/FluidSolidInteraction/numerics/eigen/doc/examples/TutorialLinAlgSelfAdjointEigenSolver.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix2f A; A << 1, 2, 2, 3; cout << "Here is the matrix A:\n" << A << endl; SelfAdjointEigenSolver<Matrix2f> eigensolver(A); if (eigensolver.info() != Success) abort(); cout << "The eigenvalues of A ...
ALGO
0.999244
3.846247
6855ca9a-cd0b-4383-9bda-3c0f29da80d4
conlacda/algo-practice
cses/Dynamic programming/Counting Numbers.cpp
// https://cses.fi/problemset/result/6240469/ // Counting Numbers #include<bits/stdc++.h> #define int long long // __int128 using namespace std; #ifdef DEBUG #include "debug.cpp" #else #define dbg(...) #define show_exec_time() #define destructure(a) #a #endif #define dpcase(x, y) \ dp[index][digit][x] += ...
ALGO
0.999918
5.3336
06b77da1-6da4-4cb4-9c46-c4ca491c2cba
01dnot/KattisProblems
Pivot/pivot.cpp
#include <iostream> using namespace std; #define INT_MAX 2147483647 #define INT_MIN (-2147483647-1) int main() { int NUMBERS; cin >> NUMBERS; int array[NUMBERS], maxArr[NUMBERS], minArr[NUMBERS]; int max = INT_MIN; for (int i = 0; i < NUMBERS; i++) { int current; cin >> current;...
ALGO
0.999966
4.607257
47b79c0f-0dc7-49a9-b0b1-c50e4764771e
jeffmbelt/MarlinFirmware-Ender-3-max
Firmware/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.cpp
#include "pins_arduino.h" #ifdef __cplusplus extern "C" { #endif // Digital PinName array const PinName digitalPin[] = { PA_0, // Digital pin 0 PA_1, // Digital pin 1 PA_2, // Digital pin 2 PA_3, // Digital pin 3 PA_4, // Digital pin 4 PA_5, // Digital pin 5 PA_6, // Digital pin 6 PA_7, // Dig...
CONFIG
0.915966
6.350003
def54d5e-63a3-46e7-96e6-1ca7c4f6f8f3
jpascoe32fb/CPSC_8200
prog1/code/mandelbrot_threads/mandelbrotThread.cpp
#include <stdio.h> #include <pthread.h> #include <algorithm> #include "CycleTimer.h" typedef struct { float x0, x1; float y0, y1; unsigned int width; unsigned int height; int maxIterations; int* output; int threadId; int numThreads; } WorkerArgs; extern void mandelbrotSerial( floa...
ALGO
0.970114
5.133407
b048dd39-3ccf-4a42-9fa7-73bfab770fad
MohammadAasim/C-
Traverse.cpp
#include<bits/stdc++.h> 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;i++){ cout<<arr[i]<<" "; } }
ALGO
0.997995
3.417651