uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
ef983b60-2999-4577-b3a5-1aed8fad5c3d
saching1307/C-
maxDiffInArray.cpp
#include<iostream> using namespace std; int longestDiff(int *a, int n) { int max = INT_MIN; for(int i=0;i<n;i++) { for(int j = i + 1; j < n ; j++) { int diff = a[j] - a[i]; if(diff > max) { max = diff; } } } ...
ALGO
0.999766
3.702353
659a0431-b9eb-411c-a7a9-fa648f04c495
M0D4/Competitive-Programming-Problems-Solutions
CodeForces/GNU C++17/1735A | Working Week/174384494.cpp
#include "bits/stdc++.h" #pragma GCC optimize("Ofast") #pragma GCC target("avx2") #define endl "\n" #define all(v) v.begin(), v.end() #define debug(x) cout << #x << " is " << x << endl #define pow(n, m) (int)powl(n, m) #define clr(x, value) memset(x, value, sizeof(x)) using nam...
ALGO
0.999206
4.312548
89ee462e-a81f-4659-90b4-d989c5e9d2ff
aniket9860/CCAT
c++/c++/10jan/demo5.cpp
#include<iostream> using namespace std; namespace NFunctionOverriding { // abstract class - we can not create object class Shape { protected: double area; double perimeter; public: Shape() { this->area=0; this->p...
TOOL
0.995077
5.522497
67173804-f755-4983-98c8-1d74f6274375
wangcy6/weekly_read
code_reading/oceanbase-master/src/rootserver/ob_unit_placement_strategy.cpp
#define USING_LOG_PREFIX RS #include "ob_unit_placement_strategy.h" #include "lib/charset/ob_mysql_global.h" // for DBL_MAX using namespace oceanbase::common; using namespace oceanbase::rootserver; double ObUnitPlacementStrategy::ObServerResource::get_assigned(ObResourceType resource_type) const { double ret = -1; ...
ALGO
0.994932
6.494998
048b3f63-97d3-4776-b833-77bf33eb4979
Rk1805/Project_BlockChain
backend/Algo/flow/main.cpp
#include "Blockchain.h" #include "Transaction.h" #include <iostream> #include<string.h> using namespace std; int main() { int difficulty = 4; // Set the difficulty level Blockchain blockchain(difficulty); float amount; string sender; string reciever; string previousBlockHash; cin>>sender;...
ALGO
0.865879
5.363513
26156a3b-402f-4ee1-9c4c-4a13d00dfcdc
JinbiaoZhu/my-cpp-leetcode
_225_implement_queue_using_stack/MyStack.cpp
#include "MyStack.h" #include<queue> #include<iostream> using namespace std; MyStack::MyStack() { } MyStack::~MyStack() { } void MyStack::push(int x) { this->queue_main.push(x); cout << "Push the value x " << x << " to the stack." << endl; } int MyStack::pop() { int count = this->queue_main.size() - 1; for ...
TOOL
0.926084
3.349105
5b274213-9378-4fc7-b595-80283b1f2842
AthulJoseph27/Codeforces
1500/1482B.cpp
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vl; typedef vector<vl> vvl; #define all(v) v.begin(), v.end() void __print(int x) { cerr << x; } void __print(long x) { cerr << x; } void __print...
ALGO
0.999864
3.638424
44bc0902-2760-473f-a4ce-5a5f54cb9f11
shruti-nahar14/DataStructure
matrixmul.cpp
#include<iostream> using namespace std; int main() { int n1,n2,n3; cout<<"Enter the row and column "; cin>>n1>>n2>>n3; int arr[n1][n2]; int arr1[n2][n3]; int ans[n1][n3]; cout<<"Enter the elements of 1st matrix "; for(int i=0;i<n1;i++) { for(int j=0;j<n2;j++) { ...
ALGO
0.999875
3.023247
98e7c224-7a65-4cc5-8cd5-38eceb3f2859
khuonggminhhoang/DSA-PTIT
quick-sort.cpp
#include<iostream> using namespace std; void Quick_Sort(int a[], int left, int right){ int pivot= a[ (left+right)/2 ]; int l=left, r=right; while(l<r){ while( a[l] < pivot) l++; while( a[r] > pivot) r--; swap(a[r], a[l]); l++; r--; } if(left < r) Quick_Sort(a,left,r); if(l < right) Quick_Sort(a,l,r...
ALGO
0.999959
4.176283
01d7c17f-a37b-4d24-9f58-31afbcc6fca6
vivekjain0611/Codeforces_contest_submissions
codeforces/mar31d.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int #define M 1000000007 #define pb push_back int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int k, n = (1 << 17); cin >> k; cou...
ALGO
0.996362
3.137763
d85b1dac-4eab-4473-8e9d-db4ccfda7e32
juyoung88/algorithm
greedy/11509.cpp
#include <iostream> using namespace std; int check[1000001]={0,}; int main() { int n; cin >> n; int height; int arrows=0; for(int i=0;i<n;i++){ cin >> height; if(check[height+1]==0){ arrows++; check[height]++; } else{ check[height+...
ALGO
0.999811
3.507413
f53dccd0-68e9-444e-b699-724e7f649994
FahdSeddik/FeedForward-NeuralNetwork-from-scratch
Neural Network/NeuralNetwork.cpp
#include "NeuralNetwork.h" NN::NN(Layer Layers[], int numLayers) { this->numLayers = numLayers; this->Layers = Layers; for (int i = 1; i < numLayers; i++) { this->Layers[i].initialize(this->Layers[i - 1].get_units()); } } Matrix NN::forward_pass(Matrix& Input) { Matrix Output(Input); for (int i = 0; i < num...
ALGO
0.865097
4.302555
33edbc9e-f56d-455e-83a0-9e8c8c558dbd
ishandutta2007/codeforces
subconscious/normal/1239/B.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=1;i<=n;++i) #define mp make_pair #define pb push_back #define x0 gtmsub #define y0 gtmshb #define x1 gtmjtjl #define y1 gtmsf typedef long long ll; typedef long double ld; typedef pair<int,int> pr; const ld eps=1e-9; const int N=(int)2e6+5,mod=1e9...
ALGO
0.999887
3.419672
195a4b5e-4632-4f25-9c2f-abff1701f447
yrod15x/Exercises-For-Programmers-Book
Clase Interes/SoloNumeros.cpp
#include <iostream> #include <vector> #include <string> #include "SoloNumeros.h" int solo_enteros(std::string mensaje) { int entero = 0; std::string entrada; bool suiche = false; while(!suiche) { std::cout << mensaje << " >> "; getline(std::cin, entrada); for(int i = 0; i <...
TOOL
0.867275
4.003974
94b422e8-e8b7-4f9c-a687-03389088ebf8
onpyeong/Algorithm
boj/graph/1774.cpp
#include <iostream> #include <vector> #include <cmath> #include <algorithm> using namespace std; int N, M; int X, Y; vector<pair<int, int>> points; vector<pair<double, pair<int, int>>> edges; long long a, b; int p[1003]; double answer; int find_parent(int x) { if(p[x] == x) return x; return p[x] = find_par...
ALGO
0.999933
4.636477
5a0a441a-c182-4c67-abe5-9fba62b304c1
ishandutta2007/codeforces
isonan/normal/1738/F.cpp
#include <cstdio> #include <vector> #include <algorithm> int t,n,d[100001]; bool vis[100010]; int f[100010]; int Q(int x){ printf("? %d\n",x); fflush(stdout); int ans; scanf("%d",&ans); return ans; } int find(int x){ return f[x]?f[x]=find(f[x]):x; } void merge(int a,int b){ a=find(a),b=find(b); if(a...
ALGO
0.999949
3.505232
7a3cb463-a0f0-425b-99c6-5a3b2843d206
rathoresrikant/competitive-programming-solutions
Codeforces/CF515D3/boxesPacking.cpp
#include<bits/stdc++.h> #define ll long long #define pb push_back #define endl '\n' #define pii pair<ll int,ll int> #define vi vector<ll int> #define all(a) (a).begin(),(a).end() #define F first #define S second #define hell 1000000007 #define...
ALGO
0.999994
4.123254
3d256e3c-edf7-4824-95d3-c969771acbb9
LEOLEOl/codefights
Codefights-Tree/main.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <set> #include <map> using namespace std; template<typename T> struct Tree { Tree(const T &v) : value(v), left(nullptr), right(nullptr) {} T value; Tree *left; Tree *right; }; typedef Tree<int> Node; typedef Tree<in...
ALGO
0.99964
4.205469
08028e15-8132-4306-8f0c-20e196008e27
matryx/nanobabel
src/charges/eem.cpp
#include <openbabel/babelconfig.h> #include <openbabel/chargemodel.h> #include <openbabel/mol.h> #include <openbabel/molchrg.h> namespace OpenBabel { class EEMCharges : public OBChargeModel { public: EEMCharges(const char* ID) : OBChargeModel(ID, false){}; const char* Description(){ return "Assign Elect...
ALGO
0.991191
4.862062
b65c96a9-6d60-4e66-bab1-63f4d10e7ddf
dhakadrohan98/350_DSA_Problems_Java_CPP
c++/array/elementsAppearingMoreThanNByKTimes.cpp
#include <iostream> #include <unordered_map> using namespace std; void moreThanNdK(int arr[], int n, int k) { unordered_map<int, int> arrMap; for (int i = 0; i < n; i++) { if (arrMap.count(arr[i]) == 1) { arrMap[arr[i]]++; } else { arrMap[arr[...
ALGO
0.999888
4.210311
ad8ca8c3-c0c8-4605-97e7-fe9135c23898
doanvandiep/Data-Structure-and-Algorithms_PTIT
CTDL013.cpp
#include<bits/stdc++.h> using namespace std; int n,k,a[16]; void check() { for(int i=1;i<=k;i++) cout << a[i]; cout <<" "; } void Try(int i) { for(int j=a[i-1]+1;j<=n-k+i;j++) { a[i]=j; if(i==k) check(); else Try(i+1); } } int main() { int t; cin >> t; while(t--) { cin >> n >> k; Try(1); cout << end...
ALGO
0.999917
3.664722
0821394a-b95b-484a-a7f9-a4941231fc95
FahadulShadhin/Problem-Solving
Hackerrank/saveThePrisoner.cpp
#include<bits/stdc++.h> using namespace std; int main() { int test; cin>>test; while(test--){ int n, m, s; cin>>n>>m>>s; int a = (m+s-1)%n; if(a == 0) cout<<n<<endl; else cout<<a<<endl; } return 0; }
ALGO
0.999878
3.581869
7a0a8cba-e227-4503-b135-3931273b54ba
noisrucer/Algorithm
Array/Closest Distance to Character.cpp
vector<int> solve(string s, string c) { int n = s.length(); int pos = 0; char t = c[0]; vector<int>loc, res; for(int i=0; i<n; i++) if(s[i]==t) loc.push_back(i); for(int i=0; i<n; i++){ if(s[i]==t){ res.push_back(0); if(i>0 && s[i]==s[i-1]) pos+...
ALGO
0.999966
4.66719
9b0913a2-3edb-4fcc-9422-277cc14b81e5
SoleMin/Algorithmic_Problems
110303/19.cpp
#include <iostream> #include <stack> #include <algorithm> using namespace std; int main(){ string a,b; while(getline (cin,a)){ getline (cin,b); int aa=a.size(); int bb=b.size(); sort(a.begin(), a.end()); sort(b.begin(), b.end()); if (a == b){ cout << a << endl; continue; } string k=""; for(i...
ALGO
0.999784
3.335249
3c6881ed-5be7-43b4-a452-c8f7a964ff52
n-miyamoto/training
ATC/arc095/d.cpp
#include <bits/stdc++.h> using namespace std; #define BUF (1000) #define ll long long int n; vector<int> a; int main(void){ cin >> n; for(int i=0;i<n;i++){ int tmp; cin >> tmp; a.push_back(tmp); } sort(a.begin(), a.end()); int k; int mx = 0; int ans; for( int i=0;i<n-1;i++){ int tmp = min(a[n-1]-a...
ALGO
0.999936
3.358777
01cc8089-b67a-4f9d-8c7a-9d4af8433c82
Sagarkanojiya19/DSA-Practice
DSA-450/Max_vowels_substrng_length_k.cpp
#include<bits/stdc++.h> using namespace std; int maxlength(string s, int n, int k){ int Maxi = INT_MIN; int i =0; int j = 0; int v = 0; while( j < n){ if(s[j] == 'a' || s[j] == 'e' || s[j] == 'i' ||s[j] == 'o' ||s[j] == 'u'){ v++; } if(j - i + 1 < k){ ...
ALGO
0.999325
4.231404
57d05316-ca1e-439b-a71c-108704d8f128
ishandutta2007/codeforces
realcomplex/normal/1399/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define fi first #define se second #define mp make_pair #define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); int main(){ fastIO; int tc; cin >> tc; for(int t =0 ; t < tc; t ++ ){ int...
ALGO
0.999901
4.481684
8a5dfcc6-30ee-4f24-8d7c-7050c473c384
ChipsAKoi/Comp_Sci_1
Comp Sci/Testing Stuff from the Comp Sci Textbook - Chapter 3/program 3-29.cpp
#include <iostream> #include <cmath> using namespace std; int main_done29() { double a, b, c; cout << "Enter the length of side a: "; cin >> a; cout << "Enter the length of side b: "; cin >> b; c = sqrt(pow(a, 2.0) + pow(b, 2.0)); cout << "THe length of the hypotenuse is "; cout << c << endl; return 0; }
ALGO
0.981288
3.69602
d51ca40c-e2b0-4388-addc-7211133d2c00
Sahilamin219/Codeforces
codeforces/1549/A.cpp
#include "bits/stdc++.h" #define int long long #define mod 1000000007 #define zrobits(x) __builtin_ctzll(x) #define bitcount __builtin_popcountll(x) #define ps(x,y) fixed<<setprecision(y)<<x #define negmod(X,Y) X % Y + (X % Y < 0 ? Y : 0) #define forn(i, n) for (int i = 0; i < (n); i++) #define flip_bits(number) stat...
ALGO
0.999785
4.770007
d0e9e424-fd68-4afc-9403-21672ee8273b
leidendabomb/bapc2014-home
a/F.cpp
// Team: :(){:|:&};: #dabomb // 💩 #include <iostream> #include <vector> #include <set> #include <cstdlib> #include <utility> #include <cmath> #include <map> #include <list> #include <algorithm> #include <cstring> #include <queue> using namespace std; int sink(vector<set<int>> ducks, vector<pair<int, int>> boats, map...
ALGO
0.999931
4.741756
e3d54a19-8556-4cad-b20b-8e8c295babbe
mirinta/leet_code
math/0149_max_points_on_a_line.cpp
#include <unordered_map> #include <vector> /** * Given an array of points where points[i] = [xi, yi] represents a point on the X-Y plane, return * the maximum number of points that lie on the same straight line. * * ! 1 <= points.length <= 300 * ! points[i].length == 2 * ! -10^4 <= xi, yi <= 10^4 * ! All the po...
ALGO
0.999929
5.999978
b1c471c9-6c15-442e-9889-a07b086ae1b3
hasibul134409/uva-solved
10220.cpp
#include<bits/stdc++.h> #define size 3000 using namespace std; int arr[size+5]; int factorial(int n) { int i,j,temp,m,x; arr[0]=1; m=1; temp=0; for(int i=1;i<=n;i++) { for(int j=0;j<m;j++) { x=arr[j]*i+temp; arr[j]=x%10; temp=x/10; } while(temp>...
ALGO
0.999897
4.123827
bac140ea-4f45-48bf-9a94-d2982c72fda8
Paynekk/Learning_c_plus_plus
Ejercicios/3_esquema_de_recorrido/4_temperatura_ciudad.cpp
/* Haz un programa que lee una secuencia de pares de temperaturas y ciudades y devuelve la ciudad que tiene la temperatura máxima. Un ejemplo de entrada seria: 21.8 Abella_de_la_Conca 2.8 Abrera -2.4 Ager 27.6 Agramunt 17.2 Aguilar_de_Segarra 4.2 Agullana 1.4 Aiguafreda 2.1 Aiguamurcia 20.2 Aiguaviva 23.3 Aitona 18....
ALGO
0.999644
5.313548
14262019-bcfb-44e6-9956-5b8f636a8eb0
yryrrf/LeetCode
Problems/C++/Medium/Matrix/54. Spiral Matrix.cpp
/* Runtime: 0 ms, faster than 100.00% of C++ online submissions for Spiral Matrix. Memory Usage: 6.9 MB, less than 28.38% of C++ online submissions for Spiral Matrix. */ class Solution { public: vector<int> spiralOrder(vector<vector<int>>& matrix) { vector<int> result; int top = 0,bottom = matrix.si...
ALGO
0.999992
6.228929
05bd4967-a0fe-4604-80d7-e6aa462d5b8d
h0ngcherry/MyC-
day5/structPara.cpp
#include<iostream> using namespace std; struct STU{ string name; int age; float gpa; }; void printInfo1(STU s){ s.age = 100; cout<<"printByInfo1"<<endl; cout<<"Name: "<<s.name<<endl; cout<<"Age: "<<s.age<<endl; cout<<"GPA: "<<s.gpa<<endl; } void printInfo2(STU *s){ s->age = 200; ...
TOOL
0.853929
3.559913
30bb9eeb-b740-45c2-8655-cb4d77a1f25d
moph/WCETExplorer
WCETExplorer/ES/ES_DLL/TestDllCreate/executeES3.cpp
#include "executeES.h" #include <math.h> #include "functionConstraints.h" #include <limits> void calcPolyroots(bool switches[], int start, int* pPolyroots); double executeES3(int sizeAnalogXML, float analog[], int sizeDigitalXML, bool digital[], int sizeSignalXML, enum SIGNALTYP typ[]) { ...
ALGO
0.999842
3.176647
ef17486b-2c91-49da-8d11-5c82518cc6b7
HiImIan/plants_and_watering_cans
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.998693
6.797273
b03d2006-9aa6-4443-b4ab-6428184b7dec
AntonioCot7/AED-EXAMEN-FINAL
tmy0909/ClonarGraph.cpp
// CloneGraph.cpp // Contexto: Crear una copia exacta de un grafo dado, duplicando todos sus nodos y aristas sin utilizar estructuras de datos de la STL. #include <iostream> // Definición de la estructura del nodo del grafo struct Node { int val; Node** neighbors; int numNeighbors; Node(int _val) : v...
ALGO
0.99974
7.04227
ec907d1e-aa47-4928-9bc6-c81d93a4dd1d
PaulaCT/SistemasConcurrentesDistribuidos_UGR
Monitores/otros/ejercicio2.cpp
#include <iostream> #include <cassert> #include <iomanip> #include <mutex> #include <random> #include <chrono> #include <condition_variable> #include "HoareMonitor.h" #include <vector> using namespace std ; using namespace HM ; //g++ -std=c++11 -pthread -o ejercicio2 ejercicio2.cpp HoareMonitor.cpp Semaphore.cpp con...
ALGO
0.99085
4.250383
dc95ccf4-7463-46cb-991d-23b4ed2e3076
georgepar/opensmile
src/dspcore/fftmagphase.cpp
/* openSMILE component: compute magnitude and phase from complex valued fft output TODO: support inverse?? */ #include <dspcore/fftmagphase.hpp> #include <math.h> #define MODULE "cFFTmagphase" /*Library: sComponentInfo * registerMe(cConfigManager *_confman) { cDataProcessor::registerComponent(_confman); } */ ...
ALGO
0.917943
5.764137
92c71b86-33d0-4927-9d22-b7d99600859c
kmjp/procon
atcoder/arc151-200/arc200/a.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.999011
3.47177
482d0f15-255a-44e9-8bc1-407b6f66d26e
prajil22359/DSA
DP/DPwithStocks/part3_buysell_atmost2times.cpp
#include <iostream> using namespace std; #include <vector> // part 2 ko extension, tyaha number of transactions ma rok thiyena, yaha cha. yaha max 2 transactions // garna pauda max profit nikal bhanyo. countTransaction pani euta variable thapyo. 3D dp. though can // be done in 2D using odd even concept and merging cou...
ALGO
0.999621
5.874095
0ea1ec5c-08d6-47c3-ac68-df1b51a28791
shanyux/jianzhiOffer
37_jianzhi_findfirstnode.cpp
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } };*/ class Solution { public: ListNode* FindFirstCommonNode( ListNode* pHead1, ListNode* pHead2) { if(pHead1 == NULL || pHead2 == NULL) return NULL; int len1 = 0, len2 = 0; ListNo...
ALGO
0.999928
4.737477
3153f1dc-7fbf-4e23-802d-411167a24e1a
alexandraback/datacollection
solutions_2652486_0/C++/marcoskwkm/c.cpp
#include <cmath> #include <ctime> #include <cctype> #include <cstdio> #include <cstdlib> #include <cstring> #include <cassert> #include <functional> #include <algorithm> #include <iostream> #include <numeric> #include <iomanip> #include <sstream> #include <bitset> #include <string> #include <vector> #include <stack> #i...
ALGO
0.999921
3.355658
9df4276b-dda6-4a85-92cd-95f74f651913
ashokabairwaideology/Leet-code-problem
lcof2/剑指 Offer II 116. 朋友圈/Solution2.cpp
class Solution { public: vector<int> p; int findCircleNum(vector<vector<int>>& isConnected) { int n = isConnected.size(); p.resize(n); for (int i = 0; i < n; ++i) p[i] = i; for (int i = 0; i < n; ++i) for (int j = i + 1; j < n; ++j) if (isConnected[i]...
ALGO
0.999492
6.10384
2963c57d-8246-43ca-bda3-c529fb26ff5f
Bauyrzhan07/ADS
lab9/dijkstra/Stations.cpp
#include<iostream> #include<vector> using namespace std; int main(){ int n,m;cin>>n; vector<int>fuel_cost(n); for(int i=0;i<n;i++) cin>>fuel_cost[i]; cin>>m; vector<vector<pair<int,int>>>g(n); for(int i=0;i<m;i++){ int a,b;cin>>a>>b; g[a-1].push_back(make_pair(b-1,fuel_co...
ALGO
0.999905
3.931704
dbb9234e-30e4-425c-b2d2-8c59ec7c2548
assem2002/Problem_Solving
Codeforces Round 257 (Div. 2)-B. Jzzhu and Sequences.cpp
// std::setvbuf(stdout, nullptr, _IOFBF, BUFSIZ); //(will neglect the c's stdio.h property of doing inline flushing with every line of code) //std::ios_base::sync_with_stdio(false); // (removes the interoperability that happens between C's stdio.h and iostream ) #include <iostream> //#include<numeric> //#includ...
ALGO
0.999952
4.130935
05525174-92d2-453d-8ea7-8563624c6bd6
Drascur/ExoPathFinding
main.cpp
#include <SFML/Graphics.hpp> #include <deque> #include <iostream> #include <vector> #include <windows.h> #include "point.hpp" #include "Deque2D.hpp" #include "manip.hpp" int main() { unsigned int seed = (unsigned)time(NULL); // Seed fixe //unsigned int seed = 40; srand(seed); // taille de base...
ALGO
0.990473
3.206979
338d0093-2441-4755-ae7c-9d9d9befd94e
krishnadey30/Competitive_Coding
UG4th.cpp
/* Name: Krishna Kumar Dey Institute: Indian Institute Of Information Technology, Chittoor,Sri City */ #include <bits/stdc++.h> using namespace std; #define INF LLONG_MAX #define min LLONG_MIN typedef long long ll; int main() { int t; cin>>t; while(t--) { int n,m,a,b,w; cin>>n>>m...
ALGO
0.999979
4.215015
836fc73e-5d93-4e8b-9940-20b6164c6a09
ishandutta2007/codeforces
zemen/normal/346/B.cpp
#include <iostream> #include <stdlib.h> #include <stdio.h> #include <memory.h> #include <string.h> #include <math.h> #include <string> #include <vector> #include <algorithm> #include <set> #include <map> #include <queue> #include <complex> #include <cassert> using namespace std; #define INF 1000000001 #define INFL 10...
ALGO
0.999995
3.589956
fb744dcf-b8a9-4ef6-b179-6bdf75d33576
MdMostafizurRahaman/Information-Security
1320/SHA_lab.cpp
#include <bits/stdc++.h> using namespace std; #define input_file "1320.txt" #define block_size 1024 #define number_of_steps 80 #define Ch(e, f, g) ((e & f) ^ (~e & g)) #define Maj(a, b, c) ((a & b) ^ (a & c) ^ (b & c)) #define RotR(x, n) ((x >> n) | (x << (64 - n))) #define Sum0(x) ((RotR(x, 28)) ^ (RotR(x, 34)) ^ (Rot...
ALGO
0.999917
4.278607
c220ee73-73b7-4163-b6bb-f41da85b56e3
tina-dragicevic-b/simple-cpp-tasks
Vjezba_10/main.cpp
#include <iostream> #include <fstream> #include <iterator> #include <vector> #include <algorithm> class output{ int n; public: output() : n(0) {} void operator() (int vectorElement){ n = vectorElement; } operator int() { return n; } }; class GT500{ int greaterThan500; public: GT500() ...
ALGO
0.992551
4.194689
6b84d7f5-769b-4d12-b6c0-028aaa2332e0
2DGD-F0TH/2DGD_F0TH
dynamic_listings/C++/default/containers/tween_linear.cpp
float linearTween(const float& time, const float& begin, const float& change, const float& duration){ return change * (time / duration) + begin; }
ALGO
0.969712
5.349476
86478d47-17ea-4c1e-861b-ed2ddee1a671
ChristianHe/SDCND_Term2_MPC
src/Eigen-3.3/bench/benchEigenSolver.cpp
// g++ -DNDEBUG -O3 -I.. benchEigenSolver.cpp -o benchEigenSolver && ./benchEigenSolver // options: // -DBENCH_GMM // -DBENCH_GSL -lgsl /usr/lib/libcblas.so.3 // -DEIGEN_DONT_VECTORIZE // -msse2 // -DREPEAT=100 // -DTRIES=10 // -DSCALAR=double #include <iostream> #include <Eigen/Core> #include <Eigen/QR> #in...
TOOL
0.98764
5.772194
cbbde49d-c9e1-46b3-9c71-5b6db9f81c40
suraj-78/newrepo
printing pattern/Assignment/q11.cpp
#include<iostream> using namespace std; int main(){ int n; cout<<"Enter the value of n"; cin>>n; for(int i=1; i<2*n; i++){ if(i<=n){ for(int j=i; j<n; j++){ cout<<" "; } for(int k=1; k<=i; k++){ cout<<"*"; } ...
ALGO
0.999848
3.552183
73b880db-7ed8-42e9-83ff-9fda3ac15646
NurShuv0/demo
contest.cpp
#include<iostream> using namespace std; int main() { int over; cin>>over; int y=over; over=over/6; int x=over; int z=y%6; cout<<x<<"."<<z<<"overs"; }
ALGO
0.893854
3.549476
c42acff5-dbb7-4be0-b143-9393afc8e455
Sp-177/LEETCODE
0714-best-time-to-buy-and-sell-stock-with-transaction-fee/0714-best-time-to-buy-and-sell-stock-with-transaction-fee.cpp
class Solution { public: int F; vector<vector<int>>dp; int func(vector<int>&prices,int n,int index,int mode){ if(index>=n)return 0; if(dp[index][mode]!=-1)return dp[index][mode]; if(mode==1){ return dp[index][mode]=max(func(prices,n,index+1,mode^1)-prices[index],func(pric...
ALGO
0.99995
5.433211
6da8712f-2e6a-46f4-b362-7abd40cb65fd
ishandutta2007/codeforces
briansu/normal/931/F.cpp
//{ #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef double lf; typedef pair<ll,ll> ii; #define REP(i,n) for(ll i=0;i<n;i++) #define REP1(i,n) for(ll i=1;i<=n;i++) #define FILL(i,n) memset(i,n,sizeof i) #define X first #define Y second #define SZ(_a) (int)_a.size() #define ALL(_a) _a.begin(),_...
ALGO
0.999971
3.939602
b0616c02-f690-4b59-8c1e-706b7d6732b9
GTA5dump/Xforce
Source/Memory.cpp
//Memory.cpp #include "stdafx.h" static std::multimap<uint64_t, uintptr_t> g_hints; void Memory::executable_meta::EnsureInit() { if (m_begin) { return; } HMODULE gModule = GetModuleHandle(NULL); m_begin = reinterpret_cast<uintptr_t>(gModule); const IMAGE_DOS_HEADER * dosHeader = reinterpret_cast<const IMAGE...
TOOL
0.92091
4.496804
9eba5619-e66e-4930-9e94-8853e780d0c0
ishandutta2007/codeforces
koosha_mv/normal/1466/G.cpp
#include <bits/stdc++.h> using namespace std; #define dbgv(v) cout<<#v<<" = "; f(i,0,v.size()) cout<<v[i]<<" "; cout<<endl #define dbga(a,x,y) cout<<#a<<" = "; f(i,x,y) cout<<a[i]<<" "; cout<<endl #define erorp(x) cout<<#x<<"={"<<x.F<<" , "<<x.S<<"}"<<endl #define eror(x) cout<<#x<<'='<<(x)<<endl #define f_(i,a,b) for(...
ALGO
0.999803
3.779714
3d4eb65e-3b81-4126-8c8c-9f2f895e472d
sinian666/code_102_6
1cpp/chapter_computational_complexity/worst_best_time_complexity.cpp
/** * File: worst_best_time_complexity.cpp * Created Time: 2022-11-25 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* 生成一个数组,元素为 { 1, 2, ..., n },顺序被打乱 */ vector<int> randomNumbers(int n) { vector<int> nums(n); // 生成数组 nums = { 1, 2, 3, ..., n } for (int i = 0; i < n; i++) { n...
ALGO
0.998255
5.246295
34b30c2c-77b2-4123-bafb-14c54555885a
SUSHANTSINGH01/CP-AND-DSA
POTD/20th_September_2024.cpp
class Solution { public: // Returns count buildings that can see sunlight int countBuildings(vector<int> &height) { // code here int n=height.size(); int maxx=height[0]; int c=1; for(int i=1;i<n;i++) if(maxx<height[i]){ max...
ALGO
0.999884
6.089552
0fdd49d4-d5ae-4297-8188-ecdbe2494fd7
Kanikawadhwa28/dailypractice
2246-maximum-employees-to-be-invited-to-a-meeting/2246-maximum-employees-to-be-invited-to-a-meeting.cpp
class Solution { public: int maximumInvitations(vector<int>& favorite) { int n = favorite.size(); vector<vector<int>> reversedGraph(n); for (int person = 0; person < n; ++person) { reversedGraph[favorite[person]].push_back(person); } // Helper function for BFS ...
ALGO
0.999971
6.066979
2512c05b-bec8-46e8-878b-54a6de49252b
Edith-vis/Algorithm-Notes
第3章 入门篇(1)--入门模拟/3.1 简单模拟/A1046ShortestDistance.cpp
#include <iostream> #include <algorithm> using namespace std; int n, m; #define maxn 100010 #define INF 0x3fffffff int node[maxn] = {0}; int main() { freopen("D:/in.txt", "r", stdin); scanf("%d", &n); for (int i = 0; i <= n; i++) { node[i] = 0; } //node[0] = total length of the circle ...
ALGO
0.999905
3.806104
27f580c4-bbb6-4d5f-a610-c4551150655a
Shahriar-Seam/Programming
Codechef/YETMON.cpp
#include <bits/stdc++.h> using namespace std; #define int long long bool possible(vector <int> &v, int n, int m) { int i, count = 0; for (i = 0; i < n; i++) { if (v[i] > m) { m--; } } return m >= 0; } void solve() { int n, l, r, m, time = 0; cin >> n; vect...
ALGO
0.999962
5.475687
bf62f388-6208-4cdb-818a-70c0e63d98ed
MrHerbat/algorytmika
LessonTwo/main.cpp
#include <iostream> #include <time.h> #include <stdlib.h> using namespace std; double pi() { double r = 1; double Ikw = 1000000000; double Iko = 0; double x, y; for(int i = 1; i < Ikw; i++) { x = (double)rand()/RAND_MAX; y = (double)rand()/RAND_MAX; if((x*x)+(y*y) <=...
ALGO
0.997033
3.593081
f9fb5fe0-3ea6-46d0-ad16-a4b122dfb12c
Xie-Minghui/ACM
模拟-找规律-Magic Ship.cpp
#include<bits/stdc++.h> #define per(i,a,b) for(int i = (a);i <= (b);++i) #define INF 0x3f3f3f typedef long long LL; using namespace std; const int maxn = 1e5; int s0 = 0,e0 = 0,s1 = 0,e1 = 0; char str[maxn+10]; int n = 0; bool dic[5];//l,r,u,d char ss[5] = {'0','L','R','U','D'}; void solve(){ map<char,int> mp,mp2; ...
ALGO
0.999804
3.328325
a097a6be-01d2-4765-98fc-261e899febb6
tanvir362/codeforces
E. Modular Arithmetic Shob Sesh Koira Nilo.cpp
#include<stdio.h> long long power(long long a, long long b, long long m) { long long x; if(b==1) return a; if((b&1)==1) return (power(a,b-1,m)*a)%m; else{ x=power(a,b/2,m); x = (x*x)%m; return x; } } int main(void) { long long n,m,t; scanf("%I64d %I64d",&n,&m); pr...
ALGO
0.999989
4.589171
c670a24a-83f9-4455-950d-6f6ad631707c
starcoinplus/starcoin
src/kernel.cpp
#include <boost/assign/list_of.hpp> #include "kernel.h" #include "db.h" using namespace std; extern int nStakeMaxAge; extern int nStakeTargetSpacing; // Modifier interval: time to elapse before new modifier is computed // Set to 6-hour for production network and 20-minute for test network unsigned int nModifierInte...
ALGO
0.996743
6.028573
d716abfb-d008-48db-ba76-c751303554a1
daniba02/FAL
FAL/ejExtra-10.cpp
/*@ <authors> * * Daniel Barroso Casado * * Usuario del juez: F07 * *@ </authors>*/ #include <iostream> #include <fstream> #include <vector> using namespace std; /*@ <answer> Escribe aqu un comentario general sobre la solucin, explicando cmo se resuelve el problema y cul es el coste de la solucin, en funcin...
ALGO
0.999916
3.874364
c043186c-0daf-4b43-8fe9-02774517889d
LinCY0202/Program-collection_tame
C_C++/演算法期中1/PG.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; while(cin >> n){ if(!n) break; long long int num[n]; for(int i=0;i<n;i++) cin >> num[i]; //連續最長子序列和 long long int ans=0, Max=0; for(int i=0;i<n;i++){ Max=max(num[i],Max...
ALGO
0.998552
3.278457
88961e1d-f6d5-488b-84b0-fbb54ce79f04
Ujjwlkushwaha/Data-Structures-and-Algorithm
11-Binary-Tree/Questions/02-Medium/01-Lowest-Common-Ancester.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int data; Node* left; Node* right; Node(int value) { data = value; left = right = NULL; } }; //✅ ============Solution============================== Node *lowestCommonAncestor(Node *root, Node *p, Node *q) { //✅ step ...
ALGO
0.999992
5.560225
ede49108-9eeb-4c2f-b178-890b19c57045
zhuozhiyongde/Introduction-to-Computer-Science-B-2021Fall-PKUHSC
C++/S7Q9-3.cpp
#include <iostream> #include <algorithm> #include <stdio.h> using namespace std; int dpi[210000000]={0}; struct offer{ int start; int end; int pay; }; offer arr[10005]; void dp(int n,int tm){ dpi[0]=0; if(tm==0){ } else{ int i=0; while(arr[i].end<=tm&&arr[i].end!=0){ int A = arr[i].pay+dpi[arr[i].start]...
ALGO
0.999288
3.48213
817410f0-2639-4c7b-a85f-fc7cdb181c48
codingwill/competitive-programming
TOKI_TLX/toki_sorting_c.cpp
#include <bits/stdc++.h> /* ** Author: wkwkwill (Willy I. K.) ** 2020/06/05 */ using namespace std; using ll = long long int; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n, q; cin >> n >> q; map<string, string> daftar; for (int i = 0; i < n; ++i) { string nama,...
ALGO
0.999441
5.326052
3175ad31-c359-4da4-b6dd-8cd48d1fa84b
s0urav6529/Codeforces-Solutions
1763C.cpp
#include<bits/stdc++.h> using namespace std; #define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define read freopen ("in.txt","r",stdin); #define out freopen ("out.txt","w",stdout); #define reset(a,b) memset(a, (b), sizeof(a)) #define sortv(k) sort(k.begin(),k.end()) #define sortg(k) sort(k.begin()...
ALGO
0.999923
4.324086
df0324c8-5562-405f-aab7-a16be346909b
witMackD/quiz
main.cpp
#include <cstdlib> #include <ctime> #include <iostream> #include <algorithm> class Question { friend std::ostream &operator <<(std::ostream &s, const Question &q); friend bool equal(const Question &q1, const Question &q2); public: static Question draw(); Question(); Question(int a, int b); int ...
TOOL
0.912236
4.08623
726892ca-5f09-4720-9ebc-da84992e7595
koike123456789/5G_NFFFT
include/eigen-eigen-323c052e1731/bench/benchmarkX.cpp
// g++ -fopenmp -I .. -O3 -DNDEBUG -finline-limit=1000 benchmarkX.cpp -o b && time ./b #include <iostream> #include <Eigen/Core> using namespace std; using namespace Eigen; #ifndef MATTYPE #define MATTYPE MatrixXLd #endif #ifndef MATSIZE #define MATSIZE 400 #endif #ifndef REPEAT #define REPEAT 100 #endif int mai...
ALGO
0.98082
3.370773
57d906cd-13a6-477a-b8f4-4319ff85b863
xuhuang37/data_structure
1.linear/reverse.cpp
#include <stdio.h> #include <iostream> #include <stdlib.h> using namespace std; typedef struct LNode { int data; struct LNode *next; } LNode, *LinkList; int reverse(int j, int k, int ary[]) { int tmp; for (j = j, k = k; j < k; j++, k--) { tmp = ary[j]; ary[j] = ary[k]; ary[...
ALGO
0.999639
3.340957
4d7e26f1-127e-45e2-b803-99a30ca5a03a
Easy-H/Calculator
code/stack.cpp
#include <iostream> #include <string> #include <vector> using namespace std; class FormularUnit { public: virtual bool IsChar() = 0; virtual double GetDValue() = 0; virtual char GetCValue() = 0; }; class Num : public FormularUnit { private: double _value; public: Num(double c) { _value = c; } double GetDVal...
ALGO
0.999126
3.864805
cb024181-e501-41d0-810f-8b61fdf29e1b
DS-73/CodeForces
C++/77.230-B.cpp
#include <iostream> #include <cmath> using namespace std; bool isPrime(int64_t n) { int skip = 0; if(n < 2) return false; else if(n == 2) return true; int64_t limit = sqrt(n); if(n % 2 == 0) return false; for(int j = 3; j <= limit; j += 2){ if(n % j ==...
ALGO
0.999659
4.839449
ec3672e0-5e3d-4d23-a3c9-3f4b22c5bf37
rishabh1911/Coding-Practice
src/main/java/SegmentTree.cpp
/** * This is the solution of Range Maximum Query Question. * https://www.hackerearth.com/practice/data-structures/advanced-data-structures/segment-trees/tutorial/ */ #include <bits/stdc++.h> using namespace std; #define dbg(x) { cout<<#x<<" : "<<x<<endl; } int arr[1000005]; int st[2000002]; void buildSegmentTree(in...
ALGO
0.999554
5.069925
6733aef5-6b38-4a67-87e7-e75b47a6120d
hetfaldu/practical-list-2
p12.cpp
#include <iostream> //#define PI 3.14 using namespace std; float area(float ,float PI=3.14); int main() { float rad; cout<<"Enter the radius ::"; cin>>rad; cout<<"Area of the circle is ::"<<area(rad)<<endl; return 0; } float area(float r, float PI) { return PI*r*r; }
ALGO
0.980776
3.453453
d85ab69e-66a8-4bc1-be3c-9c5444f1d270
KhangPham205/ControlStructeExercise
CTDK/073/073.cpp
#include <iostream> using namespace std; int main() { float x; cout << "Nhap x: "; cin >> x; int n; cout << "Nhap n: "; cin >> n; float s = 0; float t = 1; int m = 0; int i = 1; while (i <= n) { t = t * x; m = m + i; s = s + t/m; i = i + 1; } cout << "Tong la: " << s << endl; return 0; }
ALGO
0.999277
3.529577
cf51ac20-65ef-41ad-8737-2c1f9c4a3a2f
miredirex/androidapp-arcore-game
bullet3-latest/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp
#include "btStridingMeshInterface.h" #include "LinearMath/btSerializer.h" btStridingMeshInterface::~btStridingMeshInterface() { } void btStridingMeshInterface::InternalProcessAllTriangles(btInternalTriangleIndexCallback* callback, const btVector3& aabbMin, const btVector3& aabbMax) const { (void)aabbMin; (void)aabb...
ALGO
0.869371
6.528596
4d7b9628-4b39-4081-b53e-67c30957e58f
vu-hoang-duong4987/Application-Algorithm-20241
OnThi_GiuaKy/Lab_W4/max-even-subsequence.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; int n; int a[1000005]; ll pre_sum[1000005]; ll best[1000005][2]; void input(){ cin >> n; for(int i = 1; i <= n; ++i) cin >> a[i]; pre_sum[1] = a[1]; for(int i = 2; i <= n; ++i){ pre_sum[i] = a[i] + pre_sum[i - 1]; } // for(int i = 1; i <= n; ++...
ALGO
0.999912
3.869099
f0e83995-d1f5-430e-b484-2e116a62c86f
ishandutta2007/codeforces
ko_osaga/normal/603/B.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <limits.h> #include <stack> #include <queue> #include <map> #include <set> #include <algorithm> #include <string> #include <functional> #include <vector> #include <numeric> #include <deque> #include <utility> #include <bitset> #includ...
ALGO
0.999987
3.775936
9b441323-2a7c-4242-81fa-5e05a8f3336c
cooler-SAI/wow-Revelion-v2
dep/recastnavigation/Detour/DetourCommon.cpp
#include <math.h> #include "DetourCommon.h" ////////////////////////////////////////////////////////////////////////////////////////// float dtSqrt(float x) { return sqrtf(x); } void dtClosestPtPointTriangle(float* closest, const float* p, const float* a, const float* b, const float* c) { // Check if P in...
ALGO
0.999754
7.188084
fa63210b-fa62-4b89-904b-bdc5f933c175
Hielamon/FishEyeCodeMaterials-Stitcher
FishEyeStitcher/FishEyeStitcher/src/ORBMatcher.cpp
#include <ORBMatcher.h> ORBMatcher::ORBMatcher(float nnratio, bool checkOri) : mfNNratio(nnratio), mbCheckOrientation(checkOri) {} ORBMatcher::~ORBMatcher() {} // Computes the Hamming distance between two ORB descriptors int ORBMatcher::DescriptorDistance(const cv::Mat &a, const cv::Mat &b) { const int *pa = a.ptr...
ALGO
0.998985
6.412379
f417ffc7-b9c3-4af6-850b-547243addeda
yefantingyu/Dissertation
ACO_version_2022_6_28/Solver.cpp
#include "Solver.hpp" #include "Macro.hpp" Solver::Solver(string methods){ flag = methods; }; Solver::~Solver(){ //free memory free(perf_of_trials); } void Solver::read_parameter_files(){ int i; char line[CHAR_LEN]; char * keywords; char Delimiters[] = " :=\n\t\r\f\v"; if(flag == "ACO"){ if...
ALGO
0.999297
3.48004
a42326ff-ece9-42e7-9c21-48d5e6c885db
Smiteshbhore21/Daily-DSA-Problem
2438. Range Product Queries of Powers.cpp
int M = 1e9 + 7; class Solution { public: vector<int> powers, ans; vector<int> productQueries(int n, vector<vector<int>>& queries) { for (int i = 0; i < 32; i++) { if (n & (1 << i)) { powers.push_back(1 << i); } } for (vector<int>& q : queries) {...
ALGO
0.999982
5.654588
6170bfd7-949b-40fb-9488-ca66b09bdfeb
MukiBwoi/docbook
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.998689
6.787361
73664963-e6d5-4241-93a6-b8d2c9c49102
Cgfyufsygsm/OI-Codes
Atcoder/ABC231C.cpp
#include <bits/stdc++.h> #define il inline #define FOR(i, a, b) for (int i = (a); i <= (b); ++i) #define DEC(i, a, b) for (int i = (a); i >= (b); --i) using namespace std; namespace YangTY { namespace fastIO { const int maxc = 1 << 23; char ibuf[maxc], *__p1 = ibuf, *__p2 = ibuf; il char getchar() {return __p1 == __p...
ALGO
0.999955
3.961174
71048ddc-0fbc-426c-a67f-48f82f22559f
riscv-spectre-mitigations/llvm_retpoline
libcxx/test/std/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp
// <algorithm> // template<RandomAccessIterator Iter> // requires ShuffleIterator<Iter> && LessThanComparable<Iter::value_type> // constexpr void // constexpr in C++20 // nth_element(Iter first, Iter nth, Iter last); #include <algorithm> #include <cassert> #include "test_macros.h" #include "test_iterators.h" ...
TEST
0.873248
7.399998
0396f830-e2e3-44f6-836c-63234bfef1c4
Mdfaique/dsa
lecture10/reversingArry.cpp
#include<iostream> using namespace std; int rev(int n[],int size) { // int p=size-1; // for(int i=0;i<=size/2;i++) // { // int temp=n[i]; // n[i]=n[p-i]; // n[p-i]=temp; // //cout<<" "<<n[i]<<" "; // } int start=0; int end=size-1; while(start<=end){ ...
ALGO
0.999277
4.242713
cb7648b0-e30f-4093-b75e-da7f45aba6e7
sarvex/leetcode-prolog
solution/0200-0299/0261.Graph Valid Tree/Solution.cpp
class Solution { public: vector<int> p; bool validTree(int n, vector<vector<int>>& edges) { p.resize(n); for (int i = 0; i < n; ++i) p[i] = i; for (auto& e : edges) { int a = e[0], b = e[1]; if (find(a) == find(b)) return 0; p[find(a)] = find(b); ...
ALGO
0.999972
6.214476
2fc5e838-6d18-4650-bf03-a7c391382f64
emn2/Competitive-Programming-Algorithms
Problems/Codeforces/La Salle-Pui Ching Programming Challenge 2019/K.cpp
#include <bits/stdc++.h> using namespace std; #define long long long int const int MAX = 25; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); long dp[MAX][MAX] = { 0LL }; for (int i = 0; i < 10; i++) dp[1][i] = 1; for (int i = 3; i < MAX; i += 2) for (int j = 0; j ...
ALGO
0.999487
4.690552
b394a7be-9d6e-46aa-9db8-960c278219c5
ishandutta2007/codeforces
bmerry/normal/954/A.cpp
//#pragma GCC optimize("O3") //#pragma GCC target("arch=corei7-avx") #include <bits/stdc++.h> #ifndef ONLINE_JUDGE # include <sys/time.h> # include <sys/resource.h> #endif /*** TEMPLATE CODE STARTS HERE ***/ #ifndef M_PI #define M_PI 3.1415926535897932384626433832795028841971693993751 #endif using namespace std; ty...
ALGO
0.999433
3.961
607a5265-938e-477f-a1cf-7e247e41beb0
AbhiArya20/data-structure-and-algorithms-practice
15 LinkedList/014IntersectionOfTwoLinkedList.cpp
#include<bits/stdc++.h> using namespace std; // LeetCode - 160 // GFG - Intersection Point in Y Shapped Linked Lists class Solution { public: ListNode *getIntersectionNode(ListNode *head1, ListNode *head2) { unordered_map<ListNode*,int> um; while(head1){ um[head1]++; head1 ...
ALGO
0.999985
5.120908
0ecd8369-3f59-45dc-98c8-bd313898c2b2
mayankkaushik187/AlgoViser
Hashing/Weird Values.cpp
#include <bits/stdc++.h> using namespace std; #define nline "\n" #define int long long int #define all(x) x.begin(),x.end() // #include<ext/pb_ds/assoc_container.hpp> // #include<ext/pb_ds/tree_policy.hpp> using namespace std; using namespace chrono; // using namespace __gnu_pbds; #define fastio() ios_base::sync_with...
ALGO
0.999869
4.642212
d5c4da08-9375-4ba3-a8d5-ad871bc9cfdf
hoenkava/demo
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775