uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
0e557e38-5520-4a0a-a245-47149325d217
Papich23691/S.S-Similarity
src/linear_space_util.cpp
#include "linear_space_util.h" #include <iostream> #include <list> #include <string> constexpr double MIN_VALUE = 0.5; /* Calculating the dot product between 2 vectors */ double LSUtils::dot_product(list<double> v1, list<double> v2) { double sum = 0; unsigned long i = 0; for (i = 0; i < v1.size(); i++) { li...
ALGO
0.996841
4.892833
834570f6-513b-44d8-a265-76d3e456b881
codehub001/CrackYourInternship
Basic Calculator II.cpp
class Solution { public: int calculate(string s) { char op = '+'; int curr = 0; vector<int> stk; for (int i = 0; i < s.size(); ++i) { if(isdigit(s[i])) curr = curr*10 + (s[i] - '0'); if(i==s.size()-1 || s[i]=='+' || s[i]=...
ALGO
0.999895
5.482582
0f5abc46-3673-486a-83d9-7ce9597f58bb
Charbel-11/Competitive-Programming
CSES/Additional Problems/String Transform.cpp
#include <iostream> #include <string> #include <map> #include <set> #include <vector> #include <cmath> #include <algorithm> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); string s; cin >> s; vector<pair<char, int>> v; for (int i = 0; i < s.size(); i++) {...
ALGO
0.999794
3.887369
f4b188d5-8bb6-456a-b934-4a69ce19ba0f
ArthurOhanyan/Test_Repo
array.cpp
#include <iostream> #include <ctime> int find_max (int*,size_t); int main () { srand(time(0)); const size_t size = 10; int arr [size]; for (int i = 0; i < size; ++i){ arr[i] = rand() % 600; std::cout << " " << arr[i]; } std::cout << std::endl; std::cout << "Max element is " << find_max (arr,size) << std:...
ALGO
0.96559
4.208797
b7d70085-808b-400f-86eb-9d76282d0897
juansg/STE
IWOMP22/Compiler+Runtime/libomp12/llvm12/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp.pass.cpp
// <queue> // template <class InputIterator> // priority_queue(InputIterator first, InputIterator last, const Compare& comp); #include <queue> #include <cassert> #include <functional> #include <cstddef> #include "test_macros.h" int main(int, char**) { int a[] = {3, 5, 2, 0, 6, 8, 1}; int* an = a + sizeof(...
TEST
0.926895
5.00913
327b7ff4-5a0c-46d4-90ac-804c9e65236b
ishandutta2007/codeforces
leaf1415/normal/1716/F.cpp
#include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <ctime> #include <cstdlib> #include <cassert> #include <vector> #include <list> #include <stack> #include <queue> #include <deque> #include <map> #include <set> #include <bitset> #include <string> #include <algorithm> #include <utility> ...
ALGO
0.999935
4.413099
95590ed1-1fae-4799-9357-e9d7dd13b3d8
Parthcode1005/Problem-Solving-in-CPP
MakeANoZeroinLessTime.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; int count=0; while(a>0){ a=a^(a-1); count++; } cout<<count<<endl; }
ALGO
0.999944
3.980419
81ba2d6b-612d-4862-8b30-dd89792a0293
vrajkmrpatel/ALLCONTEST
Codeforces/Contests/codeforceround985/problemA.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int solve(ll l, ll r, ll k) { return ((r / k) - l) + 1; } int main() { int t; cin >> t; while (t--) { ll l, r, k; cin >> l >> r >> k; int ans = solve(l, r, k); if (ans > 0) { ...
ALGO
0.999965
4.291306
20ecf356-c542-46ef-91c2-e25733331832
LDFINA01/NeuralNetwork
Eigen3/unsupported/test/polynomialsolver.cpp
#include "main.h" #include <unsupported/Eigen/Polynomials> #include <iostream> #include <algorithm> using namespace std; namespace Eigen { namespace internal { template<int Size> struct increment_if_fixed_size { enum { ret = (Size == Dynamic) ? Dynamic : Size+1 }; }; } } template<typename PolynomialType> Pol...
TEST
0.865799
6.584
62b207ba-ac91-46df-acb3-cb088f7da150
profornnan/Problem-Solving
SWEA/미분류/1230-암호문3.cpp
#include <iostream> #include <vector> using namespace std; struct Node { int data; Node *next; Node(int data) : data(data), next(nullptr) {} }; class LinkedList { private: Node* head; Node* tail; public: LinkedList() : head(nullptr), tail(nullptr) {} ~LinkedList() { while (head != nullptr) { Node* temp ...
ALGO
0.998474
4.942563
0c8a9885-ac15-4106-988d-144cbc54ce8b
TheTrustyPwo/CP
CodeBreaker/typicalstairs.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int M = 1e9 + 7; int n, m, x, dp[100005] = {0, 1}; bool h[100005]; int32_t main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> n >> m; for (int i = 0; i < m; i++) { cin >> x; h[x] = 1; } for (int i = 2; i <= n...
ALGO
0.999984
4.343562
b537df32-b465-48bd-80d8-d1386b301785
HammadMaqbool/DataStructures
Linked_list_Delete_Node.cpp
#include<iostream> using namespace std; struct Node { int data; Node *link; }; class LinkedList { private: Node *start, *cur, *temp; public: //This is the Constructor LinkedList() { start = NULL; } //Method to add the data into the list. . . add(int NewNumber) { if(start == NULL) { ...
ALGO
0.999515
3.722494
e91868a4-dcc6-4fd3-afe6-243e6aa67a1e
Craneplayz/CP-Archive
Codeforces/1539B.cpp
#include <bits/stdc++.h> using namespace std; //Declarations #define dqi deque<int> #define lg long #define ll long long #define lsi list<int> #define mii map<int,int> #define mic map<int,char> #define mci map<char,int> #define msi map<string,int> #define mspii map<string,pair<int,int>> #define msmii map<string,map<in...
ALGO
0.999635
3.89941
25814e7b-8a88-4af2-9cb0-768baff5f152
radheshyamghanta2006/GFG-Codes
Difficulty: Easy/Occurence of an integer in a Linked List/occurence-of-an-integer-in-a-linked-list.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }; // } Driver Code Ends /* Node is defined as struct node { int data; struct node* next; node(int x){ data = x...
ALGO
0.999569
5.805273
ba512734-ed60-47a0-a4aa-11b19d3b4ea3
h-k8888/BSplinePOSE
Schweizer-Messer/sm_kinematics/src/transformations.cpp
#include <sm/kinematics/transformations.hpp> #include <Eigen/Geometry> namespace sm { namespace kinematics { Eigen::Matrix4d rt2Transform(Eigen::Matrix3d const & C_ba, Eigen::Vector3d const & rho_b_ab) { Eigen::Matrix4d T_ba; T_ba(0,0) = C_ba(0,0); T_ba(0,1) = C_ba(0,1); T_ba(0,2) = C_ba(...
ALGO
0.995202
7.292391
d2155d3d-3423-42c0-b53b-8a730830e4fd
fathimaifa/Kodingan
C++/Praktikum Dasar Pemrograman/modul 5 Pengulangan For/modul 5.9.cpp
#include<iostream> #include<conio.h> using namespace std; int main() { int a, b, c, d, n; cout << "masukan banyak bilangan yang akan dimunculkan : "; cin >> n; for(int a=1; a<=n; a++) { if(a%2==1) { cout << a << " "; } else { b=a*2; cout << b << " "; } } getch(); return 0; }
ALGO
0.997405
3.710155
9743f4f5-11ef-4423-81bd-86c5aec20bbe
l1lwave/DSA_labs
lab3.cpp
#include <iostream> #include <stack> void firstEx(){ std::stack<int> myStack; std::stack<int> evenStack; // Стек для парних чисел std::stack<int> oddStack; // Стек для непарних чисел int n; // Кількість чисел, які ви хочете ввести int num; // Змінна для зберігання введеного числа std::cout << ...
ALGO
0.989062
5.301466
be9a3f3f-9f83-4603-981e-055e42a73a26
YashKumarYK/LeetCode
Minimum Cost of ropes - GFG/minimum-cost-of-ropes.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to return the minimum cost of connecting the ropes. long long minCost(long long arr[], long long n) { priority_queue<long long, vector<long long > , greater<long long>> p...
ALGO
0.999923
5.868608
87f55d6a-61ec-4b4f-8413-016eb9f4dd44
kobusgiovanna/TCC
code/optimized_naive_dual.cpp
#include "optimized_naive_dual.hpp" //fix #include <iostream> using namespace std; #define EPS 1e-9 struct optimized_naive_dual::coloured_line { line l; int id; int color; coloured_line (line new_l, int new_id, int new_color): l(new_l), id(new_id), color(new_color) {} }; struct optimized_naive_dual::pair_of...
ALGO
0.999861
4.924669
bfb23797-5722-4fb3-8ed6-22b97bfdf897
MikeSong95/InterviewPrep
Leetcode/Easy/cpp_solutions/66_plus_one.cpp
class Solution { public: vector<int> plusOne(vector<int>& digits) { int carry = 1; for (int i = digits.size() - 1; i >= 0; i--) { if (carry == 1) { digits[i] = digits[i] + 1; if (digits[i] == 10) { digits[i] = 0; ...
ALGO
0.999859
6.979443
53a8f5c3-caf5-4ad1-994a-5d60cc6e72de
WashizuRyo/Competitive-programming
algo/algorithmBasic/Brute-forceSearch/x.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) using P = pair<int, int>; using ll = long long; int main() { int n; string s; cin >> n; cin >> s; int ans = 0; rep(i, n) { for (int j = i + 1; j < n; j++) { if (s[i] == s[j]) ans++; } } cout ...
ALGO
0.999988
4.429173
55274040-af18-4aaf-b861-05da8434b4e8
ChangYeop-Yang/Study-Algorithm
[완전탐색] 두 배열의 합.cpp
#include <vector> #include <numeric> #include <iostream> #include <algorithm> using namespace std; int main(void) { // MARK: - A의 부 배열의 합에 B의 부 배열의 합을 더해서 T가 되는 모든 부 배열 쌍의 개수를 구하는 프로그램을 작성하시오. int target = 0; cin >> target; int first = 0; cin >> first; vector<int> firstArray = vector<int>(first); for (int ii = 0...
ALGO
0.999971
4.31088
9e2649ea-e926-46fb-a4c4-3a10330c8cfd
samyok/samyolk
Kattis - CPP October Contest/Problem_D___I_Hate_The_Number_Nine.cpp
// Kattis Problem D - I Hate The Number Nine - 10/8/22 #include <bits/stdc++.h> using namespace std; #define ll long long #define pl pair<ll, ll> #define pi pair<int, int> #define vl vector<ll> #define vi vector<int> const long long MOD = 1000000007; // fast modular exponentiation ll fme(ll b, ll e) { if (e == 0)...
ALGO
0.999879
4.842795
4bc93cc2-94b8-4b15-a7a7-3a9598367797
ishandutta2007/codeforces
daniel_jiang/normal/1503/A.cpp
// wish to get better qwq #include<bits/stdc++.h> #define re register int #define pb push_back #define lb lower_bound #define ub upper_bound #define mp make_pair #define dec(x) fixed<<setprecision(x) using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; template<class T> ...
ALGO
0.999701
3.403446
3fed05f5-c115-4457-9969-66e21854bc05
Ashutosh1604/DSA-Cheatsheet-loveBabbar
Array/FindTheDuplicate.cpp
#include<bits/stdc++.h> using namespace std; //optimal approach //TC-O(n) //SC-O(1) int main() { int n; cin>>n; int arr[n]; for(int i=0;i<n;i++) { cin>>arr[i]; } int slow=arr[0]; int fast=arr[0]; do{ slow=arr[slow]; fast=arr[arr[fast]...
ALGO
0.999958
4.060982
ecf2dc56-dbd3-4f88-a3b1-ca4f97789401
malay241/c-
pascal.cpp
#include<iostream> using namespace std; int main() { int n,coef=1; cin>>n; for(int i =0;i<n;i++) { for(int j=1;j<=(n-i);j++) { cout<<" "; } for(int j=0;j<=i;j++) { if(j==0 || i==0) { coef=1; } ...
ALGO
0.999946
3.146188
46e6f719-f3ff-4c39-9ebb-8de3d1d86e67
Rolight/ACM_ICPC
CodeForces/Round302/Div2C.cpp
#include <cstdio> #include <cstring> #include <algorithm> #include <iostream> using namespace std; typedef long long LL; const int maxn = 505; LL n, m, b, mod; LL f[maxn][maxn], a[maxn]; int main() { cin >> n >> m >> b >> mod; LL ans = 0; for(int i = 1; i <= n; i++) cin >> a[i]; f[0][0] = 1; for(int i = 1; i <=...
ALGO
0.999968
4.105837
06137e31-7548-48ef-9d8d-caad23140702
DarnedBuzzard70/OI-Love
outgoing-training-notes/qbxt-2023-summer-noip-s/Day5/Code/c.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1005, mod = 1e9 + 9; int n, m, c[N][N]; int f[N], g[N], tf[N], tg[N]; int add(int x, int y) { return x + y < mod ? x + y : x + y - mod; } int main() { ios::sync_with_stdio(0), cin.tie(0); cin >> n >> m; for (int i = 0; i <= n; i++) { c[i][0] = c...
ALGO
0.999996
4.744758
a100069c-90b3-45b5-84c7-457b2a816bfa
gitlicheng/camdroid
camdroid/frameworks/av/media/libvoicecall/codecs/libamrnb/enc/src/ton_stab.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/ton_stab.c Funtions: Date: 02/06/2002 ------------------------------------------------------------------------------ REVISION HISTORY Description: For check_lsp() 1. Eliminated u...
TOOL
0.880706
7.670895
05d1c55f-2e9d-4ac9-97c5-708e039b3923
rorgoroth/llvm-project
llvm/utils/TableGen/Common/Utils.cpp
#include "Utils.h" #include "llvm/ADT/STLExtras.h" #include "llvm/TableGen/Error.h" #include "llvm/TableGen/Record.h" #include <algorithm> using namespace llvm; namespace { /// Sorting predicate to sort record pointers by their Name field, and break /// ties using record ID (which corresponds to creation/parse order)...
TOOL
0.949847
7.776396
83c39c90-127c-401d-a031-9b6fe978f71a
YichengZhong/Top-Interview-Questions
剑指Offer47.礼物的最大价值/maxValue_暴力回溯.cpp
class Solution { public: int outValue; int maxValue(vector<vector<int>>& grid) { outValue=0; helpDFS(grid,0,0,0); return outValue; } void helpDFS(vector<vector<int>>& grid,int index_i,int index_j,int sum) { if(index_i>=grid.size() || index_j>=grid[0].size()) ...
ALGO
0.999957
5.914366
6d4d8665-28fa-47de-b568-d6936b4a2bda
DiegoNGonzalez/laboratorio1
guia2/guia2ej6.cpp
//Nombre: Diego Nicolas Gonzalez Valenzuela //TP N:2 //EJ N:6 /* Comentarios Hacer un programa para ingresar por teclado tres nmeros y luego determinar e informar con una leyenda aclaratoria si los tres son iguales entre s, caso contrario no emitir nada. Ayuda: Si A es igual a B y B es igual a C, entonces A y C son igu...
ALGO
0.998777
3.506301
5d5dea66-cc3b-4a54-bd0a-20fc5e933ea4
Ivan-71-ua/Competitive-Programming
LeetCode/807.cpp
#include <bits/stdc++.h> class Solution { public: int maxIncreaseKeepingSkyline(std::vector<std::vector<int>>& grid) { std::vector<int> max_in_row(grid.size()); std::vector<int> max_in_col(grid.size()); for (int i = 0; i < grid.size(); i++) { for (int j = 0; j < grid.size(); j++) { max_in_row[i] ...
ALGO
0.999963
6.021054
87dcf9d9-5003-4200-804f-a20aad5c574d
isha141/LeetCode
33-search-in-rotated-sorted-array/33-search-in-rotated-sorted-array.cpp
class Solution { public: int search(vector<int>& nums, int target) { int low=0; int high=nums.size()-1; while(low<=high) { int mid=(low+high)/2; if(nums[mid]==target) return mid; if(nums[low]<=nums[mid]) { ...
ALGO
0.999971
6.149593
ad2d1683-62c8-4923-b1b5-3ae595514ef3
Shubhojit-Halder/Data-Structure-Implementations
Recursion/Phonekeypad.cpp
// Given a keypad as shown in the diagram, and an N digit number which is represented by array a[ ], // the task is to list all words which are possible by pressing these numbers. #include <iostream> #include <bits/stdc++.h> using namespace std; void solve(int idx, vector<int>&arr, int N, string &st,vector<string> &an...
ALGO
0.999934
5.293434
1efdf510-a922-4432-a3c6-6903f6c72643
w1d2s/algorithms-study
chapter-0x00-basic-algorithms/122-糖果传递.cpp
#include <stdio.h> #include <cmath> #include <algorithm> #define MAX_N 1000005 /* 环形纸牌均分问题: * 首先回忆纸牌均分问题,如何推导出最小交换数是归一化的前缀和? * 再看环形纸牌均分问题,首先注意到最优解必然有两个人没有交换纸牌,可以从中断开环。 * 然后如何选择最优断点?推导在第k个人断开时的最小操作数(前缀和),注意归一化之后的 * Sn = 0,转化为货仓选址问题(中位数的性质)。 */ long long a[MAX_N]; int main() { int n; long long average = ...
ALGO
0.999943
3.82012
2ce850cf-c421-453a-8f19-ce5f465a6247
ManishaPanu/GFG
Boundary traversal of matrix.cpp
class Solution { public: //Function to return list of integers that form the boundary //traversal of the matrix in a clockwise manner. vector<int> boundaryTraversal(vector<vector<int> > matrix, int n, int m) { // code here vector<int> v; int row_i = 0; int r...
ALGO
0.999973
4.944619
94e47d2f-8f5f-43a5-a129-26a72c7f44de
sarvex/leetcode-typescript
solution/2000-2099/2037.Minimum Number of Moves to Seat Everyone/Solution.cpp
class Solution { public: int minMovesToSeat(vector<int>& seats, vector<int>& students) { sort(seats.begin(), seats.end()); sort(students.begin(), students.end()); int ans = 0; for (int i = 0; i < seats.size(); ++i) { ans += abs(seats[i] - students[i]); } r...
ALGO
0.999948
5.10823
56775765-ed97-4cf1-b95b-b0adecef0892
SingularInversions/FaceGenBaseLibrary
source/LibTpDlib/dlib/cuda/cpu_dlib.cpp
// This file contains CPU implementations of the GPU based functions in cuda_dlib.h #include "cpu_dlib.h" #include "tensor_tools.h" #include "../image_transforms/interpolation.h" #include "../threads.h" namespace dlib { namespace cpu { // -----------------------------------------------------------------...
TOOL
0.890283
6.921703
0746ec04-9ea5-49ef-ade8-8797434e6470
MrBenjoo/CPP
Lab4/Lab4/Uppgift1c.cpp
#include "Uppgift1c.h" #include <vector> #include <iostream> #include <algorithm> using namespace std; void Uppgift1c::createVector() { for (int i = 0; i < 10; ++i) { int r = rand() % 100 + 1; ivec.push_back(r); } cout << "\n\n\n**** Uppgift1c ****\nPrinting all the elements in the vector..." << endl; prin...
ALGO
0.969346
4.20764
4be9f5d8-6ce2-42e3-8fc4-46a3c72f5380
mac8088/noip
L4 信息学奥赛一本通/0. 程序部分/ch03/第01节 if选择结构/zy01_02_输出绝对值.cpp
#include<cstdio> #include<cmath> using namespace std; int main() { double f; //˫ʵ scanf("%lf", &f); printf("%.2lf", abs(f)); //Ҫcmath return 0; } //-------------------------------- //--------------------------------
ALGO
0.999285
3.667219
497a4918-d720-4d5b-94c0-1aba62785a1d
AtharvDutare/Data-Structure-and-Algorithm
Stack/Theory/Sliding Window Maximum.cpp
class Solution { public: //got TLE int m=1e9+7; vector<int> maxSlidingWindow(vector<int>& arr, int k) { vector<int> ans; int n=arr.size(); int l=0; int r=k-1; int maxElement=INT_MIN; for(int w=l;w<=r;w++) { maxElement=max(ar...
ALGO
0.999991
5.836043
9145f738-2087-45d9-a82d-0fb1ecc02952
Rainmaker2627/cp-solutions
cses/dynamic programming/counting_towers-2.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int mod=1e9+7; int n, t; struct matrix { ll a, b, c, d; matrix(ll p, ll q, ll r, ll s) { a=p; b=q; c=r; d=s; } void operator*=(matrix m) { ll p=(a*m.a+b*m.c)%mod, q=(a*m.b+b*m.d)%mod, r=(c*m.a+d*m.c)%mod, s=(c*m.b+d*m.d)%mod; a=p; b=...
ALGO
0.999961
4.851893
7eef4484-7cda-428c-b42e-a9f4e0f60b34
masudranam/dsa_problems
Codeforces/D_Two_Colored_Dominoes.cpp
#include<bits/stdc++.h> using namespace std; #define print(a) for(auto x:a)cout<<x<<' ';cout<<'\n'; #define debug(x) cout<<#x<<" "<<x<<endl #define all(a) (a).begin(),(a).end() #define sz(a) (int)(a.size()) #define int long long int #define endl '\n' #define ar array const int M = 1e9 + 7; const int N = 2e5 + 10; ...
ALGO
0.999801
4.036822
dd6e8675-4fe7-483a-864b-04a291a63828
ishandutta2007/codeforces
kubic/normal/1615/B.cpp
#include <bits/stdc++.h> using namespace std; #define N 200005 #define mid ((l+r)/2) int T,l,r,ans,cnt[N]; void upd(int l,int r,int qL,int qR) { if(l>=qL && r<=qR) { for(int i=0;i<=20;++i) if(r>>i&1) { if(l>>i&1) cnt[i]+=r-l+1; else cnt[i]+=(r-l+1)/2; }return; }if(qL<=mid) upd(l,mid,qL,qR); if(qR>mid) u...
ALGO
0.999672
3.680374
5e5ce64d-aa9d-4d3e-a285-4af97b45edb5
Atharva-Maheshwari/Competitive-Programming
codechef/AMR15A.cpp
//Problem-Mahasena #include <bits/stdc++.h> using namespace std; int main() { int n,cnt_even=0,cnt_odd=0; cin>>n; int arr[n]; for(int i=0;i<n;i++) { cin>>arr[i]; if(arr[i]%2==0) cnt_even++; else cnt_odd++; } if(cnt_even>cnt_odd) cout<<"READY...
ALGO
0.999898
4.593853
e8b70017-73dc-448a-913e-bbf467932f63
dxuanthu1/New
I_GGX64/5/5对3/2马3兵对1马2兵.cpp
#ifndef END_my_m_MT_R_2ma3pawn_B_1ma2pawn #define END_my_m_MT_R_2ma3pawn_B_1ma2pawn #include "..\\..\\chess.h" #include "..\\..\\preGen.h" #include "..\\..\\endgame\mat.h" #include "2312.cpp" #include "..\\..\\white.h" #else #include "..\\..\\black.h" #endif // //const int ADD_2MaXPawn_2Pao1Pawn_ByPawn[3] ...
ALGO
0.993816
3.048977
22af45ad-1d49-41ba-8550-3cfa61f5de9e
NARESHroyaLNt/CSA0488-OS
OS LAB Q33.cpp
#include <stdio.h> #include <stdlib.h> int findOptimalPageToReplace(int pages[], int np, int frame[], int nf, int index) { int pos = -1; int farthest = index; for (int i = 0; i < nf; i++) { int j; for (j = index; j < np; j++) { if (frame[i] == pages[j]) { ...
ALGO
0.999854
5.736095
8ebaf71b-e7ea-4b1f-a075-8a30fdbf1d3e
RCCMichaelRisher/CSC-5-F24
Project/ShootOut_V2/main.cpp
/* * File: main.cpp * Author: Dr. Mark E. Lehr * Created on January 28, 2020, 1:10 PM * Purpose: ShootOut */ //System Libraries #include <iostream> //I/O Library #include <cstdlib> //Random Function Library #include <ctime> //Time Library #include <iomanip> //Formatting Library #include <cmath> /...
ALGO
0.998431
4.303084
f7342be0-fae3-4b70-a3be-632b1c23fa06
cgsdfc/basic-algorithm
晴神笔记/第九章 提高篇(3) 数据结构专题(2)/二叉查找树(BST)/codeup/问题 A 二叉排序树/main.cpp
#include <iostream> /* run this program using the console pauser or add your own getch, * system("pause") or input loop */ #define MAXN 105 struct Node { int data; int lchild, rchild; } node[MAXN]; int index; int NewNode(int v) { node[index].data = v; node[index].lchild = node[index].rchild = -1; ...
ALGO
0.999935
4.96913
26eab651-fcc8-48d7-a31a-281462c590d2
zhoujunlingla/ACM_homework
gcd + 素数判断/1004.cpp
#include <stdio.h> #include <iostream> #include <cstdlib> #include <cmath> #include <cctype> #include <string> #include <cstring> #include <algorithm> #include <stack> #include <queue> #include <set> #include <map> #include <ctime> #include <vector> #include <fstream> #include <list> #include <iomanip> #include <numeri...
ALGO
0.999817
4.441275
4ef21d10-97f0-42f1-bed1-122957c0ec70
channyHuang/tools
PointsProcess/3rd/eigen/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.957138
3.835741
a17e0028-6f8f-493d-a21c-c9fecde53964
cnshibo/cortex-m-qpc-freertos-template
third_party/STM32Cube_Driver/Drivers/CMSIS/NN/Examples/ARM/arm_nn_examples/gru/arm_nnexamples_gru.cpp
/** * @ingroup groupExamples */ /** * @defgroup GRUExample Gated Recurrent Unit Example * * \par Description: * \par * Demonstrates a gated recurrent unit (GRU) example with the use of fully-connected, * Tanh/Sigmoid activation functions. * * \par Model definition: * \par * GRU is a type of recurrent neura...
ALGO
0.871316
7.471897
637ffe08-574b-4b61-bc0a-5349debad37f
M0hamedIbrahim1/Problem-Solving-With-C-
Loops_Problems/Appleman and Easy Task.cpp
//link : https://codeforces.com/contest/462/problem/A //author :@Mohamed Ibrahim #include<bits/stdc++.h> using namespace std; int main() { int size,cnt=0; cin>>size; char arr[size][size]; for(int i = 0 ; i<size;i++){ for(int j = 0;j<size;j++){ cin>>arr[i][j]; } } int flag = 1; for(int i = 0 ; i<size;i++){ for(int...
ALGO
0.99984
4.273867
2db49493-7444-4dbf-b27b-17dcd09cb46a
jibin-dev/tourism
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.9988
6.76073
68d5e56e-43b0-4bbd-8b82-8d9bacfc6845
Hunkhill1/Graphcis-and-animation
CITS3003/Labs/lab_01/labs-examples/lab3/LINUX_VERSIONS/example1b.cpp
// Two-Dimensional Sierpinski Gasket // Generated using randomly selected vertices and bisection // // Same as example1.cpp except that the line // glutInitWindowSize( 512, 512 ); // is commented in main(). To run the program, can specify command // line arguments as follows: // example1b -geometry 512x5...
ALGO
0.954533
5.48283
26ce0416-19e9-4e5d-95f3-e738a8f0a1e2
sky107/Repository-2
floyd-warshal-algorithm.cpp
//The floyd warshall algorithm is for solving the all pairs shortest path probelm //The problem is to find the shortest distances between every pair of vertices in a given edge weighted directed graph // -ve edges also included , DPBASED => O(N3) time , V verices #include <bits/stdc++.h> using namespace std; void floy...
ALGO
0.999846
4.832055
d62414b9-37e5-470a-86be-d5ea2759eb71
ishandutta2007/codeforces
ssamt/normal/1625/D.cpp
#include <bits/stdc++.h> using namespace std; class Trie { public: bool node; int n; int h; vector<Trie*> child; Trie(int n) { int i; this->n = n; this->h = 0; for(i=0; i<n; i++) { this->child.push_back(NULL); } this->node = false; } Trie(int n, int h) { int i; this->n...
ALGO
0.999964
3.900767
415664a0-bba3-4e41-9278-98eeb2858bb3
tristanseifert/csce313
PA2/src/parser.cpp
/* vim: set tabstop=2:softtabstop=2:shiftwidth=2:noexpandtab */ #include "parser.h" #include "helpers.h" #include <string> #include <vector> #include <sstream> /** * Initializes the parser. */ Parser::Parser() { } /** * Cleans up the parser resources. */ Parser::~Parser() { } /** * Splits arguments to all ...
TOOL
0.924782
5.215294
5fa5abe9-a2e7-4555-87ca-f6880a762083
ErickPetru/android_frameworks_base
media/libstagefright/codecs/aacdec/ps_init_stereo_mixing.cpp
/*---------------------------------------------------------------------------- ; INCLUDES ----------------------------------------------------------------------------*/ #ifdef AAC_PLUS #ifdef PARAMETRICSTEREO #include "pv_audio_type_defs.h" #include "fxp_mul32.h" #include "aac_mem_funcs.h" #include "pv_...
ALGO
0.991535
3.903217
55541e3f-e3ff-4ce9-9f3b-54c7e3d38d22
maiarabaltazar/ATIVIDADES
C++/MEDIDAS.cpp
#include <bits/stdc++.h> using namespace std; int main (){ double a, b, c, aq, atri, atra; cout << "Digite a medida A: "; cin >> a; cout << "Digite a medida B: "; cin >> b; cout << "Digite a medida C: "; cin >>c; aq = pow (a,2); atri = (a * b) / 2; atra = ((a + b) * c) / 2; cout << fixed << setprecision (4); cout...
ALGO
0.995713
3.51849
1528a7ee-dc33-47be-93bd-7ecb292e70e5
sreakdgeek/Model-Predictive-Control
src/Eigen-3.3/doc/examples/nullary_indexing.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; // [functor] template<class ArgType, class RowIndexType, class ColIndexType> class indexing_functor { const ArgType &m_arg; const RowIndexType &m_rowIndices; const ColIndexType &m_colIndices; public: typedef Matrix<typename ArgType::Scalar, ...
ALGO
0.93805
7.050192
bc40503a-424d-4ea6-9dde-22983a991edc
BaoZhuhan/Awesome-SE-Box
00课程技术栈/XCPCMode/全排列.cpp
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; next_permutation(a.begin() , a.end()); return 0; }
ALGO
0.999585
3.449488
156acd0a-cd7b-4447-bb9a-083711529018
JorgeCM2004/Proyectos-URJC
C++/Estructuras de Datos II/hashmap2.cpp
#include <iostream> #include <vector> #include <list> template <typename KeyType, typename ValueType, int N = 100> class HashMap { private: std::vector <std::list<std::pair<KeyType, ValueType>>> contenedor{N}; size_t compress(KeyType k) {return k % N;} public: int operator[](KeyType k) const { ...
ALGO
0.996358
5.110893
dacb660d-2321-452a-bd8a-4293d948bfbf
songhn233/Algorithm-Packages
codeforces/cf576 div2/A.cpp
#include<cstdio> #include<algorithm> #include<cstring> #include<iostream> using namespace std; int n,x,y,a[100050],q[100050]; inline int read() { int x=0,t=1;char ch=getchar(); while(ch>'9'||ch<'0'){if(ch=='-')t=-1;ch=getchar();} while(ch>='0'&&ch<='9') x=x*10+ch-'0',ch=getchar(); return x*t; } int main() { n=read...
ALGO
0.999984
3.083738
b19939a9-6a99-4b63-a192-42a975d76d17
anupam8nith/Leetcode
2091-removing-minimum-and-maximum-from-array/2091-removing-minimum-and-maximum-from-array.cpp
class Solution { public: int minimumDeletions(vector<int>& A) { int i = 0, j = 0, n = A.size(); for (int k = 0; k < n; ++k) { if (A[i] < A[k]) i = k; if (A[j] > A[k]) j = k; } return min({max(i + 1, j + 1), max(n - i, n - j), i + 1 + n - j, j + 1 + n - i}); ...
ALGO
0.999955
5.81847
fc05d619-1abb-4b44-8c83-8627630c7661
LioneWang/Advanced-language-programming-2
3-b5.cpp/3-b5.cpp/3-b5.cpp
/* 2150265 09 */ #include<iostream> using namespace std; int exa; int main() { cout << "꣬£" << endl; int year, month, day,day2; cin >> year ; cin >> month; cin >> day; if (month > 12) { cout << "-·ݲȷ" << endl; } if (month == 2) { if (((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)) { if (day...
ALGO
0.998302
3.122406
5c9a34e6-39c8-4b86-a382-ebfed6145df5
stefdasca/CompetitiveProgramming
Ro Camps/Juniors/2015-easydel.cpp
/* dp[mask] inseamna scorul maxim pe care il putem obtine daca stergem culorile din reprezentarea lui mask atunci tranzitiile sunt dp[mask] = max(dp[mask], dp[mask ^ (1 << bit)] + (scorul pe care il adauga stergerea culorii bit)); precalculam cost[i][j] care inseamna cu cate pozitii o sa se mute cuburile cu...
ALGO
0.999854
4.036098
090875b6-3b03-40e7-952a-893f0cbc59ee
Jhonathan-Pizarra/Cpp
Ejericios/EPN/Actuaciones/SBimestre/01022017_2.cpp
#include<iostream> #include<string.h> using namespace std; int lineal(int array[], int numero); //Prototipo de arreglo int main(){ int n; int array[10]; for(int j=0; j<10; j++){ cout<<"Ingrese un numero: "; cin>>array[j]; } cout<<endl; cout<<"Ingrese un numero a buscar: "; cin>>n; cout<<endl...
ALGO
0.999077
3.946212
8328fbe1-11bf-4e0d-82e3-84e2afb510bc
dangvu2405/1000baicodethieunhi
bai_khang_140.cpp
/* k? thu?t ?t lnh canph*/ #include <bits/stdc++.h> using namespace std; float giatriduongnhonhat(float a[], int n){ float min = a[0]; for(int i=0; i<n; i++){ if(min > a[i] && a[i]> 0){ min=a[i]; } } if(min<0){ return -1; } return min; } int main (){ int n; cout<<"nhap gia tri "<<endl; cin >> n;...
ALGO
0.999895
3.550286
586acdca-eb96-437c-be00-0d5260517c9b
micky387/android_frameworks_av
media/libstagefright/codecs/amrnb/common/src/pow2.cpp
/* Filename: /audio/gsm_amr/c/src/pow2.c ------------------------------------------------------------------------------ REVISION HISTORY Description: Updated template. Changed function interface to pass in a pointer to overflow flag into the function instead of using a global flag. Rem...
ALGO
0.998185
6.253882
d379a436-0e58-432f-80c3-ee7d8af30d9a
RenovationIGuess/Algorithm
CBasics/Code C/C++/ADV 10 (1).cpp
#include<iostream> using namespace std; int main() { int n; cin >> n; int* arr = new int[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; } for (int i = 0; i < n; i++) { if (arr[i] % 3 == 0 && arr[i] % 5 != 0) { cout << arr[i] << " "; } } delete[]arr; //Cau lenh return 0; }
ALGO
0.999782
3.153505
565bbc05-0b24-4b3e-936d-8a4fc2338bd5
vvbach/ITMO-Algorithm-and-Data-Structure
Lab 2/H.cpp
#include <iostream> using namespace std; struct Segment{ int begin; int end; }; void merge(Segment arr[], int left, int mid, int right){ Segment *mergeArr = new Segment[right - left + 1]; int i1 = 0; int i2 = 0; while (left + i1 <= mid && mid + 1 + i2 <= right){ if (arr[left + i1].be...
ALGO
0.999763
4.816039
98d59770-2aa7-4e82-9c46-3c933c879cca
cjwalle97/ConditionalExercises
Conditional OrderingNumbers.cpp
#include <iostream> //Description: ask five numbers from the user before adding them together and displaying in an order dependent of the sum. Positive= ascending order. Negative= Descending order. 0= Order of input int main() { int a; int b; int c; int d; int e; int first; int second; int third; int fourth;...
ALGO
0.999754
4.388062
c5927cbc-5c93-4113-982d-1c69ce7938fa
Rushi0508/Leetcode
169-majority-element/169-majority-element.cpp
class Solution { public: int majorityElement(vector<int>& nums) { int i, candidate = -1, votes = 0; int n = nums.size(); // Finding majority candidate for (i = 0; i < n; i++) { if (votes == 0) { candidate = nums[i]; votes = 1; } else { ...
ALGO
0.999929
5.740758
62776f5d-c2ff-4e15-8f65-417bfa1e1b34
bingsfan/myleetcode
卡玛网图论/23dijkstra最小堆.cpp
#include <iostream> #include <vector> #include <list> #include <queue> #include <climits> using namespace std; class mycomparison { public: bool operator()(const pair<int, int>& lhs, const pair<int, int>& rhs) { return lhs.second > rhs.second; } }; struct Edge { int to; // 邻接顶点 ...
ALGO
0.999957
4.113174
c052ffb5-b6a2-4692-b3e5-ae32a358a3c6
Blackstarez/Algorithm_solve
Algorithm_solve/2357.cpp
#include <iostream> #define INT_MAX 0x7fffffff using namespace std; pair<long long,long long> arr[280000]; void setData(int idx, long long val) { //val = val - arr[idx]; arr[idx] = { val,val }; while (idx != 0) { idx /= 2; if (arr[idx].first > val) { arr[idx].first = val; } if (arr[idx].second < val...
ALGO
0.999985
3.999679
bdaaab8a-98a5-450d-8ff4-2f034b1b07ad
hide-kaw/xact-bench
third_party/tbb/examples/parallel_do/parallel_preorder/Graph.cpp
#include <cstdlib> #include "Graph.h" #include <iostream> using namespace std; void Graph::create_random_dag( size_t number_of_nodes ) { my_vertex_set.resize(number_of_nodes); for( size_t k=0; k<number_of_nodes; ++k ) { Cell& c = my_vertex_set[k]; int op = int((rand()>>8)%5u); if( op>i...
ALGO
0.996938
4.258839
dc037b3a-6aba-4bac-bc55-dd5621fe3bd8
SPEAROW486/resume
Algorithm/BaaaaaaaaaaarkingDog_0x10/BOJ_11055/main.cpp
#include <bits/stdc++.h> int n; constexpr int MAX = 1001; int dp[MAX]; int buf[MAX]; // dp[i] = i번째 원소를 마지막 원소로 하는 가장 큰 증가 부분 수열의 합 int main() { // std::ios_base::sync_with_stdio(false); // std::cin.tie(NULL); std::cin >> n; for (int i = 1; i <= n; ++i) { std::cin >> buf[i]; dp...
ALGO
0.999951
4.131191
06950020-d606-455b-9957-24bfb0e50570
DikshantBadawadagi/DSA
hungrySeq.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int main() { long long n; cin>>n; vector<int>nums(n); for(int i=0;i<n;i++){ nums[i] = 3*n + i; } for(int i=0;i<n;i++){ cout<<nums[i]<<" "; } cout<<endl; }
ALGO
0.999405
3.376801
c46cecc5-35e4-4e32-923e-f4cbc348fcde
naoto0804/atcoder_practice
contests/abc/13/137/b.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, ll>; using Graph = vector<vector<ll>>; #define rep(i, n) for(ll i=0;i<(ll)(n);i++) #define rep2(i, m, n) for(ll i=m;i<(ll)(n);i++) #define rrep(i, n, m) for(ll i=n;i>=(ll)(m);i--) const int dx[4] = {1, 0, -1, 0}; const int dy[4] = ...
ALGO
0.998989
3.335577
1de2ec6b-becc-495d-b456-0827f19a9363
PBP-D-11-2023/wisdom_repository_mobile
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.9988
6.76073
144c6db3-d1b7-49d2-90d3-d3f9acdb324a
HongjianLi/jstar-lbvs.cpp
src/main.cpp
#include <iostream> #include <iomanip> #include <string> #include <fstream> #include <filesystem> #include <vector> #include <array> #include <cmath> #include <numeric> #include <algorithm> #include <cassert> #include <chrono> #include <thread> #include <boost/format.hpp> #include <GraphMol/SmilesParse/SmilesParse.h> #...
DATA
0.947962
4.266591
bb5eb91e-7819-4d33-9e6c-f2c7e621bf84
brien/tankgame
src/TankCollisionHelper.cpp
#include "TankCollisionHelper.h" #include "Tank.h" bool TankCollisionHelper::CheckFourPointCollision(const Tank& tank, float offsetY) { LevelHandler& level = LevelHandler::GetSingleton(); float checkY = tank.y + offsetY; return level.PointCollision(tank.x, checkY, tank.z) || level.PointColl...
TOOL
0.889886
6.36585
2b244ef1-efcc-4a37-b646-d4e4144e99ea
anishamajumder2005/codeforces
roadtozero.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int int main(){ int t; cin>>t; while(t--){ ll x,y,a,b; cin>>x>>y>>a>>b; ll cost=0; ll mini=min(x,y); ll maxi=max(x,y); if(2*a<b){ cost=(x+y)*a; }else{ cost+=(mini...
ALGO
0.998557
3.388219
aab857a0-37c9-462d-a008-837542ddfd51
yashpatelsed/Implementations-of-Various-Algorithms-and-Data-Structures
dp/shortest_palindromic_supseq.cpp
//http://jeffe.cs.illinois.edu/teaching/algorithms/notes/05-dynprog.pdf //most of the questions of this dp folder are exercises from this PDF. #include <iostream> #include <algorithm> #include <vector> using namespace std; //#define PRINT_ALL_SUB int SPS(const string &x, int l, int r, vector<vector<int> > &dp) { if(...
ALGO
0.999972
4.204584
91ea02f2-17f7-4395-84b6-90a78ab46b62
SSdCode/Coding-Practice
4.Stack/C++/stackUsingLinkedList.cpp
/** * Implement Stack using Linked List in C++ * * This program demonstrates how to implement a stack data structure using a linked list in C++. * The implementation includes standard stack operations like push, pop, peek, isEmpty, etc. * * Time Complexity: * - Push: O(1) * - Pop: O(1) * - Peek: O(1) * - is...
ALGO
0.9596
7.409882
17499138-0ebd-4139-837d-00814948f48a
peng00bo00/laser-SLAM
assignments/HW2/odom_calib/odom_calib.cpp
#include <string> #include <iostream> #include <fstream> #include <math.h> #include <Eigen/Core> #include <Eigen/Geometry> #include <Eigen/Dense> #include <vector> using namespace std; string scan_match_file = "./scan_match.txt"; string odom_file = "./odom.txt"; int main(int argc, char** argv) { // 放置激光雷达的时间和匹配...
ALGO
0.997667
3.466094
9e5128c3-09c1-4e26-b2d0-62ee54963ab0
codeplaysoftware/sycl-for-cuda
clang/test/Analysis/Inputs/ctu-chain.cpp
int h_chain(int x) { return x * 2; } namespace chns { int chf3(int x); int chf2(int x) { return chf3(x); } class chcls { public: int chf4(int x); }; int chcls::chf4(int x) { return x * 3; } }
TOOL
0.986056
4.249734
ab3e2695-3f05-435a-bbce-771d80af135a
mdfaridmiah/competitive-programming
solved/SPOJ/DIVFACT - Divisors of factorial/solution.cpp
#include<bits/stdc++.h> using namespace std; const int mx = 1234567; const int md = 1e9+7; typedef long long ll; vector<ll> prime; bool vis[mx]; void sieve(int n){ memset(vis, 1, sizeof(vis)); for (int p=2; p*p<=n; p++){ if (vis[p] == true){ for (int i=p*2; i<=n; i += p) vi...
ALGO
0.999954
4.169654
a7324bbe-5cdd-4423-a231-ad345aa87cfa
QZKasoma-Luo/CG_Computing
ext/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_operatornorm.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { MatrixXf m(2,2); m << 1,-2, -3,4; cout << "1-norm(m) = " << m.cwiseAbs().colwise().sum().maxCoeff() << " == " << m.colwise().lpNorm<1>().maxCoeff() << endl; cout << "infty-norm(m...
ALGO
0.999739
4.076589
efd2ffdb-f0dc-4b0c-9d45-07a8b566da30
DataDrivenEngineer/prep
arrays_hashing/347/prep.cpp
#include <stdio.h> #include <vector> #include <map> #include <unordered_map> using namespace std; vector<int> topMostFrequent(vector<int>& nums, int k) { vector<int> out; unordered_map<int, int> numToFreq; for (auto& n : nums) { numToFreq[n]++; } map<int, int, greater<int>> freqToNum; for (auto& it ...
ALGO
0.999981
5.134615
7762d2ba-bfc9-4a3f-8da4-e0779dcd74e8
kmjp/procon
codeforce/901-950/905/b3.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #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 FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define ...
ALGO
0.999557
3.858705
c12cdf6c-06a5-42f9-a899-060b8d16d307
cbarrette/CodeEval
Easy/MultiplyList.cpp
#include <iostream> #include <fstream> #include <sstream> #include <vector> using namespace std; int main (int argc, char const* argv[]){ ifstream file(argv[1]); string line; while(getline(file,line)){ if(line=="")continue; stringstream ss1(line.substr(0,line.find("|"))); stringstream ss2(line.substr(line.fin...
ALGO
0.98929
3.368175
7feedd31-a3a7-4854-9bff-22e5153460ef
ryanwong1999/ws2
src/navigation2/nav2_costmap_2d/plugins/inflation_layer.cpp
#include "nav2_costmap_2d/inflation_layer.hpp" #include <limits> #include <map> #include <vector> #include <algorithm> #include <utility> #include "nav2_costmap_2d/costmap_math.hpp" #include "nav2_costmap_2d/footprint.hpp" #include "pluginlib/class_list_macros.hpp" #include "rclcpp/parameter_events_filter.hpp" PLUGI...
TOOL
0.916935
7.486592
e2d532f0-7808-4bb4-9f6c-d96a16d69ed0
sid620/CSES
dp/countingtowers.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ ll t,n,i; ll m=1000000007; cin>>t; vector<pair<ll,ll>>dp(1000001,make_pair(0,0)); dp[1].first=1; dp[1].second=1; for(i=2;i<1000001;i++){ dp[i].first=(2*dp[i-1].first+dp[i-1].second)%m; dp[i].second...
ALGO
0.999865
3.96489
51835cb4-c4a3-49d5-ad1a-ced97835ac0c
Vishesh-Gupta/Algolvers
graph/deepclone.cpp
/* // Definition for a Node. class Node { public: int val; vector<Node*> neighbors; Node() { val = 0; neighbors = vector<Node*>(); } Node(int _val) { val = _val; neighbors = vector<Node*>(); } Node(int _val, vector<Node*> _neighbors) { v...
ALGO
0.999968
6.14139
75a36cbe-bea6-45c3-a227-1a7660223aec
hdfrozen1/FPS-Miror
FPS MirrorNetwork/Library/PackageCache/com.unity.ide.visualstudio@2.0.22/Editor/COMIntegration/COMIntegration~/COMIntegration.cpp
#include <iostream> #include <sstream> #include <string> #include <filesystem> #include <windows.h> #include <shlwapi.h> #include <fcntl.h> #include <io.h> #include "BStrHolder.h" #include "ComPtr.h" #include "dte80a.tlh" constexpr int RETRY_INTERVAL_MS = 150; constexpr int TIMEOUT_MS = 10000; // Often a DTE call m...
TOOL
0.9385
6.933585
b010dc19-5a2f-4a9b-aefe-a50508a2f399
ebicochineal/marathon_match
topcoder_marathon_match/LineUp/LineUp.cpp
// C++11 #include <cmath> #include <string> #include <array> #include <vector> #include <cstdlib> #include <sstream> #include <iostream> #include <algorithm> #include <limits> #include <queue> #include <set> #include <unordered_set> #include <map> #include <unordered_map> #include <time.h> #include <sys/timeb.h> #inclu...
ALGO
0.999957
3.193891
c89ece5f-e703-49a1-ab56-47420cf86e30
sif69/codeforces-solution-by-sif_69
codeforces/1832/A.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define lg long long #define fi(i,L,R) for (ll i = L ; i <= R ; i++) #define fd(i,R,L) for (ll i = R ; i >= L ; i--) #define s1 string #define p_b push_back #define st(n) sort(a,a+n) #define rev reverse(a,a+n) #define revs(j) rev...
ALGO
0.999876
3.951885