uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
24b37043-27bb-45cf-91b6-e7f9c8b55450
Familyye/ollvm-19
libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp
// <random> // template<class RealType = double> // class piecewise_linear_distribution // template<class _URNG> result_type operator()(_URNG& g, const param_type& parm); #include <random> #include <vector> #include <iterator> #include <numeric> #include <algorithm> // for sort #include <cassert> #include <limits>...
TEST
0.991416
4.801427
db67f1f8-c0b4-4117-8169-9f8ebf87aaa3
yashikaverma8112/New-Mission
DSA/nextGreater.cpp
class Solution { public: vector<int> nextLargerElement(vector<int>& arr) { // code here int n = arr.size(); stack<int>st; vector<int>ans(n,-1); for(int i=n-1; i>=0; i--){ while(!st.empty() && st.top() <= arr[i]){ st.pop(); } ...
ALGO
0.999986
5.503214
010400a6-1ac7-437a-a2ff-cfdb702a6cba
bfulgham/WinCairoRequirements
src/icu/source/common/normalizer2.cpp
#include "unicode/utypes.h" #if !UCONFIG_NO_NORMALIZATION #include "unicode/localpointer.h" #include "unicode/normalizer2.h" #include "unicode/unistr.h" #include "unicode/unorm.h" #include "cpputils.h" #include "cstring.h" #include "mutex.h" #include "normalizer2impl.h" #include "ucln_cmn.h" #include "uhash.h" U_NAM...
TOOL
0.866317
7.790015
1ac9bb3d-1a27-410e-9ba8-eacca980a80d
nafi103/Solved-Problems
Practice/2024/B_Binary_Path.cpp
#pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define ee end() #define bb begin() #define ff first #define ss second #de...
ALGO
0.999974
4.268094
ee5ed804-c61d-4426-a85b-15d623fb1e68
Chinaliuxin/test_for_everything
thread_1/select.cpp
/* demoװһselect࣬ * ṩӼ򵥵selectؽӿ * //ûsocketӵؼ * //ӼؼƳٹĵsocket * //ʼ,ҷûؾsocket ================================================================*/ #include <vector> #include <sys/select.h> #include "tcpsocket.hpp" class Select { public: Select() :_max_fd(-1) { //void FD_ZERO(fd_set *set)...
WEB
0.867465
4.630602
19474cc9-5175-4e49-852b-65711f87ca3f
Fly0307/dtee_ncnn_face_recognition
src/host/insecure/ncnn_retinanet.rv/ncnn/layer/mips/binaryop_mips.cpp
#include "binaryop_mips.h" #if __mips_msa #include <msa.h> #include "msa_mathfun.h" #endif // __mips_msa namespace ncnn { BinaryOp_mips::BinaryOp_mips() { #if __mips_msa support_packing = true; #endif // __mips_msa } template<typename Op> static void binary_op_vector_no_broadcast(const float* ptr, const float* ...
ALGO
0.99268
6.850495
f5bac207-5e73-433e-a091-3daef430e8aa
Komal-J04/DSA
POTD/Leetcode/LargestPositiveIntegerThatExistsWithItsNegative2441.cpp
// https://leetcode.com/problems/largest-positive-integer-that-exists-with-its-negative/description/?envType=daily-question&envId=2024-05-02 class Solution { public: int findMaxK(vector<int> &nums) { int ans = -1; int n = nums.size(); sort(nums.begin(), nums.end()); int i = 0; ...
ALGO
0.999971
5.355462
1c02a424-f14c-402c-8afb-77c539a8e3ef
ishandutta2007/codeforces
gabrielpessoa/normal/977/E.cpp
#include<bits/stdc++.h> using namespace std; typedef vector<int> vi; const int SIZE = 2e5+5; vi g[SIZE]; bool vis[SIZE]; void dfs3(int pos) { vis[pos] = true; for(auto a : g[pos]) if(!vis[a]) dfs3(a); } bool dfs2(int pos, int prev, int start) { vis[pos] = true; bool ans = g[pos].size() == 2; if(ans) { for(au...
ALGO
0.999852
4.68087
ad2ffb61-896d-4fb0-a089-e73178feb658
Ashutosh-0506/Striver_Graph
L21TopologicalSort.cpp
//***********************************ASHUTOSH KUMAR***********************************// /* कर्मण्येवाधिकारस्ते मा फलेषु कदाचन। मा कर्मफलहेतुर्भूर्मा ते सङ्गोऽस्त्वकर्मणि॥ Karmanye vadhikaraste Ma Phaleshu Kadachana, Ma Karmaphalaheturbhurma Te Sangostvakarmani, The meaning of the verse is :— You have the right to wo...
ALGO
0.999977
5.804381
fe7c1f9a-8030-4014-b435-b31d43f7bd15
altynbek132/yandex_CPP_specialization
1__white_belt/week 2/006-iezhiemiesiachnyie-diela.cpp
// // Created by Addmin on 02.12.2020. // // #include <bits/stdc++.h> #include <algorithm> #include <deque> #include <iostream> #include <iterator> #include <map> #include <numeric> #include <set> #include <sstream> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; typedef...
ALGO
0.996844
5.466008
9f71dab2-45bf-40f2-b4d4-c5ca7dd1066b
113bommy/PathRepair
variable_trace/cpp/cpp_code/cpp_correct/cpp_correct_test_160_7.cpp
#include <bits/stdc++.h> using namespace std; long long inf = 1000000007; double pi = acos(-1); long long p(long long a, long long b) { long long ans = 1; if (a < 0) a += inf; while (b) { if (b % 2 == 1) { ans = ((ans % inf) * (a % inf)) % inf; } a = ((a % inf) * (a % inf)) % inf; if (a < 0)...
ALGO
0.999847
4.564304
0954428d-258d-473d-83ca-1d60d914f494
drive-by-developer/Hello
bitcoin/src/pubkey.cpp
#include "pubkey.h" #include <secp256k1.h> #include <secp256k1_recovery.h> namespace { /* Global secp256k1_context object used for verification. */ secp256k1_context *secp256k1_context_verify = nullptr; } // namespace /** * This function is taken from the libsecp256k1 distribution and implements DER * parsing for ...
TOOL
0.912473
7.491044
1471faf5-7aad-4b79-94b1-c459be86d4ee
Le-ECE/Air-Wheel-Driver
opencv/sources/modules/video/src/tracking/detail/tracker_sampler_algorithm.cpp
#include "../../precomp.hpp" #include "opencv2/video/detail/tracking.private.hpp" namespace cv { namespace detail { inline namespace tracking { TrackerSamplerAlgorithm::~TrackerSamplerAlgorithm() { // nothing } TrackerSamplerCSC::Params::Params() { initInRad = 3; initMaxNegNum = 65; searchWinSize = 2...
ALGO
0.999845
6.207046
10d286c5-cebd-4d33-a892-96342481a450
Pragat19/StrokeHeal
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.998809
6.763549
02f2e671-28d7-4aeb-981d-2f080adb8dd3
NumanWali/C-Practice
table_of_n_input.cpp
#include <iostream> using namespace std; int main(){ int n; cout<<"enter the number: "; cin>>n; for(int i=n; i<=n*10; i=i+n){ cout<<i<<" "; } }
ALGO
0.988221
3.167238
caf983bc-ecab-49ab-ada8-94dc3334f598
DhruvSharma69/DSA_repo
linked list/detectDUP.cpp
#include <iostream> using namespace std; class node{ public: //for storing data and address in node int data; node* next; // make constructor so it can always store value while creating new node node(int data) { this->data=data; this->next=NULL; } }; //fu...
ALGO
0.999759
3.88882
6a73c27b-66cf-4e99-ad4a-598fe6bf8dad
MahmoudAbou-Hawis/Codeforces
B. Binary String Constructing/b.cpp
#include<bits/stdc++.h> #define FIO ios_base::sync_with_stdio(0);cin.tie(0); #define Created ios_base::sync_with_stdio(0); #define By cin.tie(0); #define Tourists cout.tie(0); using namespace std; using ll = long long; using vi = vector<int>; #define pb push_back #define rsz resize #define all(x) begin(x), end(x) #defi...
ALGO
0.999969
3.580436
4a452939-bb35-4853-aee3-734c5c6bbbce
Prateek-Wayne/prateek-DSA
Difficulty: Easy/Binary Tree Representation/binary-tree-representation.cpp
//{ Driver Code Starts //Initial Template for C++ #include<bits/stdc++.h> using namespace std; struct node { int data; struct node *left; struct node *right; }; struct node *newNode(int data) { struct node *node = (struct node *)malloc(sizeof(struct node)); node->data = data; node->left = NULL; node->...
ALGO
0.998954
4.951673
cde3157e-9b3a-4ccb-aecd-06cd2fb3114f
codehub001/CrackYourInternship
Longest Common Substring.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: int t[1001][1001]; int maxi = 0; int helper(string &S1, string &S2, int n, int m){ if(n == 0 || m == 0) return 0; if(t[n][m] != -1) return t[n][m]; ...
ALGO
0.999966
6.081974
9db24f42-9f3e-4788-92cf-3f7ac0f9a865
aahartley/2DFluid
2DFluid/Fluid.cpp
#include "Fluid.h" Fluid::Fluid(float dt, float diffusion, float viscosity) { this->dt = dt; this->diff = diffusion; this->visc = viscosity; this->density0 = new float[N * N]; this->density = new float[N * N]; this->Vx = new float[(N + 1) *N]; this->Vy = new float[(N + 1) * N]; this->Vx0 = new float[(N + 1)...
ALGO
0.998696
4.217548
cfbf9ea2-4239-4ea7-ac1b-ec92ac98b909
HPMkwn/Codding
string/suffixArray.cpp
#include <bits/stdc++.h> using namespace std; vector<int> sortCyclicShift(const string& s) { int n = s.length(); const int alphabet = 256; vector<int> p(n), c(n), cnt(max(alphabet, n), 0); for (int i = 0; i < n; i++) cnt[s[i]]++; for (int i = 0; i < alphabet; i++) cnt[i] += cnt[i - 1]; for ...
ALGO
0.999894
4.638421
6f71fd40-bdf4-4b94-bc17-a8725a78fe18
DreamingCats/Solutions_of_Algorithm_Notes
第04章 算法初步/4.3 递归/背包问题.cpp
#include<cmath> #include<iostream> using namespace std; const int N = 13; int n, weightBag; int weight[N], value[N]; //ӵiƷʼѡСjIJ int select(int i, int j) { int result; if (i == n)//ѾûʣƷ result = 0; else if (j < weight[i]) result = select(i + 1, j); else { result = max(select(i + 1, j), select(i + 1, j - wei...
ALGO
0.999993
3.958402
9a9b1ebb-7c35-4883-9a4f-bdee01ffaa9e
devaoted/coursera
white/week2/m.buses.cpp
#include <iostream> #include <map> #include <vector> using namespace std; int main() { int Q; cin >> Q; map<string, vector<string>> buses; vector<string> sequence; for (int i = 0; i < Q; ++i) { string command; cin >> command; if (command == "NEW_BUS") { string b...
ALGO
0.989079
5.602272
369a4a88-d2b6-4bb1-899b-9186be3467e8
vikashpatel24/CodeForces-Solution
1360B - Honest Coach.cpp
// ॐ नमः शिवाय #include<bits/stdc++.h> using namespace std; // Code Written By: Vikash Patel // Codeforces Profile: https://codeforces.com/profile/vikashpatel int main() { int t; cin>>t; while(t--) { int n; cin>>n; int s[n]; for(int i=0;i...
ALGO
0.999651
4.443064
2b9077c5-97a8-4414-85b0-5c2504f6c9d5
siddhantadhav/dsa
array/rotateByK.cpp
#include <bits/stdc++.h> using namespace std; void rotateByK(vector<int> &nums, int k){ for(int i=0; i<k; i++){ int n = nums.back(); nums.pop_back(); nums.insert(nums.begin(), n); } } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); #ifndef ONLINE_JUDGE freopen("input.txt", "r", ...
ALGO
0.999675
4.443359
72c87bd9-887a-447f-ae84-c198d0f76cad
mdNurAman/Codeforces
C_Assembly_via_Remainders.cpp
#include <bits/stdc++.h> using namespace std; #define el "\n" #define ll long long int #define loop(n) for (int i = 0; i < n; i++) void solve() { int t; cin >> t; while (t--) { int n; cin >> n; n--; vector<int> v(n); loop(n) cin >> v[i]; int a=1000; ...
ALGO
0.999953
4.314238
65c59956-531f-4948-b588-ca0bae5cc917
MasudRanaMushfiq/Numerical-Methods
Lagrange.cpp
#include<bits/stdc++.h> using namespace std; class Lagrage{ private: vector<double>x,y; double ans = 0.0; public: Lagrage(vector<double>x,vector<double>y){ this->x = x; this->y = y; } double root(double tar){ int n = x.size(); for(int i=0;i<n;i++){ double...
ALGO
0.999811
4.294707
2f63f6a1-3fb0-47ba-a79a-7226594b9b51
ishandutta2007/codeforces
rns_mhb/normal/743/A.cpp
#include<bits/stdc++.h> using namespace std; #define N 200020 int n, a, b; char s[N]; int main(){ scanf("%d %d %d", &n, &a, &b); scanf("%s", s); if(s[a-1] == s[b-1]) puts("0"); else puts("1"); }
ALGO
0.999907
3.820189
23390042-c718-4acd-9007-6861d734189c
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_1843_7.cpp
#include <bits/stdc++.h> using namespace std; const int INF = 1e9 + 9; int main() { int k; cin >> k; vector<pair<int, pair<int, int> > > ans; for (int e = 0; e < int(k); e++) { int n; cin >> n; vector<int> a(n); for (int i = 0; i < int(n); i++) cin >> a[i]; int s = accumulate(a.begin(), a.en...
ALGO
0.999974
3.470818
204f6648-980d-4930-a769-73d1447d41ae
0point1Zishan/CP
DSA Practice/LinkedList/Linked List Insertion At End.cpp
class Solution { public: Node *insertAtEnd(Node *head, int x) { // Code here if(head == NULL){ Node * a = new Node(x); head = a; return head; } Node * temp = head; while(temp->next != NULL){ temp = temp->next; } ...
ALGO
0.998675
5.429813
bc632b08-7c82-4539-aab2-0d940c6405ee
Cyber-Hunterr/CSES-Problemset
Tree Algorithms/Tree_Distances_I.cpp
#include <bits/stdc++.h> using namespace std; // #include<ext/pb_ds/assoc_container.hpp> // #include<ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; // template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; // template <typename T, typename R> u...
ALGO
0.999907
4.933625
467af84e-2332-4f60-aa4c-8550a8cd87ae
ZainAmin/Advanced-Image-Processing-for-Medical-Imaging
previous years/2019/2019-03-27-junction-detection.cpp
// include aia and ucas utility functions #include "aiaConfig.h" #include "ucasConfig.h" // include my project functions #include "functions.h" namespace { // utility function that rotates 'img' by step*90° // step = 0 --> no rotation // step = 1 --> 90° CW rotation // step = 2 --> 180° CW rotation // step = 3 -...
ALGO
0.958592
5.586851
f86f6806-23f8-4db4-90c1-9e15230a7548
Joyal-Patel14/CPP
450 Ques/Array/27.cpp
#include <bits/stdc++.h> using namespace std; // Problem: Find whether an array is subset of another array or not bool isEqual(int b[], vector<int> &cnt) { int m = cnt.size(); sort(b, b+m); sort(cnt.begin(), cnt.end()); for(int i=0; i<m; ) { if(b[i] == cnt[i]) { i++; ...
ALGO
0.999975
4.133113
3150d55f-4442-4e67-94a1-66bc79e456d8
junlong-gao/recreations
src/code_practise/leetcode/cpp/00676.cpp
/* construct a trie use it to control lookup for each mismatch char, assume it is the mismatch and search. a b c a c c b a b */ class MagicDictionary { struct trie { bool isWord {false}; // XXX must init unordered_map<char, trie*> cs; ~trie () { for (auto &pr : cs) { delete pr.second; } } v...
ALGO
0.999111
5.874514
6df8aa34-3ce3-497a-babe-65b592a37368
huaxiufeng/leetcode
src/algorithm/cpp/excel-sheet-column-number/main.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; template <typename T> void display(vector<T> array) { for (int i = 0; i < array.size(); i++) { cout<<array[i]<<" "; } cout<<endl; } class Solution { public: int titleToNumber(string s) { i...
ALGO
0.999645
5.558289
eccd3dda-05d2-43ff-a07b-253dd636fc2b
vijaygomathinayagam/Learn-Algorithms
CodeForces/ITMO/Disjoint set union/Step 1/Cutting a graph.cpp
#include<iostream> #include<vector> #include<unordered_set> #include<sstream> #include<stack> // https://codeforces.com/edu/course/2/lesson/7/1/practice/contest/289390/problem/D const std::string QUERY_ASK = "ask"; const std::string QUERY_CUT = "cut"; struct Query{ std::string query_type; int u, v; }; class Disjo...
ALGO
0.999959
5.390851
6eac96bb-0fbe-4d49-88dc-8653d6024efd
migodev42/cppStart
leetcode/leetcode-extension/101.对称二叉树.cpp
/* * @lc app=leetcode.cn id=101 lang=cpp * * [101] 对称二叉树 */ struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} TreeNode(int x, TreeNode *left, TreeNode *right) :...
ALGO
0.999937
6.631586
0d57c85d-0f49-4065-bc92-2111d1c47056
jmguerreroh/vision
05_edges_and_regions/05_08_Harris/main.cpp
/** * Harris corners detector - sample code * @author José Miguel Guerrero * https://docs.opencv.org/3.4/d4/d7d/tutorial_harris_detector.html */ #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include <iostream> using namespace cv; using namespace std; Mat src, src_gray; int max_thresh = 255; const...
ALGO
0.991993
6.618369
688fdece-5eaa-404f-bbab-9b7f036949da
commonapi-someip/boost_1_71_0
libs/graph/example/filtered_graph.cpp
/* Sample output: filtered edge set: (A,B) (C,D) (D,B) filtered out-edges: A --> B B --> C --> D D --> B E --> */ #include <boost/config.hpp> #include <iostream> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/filtered_graph.hpp> #include <boost/graph/graph_utility.hpp>...
ALGO
0.999306
6.367901
4b0f1a4e-d943-4cb3-990e-7dbf5984872e
codemonster57/Leetcode_soln
My-Leetcode-Solution-In-CPP/CPP, C++ Solutions/990. Satisfiability of Equality Equations.cpp
class Solution { public: void dfs(unordered_map<char, vector<char>> &graph, char start, vector<int> &visited, int label) { visited[start-'a'] = label; for(auto &nbr: graph[start]) if(visited[nbr-'a'] == -1) dfs(graph, nbr, visited, label); } bool equ...
ALGO
0.999983
5.858259
c18a0f6e-c5db-4982-aa2b-74705d3d0666
LilySpark/Algorithm
leetcode/268. Missing Number.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; /*先排个序,逐个比较,不等的直接return*/ class Solution { public: int missingNumber(vector<int>& nums) { sort(nums.begin(), nums.end()); int len = nums.size(); for(int i = 0; i < nums.size(); i++) if(nums[i] != i) ...
ALGO
0.999375
4.249634
27d5c1c9-7122-41c3-92e8-379a3c20242c
Khushisrivastava9/GFG-Practice
Medium/String Subsequence/string-subsequence.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int mod=1e9+7; int dp[501][501]; int solve(int i,int j,string s1,string s2){ if(i>s1.length()) return 0; if(j>=s2.length()){ return 1; } if(dp[i][j]!=-1) return...
ALGO
0.999961
6.361972
f2582658-0ac0-40d8-8745-4314c0965bef
mooiman/delta-formulation
src/c++/1d/1d_advection_diffusion/packages/src/adv_diff_init_concentration.cpp
#include "compatible_function.h" #include "adv_diff_init_concentration.h" void adv_diff_init_concentration(std::vector<double>& mass, std::vector<double> & x, double Lx, SHAPE_CONC shape, std::vector<double>& u_out) { double L_envelope; double fcent; double shift; size_t refine = 100; size_t nx = ...
ALGO
0.998691
4.804041
666eff8d-6ff4-4fb0-b8c7-df91c57f0a0e
MarcoVitoC/compnest
AtCoder/2024/December/PowerfulDiscountTickets.cpp
#include <bits/stdc++.h> #define ll long long #define all(x) x.begin(), x.end() using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int N, M; cin >> N >> M; priority_queue<ll> pq; for (int i=0; i<N; i++) { int A; cin >> A; pq.push(A...
ALGO
0.999958
4.123183
cadc5ae8-5d7a-4ab1-a960-b2bbfaff03d0
anushkaGurjar99/Data-Structure-and-Algorithms
LEETCODE/Leetcode challenge/First Unique Number.cpp
/* * Author : Anushka Gurjar * Date : April 2020 * flags : -std=c++14 */ #include<bits/stdc++.h> using namespace std; // Problem Statement: https://leetcode.com/explore/featured/card/30-day-leetcoding-challenge/531/week-4/3313/ /* Since we are not popping out from queue so here's the points to be noted - ...
ALGO
0.999911
5.776891
19849550-68c2-46f0-801c-0db3cdafa46e
WouterJansen/eigen
doc/examples/TutorialLinAlgRankRevealing.cpp
#include <iostream> #include <Eigen/Dense> int main() { Eigen::Matrix3f A; A << 1, 2, 5, 2, 1, 4, 3, 0, 3; std::cout << "Here is the matrix A:\n" << A << std::endl; Eigen::FullPivLU<Eigen::Matrix3f> lu_decomp(A); std::cout << "The rank of A is " << lu_decomp.rank() << std::endl; std::cout << "Here is a mat...
ALGO
0.99987
4.043093
9a420fbc-8d61-452c-9689-97a8de7b084b
IKE-B/voice-revive
juce-8.0.0-windows/JUCE/modules/juce_box2d/box2d/Dynamics/Contacts/b2PolygonContact.cpp
#include "b2PolygonContact.h" #include "../../Common/b2BlockAllocator.h" #include "../../Collision/b2TimeOfImpact.h" #include "../b2Body.h" #include "../b2Fixture.h" #include "../b2WorldCallbacks.h" #include <new> using namespace std; b2Contact* b2PolygonContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB...
ALGO
0.9913
7.167222
2ba43e4c-31cf-4843-9fb5-5eb0e43455bc
watashi/AlgoSolution
livearchive/2009/Asia.Shanghai/4748.cpp
#include <set> #include <cstdio> #include <algorithm> using namespace std; const int MAXN = 218; template<int MAXX, int MAXY> struct Hungary { int nx, ny, mx[MAXX], my[MAXY]; bool e[MAXX][MAXY]; bool mark[MAXX]; void init(int nx, int ny) { this->nx = nx; this->ny = ny; for (int i = 0; i < nx; ++i) { f...
ALGO
0.999959
3.498471
dad70c2c-26f8-4959-aa96-360533fb0631
m-inamori/Graphite
src/SelfParentImputer.cpp
#include <cmath> #include "../include/SelfParentImputer.h" #include "../include/common.h" using namespace std; SelfParentImputer::SelfParentImputer(const vector<VCFRecord *>& rs, const vector<vector<int>>& ref_hs, size_t iprog, const Map& map_, double w) : VCFHMM(rs, map_, w), ref_records(rs), ...
ALGO
0.999499
4.07595
5798b58b-7497-4478-b9e9-06b7a0df5ec6
Hentai-Princess/BinaryOperations
BinaryOperation/Binary.cpp
#include "Binary.hpp" unsigned char num[3] = "01"; unsigned char one[100] = { '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'...
ALGO
0.997514
4.792085
fe2cf1b2-3cb9-4e05-a3f0-72010b6e1bbe
ishandutta2007/codeforces
w0nsh/normal/1043/D.cpp
#include <bits/stdc++.h> #define FOR(i, n) for(int i = 0; i < (n); ++i) #define REP(i, a, b) for(int i = (a); i < (b); ++i) #define TRAV(i, a) for(auto &i : a) #define SZ(i) ((int)(i).size()) #define X first #define Y second #define PR std::pair #define PII std::pair<int, int> #define MP std::make_pair #define ll long ...
ALGO
0.99995
3.407422
f220bb55-cdfe-4bef-aa51-342d9e0a7082
EliezerKabangu/CPP_Programs
Mini-Games/Numby.cpp
#include<iostream> #include<ctime> int main(){ int player; int computer1, computer2, computer3; int tries; std::cout << " ---------|*|-----------|NUMBY|----------|*|-----------\n"; std::cout << "| !!!!! THE NUMBER OF DOOM HAVE BEEN SELECTED !!!!! |\n"; std::cout << " ----------------------...
ALGO
0.995428
3.358349
00ffbde3-b902-45b0-8e3e-3cbe96dc1b7d
harshthakkar09/leetcode
3056-determine-if-a-cell-is-reachable-at-a-given-time/3056-determine-if-a-cell-is-reachable-at-a-given-time.cpp
class Solution { public: bool isReachableAtTime(int sx, int sy, int fx, int fy, int t) { int diffx = abs(sx - fx), diffy = abs(sy - fy); if(diffx == 0 && diffy == 0){ return t != 1; } return min(diffx, diffy) + abs(diffx - diffy) <= t; } };
ALGO
0.999952
5.990862
5ac83e7b-3c90-4639-bbb8-01a511313559
0point1Zishan/CP
Random_Practice/A_A.cpp
#include<bits/stdc++.h> using namespace std; #define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define MOD 1000000007 #define MOD1 998244353 #define INF 1e18 #define nline "\n" #define pb push_back #define ppb pop_back #define mp make_pair #define ff first #define ss second #define int lon...
ALGO
0.999934
5.067242
459b8b7c-b67f-4070-90ad-befc8d41e86a
timothyshull/algorithms_scratchpad_old
algorithms_in_c++_examples_modernized/ch_7/7_4.cpp
template<class Item> void select(Item a[], int l, int r, int k) { if (r <= l) { return; } int i = partition(a, l, r); if (i > k) { select(a, l, i - 1, k); } if (i < k) { select(a, i + 1, r, k); } }
ALGO
0.999981
4.3658
5bc4633e-091a-4f2b-b1c4-c9fca21f8c88
gshashank84/CPpractice
sun.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long unsigned ll int fact(ll int n){ if (n==0 || n==1) return 1; else{ return n*fact(n-1); } } int main(){ ll t; cin >>t; while(t--){ ll n,k; cin >> n>>k; vector<int>v; for(int i=0;i<n;i++){ ...
ALGO
0.999937
3.431008
e10c9d06-b369-48a5-861a-db102bc31a2d
qiaozishun4/CSP2024_BJ
BJ-Junior/answers/BJ-J01228/chain/chain.cpp
#include<bits/stdc++.h> using namespace std; const int N=1e5+5; const int M=2e5+5; int n,k,q; int l[N],s[N][N]; int main() { freopen("chain.in","r",stdin); freopen("chain.out","w",stdout); int t,r,c; cin>>t; while(t--) { cin>>n>>k>>q;//参与游戏的人数,接龙序列长度上限,任务个数 for(int i=1;i<=n;i++) { cin>>l[i]; ...
ALGO
0.999968
3.227381
f68117e1-3239-4a63-802c-466ef47e296c
yandex/perforator
contrib/libs/llvm18/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
#include "llvm/Transforms/Instrumentation/ControlHeightReduction.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringSet.h" #include "llvm/Analysis/BlockFrequencyInfo.h" #include "llvm/Analysis/GlobalsModRef.h" #include "llvm/Analysis/OptimizationR...
TOOL
0.976929
4.702529
fb79f2a4-db8c-4f57-a0db-5fcf2f890522
ishandutta2007/codeforces
lyc_music/normal/1572/B.cpp
//~~ #include<bits/stdc++.h> #define poly vector<int> #define IOS ios::sync_with_stdio(false) #define ll long long #define mp make_pair #define mt make_tuple #define pa pair < int,int > #define fi first #define se second #define inf 1e18 #define mod 998244353 //#define int ll #define N 200005 using namespace std; inlin...
ALGO
0.999975
3.744784
b1c8082e-1f4c-4da5-93bc-34caa4972272
ravirajchilka/Artificial-Intelligence
Reinforcement_Learning/Q-Learning/Raylib Implementations/pendulum_swing.cpp
#include <torch/torch.h> #include "raylib.h" #include <cstdint> #include <iostream> #include <random> #include <cmath> constexpr std::int16_t screen_width = 800; constexpr std::int16_t screen_height = 600; constexpr std::int16_t NUM_ACTIONS = 2; // Two actions: increase or decrease rotation constexpr std::int16_...
ALGO
0.998887
6.373488
bc7a781d-b94c-4706-bc8f-9840ac32390e
kostasc96/Clustering-of-Proteins
curve.cpp
#include <vector> #include <cstdio> #include "curve.h" #include "clustering.h" bool coord::cmp(const coord& crd) { for(int i=0; i<this->dim; i++) { if(this->c[i] != crd.c[i]) return false; } return true; } void coord::print() { fprintf(files, "("); for(int i=0; i<dim; i++)...
ALGO
0.968682
3.910194
72b1dcb1-9e7a-4e0c-a891-e4c279bbef72
ThaMaster/acg_3d_studio
dependencies/assimp-5.3.1/code/AssetLib/IFC/IFCOpenings.cpp
/// @file IFCOpenings.cpp /// @brief Implements a subset of Ifc CSG operations for pouring /// holes for windows and doors into walls. #ifndef ASSIMP_BUILD_NO_IFC_IMPORTER #include "IFCUtil.h" #include "Common/PolyTools.h" #include "PostProcessing/ProcessHelper.h" #include "contrib/poly2tri/poly2tri/poly2tri....
TOOL
0.900838
4.488625
788057a9-e464-4821-b2d9-482adb9658ab
TRNDWC/DSA_PTIT
DSA03017.cpp
#include <bits/stdc++.h> using namespace std; int t, n, k; string s; int f[10001]; bool cmp(char a, char b) { return f[a - 'A'] < f[b - 'A']; } int main() { cin >> t; while (t--) { cin >> k; cin >> s; memset(f, 0, sizeof(f)); for (int i = 0; i < s.size(); i++) ...
ALGO
0.999976
4.187594
7375c40f-8d00-44b8-b63f-7fc2d9c214c6
okcd00/CDKeeper
Online_training/2013 MUTC/MUTC.13.03 P.M/code/G/std.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <string> #include <cstring> #include <vector> #include <cassert> using namespace std; typedef long long int64; int64 solve(int n) { assert(n>=2); assert(n <= int(1e9)); int64 ans = 0; for (int i = n / 2; i >= 0; --i) { int j = n - i; if (1LL *...
ALGO
0.999964
5.400364
d3c16e17-5ce9-4dc0-aa75-255b20957618
Chribela/Self_Driving_car
project_10_MPC_control/src/Eigen-3.3/bench/benchmarkXcwise.cpp
// g++ -O3 -DNDEBUG benchmarkX.cpp -o benchmarkX && time ./benchmarkX #include <iostream> #include <Eigen/Core> using namespace std; using namespace Eigen; #ifndef VECTYPE #define VECTYPE VectorXLd #endif #ifndef VECSIZE #define VECSIZE 1000000 #endif #ifndef REPEAT #define REPEAT 1000 #endif int main(int argc, c...
ALGO
0.95397
3.896122
4919117e-e6ba-4162-af69-234b64fb7035
Qoo00/leetcode
1~20/11-盛最多水的容器/maxArea.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; class Solution { public: int maxArea(vector<int>& height) { //典型的贪心算法,可以看做从两边向中间靠拢,不断的削掉某一侧,肯定选择短的削掉,因为短的可能包含的最优解长的一定包含。 int left = 0, right = height.size()-1; int ans = 0; int area = 0; while (left != right) { area = min(height...
ALGO
0.999593
5.621138
0ffc326f-8618-4f09-9e77-ad0816a21101
parth-jangam/leethub
0796-rotate-string/0796-rotate-string.cpp
class Solution { public: bool rotateString(string s, string goal) { if(s.length()!=goal.length()){ return false; } int i=0; int n=s.length(); while(i<n){ if(s==goal){ return true; } char temp=goal[n-1]; ...
ALGO
0.999989
5.771669
4425404e-60ce-456e-9148-7c302213b2ca
mmanishh/dsa-specialization
toolbox/week3_greedy_algorithms/2_maximum_value_of_the_loot/fractional_knapsack.cpp
#include <iostream> #include <vector> using std::vector; double get_optimal_value(int capacity, vector<int> weights, vector<int> values) { double value = 0.0; // write your code here return value; } int main() { int n; int capacity; std::cin >> n >> capacity; vector<int> values(n); vector<int> weig...
ALGO
0.999834
4.849929
e60f5c0b-9a18-4351-9460-49f57e5b282d
onasheep/c_algorithm
BaekJoon/단계별로 풀어보기/문자열/11720_숫자의합.cpp
#include<iostream> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N; int sum = 0; string str; cin >> N; cin >> str; for (int i = 0; i < N; i++) { sum += str[i] - '0'; } cout << sum; }
ALGO
0.999689
3.953974
27763d39-9a81-4c2e-8fdf-6fde56103355
jianmo-z/practice
CPP/leetcodeEditor/leetcode/editor/cn/5_LongestPalindromicSubstring.cpp
//给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。 // // 示例 1: // // 输入: "babad" //输出: "bab" //注意: "aba" 也是一个有效答案。 // // // 示例 2: // // 输入: "cbbd" //输出: "bb" // // Related Topics 字符串 动态规划 // 👍 3008 👎 0 #include <bits/stdc++.h> #include "../googletest/include/gtest/gtest.h" namespace LongestPalindromicSubstring { ...
ALGO
0.999581
6.603236
c46b654d-7e80-47fb-a068-ac4e46194020
ishandutta2007/codeforces
luhong/normal/1320/A.cpp
#include <iostream> #include <cstdio> #include <algorithm> #define MN 1001000 int a[MN]; long long sum[2 * MN]; int main() { int n; scanf("%d", &n); for(int i = 1; i <= n; i++) scanf("%d", &a[i]), sum[a[i] - i + MN] += a[i]; long long ans = 0; for(int i = 0; i < 2 * MN; i++) ans = std::max(ans, sum[i]...
ALGO
0.999824
3.572371
2a9d7362-e8c3-46ea-8933-fa09aa9209be
flaxinger/LeetCodeAutoPush
majority-element/majority-element.cpp
class Solution { public: map<int, int> m; int majorityElement(vector<int>& nums) { int best = 0; int ans = 0; for(int i=0; i < nums.size(); i++){ m[nums[i]]++; if(m[nums[i]] > best){ best = m[nums[i]]; ans = nums[i]; } ...
ALGO
0.999908
5.934361
4647e486-a818-4ea4-ab5c-016bf6d787ac
jesushilarioh/C-Plus-Plus
Chapter-5-Loops-and-Files/Review Questions and Exercises/Algorithm Workbench/39.cpp
/******************************************************************** * * 39. * Write a nested loop that displays 10 rows of ‘#’ * characters. There should be 15 ‘#’ characters in each * row. * * Jesus Hilario Hernandez * March 10th 2018 * **********************************************...
ALGO
0.97111
4.432943
ec39a37f-af5d-42a9-900e-53669aa0be72
edrictam/fast_spanning_tree_sampler
helpers/fastcover/laplacian.cpp
#include "RcppArmadillo.h" #include <unordered_map> #include <vector> using namespace Rcpp; using namespace arma; using namespace std; // [[Rcpp::export]] double sample_uniform() { return R::runif(0, 1); } // This function contracts an edge by merging v into u (deleting v) // [[Rcpp::depends(RcppArmadillo)]] // [[...
ALGO
0.999977
6.616859
a61605b2-be8b-4af8-a5c7-b3f28cda8020
Darrrs/DSA
BinarySearch/The Painter's Partition Problem-II.CPP
// User function Template for C++ #include<bits/stdc++.h> using namespace std; // User function template for C++ class Solution { public: int minTime(vector<int>& nums, int k) { // code here // return minimum time int lo=*max_element(nums.begin(),nums.end()),hi=0; for(in...
ALGO
0.999948
5.475518
6dbbd80d-d78f-411c-9ea0-403c5fdd9c4a
haianhnitc/Weather-App
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
56caa913-9bf7-473f-ac14-3c44ba462d1d
prathmesh0/MISSION_POP
A-Z/Problems On Array/Medium Level/Maximum_subarray_sum.cpp
#include <bits/stdc++.h> using namespace std; /*int maxSubArray(vector<int> &nums, vector<int> &subarray) { int max_sum = INT_MIN; int n = nums.size(); if (n == 1) { return nums[0]; } int i, j; for (i = 0; i <= n - 1; i++) { for (j = i; j <= n - 1; j++) { ...
ALGO
0.99997
5.236722
bbd8c55a-9214-4013-a0be-19acf38a159c
sharc-lab/RealProbe
llvm-project/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/emplace.pass.cpp
// UNSUPPORTED: c++98, c++03 // <queue> // priority_queue(); // template <class... Args> void emplace(Args&&... args); #include <queue> #include <cassert> #include "../../../Emplaceable.h" int main() { std::priority_queue<Emplaceable> q; q.emplace(1, 2.5); assert(q.top() == Emplaceable(1, 2.5)); q...
TEST
0.912803
5.559402
51831a6b-0f6b-4eb5-9e06-60eddeabc22a
harshN-17/LeetCode-Problems
337-house-robber-iii/337-house-robber-iii.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999957
6.541678
6d7b30a3-44e2-4a28-aa04-9044bc459b9e
navneetk2001/CPP_Programs
Competitive_Programming_CPP/5.Basics of Recursion/12_All_Indices_of_Number.cpp
/* @csalgo All Indices of Number Given an array of length N and an integer x, you need to find all the indexes where x is present in the input array. Save all the indexes in an array (in increasing order). Do this recursively. Indexing in the array starts from 0. Input Format : Line 1 : An Integer N i.e. size of arra...
ALGO
0.999951
5.684021
5a14d302-9dbe-4101-8591-835054052f5e
allen-quad-robot/MiLAB-Cheetah-Software
common/src/Collision/CollisionMesh.cpp
/*! * @file CollisionMesh.cpp * @brief Collision logic for a mesh/height map */ #include "Collision/CollisionMesh.h" #include "Utilities/Utilities_print.h" /*! * check whether the contact happens or not * cp_frame let you know which direction is normal (z) and which directions are * x and y. The frame is basica...
ALGO
0.999243
6.692136
e5143dbc-932c-4e58-b6ed-befc16e62e46
dishank1112/CP_Grind
C_Find_B.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <map> #include <unordered_map> #include <set> #include <string> using namespace std; const int N = 300043; int t; int n, m; int a[N]; long long sum[N]; int cnt1[N]; int main() { ios_base::sync_with_stdio(false); cin >> t; ...
ALGO
0.999944
4.485883
05670305-1ce1-40bd-9d91-7fb5543158f0
bindaldhara/Important-coding-problems
Array/Merge_without_extra_space.cpp
#include <bits/stdc++.h> using namespace std; // Function to find next gap. int nextGap(int gap) { if (gap <= 1) return 0; return (gap / 2) + (gap % 2); } void merge(int* arr1, int* arr2, int n, int m) { int i, j, gap = n + m; for (gap = nextGap(gap); gap > 0; gap = nextGap(gap)) ...
ALGO
0.999978
3.993788
9bf92d73-4333-466d-ac2f-834d7f480ad3
Icey1717/KyaBank
src/Mesh/Winding.cpp
#include "Winding.h" #include <glm/glm.hpp> #include <glm/gtc/type_ptr.hpp> #include <algorithm> // for std::swap #include "renderer.h" void Winding::FixInconsistentWinding(Renderer::CompatibilityMeshBuffer& mesh) { // Use the precomputed normal data to determine the winding of triangles. auto* indices = mesh.inde...
TOOL
0.96803
7.362645
12f0072a-db7a-4202-8e08-c83f9cd7f4d2
opencodeiiita/CodeDigger
Tasks/Task3_Uttu/iking07.cpp
#include<bits/stdc++.h> using namespace std; #define pii pair<int,int> #define int long long int #define pb push_back #define eb emplace_back #define db long double #define f first #define s second #define vi vector<int> #define vp vector<pii> #define vc vector<char> #define str string #define vb vector<bool> #defi...
ALGO
0.999981
3.518034
1cc0ff86-cc96-4547-a900-369943745381
shankersingh01/LeetCode
2308-divide-array-into-equal-pairs/2308-divide-array-into-equal-pairs.cpp
class Solution { public: bool divideArray(vector<int>& nums) { unordered_map<int, int> freq; for (int num : nums) { freq[num]++; } for (const auto& x : freq) { if (x.second % 2 == 1) return false; } return true; } };
ALGO
0.999546
5.757133
ebe6f0bd-251a-41d7-ab19-24d4068b39f7
ImDuong/DeepOceanDriver
DODriver/linkedlisthelpers.cpp
#include "pch.h" #include "linkedlisthelpers.h" #include "datastore.h" #include "autolock.h" #include "fastmutex.h" #include "drivercommon.h" #include "commonhelpers.h" // the caller must acquire lock for it & check for existence before pushing void PushItem(__in LIST_ENTRY* entry, __in LIST_ENTRY* entryHead, __inout ...
TOOL
0.969275
5.466939
6be3b2de-8beb-461e-a5e8-5757263b37ca
jxx-sx/BOJ_Study
solved/CLASS 5/1005.cpp
#include <iostream> #include <queue> #include <vector> using namespace std; priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> pq; // end_time, struct_num int T[1001]; int D[1001]; bool is_visit[1001]; int n, k, w; vector<int> edges[1001]; void init() { cin >> n >> k; pq = priori...
ALGO
0.999949
4.61363
687d02c0-29da-4fe1-b5bb-de10c7d86d85
manikanta2901/ubuntu
.history/B. New Year&apos;s Number_20210126124425.cpp
#include <bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #include<queue> using namespace std; #define trav(dataType,DataStruct,name) for(dataType<DataStruct>::itt ip = name.bb(); ip != name.ee(); ip++) //Pre processors & typedefs ...
ALGO
0.999847
3.476982
796efcb8-6938-46b3-830d-93b1a53ba871
numan947/Curiously-Bored
uva790.cpp
#include <bits/stdc++.h> using namespace std; #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 FORall(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); it++) #define sz(a) int((a).size()) ...
ALGO
0.999234
3.78382
33a192aa-9579-4fda-a30d-84815867684d
PaukIsUha/optimizing_formating_code
predictions/submissions-aizu-cot-gpt4/Codenet/p02269/510884274/response_5.cpp
#include <iostream> #include <string> #include <unordered_set> using namespace std; unordered_set<int> chk; int n; string ins, s; int h(string s) { int ret = 0; for (size_t i = 0; i < s.size(); ++i) { ret *= 5; if (s[i] == 'A') ret += 1; else if (s[i] == 'C') ret += 2; else if (s[i] ==...
ALGO
0.999226
4.686347
51131a0a-075b-401d-8651-219ad3d6a27e
deepin-community/ilmbase
IlmBase/ImathTest/testProcrustes.cpp
#ifdef NDEBUG # undef NDEBUG #endif #include "ImathMatrixAlgo.h" #include "ImathRandom.h" #include "ImathEuler.h" #include <iostream> #include <assert.h> #include <cmath> #include <vector> #include <limits> // Verify that if our transformation is already orthogonal, procrustes doesn't // change that: template <typ...
TEST
0.974319
7.371243
0fbe76d6-9d33-4676-a8a1-f4814eca8361
ZoruaSama/Solutions-4-Luogu-Problems
P1616/main.cpp
#include <iostream> #include <algorithm> using namespace std; int main(){ long long t; long long m; long long ai; long long bi; long long f[10000001]={0}; cin>>t>>m; for(int i=0;i<m;i++){ cin>>ai>>bi; for(int j=ai;j<=t;j++){ f[j]=max(f[j],f[j-ai]+bi); } ...
ALGO
0.999791
3.676656
30f3b6fa-a66e-46f6-ab4f-b96ee8b5fd8e
7aeHoon/BaekJoon
프로그래머스/0/181881. 조건에 맞게 수열 변환하기 2/조건에 맞게 수열 변환하기 2.cpp
#include <string> #include <vector> using namespace std; int solution(vector<int> arr) { int answer = 0; while (true) { vector<int> copy = arr; for (int& num : arr) { if (num >= 50 && num % 2 == 0) { num /= 2; } if (num < 50 && num % 2 != 0...
ALGO
0.999786
5.271237
b4ba986a-7400-457a-b72d-884e7f8eca83
rtbr-opensource/rtbr-open-source
sp/src/utils/vvis/flow.cpp
int g_TraceClusterStart = -1; int g_TraceClusterStop = -1; /* each portal will have a list of all possible to see from first portal if (!thread->portalmightsee[portalnum]) portal mightsee for p2 = all other portals in leaf get sperating planes for all portals that might be seen by p2 mark as unseen if n...
ALGO
0.999262
4.307685
5aa3d9a4-7797-4d3b-91a9-aa9e0c14fff3
smhemel/Sphere-Online-Judge
SPOJ ADDREV - Adding Reversed Numbers.cpp
#include <stdio.h> #include <iostream> #include <string> using namespace std; unsigned reverse(unsigned num){ unsigned reversed = 0; while(num){ reversed = reversed*10+num%10; num = num/10; } return reversed; } int main() { int n; scanf("%d",&n); while(n--){ unsigned...
ALGO
0.999798
4.482425
fa640ecc-31c2-400d-ae0d-50d6f5c4ba6b
abdualla1/CS213
Assignment 2/Ziad/game7.cpp
#include <bits/stdc++.h> #include "BoardGame_Classes.h" #include "FourByFour.cpp" #define endl '\n' #define ll long long using namespace std; int main() { int choice; Player<char> *players[2]; FourByFour<char> *B = new FourByFour<char>(); string player1, player2; cout << "Enter Player 1 Name: "; ...
ALGO
0.975448
4.696845
259117c3-a1e7-4f92-b57e-0d38706d275b
artoy/atcoder-clion
tasks/ABC254/ALastTwoDigits.cpp
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define FOR(i, a, b) for (int i = (a), i##_len = (b); i <= i##_len; ++i) #define REV(i, a, b) for (int i = (a); i >= (b); --i) #define CLR(a, b) memset((a), (b), sizeof(a)) #define DUMP(x) cout << #x << " = " << (x) << endl; #d...
ALGO
0.971574
5.405988
ff2a5c2d-1c9e-4a60-bfa1-0ab5467feab4
DO-SOPT-CodingTestStudy/studyArchive
WHE/Tree/prog_lv3_길찾기게임.cpp
#include <string> #include <vector> #include <algorithm> #include <iostream> using namespace std; struct Node { int data; int x, y; Node* left; Node* right; Node(int _data, int _x, int _y) : data(_data), x(_x), y(_y) { left = NULL; right = NULL; } }; bool cmp(Node a, Node b) { if (a.y == b.y) return a.x...
ALGO
0.999958
4.610017
0cfb131b-7fc2-4067-8faa-f13cf20e64ec
amirphl/learning
data-structures/geeks-for-geeks/linked-list/check-linked-list-strings-form-palindrome.cpp
// https://www.geeksforgeeks.org/check-linked-list-strings-form-palindrome/ //{ Driver Code Starts //Code by Shubham Joshi #include <bits/stdc++.h> using namespace std; struct Node { string data; Node* next; Node(string x) { data = x; next = NULL; } }; Node *newNode(string str) { ...
ALGO
0.998417
5.926697