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
58204df8-592e-45ef-b616-e33ab51db02b
monyhar/monyhar
monyhar/components/omnibox/browser/inline_autocompletion_util.h
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_OMNIBOX_BROWSER_INLINE_AUTOCOMPLETION_UTIL_H_ #define COMPONENTS_OMNIBOX_BROWSER_INLINE_AUTOCOMPLETION_UTIL_H_ #include <stddef.h> #i...
TOOL
0.988655
3.782012
{ "github_metadata": { "branch": "master", "commit_count": 1012846, "repo_created_at": "2021-06-11T07:45:37.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "chromium/chromium", "stars": 3023, "forks": 194, "issues": 248, "pull_requests": 6 }, "file_meta": { ...
072d52e1-1cbd-4aca-bdf1-aca0772ea459
hoafnganh/DSA
BinaryTree/DSA11003.cpp
#include<bits/stdc++.h> using namespace std; int n, pre[1001]; map<int, int> inOrder; struct Node { int data; Node *left, *right; Node (int x) { data = x; left = right = NULL; } }; int curr; Node* build(int l, int r) { if (l > r) return NULL; Node* root = new Node(pre[curr])...
ALGO
0.99999
4.329595
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-05-20T17:28:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b82a56bce...
38e3bc74-734f-40a9-87e4-30960b176c71
UH3135/-05-
PID_control/PID_control.ino
#include <Servo.h> #define PIN_LED 9 #define PIN_SERVO 10 #define PIN_IR A0 #define _DIST_TARGET 255 #define _DIST_MIN 150 #define _DIST_MAX 350 #define _DIST_ALPHA 0.36 #define _DUTY_MIN 1220 #define _DUTY_NEU 1412 #define _DUTY_MAX 1600 #define _SERVO_ANGLE 30 #define _SERVO_SPEED 750 #define _INTERVAL_D...
ALGO
0.992424
5.57735
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-12-17T14:20:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "be0f1c675e...
7a614b37-7377-4d16-84c3-fc27d09f8231
sunbeam-dac-feb25/cpp
Day08/demo09.cpp
#include <iostream> using namespace std; // template function template <typename T> void myswap(T *v1, T *v2) { T temp = *v1; *v1 = *v2; *v2 = temp; } template <typename X, typename Y> bool compare(X v1, Y v2) { if (v1 > v2) return true; return false; } int main() { char n1 = 'A'; ...
ALGO
0.999308
4.697183
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-02-25T04:36:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "42bead00d29f...
7d6f9b28-ddbe-45b6-8181-4466aad83517
DevonMorris/UavROS
catkin_ws/src/mav_utils/include/mav_trim/MavTrim.h
#pragma once #include <cmath> #include <ros/ros.h> #include <tf/tf.h> #include <tf/transform_broadcaster.h> #include <vector> #include <mav_utils/Trim.h> #include <Eigen/Dense> #include <Eigen/Geometry> #include <mav_params/MavParams.h> #include <ceres/ceres.h> #include <glog/logging.h> typedef Eigen::Matrix<f...
ALGO
0.984393
6.663022
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2018-01-10T22:59:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e8dfae9fd...
142e6a40-e4d1-42d0-a19f-d3feed49b80c
Ville383/S5_Mamba_audio_plugin
plugin/NeuralAudioPlugin/common.h
// Derived from code by jatinchowdhury18 (2020) // Licensed under the BSD 3-Clause License // https://github.com/jatinchowdhury18/RTNeural #pragma once #include "xsimd/xsimd.hpp" #include <vector> template <typename T> constexpr T ceil_div(T x, T y) { return (x + y - 1) / y; } template <typename T, std::size_t Al...
TOOL
0.913973
6.114615
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-26T08:29: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": "31567ced9781...
4f56a15d-4195-48c9-b78d-4d38116a4c68
rlj1202/problemsolving
baekjoon/5480_warship/third_succeed/main.cpp
#include <cstdio> #include <cstring> #include <algorithm> #include <functional> using namespace std; struct Warship { int x1, y1, x2, y2, weight; bool operator> (const Warship &o) const { return weight > o.weight; } }; struct Query { int coord, dir; }; const int INF = 0x3f3f3f3f; Warship warships[100005]; Quer...
ALGO
0.999914
3.768159
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2019-05-12T13:03:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da9930c6227...
c9250417-9f5b-4e78-bc62-6353e31d9f66
Chuyenan/AlgorithmFunction
utils/SegmentTree.h
// // Created by 14911 on 2023/9/12. // #ifndef C__TEST_SEGMENTTREE_H #define C__TEST_SEGMENTTREE_H #include <bits/stdc++.h> using namespace std; class SegmentTree { public: SegmentTree() = default; ~SegmentTree() = default; explicit SegmentTree(vector<int> rawTree): rawSize_(rawTree.size()), rawTree_(st...
ALGO
0.996251
5.363818
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-01-01T08:07:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cb0927a0a0...
dcaca4c2-dc02-4c14-b00b-b1169d5f90a4
f401/CTest
luogu/9019/864/t3.cc
#include <bits/stdc++.h> #define int long long const int MOD = 1e9+7, MAXN = 1e7+7; int ksm(int base, int l) { int res = 1; while (l) { if (l & 1) { res = res * base % MOD; } base = base * base % MOD; l >>= 1; } return res; } int fact[MAXN]; int inv[MAXN]; void init(int n) { fact[0] = 1; for (int ...
ALGO
0.999973
4.475592
{ "github_metadata": { "branch": "main", "commit_count": 75, "repo_created_at": "2022-12-04T05:28:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d334022308...
ed0d511f-7662-4638-97c5-d287a20218e2
checkoutb/LeetCodeCCpp
ge1000/LT1020_Number_of_Enclaves.cpp
#include "../header/myheader.h" class LT1020 { public: // D D // int count = 0, m = A.size(), n = A[0].size(); // vector<vector<bool>> v(m, vector<bool>(n, false)); // function<void(int,int)> dfs = [&](int i, int j) { // !!!!! // if (i < 0 || i >= m || j < 0 |...
ALGO
0.999917
5.211042
{ "github_metadata": { "branch": "master", "commit_count": 285, "repo_created_at": "2019-04-22T09:20:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ead9204...
ef150c03-6c1f-47a7-a03d-46129cb43729
canesche/challenge_problems
beecrowd/cpp/2059.cpp
#include <iostream> using namespace std; int main() { int p, j1, j2, r, a; cin >> p >> j1 >> j2 >> r >> a; if( p == 1 ){ // j1 escolheu par if( (j1+j2) % 2 == 0 ){ // resultado foi par if(r == 1 && a == 1) cout << "Jogador 2 ganha!" << endl; else ...
ALGO
0.999927
3.206743
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2019-01-24T13:21:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30a4eddef...
3fbf50b3-19e4-4a02-a23e-b92dbcbcf371
Warlocat/MultiDimDVR
DVR_C.h
#ifndef DVR_C_H_ #define DVR_C_H_ #include<Eigen/Dense> using namespace Eigen; /* Class for multidimensional DVR solver with complex Hamiltonian Ref: J. Chem. Phys. 96, 1982 (1992); https://doi.org/10.1063/1.462100 **** Eigen3 is required **** Parameters: NDim: Dimension num...
ALGO
0.965867
5.343128
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-10-09T17:06:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "046722577...
48c2965d-1ad2-4824-bac1-acefbe71ffe7
jmxx219/DataStructure-2020
Chap11-DS-Graph05/src/Graph.h
/* * 한국기술교육대학교 컴퓨터공학부 자료구조및실습 * @version 2020년도 2학기 * @author 김상진 * Graph.h * 인접행렬: 방향 가중치 그래프 * std::vector<std::vector<int>>를 이용하여 표현 * 삭제를 쉽게 처리하기 위해 freeIndexes 큐 사용 * 노드 이름은 std::string으로 처리 * 노드 이름과 노드가 저장되는 색인을 연결시키기 위해 map 사용 * 다익스트라 알고리즘 */ #ifndef GRAPH_H_ #define GRAPH_H_ #include <iostream> #inc...
ALGO
0.992924
5.788752
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2021-07-12T12:52:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "702afdd8403...
560ae427-7a2c-4d43-b082-15c5bfd2c5e0
OliverWayne007/CPP_Codes
olliePS-161.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define MAX 1000000000 #define flash() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); int main() { flash(); ll t; cin >> t; for(ll i = 1 ; i <= t ; i++) { ll n; cin >> n; ...
ALGO
0.999937
3.8843
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-10-01T02:30:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "28b0dc0115b2...
3c6347a4-eefe-469f-a39f-2997d0f98eec
yzcode/CG-lab
lab1/Loader-inl.h
#pragma once #include "Frame-inl.h" #include "MatrixOp-inl.h" #include "SystemDS.h" #include <GLUT/glut.h> #include <array> #include <cassert> #include <fstream> #include <glog/logging.h> #include <iostream> #include <sstream> #include <string> #include <unordered_map> #include <vector> using namespace std; // const...
TOOL
0.935278
5.620996
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2017-09-11T19: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": "5ea29c99e...
03ffe324-705c-4292-b5b4-690469e5773c
tmirwin/IrwinTimothy_CSC5_40108
Homework/Assignment_1/Assignment_1/Gaddis_8thED_Chap2_Prob8_TotalPurchase/main.cpp
/* File: main.cpp Author: <NAME> Created on January 6, 2017, 2:45 PM Purpose: Calculate total purchase amount with sales tax. */ //System Libraries #include <iostream> using namespace std; //User Libraries //Global Constants //Such as PI, Vc, -> Math/Science values //as well as conversions from system o...
ALGO
0.984966
4.304084
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2017-01-09T04:39:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e96e7504a...
63567647-b795-423f-95ed-d815cfed072a
Youhoseong/algorithm-yhs
2021-09/BOJ1920.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int N, M; vector<int> A; vector<int> findInt; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cin >> N; for (int i = 0; i < N; i++) { int temp; cin >> temp; A.push_back(temp); } ...
ALGO
0.999996
4.374031
{ "github_metadata": { "branch": "main", "commit_count": 192, "repo_created_at": "2020-12-22T20:25:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "31b460c210...
ce99f6c2-fa21-4bb4-9d1c-4efa46c4252e
brokeitguyio/Programming-Languages-Examples
cpp/vigenreApp.cpp
#include <iostream> using namespace std; string vigenere(string plaintext, string key,bool EndcDec); int main(){ string plainText; string cipherText; string key; do{ cout<<"==============================="<<endl; cout<<"Encryption & Decrptyion station"<<endl; coutendl<<"=================...
ALGO
0.99916
3.322899
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-04-18T20:00: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": "543fbf210adf...
61ba75e6-20ae-4427-b6f3-8b296946cea2
Lacri005/algoCpp
algoCpp/graph.cpp
#include "graph.h" GraphAdjMat::GraphAdjMat(const std::vector<int>& vertices, const std::vector<std::vector<int>>& edges) { for (int val : vertices)//添加顶点 { addVertex(val); } for (std::vector<int> edge: edges)//添加边 { addEdge(edge[0], edge[1]); } } /*添加顶点*/ void GraphAdjMat::addVertex(int val) { int n = si...
ALGO
0.991423
4.309467
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-08-02T06:09:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f32ff66fe658...
74cedb69-1774-494e-bc4f-03d9f7d9d113
SBidaibek/acm
vkCup/round2/a.cpp
#include <bits/stdc++.h> using namespace std; #define forn(i, x, n) for (int i = int(x); i <= int(n); ++i) #define for1(i, n, x) for (int i = int(n); i >= int(x); --i) #define F first #define S second #define pb push_back typedef long long ll; typedef pair <int, int> pii; typedef long double ld; typedef vector <ll> ...
ALGO
0.999966
4.027095
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-02-13T16:09:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1dbcd88494...
78d2c204-27dd-4c75-afa9-a822534f5bf5
AkashSingh3031/The-Complete-FAANG-Preparation
1]. DSA + CP/2]. Competitive Programming/12]. CodeChef/3]. Compete/3]. Lunch Time/Div 3/june/Richie Rich.cpp
/* Solution by <NAME> *********************************************************** Chef aims to be the richest person in Chefland by his new restaurant franchise. Currently, his assets are worth A billion dollars and have no liabilities. He aims to increase his assets by X billion dollars per year. Al...
ALGO
0.999847
4.170603
{ "github_metadata": { "branch": "master", "commit_count": 1827, "repo_created_at": "2021-05-29T04:41:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11343, "forks": 2526, "issues": 3, "pull_requests": 2 }, "file_meta": { "content_id": "...
f956c2b7-37df-4806-a0b8-aa3f519e9e57
YEAjiJUNG/AlgorithmPractice
Baekjoon/4153.cpp
#include <iostream> using namespace std; int main() { long long x[3] = {-1, -1, -1}, y[3]; long long max_res; while(1) { for(int i = 0; i < 3; i++) { cin >> x[i]; y[i] = x[i] * x[i]; } if(x[0] == 0) break; max_res = max...
ALGO
0.999906
3.146207
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2020-09-07T11:11:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1308d0437...
fbcbd459-fd66-48b2-933f-061fb7ca579e
2019331043-Zakaria/Codes
CB/C_1_Make_Nonzero_Sum_easy_version.cpp
/* * @Author: Zakaria * @Date: 2022-10-23 14:47:39 * @Last Modified time: 2022-10-25 11:11:16 */ #include <bits/stdc++.h> #define pb push_back #define f first #define s second #define pi acos(-1.0) #define LCM(a,b) a*b/__gcd(a,b) #define GCD(a,b) __gcd(a,b) #define ...
ALGO
0.996219
3.732508
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-05-09T16:22: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": "76bdebc56cdf...
a6d65de5-6955-42b3-a8d0-60f6687f63b9
Centauria/CodeCraft2023-CTSU
collision.cpp
// // Created by <NAME> on 2023/3/25. // #include "collision.h" #include "function.h" #include <algorithm> Trace::Trace(Point start, double t_start, Point end, double t_end) { this->start = start; this->t_start = t_start; this->end = end; this->t_end = t_end; } double Trace::operator*(const Trace &tr...
ALGO
0.99229
4.528795
{ "github_metadata": { "branch": "main", "commit_count": 259, "repo_created_at": "2023-03-09T13:21:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a567724cc3...
39d5bf56-25ef-480a-aa20-aa8d5473d342
stonne-simulator/stonne
pytorch-frontend/caffe2/operators/pool_gradient_op.cc
#include "caffe2/operators/pool_op.h" #include <string> #include "caffe2/utils/eigen_utils.h" namespace caffe2 { namespace { template <typename T, StorageOrder kOrder> void ComputeAveragePoolGradient1D( int l, int r, int y, T scale, const ConstEigenArrayMap<T>& dY_arr, EigenArrayMap<T>* dX_...
TOOL
0.911863
7.25865
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2020-12-01T17:24:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 134, "forks": 30, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "29df0e...
bb50781f-b11c-4300-9e7c-26c18cc427fa
singhkrishna01/Leetcode-Problem-Solutions
1763-longest-nice-substring/1763-longest-nice-substring.cpp
class Solution { public: bool check(string s){ vector<int> t1(26, 0), t2(26, 0); for(int i=0; i<s.length(); i++) if(s[i] >= 'a' && s[i] <= 'z') t1[s[i] - 'a']++; for(int i=0; i<s.length(); i++) if(s[i] >= 'A' && s[i] <= 'Z') t2[s[i] - 'A']++; for(int i=0; i<26; i++){ ...
ALGO
0.99997
5.516651
{ "github_metadata": { "branch": "main", "commit_count": 2057, "repo_created_at": "2024-02-29T05:44:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6bafdc0a...
7a3472e0-6410-456c-995d-ca916aa52983
pkuxxy/LeetCode
leetcode_forthtime/Minimum Window Substring.cpp
class Solution { public: string minWindow(string S, string T) { // Start typing your C/C++ solution below // DO NOT write int main() function int lens = S.size(); int lent = T.size(); vector<int> needFind(256, 0); vector<int> hasFound(256, 0); for(int i = 0; i...
ALGO
0.999991
6.224335
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2013-08-04T00: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": "ffd3360982...
c0f5b83a-b9c9-4b74-af7b-7e4bf61d1973
sanjaysajnani/Programming-Projects-
C++ Projects/Priority_CPU_Scheduling/Priority_CPU_Scheduling/Priority_CPU_Scheduling.cpp
#include <iostream> #include <Windows.h> using namespace std; class Pqueue { private: struct { int process_no = 0; int arrival_time = 0; int burst_time = 0; int priority = 0; double waiting_time = 0; int service_time = 0; }process[10]; // struct containing variables for priority queue array int front; ...
ALGO
0.999936
4.010659
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-02-18T07:58: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": "b1473501f50b...
11e8a46a-0c1b-489f-89ff-fc29b7a7b6f9
Kitware/VTK
Imaging/Hybrid/vtkImageRectilinearWipe.h
// SPDX-FileCopyrightText: Copyright (c) <NAME>, <NAME>, <NAME> // SPDX-License-Identifier: BSD-3-Clause /** * @class vtkImageRectilinearWipe * @brief make a rectilinear combination of two images. * * vtkImageRectilinearWipe makes a rectilinear combination of two * images. The two input images must correspond ...
TOOL
0.966953
7.057685
{ "github_metadata": { "branch": "master", "commit_count": 94968, "repo_created_at": "2010-04-27T15:12:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2910, "forks": 1246, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1...
91ff1a08-660a-42d6-a366-5345ae69f27f
pau1o-hs/Network-chat
src/server.cpp
#include <iostream> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/time.h> #include <netdb.h> #include <arpa/inet.h> #include <string> #include <string.h> #include <vector> #include <set> #include <algorithm> using namespace std; #define MAX_CLIENTS 30 const string SERVER_WELCOME = "...
WEB
0.913635
3.004364
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2020-04-23T14:02:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa50bc9d2...
c4099cbf-e880-45bd-8415-e6e8af8b33c3
abhiraialld/main
no_of_twos.cpp
// no_of_twos.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> int count_twos(int n) { if (n < 2) { return 0; } int n_factor = 10; int no_of_twos_full = 0; int no_of_twos_yet = 0; while ((n_factor/10) <= n) { ...
ALGO
0.99954
6.372194
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-04-11T05:07:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7148df987b7...
38d40e43-6b47-4292-ae1e-dd0f16ff5128
rv64m/csapp-with-cplusplus
src/0x02/homework/2.73.cc
#include <cassert> #include <limits> int saturating_add(int x, int y) { // 0xffffffff int mask = std::numeric_limits<int>::min(); // calculation sum int sum = x + y; // x > 0 is replaced by !(x & mask) // y > 0 is replaced by !(y & mask) // s < 0 is replaced by (s & mask) // if this is true for all co...
TEST
0.981555
6.310698
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2021-06-26T15:29:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00f6dffe7...
7d0c3f26-66b5-44c8-9523-0535ba5612a8
rafaelbazolli/LP-FATEC
Capitulo 8/Exercicio_07.cpp
#include <stdio.h> #include <math.h> int main() { float matriz[4][3], novaMatriz[4][3]; int i, j; // Recebendo os dados na matriz principal for(i = 0; i < 4; i++) { for(j = 0; j < 3; j++) { printf("Digite o elemento na posicao [%d][%d]: ", i, j); scanf("%f", &matriz[i][...
ALGO
0.998667
3.58728
{ "github_metadata": { "branch": "main", "commit_count": 112, "repo_created_at": "2023-02-28T22:20:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b71a7681e...
cad9f024-7843-480e-a75a-ac6de2110b53
SigurdHuse/CodeForces
Comp/787 (Div. 3)/B. Make It Increasing.cpp
#include <bits/stdc++.h> #define REP(i,n) for(int i = 0; i< (n);i++) #define all(x) (x).begin(), (x).end() typedef long long ll; using namespace std; vector<ll> two(40); void fill(){ two[0] = 1; for(int i = 1; i< 40;++i){ two[i] = two[i-1]*2; } } void solve(){ int n, ans = 0; cin >> n; vector<ll> v(n); fo...
ALGO
0.99979
3.816667
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2022-01-29T11:49: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": "6aedbfa53eb...
aa422dbd-e4d8-42bf-8135-0a5683a2e730
Danilepez/Algoritmica
problemas/estructura_de_datos/C.cpp
#include<bits/stdc++.h> // Incluir todas las bibliotecas estándar necesarias using namespace std; #define input freopen("in.txt","r",stdin) // Redirigir la entrada estándar desde un archivo #define output freopen("out.txt","w",stdout) // Redirigir la salida estándar a un archivo int main() { input; // Redirigir ...
ALGO
0.999965
4.043525
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-03-28T05:10: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": "96042a84122...
0770f1dd-9f27-46b5-87b9-8a86665b5240
tyrskytaimen/ohj2
student/06/network/main.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> #include <map> const std::string HELP_TEXT = "S = store id1 i2\nP = print id\n" "C = count id\nD = depth id\n"; std::vector<std::string> split(const std::string& s, const char delimiter, bool ignore_empty = false...
ALGO
0.97372
4.13277
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-02-16T16:25:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65d5bd6e4066...
9b9afa9f-2b98-475a-8f4a-32f402015291
wgryglas/SEM
src/include/fieldMath/ddt.h
#ifndef _ddt_H_ #define _ddt_H_ #include <vector> #include <boost/smart_ptr/make_shared.hpp> #include "fields/GeometricField.h" #include "iomanagment/InfoStream.h" #include "iomanagment/case.h" #include "solver/DiscretOperator.h" #include "solver/DiscretEquation.h" #include "TimeDerivativeDiscreteOperator.h" names...
ALGO
0.929466
3.961093
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2015-05-20T10:34:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "77eeba420...
0f0bbab5-2d21-47ae-adcf-0b24cb074ac1
ishandutta2007/codeforces-d
dmitry_egorov/normal/452/A.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <cassert> #include <ctime> #include <cmath> #include <algorithm> #include <string> #include <vector> #include <deque> #include <queue> #include <list> #include <set> #include <map> #include <iostream> #define pb push_back #define mp make_pair #define TAS...
ALGO
0.999462
3.123868
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "602ac27a6161...
b8c20198-e353-4206-a41a-04c333d2e676
RosettaCommons/rosetta
source/src/core/pack/guidance_scoreterms/lk_dome/LK_DomePackEnergy.hh
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the co...
TOOL
0.997774
6.602262
{ "github_metadata": { "branch": "main", "commit_count": 11737, "repo_created_at": "2023-11-17T16:42:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 296, "forks": 100, "issues": 27, "pull_requests": 9 }, "file_meta": { "content_id": "e385...
5317eebe-9551-42ce-8b69-6d9865134a6f
SifatAhmed28/Solution-for-Codeforces-Problem
A_Fox_and_Number_game.cpp
#include <bits/stdc++.h> using namespace std; // Function to compute GCD using the Euclidean algorithm int gcd(int a, int b) { if (b == 0) return a; return gcd(b, a % b); // Recursive call to compute GCD } int main() { int n; cin >> n; // Input the number of elements // Dynamically a...
ALGO
0.99998
5.831455
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2024-07-16T11:21: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": "a98187cb759...
874afb3b-c984-4c66-8b01-325b79b2008b
phrock/acm
lib/min_circle.cpp
// g is adjacency matrix, return mininum circle. int min_circle(const vector< vector<int> > &g) { vector< vector<int> > dist = g; int res = INT_MAX; int n = (int)(g).size(); for (int k = 0; k < n; ++k) { for (int i = 0; i < k; ++i) for (int j = 0; j < i; ++j) if (dist...
ALGO
0.999692
4.262235
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2011-05-15T15:22:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dce71411c...
05ed5fc3-ffc9-4406-9df4-c7a1c9ad009e
asg0451/nbo
src/simulation.cpp
#include "simulation.h" #include <algorithm> #include <iterator> // naive & shitty, n^2 in space & time void Simulation::tick() { // apply velocities for (auto &p : space.planets) { p.loc += p.vel * dt; } // build acceleration map // small so use array auto accels = std::make_unique<Vec2<double>[]>(s...
ALGO
0.999428
4.961089
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2020-04-29T05:19:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "af83dd5cb...
d01ca1f0-bef8-452e-8e73-ab9c13dcc0ac
ChrisKimZHT/Algorithm-Problems
Contest/Other/HRBUST 2021/G.cpp
#include <bits/stdc++.h> using namespace std; int main(void) { int t; cin >> t; while (t--) { int xA, yA, xB, yB, xP, yP; cin >> xA >> yA >> xB >> yB >> xP >> yP; if (xA != xB && yA != yB) { cout << abs(xA - xB) + abs(yA - yB); } else if (xA == xB && ((xP > xA && xP < xB) || (xP < xA && xP > xB)) |...
ALGO
0.999603
4.669502
{ "github_metadata": { "branch": "master", "commit_count": 366, "repo_created_at": "2022-03-26T17:03:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "339f49bb...
7d7acba3-9442-4f02-9ec9-6bea70f8dbd5
MateenAminian/Horizon-Mapping
TerathonCode/TSMatrix4D.h
// // This file is part of the Terathon Math Library, by <NAME>. // Copyright 1999-2022, Terathon Software LLC // // This software is licensed under the GNU General Public License version 3. // Separate proprietary licenses are available from Terathon Software. // // THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY O...
TOOL
0.972512
5.886528
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-06-08T20:15:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3405a3983a4b...
d3b092b3-b27c-41e6-9858-8224d5336495
fanfank/leetcode
balanced-binary-tree.cpp
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: bool isBalanced(TreeNode *root) { // Note: The Solution object is instantiated only once and is...
ALGO
0.999931
5.844844
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2013-11-02T16:32:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 171, "forks": 95, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "332355...
22f74729-a0ee-4b9a-9938-83c299e4db50
fullsaildevelopment/AE-Sports
Extinguish/Extinguish/EDMesh.h
#pragma once #include "../ShaderStructures/ShaderStructures.h" #include "vec3.h" #include <vector> struct ED2Vertex { vec3f pos; vec3f norm; float u; float v; bool operator==(const ED2Vertex& vert)const { return (vert.pos.x == pos.x && vert.pos.y == pos.y && vert.pos.z == pos.z && vert.norm.x == norm.x &&...
TOOL
0.960052
6.215479
{ "github_metadata": { "branch": "master", "commit_count": 2817, "repo_created_at": "2017-01-04T14:05:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db5e3007...
4ae22c97-e1e4-4dc6-983d-6466e900113a
xdtianyu/android-5.0.0_r5
frameworks/base/libs/hwui/SpotShadow.cpp
/* * Copyright (C) 2014 The Android Open Source Project * * 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 app...
ALGO
0.999528
3.696957
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2014-11-13T07:07:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f59046e...
03a08b54-76f7-45d9-8df2-4b4d847dd299
giriraj1995/CompetitiveCoding
DS & Algorithms/Arrays/LargestNumber/LargestNumber/main.cpp
// // main.cpp // LargestNumber // // Created by <NAME> on 30/11/20. // Copyright © 2020 <NAME>. All rights reserved. // #include <iostream> #include <cmath> #include <vector> #include <map> #include <unordered_map> #include <stack> #include <set> #include <queue> using namespace std; bool compare(string a, strin...
ALGO
0.999855
5.398375
{ "github_metadata": { "branch": "master", "commit_count": 791, "repo_created_at": "2020-08-04T11:52:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f1d57f7...
7cbc5091-b7cb-4acc-a999-9d290af002d5
icl-utk-edu/magma
sparse/src/zfgmres.cpp
/* -- MAGMA (version 2.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date @author <NAME> @precisions normal z -> s d c */ #include "magmasparse_internal.h" #define PRECISION_z /* #define q(i) (q.dval + (i)*dofs) #defin...
ALGO
0.999683
4.912035
{ "github_metadata": { "branch": "master", "commit_count": 8870, "repo_created_at": "2023-04-05T15:59:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 63, "forks": 29, "issues": 10, "pull_requests": 1 }, "file_meta": { "content_id": "05189...
38bcabeb-a2e0-404d-940e-fe3a81637e95
ElementAyush/Code
Implementation/LCS/LCS_Recursion.cpp
#include<bits/stdc++.h> using namespace std ; int LCS(string s1 , int lens1, string s2 , int lens2) { if(lens1 == 0 || lens2 == 0) return 0 ; if(s1[lens1 - 1] == s2[lens2 - 1]) return 1 + LCS(s1 , lens1 - 1 , s2 , lens2 - 1) ; if(s1[lens1 - 1] != s2[lens2 - 1]) return max(LCS(s1 , lens1 , s2 , lens2 - ...
ALGO
0.999755
4.130336
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2017-09-14T04:37:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9fc34cfef...
2e6da193-687d-4e49-95e5-e0d652b95eb0
Tonmoy404/Codes
knapsack--DP.cpp
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define db double #define ull unsigned long long #define MIN INT_MIN #define MAX INT_MAX #define all(x) (x).begin(), (x).end() #def...
ALGO
0.999895
3.87289
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2021-05-23T06:02:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c3369b5ea1f...
340559a0-ce65-4714-b09f-05b3628a33d3
MootezSaaD/cs404-tic-tac-toe
client_cpp/ttt-client/Board/Board.cpp
#include "Board.hpp" #include "bits/stdc++.h" using namespace std; Board::Board() { fill(*board, *board + MAX_ROWS * MAX_COLS, ' '); } void Board::setGameEnded(bool ge) { gameEnded = ge; } bool Board::getGameEnded() { return gameEnded; } void Board::setPlayerWon(int p) { playerWon = p; } int Board...
TOOL
0.994236
4.878207
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2021-01-12T08:05: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": "2cbc3b7b0de...
fd37c7e4-39c5-4b3f-b200-ba694ed8cadc
nnisshaantt/DSA
Searching/BinarySearch.cpp
#include <iostream> //Iterative Approach int BinarySearchItr(int arr[],int n, int data){ int low = 0; int high = n-1; while(low <= high){ int mid = low + (high - low)/2; if(arr[mid] == data){ return mid; }else if(arr[mid] > data){ high = mid - 1; }else low = mid + 1; } return -1;...
ALGO
0.999997
5.755301
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-05-03T17:38: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": "29310c2d0c89...
f0a79fc2-c717-49e7-aa56-657e694d6301
aruaru0/cpp-myatcoder
ABC/395/e.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using ll = long long; using P = pair<ll, int>; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int n, m, x; cin >> n >> m >> x; vector<vector<P>> a(n * 2); rep(i, n) { a[i].push_back(P(i + n, x)); ...
ALGO
0.99992
4.15837
{ "github_metadata": { "branch": "main", "commit_count": 468, "repo_created_at": "2024-03-16T00:42:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d9b102ccd0...
1f4bef9c-7ff5-4e53-abd9-df43939547b6
atubo/online-judge
luogu/P2814.cpp
// https://www.luogu.org/problem/show?pid=2814 // 家谱(gen) #include <bits/stdc++.h> using namespace std; class UnionFind { private: const int N; vector<int> parent; void makeSet(int k) { assert(0 <= k && k < N); parent[k] = k; } void link(int u, int v) { parent[u] = v; ...
ALGO
0.999843
4.245386
{ "github_metadata": { "branch": "master", "commit_count": 2295, "repo_created_at": "2013-10-03T04:23:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0db6263...
a7697ca6-de55-4404-88f8-ef3fbed02735
tashi-2004/Object-Oriented-Programming-OOP
Assignments Solutions/2) Assignment 2(2)/Solutions/i22-2041_Q3_2_C.cpp
/* <NAME> i22041 OOP-C Assignment 2 */ #include<iostream> #include"Pulley.cpp" using namespace std; int main() { double r, L, T; cout << "Enter the initial radius of the pulley: "; cin >> r; cout << "Enter the length of the rope: "; cin >> L; cout << "Enter the thickness of the rope: "; cin ...
ALGO
0.99475
4.75023
{ "github_metadata": { "branch": "main", "commit_count": 142, "repo_created_at": "2023-09-12T11:32: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": "c108a7e064...
4c803a06-915f-49ab-b7e7-bc5a8f905643
QbitQuantum/Basics
Исходники/AASBuild_gravity.cpp
void idAASBuild::GravSubdivLeafNode( idBrushBSPNode *node ) { int s1, s2, i, j, k, side1; int numSplits, numSplitters; idBrushBSPPortal *p1, *p2; idWinding *w1, *w2; idVec3 normal; idPlane plane; idPlaneSet planeList; float d, min, max; int *splitterOrder; int *bestNumSplits; int floor, gap, numFloorChecked;...
ALGO
0.976951
5.762853
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2024-03-06T07:05:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35cefebebf0...
d8574427-81a6-4e3d-9ecb-7aabd3435dcf
Rado0297/repo
OOP_Nora/hw.cpp
#include<iostream> #include<cstring> using namespace std; const int NUM = 300; class Stack { public: Stack(); // конструктор по подразбиране void push(const char&); // включва елемент в стек void pop(); // изключва елемент от стек bool empty() const; // проверява дали стек е празен bool full(...
ALGO
0.999814
3.526616
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2017-06-12T18:11:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 9 }, "file_meta": { "content_id": "82ef4917b...
958850f0-7de3-4fd0-bb1f-cf52ca72bae4
18616378431/myCode
CPP/C++Primer Plus/15.12/error5.cpp
//15.12 unwinding stack #include <iostream> #include <cmath> #include <cstring> #include "exc_mean.h" using namespace std; class demo { private: char word[40]; public: demo(const char * str) { strcpy(word,str); cout << "demo " << word << " created\n"; } ~demo() { cout << "demo " << word << " destroyed\n"...
ALGO
0.907177
4.054633
{ "github_metadata": { "branch": "master", "commit_count": 336, "repo_created_at": "2015-08-03T03:26:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 21 }, "file_meta": { "content_id": "6098627...
79d18317-7717-4ec2-b662-10365821a202
neha089/DSA
Array/missing num.cpp
#include <iostream> using namespace std; #include <bits/stdc++.h> // int main(){ // int i=0; // int n; // cin>>n; // int a[n]; // for(int i=0;i<n-1;i++){ // cin>>a[i]; // } // sort(a,a+n); // for(i=0;i<n-1;i++){ // if(a[i]+1!=a[i+1]){ // cout<<"MISSING NUM I...
ALGO
0.999905
3.417093
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-08-19T18:09: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": "7c73732496...
f2ef42c5-9fac-41f1-83a9-2d1e700a2e7a
tensorflow/tensorflow
tensorflow/lite/tools/command_line_flags.cc
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. 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 agre...
TOOL
0.9847
7.646055
{ "github_metadata": { "branch": "master", "commit_count": 182413, "repo_created_at": "2015-11-07T01:19:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 190773, "forks": 74758, "issues": 873, "pull_requests": 553 }, "file_meta": { "content...
1bc0c693-6d7b-4ff2-a58c-086a72d5693f
EPfaehler/RaCat
Code/greyLevelDiscretization.cpp
//#include "greyLevelDiscretization.h" // //#include <iostream> //using namespace std; // //template <typename T> //class rounding //{ //public: // rounding(void) : // _roundRes(0) // { // } // // const T& result(void) const // { // return _roundRes; // } // // void operat...
ALGO
0.986994
3.387387
{ "github_metadata": { "branch": "master", "commit_count": 112, "repo_created_at": "2018-12-18T09:36:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 7, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "0256eaf...
8dde5858-1587-4400-b6ec-55692ee59c49
StanfordLegion/legion
examples/attach_array_daxpy/attach_array_daxpy.cc
/* Copyright 2024 Stanford University, Los Alamos National Laboratory * * 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 req...
TOOL
0.953593
5.547603
{ "github_metadata": { "branch": "stable", "commit_count": 24820, "repo_created_at": "2012-11-17T00:43:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 731, "forks": 152, "issues": 313, "pull_requests": 16 }, "file_meta": { "content_id": "...
48ba5626-c17b-44b9-8e23-df9686516c13
polossk/Code-Archive
UVa/01. Problem Set Volumes (100...1999)/Volume 01 - 03 (100 - 399)/uva253.cpp
/**** *@PoloShen *Title:UVa 253 */ #include <iostream> #include <cstdio> #include <string> using namespace std; struct cube{ char number[7]; cube(){ for (int i = 0; i < 6; ++i) number[i] = 0; } void rot_r(){ char temp[6]; for (int i = 0; i < 6; ++i) temp[i] = number[i]; ...
ALGO
0.999876
3.878003
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2014-08-03T14:23:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0be8dd20a...
4c9afbbd-517b-4311-956e-28da245e68aa
A-Saadat/Algorithm
Codeforces/ProblemSet/520A.cpp
#include <bits/stdc++.h> using namespace std; #define intl long long int int main (void) { intl n; cin >> n; bool isAvail[100]; for(intl i = 1; i <= 26; i++) isAvail[i] = false; char letter; for(intl i = 0; i < n; i++){ intl j = 0; cin >> letter; if(le...
ALGO
0.999927
4.094429
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2022-03-09T13:21:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2de19ecafe...
e9ad20ca-a198-4214-85ac-6e0d981b00bb
DandyForever/FiducciaMatteyses
fiducciaMatteyses.cpp
#include "fiducciaMatteyses.h" void applyMove (GainContainer& gc, Partitions& partitionment, const pair <size_t, int>& best_move) { for (size_t i = 0; i < partitionment.hg_->verts[best_move.first].size(); i++) { size_t edge_id = partitionment.hg_->verts[best_move.first][i]; bool is_no_vert_in_dst ...
ALGO
0.999408
5.287034
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-03-31T00:09: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": "858601674375...
6edaa180-c8dc-4377-a101-e143dc71ae35
101magikarp101/USACO
cses/range-queries/pizzeria-queries.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define MOD 998244353 #define MOD2 1000000007 #define vt vector template <class T> using vvt = vt<vt<T>>; template <class T> using vvvt = vt<vvt<T>>; template <class T> using vvvvt = vt<vvvt<T>>; #define endl '\n' #define pb push_back #define pf push_f...
ALGO
0.999899
4.505386
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2024-09-25T15:08: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": "6abf98aa694...
2dc3328c-b467-4a63-964f-4b931b74946f
JunBinLiang/OI
后缀数组/CF-452E(suffix+uf+2400).cpp
#include <iostream> #include <vector> #include <string> #include <iostream> #include <vector> #include <map> #include <set> #include <queue> #include <cstring> #include <algorithm> #include <cmath> using namespace std; using ll = long long; using ull = unsigned long long; #define FOR(i, a, b) for (int i = a; i < b; ...
ALGO
0.999989
3.468442
{ "github_metadata": { "branch": "main", "commit_count": 780, "repo_created_at": "2022-07-07T05:53:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab49aa1727...
3e5d12ec-4722-4bff-9d79-1a0ae04baaf5
cmeslo/leetcode
solution/2196. Create Binary Tree From Descriptions/2196_02.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.999974
6.648099
{ "github_metadata": { "branch": "master", "commit_count": 3508, "repo_created_at": "2017-07-08T14:09:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "deafac8...
b81e8195-7a80-4532-a08f-f7db781fd811
tanishajn12/DSA_CPP_Apr2023
Arrays/minimumelement_in_sortedrotatedarray2.cpp
#include <iostream> using namespace std; //Time complexity : O(log N) Space complexity : O(1) //Binary Search Algorithm int findMin(int arr[], int low, int high){ if (high < low) { return arr[0]; } // If there is only one element left if (high == low) { return arr[low]; } int mid = low + (high - low...
ALGO
0.999943
4.447497
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-09-08T05:36:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6b36279b2aab...
1587ed6c-be2a-4b10-a1e3-f8826ffa2422
YerangPark/ProblemSolving
BOJ/2665.cpp
#include <iostream> #include <algorithm> #include <vector> #include <tuple> using namespace std; char mat[51][51]; bool visit[51][51]; int n, m; int axisY[4]={-1, 1, 0, 0}; int axisX[4]={0, 0, -1, 1}; bool cmp(tuple<int, pair<int, int>> a, tuple<int, pair<int, int>> b){ if(get<0>(a) > get<0>(b)) return true...
ALGO
0.999979
3.911776
{ "github_metadata": { "branch": "main", "commit_count": 209, "repo_created_at": "2021-02-21T15:50:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "18feac9e63...
a2e41e94-520d-4666-a800-8ee9cb1aee6e
dangbach3107/PTIT_Data_Structure_and_Agorithm
DSA01026 - PHÁT LỘC.cpp
#include <bits/stdc++.h> #define f0(i, a) for(int i = 0; i < a; i++) #define f1(i, a) for(int i = 1; i <= a; i++) #define read freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #define ll long long using namespace std; bool check(string s){ if (s[0] == '8' && s.back() == '6' && s.find("88") ==...
ALGO
0.999111
3.852439
{ "github_metadata": { "branch": "main", "commit_count": 415, "repo_created_at": "2024-05-27T15:56:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6315011f7...
d463c6e5-cfba-49eb-9989-841687cc492e
blackcat1995com/CATOJ_DATA
1-1000/401-450/428-细胞/P428.cpp
#include <iostream> #include <cstdio> #include <queue> using namespace std; struct Node{ int x; int y; }; int np[4][2] = { {0, 1}, {1, 0}, {0, -1}, {-1, 0} }; char s[101]; int a[101][101]; bool book[101][101]; int n, m; int ans = 0; void bfs(int x, int y); int main() { // f...
ALGO
0.999613
3.117759
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2021-11-23T02:31:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b71b55f8...
c28a7aaa-9781-4c3c-b372-21ef24009b22
GregoryBolshakov/Game
Source/TopDownTemp/Private/BPFunctionLibraries/MActorSorter.h
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Kismet/BlueprintFunctionLibrary.h" #include "MActorSorter.generated.h" /** BP function library for sorting actors by certain criteria */ UCLASS() class UMActorSorter : public UBlueprintFunct...
ALGO
0.998464
7.726331
{ "github_metadata": { "branch": "main", "commit_count": 337, "repo_created_at": "2022-12-26T13:21:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9485cb9c2d...
cf969351-ca66-43c3-b78a-c26ce1ce40ba
LYuri26/AulasC-CPP
exercicios/Lista 3/paridade.cpp
#include <iostream> // Inclui a biblioteca para entrada e saída de dados using namespace std; int main() { int numero; // Variável para armazenar o número fornecido pelo usuário // Solicita ao usuário que insira um número inteiro cout << "Digite um numero inteiro: "; cin >> numero; // Lê o número for...
ALGO
0.992477
4.588348
{ "github_metadata": { "branch": "main", "commit_count": 82, "repo_created_at": "2023-08-04T19:08:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "320d6510c03...
4a63c21b-c45d-4e3b-8c90-12ea73f147b5
GSGFs7/algorithm
codeforces/2027C Add Zeros.cpp
#include <bits/stdc++.h> using namespace std; /* * 给出一个数组 可以选择一个 a[i]==len(a)+1-i 的位置在数组后面加上 i-1 个0 * 问最大的数组长度 * * 因为能够符合 a[i]==len(a)+1-i 的位置最多只能使用一次 * 也就是说 len(a)+=i-1 后这个点就用不到了 需要另外找其他的点 * 那么也就是说需要在数组中找到其他的点来接力 看接力能抵达的最大长度 * 因为len(a)是一个一直在变化的量 不方便计算 重新写一下式子 * a[i]=len(a)+1-i 可以写成 len(a)=a[i]+i-1 也就是a[i]加上从...
ALGO
0.999873
4.370243
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2024-08-28T14:53:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b2db5cbca8b...
521fe1da-de32-4720-96df-84d666fea86b
manish3749/spoj-solution
BISHOPS.cpp
#include<iostream> using namespace std; #include<string> #define MAX 1000 void MULTIPLY(int arr1[],int l); int main() { int t=1024; while(t--) { string str; cin>>str; int l=str.length(); int arr[l]; for(int i=0;i<l;i++) arr[i]=str[i]-48; if((l=...
ALGO
0.999977
3.794197
{ "github_metadata": { "branch": "master", "commit_count": 119, "repo_created_at": "2016-10-15T21:15:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f4494a0...
c181aae9-90cd-42ef-a33b-cc6c43ec10a1
bbw7561135/jetshow
src/VField.cpp
#include <math.h> #include <Eigen/Eigen> #include <utils.h> #include "VField.h" #include <CGAL/Simple_cartesian.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Delaunay_triangulation_2.h> #include <CGAL/Triangulation_vertex_base_with_info_2.h> #include <CGAL/Interpolation_traits_2.h>...
ALGO
0.990501
4.780678
{ "github_metadata": { "branch": "master", "commit_count": 310, "repo_created_at": "2019-06-26T10:27: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": "f1e92b17...
026636ba-6f25-4068-a77f-08ecb2b29e09
Hubi0295/ZaawansowaneProgramowanieOOP-CPP-Studia-
lab3/Array.h
// // Created by Hubert on 21.10.2024. // #ifndef ARRAY_H #define ARRAY_H #include <iostream> #include "stdio.h" using namespace std; template <typename T> class Array { private: T *dane; int maxSize; int index; public: Array() { maxSize = 10; index = 0; dane = new T[10]; }...
TOOL
0.98987
4.50817
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2024-10-07T11:09:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "019d178de...
428a612b-9316-4cc9-9d72-999b1ec78bf7
vermakriti/Leetcode
Dynamic Programming/Unbounded Knapsack Variant/Coin Change 2/program.cpp
/* You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money. Return the number of combinations that make up that amount. If that amount of money cannot be made up by any combination of the coins, return 0. You may assume that you ha...
ALGO
0.999994
5.825387
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2021-08-30T13:20: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": "9bd457158...
e0a0f24c-8260-4b90-93a6-366cb41e7157
rashadalsharpini/Competitive-Programming
Codeforces/Codeforces Round 1026 (Div. 2)/A. Fashionable Array.cpp
// ﷽ // Contest: Codeforces Round 1026 (Div. 2) // Judge: Codeforces // URL: https://codeforces.com/contest/2110/problem/A // Memory Limit: 256 // Time Limit: 1000 // Start: Sat 24 May 2025 05:45:05 PM EEST // #include <bits/stdc++.h> #include <climits> using namespace std; #ifdef Rashad #include "debug.hpp" #else #def...
ALGO
0.999462
4.756598
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2024-08-08T12:42: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": "de0de1761...
7e3f6853-069d-4442-a042-42cd095c8bf5
qingshi163/leetcode_cpp
src/coin_change2.cpp
#include "../inc.hpp" class LC_CoinChange2 { public: int change(int amount, vector<int>& coins) { if (amount == 0) return 1; sort(coins.begin(), coins.end()); unordered_map<uint64_t,int> dp; return helper(amount, coins, coins.size(), dp); } int helper(int amount, vector<int>...
ALGO
0.999733
5.97286
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2020-06-10T07:13: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": "d322e8772...
c7b7ab02-e91a-4162-9617-5b6251d3b5d4
dfelinto/blender
source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc
/* SPDX-License-Identifier: GPL-2.0-or-later */ #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "BKE_material.h" #include "BKE_mesh.h" #include "node_geometry_util.hh" namespace blender::nodes { struct CuboidConfig { float3 size; int verts_x; int verts_y; int verts_z; int edges_x; ...
TOOL
0.932395
6.812975
{ "github_metadata": { "branch": "master", "commit_count": 113469, "repo_created_at": "2013-11-15T17:23:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 342, "forks": 127, "issues": 13, "pull_requests": 2 }, "file_meta": { "content_id": "...
92d5e627-448a-41c7-8d43-c9022e00f241
cen5bin/Algorithm-Problem
hdu/4497.cpp
#include <cstdio> #include <cstring> #include <cmath> #include <string> #include <queue> #include <map> #include <set> #include <algorithm> #include <vector> using namespace std; #define esp 1e-9 #define inf 0x7fffffff #define MOD 1000000007 typedef long long LL; const int N = 100010; int p[N]; bool vis[N]; int cnt; vo...
ALGO
0.999857
4.284045
{ "github_metadata": { "branch": "master", "commit_count": 220, "repo_created_at": "2014-07-24T07:06:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d65a6b13...
dd211ecd-1626-475a-bd19-f2b02f1feabd
yasithdev/algorithms
ieee-xtreme-10/main2.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; vector<unsigned long long> pf(unsigned long long n) { vector<unsigned long long> factors; for (unsigned long long i = 2; i * i <= n; ++i) //no sqrt, please { while (n % i == 0) //whil...
ALGO
0.999878
4.713289
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-05-08T04:27:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89567b0209...
53a61eec-4b5e-4af6-9d16-3e8f639986d0
shaygeko/competitive_programming
vjudge/2022/fall/6/a.cpp
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef pair<int, int> pii; typedef long long ll; typedef vector<ll> vll; istream &operator >> (istream& is, pii &p){ cin >> p.first >> p.second; return is; } const int maxn = 1e5; const int INF = 2e9; con...
ALGO
0.999918
4.251445
{ "github_metadata": { "branch": "main", "commit_count": 116, "repo_created_at": "2022-01-25T04:43: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": "ae608a4b2a...
0e921afd-4c51-4903-a0ea-cc021ace6eea
ishandutta2007/codeforces-s
shadowatyy/normal/1208/E.cpp
#include <bits/stdc++.h> using namespace std; #define PII pair<int, int> #define VI vector<int> #define VPII vector<PII> #define LL long long #define LD long double #define f first #define s second #define MP make_pair #define PB push_back #define endl '\n' #define ALL(c) (c).begin(), (c).end() #define SIZ(c) (int)(c)...
ALGO
0.999887
3.191085
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07: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": "7cb82ea1439b...
09a5d979-cbe7-404a-a7b0-701fb8121489
a4vg/disk-based-bptree
src/utec/disk/btree.h
#pragma once #include "pagemanager.h" #include <memory> #include <stdexcept> #include <utility> namespace utec { namespace disk { template <class T, int BTREE_ORDER = 3> struct Node { long page_id{-1}; long count{0}; long keys[BTREE_ORDER + 1]; T data[BTREE_ORDER + 1]; long children[BTREE_OR...
ALGO
0.961153
5.376128
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2020-07-04T05:50:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12e5e885a...
4652a886-50f3-4d0e-b268-1a0bb63b7a16
yulifromchina/exercise
sword to the offer/question_14.cpp
//调整数组顺序使奇数位于偶数前面 #include <iostream> using namespace std; void Reorder(int * data, size_t len, bool(*func)(int)) { if (data == NULL || len <= 0) return; int low = 0, high = len - 1; while (low < high) { while (low < high && func(data[high])) --high; while (low < high && !func(data[low])) ++low; if (...
ALGO
0.999765
4.788212
{ "github_metadata": { "branch": "master", "commit_count": 62, "repo_created_at": "2017-08-20T11:41:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3919269be...
d359af5e-4fcb-4676-8022-2b39c41d743d
sunchenyuan15/CPP-Basic-Tutorial
Object Oriented/Encapsulation/case_cube.cpp
#include<iostream> using namespace std; //立方体类设计 //创建立方体类 //设计属性 //设计行为 获取立方体面积和体积 //分别利用成员函数 全局函数 判断两个立方体是否相等 class Cube { private: int m_l; int m_w; int m_h; public: int set_get_length(int l) { m_l = l; return m_l; } int set_get_width(int w) { m_w = w; ...
TOOL
0.968816
4.676188
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-09-02T09:48:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "660c33ae1f61...
2c9b411f-0f8d-4d1d-9a7a-1cb5537a58c6
GhaniketRajputp005/MyLeet_Status
645-set-mismatch/set-mismatch.cpp
class Solution { public: vector<int> findErrorNums(vector<int>& nums) { int dup = 0, miss = 0; for (int i = 0; i < nums.size(); i++) { if (nums[abs(nums[i]) - 1] < 0) dup = abs(nums[i]); else { nums[abs(nums[i]) - 1] *= -1; ...
ALGO
0.999868
5.389323
{ "github_metadata": { "branch": "main", "commit_count": 355, "repo_created_at": "2024-02-23T18:33:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "452e15d1e7...
ca550727-940c-409b-b88b-93489a64a63a
ccpang96/leetcode
leetcode/树/二叉树/104. 二叉树的最大深度.cpp
/************************************************************************/ /*@File Name : 104. 二叉树的最大深度.cpp /*@Created Date : 2020/5/31 6:10 /*@Author : ccpang(<EMAIL>) /*@blog : www.cnblogs.com/ccpang /*@Description : /*********************************************************...
ALGO
0.999823
5.608844
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2020-05-18T07:48:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c60dcd5c8...
66a3d3a0-ca52-4bbf-96cd-78380d46e30f
algorithmlover2016/leet_code
src/main/algorithms/cpp/array/matrix_block_sum_1314/solution.cpp
#include "../../head.h" class Solution { public: std::vector<std::vector<int>> matrixBlockSum(std::vector<std::vector<int>> & mat, int K) { if (mat.empty() || mat[0].empty()) { return mat; } int const rowSize = mat.size(); int const colSize = mat[0].size(); std:...
ALGO
0.999766
6.359536
{ "github_metadata": { "branch": "master", "commit_count": 882, "repo_created_at": "2019-03-10T08:25:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b5150b9...
e0eae2f7-9853-46d4-a019-66ca5455f5cf
AlgoAbrar/Second-Year-First-Semester-Lab
Object Oriented Programming/Lab 2/multiplescholarshiop.cpp
#include <bits/stdc++.h> using namespace std; // bismillah class bank { public: string accountname; int accountnumber; string department; float balance; void getdata(string a, int b, string d, float g) { accountname = a; accountnumber = b; department = d; balance ...
TOOL
0.939716
3.863467
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-02-08T14:53:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b49b478d134...
4c94d2df-3d3f-4329-b564-cb07786a538a
SilverMaple/STLSourceCodeNote
4_STL_sequence_container/4_2_5_vector-test.cpp
// filename: 4vector-test.cpp #include <vector> #include <iostream> #include <algorithm> using namespace std; inline void printInfo(vector<int> iv) { cout << "size=" << iv.size() << " capacity=" << iv.capacity() << endl; } void printVector(vector<int> iv) { for (int i = 0; i < iv.size(); i++) { cou...
ALGO
0.977422
4.513074
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2020-03-09T13:40:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 995, "forks": 264, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "6a723...
5642a3f8-53b6-49d2-92a8-cae0df9c9227
kothariji/competitive-programming
GeeksforGeek - DSA Practice Problems/Power_pow_even_Number.cpp
/* * कर्मणये वाधिकारस्ते मां फलेषु कदाचन । * मां कर्मफलहेतुर्भू: मांते संङगोस्त्वकर्मणि ॥ */ #include <bits/stdc++.h> using namespace std; #define bug(...) __f (#__VA_ARGS__, __VA_ARGS__) template <typename Arg1> void __f(const char* name, Arg1&& arg1) { cout << name << " : " << arg1 << endl; } template ...
ALGO
0.999639
5.145802
{ "github_metadata": { "branch": "master", "commit_count": 1881, "repo_created_at": "2020-08-27T07:08:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 680, "forks": 501, "issues": 2, "pull_requests": 2 }, "file_meta": { "content_id": "0e0...
5638d142-1594-470b-8901-16aa197d3575
PrakashM7781/C---Practice
tempCodeRunnerFile.cpp
void merge(vector<int> arr, int start, int end) { int mid = start + (end - start) / 2; int len1 = mid - start + 1; int len2 = end - mid; int *first = new int[len1]; int *second = new int[len2]; int originalArrayIndex = start; for (int i = 0; i < len1; i++) { first[i] = arr[ori...
ALGO
0.999985
5.425547
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-03-27T09:57: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": "f8290d9e8c13...
320200ea-2c78-4d15-aeb3-7ec5864775e4
gagandeepahuja09/Binary-Search
LeetCode/Exam Room.cpp
struct IntV { static int N; int l, r; IntV(int l, int r) : l(l), r(r) {} int getDist() const { if(l == 0) return r; if(r == N - 1) return (N - 1 - l); return (r - l) / 2; } int getMid() const { if(l == 0) return 0; if(r == N - 1) return N - 1...
ALGO
0.999851
5.138946
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2019-04-01T16:39: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": "72b42c328...
2de9430c-8705-4d1c-b809-54190202348a
arc-l/rubik-table
2d/rtlm/mp.cpp
#include "mp.h" void debug_checker(Agents & agents){ //fill pahts int makespan=0; for(const auto &agent:agents){ makespan=std::max(makespan,(int)agent->path.size()); } //check vertex conflicts for(int t=0;t<makespan;t++){ std::unordered_set<Location> occupied; for(con...
ALGO
0.992551
4.294636
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2022-11-17T21:45:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bbeca64cf4e...
bfdf792e-309f-45ff-bdb0-aef69bb983d5
thechentr/HexQueen
Alex.cpp
/* 程序特点:在读入棋盘状态时,进行映射,使得在程序视角我方始终进攻左右边 */ #include<iostream> #include<ctime> using namespace std; int board[11][11]; // 棋盘 (1 -> 己方) (-1 -> 对方) bool beganing = 0; // 0表示 int op_x, op_y; // 程序视角的落子位置 void outputBoard() { // 在程序视角输出棋盘状态 for (int i = 0; i < 11; i++) { for (int j = 0; j < 11; j++) { ...
ALGO
0.999915
3.612553
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-09-18T09:44: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": "f61ff3dfba19...