uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
2d0707b4-4098-4cf0-9684-36a71f308a72
Gnaroshi/practice-algorithm-solvedac
With_Levels/Bronze/Bronze_2/16561.cpp
// problem: 3의 배수 // id: 16561 // time taken: #include <bits/stdc++.h> using namespace std; int main(void) { ios::sync_with_stdio(false); cin.tie(nullptr); int n, cnt = 0; cin >> n; n /= 3; for (int i = 1;; i++) { if (i > n) break; for (int j = 1;; j++) {...
ALGO
0.999894
3.536828
c364bcc0-cb1d-4ea4-a310-31821603799b
EPantelaios/knn-and-clustering-with-timeseries
Part_B/testing.cpp
#include <vector> #include <fstream> #include <sstream> #include "acutest/include/acutest.h" #include "./Curve/Clustering_Frechet.hpp" #include "./Common/utils.hpp" void test_back_track_path() { back_track_path *the_path; //check path_length //check path values //3 tests string input_file="test_inp...
TEST
0.956843
4.511314
da30fcc3-38b7-4d94-afa2-b14cf76ae879
QuickSorting/Codeforces
Codeforces Global Round 10/E.cpp
#include <bits/stdc++.h> using namespace std; const int k_N = 25 + 3; long long a[k_N][k_N]; int main(){ int n; cin >> n; for(int i = 1; i <= 2 * n - 1; ++i){ int x, y; if(i <= n) x = i, y = 1; else x = n, y = i - (n - 1); int cnt = 0; while(x >= 1 && y <= n){ ...
ALGO
0.999858
3.639635
4bf64e8e-4a82-4460-a421-780f4d328f5a
Cfretz244/smashcardloader
UICommon/CommandLineParse.cpp
#include "UICommon/CommandLineParse.h" #include <list> #include <optional> #include <sstream> #include <string> #include <tuple> #include <OptionParser.h> #include "Common/Config/Config.h" #include "Common/StringUtil.h" #include "Common/Version.h" #include "Core/Config/MainSettings.h" namespace CommandLineParse { c...
CONFIG
0.969558
7.406331
f433dae0-c09b-487b-8a05-806343c78021
KishoreKaushal/uva
supplementary_codes/graph_class/main.cpp
#include<iostream> #include <stdio.h> #include <stdlib.h> #include "graph.h" using namespace std; void input_adj_list(graph &G) { int n; // input int // for each vertex for(int i=0; i<G.get_total_vertex() ; i++) { // each adjacent list of a vertex is ended by a '-1' while(cin>>n , n!=-1) { // prin...
ALGO
0.964747
4.203808
d444fedc-09d9-4bbf-b0c6-15eb6673b26a
waseemraja21/Leetcode
2320-count-number-of-ways-to-place-houses/2320-count-number-of-ways-to-place-houses.cpp
int mod = 1e9 + 7; class Solution { int findWays(int index, vector<int> &dp){ if(index < 0) return 0; if(dp[index] != -1) return dp[index]; int way1 = 0 + findWays(index-1, dp); int way2 = 0; // if(index > 1){ way2 = 1 + findWays(index-2, dp...
ALGO
0.999997
5.380367
b096cf66-5e70-4147-bce9-6472430be01c
leecr97/mpm
include/eigen/doc/examples/DenseBase_template_int_middleCols.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; int main(void) { int const N = 5; MatrixXi A(N,N); A.setRandom(); cout << "A =\n" << A << '\n' << endl; cout << "A(:,1..3) =\n" << A.middleCols<3>(1) << endl; return 0; }
ALGO
0.979061
3.137095
c9f4a953-b4ee-4b2b-b7e0-4e31d25c9cb9
pdeitel/CPlusPlus20FullThrottlePart1
examples/libraries/math-boost-1.81.0/tools/hypergeometric_1F1_error_plot.cpp
#define BOOST_ENABLE_ASSERT_HANDLER #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY INT_MAX // for consistent behaviour across compilers/platforms: #define BOOST_MATH_PROMOTE_DOUBLE_POLICY false // overflow to infinity is OK, we treat these as zero error as long as the sign is correct! #define BOOST_MATH_OVERFLOW_ERROR_...
TEST
0.980189
6.212395
22326e09-ca5a-4263-abcd-42d745374287
lingna233/lingna-Cpp-learning
code/arfupt.cpp
/* arfupt.cpp -- an array of function pointers */ #include <iostream> // various notations, same signatures const double* f1(const double* ar, int n); const double* f2(const double ar[], int n); const double* f3(const double ar[], int n); int main() { using namespace std; double av[3] = {1112.3, 1542.6, 2227.9}; ...
TOOL
0.907835
5.755712
03612e2a-af38-4731-a326-60087cb27732
IntelLabs/c3-llvm
libc/src/math/generic/expm1f.cpp
#include "src/math/expm1f.h" #include "common_constants.h" // Lookup tables EXP_M1 and EXP_M2. #include "src/__support/FPUtil/BasicOperations.h" #include "src/__support/FPUtil/FEnvImpl.h" #include "src/__support/FPUtil/FMA.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/FPUtil/PolyEval.h" #include "...
ALGO
0.999309
4.986947
72b20176-9649-401b-869b-4518e1fc4e64
Padm0069/Leetcode-DSA
714-best-time-to-buy-and-sell-stock-with-transaction-fee/714-best-time-to-buy-and-sell-stock-with-transaction-fee.cpp
class Solution { public: int maxProfit(vector<int>& prices, int fee) { int n = prices.size(); vector<vector<int>> dp(n+1, vector<int>(2, 0)); for(int i=n-1; i>=0; --i){ for(int buy=0; buy<2; ++buy){ if(buy){ dp[i][buy] = max(-prices[i]...
ALGO
0.999809
5.721184
be68dfc7-306c-453d-a3fc-31d67cf39372
ishandutta2007/codeforces
froggyzhang/normal/1107/G.cpp
#include<bits/stdc++.h> using namespace std; #define N 300030 typedef long long ll; int n,A; ll ans,s[N],c[N],d[N]; int main(){ ios::sync_with_stdio(false); cin.tie(0); cin>>n>>A; for(int i=1;i<=n;++i){ cin>>d[i]>>c[i]; } for(int i=1;i<n;++i){ d[i]=d[i+1]-d[i]; } for(int i=1;i<=n;++i){ c[i]=A-c[i]; ans...
ALGO
0.999875
3.411521
5ef71279-9fdc-4e19-9792-ba58cbe2595f
rokid/blacksiren
src/lfqueue.cpp
#include <unistd.h> #include <sys/syscall.h> #include <errno.h> #include <time.h> #include <sys/time.h> #include <linux/futex.h> #include <sys/cdefs.h> #include <iostream> #include <atomic> #include <algorithm> #include "sutils.h" #include "lfqueue.h" #ifndef futex #define SYS_futex __NR_futex #define futex(...) sy...
TOOL
0.897368
5.412215
09fb9369-31bd-4b9a-a3f4-5deb14d05213
truongnhat96/baitaplaptrinh
bai tap thuat toan sinh ke tiep/sinh3.cpp
/*bài 6: sinh hoán vị bài 7: hoán vị ngược bài 8: xâu nhị phân có k bit 1 */ #include <bits/stdc++.h> using namespace std; int n,p[100],ok,k; void kt(){ for(int i=1;i<=n;i++){ p[i]=0; } } void sinh(){ int i=n; while(i>=1 && p[i]==1){ p[i]=0; --i; } if(i==0){ ok=0; ...
ALGO
0.999974
3.194498
9226ef01-b720-456e-a1db-c65eedee633a
EvAn-HuAngBiu/Leetcode
LeetCode-CPP/733.cpp
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <queue> using namespace std; class Solution { public: vector<vector<int>> floodFill(vector<vector<int>>& image, int sr, int sc, int newColor) { int m = image.size(), n = image[0].size(); vector<vector<bool>> visit...
ALGO
0.998065
5.991455
df2b8756-0f39-46a3-b422-02827e367f3b
Poojaambati9154/Striver-SDE-Challenge
151-184/174.cpp
#include <bits/stdc++.h> int help(int ind, int w, vector<int> &values, vector<int> &weights, int n, vector<vector<int>> &dp) { if (ind == 0) { if (weights[0] <= w) { return values[0]; } return 0; } if (dp[ind][w] != -1) return dp[ind][w]; int npick = help(ind - 1, w, values, weigh...
ALGO
0.999992
5.395373
b1cba95d-ed00-4780-a2de-ef7d6eda884f
beshubh/InterviewPrep
IB/heaps/magacian_and_choclates.cpp
#include<bits/stdc++.h> using namespace std; const int mod = 1e9 + 7; int nchoc(int A, vector<int> &B) { priority_queue<int> max_heap; for(auto choc : B){ max_heap.push(choc); } unsigned long long int ans = 0; int n = B.size(); while(A--){ unsigned long long int largest = max_heap.top(); ans += largest; a...
ALGO
0.999752
4.02771
d711f641-0c91-45ba-af93-c36c54f10ad1
ShorelineCrypto/nengcoin
src/protocol.cpp
#include "protocol.h" #include "util.h" #include "utilstrencodings.h" #ifndef WIN32 # include <arpa/inet.h> #endif namespace NetMsgType { const char *VERSION="version"; const char *VERACK="verack"; const char *ADDR="addr"; const char *INV="inv"; const char *GETDATA="getdata"; const char *MERKLEBLOCK="merkleblock"; c...
TOOL
0.857218
6.321836
9ac193b0-a5df-48a8-a1ee-b75c4adafaa8
ishandutta2007/codeforces
dreamoon_love_aa/normal/804/A.cpp
#include <bits/stdc++.h> #define SZ(X) ((int)(X).size()) #define ALL(X) (X).begin(), (X).end() #define REP(I, N) for (int I = 0; I < (N); ++I) #define REPP(I, A, B) for (int I = (A); I < (B); ++I) #define RI(X) scanf("%d", &(X)) #define RII(X, Y) scanf("%d%d", &(X), &(Y)) #define RIII(X, Y, Z) scanf("%d%d%d", &(X), &(Y...
ALGO
0.999769
3.244261
8324d3e2-aea1-4bf1-a7a5-fd2f6c714339
nicolapreda/school-learning
cpp/Archivio Quarta/Ricorsione/sommaInteriRicorsiva.cpp
#include <iostream> using namespace std; int sommaInteri(int n, int m); int main() { int n, m; cout << "Inserisci n(minore di m): "; cin >> n; cout << "Inserisci m(maggiore di n): "; cin >> m; cout << "La somma dei numeri compresi tra n e m e': " << sommaInteri(n, m) << endl; return 0; ...
ALGO
0.998061
4.124379
4eb36916-7a14-4a79-913b-46d03f06d5d5
csh2022/cpp
chapter1/ex1.23.cpp
#include <iostream> #include "Sales_item.h" using namespace std; int main() { Sales_item item, itemTmp; int cnt = 1; cin >> item; while (cin >> itemTmp) { if (itemTmp.isbn() == item.isbn()) cnt++; else { cout << "The quantity of book " << item.isbn()...
TOOL
0.984115
4.300085
020456b7-aed9-4ca2-94c1-badb2b94a7a9
GiorgosKoulouris/DeCoderPlugin
JUCE/modules/juce_box2d/box2d/Dynamics/Contacts/b2PolygonAndCircleContact.cpp
#include "b2PolygonAndCircleContact.h" #include "../../Common/b2BlockAllocator.h" #include "../b2Fixture.h" #include <new> using namespace std; b2Contact* b2PolygonAndCircleContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator) { void* mem = allocator->Allocate(sizeof(b2...
ALGO
0.980338
7.028175
a8cd6b6e-d893-49b0-b6d0-b2df2a8ff661
Siabus/Problem-Solving
Array And Hashmap/Minimum Number of Swaps to Make the String Balanced.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: int minSwaps(string s) { int l=s.size(),c=0,ans=0; for(int i=0;i<l;i++) { if(s[i]=='[') c--; else c++; ans=max(ans,c); } return (ans+1)/2...
ALGO
0.999113
4.667736
b3154ef9-12c5-46c1-9c32-413f2764534e
flowjiyun/PS
greedy/14729.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; vector<float> scores(n); for (int i = 0; i < n; ++i) { cin >> scores[i]; } priority_queue<float, vector<float>, greater<float> > minHeap(scores.begin(), s...
ALGO
0.99982
3.679956
0e4b6da3-6b0a-46e5-9905-506d182af2e5
puja2196/LLVM-tutorial
libc/src/math/nvptx/copysign.cpp
#include "src/math/copysign.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(double, copysign, (double x, double y)) { return __builtin_copysign(x, y); } } // namespace LIBC_NAMESPACE_DECL
TOOL
0.968585
5.730906
5576620d-bd7e-4d06-99d6-7b372203279b
Pradeepburla2003/leetcode
242-valid-anagram/valid-anagram.cpp
class Solution { public: bool isAnagram(string s, string t) { if(s.size()!=t.size()) return 0; sort(s.begin(),s.end()); sort(t.begin(),t.end()); // for(int i=0;i<s.size();i++){ // if(s[i]!=t[i]) return 0; // } if(s!=t) return 0; return 1; } };
ALGO
0.999997
5.954446
ddcdeb6c-12cd-44c1-b11c-695463013a22
Shubham-tiwari123/Array-functions
main.cpp
#include <iostream> #include "ArrayOperations.h" using namespace std; int main() { ArrayOperations a; /*Accept array*/ a.acceptData(); a.diplayData(); /*Rotate array by some number*/ // a.arrayRotate(); // a.diplayData(); /*Rotate array in cyclic form*/ // a.arrayCylicRotation(); // a...
ALGO
0.997463
4.075228
80985ad0-d913-4fed-bdc4-0857bf6ac31a
dimkashelk/spbspu-labs-2022-aap-904-a
timofeev.maxim/I2/partitionByEven.cpp
#include "partitionByEven.h" #include <algorithm> #include <stdexcept> int *partitionByEven(int *arr, size_t size) { if (size == 0) { throw std::length_error("Size error"); } int *l = arr; int *r = arr + size - 1; if (l == r) { return l; } else if (l < r) { do { while (*l % 2 =...
ALGO
0.998928
5.662253
4d54e779-bd7b-42bc-974f-74098ddb6c4a
czhang2718/cp-contests
usaco/treeboxes.cpp
#include "grader.h" #include<bits/stdc++.h> using namespace std; #define f first #define s second #define pb push_back typedef pair<int, int> pii; const int N=100001; const int K=17; int n, q; vector<int> adj[N]; int ss[N]; pii loc[N]; int par[N][K]; int tin[N], tout[N]; int t; bool anc(int a, int b){ return tin[a...
ALGO
0.999751
3.511048
cca0daa6-73be-45eb-9ad5-4f91043f0a42
akashag55/codes
sparce_array.cpp
#include <bits/stdc++.h> #include<string.h> using namespace std; int main() { int n,q,i,j,count=0; char x,y; cin>>n; char strings[n]; for(i=0;i<n;i++) cin>>strings[i]; cin>>q; char queries[q]; int results[q]; for(i=0;i<n;i++) cin>>queries[i]; for(i=0;i<q;i++) ...
ALGO
0.999511
3.9869
f5a532aa-1f81-4ee2-ae75-36faca7f2df3
hkara657/NDSS
Assignment3/code part a/bob.cpp
// Client side C/C++ program to demonstrate Socket programming #include <stdio.h> #include <sys/socket.h> #include <stdlib.h> #include <netinet/in.h> #include <string.h> #define PORT 8095 #include<sys/unistd.h> #include<arpa/inet.h> #include "GeneratePrime.cpp" #include <fstream> int num_bits=512; int socket_id = 0; ...
ALGO
0.959984
4.287733
45377362-2ccf-430b-8008-38fb66281936
proghead00/LeetcodeGrind
576-out-of-boundary-paths/576-out-of-boundary-paths.cpp
class Solution { public: int mod = 1e9 + 7; int dx[4] = { -1, 1, 0, 0}; int dy[4] = {0, 0, 1, -1}; int help(int r, int c, int i, int j, int maxMove, vector<vector<vector<int>>> &dp) { // currently I am at (i, j) if (i < 0 or i >= r or j < 0 or j >= c) return 1; if (maxMove ==...
ALGO
0.999809
5.340102
19154d7e-2136-4af2-b1d5-47e224ba23a4
lozanorenzo/Repositorio-de-Prueba
TAREA/MCD para N variables.cpp
#include<iostream> using namespace std; /*EL ALGORITMO DE EUCLIDES se basa en que el MCD de dos números no cambia si se reemplaza uno de los números por el residuo de su división por el otro. */ int calcularMCD(int a,int b){ if(b==0){ return a; } return calcularMCD(b,a%b); } int main(){ int cantidadDeNumeros,...
ALGO
0.99909
4.710705
2cbf8997-7025-4f2d-a972-63bd6c848930
HaadifSadat/Miscellaneous
Miscellaneous-cpp/LLintro.cpp
#include <iostream> using namespace std; class node { public: int info; node* next; node(int data) { info = data; next = NULL; } }; void edins(node* &hd,int data) { node* n = new node(data); if(hd == NULL) { hd = n; return; } node* temp = hd...
ALGO
0.99996
4.220589
19503da2-20d0-4925-bccc-eadc9887b679
ACyming/OI
c++/水题/军事机密2.0.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n,i,j,k; cin>>n; int a[n]; for(i=0;i<n;i++) { cin>>a[i]; } sort(a,a+n); cin>>k; for(i=0;i<k;i++) { int t; cin>>t; cout<<endl<<a[t-1]; } return 0; }
ALGO
0.999992
3.58342
5c02cdc6-6889-4bfa-ad65-e9a69d2eef62
Sayan4391/CrackYourPlacement
0287-find-the-duplicate-number/0287-find-the-duplicate-number.cpp
class Solution { public: int findDuplicate(vector<int>& nums) { int slow = nums[0]; int fast = nums[0]; do { slow = nums[slow]; fast = nums[nums[fast]]; } while (slow != fast); slow = nums[0]; while (slow != fast) { s...
ALGO
0.999984
6.327801
ba9d22fa-353e-4461-91b9-6f802b50a848
dooli1971039/Algorithm
Others/BOJ_10871.cpp
#include <iostream> using namespace std; int n,x,tmp; int main(){ ios::sync_with_stdio(0); cin.tie(0); cin>>n>>x; for(int i=0;i<n;i++){ cin>>tmp; if(x>tmp) cout<<tmp<<' '; } }
ALGO
0.999701
3.140181
6d6951d1-ade6-465e-9734-1cfad816e9b0
xainyuplus/cpp
P5724.cpp
// Problem: P5724 【深基4.习5】求极差 / 最大跨度值 // Contest: Luogu // URL: https://www.luogu.com.cn/problem/P5724 // Memory Limit: 125 MB // Time Limit: 1000 ms // // Powered by CP Editor (https://cpeditor.org) #include<bits/stdc++.h> using namespace std; int main(){ int n;cin>>n; int min=1000,max=0; int a; while(cin>>a){ if...
ALGO
0.999379
3.97736
0ab497a6-e724-4efa-9c45-bf054205a719
sudipto0315/MyPrograms
LeetcodeSolutions/1838.cpp
#include<iostream> #include <algorithm> using namespace std; class Solution { public: int maxFrequency(vector<int>& nums, int k) { sort(nums.begin(),nums.end()); long long int maxFreq=0,l=0,r=0,total=0; for(r=0;r<nums.size();r++){ total+=nums[r]; while(l+1<=r && (nums...
ALGO
0.999982
5.148014
a28d82dc-4314-49f3-bd0c-5f3b1231e719
its-AkshatJain/Leetcode
3171-minimum-equal-sum-of-two-arrays-after-replacing-zeros/3171-minimum-equal-sum-of-two-arrays-after-replacing-zeros.cpp
class Solution { public: long long minSum(vector<int>& nums1, vector<int>& nums2) { long long sum1 = 0, sum2 = 0; long long zero1 = 0, zero2 = 0; for(int num: nums1){ sum1 += (num==0) ? 1 : num; zero1 += (num==0) ? 1: 0; } for(int num: nums2){ ...
ALGO
0.999964
5.349584
c9bd7f4d-df7b-475e-907b-bfa16ed4eb93
AamirSohail07000/MUJ_Practical
DSA/searching_&_sorting/BubbleSort1.cpp
// Sort the array {64, 25, 12, 22, 11} using Bubble Sort. #include <iostream> using namespace std; void bubbleSort(int arr[], int n) { for(int i = 0; i < n-1; i++) { bool swapped = false; // optimization for(int j = 0; j < n-i-1; j++) { if(arr[j] > arr[j+1]) { // Swap ...
ALGO
0.999877
6.073631
31700ada-091a-4f3f-94f7-5b6c3f6009c0
Dom-Garotom/Algoritmos-Ads
recursividade/somatorio/ex.cpp
#include <iostream> using namespace std; int soma( int indice , int n ){ if ( indice == n){ return n; } return indice + soma( indice + 1 , n) ; } int main(){ cout << soma(0 , 5); return 0; }
ALGO
0.99889
4.579021
b9e2ab05-2ea4-42e8-a1f2-c8331d90ef6d
Anirudh-N-15/LeetCode-Solutions
3330-find-the-original-typed-string-i/3330-find-the-original-typed-string-i.cpp
class Solution { public: int possibleStringCount(string word) { int n = word.size(); int count = 1; for(int i=0;i<n-1;i++) { if(word[i] == word[i+1]) { count++ ; } } return count ; } };
ALGO
0.999943
5.924753
6bf2f262-819c-43b0-a063-3d50096cd18c
olledejong/DAISIEsims
src/DAISIE_sim_update_state_cr.cpp
#include <iostream> #include <vector> #include <list> #include <string> #include <Rcpp.h> #include "helper_functions.h" //' Updates state of island given sampled event for a constant rate case. //' //' Makes the event happen by updating island species matrix and species IDs. //' What event happens is determined by t...
ALGO
0.995591
6.558217
37de5c0b-b511-4da3-b6f7-99725ac2107f
BeWithGanesh/Data-Structures-and-Algorithms
Array/remove duplicates from sorted array.cpp
// Coded by Ganesh Prasad #include<bits/stdc++.h> using namespace std; void removeDuplicates(int arr[], int n){ //corner case if(n==0 || n==1) return; int j=0; int res[n]; for(int i=0;i<n-1;i++){ if(arr[i] != arr[i+1]){ res[j++] = arr[i]; } } res[j++] = arr[n-1]; //print array for(int i=0...
ALGO
0.999763
5.204375
790b9a61-5573-4543-a784-9d0d36cc0941
Baryshev194/x-ray1.0007
xray/trunk/3rd party/boost/libs/spirit/example/fundamental/calc/parse_tree_calc1.cpp
#include "boost/spirit/core.hpp" #include "boost/spirit/tree/parse_tree.hpp" #include <iostream> #include <stack> #include <functional> #include <string> // This example shows how to use a parse tree //////////////////////////////////////////////////////////////////////////// using namespace std; using namespace boos...
ALGO
0.97762
7.600074
98a4e066-83d4-46a9-864d-ea5159d1f4c7
RisabhKedai/DS_Algo_Leetcode
DSA/ARRAY/TWO_POINTER/845._Longest_Mountain_in_Array/Optimal1.cpp
/* * @Author: lenovo * @Date: 2023-10-12 06:34:11 * @Last Modified by: lenovo * @Last Modified time: 2023-10-12 06:36:46 */ class Solution { public: int longestMountain(vector<int>& arr) { if(arr.size()<3){ return 0; } int N = arr.size(); int base = 0; int ans...
ALGO
0.999972
6.116479
fb09d826-3424-42ab-9ffe-132907d72d25
johnson3d/titan3d
3rd/native/glm/test/core/core_func_integer_find_lsb.cpp
#include <glm/glm.hpp> #include <cstdio> #include <cstdlib> //To define "exit", req'd by XLC. #include <ctime> int nlz(unsigned x) { int pop(unsigned x); x = x | (x >> 1); x = x | (x >> 2); x = x | (x >> 4); x = x | (x >> 8); x = x | (x >>16); return pop(~x); } int pop(unsigned x) { x = x - ((x >> 1) & 0...
ALGO
0.99714
4.794778
4bc62341-7712-4672-adf4-d9a66b4b5fd3
saumya1singh/DSAImportantQuestionScratch
Amazon_Interview_Questions/Easy/Intersection_of_Two_Linked_Lists.cpp
/* Problem Link: https://leetcode.com/problems/intersection-of-two-linked-lists/ */ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *getIntersectionNode(ListNode *h1,...
ALGO
0.999966
5.461385
103fa86e-2770-410e-a1d0-700fd3a07f18
adjardim/OpenMP_TM_TinySTM
cowichan/cowichan_openmp/mandel.cpp
/** * \file cowichan_openmp/mandel.cpp * \brief OpenMP mandel implementation. * \see CowichanOpenMP::mandel */ #include "cowichan_openmp.hpp" namespace cowichan_openmp { /** * Calculate mandelbrot value. * \param x x-coordinate. * \param y y-coordinate. * \return Mandelbrot value. */ INT_TYPE mandel_calc (r...
ALGO
0.999948
5.690586
397bcaa0-8873-4d87-8eaf-034415f5c7ec
robinrb7/DSA-cpp
0050-powx-n/0050-powx-n.cpp
class Solution { private: void solve(double x ,long long n,double &ans){ if(n<=0) return; if(n%2!=0){ ans = ans*x; n=n-1; } else{ x=x*x; n=n/2; } return solve(x,n,ans); } public: double myPow(double x, int ...
ALGO
0.999883
5.671351
922c98e0-832a-4217-bef0-3b256b6c0067
SiddhantSathe/AQI-Prediction
venv/Lib/site-packages/prophet/stan_model/cmdstan-2.33.1/stan/lib/stan_math/lib/tbb_2020.3/src/test/test_parallel_scan.cpp
#include "tbb/parallel_scan.h" #include "tbb/blocked_range.h" #include "harness_assert.h" #include <vector> typedef tbb::blocked_range<long> Range; static volatile bool ScanIsRunning = false; //! Sum of 0..i with wrap around on overflow. inline int TriangularSum( int i ) { return i&1 ? ((i>>1)+1)*i : (i>>1)*(i+1...
ALGO
0.903773
5.813643
c9937dc3-e4e1-44bc-bed8-8cdd33ba0cdb
HongHeeJung/mavros_ws
src/Firmware/src/modules/sensors/vehicle_imu/Integrator.cpp
#include "Integrator.hpp" #include <drivers/drv_hrt.h> using matrix::Vector3f; bool Integrator::put(const hrt_abstime &timestamp, const Vector3f &val) { if ((_last_integration_time == 0) || (timestamp <= _last_integration_time)) { /* this is the first item in the integrator */ _last_integration_time = timestamp...
ALGO
0.947284
6.481382
6f4b5dfd-ce05-4c52-bd90-d1c396f7213c
SambaGodschynski/sambag
src/sambag/disco/components/SizeRequirements.cpp
/* * SizeRequirements.cpp * * Created on: Mon Jun 11 14:42:09 2012 * Author: Johannes Unger */ #include "SizeRequirements.hpp" #include <algorithm> #include <limits.h> namespace sambag { namespace disco { namespace components { //=============================================================================...
TOOL
0.957295
6.534809
603942c6-8ace-4b47-9647-12ee3d47d8af
hitoshiQQ/Practice
practice 4/Homework 4.7.cpp
#include "Source.h" int main() { cout << "\t\tATM-2\n\n"; int n; cout << "Enter amount money: "; cin >> n; if (n > 150000) { cout << "Incorrect amount entered\n"; return -1; } cout << "\n\n=============================================\n"; if (n >= 5000 ) { cout <<...
TOOL
0.941192
3.790306
429f2f65-9f9a-4fc2-bcb5-a21b29506b50
ishandutta2007/codeforces
rajat1603/normal/488/C.cpp
#include "bits/stdc++.h" using namespace std; int hy , ay , dy , hm , am , dm , h , a , d; int main(){ //Hm / ( Ay - Dm ) < Hy / (Am - Dy ) cin >> hy >> ay >> dy; cin >> hm >> am >> dm; cin >> h >> a >> d; int ans = 9999999; for(int i = 0 ; i <= 1000 ; ++i){ for(int j = 0 ; j <= 200 ;...
ALGO
0.998679
3.428588
e58bb5d6-283a-4607-9ea8-18d9dc7dca12
yashgaherwar/Leetcode_Codes
918_Maximum_Sum_Circular_Subarray.cpp
/* Given a circular integer array nums of length n, return the maximum possible sum of a non-empty subarray of nums. A circular array means the end of the array connects to the beginning of the array. Formally, the next element of nums[i] is nums[(i + 1) % n] and the previous element of nums[i] is nums[(i - 1 + n) % ...
ALGO
0.999976
6.255099
0ad2b5d6-a0d6-4eb8-aec6-311601df7978
youhyeoneee/Algorithm
SW Expert Academy/22년 삼전 DX 하계 알고리즘 특강/03. 연결리스트/기초 Double Linked List 연습/DoubleLinkedList.cpp
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define MAX_NODE 10000 enum { ADD_HEAD = 1, ADD_TAIL, ADD_NUM, FIND, REMOVE, PRINT, PRINT_REVERSE, END = 99 }; struct Node { int data; Node* prev; Node* next; }; Node node[MAX_NODE]; int nodeCnt; Node* head; // 새 노드 생성 Node* getNode(int data) { node[nodeCnt].d...
ALGO
0.999327
4.422643
dfd9d9c1-89d1-4fba-8181-31af2f83ca46
Luomh25/DataStructure
实验07/T04-迷宫问题/LinkStack.cpp
#include <iostream> using namespace std; #include "LinkStack.h" LinkStack::LinkStack( ) { top=NULL; } LinkStack :: ~LinkStack( ) { Node *q; while (top != NULL) { q = top; top = top->next; delete q; } } void LinkStack::Push(int x,int y,int d) { Node *s; s = new Node;...
ALGO
0.988262
3.655496
bba4fc0d-f019-432b-9ecc-57ecb2fefcde
cucumbar/Programming
Practice/14/C++/ConsoleApplication7/ConsoleApplication7/ConsoleApplication7.cpp
// ConsoleApplication7.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы. // #include <iostream> int main() { int numb, two, len{ 1 }; std::cin >> numb; two = 1; if (numb > 0){ while (two * 2 <= numb){ two *= 2; len += 1; } } else { len -= 1; } st...
ALGO
0.999841
5.41964
a9e6e156-03f7-466b-b2e7-504863085c3a
iiicp/llvm
lib/Transforms/Utils/BreakCriticalEdges.cpp
#define DEBUG_TYPE "break-crit-edges" #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Analysis/Dominators.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/ProfileInfo.h" #include "llvm/Function.h" #include "llvm/Instructions.h" #include "llvm/Type.h" #...
TOOL
0.999213
7.411576
5757e68d-2bc7-4996-8509-8083224ead67
tropaA/labprogram
lab4/lab4/lab4.cpp
#include <math.h> #include <stdio.h> // int elementA(int n) { int summa = 0; for(int i = 1; i <= n; i++){ summa+= (2*i +1); } return summa; } // int elementB(int n) { int summa = 0; for(int i = 1; i <= n; i++){ summa+= (2*i); } return summa; } int main() { int n; float x; float summa = 0; // ...
ALGO
0.999382
3.373648
e60e3527-9c9d-425b-b377-e28f8a816107
ZhouZiyuIan/OI-Code
OI Documents/Public Code/2025.5sx/六年级18班贺子宸/payday.cpp
#include<bits/stdc++.h> #define ll long long #define cst const #define endl '\n' using namespace std; cst int N=200005; ll t,n,s,l,r,mid,ans; struct node{ int l,r; }a[N]; bool cmp(cst node&x,cst node&y){ return x.l==y.l?x.r<y.r:x.l<y.l; } bool chk(cst int&x){ ll pos=0,tot=x; for(int i=1;i<=n;i++){ if(a[i].l<=x&&a...
ALGO
0.99976
3.981225
f94c935e-4d40-4ef6-8026-aa3aeb0d1816
ThomasGrafNumerics/PendulumSimulation
src/VelocityVerletSolver.cpp
#include "VelocityVerletSolver.h" VelocityVerletSolver::VelocityVerletSolver (double tstart, double tend, unsigned int steps, double v0, double y0, std::function<double (double)> f) : tstart (tstart), tend (tend), steps (steps), y (steps + 1), v (steps + 1), time (steps + 1), f (f) { // compute (uniform) time gr...
ALGO
0.999777
5.925985
3c97efd0-1413-4098-8ae4-5a4cd904086c
alexpcheng/cfDNAme
software/methpipe-3.4.3/src/utils/duplicate-remover.cpp
#include <sys/types.h> #include <unistd.h> #include <string> #include <vector> #include <iostream> #include <unordered_map> #include <unordered_set> #include "OptionParser.hpp" #include "smithlab_utils.hpp" #include "smithlab_os.hpp" #include "GenomicRegion.hpp" #include "MappedRead.hpp" #include "bsutils.hpp" using...
DATA
0.867412
5.948714
67f822b9-075c-4dd8-8d32-122f1da3c7bd
pratyush2331/DSA_Love-Babbar
13. Tries/L81_implementAPhoneDirectory.cpp
// Implement a phone directory // CodeStudio : https://www.codingninjas.com/codestudio/problems/implement-a-phone-directory_1062666 /* TC : O(n * m^2) SC : O(m * n) */ #include<iostream> #include<string> using namespace std; class TrieNode { public: char data; TrieNode* children[26]; // 'a' to 'z' bo...
ALGO
0.999694
6.263543
11cee126-a9bc-4055-9bb3-94d9513e9d64
akramhany/ProblemSolving
ComptetiveProgramming/CU-FE Training 24 - 25/STL/G_Sereja_and_Dima.cpp
#include <iostream> #include <math.h> #include <vector> #include <algorithm> #include <map> #include <string> #include <set> #include <stack> #include <cstring> #define ll long long #define llu unsigned long long using namespace std; bool isPrime(ll n) { if (n == 2) return true; else if (n < 2 || n % 2 == 0)...
ALGO
0.999965
3.818762
0a071f40-7df6-4e64-9c0b-3d946c5c3bd3
PuspitaBarua/CSE-282
EXPERIMENT-3/Practice_exercise_4/Practice_exercise_4.cpp
//4. Write a C++ program to insert a node at the end of a DLL. [Consider possible edge cases] #include <iostream> using namespace std; // Node structure for the Doubly Linked List struct Node { int data; Node* prev; Node* next; }; // Function to construct a Doubly Linked List Node* constructDLL(int arr[...
ALGO
0.999638
6.394567
cd61fbfc-ab04-43e7-80d5-4be16c87219e
sadikovaa/prog.lab
lab5.cpp
#include <iostream> template<typename T> class Iterator { public: T *curr; T *begin; T *head; T *end; explicit Iterator() : curr(nullptr), begin(nullptr), head(nullptr), end(nullptr) {} explicit Iterator(T *first, T *begin, T *end, T *head) : curr(first), begin(begin), head(head), end(end) {}...
TOOL
0.963707
5.072476
a92d2ffe-f4c7-4bc4-a63a-7a5c0e8ab164
Dounchers/PI
TP3 C++/Funciones Parcial.cpp
//CARGAR ARREGLO struct Nodo{ int dato; Nodo* siguiente; }; int num; Nodo* inicio=nullptr; cout<<"Ingrese numero: "; cin>>num; while(num!=0){ Nodo* nuevo; //Creo un puntero del tipo Nodo llamado nuevo nuevo=new Nodo; //nuevo ahora apunta a un new Nodo que se creó en la heap nuevo->dato=num; //Accedo...
ALGO
0.998048
3.649725
bbf19b90-3d2e-4cba-8d9b-4fac1c9eef44
happylun/SketchModeling
Fusion/src/Common/Utility/StringUtil.cpp
#include "StringUtil.h" #include <sstream> #include <algorithm> #include <functional> #include <cctype> void StringUtil::split(string line, char delim, vector<string> &tokens) { tokens.clear(); stringstream ss(line); string item; while (getline(ss, item, delim)) tokens.push_back(trim(item)); } string StringUtil...
TOOL
0.909594
5.935118
c9f28153-7db1-4c6b-8c0d-643a23079a35
kevinoduan/Kattis
simonsays.cpp
#include <iostream> #include <vector> #include <sstream> using namespace std; int main(){ int N; cin >> N; for(int i = 0; i < N+1; ++i){ string inp; getline(cin, inp); istringstream iss(inp); std::vector<string> parsed; string word; while(iss >> word){ ...
ALGO
0.974237
3.088231
d17c519f-31bf-49f3-9a1d-e979e4911444
d-code000/UniversityCpp
hw/13.cpp
#include "iostream" #include "fstream" #include "vector" using namespace std; std::vector<float> direct_activation_shell(std::vector<float>& arr) { for (int step : {4, 2, 1}) { for (int start = 0; start < step; start++) { for (int i = start; i < arr.size(); i += step) { if (i =...
ALGO
0.999787
3.768978
5897fe8b-77c6-44f2-8daa-ada711d9f6bc
pedro-augusto-santana/mobile-dev-randomwords
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.998859
6.785645
3c48badb-2392-4ddd-aede-f079d510dc05
jeruiznavarro/FYS3150
Project5/source/integrators/velocityverlet.cpp
#include <integrators/velocityverlet.h> #include <system.h> #include <thermostat.h> #include <neighbourlists.h> VelocityVerlet::VelocityVerlet() { m_firstStep = true; } VelocityVerlet::~VelocityVerlet() { } void VelocityVerlet::halfKick(System *system, double dt) { for(unsigned int i=0; i<system->atoms().si...
ALGO
0.999012
6.079842
41cca68c-8f0a-446e-852f-2e0c574eff59
huangallen2008/cppcode
code/contest/codeforces/Educational Codeforces Round 162 (Rated for Div. 2)/A.cpp
#include<bits/stdc++.h> using namespace std; #pragma GCC optimize("O3") #define int long long #define REP(i,n) for(int i=0;i<n;i++) #define REP1(i,n) for(int i=1;i<=n;i++) #define RREP(i,n) for(int i=(n)-1;i>=0;i--) #define RREP1(i,n) for(int i=(n);i>=1;i--) #define f first #define s second #define pb push_back #define...
ALGO
0.999824
5.015759
c36f982c-ddca-4c63-be11-7bb349ae783e
orcastor/cad2x-converter
3rdparty/qtbase/src/gui/painting/math3d/qmatrix4x4.cpp
#include "qmatrix4x4.h" #include <QtCore/qmath.h> #include <QtCore/qvariant.h> #include <QtGui/qmatrix.h> #include <QtGui/qtransform.h> #include <cmath> QT_BEGIN_NAMESPACE #ifndef QT_NO_MATRIX4X4 /*! \class QMatrix4x4 \brief The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space. \since...
TOOL
0.959787
7.465951
774bc9dc-7347-420f-b6b5-4d19857579bc
AudiBram/tlx-toki-coursework
ifthenelse.cpp
#include <iostream> using namespace std; int n; int main() { cin >> n; n <= 100000 && n >= 100000; if (n > 0) { cout << "positif"; } else if (n < 0) { cout << "negatif"; } else { cout << "nol"; }; }
ALGO
0.99986
3.558917
7b30fb08-9e39-4f81-84c3-d9abd66751e2
anishamajumder2005/codeforces
shiftsandsorting.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int int main(){ ll t; cin>>t; while(t--){ string s ; cin>>s; ll cnt0=0; vector<ll>cnt(2,0); for(auto it:s){ if(it=='0')cnt0++; } ll totalcost=0; for(auto it:s){ ...
ALGO
0.999838
4.61998
2d1b6244-e07c-4e27-b69d-c37c54405acf
HOSHICHEN7267/1092CP2
homework/maxarr.cpp
#include <bits/stdc++.h> #define SIZE 20000 using namespace std; int main(){ int len = 0; int arr[SIZE] = {0}; int Max = -1234578; cin >> len; for(int i = 0 ; i < len ; ++i){ cin >> arr[i]; } for(int i = 0 ; i < len ; ++i){ int num = 1; for(int j = i ; j < len ;...
ALGO
0.999979
4.294316
c6916d5c-6cec-4652-ba1f-b043e92446be
onyx6838/algorithm
Phan Tich Thiet Ke Thuat Toan/Tren Lop/17-01-2020/Set.cpp
/* Set - insert : them vao (giong thi k them) - erase : xoa ptu */ #include<bits/stdc++.h> #include<set> using namespace std; int main() { int a[] = {4,7,2,8,4,8,3,2}; //set<int> S; //set<int,greater<int> > S; // lon' -> be' // giong cay nhi phan tim kiem BTS for(int x:a) S.insert(x); // insert (neu co thi k th...
ALGO
0.99704
4.115561
c6038ee9-ac83-4e38-8249-30f3f88e009b
doocs/leetcode
lcof2/剑指 Offer II 068. 查找插入位置/Solution.cpp
class Solution { public: int searchInsert(vector<int>& nums, int target) { int left = 0, right = nums.size(); while (left < right) { int mid = left + right >> 1; if (nums[mid] >= target) right = mid; else left = mid + 1; } ...
ALGO
0.999893
6.449378
fc369003-ea25-44d8-804c-21633413b4ac
tunak7up/c-program
buoi 10 chuoi/21-RGB.cpp
#include <stdio.h> #include <string.h> #include <ctype.h> #include <stdlib.h> int main(){ char c[100]; gets(c); int take = 0; for(int i = 0; i < strlen(c)-1; i++){ while(c[i+1] == c[i]){ take++; i++; } } printf("%d", take); }
ALGO
0.999759
3.389426
cca81eeb-d2d9-4939-9fe9-829ed7aaff8f
Mannan-Ali/C-Learnings
Recursion/Backtracking/Rat_in_maze.cpp
#include <bits/stdc++.h> using namespace std; bool checkpath(int **arr, int x, int y, int n) { if (x < n && y < n && arr[x][y] == 1) { return true; } return false; } bool newpath(int **arr, int x, int y, int n, int **solArr) { if (x == n - 1 && y == n - 1) { solArr[x][y] = 1; ...
ALGO
0.999939
4.96282
b0439c10-30f5-44e3-966c-e2bc4475c76f
secureworks/moonshine
implant/core/handlers/hello.cpp
#include "hello.h" #include "util/platform.hpp" #include "util/string.hpp" #include "util/debug.hpp" #if defined(OS_LINUX) #include <unistd.h> #include <stdio.h> #include <errno.h> #include <sys/utsname.h> #include <sys/types.h> #include <ifaddrs.h> #include <netinet/in.h> #include <arpa/inet.h> #include <linux/limits...
TOOL
0.876588
6.398523
434cbde1-5d1d-4ddc-9d14-e5ea2db6ba4e
songhn233/Algorithm-Packages
codeforces/cf627 div3/D.cpp
#include<cstdio> #include<algorithm> #include<cstring> #include<iostream> #include<vector> #include<queue> #include<cmath> #include<map> #include<set> #define ll long long #define F(i,a,b) for(int i=(a);i<=(b);i++) #define mst(a,b) memset((a),(b),sizeof(a)) #define PII pair<int,int> using namespace std; template<class ...
ALGO
0.999968
3.576882
ce6c7d2b-d983-4926-bc85-fda9e8d73ef9
BoringMarsh/Advanced-Language-Programming
作业代码/C++/3-b7.cpp
/*2151294 11 */ #include <iostream> #include<iomanip> using namespace std; int main() { float qian; /*qianֵ*/ int money; /*moneyqianԤֵ*/ int yuan50, yuan20, yuan10, yuan5, yuan1; /*ֱ50Ԫ20Ԫ10Ԫ5Ԫ1Ԫ*/ int jiao5, jiao1; /*ֱ5ǡ1ǵ*/ ...
ALGO
0.997163
3.079468
b5d613d9-9ba9-406b-97e9-0f05633fe9f1
dhwanish-3/Leetcode-CPP-Solutions
885. Spiral Matrix III.cpp
#include <bits/stdc++.h> using namespace std; class Solution { vector<vector<int>> sol; bool safe(int rows, int cols, int i, int j) { if (i < rows && i >= 0 && j < cols && j >= 0) { return true; } return false; } public: vector<vector<int>> spiralMatrixIII(int rows, ...
ALGO
0.9999
4.150754
499d747d-0577-45c4-9e15-670bbefa93a7
lukas-mh/coloring_real_world_graphs_randomly_in_the_local_model
girgs/source/girgs/source/WeightScaling.cpp
#include <algorithm> #include <cassert> #include <functional> #include <numeric> #include <cmath> #include <vector> #include <limits> #include <girgs/WeightScaling.h> namespace girgs { // helper for scale weights static double exponentialSearch(const std::function<double(double)> &f, double desiredValue, double accu...
ALGO
0.999759
6.767783
04bac9fc-4e6a-4474-b4b0-c4a11d6ccbbd
NguyenVietHoang725/TaiLieuCNTT-UTC
Nam_2/Ki_3/CTDL&GT/14092024/Nhungconsovekhong.cpp
#include <iostream> #include <stack> #include <set> #include <vector> #include <algorithm> using namespace std; vector<pair<int, int>> findFactors(int n) { vector<pair<int, int>> factors; for (int i = 1; i * i <= n; i++) { if (n % i == 0) { factors.push_back({i, n / i}); } } ...
ALGO
0.999919
5.144409
2317a26f-4f9b-4abc-a22c-e5c0928561ee
ShakilRahman768/XPSC-Solve
Week 10/Day 7/Sliding_Window_Median.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; template <typename T> using pbds = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; int main() { ios::sync_with_stdio(false); cin.ti...
ALGO
0.999996
3.774868
94a1b55e-7fca-4774-a878-f59348d4b820
yangtengleo/DeepSPIN
lammps_DeepSPIN/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp
// clang-format off /* ---------------------------------------------------------------------- Contributing author: Paul Crozier (SNL) The lj-fsw sections (force-switched) were provided by Robert Meissner and Lucio Colombi Ciacchi of Bremen University, Bremen, Germany, with additional assistance ...
ALGO
0.99778
5.961118
adc87a1f-e0b4-42ec-a99d-616919f09c07
uchiha-satyam/Codes
BST Downward Traversal - GFG/bst-downward-traversal.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; #define MAX_HEIGHT 100000 // Tree Node struct Node { int data; Node *left; Node *right; Node(int val) { data = val; left = right = NULL; } }; // } Driver Code Ends //User function Templ...
ALGO
0.999949
6.313483
7b0c6cd7-0fc2-4661-a43e-ed1af2b33c5c
ChriMed/CPPLOCAL
DualsortRainfall.cpp
//Name:Christian Medrano //Class: COSC 1436 SP22 //Instructor: Marwa Hassan //Assignment 2 Problem 1 //Date:2/3/21 //Program description:This code will infile 365 integers which represent the 12 months in sales, following this, the averages are calculated for each month // and then stored in monthAV, following this mon...
ALGO
0.999391
5.316834
9808f290-fa5b-445e-a886-8dea24820477
wisdompeak/LeetCode
BFS/310.Minimum-Height-Trees/310.Minimum-Height-Trees.cpp
class Solution { public: vector<int> findMinHeightTrees(int n, vector<vector<int>>& edges) { if (n==1) return {0}; if (n==2) return {0,1}; vector<vector<int>>next(n); vector<int>degree(n); for (auto edge: edges) { int a = edge[0], b ...
ALGO
0.999995
5.857636
9538ef1d-9124-425a-aba5-10ef419269f2
ishandutta2007/codeforces
chemthan/normal/1184/A3.cpp
#include <bits/stdc++.h> using namespace std; //#pragma GCC optimize("Ofast") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define ms(s, n) memset(s, n, sizeof(s)) #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FORd(i, a, b) for (int i = (a) - 1; i >= (b); --i) #define...
ALGO
0.999984
3.608234
ec031212-6ff7-4dcd-9026-04a8dc74c344
gpzero/android_frameworks_base
opengl/libagl/vertex.cpp
#include <stdio.h> #include <stdlib.h> #include "context.h" #include "fp.h" #include "vertex.h" #include "state.h" #include "matrix.h" namespace android { // ---------------------------------------------------------------------------- void ogles_init_vertex(ogles_context_t* c) { c->cull.enable = GL_FALSE; c-...
TOOL
0.855865
6.104946
2f0f0098-908d-4e18-b2d7-423c7b5def01
KanishkaGhosh21/LeetCode-Solutions
Prime Number - GFG/prime-number.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: int isPrime(int n){ if(n<2) return false; for(int i=2;i*i<=n;i++) if(n%i==0) return false; return true; } }; //{ Driver Code Starts...
ALGO
0.999693
5.429403
c69bf28b-669a-44b9-a5b8-aec8cfb4c1bf
Rohit-Kurmi-01/DSA-Practices-
02_Patterns/Pattern-8.cpp
#include<iostream> using namespace std; // pattern:- // 1 // 2 3 // 4 5 6 int main() { int num; cin >> num; int row = 1; int sum = 0; while (row <= num) { int col = 1; while (col <= row) { sum++; cout ...
ALGO
0.999861
3.900085
d42815df-b8f5-4829-879f-19a9f4650587
483759/AlgorithmSolutionStorage
C++/AlgorithmSolutionStorage/AlgorithmSeminar/17363.cpp
#include <iostream> using namespace std; int n, m; char map[101][101], c[120], chr; int main() { c[46] = 46; c[79] = 79; c[45] = 124; c[124] = 45; c[47] = 92; c[92] = 47; c[62] = 94; c[94] = 60; c[60] = 118; c[118] = 62; cin >> n >> m; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { cin >> chr; ...
ALGO
0.998952
3.982792