uuid
stringlengths
36
36
repo_name
stringlengths
5
133
relative_path
stringlengths
3
3.76k
content
stringlengths
282
4.03M
category
stringclasses
6 values
algo_rel_score
float32
0.9
1
quality_score
float32
3
8.13
source_meta
dict
5dc76537-a0e9-4ce5-9b7d-41500114e8e8
ADolbyB/cpp-data-structures
DataStructures/Examples/Int-to-Bin-String.cpp
/** * <NAME> * COP3530: Data Structures * This is example code for working with and converting integers * to 8 bit binary strings using the <bitset> directive. */ #include <iostream> #include <bitset> using namespace std; int main() { bitset<8> x = 255; cout << "x = " << x << endl; bitset<8> left;...
ALGO
0.98662
4.347609
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2023-02-03T01:58:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b58ed6dfa28...
ccb5272c-0bab-42be-909e-f24b41055655
Bkmakwana2002/DSA
Graphs/prims.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find sum of weights of edges of the Minimum Spanning Tree. int spanningTree(int V, vector<vector<int>> adj[]) { // code here vector<int> key(V,INT_MAX); vec...
ALGO
0.999992
6.033439
{ "github_metadata": { "branch": "main", "commit_count": 105, "repo_created_at": "2021-11-26T12:11:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97fa3de5f8...
419e4f9b-36fe-460e-8f37-11bdb817e1fe
SHY-Corp/LeetCode-Solutions
C++/1023. CammelCaseMatching.cpp
/* Problem 1023 - CammelCase Matching A query word matches a given pattern if we can insert lowercase letters to the pattern word so that it equals the query. (We may insert each character at any position, and may insert 0 characters.) Given a list of queries, and a pattern, return an answer list of booleans, where an...
ALGO
0.996753
5.790783
{ "github_metadata": { "branch": "master", "commit_count": 1745, "repo_created_at": "2020-09-21T15:16:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 245, "forks": 536, "issues": 21, "pull_requests": 2 }, "file_meta": { "content_id": "a4b...
e54c6be7-cbc3-457d-abcd-03bc091d99cb
fakrulislam0085/XPSC-Problem-Solving
Week 2/Day-1/F_ColourBlindness.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while(t--) { int n = 2; //row int m; //coloum cin >> m; char mat[n][m]; for(int i=0; i<n; i++) ...
ALGO
0.99986
4.315914
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2024-10-25T19:12:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "952adce019a...
adeaf0bb-a468-4312-96d2-bdddb1b6a301
Kwooley/CS01
ch08/LinearSearch.cpp
#include <iostream> using namespace std; int linearSearch(int [], int, int); int main() { const int N= 10; int array[N] = {25, 10, 15, 30, 35, 40, 45, 55, 20, 50}; int target, foundindex; cout << "Enter the number to find in this array : "; cin >> target; foundindex = linearSearch(...
ALGO
0.999081
4.141614
{ "github_metadata": { "branch": "master", "commit_count": 237, "repo_created_at": "2020-01-24T20:39:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e967368...
2a03a82f-8d80-486f-be05-a81ded40ad19
utilForever/CubbyFlow-v1
Sources/Core/Solver/Grid/GridFractionalSinglePhasePressureSolver2.cpp
/************************************************************************* > File Name: GridFractionalSinglePhasePressureSolver2.cpp > Project Name: CubbyFlow > Author: <NAME> > Purpose: 2-D fractional single-phase pressure solver. > Created Time: 2017/08/14 > Copyright (c) 2018, <NAME> ********************************...
ALGO
0.999891
5.433881
{ "github_metadata": { "branch": "master", "commit_count": 2145, "repo_created_at": "2017-01-19T14:43:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 92, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "964a0...
c6751486-980b-4607-8aed-bf1c914bb88a
Andwerpz/Competitive-Programming-Practice
- cpp -/subsetand.cpp
#include <bits/stdc++.h> typedef long long ll; typedef __int128 lll; typedef long double ld; using namespace std; //2023 Columbia University Local Contest F //we only want to include a number into the bitwise AND sum if it includes k. //use a segment tree to do the bitwise AND range sum. //single modify, range qu...
ALGO
0.99994
5.724257
{ "github_metadata": { "branch": "main", "commit_count": 339, "repo_created_at": "2021-02-26T19:38:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "02e7e11c4b...
16819998-bb1c-40fa-be30-75310ce0ec5f
kaloronahuang/KaloronaCodebase
Practices/LibreOJ/LOJ2586.cpp
// LOJ2586.cpp #include <bits/stdc++.h> using namespace std; const int MAX_N = 6e5 + 200, INF = 0x7f7f7f7f; const double cosa = sqrt(2) / 2, sina = cosa, eps = 5e-2; int n, current_frame, ans[MAX_N], groot; inline char nc() { static char buf[10000000], *p1 = buf, *p2 = buf; return p1 == p2 && (p2 = (p1 = bu...
ALGO
0.999917
4.208548
{ "github_metadata": { "branch": "master", "commit_count": 554, "repo_created_at": "2018-11-02T01:32:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3b46cb...
3283ae38-1e42-49c0-96cf-0d47a4f9ea50
yujqiao/acm-code
CodeArchieve/lydsy/2716-Violet3-天使玩偶.cpp
#include <cstdio> #include <cstring> #include <algorithm> #include <cctype> #include <stack> namespace I { const int L = 1 << 15; char buf[L], *s, *t; inline char gc() { if (s == t) t = (s = buf) + fread(buf, 1, L, stdin); return *s++; } inline int gi() { int x = 0, ch = gc(); while (!isdigit(ch)) ch = gc(...
ALGO
0.999982
3.491418
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2019-08-24T02:53:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2012b797d...
3a163874-646a-49ee-bafa-a6e4cdc981fe
ohmycthulhu/dsai-master-project-de
parallel.cpp
/* Copyright 2017 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the Software * without restriction, including without limitation the rights to use, copy, modify, merge, * publish, distribute...
ALGO
0.998624
5.722353
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-11-25T10:40:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "156d363a039...
7f4321ed-7ba2-4afb-9d37-be4d8498b662
Faria-Zaman-Oiky/3rd-Semester
insertion3.cpp
#include <iostream> #include <vector> #include <cstdlib> #include <ctime> #include <chrono> using namespace std; void insertionSort(vector<int>& arr) { int n = arr.size(); for (int i = 1; i < n; ++i) { int key = arr[i]; int j = i - 1; // Move elements of arr[0..i-1] that are greater ...
ALGO
0.999531
5.815925
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-09-28T10:08:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "08ff4455f5f...
4b9c9446-1d7f-44b7-89bc-9d70388b5d2f
cellokjd/ProblemSolving
week6/bagsize.cpp
#include <iostream> #include <stdio.h> using namespace std; int main() { int n, a, b, minSize,input; int w[1000]; cin >> n >> a >> b; minSize = a; for(int i=0;i<n;i++){ cin >> input; w[i] = input; if((input > minSize) && (minSize <= b)){ minSize = input; ...
ALGO
0.999964
3.19482
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-04-22T04:11:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac66c16c58...
ad622053-17e3-40db-9f3e-e45ead70acd5
alibaba/GraphScope
analytical_engine/apps/centrality/eigenvector/eigenvector_centrality.h
/** Copyright 2020 Alibaba Group Holding Limited. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in w...
ALGO
0.998236
6.95098
{ "github_metadata": { "branch": "main", "commit_count": 2271, "repo_created_at": "2020-10-28T03:19:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3461, "forks": 458, "issues": 418, "pull_requests": 28 }, "file_meta": { "content_id": "23...
59558f7d-0999-4949-b960-9ff3de696d65
Asevulon/MAGA_PhasedArray
MAGA_PhasedArray/Model.cpp
#include "pch.h" #include "Model.h" #define pow2(x) ((x) * (x)) void Model::SetLocation(vector<point>& val) { loc = val; } void Model::SetL(double val) { L = val; } void Model::SetR(double val) { R = val; } void Model::SetLambda(double val) { Lambda = val; } void Model::SetD(double val) { D = val; } void Mod...
ALGO
0.980572
4.284833
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-12-15T14:53:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "10dcb23ba6...
91879bda-7e6f-410e-8c91-96db757c585f
PhanTai369/Learn-Code_C
DETHIGIUAKI/cau3.1.cpp
#include<stdio.h> #include<math.h> #include<conio.h> #include<string.h> #include<stdlib.h> #include<ctype.h> #include<time.h> void SapxepGiamdan(int a[], int n) { int temp; for (int i = 0; i < n - 1; i++) { for (int j = i + 1; j < n; j++) { if (a[i] < a[j]) { temp = a[i]; ...
ALGO
0.999594
3.324691
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-04-29T02:25:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "160e425d7e95...
79e09633-9f24-4207-9fd8-296d1fd35599
tlapack/tlapack
include/tlapack/lapack/getrf.hpp
/// @file getrf.hpp /// @author <NAME>, University of Colorado Denver, USA /// @author <NAME>, University of Colorado Denver, USA // // Copyright (c) 2025, University of Colorado Denver. All rights reserved. // // This file is part of <T>LAPACK. // <T>LAPACK is free software: you can redistribute it and/or modify it un...
ALGO
0.997968
7.587108
{ "github_metadata": { "branch": "master", "commit_count": 1623, "repo_created_at": "2021-04-19T23:10:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 47, "forks": 30, "issues": 16, "pull_requests": 12 }, "file_meta": { "content_id": "7bc3...
276bedc5-c435-42b8-b24d-fb422884e277
woongseob12/Algorithm
그래프 이론/2573.cpp
#include <iostream> #include <queue> using namespace std; int N, M, ans, ice; int map[300][300]; bool visit[300][300]; int dx[4] = { 1, -1, 0, 0 }; int dy[4] = { 0, 0, 1, -1 }; queue<pair<pair<int, int>,int>> q; void init(); void dfs(int y, int x); void bfs(); int main() { ios_base::sync_with_stdio(false); cin.tie(...
ALGO
0.999932
3.821877
{ "github_metadata": { "branch": "master", "commit_count": 717, "repo_created_at": "2019-09-21T06:18:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c3bd270e...
6dd66a12-5342-48e0-8a03-cc2b3214a426
vision-kwest/godot-mirror
scene/2d/navigation2d.h
#ifndef NAVIGATION_2D_H #define NAVIGATION_2D_H #include "scene/2d/node_2d.h" #include "scene/2d/navigation_polygon.h" class Navigation2D : public Node2D { OBJ_TYPE( Navigation2D, Node2D); union Point { struct { int64_t x:32; int64_t y:32; }; uint64_t key; bool operator<(const Point& p_key) const...
ALGO
0.988284
6.124294
{ "github_metadata": { "branch": "master", "commit_count": 2342, "repo_created_at": "2015-12-14T19:32:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1a26687...
950fc457-5db2-4a5f-9a42-ba77a0128678
MohamedIrfanAM/Arduino
Pet_Feeder/Pet_Feeder.ino
/* Kunju Feeder By <NAME> */ #include <Servo.h> Servo feedingServo; // Global Variables int startingAngle = 0; int feedRate = 75; int thresholdSound = 600; unsigned long maxTime = 120000; int servoPin = 9; int frightenPin = 2; #define micPin A7 void feed() { for (startingAngle = 0; startingAngle <= f...
TOOL
0.942448
5.285782
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2021-06-25T05:14:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "108e2e7e4...
89b352d2-7ef0-41ef-a3f1-e8af4859ab5c
HyeonJunSong/Baekjoon
백준_4 Platinum/13510_트리와 쿼리 1.cpp
#include <iostream> #include <vector> using namespace std; int N; vector<vector<pair<int, pair<int, int>>>> graph; vector<int> nodeAtEdge; class hldNode{ public: int idx; int root; int parent; int heavy; int level; int toParent; hldNode(){ idx = 0; root = 0; parent = 0; heavy = 0; ...
ALGO
0.99999
5.063128
{ "github_metadata": { "branch": "main", "commit_count": 620, "repo_created_at": "2022-06-19T13:02:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d77f8d1414...
67e0710a-8177-4498-8472-9f1a31018aec
skytang0205/PKU2023fall-VCL-lab
lab2/src/VCX/Engine/SurfaceMesh.cpp
#include <algorithm> #include <spdlog/spdlog.h> #include "Engine/SurfaceMesh.h" namespace VCX::Engine { std::vector<glm::vec3> SurfaceMesh::ComputeNormals() const { std::vector<glm::vec3> normals(Positions.size(), glm::vec3(0)); for (std::size_t i = 0; i + 2 < Indices.size(); i += 3) { ...
TOOL
0.903659
4.956082
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-24T09:34:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2fefaa62f6a...
2d616ab7-026c-47da-a74f-c5570cbe2d6c
A-nnonymous/RSATsetlinMachine
src/RSA/Predator.h
#include <vector> #include <iostream> #include <random> #include <thread> #include <climits> /// @brief Definition of individual optimizer class. /// @tparam output Output struct of fitness function, which must contain fitness value named "value" initalized to (double)-Inf. /// @tparam funcArgs Fitness function argume...
ALGO
0.999981
5.57715
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-10-19T08:41:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4aa10763491...
db441e91-e2c9-45bc-8415-af8db7a64b15
Taylor-Omondi-Odhiambo/Advent-of-Code-2022
Day4part2.cpp
#include <iostream> #include <fstream> #include <string> #include <set> int main() { std::ifstream file; file.open("Day4.txt"); if (file.fail()) { std::cout << "Unable to open the file" << std::endl; } std::string line; std::string str1; std::string str2; std::string str3; ...
ALGO
0.999909
4.567496
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-12-16T22:58:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69b24ed6992e...
a2edf1eb-225f-4844-9f16-c7b30ea74e3e
WebAssembly/binaryen
src/passes/DataFlowOpts.cpp
/* * Copyright 2018 WebAssembly Community Group participants * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
ALGO
0.972491
7.642195
{ "github_metadata": { "branch": "main", "commit_count": 7934, "repo_created_at": "2015-10-29T20:26:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7993, "forks": 792, "issues": 294, "pull_requests": 170 }, "file_meta": { "content_id": "7...
688aabe5-6619-4801-93d9-6ad98824362f
Gal2o/Algo_Study
AlgoStudy/12738 가장 긴 증가하는 부분 수열 3.cpp
//#include <iostream> // //using namespace std; //#define mx 1000001 //int n; //int su[mx], answer[mx]; // //int main() { // cin >> n; // // for (int i = 1; i <= n; i++) // cin >> su[i]; // // answer[1] = su[1]; // int idx = 1; // // for (int i = 1; i <= n; i++) { // if (answer[idx] < su[i]...
ALGO
0.999976
4.241754
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2021-04-05T13:46:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c94603a56...
45aacb89-0c29-4d4e-aecc-88db14fb1ae1
compiler-explorer/compiler-explorer
test/filters-cases/diab.cpp
#include <cstdio> #include <cstring> double testFunction(double* input, double length) { double sum = 0; for (int i = 0; i < length; ++i) { sum += input[i]; } return sum; } int fibo(int n) { if (n <= 1) return n; return fibo(n-1) + fibo(n-2); } int fizz_buzz() { int i; for(i...
ALGO
0.932874
3.962145
{ "github_metadata": { "branch": "main", "commit_count": 10313, "repo_created_at": "2012-05-23T01:31:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 17750, "forks": 1904, "issues": 839, "pull_requests": 34 }, "file_meta": { "content_id": ...
6c656a86-ca21-48f6-95be-5c37256faea9
Mourad-NOUAILI/Hackerrank
practice/algorithms/2-implementation/chocolate-feast/chocolate-feast2.cpp
#include <iostream> using namespace std; int main() { long int N,C,M; int T; cin >> T; int *output; output = new int[T]; for(int i=0;i<T;i++){ cin >> N >> C >> M; int chocos,newChocos,remWrappers; int temp; chocos = N/C; if(M > chocos) ...
ALGO
0.999907
3.239079
{ "github_metadata": { "branch": "master", "commit_count": 128, "repo_created_at": "2017-07-05T20:21:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8e65a827...
004ab077-7ded-43d7-81dc-59e4027df580
splashinn/src
final.cpp
#include <iostream> #include <string> #include <iomanip> using namespace std; // //CLASS DECLARATION SECTION // class EmployeeClass { public: void ImplementCalculations(string EmployeeName, int hours, double wage); void DisplayEmployInformation(void); void Addsomethingup (EmployeeClass, EmployeeClass, EmployeeClas...
TOOL
0.922622
4.068038
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2014-12-04T16:56:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51474dee05...
6cc632fb-d51f-45c6-bcf2-b3589614250b
karasuma-2401/IT001
HW(final)_2Darray && string/hw24.cpp
#include <iostream> #include <string> #include <cstring> using namespace std; void output(string num) { long long res = 0; for (int i = num.size() - 1; i >= 0; i--) { int digit = (num[i] - '0') + res; if ((digit % 10) == 5) { res = digit/ 10 + 1; } else { if ((dig...
ALGO
0.999782
4.626288
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-02-18T11:28:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "075aa3b021c0...
8980a065-1dcb-491b-ba05-3f5f51410a50
opynao/learning
coursera/red_belt/josephus_permutation/include/josephus_perm.h
#include <cstdint> #include <iterator> #include <numeric> #include <vector> #include <list> #include <iostream> #include <algorithm> #include <list> #include <utility> #include <iterator> #define PR(x) std::cerr << #x << " = " << x << std::endl #define LOGF std::cerr << __FUNCTION__ << " " << __LINE__ << std::endl us...
ALGO
0.999085
4.083573
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2020-10-05T19:17:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ac40b21312...
3c7db544-d45b-4504-8317-0a88f5cae1bf
GaurangJotwani/LeetcodeForAll
0132-palindrome-partitioning-ii/0132-palindrome-partitioning-ii.cpp
class Solution { public: bool isPalindrome(string &s, int i, int j) { while (i <= j) { if (s[i] != s[j]) return false; i++; j--; } return true; } int minCut(string s) { int n = s.size(); vector<vector<bool>> isPalindrome(n, vector<b...
ALGO
0.999992
6.167671
{ "github_metadata": { "branch": "main", "commit_count": 2867, "repo_created_at": "2023-08-08T19:48:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5a8bcd9f...
e8849139-0d27-4682-9b64-74f48170ecc0
opendilab/LightZero
lzero/mcts/ctree/ctree_stochastic_muzero/lib/cnode.h
// C++11 #ifndef CNODE_H #define CNODE_H #include "./../common_lib/cminimax.h" #include <math.h> #include <vector> #include <stack> #include <stdlib.h> #include <time.h> #include <cmath> #include <sys/timeb.h> #include <time.h> #include <map> const int DEBUG_MODE = 0; namespace tree { class CNode { pub...
ALGO
0.999397
6.115519
{ "github_metadata": { "branch": "main", "commit_count": 233, "repo_created_at": "2022-10-08T04:12:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1416, "forks": 165, "issues": 5, "pull_requests": 26 }, "file_meta": { "content_id": "2140c...
67909572-c9ca-4e36-a255-52f14c695b30
ilkp/SimpleANN
SimpleANN.h
// SimpleANN (Simple Artificial Neural Network) // Copyright © 2021, 2022 <NAME> // Released under MIT license #pragma once #include <algorithm> namespace sann { struct StepFunction { float (*activation)(float); float (*derivative)(float); }; struct NeuralNetworkAllocInfo { unsigned nLayers; unsigned*...
ALGO
0.961602
6.085523
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2021-05-17T18:04:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f47e53d38a8...
cb30821b-7c21-4500-bcd8-8795031a3a80
emamhasan1804/XPSC
week -13/day -05/H_Make_a_Power_of_Two.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>; // for set template <typename T> using pbds = tree<T, n...
ALGO
0.999851
4.767796
{ "github_metadata": { "branch": "main", "commit_count": 377, "repo_created_at": "2024-03-14T19:22:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c06fdbd9d...
752a45ac-8a01-462e-a010-d60aeb1319a2
VaishnaviT-265/Data-Structure-Algo
Array/12_pairWithSum.cpp
#include<iostream> using namespace std; //Find pair of elements with sum k void pairWithSum() { int arr[]={6,3,8,10,16,7,5,2,9,14},k=10,n=10; for(int i=0; i<n-1; i++) { for(int j=i+1; j<n; j++) { if(arr[i]+arr[j]==k) cout<<arr[i]<<" + "<<arr[j]<<" = "<<k<<endl; ...
ALGO
0.999605
5.272966
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-08-28T17:09:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "25148aa3dd5a...
baf0ce77-82c7-43ad-bf17-0290a77f3aae
Suhasi05/DSA_Practice
3InsertionSort.cpp
// #include<iostream> // using namespace std; // int main() // { // int i, j, n; // cout<<"Enter n : "; // cin>>n; // int a[n]; // cout<<"Enter elements : "; // for(i=0; i<n; i++) // { // cin>>a[i]; // } // for(i=1; i<n; i++) // { // int temp = a[i]; // j...
ALGO
0.999781
4.277941
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2023-07-31T15:20:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99f38cb5a...
9c8cc5f0-192b-4e63-9f83-204b443ff5d7
apple/turicreate
src/external/boost/boost_1_68_0/boost/geometry/algorithms/detail/distance/range_to_geometry_rtree.hpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2014, Oracle and/or its affiliates. // Contributed and/or modified by <NAME>, on behalf of Oracle // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTA...
ALGO
0.999591
7.542128
{ "github_metadata": { "branch": "main", "commit_count": 1571, "repo_created_at": "2017-12-01T00:42:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11198, "forks": 1137, "issues": 502, "pull_requests": 21 }, "file_meta": { "content_id": "...
c9f157fa-2784-461c-a519-00b55a5dc501
bryanoliveira/cellular-automata
src/automata_base_cpu.cpp
#include <chrono> #include <omp.h> #include <sstream> #include <spdlog/spdlog.h> #include "automata_base_cpu.hpp" #include "definitions.hpp" #include "commons_cpu.hpp" #include "stats.hpp" namespace cpu { AutomataBase::AutomataBase(const uint pRandSeed, std::ostringstream *const pLiveLogBu...
ALGO
0.977645
6.480632
{ "github_metadata": { "branch": "master", "commit_count": 179, "repo_created_at": "2021-03-13T17:12:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "db25266...
e02d0674-ae77-4d55-b92a-75c96c2d9110
idilkapikiran/Advanced-Programming-CS204-Homeworks
ikapikiran_Kapikiran_Idil_hw7.cpp
#include <iostream> #include <string> #include <fstream> using namespace std; //check if the bit is 1 bool index1(unsigned char c, unsigned int i) { if((c & (1 << i) ) == (1<<i)) { return true; } else { return false; } } //permute the bits of the char //check all the bits like the first one unsigned char perm...
ALGO
0.999904
4.138995
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2020-10-12T16:47:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "383497007bb3...
41c71e2c-9f46-4ace-974b-6b1f02583505
yanhuanwang/codekata
wikioi3/1063.cpp
///* // * A.cpp // * // * Created on: Apr 26, 2014 // * Author: ecaiyan // */ // //#include <cstdio> //#include <cstdlib> //#include <memory.h> //#include <algorithm> //#include <string> //#include <map> ////#include <unordered_map> ////#include <unordered_set> //#include <set> //#include <vector> //#include <cma...
ALGO
0.99999
3.958156
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-06-19T09:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5542ad554d...
a6dead12-5f8b-462f-91db-824e7551c866
Aman-Devri/Aman19
regular_falsi.c++
#include <iostream> #include <cmath> using namespace std; // Function to find the root of double func(double x) { return x * x * x - x - 2; // Example: f(x) = x^3 - x - 2 } // Regula Falsi Method void regulaFalsi(double a, double b, double tolerance, int maxIterations) { double c; // Check if the sig...
ALGO
0.999987
5.172732
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-10T16:36:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4762da9a1b14...
d74e70ad-383c-4472-b280-08f665569b74
superbluesea/PAT_Basic
1035.cpp
#include<stdio.h> #include<stdlib.h> int cmp(const void *a, const void *b) { return *(int*)a - *(int*)b; } int main() { int N, srcAry[100], destAry[100], i, j; scanf("%d", &N); for (i = 0; i < N; ++i)scanf("%d", &srcAry[i]); for (i = 0; i < N; ++i)scanf("%d", &destAry[i]); //equal for (i = 0; i < N - 1 && dest...
ALGO
0.999992
3.245218
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2017-08-17T13:07:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8494db4da...
2fc509b2-713a-48f9-9cec-dfc798968882
ReciHub/FunnyAlgorithms
Word Ladder/Word_Ladder_I.cpp
// Word Ladder I // Problem statement: /* Given two distinct words startWord and targetWord, and a list denoting wordList of unique words of equal lengths. Find the length of the shortest transformation sequence from startWord to targetWord. Keep the following conditions in mind: -> A word can only consist...
ALGO
0.999948
5.606789
{ "github_metadata": { "branch": "master", "commit_count": 2052, "repo_created_at": "2018-09-24T10:03:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 487, "forks": 704, "issues": 11, "pull_requests": 110 }, "file_meta": { "content_id": "5...
db28e3f7-9fe8-41b9-9ec9-b7f4b93335cf
zonkytm/tik-tak-toe
tik tak toe/running_game.h
#pragma once #include "figure.h" #include <iostream> #include "Game_text.h" #include "check_win.h" void running_game() { RenderWindow window(VideoMode(512, 512), "tik tak toe"); int player_1_win=0, player_2_win=0, draw=0; Turn turn; turn.set_position(Vector2f(512 / 2, 50)); figure figures[3][3]; Game_texts pl...
ALGO
0.974818
3.55476
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-05-15T10:48:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1d7c1e56d...
35988446-1529-4584-9eb2-a11e05aedf0e
gpalex07/SIMU
Gnou/modele/animaux/gnou.cpp
#include "gnou.h" #include "modele/modele.h" gnou::gnou(int inTileX, int inTileY, modele *inPtrModele) : animal(inTileX, inTileY, inPtrModele) { _orientation =rand()%8; _gnouQuonSuit = NULL; } int gnou::getTextureNumber() const { return DEBUT_TEXTURES_GNOUS +_orientation; } // Permet de vérifier que le g...
ALGO
0.93033
4.176774
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2013-02-12T07:02:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e89d74d9a0...
c625d1ff-fe12-4ae8-b0cb-b8bbb685caa2
it-fedia/school21_projects
Matrix+/src/s21_matrix_oop.cpp
#include "s21_matrix_oop.h" using namespace std; S21Matrix::S21Matrix() { rows_ = 3; cols_ = 3; matrix_ = new double*[rows_]; for (int i = 0; i < rows_; i++) { matrix_[i] = new double[cols_](); } } S21Matrix::S21Matrix(int rows, int cols) : rows_(rows), cols_(cols) { if (rows_ <= 0 || cols <= 0) { ...
TOOL
0.909977
6.119184
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2024-11-23T16:37:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c3205d9bfd7...
a0e09845-8b65-443a-bdb3-f8b1562ee1d7
Clement-Codes/Pratice
Algorithms/Sorting/Merge Sort/MergeSort.cpp
#include<iostream> #include<cmath> #include<vector> using namespace std; void merge(int array [] , int left, int middle, int right){ int leftSize = middle - left + 1; int rightSize = right - middle; vector<int> leftArr(leftSize), rightArr(rightSize); int l = 0; int r = 0; for(int i=left...
ALGO
0.999997
5.096706
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2024-06-12T20:44:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb5c672a082...
68162d6d-4c20-421e-99a2-fe6f63926cbf
data-miner00/codeforces
codeforces/verified/617A.cpp
/** * Author : <NAME> * Created : April 25, 2022 7:29 PM * Problem Name : <NAME> * Problem Limit : 1000 ms , 256 MB * Problem Url : https://codeforces.com/problemset/problem/617/A * Submission Url : https://codeforces.com/problemset/submission/617/15493185...
ALGO
0.99995
4.396284
{ "github_metadata": { "branch": "master", "commit_count": 171, "repo_created_at": "2021-07-15T08:53:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b00dd97a...
88cb9214-b793-458a-9c9b-23e7caca72e4
obriencorey/CPP
CPP_Challenges/AugustChallenge-Palindrome/aug-palindrome.cpp
#include<iostream> #include<string> using namespace std; class Solution { public: bool isPalindrome(string s) { int length = s.length(); int counter = 0; int arraylength; bool output = true; if(!s.empty()){ char characters[length]; //loop ...
ALGO
0.944749
4.504892
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2020-07-29T12:57:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9a8df1d77...
b560983c-3ed6-46ea-b57d-194291fb46f9
Arena-Rosnav/arena-utils
spacial_horizon/src/spacial_horizon_node.cpp
/* Use global path of move_base and publish Subgoals based on SpacialHorizon algorithm */ #include <spacial_horizon/spacial_horizon_node.h> void SpacialHorizon::init(ros::NodeHandle &nh) { has_odom = false; has_goal = false; /* fsm param */ nh.param("fsm/goal_tolerance", goal_tolerance, 0.5);...
ALGO
0.99601
4.949719
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2022-06-20T22:06:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "10fc5d3999...
95591084-519e-4295-a33c-31c41c338243
uxth/leetcode
cpp/1207.unique-number-of-occurrences.cpp
/* * @lc app=leetcode id=1207 lang=cpp * * [1207] Unique Number of Occurrences * * https://leetcode.com/problems/unique-number-of-occurrences/description/ * * algorithms * Easy (71.61%) * Likes: 430 * Dislikes: 19 * Total Accepted: 56.5K * Total Submissions: 78.9K * Testcase Example: '[1,2,2,1,1,3]'...
ALGO
0.999686
6.518745
{ "github_metadata": { "branch": "main", "commit_count": 202, "repo_created_at": "2023-08-31T18:12:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f3b0fba79...
8ae0d3ee-feaa-43e7-9226-d84de601e66b
xiaol-luo/lxl_cpp
client/game_card/tools/build_xlua/3rd_libs/data_struct/consistent_hash/consistent_hash.cpp
#include "consistent_hash.h" unsigned int MurMurHash(const void *key, int len) { const unsigned int m = 0x5bd1e995; const int r = 24; const int seed = 97; unsigned int h = seed ^ len; // Mix 4 bytes at a time into the hash const unsigned char *data = (const unsigned char *)key; while (len >= 4) { unsigned in...
ALGO
0.939589
5.027698
{ "github_metadata": { "branch": "master", "commit_count": 676, "repo_created_at": "2018-05-22T15:19:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "67f4b1ea...
a81aca4d-0aab-4981-9789-cafae13024ab
anurag-IITH/distributed_computing
vector_clock.cpp
#include <iostream> #include <thread> #include <chrono> #include <ctime> #include <fstream> #include <random> #include <mutex> #include <unistd.h> #include <sys/time.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h> #include <string.h...
TOOL
0.926764
3.854975
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-02-14T10:50:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d0f2f9de5...
8de2146d-1cc5-40c9-bd4b-32a6ecedd20b
ralbuckle21/practices
状态dp-poj 2817/poj 2817-WordStack(状态dp)/main.cpp
/*WordStack As editor of a small-town newspaper, you know that a substantial number of your readers enjoy the daily word games that you publish, but that some are getting tired of the conventional crossword puzzles and word jumbles that you have been buying for years. You decide to try your hand at devising a new puzz...
ALGO
0.999949
3.616119
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2015-12-29T02:46:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f6a147b60...
d01b0c6b-dc62-4453-a06a-2abec0b73a1e
LeakyMon/AVLTree
BST.h
#pragma once #include <string> #include <sstream> #include <iostream> #include <cctype> #include <iomanip> #include <queue> #include <stack> #include <fstream> using namespace std; class AVLTree { //constructor(s), functions to build/maintain/search/traverse the AVL tree, and destructor private: class TreeNode { /...
ALGO
0.982332
4.082561
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-02-22T02:07:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35555b85a29a...
d8b23878-a81b-49b2-b96e-aacb6bd534a8
LambdaRan/online-programming
nowcoder/swordOffer/prob17.cpp
#include <iostream> #include <algorithm> #include <vector> #include <stack> using namespace std; /* * Name: 树的子结构 * Description: 输入两棵二叉树A,B,判断B是不是A的子结构。(ps:我们约定空树不是任意一个树的子结构) * */ struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) ...
ALGO
0.999729
4.818226
{ "github_metadata": { "branch": "master", "commit_count": 218, "repo_created_at": "2018-01-18T13:17:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b76f13bb...
49a18e6f-7f0e-410b-8776-f07f3bdc213f
gfjdh/Programming-Paradigm-Assignments
a2-4/a2-4.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; int sixToDec(const string &six) { // 将六进制字符串转换为十进制整数 int dec = 0; for (char ch : six) { int digit = ch - '0'; dec = dec * 6 + digit; } return dec; } string decimalToBase(int dec, int base) { // 将十进制整...
ALGO
0.999676
4.087415
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2024-11-15T00:52:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b40eaea46a...
fbb8209b-f65f-48e0-9fed-9fd9897c7069
dsxyy/tecs
code/network/vnm/res_pool/src/segment_range.cpp
/****************************************************************************** * Copyright (c) 2011,中兴通讯股份有限公司,All rights reserved. * * 文件名称:segment_range.cpp * 文件标识: * 内容摘要:CSegmentRange类实现文件 * 当前版本:1.0 * 作 者: * 完成日期:2013年09月05日 * * 修改记录1: * 修改日期:2013/09/05 * 版 本 号:V1.0 * 修 改 人:zhao.jin * 修改内容:创建 *...
TOOL
0.932879
4.718749
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-03-01T07:21:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "498b2891d8...
602eef7e-2eeb-4de4-81b2-86872006894e
TimDTTP/LearningCPP
leetcode/deleteNodeInLinkedList/main.cpp
#include "list.h" // listNode + basic operations #include <iostream> #include <vector> struct TestCase { ListNode *list; ListNode *node; }; TestCase test1() { TestCase obj; std::vector<int> vec{4, 5, 1, 9}; ListOperations cur{}; obj.list = cur.list(vec); ListNode *temp = obj.list; while (temp->val ...
ALGO
0.999679
6.485836
{ "github_metadata": { "branch": "master", "commit_count": 608, "repo_created_at": "2023-04-07T01:50:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fffa58de...
46557e7d-0505-4889-943c-fd689a35caac
rmittal1421/street-coding
LeetCode Problems/5.cpp
class Solution { public: string longestPalindrome(string s) { if(s.size() == 0) return s; vector<vector<bool>> dp(s.size(), vector<bool>(s.size(), false)); for(int i = 0; i < s.size(); i++) dp[i][i] = true; for(int i = s.size() - 1; i >= 0; i--) { fo...
ALGO
0.999985
5.916347
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2019-07-17T06:30:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a92d63dd9...
992262ce-503f-400a-95ea-8402423f5ecc
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/04/0402/personal_submission/cf739b_lengli_star.cpp
//我们考虑每个点的贡献 //可以发现是一条向上(根节点)的简单路径 //那么我没可以倍增的找到第一个路径长度大于当前节点权值的节点 //然后使用树上差分维护贡献 //最后dfs一下统计子树总和即可。 /* lengli_QAQ Hope there are no bugs!!! */ #include <bits/stdc++.h> #define fastio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define endl '\n' #define all(x) x.begin(),x.end() #define pb push_back #define int lon...
ALGO
0.999928
3.885834
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "12a2...
9ee79d49-9f7c-4515-b5a5-8964f8f90c9e
annadodd/Algo-practice
Aug2016 Practice/graphPath.cpp
// // graphPath.cpp // Aug2016 Practice // // Created by <NAME> on 9/28/16. // Copyright © 2016 <NAME>. All rights reserved. // #include <stdio.h> #include <string> #include <vector> #include <list> #include <unordered_map> #include <queue> #include <stack> #include <iostream> using namespace std; // Given pairs...
ALGO
0.999859
5.597531
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2016-08-30T12:16:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82c06cc8b...
5421171b-ed2b-47e0-8382-71f09f128aa6
Saimouli7424/Data-Structures-Algorithms-Learning-Journey
leetcodequestions/151.cpp
//Reverse Words in a String //using stack to reverse the words in a string //Time complexity: O(n), where n is the length of the string //Space complexity: O(n), for the stack used to store characters of each word #include <bits/stdc++.h> using namespace std; class Solution { public: string reverseWords(string s) ...
ALGO
0.99949
5.777322
{ "github_metadata": { "branch": "main", "commit_count": 289, "repo_created_at": "2025-02-01T13:21:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "188fb864c6...
b3d97556-b31f-4ec9-bf8f-63c718ab5621
saurabhgupta08/CPP
Question Practice/Tree/Binary Search Tree/search_in_BST.cpp
#include<iostream> using namespace std; class Node{ public: int data; Node* right; Node* left; Node(int data){ this->data=data; this->right=NULL; this->left=NULL; } }; Node* buildTree(Node* root){ cout<<"Enter the data : "<<endl; int data; cin>>data; r...
ALGO
0.999954
4.176837
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-22T14:07:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c908e7b86dda...
2867b634-d88f-4120-813f-607104edcac6
openharmony/ark_runtime_core
libpandabase/os/unix/futex/mutex.cpp
/* * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
TOOL
0.925163
7.409153
{ "github_metadata": { "branch": "master", "commit_count": 179, "repo_created_at": "2021-09-01T21:31:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f5a7cef45...
2c200264-42f5-40d8-8e00-ca9245b3d811
algo-seacow/code
cses/Geometry/LineSegmentIntersection.cpp
#include <bits/stdc++.h> using namespace std; using Point = pair<long long, long long>; #define x first #define y second Point operator-(const Point &a, const Point &b) { return {a.x - b.x, a.y - b.y}; } long long dot(Point u, Point v) { return u.x * v.x + u.y * v.y; } long long cross(Point u, Point v) { ...
ALGO
0.996303
4.917638
{ "github_metadata": { "branch": "master", "commit_count": 289, "repo_created_at": "2020-08-12T05:29:15.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "cthbst/Competitive-Programming", "stars": 24, "forks": 20, "issues": 0, "pull_requests": 0 }, "file_meta": {...
0a6a40a1-54b0-4b25-811e-536c41e2545f
xuyuandong/parallel_sentence_mining
include/englishNumToDigit.h
#ifndef ENGLISH_NUM_TO_DIGITS #define ENGLISH_NUM_TO_DIGITS #include <iostream> #include <string> #include <map> #include <vector> #include <set> #include "mt_string_operation.h" using namespace mt_parallel; class EnglishNumToDigit { public: map<string, int> dict; EnglishNumToDigit() { dict["zer...
TOOL
0.9887
4.8418
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2013-02-07T02:06:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a88a383e29...
82c62f7a-63dd-403c-a6a1-b652fc22e4ac
Voleco/biexp
shared/PRAStarUnit.cpp
/* * $Id: praStarUnit.cpp,v 1.4 2006/09/18 06:19:31 nathanst Exp $ * * praStarUnit.cpp * HOG * * Created by <NAME> on 1/16/05. * Copyright 2005 <NAME>. All rights reserved. * * This file is part of HOG. * * HOG is free software; you can redistribute it and/or modify * it under the terms of the GNU Gener...
ALGO
0.980401
5.140464
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-01-29T06:32:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7298500fd...
9cd87515-1daa-45ab-9ee6-9564ce0cf055
jslee99/baekjoon
1967(트리의 지름, postorder).cpp
#include<iostream> #include<vector> #include<queue> using namespace std; int ans = 0; struct node { pair<int,int> parent;//node , weight vector<pair<int,int>> child; priority_queue<int> depth_pq; }; struct node node_lst[10000]; vector<int> leaf_lst; int n; int postorder(int node) { if (node_lst[node].child.size...
ALGO
0.999942
4.057247
{ "github_metadata": { "branch": "master", "commit_count": 101, "repo_created_at": "2022-07-18T10:54:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5a72bb10...
1a1b68ec-539b-46e3-af56-b4438a90187e
leiterboss/hybrid-biology
utils/common.cpp
/* * utils.cpp * * Created on: Feb 7, 2012 * Author: leiterboss */ #include "common.h" #include <time.h> MTRand drand(time(NULL)); // double in [0, 1) string toUpper(string s1) { for (string::iterator i = s1.begin(); i != s1.end(); i++) { *i = toupper(*i); } return s1; } bool isVowel(char c) { retur...
TOOL
0.935141
4.681768
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2012-08-19T18:17:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0dc909fa66...
132a2ce3-3d33-4728-b0a4-ac4c4c74a689
DanielChappuis/reactphysics3d
include/reactphysics3d/constraint/Joint.h
/******************************************************************************** * ReactPhysics3D physics library, http://www.reactphysics3d.com * * Copyright (c) 2010-2024 <NAME> * ********************************************************************************* *...
TOOL
0.902772
6.562821
{ "github_metadata": { "branch": "master", "commit_count": 1990, "repo_created_at": "2013-05-24T18:06:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1637, "forks": 239, "issues": 70, "pull_requests": 4 }, "file_meta": { "content_id": "f...
7b0b7a7f-4c56-44af-8c51-c38747e8a0f6
liaojh1998/Competitive-Programming
USACO/Section 2/2.3/nocows.cpp
/* ID: liaojh11 PROG: nocows LANG: C++ */ //Title: nocows //Type: DP //Solution: If only I can visualize this properly in a text document, notice this solution used symmetry and is a reduced tree. /* The solution basically takes a start on dp[1][1] tree, which has 1 node and 1 level, which will create 1 solution but...
ALGO
0.99999
4.319319
{ "github_metadata": { "branch": "master", "commit_count": 134, "repo_created_at": "2016-09-19T22:10:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7533f0a0...
1373dddd-449d-41f0-bc1f-2e4846a4c2b3
LdyTima/begin-to-learnC
函数案例.cpp
//输入学生数量 姓名 学号 成绩 并对学生按照成绩进行升序排序 #include<iostream> using namespace std; int n; //定义学生的结构体 struct student { long long num; char name[10]; float score; }; student stu[]; int main() { student stu[3]; cout << "请输入学生个数最多3人:"; cin >> n; if (n > 3 || n < 0) { cout << "您输入的学生数量有误" << endl; } else { for (int i ...
ALGO
0.999116
3.710762
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2020-10-09T12:28:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad62c5515c5...
9c814785-b66b-4296-a360-1ba0a10aee7d
gwqw/LeetCodeCpp
Algorithms/medium/093_restore_ip_address.cpp
/** 93. Restore IP Addresses Given a string s containing only digits, return all possible valid IP addresses that can be obtained from s. You can return them in any order. A valid IP address consists of exactly four integers, each integer is between 0 and 255, separated by single dots and cannot have leading zeros....
ALGO
0.99943
5.91193
{ "github_metadata": { "branch": "master", "commit_count": 263, "repo_created_at": "2019-08-23T13:27:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "119a255e...
9faf23f6-8e47-4e82-b7e0-8519e49241d0
GRTLCollaboration/Chombo
releasedExamples/AMRPoisson/execVariableCoefficient/VClocalFuncs.cpp
#ifdef CH_LANG_CC /* * _______ __ * / ___/ / ___ __ _ / / ___ * / /__/ _ \/ _ \/ V \/ _ \/ _ \ * \___/_//_/\___/_/_/_/_.__/\___/ * Please refer to Copyright.txt, in Chombo's root directory. */ #endif #include <cmath> #include "parstream.H" #include "BRMeshRefine.H" #include "L...
ALGO
0.998862
3.213444
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2018-01-30T14:07:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 16, "forks": 12, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a797a5bf0f...
d9d45d46-2dc8-4c79-a0b0-c3e213226c3c
fevrem/TROPIC
casadi/casadi-linux-matlabR2014b-v3.5.1/include/casadi/core/sparsity_internal.hpp
/* * This file is part of CasADi. * * CasADi -- A symbolic framework for dynamic optimization. * Copyright (C) 2010-2014 <NAME>, <NAME>, <NAME>, * <NAME>. All rights reserved. * Copyright (C) 2011-2014 <NAME> * Copyright (C) 2005-2013 <NAME> * * CasADi is free softw...
TOOL
0.962006
5.478233
{ "github_metadata": { "branch": "develop", "commit_count": 325, "repo_created_at": "2020-02-18T15:49:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 55, "forks": 12, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "4da9b...
8d4d2fd0-7c57-4a22-a87a-fce22c7f3ec0
1Sacabambaspis/TEB1113_DSA_22010978
Lab 6/ArrayQueue.cpp
#include <iostream> #include <string> using namespace std; class Queue { private: static const int MAX_SIZE = 100; string arr[MAX_SIZE]; int front; int rear; int count; public: Queue() { front = 0; rear = -1; count = 0; } bool isFull() const { return co...
ALGO
0.934079
5.044326
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2025-06-10T14:17:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e6443887322...
bd773e46-cd44-4a88-b6e7-edb4d8f0aeef
kadensalem/kattis
charlesincharge.cpp
#include <vector> #include <queue> #include <cstdio> #include <climits> #include <float.h> int n, m, x; // # cities, # roads, % of min distance std::vector<std::vector<std::pair<int, double> > > g; // graph std::vector<double> d; // distances std::vector<int> p; // parents int max_length = INT_MAX; double dijkstra() ...
ALGO
0.999953
4.433991
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-03-04T21:47:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a6a09c5c04...
3d92a9a7-89c5-40f5-a319-7d1512304f1a
Hengle/misc_microsoft_gamedev_source_code
misc_microsoft_gamedev_source_code/misc_microsoft_gamedev_source_code/ximage/hsv.h
// RGB to HSV, HSV to RGB transformation. #pragma once #include "math.h" namespace gr { inline BVec3 HSVToRGB(const BVec3& hsv) { BVec3 c1(hsv), c2, sat; while (c1[0] < 0.0f) c1[0] += 360.0f; while (c1[0] > 360.0f) c1[0] -= 360.0f; if (c1[0] < 120.0f) ...
ALGO
0.979071
6.224792
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-09-30T07:02:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8bf4dd9f4e...
303cda53-fa76-46d5-810c-a97762caaf76
j-hossain/Online-judge-solve
uva-solutions/uva11831.cpp
#include<stdio.h> typedef struct { int x; int y; }cord; int dir(char a) { if(a=='N') return 1; else if(a=='L') return 2; else if(a=='S') return 3; else return 4; } int main() { int c_dr,row,column,n_ins,temp,i,j,cnt; //c_dr means current direction char ...
ALGO
0.999682
3.690346
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2020-05-29T12:51:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba988819e...
5813c7b2-5278-4429-ad39-99dbcb1f4174
ericosur/ericosur-snippet
C/stl/sortfoo.cpp
#include <iostream> #include <algorithm> #include <functional> #include <vector> #include <random> using namespace std; class Foo { public: Foo(const string& s, int v) { str = s; val = v; } string str; int val; bool operator<(const Foo& g) { return this->val < g.val; ...
ALGO
0.997726
4.878785
{ "github_metadata": { "branch": "main", "commit_count": 2426, "repo_created_at": "2014-08-18T03:18:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "633420f0f...
ac9cf1d5-6696-4321-8967-af50667fab8f
AngelLeal2001/AILJ_Estructurada432
AILJ_PE_ACT3_3.cpp
// <NAME> // Matricula: 365334 // Fecha: 1 de septiembre del 2023 // Actividad 3_3 // leer 3 numeros y mencionar los numeros de forma ascendente #include <stdio.h> int main () { int num1, num2, num3; printf("dame el numero 1: \n"); scanf("%i", &num1); printf("dame el numero 2: \n"); scanf("%i", ...
ALGO
0.999415
3.604643
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-09-11T05:48:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b7a908c2065...
e4132608-7424-4b38-b9d9-4911edb9cd96
paperrune/deeplearning-study
History/Momentum/main.cpp
#include <fstream> #include <iostream> #include <omp.h> #include <stdio.h> #include <string> #include <time.h> #include "Neural_Networks.h" using namespace std; void Read_MNIST(string training_set_images, string training_set_labels, string test_set_images, string test_set_labels, int number_training, int number_test...
DATA
0.907598
4.158344
{ "github_metadata": { "branch": "master", "commit_count": 986, "repo_created_at": "2017-09-20T13:21:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "10d6d57f...
a4320266-3e4e-481d-839d-b29bb971f8ea
brokensm1le/Hashmap
for_check.h
#pragma once #include <vector> #include <list> #include <memory> #include <utility> template<class KeyType, class ValueType, class Hash = std::hash<KeyType>> class HashMap { public: using KeyValuePair = std::pair<const KeyType, ValueType>; using iterator = typename std::list<KeyValuePair>::iterator; usin...
TOOL
0.906165
6.57123
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2020-02-19T20:53:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c46393f23...
4b99e564-46c5-4fa9-be69-12386fdcff2a
MAHEALAMMAHI/CPP
arraysumavg2.cpp
#include <iostream> using namespace std; int main() { int ARRAY_SIZE = 4; // Arrays to store integer and floating-point numbers int intNumbers[ARRAY_SIZE]; float floatNumbers[ARRAY_SIZE]; // Get user input for integer numbers cout << "Enter 4 integer numbers:\n"<<endl; for (int i = 0; i ...
ALGO
0.999381
4.831185
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-04T08:10:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12e8c5df40c1...
d8cc8cee-a1ad-4e35-8d60-0ddb96836401
jatinarora2702/Competitive-Coding
topic_practice/dp/longest_bitonic_seq.cpp
#include <bits/stdc++.h> using namespace std; void printi(int *lis, int *si, int *a, int pos){ if(pos == -1) return; if(si[pos] == -1){ printf("%d ", a[pos]); return; } printi(lis, si, a, si[pos]); printf("%d ", a[pos]); } void printd(int *lds, int *sd, int *a, int pos){ if(sd[pos] == -1){ printf("%d ", a...
ALGO
0.999978
3.887414
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2017-01-15T21:30:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6a7f5f84...
a441aa7c-c8b2-4535-8ead-f12eb8c655af
babypuma/leetcode
RomanToInteger/roman_to_integer.h
/* * Author : <NAME> * Email : <EMAIL> * Date : 2020/12/16 * * Source : https://leetcode-cn.com/problems/roman-to-integer/ * Problem: Roman to Integer * */ #include <string> #include <unordered_map> using std::string; using std::unordered_map; class Solution { public: int romanToInt(strin...
ALGO
0.999386
6.192288
{ "github_metadata": { "branch": "master", "commit_count": 438, "repo_created_at": "2014-10-20T08:18:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "218f7c8a...
5f0e969d-619b-40b3-9986-6794523dfb6f
ishandutta2007/codeforces-p
piyushsethia1999/normal/451/D.cpp
#include <bits/stdc++.h> #define ll long long #define pb push_back #define mp make_pair using namespace std; int main() { string s; cin>>s; ll j = 0; ll si = s.size(); std::vector<ll> v; std::vector<ll> oddendposcount; std::vector<ll> evenendposcount; ll start; while(j < si){ start = j; char ch = s[j]; ...
ALGO
0.999884
3.226657
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:49:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13204fbfecd2...
79421b3c-fea7-415d-8e50-5c89c290248d
Resetz/usacoprac
SILVER/cereal2sol.cpp
#include <iostream> #include <vector> #include <set> using namespace std; vector<int> curorder; vector<pair<int,int>> cows; vector<bool> found; vector<bool> extra; set<int> placed; vector<int> arr; vector<vector<pair<int,int>>> dir; int n,m; void go(int seg, int cow) { cout << seg << " " << cow << endl; if (c...
ALGO
0.999995
3.848611
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2021-07-22T01:07:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f208b1ec83...
8d9c3ca8-fe25-4879-9a19-c1d69fac1b16
liuyubobobo/Play-with-Algorithms
04-Heap/Course Code (C++)/06-Heap-Sort/QuickSort2Ways.h
// // Created by liuyubobobo on 4/24/17. // #ifndef INC_06_HEAP_SORT_QUICKSORT2WAYS_H #define INC_06_HEAP_SORT_QUICKSORT2WAYS_H #include <iostream> #include <algorithm> #include "InsertionSort.h" using namespace std; // 双路快速排序的partition // 返回p, 使得arr[l...p-1] < arr[p] ; arr[p+1...r] > arr[p] template <typename T> i...
ALGO
0.999804
5.23188
{ "github_metadata": { "branch": "master", "commit_count": 311, "repo_created_at": "2016-07-05T18:16:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3700, "forks": 1461, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "63...
6fa6977c-7bc5-4122-8828-f54742d629fb
KoreaFriedChips/Competitive-Programming
CCC/CCC Senior/CCC '07/Friends.cpp
#include <iostream> #include <algorithm> #include <vector> #include <cmath> #include <string> #include <iomanip> #include <queue> #include <climits> using namespace std; #define ll long long #define pb push_back #define ull unsigned long long #define pii pair<int, int> #define mp make_pair #define vi vector<int> #defi...
ALGO
0.999993
3.91644
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2021-03-15T19:29:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e63c1f78d...
42f68bfb-f3be-430b-aa4d-d115e1da92ac
kenbo736/TDIU08
Lab_1/up_2/lab_1b.cpp
#include <iostream> #include <iomanip> #include <string> #include <cctype> using namespace std; void count_words(string a, int& numWords, int& sum); void shortest_word(string a, string& shortWord); void longest_word(string a, string& longWord); int main() { string a{}; string shortWord{"aaaaaaaaaaaaaaaa"}; ...
ALGO
0.987658
3.75358
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2019-11-12T15:38:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8a8ceb05...
6d0095b8-aa48-4e34-8b48-b139011b8ac1
Cristiancj99/Cplusplus
Programacion c++/Tema 2/bucles/´numerosprimos.cpp
/* programa para calcular los numeros primos mediante un bucle */ #include <iostream> using namespace std; int main () { int numero= 0; // numero introducido por el usuario int contador = 1; // contador para ir probando dividir double division = 0.0; int contador2 =0.0;// contador pra ver cuantas veces las divis...
ALGO
0.998711
3.364288
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-02-02T13:09:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "25412f7d6d...
937ad0e5-fc8f-4d43-b665-7284084439d4
ishandutta2007/codeforces-h
heart_blue/normal/753/A.cpp
#include <cstdlib> #include <cctype> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <iostream> #include <sstream> #include <map> #include <set> #include <queue> #include <stack> #include <fstream> #include <numeric> #include <iomanip> #include <bi...
ALGO
0.999081
3.287365
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "202fea6a1765...
37effdcc-c2dc-4999-86f9-120bf76d19f7
thisisfaizanali/Strivers-SDE-Sheet
Trees/Binary Search Trees/5-DeleteNodeinBST.cpp
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++ Bismillah ++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ #include <bits/stdc++.h> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int...
ALGO
0.999997
5.261498
{ "github_metadata": { "branch": "main", "commit_count": 315, "repo_created_at": "2023-06-09T06:45:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6a8f97b8f...
bf1aa9b4-b7e8-4681-b469-5365cbe78525
alexandraback/datacollection
solutions_5658571765186560_0/C++/KennyHORROR/D.cpp
#ifdef DEBUG //#define _GLIBCXX_DEBUG #endif #include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <set> #include <map> #include <queue> #include <deque> #include <string> #include <cstring> #include <sstream> #include <cmath> #include <algorithm> #include <ctime> #include <cassert> #incl...
ALGO
0.999971
3.655116
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1a5c445a...
537863e5-f848-4faf-8522-672aaf125a60
laegit/MOPR_D
MoSTP/SourceCode/4obj/PontoReferencia.cpp
#ifndef PONTOREFERENCIA_H_ #define PONTOREFERENCIA_H_ #include "param_NSGAIII.h" #include "SolucaoEdgeSet.cpp" class PontoReferencia { public: size_t quantMembros; // numero de membros associados ao ponto vector<pair<SolucaoEdgeSet*, double> > membros; // membros (SolucaoEdgeSet e distancia) public: vector<...
TOOL
0.93594
4.070543
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-05-17T01:13:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "14ad3aeb96...
9f8305e6-197b-4de5-8e83-6fdc6484d227
arkyper/Striver-A2Z-DSA
#01 Step : Learn the Basics/#1 Lec : Things to Know in C++/#3 GFG - If-else (Decision Making).cpp
// Given two integers, n and m. The task is to check the relation between n and m. // Example 1: // Input: // n = 4 // m = 8 // Output: lesser // Explanation: // 4 < 8 so print 'lesser'. // Example 2: // Input: // n = 8 // m = 8 // Output: equal // Explanation: // 8 = 8 so print 'equal'. //{ Driver Code Starts #incl...
ALGO
0.999984
4.785969
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2024-04-28T15:18:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c57bc3004e...
f36226b1-320e-4983-9bbb-9893a925a4d4
bysmaks/OzonCTF-2025
reverse/step_by_step/solve/solve.cpp
#include <iostream> #include <cstdint> #include <cstdlib> #include <string> uint64_t ror(uint64_t value, unsigned int shift) { shift %= 64; return (value >> shift) | (value << (64 - shift)); } uint64_t rol(uint64_t value, unsigned int shift) { shift %= 64; return (value << shift) | (value >> (64 - shi...
ALGO
0.999993
5.513352
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-04-28T08:40:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "08069e69656...
762f5da2-197c-4c63-a069-fe51a7599b1c
kamyu104/LeetCode-Solutions
C++/game-of-life.cpp
// Time: O(m * n) // Space: O(1) class Solution { public: void gameOfLife(vector<vector<int>>& board) { const int m = board.size(), n = m ? board[0].size() : 0; for (int i = 0; i < m; ++i) { for (int j = 0; j < n; ++j) { int count = 0; // Count live cell...
ALGO
0.999629
6.915389
{ "github_metadata": { "branch": "master", "commit_count": 19395, "repo_created_at": "2018-10-11T17:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4939, "forks": 1616, "issues": 1, "pull_requests": 55 }, "file_meta": { "content_id": ...