uuid
stringlengths
36
36
repo_name
stringlengths
5
123
relative_path
stringlengths
5
4k
content
stringlengths
33
2.85M
category
stringclasses
6 values
algo_rel_score
float64
0.85
1
quality_score
float64
3
8.76
d33929d5-cd53-41e3-8985-9dacb88939ec
AntonBerShag/W4
W4/W4.cpp
#include <iostream> #include <stdlib.h> #include <time.h> using namespace std; template <typename T> int searchIndex(T array[], int length, T key, int begin = 0) { for (int i = begin; i < length; i++) if (array[i] == key) return i; return -1; } template <typename T> int lastSearchIndex(T array[], int length, T...
TOOL
0.994514
3.04387
75fd86be-1c33-4f5d-9952-a922b69f4d00
ishandutta2007/codeforces
demoralizer/normal/1514/B.cpp
#include "bits/stdc++.h" using namespace std; #define int long long #define pb push_back #define ppb pop_back #define pf push_front #define ppf pop_front #define all(x) (x).begin(),(x).end() #define uniq(v) (v).erase(unique(all...
ALGO
0.999977
4.98769
2e31017e-6c29-40cb-afc0-557948d2a075
jefmoura/movie_recommender
src/algorithm/TFIDFInvertedValue.cpp
#include "TFIDFInvertedValue.hpp" using namespace std; TFIDFInvertedValue::TFIDFInvertedValue() {} int TFIDFInvertedValue::getPosition() { return this->position; } void TFIDFInvertedValue::setPosition(int position) { this->position = position; } Movie TFIDFInvertedValue::getMovie() { return this->movie; } vo...
TOOL
0.956366
4.071188
d330317e-ae8f-4ec3-8c9e-08466970cf6a
PhysicsBatman/BrianStone-CSCI20-Fall2016
railgun/railgun.cpp
// Virtual Railgun Rockets #include <iostream> #include <cmath> using namespace std; class Railgun { private: double railgunMass; double fuelMass; double exhaustV; public: void describe(double inputRailgunMass, double inputFuelMass, double inputExhaustV) { railgunMa...
TOOL
0.972794
4.3473
d4d6f6d2-1a01-4b05-bd89-b20cce0f0478
mumba-org/mumba
third_party/boost/src/libs/multi_array/example/foreach_test2.cpp
// Boost.MultiArray Library // Authors: Ronald Garcia // Jeremy Siek // Andrew Lumsdaine // See http://www.boost.org/libs/multi_array for documentation. #include "boost/multi_array.hpp" #include "for_each.hpp" #include <algorithm> struct times_five { double operator()(const int& val) { return...
ALGO
0.959498
5.513117
b26ba734-33e4-4137-a44c-4c6d68ef11bd
Sean-Lan/Armory
UnionFind/numberOfConnectedComponentsInAnUndirectedGraph.cpp
/** * * Sean * 2016-12-05 * * https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/ * * Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to find the number of connected components in an undirected graph. * * Ex...
ALGO
0.999952
6.883963
6fb89756-0e82-4799-9a99-a78e7e313212
Hyeonjun0527/newCodingTest
3_1_data_structure/6_스택/중위후위변환알고리즘.cpp
#include <iostream> #include <stack> #include <string> using namespace std; // 연산자의 우선순위를 반환하는 함수 int precedence(char op) { if (op == '+' || op == '-') return 1; // 덧셈, 뺄셈: 낮은 우선순위 if (op == '*' || op == '/') return 2; // 곱셈, 나눗셈: 높은 우선순위 return 0; } // 중위 표기식 → 후위 표기식으로 변환하는 함수 string inf...
ALGO
0.99996
6.430043
5abe76be-f186-45e2-995e-60edd8bc0adc
mdnrkn/aiub_bin
[0] Introduction To Programming Lab (C++)/[7] 21 Nov, 2023/[1] Function related/task1.cpp
// Leap year finding program using Function #include <iostream> using namespace std; void leapYear(int year) { if (year % 400 == 0 || year % 100 == 0 && year % 4 == 0) cout << year << " : It's a leap year."; else cout << year << " : It's not a leap year."; } int main() { int year; cin >...
ALGO
0.999517
4.040719
eeb1223e-29cf-4095-8765-49fda5a2cae6
FaadCoder/Leetcode-Solutions
2381-shifting-letters-ii/2381-shifting-letters-ii.cpp
class Solution { public: string shiftingLetters(string s, vector<vector<int>>& shifts) { unordered_map<int, int> mp; for(auto shift : shifts) { mp[shift[0]] += shift[2] ? 1 : -1; mp[shift[1] + 1] += shift[2] ? -1 : 1; } for(int i = 1;...
ALGO
0.999959
6.330015
c5c3e28a-4708-4047-a351-5a4c37857baf
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_4116_18.cpp
#include <bits/stdc++.h> using namespace std; inline char gc() { static char buf[100000], *p1 = buf, *p2 = buf; return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2) ? EOF : *p1++; } inline long long read() { long long x = 0; char ch = getchar(); bool positive...
ALGO
0.999909
3.777241
0f4cebba-23b7-4d6a-9dc2-87072d8f9fa1
GhagSagar23/legendary-system
financeapp/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.997743
6.76073
233f6ee3-1a51-4ac8-b49a-52f04e0ddf53
dsbda-prac/ai
nQueen.cpp
#include <iostream> #include <vector> using namespace std; bool isSafe(vector<int>& board, int row, int col, int n) { for (int i = 0; i < row; ++i) { int queenCol = board[i]; if (queenCol == col || abs(queenCol - col) == abs(i - row)) return false; } return true; } bool solveNQ...
ALGO
0.999954
6.33224
e0e1dbfb-bbf3-4d8d-9f77-c039fd04d578
hvdieu/mycode
Cpp/permutation-of-natural-numbers.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> ii; typedef pair<long long, int> lli; typedef long long ll; typedef unsigned long long ull; #define For(i,a,b) for(int i=a;i<=b;i++) #define Rep(i,a,b) for(int i=a;i>=b;i--) #define fi first #define se second #define pb push_back #define sz(s) int(s...
ALGO
0.999855
3.106195
c244e1d4-e6b1-4042-8118-ddb1b9e6842c
shai-bit/hp-assignment
prueba2/libs/boost_1_81_0/libs/mpi/src/cartesian_communicator.cpp
// Authors: Alain Miniussi #include <algorithm> #include <cassert> #include <boost/mpi/cartesian_communicator.hpp> #include <boost/mpi/detail/antiques.hpp> namespace boost { namespace mpi { std::ostream& operator<<(std::ostream& out, cartesian_dimension const& d) { out << '(' << d.size << ','; if (d.periodic) {...
TOOL
0.944342
6.390515
08043e96-e1c2-496d-af43-4df154fec83d
beelisais2793/FX
Synthesizer/Waves/PhysicalModel/Physically-based-modelling/FluidSimulation/FluidSimulation/include/eigen-eigen-323c052e1731/bench/geometry.cpp
#include <iostream> #include <Eigen/Geometry> #include <bench/BenchTimer.h> using namespace std; using namespace Eigen; #ifndef SCALAR #define SCALAR float #endif #ifndef SIZE #define SIZE 8 #endif typedef SCALAR Scalar; typedef NumTraits<Scalar>::Real RealScalar; typedef Matrix<RealScalar,Dynamic,Dynamic> A; type...
ALGO
0.959439
5.941502
e9e207ac-f7c8-432a-b49b-713c6d997c5a
ishandutta2007/codeforces
alishahali1382/normal/1011/E.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int n, k, tmp, x; int gcd(int a, int b){ if (!b) return a; return gcd(b, a%b); } int main(){ cin>>n>>k; x=k; for (int i=0; i<n; i++){ cin>>tmp; x=gcd(x, tmp%k); } if (x==0){ cout<<1<<endl<<0<<endl; return 0; } cout<<k/x<<endl; for (...
ALGO
0.999976
3.15087
86a3cb6b-091e-49da-bf7d-9b285a9b39df
ElliottDylan60/CyberSecurity
Project 2/A51 Encryption/a51.cpp
#include <iostream> #include <bitset> using namespace std; int main(){ int binaryDataX = 0b1010101010101010101; // 19 bits int binaryDataY = 0b1100110011001100110011; // 22 bits int binaryDataZ = 0b11100001111000011110000; // 23 bits bitset<19> LFSR_1(binaryDataX); bitset<22> LFSR_2(binaryDataY);...
ALGO
0.999684
3.732681
8ae5a464-7382-4b8d-9ad0-17eb15461687
EunJung516/BOJ
00001~05000/4196_도미노.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; const int MAX = 100010; int T, N, M, x, y, cnt, ans, scc, num[MAX], chk[MAX], res[MAX]; vector<int> st, v[MAX]; int dfs(int a) { num[a] = ++cnt; int mn = cnt; st.push_back(a); for (int i : v[a]) { if (!num[i]) mn = min(mn, dfs(i)); ...
ALGO
0.999944
5.590244
ce435e17-e9e6-4a96-b912-64b93b8cbcf6
ishandutta2007/codeforces
emorgan5289/normal/128/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; const int inf = 1e9; const ll inf_ll = 1e18; #define all(x) (x).begin(), (x).end() #define pb push_back #ifdef ONLINE_JUDGE #define debug(...) #else #include "../../debug.cpp" #endif template<int N> struct automaton {...
ALGO
0.999999
4.181905
9352f9df-5ad0-4fac-bf77-110ee64df2d8
yuforest/contests
tenkei_90/044/main.cpp
// ここは競プロではサボりがちです #include <bits/stdc++.h> using namespace std; // デバッグ用マクロです。詳しくは https://naskya.net/post/0002/ #ifdef LOCAL #include <debug_print.hpp> #define debug(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__) #else #define debug(...) (static_cast<void>(0)) #endif // 節操ないですが、競プロでは便利です。 using ll = long ...
ALGO
0.999925
4.595941
32730717-8950-4c14-af1f-f7b0e8518b4a
a6ygale/Programming-II
maxAddedRoute.cpp
#include <iostream> #include <vector> #include <stack> using namespace std; /////////////////////////////////////////////////// // Takes heap tree root node and traverses to find // the highest sum resulting from addition of // traversed node values /////////////////////////////////////////////////// struct Node ...
ALGO
0.999717
4.601916
d517a797-2a39-4fad-9550-7a06ffba0dc7
toxicparanoid/kurs_Cplusplus
3 блок/3 дз/1.cpp
#include <iostream> #include <vector> using namespace std; void merge_sort(int* arr, int size) { if (size <= 1) return; int mid = size / 2; int* left = arr; int* right = arr + mid; merge_sort(left, mid); merge_sort(right, size - mid); vector<int> temp(size); int i = 0, j = 0, k = 0; ...
ALGO
0.999972
5.368324
71645c02-76c9-4f69-bf1e-c9104d2e652a
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_3266_2.cpp
#include <bits/stdc++.h> using namespace std; const int NR = 1e5 + 10; const int mod = 1e9 + 7; void Min(int& x, int y) { x = min(x, y); } void Max(int& x, int y) { x = max(x, y); } int read() { int x = 0, f = 1; char ch = getchar(); while (ch > '9' || ch < '0') { if (ch == '-') f = -1; ch = getchar(); ...
ALGO
0.999974
4.828097
42d5a90e-a19f-487b-881c-5df10219ddff
abhijeetsde1/DSA
Leetcode Top Interview Questions/solutions/Search a 2D Matrix II.cpp
/* Search a 2D Matrix II ===================== Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted in ascending from left to right. Integers in each column are sorted in ascending from top to bottom. Example: Consider th...
ALGO
0.999977
6.895442
2a3c4870-1a2f-4e6b-b3cb-5fbdc44a429a
xinjianLiu/gromacs_fhmd-langevin_localthermostat
src/gromacs/gmxana/gmx_order.cpp
#include "gmxpre.h" #include <cmath> #include <cstring> #include <algorithm> #include "gromacs/commandline/pargs.h" #include "gromacs/commandline/viewit.h" #include "gromacs/fileio/confio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/cmat.h" #include "gromacs/gmxana/g...
ALGO
0.999496
6.028904
2f1835c9-552d-4a1a-aab6-39756d062c73
ishandutta2007/codeforces
axs7384/normal/1483/C.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long const ll inf=1e13+7; const int N=300005; int a[N],p[N],v[N],l[N],r[N]; ll t[N*4],tag[N*4]; int n,m; set<int> s; inline void build(int x,int l,int r) { tag[x]=-inf; if (l==r) { if (l==0) t[x]=0; else t[x]=-inf; } else { int mid=(l+r)/2; ...
ALGO
0.999972
3.592842
553a7a79-5fb4-4697-b437-0e718d50ba0b
LeeBumSeok/Practice_algorithm
silver5/1436_director_shom.cpp
#include <iostream> using namespace std; int main() { int N; cin >> N; int cnt = 0; string tmp; for (int i = 666; i; i++) { tmp = to_string(i); if (tmp.find("666") != string::npos) cnt++; if (cnt == N) { cout << i << endl; b...
ALGO
0.97328
3.766711
7869e46d-aade-4457-bd75-8c2b90e6691f
chucknology/boost-155
boost_1_55_0/libs/graph/example/fibonacci_heap.cpp
using namespace boost; int main() { typedef indirect_cmp<float*,std::less<float> > ICmp; int i; boost::mt19937 gen; for (int N = 2; N < 200; ++N) { uniform_int<> distrib(0, N-1); variate_generator<boost::mt19937&, uniform_int<> > rand_gen(gen, distrib); for (int t = 0; t < 10; ++t) { std::vec...
TEST
0.985098
5.061003
342c786e-d54a-4967-a7bc-551ff611fefe
martinsuarezz/tp-TDL
benchmarks/benchmark.cpp
#include <vector> #include <iostream> int main(){ size_t vectorSize = 100000; std::vector<int> numbers(vectorSize); for (int i = 0; i < vectorSize; i++){ numbers[i] = i; } for (int i = 0; i < vectorSize; i++){ if (numbers[i] % 2 == 0) numbers[i] *= -1; } i...
ALGO
0.997606
4.708829
10128d33-3653-4607-8e35-19da725b790b
shashankdangi5423/whisper
vector-crypto.cpp
#include <iostream> #include <cfenv> #include <cmath> #include <climits> #include <cassert> #include "crypto-util.hpp" #include "functors.hpp" #include "instforms.hpp" #include "DecodedInst.hpp" #include "Hart.hpp" using namespace WdRiscv; template <typename URV> void Hart<URV>::execVandn_vv(const DecodedInst* di) { ...
TOOL
0.985573
6.492548
403ada7f-81b9-4a8c-b224-4de21671e6b6
ps3dev/mesa-7.10.2-PS3
src/glsl/opt_algebraic.cpp
/** * \file opt_algebraic.cpp * * Takes advantage of association, commutivity, and other algebraic * properties to simplify expressions. */ #include "ir.h" #include "ir_visitor.h" #include "ir_rvalue_visitor.h" #include "ir_optimization.h" #include "glsl_types.h" /** * Visitor class for replacing expressions wi...
ALGO
0.990232
6.562182
ab68afeb-877d-4fa7-af49-4e2f98066510
cvsfengs/ITbase
DataStructAndAlgorithms/TencentPractice/把数组排成最小的数.cpp
#include <vector> #include <iostream> #include <string> #include <algorithm> using namespace std; class Solution { public: static bool cmp(int a,int b){ string A=""; string B=""; A+=to_string(a); A+=to_string(b); B+=to_string(b); B+=to_string(a); ...
ALGO
0.999835
5.73033
f7c83719-560d-4bc9-98b1-dc4bb8955a78
RoyalBosS-Ayush/100-Days-OF-DSA-CPP
Day13/01.cpp
#include <iostream> using namespace std; void update(int **p) { **p += 1; // change *p += 1; // change p += 1; // no change } int main() { int i = 7; int *ptr = &i; int **ptr2 = &ptr; cout << "Before \n"; cout << "&i = " << &i << endl; cout << "ptr = " << ptr << endl; cou...
ALGO
0.977696
3.525782
5641b2ef-62af-4752-95ed-9bb9fe0ae6e6
Haricharan1212/CP
oldcode/D_Array_Collapse.cpp
// Haricharan #include <bits/stdc++.h> using namespace std; #define int long long int #define vi vector<int> #define vii vector<vector<int>> #define vb vector<bool> #define pi pair<int, int> #define si set<int> #define rep(var, l, r) for (int var = l; var < r; var++) const int N = 10; int tree[2 * N]; int n; // func...
ALGO
0.999555
3.906123
20dd55ea-8816-45fe-8544-caf646e9ad52
AhmedZahRan7/LeetCode-Solutions
1779. Find Nearest Point That Has the Same X or Y Coordinate.cpp
class Solution { public: int nearestValidPoint(int x, int y, vector<vector<int>>& points) { int minManhattan = INT_MAX; int minIdx = -1; for(int i=0;i<points.size();i++){ if(points[i][0]==x && abs(points[i][1]-y) < minManhattan) { minManhattan = abs(points[i][1]-y...
ALGO
0.999988
6.033203
6c263ba1-1d53-42b2-911c-12c0625cd7c2
NUAAlitao/gdbCommand
snake1.cpp
#include<iostream> #include <termio.h> #include<time.h> #include<unistd.h> using namespace std; typedef struct Node{ int value; struct Node *precede; } node; typedef struct{ int row,column; node *snakeNode; } snake; char control; void printSnake(node **matrix, int row, int column){ int i,j; for(i=0; i<row; ...
ALGO
0.996392
3.566044
adb0f00c-d732-498b-97b4-0236a8da224d
brodante/LeetCode
221-maximal-square/maximal-square.cpp
class Solution { private: int largestRectangleArea(vector<int>& heights) { int n=heights.size(); if(!n) return 0; int ans=0; vector<int> left(n); vector<int> right(n); left[0]=-1; right[n-1]=n; for(int i=1;i<n;++i) { ...
ALGO
0.999834
5.786363
bb25eb2f-35b6-4225-8aed-9f738e3638de
nadim28/Competative_coding
A. 2048 Game.cpp
#include<bits/stdc++.h> #define ll long long #define endl '\n' using namespace std; int main(){ ios_base::sync_with_stdio(false),cin.tie(nullptr); ll q; cin>>q; while(q--){ ll n; cin>>n; int arr[n]; for(int i=0;i<n;i++){ cin>>arr[i]; } sort(arr,arr+n,greater<ll>()); ll sum=0; bool ok =0; for(int i=0;i<n;i++...
ALGO
0.99985
4.382215
45f37d52-6969-46c2-9f75-02e0b9df7424
itsdevansh5/DSA-OOPS
basics/factorial.cpp
#include<iostream> using namespace std; int fact(int n){ if(n==1 || n==0){ return 1; } return n*fact(n-1); } int main(){ int t; cout<<"enter num : "; cin>>t; cout<<fact(t); return 0; }
ALGO
0.999914
3.75241
056a0199-6d79-4a35-8e52-dcd23a2b9537
nay-kang/wxj.cocos2d
frameworks/js-bindings/cocos2d-x/cocos/3d/CCObjLoader.cpp
// // version 0.9.6: Support Ni(index of refraction) mtl parameter. // Parse transmittance material parameter correctly. // version 0.9.5: Parse multiple group name. // Add support of specifying the base path to load material file. // version 0.9.4: Initial suupport of group tag(g) // vers...
TOOL
0.945518
5.97165
e87cdaf2-8d4f-496b-b029-2c6aea57fa60
SrihariLax/CompGeo
makeGraph.cpp
#include <cstdlib> // C standard library #include <cstdio> // C I/O (for sscanf) #include <cstring> // string manipulation #include <fstream> // file I/O #include <ANN/ANN.h> #include<bits/stdc++.h> // ANN declarations #include <chrono> #include "MicaliVazirani.h" using namespace std; // mak...
ALGO
0.999145
4.356263
b36a75c6-c723-4761-bd21-865a67ff941b
haydenbr/learncpp
10/pointerArithmetic.cpp
#include <iostream> #include <iterator> #include <algorithm> bool isVowel(char ch) { switch (ch) { case 'A': case 'E': case 'I': case 'O': case 'U': case 'a': case 'e': case 'i': case 'o': case 'u': return true; default: return false; } } int main() { // short value {7}; // short* ptr...
ALGO
0.992653
5.417862
52b0c6c1-9bcd-432c-b2c6-b892874c710a
galileokim/CSES-Problem-Set
Search and Sort/ferriswheel.cpp
#include <bits/stdc++.h> using namespace std; int main() { long long n,x; cin >> n >> x; int p_begin = 0, p_end = n-1; vector<long long> weights(n); for (int i = 0; i < n; i++) { cin >> weights[i]; } sort(weights.begin(), weights.end()); while (p_begin < p_end) { if (weights[p_begin] + weights[p_end] <= x...
ALGO
0.999988
3.938817
1e35bc29-fc07-4f6a-a262-1889f4bd9537
SheldonZHANG/Smoke
mantaflow/source/plugin/pressure.cpp
#include "vectorbase.h" #include "kernel.h" #include "conjugategrad.h" using namespace std; namespace Manta { //! Kernel: Construct the right-hand side of the poisson equation KERNEL(bnd=1, reduce=+) returns(int cnt=0) returns(double sum=0) void MakeRhs (FlagGrid& flags, Grid<Real>& rhs, MACGrid& vel, ...
ALGO
0.999363
5.935222
caa0eb32-99cb-4a81-ae85-51e6d28de025
UdjinM6/dash_unforked
src/evo/simplifiedmns.cpp
#include <evo/simplifiedmns.h> #include <evo/cbtx.h> #include <core_io.h> #include <evo/deterministicmns.h> #include <llmq/blockprocessor.h> #include <llmq/commitment.h> #include <evo/specialtx.h> #include <pubkey.h> #include <serialize.h> #include <version.h> #include <base58.h> #include <chainparams.h> #include <c...
TOOL
0.912463
6.915829
62ab34d4-ede9-41e3-92b6-9dd5740fe01c
pangram-g/CPP2409
challenge/week7/hamming_func.cpp
#include <iostream> #include <string> using namespace std; string toLowerStr(string &str) // 소문자 변경 { for (int i = 0; i < str.length(); i++) { if ('A' <= str[i] && 'Z' >= str[i]) { str[i] += 32; } } return str; } string toUpperStr(string &str) // 대문자 변경 { for (i...
ALGO
0.999671
4.333543
2fa3859e-31de-4040-a8b6-c2c0db453045
lkoiescg2031/APSS
Baekjoon Online Judge/2562.cpp
#include <bits/stdc++.h> using namespace std; int a[9], ans; int main (){ for(int i = 0; i < 9; i++){ cin >> a[i]; if(a[ans] < a[i]) ans = i; } cout << a[ans] << endl << ans + 1; return 0; }
ALGO
0.999966
3.541148
7cf74186-5209-4321-9acf-258fe7dd1aa2
zcemycl/algoTest
cpp/example/src/MinWindowSubstr/minWindowSubstr.cpp
#include "minWindowSubstr.h" int minWindowSubstr::naive(int n){ return n; }
ALGO
0.998386
4.340236
4f33b8c2-c305-4f5d-9474-547db64ca5cd
womierkeyboard/RD75
lib/chibios-contrib/ext/mcux-sdk/devices/LPC55S14/mcuxpresso/startup_lpc55s14.cpp
#if defined (DEBUG) #pragma GCC push_options #pragma GCC optimize ("Og") #endif // (DEBUG) #if defined (__cplusplus) #ifdef __REDLIB__ #error Redlib does not support C++ #else //***************************************************************************** // // The entry point for the C++ library startup // //********...
CONFIG
0.870545
7.162563
c543525d-ccc3-44ee-bdee-5f7b2168b075
ishandutta2007/codeforces
rqi/normal/831/A.cpp
#include <iostream> using namespace std; int main() { int x = 0; int N; int a,b; int P = 0; bool increasing = false; bool equal = false; bool decreasing = false; int ans = 0; cin >> N; if(N > 2){ cin >> a >> b; if(a > b){ decreasing = true; } if(a == b)...
ALGO
0.999993
3.809909
7220f7b0-d200-46a2-becf-d79aced9cb9a
sahillroy/cp
1021.RemoveOutermostParentheses.cpp
#include <bits/stdc++.h> using namespace std; string removeOuterParenthesis(string s) { string temp; // the resultant string after removing the outer parenthesis int count = 0; for (int i = 0; i < s.length(); i++) { if (s[i] == '(') { if (count >= 1) {// count >=1 refers that the '(' i...
ALGO
0.999928
5.619526
cec7a416-9e00-420c-abbc-e22f18fdd95f
a8sh/cpp
trees/preorder.cpp
#include<bits/stdc++.h> using namespace std; struct Node{ int data; Node* right; Node* left; Node(int k){ data = k; right = NULL; left = NULL; } }; void preorder(Node* root){ if(root!=NULL){ cout<<root->data<<" "; preorder(root->left); preorder(roo...
ALGO
0.999954
4.059836
61714be2-a31b-4414-9b33-7e0e301108bd
UY24/Leetcode-GFG
Arrays/Medium/Stock buy and sell.cpp
// Ques Link : https://practice.geeksforgeeks.org/problems/stock-buy-and-sell2615/0?company[]=Intuit+&page=1&query=company[]Intuit+page1&utm_source=youtube&utm_medium=collab_striver_ytdescription&utm_campaign=stock-buy-and-sell #include<bits/stdc++.h> using namespace std; void stockBuySell(int price[], int n) { in...
ALGO
0.999888
5.333743
149b3474-7505-45e7-a99e-344f74381844
Asif-Iqbal-Bhatti/Fortran-code-to-solve-Schrodinger-equation
Short programs for numerical computing III/P12-OscillatorSH.cpp
// Eigenstates of the 1D Schroedinger equation for the harmonic oscillator // y" = 2 [V(x) - E] y, y(0) = y0, y'(0) = y'0, y(+inf) = 0 // V(x) = 0.5*x*x // using a shooting algorithm based on the Numerov method //--------------------------------------------------------------------------- #include "memalloc.h" #in...
ALGO
0.99997
4.196873
1a402338-dcc0-4e3a-9c78-de1b75f96826
NumairSayed/CheatCode
0118-pascals-triangle/0118-pascals-triangle.cpp
class Solution { public: vector<vector<int>> generate(int numRows) { vector<vector<int>> pascals_triangle; pascals_triangle.push_back({1}); if (numRows ==1) { return pascals_triangle; } for(int i=1;i<numRows;i++) { vector<int> t...
ALGO
0.999978
6.054125
c02e6196-ff7f-476e-8e31-d553b197428a
daotran123/project1
week1/ex6.cpp
//C++ #include <bits/stdc++.h> using namespace std; int main() { int n, k; int count = 0; cin >> n >> k; int a[n+1]; for (int i = 0; i< n; i++){ cin >> a[i]; } int sum = 0; for (int i = 0; i< k; i++){ sum += a[i]; } if (sum % 2 == 0) count++; for (int i = ...
ALGO
0.999967
3.793674
c23990c3-aaa7-42cc-81b7-f435ec2cf3da
thegamer1907/Code_Analysis
contest/1542585142.cpp
/*Coded by:: **Avinash Tiwary** **BE/10298/2015** **Production Engineer** **Producing <code>** */ #include<bits/stdc++.h> #define buf ios_base::sync_with_stdio (0), cin.tie (0) typedef long long ll; typedef double dob; #define MAX 50010 #define M5 200009 #define M6 2000009 #define M 1000000...
ALGO
0.999844
3.075244
0f56f42f-3c12-4468-b447-f3bb47028a20
MostafaMohamed2001/C-Data-Structure
.history/hello_20240718072207.cpp
#include <iostream> #include <string> using namespace std; struct node { int data; node *next; }; node *head; void insertNode(int val); int main() { insertNode(10); insertNode(20); insertNode(30); insertNode(40); node *current = head; while (current != nullptr) { cout << c...
ALGO
0.999622
4.528254
57c9d12d-ad49-4d21-8bf2-b350a3e1ab44
diana26/Programming-Exercises
C++/Stones on the Table(Codeforces).cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <string> #include <stack> #include <queue> #include <map> #include <functional> #include <queue> #include <bitset> #include <sstream> #include <set> #include <iomanip> #include <string.h> #include <unordered_map> #inc...
ALGO
0.999953
4.444472
c61450dd-48ea-4efc-be80-08bb3ea7d8c7
blackdogcode/ALGORISMUS
07_Divide_and_Conquer/ClosestPairOfPoint/ClosestPairOfPoint.cpp
// ClosestPairOfPoint.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> int main() { std::cout << "Hello World!\n"; } // Run program: Ctrl + F5 or Debug > Start Without Debugging menu // Debug program: F5 or Debug > Start Debugging menu // Tips for Get...
TOOL
0.880473
4.557696
764d0271-4fbf-41e7-98bd-00fdb0308287
bhskar/CPP-Problem-Practice
factorial-using-for-loop.cpp
//CPP program to find factorial of a number using for loop #include<iostream> using namespace std; int main() { int n, i; unsigned long int fact = 1; cout << "Enter a number : " << endl; cin >> n; for (i = n; i >= 1; i--) { fact = fact * i; } cout << "\nThe Factorial of '" << n << "' is -- " << fa...
ALGO
0.999912
3.201367
0869dc94-8a08-495f-83e1-e32216b122c1
CodesByUmar/To_Do
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.998854
6.785996
42d94702-41df-4bff-abca-1a5c7a08ffb7
Justinshao33/competitive_programming
done/AtCoder/E_Popcount_Sum_3.cpp
#ifdef LOCAL #define _GLIBCXX_DEBUG 1 #endif #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx,popcnt,sse4,abm") #include<bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; #define pb push_back #define all(a) (a).begin(), (a).end() #define re...
ALGO
0.999517
3.505687
2e12a1a2-b42f-407e-b18c-b46a0fd908bc
3j2m/project
DataStructuresPractice/BinaryST.cpp
#include <iostream> class BinaryST{ private: struct Node{ int data; Node* left; Node* right; Node* parent; }; Node* root; public: BinaryST(){ root = nullptr; } void addValue(int value){ ...
ALGO
0.999843
5.204083
8cf10a59-2211-468f-a176-2b97a1505ee3
ImGukdo/algorithm-study
2. 완전탐색 & 이분탐색/(프로그래머스)모의고사 문제.cpp
// https://programmers.co.kr/learn/courses/30/lessons/42840 // 프로그래머스 모의고사 문제 // 수포자는 수학을 포기한 사람의 준말입니다. // 수포자 삼인방은 모의고사에 수학 문제를 전부 찍으려 합니다. // 수포자는 1번 문제부터 마지막 문제까지 다음과 같이 찍습니다. // 1번 수포자가 찍는 방식: 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, ... // 2번 수포자가 찍는 방식: 2, 1, 2, 3, 2, 4, 2, 5, 2, 1, 2, 3, 2, 4, 2, 5, ... // 3번 수포자가 찍는 방식...
ALGO
0.999991
5.694909
97e93b09-5e33-4eeb-b462-65fac0382e57
ishandutta2007/codeforces
purplecrayon/normal/944/D.cpp
#include <bits/stdc++.h> using namespace std; #define sz(v) int(v.size()) #define ar array typedef long long ll; const int MAXN = 1e5+1, MOD = 998244353; using ld = long double; void solve() { string s; cin >> s; int n = sz(s); vector<int> loc[26]; for (int i = 0; i < n; i++) loc[s[i]-'a'].push_back...
ALGO
0.999672
4.770407
a029e553-1733-4675-ba55-060b1ad4e862
Sharmishtha1907/Leetcode-solutions
287. Find the Duplicate Number.cpp
class Solution { public: int findDuplicate(vector<int>& nums) { vector <int> n (nums.size()+1,0); for(int i=0;i<nums.size();i++) { n[nums[i]]++; } for(int i=0;i<n.size();i++) { if(n[i]>1) { return i; } ...
ALGO
0.999956
5.794878
d140b4f0-e9ce-4429-b6c3-33111825f01e
peterhyun/Fbx-file-player
includes/BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp
#include "btQuantizedBvh.h" #include "LinearMath/btAabbUtil2.h" #include "LinearMath/btIDebugDraw.h" #include "LinearMath/btSerializer.h" #define RAYAABB2 btQuantizedBvh::btQuantizedBvh() : m_bulletVersion(BT_BULLET_VERSION), m_useQuantization(false), //m_traversalMode(TRAVERSAL_STACKLESS_CACHE...
ALGO
0.996228
7.045055
b286abc2-c576-4377-a80e-50adb7302768
Flutter-ui-dev/firebase_email_auth
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
fbbe35d9-0a23-449c-b8e8-42747e248ebf
TomasZavodnik1/opencv-imx
modules/imgproc/src/canny.cpp
#include "precomp.hpp" #include "opencl_kernels_imgproc.hpp" #include "opencv2/core/hal/intrin.hpp" #include <deque> #include "opencv2/core/openvx/ovx_defs.hpp" namespace cv { #ifdef HAVE_IPP static bool ipp_Canny(const Mat& src , const Mat& dx_, const Mat& dy_, Mat& dst, float low, float high, bool L2gradient, int...
ALGO
0.993784
3.082862
230b2696-40c7-4b24-9c4a-e83eb9e0d03f
icf/Code
C++ code/GpBCS_S.C.CPMC/SC_afqmcConstraintPathBP_4.1_ChargeContinuous_afqmclab_icf_ExactDensityinput/include/eigen/test/eigen2/eigen2_visitor.cpp
#include "main.h" template<typename MatrixType> void matrixVisitor(const MatrixType& p) { typedef typename MatrixType::Scalar Scalar; int rows = p.rows(); int cols = p.cols(); // construct a random matrix where all coefficients are different MatrixType m; m = MatrixType::Random(rows, cols); for(int i =...
TEST
0.948076
5.907032
d521ce26-c610-4efa-8ac8-9740c433e927
Metrolina-Regional-Model-Team/MRM22v2.0
pgm/ModeChoice/Transims60/Transims60/TransitAccess/Walk_Access.cpp
//********************************************************* // Walk_Access.cpp - generate walk access links //********************************************************* #include "TransitAccess.hpp" #include <math.h> //--------------------------------------------------------- // Walk_Access //-------------------------...
ALGO
0.852793
4.023339
3373a4cb-15d3-4816-b767-4f244cf25ea3
Mr-Bangladesh/Problem-Solving
UVa/10608 Friends.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; vector <LL> graph[500005]; LL BFS(LL source) { bool visited[500005]={0}; queue <LL> Q; Q.push(source); visited[source]=true; LL distance=1; while(!Q.empty()) { LL u=Q.front(); Q.pop(); for(...
ALGO
0.999847
4.891655
6285f641-51a4-4779-8dfb-c53d2255e25c
rds1983/SealangSharp
llvm/lib/CodeGen/ExecutionDomainFix.cpp
#include "llvm/CodeGen/ExecutionDomainFix.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/TargetInstrInfo.h" using namespace llvm; #define DEBUG_TYPE "execution-deps-fix" iterator_range<SmallVectorImpl<int>::const_iterator> ExecutionDomainFix::regIndices(unsigned Reg) const { assert(Reg < A...
ALGO
0.990532
7.935961
fb4f9f03-b6d2-4dc8-bab2-0eba3718c5e1
zgaze/leetcode
math-bit/powx-n-50.cpp
class Solution { public: double quickMul(double x, long n) { double ans = 1.0; double x_contribute = x; while (n > 0) { if (n % 2 == 1) { ans *= x_contribute; } x_contribute *= x_contribute; n /= 2; } return ans; } double myPow(double x, int n) { double ans = 1.0; lo...
ALGO
0.999701
5.230305
83b1eb62-ab37-4308-a523-403fc172d251
pc2ccs/pc2v9
samps/contests/problemflagtest/config/sumit7/submissions/time_limit_exceeded/sumitTLE.cpp
// // File: isumit.cpp // Purpose: to sum the integers from stdin // Author: <EMAIL> or http://www.ecs.csus.edu/pc2 // // $Id$ // // * TODO cause tle by sleeping/running for a long time // #include <fstream> #include <iostream> using namespace std; main () { int num; int sum; sum = 0; cin >> num; while(n...
ALGO
0.985706
4.332333
aabe328b-89f7-465a-9fbc-438f4a301a2e
Kriti0802/LeetCode-Practice
Running_sum_1d_array.cpp
/*Given an array nums. We define a running sum of an array as runningSum[i] = sum(nums[0]…nums[i]). Return the running sum of nums.*/ #include<bits\stdc++.h> #include<vector> using namespace std; class Solution { public: vector<int> runningSum(vector<int>& nums) { vector<int>v; int sum=0; ...
ALGO
0.999695
5.579683
8fd8d648-c83f-4b29-b64f-150c22a9fa95
Amitkumaramit118589/Leetcodesolutions
73-set-matrix-zeroes/set-matrix-zeroes.cpp
class Solution { public: void rowchange(vector<vector<int>> &arr,int i){ for(int k=0;k<arr[0].size();k++){ if(arr[i][k]!=0)arr[i][k]=INT_MAX-10; } } void colmchange(vector<vector<int>> &arr,int j){ for(int k=0;k<arr.size();k++){ if(arr[k][j]!=0) ar...
ALGO
0.999779
6.400889
22f869f5-812f-40f0-804a-2d63341df3be
kishan9535/Data-Structures-Templates
Graphs/Floyd_Warshall.cpp
/* Codeded With ❤ Love By Kishan ❤👌 <---Floyd Warshall---> -> Multi-Source Shortest Path Algorithim. ->finds Shortest Distances B/W Every pair of vertices of 2 given edge -weigted -directed graph -> It can detect negative edge cycles. Certainly! Here is the explanation without exa...
ALGO
0.999994
6.519864
ebb9cd54-9db2-4078-981b-15000cb4d549
CFDEMproject/LIGGGHTS-PUBLIC
src/neigh_gran.cpp
#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "group.h" #include "update.h" #include "fix_contact_history.h" #include "error.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- granular particles N^2 / 2 search for neighbor pairs wi...
ALGO
0.998911
5.430597
aa98aee0-1914-4675-8dda-d5d26487c065
dnr2/maratona
UVa/12580 - Yell Classico.cpp
//http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=441&page=show_problem&problem=4025 #include<cstdio> #include<cstdlib> #include<cmath> #include<iostream> #include<algorithm> #include<vector> #include<queue> #include<map> #include<cstring> #define fr(i,j,k) for(int (i)=(j);(i)<(k);++(i))...
ALGO
0.999643
3.394579
47b1083d-6ab8-47fb-9cbd-7b6d5a8ff000
xx502003587/LeetcodeExam
cpp/leetcode740.删除与获得点数.cpp
/* * 题意: * 给定一个整数数组 nums ,你可以对它进行一些操作。 * 每次操作中,选择任意一个 nums[i] ,删除它并获得 nums[i] 的点数。 * 之后,你必须删除每个等于 nums[i] - 1 或 nums[i] + 1 的元素。 * 开始你拥有 0 个点数。返回你能通过这些操作获得的最大点数。 * 每个整数nums[i]的大小都在[1, 10000]范围内。 * * 思路: * 根据题目要求,如果要获得 nums[i] 的点数,那就必须删除 nums[i] 左边和右边相邻的值 * 那么要在两种情况中做抉择: * 1. 不删,直到前一个数为止得到的分数就是当前的分数 * 2. 删,前...
ALGO
0.999911
5.460934
dbd3925d-640e-44d5-8b01-95e85febf95c
kittyhappy/MyAlgorithmLearning
insertion_sort.cpp
#include<iostream> using namespace std; //ǵݼ void insertion_sort(int A[],int n) { int key, i, j; //򣬵2ԪؿʼҵkeyСԪص±j for (int i = 1; i < n; i++) { key = A[i]; j = i - 1; while (j>=0&&A[j]>=key) { A[j + 1] = A[j]; --j; } A[j + 1] = key; } for (int i = 0; i < n; i++) { cout << A[i] << " "; } } i...
ALGO
0.999903
3.766152
7f0382fb-a999-4046-86a0-ad953880880d
AGMVarna/-.-
Двумерни масиви упражнения 1/Двумерни масиви упражнения 1/Source.cpp
/* Провежда се едно модно състезание, в което N-манекена(мъже и жени) при N {10-1000} се оценяват от M-членно жури (M {3-10}). Съставете програма, която представя информацията по подходящ начин за състезанието и определя номерата на победитела и победителката в конкурса. */ #include<iostream> #define MaxN 1000 #defi...
ALGO
0.999948
3.821646
dc32cfa1-5fb6-4ba5-85dc-8bda8e929eb6
ziyuang/pynerv
dredviz-1.0.2/newmat/nl_ex.cpp
using namespace std; // This is an example of a non-linear least squares fit. The example // is from "Nonlinear estimation" by Gavin Ross (Springer,1990), p 63. // There are better ways of doing the fit in this case so this // example is just an example. // The model is E(y) = a + b exp(-kx) and there are 6 data point...
ALGO
0.998897
5.691487
02c6fc26-f576-4c57-a811-cc7b9d3d143e
KaiserV2/11.25
SIMD/Bloomfilter.cpp
#include "Bloomfilter.h" #include <immintrin.h> // AVX #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> /* init bloomfilter with parameters */ void BloomFilter::init(int _window, int _memory, int _hash_num) { window = _window; memory = _memory; hash_num = _hash_num; wi...
ALGO
0.996722
5.440474
a6bbdc6c-98d9-40ea-b5d6-50776b34ba85
ishandutta2007/codeforces
derekfeng/normal/1207/F.cpp
#include <algorithm> #include <cstdio> #include <iostream> #include <cfloat> #include <climits> #include <cstdlib> #include <cstring> #include <cmath> #include <queue> #include <sstream> #include <stack> #include <time.h> #include <vector> #include <complex> #include <map> #include <set> #include <iomanip> #include <ma...
ALGO
0.999531
3.395475
ee20b60a-283c-4bef-b866-da1837077d66
bhupen06/cpp
HW1.cpp
#include<iostream> using namespace std; class fruit { public: int Man; int App; public: void setdata() { cout<<"enter Mango : "; cin>>Man; cout<<"enter Apple : "; cin>>App; } public: void Tot() { int total=Man+App; cout<<"total fruits : ...
TOOL
0.889374
5.06011
f4ccdea6-de4e-43f0-8f27-491f8bb4d2b9
tranHieuDev23/solution-spoj-cf
Đi học Hải Dương/Morning Day 1/RUNNING.cpp
#include <bits/stdc++.h> #define FOR(i, j, k) for (int i = j; i <= k; i ++) #define FORD(i, j, k) for (int i = j; i >= k; i --) #define mn 100005 #define maxC 1000000007 #define pb push_back #define mp make_pair #define F first #define S second using namespace std; int n, t, x[mn], s[mn], pre[mn], nex[mn]; priority_qu...
ALGO
0.999971
3.723311
dd562bf3-fd84-409d-8ff0-87724494174e
Shivangi2430/Placement-Preparation-Module
0014-longest-common-prefix/0014-longest-common-prefix.cpp
class Solution { public: string longestCommonPrefix(vector<string>& strs) { string ans = ""; int n = strs.size(); for(int i = 0; i < strs[0].length(); i++) //first string { bool match = true; //first string ke har character ko ab ...
ALGO
0.999781
5.625631
47203b1c-a580-4b30-9a51-344cbcfa7ad5
Samleo8/FeelTheVibe
feelthevibe/src/edge-impulse-sdk/dsp/dct/fast-dct-fft.cpp
#include <math.h> #include <stdint.h> #include <stdlib.h> #include "fast-dct-fft.h" #include "../returntypes.hpp" #include "../numpy.hpp" #include "../memory.hpp" #ifndef M_PI #define M_PI 3.14159265358979323846264338327950288 #endif // M_PI // DCT type II, unscaled int ei::dct::transform(float vector[], size_t len) ...
ALGO
0.952015
5.381938
46e807ce-60e0-4a54-8e0b-69adda3798e5
gorloff/leetcode
courseschedule.cpp
/*There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i] = [ai, bi] indicates that you must take course bi first if you want to take course ai. For example, the pair [0, 1], indicates that to take course 0 you have to firs...
ALGO
0.999766
6.637903
57b84bbf-58f3-4e44-9906-b229e0f3c5fd
ShrutiDesai243/SlashMark
Intermediate Task 2/AI Self-Driving Cars/project_11_path_planning/src/Eigen-3.3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp
#include <Eigen/Dense> #include <iostream> using namespace std; using namespace Eigen; int main() { ArrayXXf a(2,2); a << 1,2, 3,4; cout << "(a > 0).all() = " << (a > 0).all() << endl; cout << "(a > 0).any() = " << (a > 0).any() << endl; cout << "(a > 0).count() = " << (a > 0).count() << endl...
ALGO
0.958391
3.859743
eb76859a-7dcc-410a-a7b1-e9ca8e9e099d
Dhrumilgodhani/cpp
nested_loop/22.cpp
#include <iostream> using namespace std; int main() { int i,j; for(i=1 ; i<=5 ; i++) { for(j=1 ; j<=i ; j++) { cout <<"* "; } cout<< endl; } return 0; }
ALGO
0.999359
3.469788
cb8a7740-256b-42aa-9763-cdd971042d0f
ASAG-ISCAS/BdryReach
tests/example2poly_compare.cpp
/* * @Author: your name * @Date: 2021-11-11 17:24:27 * @LastEditTime: 2021-12-30 22:41:19 * @LastEditors: Please set LastEditors * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath: /Solver/test.cpp */ #include <dynamics/NonlinearSys.h> #incl...
ALGO
0.994895
3.658647
1c0e2bc1-c535-4c4e-8220-607881259c6f
truong11062002/IT001
20522087_02/Bai_138/Bai_138.cpp
#include<iostream> #include<cmath> using namespace std; float TinhGiaTri(float); int main() { float x; cout << "Nhap x: "; cin >> x; float kq = TinhGiaTri(x); cout << "Gia tri cua ham so la: " << kq; return 1; } float TinhGiaTri(float a) { float fx; if (a <= 1) { if (a >= 0) { fx = 5 * a - 7; } else...
ALGO
0.999668
4.414528
1d1b6b6c-a13d-4b0d-a6ba-16ada35f8b3f
vfolunin/archives-solutions
LeetCode/2518.cpp
class Solution { public: int countPartitions(vector<int> &a, int limit) { long long sum = 0; for (int value : a) sum += value; if (sum < limit * 2) return 0; const long long MOD = 1e9 + 7; vector<long long> ways(limit); ways[0] = 1; ...
ALGO
0.999952
5.171787
0f04341d-7a78-49d2-9d69-f0dd783da7f0
amcadmus/noneq.msm
accelerate/template.butane.resp/tools/angles/app/trans.prob.cpp
#include <algorithm> #include <fstream> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <set> #include <sstream> #include <string> #include <queue> #include <vector> #include <cmath> #include "Defines.h" #include "StringSplit.h" #include "Distribution.h" #include <bo...
DATA
0.909757
4.194507
a70d9286-5fd5-4c63-b616-5f6abf99b42f
vaibhavkashyap230/Geeks-for-Geeks-Sudo-Placement
Check if a number is power of another number.cpp
#include<stdio.h> #include<iostream> #include<bits/stdc++.h> #include<cmath> using namespace std; int main() { int t; cin>>t; for(int e=0;e<t;e++) { int x,y; cin>>x>>y; float a=log(y)/log(x); int check=(int)a; if(a==check) {cout<<"1"<<endl;} else ...
ALGO
0.999789
3.606355
a703b734-acb7-4b61-a0b0-cfb3d792b744
JunShimura/CPP2g2022
ex01/ex01.cpp
// ex01.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。 // #include<iostream> using namespace std; int main() { int crane = 0; //鶴 int turtle = 0; //亀 int heads = 0; //頭 int legs = 0; //脚 cout << "頭の数は:"; cin >> heads; cout << "脚の数は:"; cin >> legs; //ここで鶴と亀の数をcraneとturtleに...
ALGO
0.943606
4.048882