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
9546f0b5-fb71-4f59-91b7-b76904cba701
hahahahihihihhh/ACM
ACM Algorithm/Graph/Bipartite Graph Matching/Maximum Weight Matching/km.cpp
/* 洛谷 P6577 【模板】二分图最大权完美匹配(O(n^3)) */ #include <bits/stdc++.h> using namespace std; typedef long long ll; const int MAXN = 505; const ll INF = 1e18; struct KM { int n; bool vx[MAXN], vy[MAXN]; ll d[MAXN]; int matchx[MAXN], matchy[MAXN], pre[MAXN]; ll lx[MAXN], ly[MAXN]; ll w[MAXN][MAXN]; ...
ALGO
0.999989
4.1636
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2024-01-05T16:30:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ee4b6d5d...
8be6a86a-2d9d-4d68-8ff9-c97dbc31c421
lydrainbowcat/tedukuri
配套光盘/例题/0x60 图论/0x62 最小生成树/最优比率生成树/8426214_AC_297MS_17940K.cc
// Dinkelbachµü´ú·¨ #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> using namespace std; double dist[1100][1100], cost[1100][1100]; double ratio, dsum, csum; int n; inline double len (int a, int b) { return cost[a][b] - ratio * dist[a][b]; } void prim (void) { double dt...
ALGO
0.999923
3.706777
{ "github_metadata": { "branch": "master", "commit_count": 140, "repo_created_at": "2018-03-18T01:24:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2487, "forks": 607, "issues": 15, "pull_requests": 0 }, "file_meta": { "content_id": "5c...
560f837f-bc8f-44a8-88ba-0c7cb304bda2
simran0809/Linear-Search-in-C-
LinearSearch in c++.cpp
#include <iostream> using namespace std; int search(int arry[], int N, int x) { for (int i = 0; i < N; i++) { if (arry[i] == x) return i; // Return the index if found } return -1; // Return -1 if not found } int main() { int arry[] = {1, 2, 3, 4, 5, 6}; int x = 6; int N =...
ALGO
0.998963
5.268813
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-01-30T11:08: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": "3287b27afdd3...
a98ec2de-b321-4af1-83b0-fc396a63472c
sanikoyes/godot
thirdparty/embree/kernels/bvh/bvh_intersector_stream.h
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "node_intersector_packet_stream.h" #include "node_intersector_frustum.h" #include "bvh_traverser_stream.h" namespace embree { namespace isa { /*! BVH ray stream intersector. */ template<int N, int types...
ALGO
0.99271
6.754546
{ "github_metadata": { "branch": "master", "commit_count": 48784, "repo_created_at": "2014-03-11T05:13:41.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "godotengine/godot", "stars": 125, "forks": 20, "issues": 0, "pull_requests": 0 }, "file_meta": { "con...
49933624-9584-4e93-93c8-2aae25841402
minwookchang/OpenCV-study
ex43_ImageMoments.cpp
/* Image Moments */ #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include <iostream> #include <stdio.h> #include <stdlib.h> using namespace cv; using namespace std; /// Global variables Mat src43, src_gray43; int thresh43 = 100; int max_thrash43 = 255; RNG rng43(12345); void ex43_callback(int, ...
ALGO
0.972747
5.384671
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2017-01-05T15:47: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": "87a06957e...
7c868aa5-7373-4217-a43a-9d5fcb117a79
yunsh3432/design_project_A
DPA_1_윤수환(2013104093)/Lab11/GraphType.h
#include <iostream> #include "QueType.h" using namespace std; const int NULL_EDGE = 0; template<class VertexType> // Assumption: VertexType is a type for which the "=", // "==", and "<<" operators are defined class GraphType { public: GraphType(); // Default of 50 vertices GraphType(int maxV); ...
ALGO
0.986909
3.289034
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-04-17T11:31: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": "d40310de20...
824993ae-b9e6-4821-8d46-e5ff3023f306
latys/leetcodeSolution
15.3-sum.cpp
/* * @lc app=leetcode id=15 lang=cpp * * [15] 3Sum * * https://leetcode.com/problems/3sum/description/ * * algorithms * Medium (23.33%) * Total Accepted: 481K * Total Submissions: 2.1M * Testcase Example: '[-1,0,1,2,-1,-4]' * * Given an array nums of n integers, are there elements a, b, c in nums such ...
ALGO
0.999779
5.851107
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-06-24T08:42: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": "5403c6dc53...
a10cb8b2-68ab-460f-8d71-4d48fab9bfde
fblogy/code
div 2/214/e.cpp
#include<bits/stdc++.h> using namespace std; #define fi first #define se second #define mp make_pair #define pb push_back #define rep(i, a, b) for(int i=(a); i<(b); i++) #define per(i, a, b) for(int i=(b)-1; i>=(a); i--) #define sz(a) (int)a.size() #define de(a) cout << #a << " = " << a << endl #define dd(a) cout << #a...
ALGO
0.999947
4.054524
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2018-08-08T02:44:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "40341db34...
0ab2a9de-2433-45b4-a858-a9f865652714
AmitrajitDas/DSA-CP
0223-rectangle-area/0223-rectangle-area.cpp
class Solution { public: int computeArea(int ax1, int ay1, int ax2, int ay2, int bx1, int by1, int bx2, int by2) { int areaFirst = (ax2 - ax1) * (ay2 - ay1); int areaSecond = (bx2 - bx1) * (by2 - by1); // calculating the smaller of the two endpoints & determining the greate...
ALGO
0.999121
6.214375
{ "github_metadata": { "branch": "main", "commit_count": 2580, "repo_created_at": "2022-02-15T11:47:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6dfc20cd0...
da35b8ce-c462-4e8d-a680-40e46bad4c5f
tstaten56/School-Projects
Percolation2/main.cpp
#include <string> #include "Percolation.h" #include <iostream> #include <time.h> #include <fstream> using namespace std; int main(int argc, char *argv[]) { srand(time(NULL)); /* yourProgram.exe p n s // p - percolation probability; n - # of runs; s – board size; // your program should output percolation rate ...
ALGO
0.982617
3.678056
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2014-09-02T19:41: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": "8f88d199c...
462ec908-bebe-4f81-b0ec-801e7285e4ec
MegviiRobot/OdomLaserCalibraTool
src/gsl_solver/verifier_utils.h
/*! \file verifier_utils.h \author <NAME>, <NAME>, <NAME> \brief Header of verifier_utils */ #include <stdlib.h> #include <gsl/gsl_matrix.h> #include "aux_functions.h" using namespace std; /*! \brief Computate composition of planar transformations @param a \f$ \left[ \begin{array}{ccc} x & y & \theta \end{arr...
ALGO
0.991912
5.838511
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-03-15T09:28:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 388, "forks": 167, "issues": 10, "pull_requests": 1 }, "file_meta": { "content_id": "4d5468...
0fafc625-4109-4c6f-b553-85bd814206b3
lukaszgryglicki/my_legacy_stuff
PixelShaderLight/matrix.cpp
#include "matrix.h" // dołącza nagłowki funkcji extern float angX, angY, angZ; // przekształcenia sceny, zewnętrzne zmienne z pliku camera.cpp extern float disX, disY, disZ; // modyfikowane przez f-cje obliczające rotację i translację sceny // Oblicza przesunięcie, wejściowe dane to: przód/tył/lewo/prawo/góra/dół ...
ALGO
0.991294
3.389355
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-11-26T16:36: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": "56e48996cd...
5bfdc77d-52e9-4e6e-bb86-83ace74a9037
ucd-plse/FPLearner
raw/MixBench/orig_files/lavaMD.cpp
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <cmath> #define DOUBLE 0 #define FLOAT 1 #define INT 2 #define LONG 3 void stopMeasure(); void startMeasure(); void writeData(double* ptr, size_t size, int type, char *name); void writeData(float* ptr, size_t size, int type, char...
DATA
0.994321
3.500363
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2023-09-18T19:28:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0db1f34cc79...
54a753cd-341f-4b3a-9459-dcaae82efed5
ravireddy07/cpp-book
src/Leetcode/1563_stone-game-v.cpp
// https://leetcode.com/problems/stone-game-v/ #include <bits/stdc++.h> using namespace std; class Solution { public: int dp[501][501]; int dfs(vector<int> &sv, int l, int r) { if (l >= r) return 0; if (dp[l][r] >= 0) return dp[l][r]; int res = 0; for...
ALGO
0.999961
4.919146
{ "github_metadata": { "branch": "master", "commit_count": 490, "repo_created_at": "2019-06-20T07:54:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 1, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "257e913...
7412e7d6-6dfd-48e5-bb94-7a906cdd176b
lam3082004/Code_in_thptchuyen.ntucoder.net
MATRIXAB/MATRIXAB.cpp
// Bạn có một bảng số A gồm m hàng và n cột, mỗi ô trong bảng có chứa một số nguyên. Gọi // D(x, y, u, v) (1 ≤ x < u ≤ m, 1 ≤ y < v ≤ n) là tổng bao quanh hình chữ nhật có đỉnh trái trên // là (x, y) và đỉnh phải dưới là (u, v). Nói cách khác, D(x, y, u, v) là tổng của các ô (i, j) thỏa mãn // x ≤ i ≤ u, y ≤ j ≤ v và í...
ALGO
0.999992
3.637607
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2021-07-21T15:04:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "29f7ef62b...
f6d1bcf1-759e-4164-81ac-ced56beeac15
GaussGreen/old-code
arm/Credit/ICMKernel/str/icm_str_models.cpp
#include "ARMKernel/glob/firsttoinc.h" #include "icm_str_models.h" //------------------------------ #ifndef unix #define ITOA _itoa #else #define ITOA intToStr #endif // ----------------------------------------------------------------------------------------------------- // Fonction prenant en parametre un tableau ...
ALGO
0.996332
4.300422
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-02-17T09:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ba9e6d8af9f...
02ea27c6-6a63-4659-96e2-3127ac187d4d
gulshkr/Data-Structures--Udemy-
Intro to C-C++/Template-class.cpp
#include<bits/stdc++.h> using namespace std; template<class T> class Arithmetic{ private: T a; T b; public: // Constructor Arithmetic(T a,T b); //Functions T add(); T sub(); }; // Constructor (as now it is outside the so to show that it belongs to...
ALGO
0.990459
5.138177
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2022-03-12T07:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a089ff6bc...
389bf5f3-22df-49e0-8979-498a47441781
wlsdzyzl/Dragon
src/Reconstruction/Poisson.cpp
#include "Poisson.h" #include "Geometry/Structure/Octree.h" #include "Geometry/Structure/KDTree.h" namespace dragon { namespace reconstruction { double ThirdBoxFilter(double x) { if(x <= -1.5) return 0; else if(x > - 1.5 && x <= -0.5) return 0.5 * x * x + 1.5 * x + 1.125; ...
ALGO
0.99586
3.400854
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2020-11-23T08:35:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 38, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "46bdf28022...
d1906c57-ccf5-4754-aa94-332583871550
MarshallVielmetti/robotic_exploration
exploration_sim_planner/include/exploration_sim_planner/path_planner/AStarPathPlanner.hpp
/** * @file AStarPathPlanner.hpp */ #pragma once #include <Eigen/Dense> #include <memory> #include <vector> #include "exploration_sim_planner/path_planner/AbstractPathPlanner.hpp" #include "exploration_sim_planner/util/OgmView.hpp" /** * @brief Utility structures for the A* path planning algorithm. * * The nam...
ALGO
0.999106
6.047919
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2025-01-15T17:53: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": "529638d32f5...
3d02f76a-baf2-46e6-9884-1ec0b6b12b13
selenage29/hello-world
Jan24/silver1.cpp
//Cowmpetency // #include <iostream> using namespace std; void solve(){ int n, q, C; cin >> n >> q >> C; int b[n+1], c[n]; bool assigned[n]; cin >> c[0]; if(c[0]==0){ c[0]=1; assigned[0]=false; }else{ assigned[0]=true; } b[0]=0; b[n]=0; for (int i =...
ALGO
0.999886
3.119256
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2024-05-31T12:30: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": "dbbcd5ddc27...
24a950df-151d-415f-9242-a3f462e77bcd
tysm/cpsols
codeforces/contests/round/668-div2/e.cpp
#include <cpplib/stdinc.hpp> #include <cpplib/adt/heap.hpp> #include <cpplib/adt/segtree.hpp> void solve(int n, int i, SegTree<RSumQ, int> &res, int k, SegTree<RMaxQ, int> &cur){ res.update(i, 1); cur.update(k, -INF); if(k){ cur.update(0, k-1, 1); for(int j = cur.find(0); j<k; j = cur.find...
ALGO
0.999907
4.239208
{ "github_metadata": { "branch": "master", "commit_count": 100, "repo_created_at": "2019-08-14T03:46:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b0d836df...
e5b95431-788c-4e37-96e3-05837aa36f8b
doctoroyy/algorithm
laioqiao/2018/4/6.递增三元组.cpp
#include<iostream> #include<algorithm> using namespace std; const int maxsize = 100000; int main() { int a[maxsize+10], b[maxsize+10], c[maxsize+10]; int n; while (cin >> n) { for (int i = 0; i < n; i++) cin >> a[i]; for (int i = 0; i < n; i++) cin >> b[i]; for (int i = 0; i < n; i++) cin >> c[i]; ...
ALGO
0.999957
4.517028
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2018-11-21T03:05:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3489af8ea...
d0bc1b03-fe83-4bbc-b903-3910c79a49f8
wuqingze/leetcode
0354-Russian-Doll-Envelopes/Solution.cc
#include <iostream> #include <algorithm> #include <vector> using namespace std; class Solution { public: int maxEnvelopes(vector<vector<int>>& envelopes) { int n = envelopes.size(); if(n == 1) return 1; sort(envelopes.begin(), envelopes.end(), [](const auto &o1, const auto &o2){ ...
ALGO
0.999971
5.268385
{ "github_metadata": { "branch": "master", "commit_count": 319, "repo_created_at": "2018-07-27T07:02:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d7451ac...
ecaf217d-31a7-4640-b8e5-cab4605561b4
rinnot/ebook_review
ebook.cpp
#include <iostream> #include <iomanip> #include <vector> #include <numeric> using namespace std; class EBookManager { public: EBookManager() : users_page_(MAX_USER_COUNT_ + 1, 0) , users_at_page_(MAX_PAGE_COUNT_ + 1, 0) { } void ReadPage(const int user, const int page) { if (Che...
ALGO
0.988485
4.349234
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-02-27T16:56: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": "3e9ae382e109...
5107ce6a-15dd-49fb-80c4-2e54b9d58da8
savigurjar/DSA-CoderArmy
queue/Dequeue/bylinkedlist.cpp
#include <iostream> using namespace std; class Node { public: int data; Node *next, *prev; Node(int value) { data = value; next = NULL; prev = NULL; } }; class Dequeue { Node *front, *rear; public: Dequeue() { front = rear = NULL; } void push_f...
ALGO
0.998634
5.338332
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2025-03-20T07:54: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": "cdff89d6c28...
38450a84-cf8e-4ece-85d5-b0f1cc56fa99
StormFireFox1/Probleme-Info-11G
Clasa_11/strazi/main.cpp
/* Strazi Citire in float la strazi, dupaia calcule usoare. Easy. Referinta pentru citire in float. Folosim iomanip pentru functia setprecision() (pentru float, seteaza numarul de zecimale dupa virgula), si iostream pentru fixed (sa fie neaparat numarul de zecimale de la setprecision. */ #include <fstream> #...
ALGO
0.999748
3.405316
{ "github_metadata": { "branch": "master", "commit_count": 182, "repo_created_at": "2017-09-18T08:57:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9008f812...
cc74e88e-7280-427a-83f0-d1f9b5a6d25a
hxydebug/newlicycle
licycle/src/gait_generator.cpp
#include "gait_generator.h" #include <iostream> Eigen::Vector2d nominal_stance_duration(t_stance, t_stance); Eigen::Vector2d nominal_stance_dutyrate(0.5, 0.5); float nominal_contact_detection_phase = 0.1; gait_generator::gait_generator(){ stance_duration = nominal_stance_duration; stance_dutyrate = nominal...
ALGO
0.994824
3.581651
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2021-12-08T03:23:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b74c3c251...
30a5a469-2c0c-492b-a382-52ea5a2c51db
KeonhoPark/CPPStudy
referen.cpp
#include <iostream> using namespace std; int main(){ int num = 10; int &numRef = num; int &numRef2 = numRef; numRef = 15; cout << "num : " << num << endl; cout << "numRef : " << numRef << endl; cout << "numRef2 : " << numRef2 << endl; num = 12; cout << "num : " << num << endl; ...
TOOL
0.972826
3.543675
{ "github_metadata": { "branch": "main", "commit_count": 110, "repo_created_at": "2023-06-22T00:10: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": "a7dc23f5cd...
089897c2-ec58-45b9-bb58-588051040b23
ssongna/sastbx_module_sastbx
fXS/math_utils.cpp
#include <sastbx/fXS/math_utils.h> namespace sastbx { namespace fXS { /* ========================================================================== Order of points is assumed to be f00, f10, f01, f11 y1 -- f01 ----- f11 | | | | | | ...
ALGO
0.999287
5.895546
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-11-20T15:33: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": "b7242b46d8...
c529a10d-4405-4e7e-9bba-8b36ae9731cd
Li-Kira/CodeLib
CG/GAMES101/Homework08-质点弹簧系统/src/rope.cpp
#include <iostream> #include <vector> #include "CGL/vector2D.h" #include "mass.h" #include "rope.h" #include "spring.h" namespace CGL { Rope::Rope(Vector2D start, Vector2D end, int num_nodes, float node_mass, float k, vector<int> pinned_nodes) { // TODO (Part 1): Create a rope starting at `start`, e...
ALGO
0.972068
5.432065
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2023-10-06T12:07: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": "3a7fc347d4f...
03778a3e-d513-4da3-bbe0-fa689f610692
DevBaweja/Competitive-Coding
Leetcode/1002. Find Common Characters.cpp
#include <bits/stdc++.h> using namespace std; map<char, int> generate(string s) { map<char, int> temp; for (int i = 0; i < s.length(); i++) temp[s[i]]++; return temp; } map<char, int> intersection(map<char, int> A, map<char, int> B) { map<char, int> temp; for (map<char, int>::iterator itr ...
ALGO
0.999948
4.186592
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2020-10-25T07:57: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": "99f901a8f...
3855552e-0a0b-4500-9d7d-071ec770d889
invrev/fft
tmp/remove-duplicate-letters.cpp
//Remove Duplicate Letters //Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure your result is the smallest in lexicographical order among all possible results. //Example: //Given "bcabc" //Return "abc" //Given "cbacdcbc" //R...
ALGO
0.999862
5.591238
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-11-28T23:57:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "536366b171...
5218593f-2eb2-4030-aed6-1658cbebbd90
riyad4567/AI
Offline 2/2005053.cpp
#include <iostream> #include <vector> #include <iomanip> #include <algorithm> using namespace std; int mx = INT32_MAX; int mn = INT32_MIN; int stonesCaptured = 0; int moveEarned = 0; int player1Score = 0; int player2Score = 0; class Node { public: vector<int> vec; bool nextPlayer; Node(bool firstPlayer) { ...
ALGO
0.99715
3.411387
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-01-11T17:19:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "352818e2248b...
d44ed12a-d1b4-4819-9bf8-4ed8e8d3ad6d
MinaFaried3/Assiut-University-Training---Newcomers
e-sheet3_array/Q-CountSubarrays.cpp
#include <iostream> using namespace std; void first_sol() { int size, count = 0, max, flag; cin >> size; // count = size; int *arr = new int[size]; for (int i = 0; i < size; i++) { cin >> arr[i]; } for (int row = 0; row < size; row++) { for (int item = 0; item < (siz...
ALGO
0.999874
4.267933
{ "github_metadata": { "branch": "main", "commit_count": 58, "repo_created_at": "2022-06-18T10:01:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 87, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d2a4f0d8...
3d649480-0eda-44c2-bd18-534ee27c0123
Study-CodingTest/Study
BOJ/드래곤 앤 던전/박예찬.cpp
#include <iostream> #include<string> #include<queue> #include<tuple> #include<vector> using namespace std; long long n, atk, curHp, curRoom, curAtk; long long inf = 9000000000000000000; vector<tuple<int, int, int>> v; void battle(int cur) { long long enemyHp = get<2>(v[cur]); long long enemyAtk = get<1>(v[cur]); lo...
ALGO
0.999956
3.76362
{ "github_metadata": { "branch": "main", "commit_count": 184, "repo_created_at": "2022-06-17T13:15:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 5, "pull_requests": 2 }, "file_meta": { "content_id": "6fabdc06ebb...
87b2c792-21d4-4f6e-8625-137294f5fb21
meetzouxu/PAT
Simulation/1014 Waiting in Line.cpp
#include<iostream> #include<algorithm> #include <queue> #define INF 0x3f3f3f using namespace std; int time(int h, int m)//转换成为分钟 { return 60 * h + m; } struct Window//每个窗口的时间 { //队伍的最后的人服务完成花费的总时间,用于计算服务耗费时间 int endtime = time(8, 0); //队首的人服务的结束时间,队首服务时间最短的即为入队选择的窗口 int poptime = endtime; queue<int>q; }window[20]...
ALGO
0.999873
3.084153
{ "github_metadata": { "branch": "main", "commit_count": 350, "repo_created_at": "2022-03-04T01:15: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": "c780e8ce08...
30263247-e4d8-4496-abfc-ac8cf0fda20f
NAPdv/CP
LeetCode/Binary_Tree/112.Path_Sum.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.999969
5.832708
{ "github_metadata": { "branch": "main", "commit_count": 227, "repo_created_at": "2021-04-05T16:08: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": "d7c4008823...
abdbf1a1-440e-4da1-851b-36e2cad1a96d
HandIeNeeded/Retired
AtCoder/AGC/AGC003/src/D/D.cc
/************************************************************************* > File: D.cc > Author: Riho.Yoshioka > Mail: <EMAIL> > Created Time: Sun 21 Aug 2016 09:00:08 PM CST *************************************************************************/ #include <bits/stdc++.h> using LL = lon...
ALGO
0.999895
4.142767
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2015-12-20T14:09:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73b4bb98...
8846afa0-24df-4719-aef0-47ad0a78953a
johnPertoft/locality-aware-nms
lanms/cc/kernels/nms_kernels.cc
#include <vector> #include "tensorflow/core/framework/op_kernel.h" #include "tensorflow/core/framework/tensor.h" #include "nms.h" using namespace tensorflow; static inline void _check_input_iou_threshold(OpKernelContext* context, const float iou_threshold) { OP_REQUIRES(context, iou_threshold >= 0 && iou_threshol...
ALGO
0.953384
7.251249
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2019-10-10T14:14: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": "c4f9a55c9...
392d8641-4a49-4b10-9265-8c1439abef33
mikejsavage/forkforksow
source/cgame/cg_decals.cpp
#include "qcommon/base.h" #include "qcommon/qcommon.h" #include "qcommon/span2d.h" #include "cgame/cg_local.h" #include "client/renderer/renderer.h" static TextureBuffer decal_buffer; static TextureBuffer decal_index_buffer; static TextureBuffer decal_tile_buffer; static u32 last_viewport_width, last_viewport_height;...
TOOL
0.903717
6.308994
{ "github_metadata": { "branch": "master", "commit_count": 7409, "repo_created_at": "2020-09-16T19:49: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": "f9ffb74...
8d492201-02d4-4013-8039-953dbe1e6e44
winterrray/ai-codes
5_aostar.cpp
#include <iostream> #include <climits> #include <vector> using namespace std; #define MAX_NODES 50 // Node structure to store node properties struct Node { int id; // Unique identifier for the node int heuristic; // Heuristic value of the node bool visited; // Flag to ch...
ALGO
0.999993
5.753493
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-10-23T08:52:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "72950f1770bb...
911c1c8b-7480-40ac-8645-b9d1181aa1c9
Uranium-Deng/LeetCode
5.BFS/529.cpp
/************************************************************************* > File Name: 529.cpp > Author: DRZ > Mail: <EMAIL> > Created Time: 2020年04月01日 星期三 20时40分14秒 ************************************************************************/ #include <iostream> #include <cstring> #include <stack> #include <queue...
ALGO
0.99982
3.570353
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-02-28T04:49: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": "225ce2615...
0649de88-010e-4365-9b95-458ba6461fec
isfahanUacm/UICPC
2023/UICPC DIV1/UICPC Round #07/solutions/traderoutes/submissions/accepted/traderoutes-iter-zf.cpp
#include <bits/stdc++.h> #define MAXN 300000 using namespace std; using ll = long long; using vi = vector<int>; using pii = pair<int,int>; int p[MAXN], b[MAXN], v[MAXN], id[MAXN]; priority_queue<pii> keep[MAXN]; int main() { int n; cin >> n; for (int i = 1; i < n; ++i) { cin >> p[i]; --p[i]; } for (int i =...
ALGO
0.999998
3.672829
{ "github_metadata": { "branch": "main", "commit_count": 113, "repo_created_at": "2021-09-15T16:29:50.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e0b51754e81...
4f44bea7-474e-4340-8a00-efcbc1617a3d
Viredery/Leetcode
DepthFirstSearch/0124.BinaryTreeMaximumPathSum.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.999971
6.346934
{ "github_metadata": { "branch": "master", "commit_count": 574, "repo_created_at": "2016-04-01T06:27: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": "1f80e862...
a202d661-a216-4eb8-b256-c75a93d27fa8
jesushilarioh/DelMarCSi.cpp
Chapter-7-Arrays/7.9 Two-Dimensional Arrays/7-22b.cpp
//*********************************************************** // This program sums all the elements of a two-dimensional // array. // // By: <NAME> // Last Updated: November 11, 2016 //*********************************************************** #include <iostream> using namespace std; int main() { const int NUM_ST...
ALGO
0.997151
5.523394
{ "github_metadata": { "branch": "master", "commit_count": 192, "repo_created_at": "2016-09-20T01:58:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d212fe7f...
aa7f9126-d021-449f-9a05-a0f78f49b403
zfu/CodeEval
Easy/RightmostChar.cc
/* Rightmost Char Share on LinkedIn Description: You are given a string 'S' and a character 't'. Print out the position of the rightmost occurrence of 't'(case matters) in 'S' or -1 if there is none. The position to be printed out is zero based. Input sample: The first argument is a file, containing a string and a...
ALGO
0.988203
4.504838
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2013-11-04T14:44: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": "cc6b80ded...
86225fa0-3880-4c03-9378-7e79d21996a4
ckhe1215/algorithm
graph/7576.cpp
#include <iostream> #include <queue> using namespace std; int map[1001][1001] = {0}; int visited[1001][1001] = {0}; queue<pair<int, int>> q; int dx[] = {-1, 0, 0, 1}; int dy[] = {0, -1, 1, 0}; int cnt = 0; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int m, n; cin >> m >> n; f...
ALGO
0.999962
3.729531
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2021-07-05T13:08: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": "b82089910...
ea973677-35ab-46f8-af08-df3a438d34af
enochii/ds_homework
exp_translation/exp_translation/translation.h
#pragma once #include <string> #include <stack> #include <cstring> #include <cassert> #include <iostream> class parser { enum OP { RIGHT = 1, ADD, SUB, MUL, DIV, LEFT, }; const char OP2char[10] = { ' ', ')', '+', '-', '*', '/','(', }; //表达式的最小单元,数字或者操作符 struct object { typedef union { do...
ALGO
0.992747
4.237907
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-01-19T00:05: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": "8874e19e25...
d1135373-5da5-42ba-aa24-a3a3f5118e90
skeptlk/saod
08/radix.cpp
#include <iostream> #ifndef RADIX #define RADIX namespace saod { void radixsort(int a[], int n); void sortDigits(int a[], int n, int exp); int getMax(int a[], int n); int getMax(int a[], int n) { int max = a[0]; for (int x = 1; x < n; x++) if (a[x] > max) max = a[x]; return max; } // Function to ...
ALGO
0.999829
4.052902
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-10-26T12:05: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": "ab1f16e86...
09dc8062-211c-4f42-9cfd-b26854eaca10
Rydolf-Sikorski-Baal/YandexTrainings
29.cpp
#define _CRT_SECURE_NO_WARNINGS #pragma GCC optimize("03") #include <iostream> #include <iomanip> #include <algorithm> #include <vector> #include <set> #include <string> #include <stack> #include <map> #include <utility> #include <queue> #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; ...
ALGO
0.999955
4.521541
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2023-04-10T13:44: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": "97e00b6b1cb...
d33f1a99-ea9a-40b1-afe9-3efa1ab984b5
flameshimmer/leet2019.io
Leet2019/Triangle.cpp
#include "stdafx.h" //Given a triangle, find the minimum path sum from top to bottom. //Each step you may move to adjacent numbers on the row below. // //For example, given the following triangle // //[ // [2], // [3,4], // [6,5,7], // [4,1,8,3] //] //The minimum path sum from top to bottom is 11 //(i.e., 2...
ALGO
0.99984
5.611512
{ "github_metadata": { "branch": "master", "commit_count": 132, "repo_created_at": "2019-08-14T16:44:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6a8ded8...
e9cb914f-0a32-473a-bde6-ee7d7fda706e
LuciusKyle/LeetCode
1502_Can_Make_Arithmetic_Progression_from_Sequence/1502.cc
#include <limits.h> #include <vector> using std::vector; class Solution { public: bool canMakeArithmeticProgression(const vector<int>& arr) { int val = arr[0], min_diff = INT_MAX, min_val = arr[0]; for (int i = 1; i < arr.size(); ++i) { min_diff = std::min(min_diff, std::abs(arr[i] - val)); m...
ALGO
0.999232
5.831285
{ "github_metadata": { "branch": "master", "commit_count": 727, "repo_created_at": "2018-04-11T07:43: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": "5836ef46...
e3f74b7b-4c83-49fe-b779-d832d6e382e0
THE-DEEPDAS/CodeForces_Journey
Magical_Sticks.cpp
// there are n sticks and for every stick, its length is i where 1 <= i <= n // now if 2 sticks are joined of length a and b then you get new stick of length a + b and remove those twp // make max possible sticks of same length typedef long long ll; #include <bits/stdc++.h> using namespace std; int main() { ll te...
ALGO
0.999791
4.515275
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2024-07-14T23:17:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3fe24a689...
0a9afedd-3481-4028-8e64-0c28ad35984e
liujiapeng678/homework
90-b1/hanoi_main.cpp
/* 信07 2253209 刘佳朋 */ #include<iostream> #include"hanoi.h" #include"cmd_console_tools.h" #include<conio.h> using namespace std; /* ---------------------------------------------------------------------------------- 本文件功能: 1、放main函数 2、初始化屏幕 3、调用菜单函数(hanoi_menu.cpp中)并返回选项 4、根据选项调用菜单各项对应的执行函数(hanoi_multiple_solut...
ALGO
0.997096
3.537765
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2024-06-11T13:43:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f6d2151082...
b245c586-eeaf-4bf0-b8ca-70d979ce715d
szczepanekF/CPS
src/signals/transformers/SignalTransformer.cpp
#include <iostream> #include <algorithm> #include <chrono> #include "signals/transformers/SignalTransformer.h" #include "signals/transformers/DITFastFourierTransform.h" #include "signals/transformers/DIFFastFourierTransform.h" #include "signals/transformers/DiscreteCosineTransform.h" #include "signals/transformers/Dis...
ALGO
0.99872
7.263981
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2024-02-28T19:12:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "736669a98de...
7579289b-b433-4b93-904f-6edc345a59b4
prashantchauhan1602/Leetcode-questions
0367-valid-perfect-square/0367-valid-perfect-square.cpp
class Solution { public: bool isPerfectSquare(int num) { int num1 = num / 2 ; int start = 0 ; int end = num1 ; if(num == 1 || num == 4) { return true ; } while(start <= end) { long long int mid = star...
ALGO
0.999948
4.936488
{ "github_metadata": { "branch": "main", "commit_count": 634, "repo_created_at": "2022-10-03T22:11: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": "7984df7ecf...
77d35354-cd8b-42eb-8365-99195b1ffda1
yanghongyang/leetcode-problem-solution
cpp-answers/703.数据流中的第k大元素.cpp
/* * @Description: * @Author: Hongyang_Yang * @Date: 2020-07-08 10:49:12 * @LastEditors: Hongyang_Yang * @LastEditTime: 2020-07-16 23:38:09 */ /* * @lc app=leetcode.cn id=703 lang=cpp * * [703] 数据流中的第K大元素 */ // @lc code=start struct CustomNode { int val; int cnt; //记录下子树的节点 CustomNode *left, *ri...
ALGO
0.999957
6.125826
{ "github_metadata": { "branch": "master", "commit_count": 457, "repo_created_at": "2020-07-27T23:33:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e90e04f7...
3920db4a-09d7-4ee3-986b-705f2f280abe
chunyang-wen/leetcode
jiuzhang/house-robber/house-robber.cpp
/** * 本代码由九章算法编辑提供。没有版权欢迎转发。 * - 九章算法致力于帮助更多中国人找到好的工作,教师团队均来自硅谷和国内的一线大公司在职工程师。 * - 现有的面试培训课程包括:九章算法班,系统设计班,九章强化班,Java入门与基础算法班 * - 更多详情请见官方网站:http://www.jiuzhang.com/ */ class Solution { public: /** * @param A: An array of non-negative integers. * return: The maximum amount of money you can rob tonig...
ALGO
0.999956
4.813255
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2014-10-28T07:15: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": "a34c0016e...
ec47dc5c-613d-499e-9f93-09581c108bd1
ivankra/acm
acm.uva.es/811.cc
#include <cstdio> #include <cstring> #include <cmath> #include <algorithm> using namespace std; #define EPS 1e-9 struct Point { int x, y, v, l, id; bool operator <(const Point &q) const { return x<q.x || (x==q.x && y<q.y); } } P[100]; int N; long long cross(const Point &o, const Point &a, const Point &b) { ret...
ALGO
0.999213
3.293272
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2010-01-03T06:51:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 118, "forks": 43, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "b5077a...
3d1662ce-e20f-42ed-ad06-dde16c128adb
ermig1979/Simd
src/Simd/SimdSse41SynetConvolution8iNhwcDirect1x1.cpp
/* * Simd Library (http://ermig1979.github.io/Simd). * * Copyright (c) 2011-2024 <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 th...
ALGO
0.956941
3.400354
{ "github_metadata": { "branch": "master", "commit_count": 4063, "repo_created_at": "2015-03-25T15:24:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2179, "forks": 437, "issues": 30, "pull_requests": 1 }, "file_meta": { "content_id": "0...
78272bba-0589-4006-8b3d-73f2a2e157c4
CodeWithIsmail/Competitive-Programming
Others/F_Round_Trip.cpp
/// *** --- || In the name of ALLAH ||| --- *** /// /// *** --- || Author: Code_with_Ismail ||| --- *** /// #include <bits/stdc++.h> using namespace std; // Data Type: typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<vi> vvi; typede...
ALGO
0.99999
3.721976
{ "github_metadata": { "branch": "main", "commit_count": 101, "repo_created_at": "2023-03-18T16:28: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": "720adb9c80...
20760f3a-4519-46d8-8a49-1286c29bf187
Tanmoy-Deb/CodeForces_Problem
1985A.cpp
// #include<bits/stdc++.h> // using namespace std; // // int main() // // { // // int t; // // cin>>t; // // for (int i = 0; i < t; i++) // // { // // string s1, s2; // // cin>>s1>>s2; // // if(s1==s2) // // { // // cout<<s1<<" "<<s2<<endl; // // } ...
ALGO
0.999873
4.876165
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-07-04T14:33: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": "54065d768699...
a5ab4045-f621-4b72-b6b9-5c09bf8413f6
leopoldwhite/Data_Structures
Graph/DFSandBFS.cpp
#include<iostream> using namespace std; const int MAXVEX=100; bool visited[MAXVEX]={0}; template<class t> class Linkqueue { public: typedef struct node { t data; node *next; }Node; Linkqueue(); ~Linkqueue(); void Enqueue(t x); t Dequeue(); t Getqueue(); int Empty(){...
ALGO
0.999957
3.658253
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-11-29T12:35:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2e167eb5db3...
9a0eb9b7-a3b3-4dfa-a251-b22811b57abd
kgm423423/c
Workspace/과제/과제207(DFS와 BFS).cpp
#include <stdio.h> //fin #include <vector> #include <queue> using namespace std; int n; vector<int> road[1001]; bool check[1001]; int findNode(int index) { int k=9999; for(int j=0;j<road[index].size();j++) if (!check[road[index][j]] && k > road[index][j]) k = road[index][j]; re...
ALGO
0.999994
4.125855
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-12-27T00:41: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": "f96c77c2075...
3797dfb6-2044-45b0-8ecd-2763f02fe889
CodeTraning/usaco
scarySu/chapter1/1.2/gift1.cpp
/* ID: suliang3 TASK: gift1 LANG: C++ */ // Time to complete the task:2018.9.17 #include <cstring> #include <fstream> #include <iostream> using namespace std; int main() { freopen("gift1.in", "r", stdin); freopen("gift1.out", "w", stdout); char name[10][14], giver[14], mushroom[14], people[14] = {0}; ...
ALGO
0.99837
3.301979
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2018-09-11T15:50:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "4d624021d0...
f691fbd0-57a0-450c-9cdd-a43b2c6fa78e
ay2306/Competitive-Programming
codeforces/practice/almost_arithmetical_progression.cpp
#include <bits/stdc++.h> //For ordered_set #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define MOD 1000000007 #define test int t; cin>>t; while(t--) #define init(arr,val) memset(arr,val,sizeof(arr)) #define loop(i,a,b) for(int i=a;i<b;i++) #define loopr(i,a,b) for(int i=a;i>=b;i--) #de...
ALGO
0.999863
3.90517
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2019-08-29T14:45:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c15b0c0e3...
72591bbd-3bf3-4578-97a9-7021f4dea612
shatanshu3006/CODEFORCES
F_Segments_with_Small_Spread.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; struct stackz{ vector<ll> s,smin={LLONG_MAX},smax={LLONG_MIN}; void push(ll x){ s.push_back(x); smin.push_back(::min(smin.back(),x)); smax.push_back(::max(smax.back(),x)); } ll pop(){ ll res=s.back(); ...
ALGO
0.999922
4.220682
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2022-12-05T19:57:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "127d74d601d...
4ae78b99-64c1-4042-a1e3-fc79489274b2
sangwoo0727/Algorithm
Simulation/BOJ17135_캐슬디펜스.cpp
#include <iostream> #include <queue> #include <cstring> #include <utility> #include <algorithm> #define endl '\n' using namespace std; typedef struct { int n; int m; int dist; }Queue; vector <int> v; int N, M, D; int last_enemy; int MAX , kill_cnt; int dr[3] = { 0,-1,0 }; int dc[3] = { -1,0,1 }; bool board[17][17...
ALGO
0.999926
3.913014
{ "github_metadata": { "branch": "master", "commit_count": 1100, "repo_created_at": "2019-01-02T16:17:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bf232bc...
c08db351-b152-4f4d-8bfe-9f371d86795f
fingolfin/gap-osx-binary
include/singular/kernel/fglm/fglmgauss.h
// emacs edit mode for this file is -*- C++ -*- /**************************************** * Computer Algebra System SINGULAR * ****************************************/ /* * ABSTRACT - header file for the gauss - reducer * (used by fglm) */ #ifndef FGLMGAUSS_H #define FGLMGAUSS_H #include <kernel/stru...
ALGO
0.9994
4.629084
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-10-02T07:58:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "7c4c2b06c8...
145394cb-0e34-4b41-8226-02fe50667e12
mostafa-saad/MyCompetitiveProgramming
Olympiad/POI/official/2009/code/kon/prog/kons7.cpp
/************************************************************************* * * * XVI Olimpiada Informatyczna * * * * Zadanie: Kondu...
ALGO
0.999904
3.159909
{ "github_metadata": { "branch": "master", "commit_count": 439, "repo_created_at": "2017-02-05T22:26:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 415, "forks": 85, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e86c0...
79c48977-f2f1-40cd-879b-77cafea2c99e
owenowenisme/road-to-master
AP325/d030(stack).cpp
#include <bits/stdc++.h> #define ac ios_base::sync_with_stdio(false),cin.tie(0) #define mem(a, val) memset(a, val, sizeof(a)) #define pb push_back #define int long long #define F first #define S second const int maxn=1e8; const double EPS = 1e-7; using namespace std; void debug_out() { cerr << "]\n"<< flush; } template...
ALGO
0.999935
3.461372
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2022-10-21T05:10: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": "e66253e8b5d...
30b839ba-d04c-4ed8-be6a-8c04d6dae156
KuriKosho/pttk-gt
chuong-7-backtracking/tohop.cpp
// // // // Created by vuong on 4/4/2025. // // #include<iostream> #include<vector> #include<string> using namespace std; vector<int> x; // Mảng động để lưu tổ hợp hiện tại vector<string> results; // Lưu tất cả tổ hợp để tổng kết void printArray(const vector<int>& a) { string combination; for(int i = 0; i ...
ALGO
0.999659
5.918068
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-18T05:59:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b1d2fc29149...
e9ffc427-6724-40b6-84b4-82b6d860a564
mysh212/Coding
Flowers-2.cpp
// Author : ysh // 09/14/2022 Wed 8:39:04.05 // https://atcoder.jp/contests/dp/tasks/dp_q #include<bits/stdc++.h> using namespace std; #ifdef LOCAL #include<debug.h> #else #define debug(...) '*' #define printf(...) '*' #endif #define int long long struct tree{ vector<int>f; int n; tree(int n) { th...
ALGO
0.999993
3.755574
{ "github_metadata": { "branch": "master", "commit_count": 300, "repo_created_at": "2022-02-05T12:21:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0cadcbdb...
7864872b-5647-4175-97bf-4187ef45a71d
OrigenesZhang/-1s
codeforces/gym/Petrozavodsk Winter Training Camp, Saratov SU Contest 2017/CF101741F.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define FOR(i, a, b) for (int (i) = (a); (i) <= (b); (i)++) #define ROF(i, a, b) for (int (i) = (a); (i) >= (b); (i)--) #define REP(i, n) FOR(i, 0, (n)-1) #define sqr(x) ((x) * (x)) #define all(x) (x).begin(), (x).end() #de...
ALGO
0.999982
4.069084
{ "github_metadata": { "branch": "master", "commit_count": 1525, "repo_created_at": "2017-02-01T16:05:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "195a096...
a3ac34e4-144e-45d7-884e-3a44566c8650
gabrieltaets/Competitive-Programming
codeforces/590C.cpp
#include <bits/stdc++.h> #define UM 1000001 #define DOIS 1000002 #define TRES 1000003 using namespace std; int n, m, adj[4][4]; long long dist[1000010]; vector<int> v[1000010]; char tab[1005][1005]; long long int BFS(int s){ memset(dist,0x3f3f3f3f,sizeof dist); dist[s] = 0LL; queue<int> q; q.push(s); while(!...
ALGO
0.999889
3.424884
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-08-04T05:16: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": "b045eee308...
a009bfdd-2f48-47d5-83b9-5d482cf2091a
kronos/Task-solutions
csacademy.com/rounds/1-100/25B.cpp
#include <iostream> #include <algorithm> using namespace std; int a[100002]; int main() { int n, d = 0, left, right; cin >> n; if (n == 1) { d = 100000; } else { for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a, a+n); for (int i = 1; i < n; i++...
ALGO
0.99993
3.629572
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2009-09-02T21:40:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da5fcd5e8...
bf8ff75b-be9a-451a-8926-3b89ed121117
its-coder5128/leetcode
my-folder/problems/text_justification/solution.cpp
class Solution { public: string solve(vector<string>& words,int space,int rightMost,int i,int j) { string temp = ""; temp += words[i++]; while(i<j) { int s = space; while(s--) { temp.push_back(' '); } ...
ALGO
0.999969
5.837821
{ "github_metadata": { "branch": "main", "commit_count": 597, "repo_created_at": "2024-07-18T17:58: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": "94a2b52731...
28a9947c-35e4-4c10-88f0-79ecb44dfd2b
MohamedIdrissiAlami/MyCppJourney_Exercises_and_Projects
Algorithms_And_Problem_Solving/Level_2/Ex-04/Ex-04/Ex-04.cpp
#include <iostream> using namespace std; template<typename T> T ReadNumber(string Message = "") { T Number = 0; cout << Message; while ((cin >> Number).fail()) { //user didn't enter a valid number ... cin.clear(); cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); cout << "\nInvalid input try a...
ALGO
0.995476
3.461832
{ "github_metadata": { "branch": "main", "commit_count": 225, "repo_created_at": "2024-10-26T08:46: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": "dc66e44140...
69196d46-4089-4eaf-ae81-ce124eae4fe6
TungNguyen2000/CTDL-n-2
compressfolder.cpp
#include"compressfolder.h" using namespace std; int fo_count = 0; Node**fo_Arr; Node*fo_root; int fo_frequency[300] = { 0 }; string getfoldername(string path) { string result; string t = path; if (t[t.size() - 1] == '*') { t.erase(t.end() - 1); } if (t[t.size() - 1] == '/') t.erase(t.end() - 1); if (t[t...
TOOL
0.998543
3.825397
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-12-12T14:49:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3415ec1109...
676188c4-524c-412a-8cb3-f3283102dfe4
wzmw-zr/Code-Archive
2021/12/6/2.LeetCode332.cpp
/************************************************************************* > File Name: 2.LeetCode332.cpp > Author: > Mail: > Created Time: 2021年12月06日 星期一 14时35分25秒 ************************************************************************/ #include <iostream> #include <string> #include <vector> #include <queue>...
ALGO
0.999989
5.769448
{ "github_metadata": { "branch": "master", "commit_count": 1859, "repo_created_at": "2019-11-28T12:33: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": "5ce9d8d...
c46335d2-fa10-4e70-8e11-5fe5c594706b
vudinhan2525/DSA-UIT
Thi thuc hanh/Bai1-QuickSortMergeSortPair.cpp
#include<iostream> #include <cmath> using namespace std; struct toado{ int x,y; }; struct node{ toado data; node *pNext; }; node *Makenode(int r,int t){ node *newnode = new node(); newnode->data.x = r; newnode->data.y = t; newnode->pNext = NULL; return newnode; } struct nodelist{ node *pHead,*pTail; }; void p...
ALGO
0.999985
4.064908
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-05-10T06:09:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b39f3fd83471...
113a6aa7-9f7b-4aea-b3ce-43178fcdd476
phUR99/ps
Algospot/CHRISTMAS.cpp
#include <bits/stdc++.h> using namespace std; #define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) int psum[100050]; long long MOD[100050]; int cache[100050]; int T, N, K; const int mod = 20091101; int maxBuys(int k){ vector<int> ret(N+1, 0); vector<int> prev(k, -1); // vector<vector<int>>...
ALGO
0.999941
4.058417
{ "github_metadata": { "branch": "main", "commit_count": 223, "repo_created_at": "2024-05-19T12:33: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": "d1812df115...
b467411d-2f26-49ef-9a4f-9a4403976313
windystrife/UnrealEngine_NVIDIAGameWorks
Engine/Source/ThirdParty/IntelEmbree/Embree270/src/kernels/xeon/geometry/intersector_iterators.h
// ======================================================================== // // Copyright 2009-2015 Intel Corporation // // // // Licensed under the Apache License, Version 2.0 (the "License"); // // y...
ALGO
0.981201
6.385286
{ "github_metadata": { "branch": "4.18-GameWorks", "commit_count": 14, "repo_created_at": "2018-03-06T15:44:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 284, "forks": 176, "issues": 4, "pull_requests": 2 }, "file_meta": { "content_id"...
a2da66d9-b46b-4cdd-b09d-fc9eb4a60b45
Sohardbegraj/DSA-LEARNING
36.2.cpp
#include <iostream> using namespace std; // selection sort by while loop void selectionSort(int arr[], int n) { int i, j, minIndex; i = 0; while (i < n - 1) { // loop run till n-1 minIndex = i; j = i + 1; while (j < n) { if ...
ALGO
0.999977
4.9362
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-12-13T16:52: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": "a2bf2f7b700...
04989a39-3cba-4c8b-ab2f-19b8f34d7832
Code-Dilip/CPlusPlus-Programming
Binary_Trees/Left_View.cpp
#include<iostream> #include<queue> using namespace std; struct Node{ int data; struct Node *left = nullptr; struct Node *right = nullptr; Node(int val){ data = val; } }; void LeftView(struct Node *root){ if(root == nullptr){ return ; } queue<struct Node *>q; q.push...
ALGO
0.99997
4.623322
{ "github_metadata": { "branch": "main", "commit_count": 196, "repo_created_at": "2024-09-03T16:41: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": "200723797d...
616efe09-038b-4f3b-a2af-71f1edfa7884
phatcharin225/LinkedList
main.cpp
#include "../ChainNode/ChainNode.h" #include "LinkedList.h" #include <iostream> using namespace std; int main() { int maxSize, choice, i, e, value; cout << "66012646 <NAME>" <<endl; cout << "Enter maxSize of List : "; cin >> maxSize; LinkedList list(maxSize); do { list.display(); ...
TOOL
0.998181
3.841208
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-03-18T17:18: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": "fbe0155561cd...
de733621-7f2f-4d91-ada5-76ec4a2fc93c
joinge/beamformers
src/lca.hpp
#pragma once #include "Array.hpp" #include <complex> #include <memory> #include <vector> class Lca { private: int Ny; int Nx; int M; int Nw; int y_avg; int y_mean; int x_avg; int x_mean; float w_sum_min; int x,y,w,xx,yy; typedef std::complex<float> Data; typedef ...
ALGO
0.989275
5.197218
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-11-12T18:11:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c59acd42df...
b05fbd64-c2ee-491b-976e-ea8b019f9e1a
mgomez0/leetcode-cpp
graphs/pseudo_palindrome.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.999828
5.542198
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-08-26T17:12: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": "3ee4e3d2a...
6579703b-f745-44bb-8c8c-f8360f465f6a
vi-SSH-al/Data-Structure-and-Algorithms
Stack/smallest.cpp
#include<bits/stdc++.h> using namespace std; //next smallest element int* NSE(int arr[],int n) { stack<int> s; s.push(-1); int *ans=new int[n]; for(int i=n-1;i>=0;i--) { while(s.top() >= arr[i]) { s.pop(); } ans[i]=s.top(); s.push(arr[i]); } ...
ALGO
0.999936
4.138557
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-07-17T13:45: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": "0db89f4449e6...
e58d10a2-9b78-4fd4-ab8c-d00cd3371ef7
AnaCorralD/FAL
Examenes/2019/2019 - Primer Cuatri - 1/01.cpp
// <NAME> // E14 #include <iostream> #include <iomanip> #include <fstream> #include <vector> // funcio?n que resuelve el problema void resolver(std::vector<int> const & datos, std::vector<int> &salida, int const &L) { int i = 0; int cont = 1; while (i < datos.size() - 1) { if (datos[i] == datos[i + 1] || dato...
ALGO
0.999978
3.951663
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-03-27T19:28: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": "d560d155e7...
82904455-03c2-4ad2-9147-05996de32fee
Raemerrr/AlgorithmProblems
Algorithm/BOJ_3779_주기.cpp
#include <iostream> #include <vector> #include <string> using namespace std; int N; string str; vector<int> getPi(const string& pattern) { int n = pattern.size(); vector<int> pi(n, 0); for (int i = 1, j = 0; i < n; i++) { while (j > 0 && pattern[i] != pattern[j]) { j = pi[j - 1]; } if (pattern[i] == p...
ALGO
0.999187
4.047813
{ "github_metadata": { "branch": "master", "commit_count": 376, "repo_created_at": "2020-05-04T01:16: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": "443ac5fd...
7db8bb0f-967f-48c8-b5b7-d390f728b9ec
hoanhdung3/some-practices
The C++ Standard Library A Tutorial and Reference Second Edition/unary-predicates.cpp
// p.253 #include<iostream> #include<list> #include<algorithm> #include<cstdlib> // for abs() using namespace std; // predicate, which returns whether an integer is a prime number bool isPrime(int n){ n = abs(n); if(n==0 || n==1) return false; // 0 and 1 are no prime numbers // find divisor that divides w...
ALGO
0.999495
4.198024
{ "github_metadata": { "branch": "main", "commit_count": 130, "repo_created_at": "2022-01-23T09:25: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": "a316cc27fa...
0ea87dee-ee11-4b81-8590-c0bbf9d1cafd
52North/IlwisCore
core/geos/src/geomgraph/EdgeRing.cpp
/********************************************************************** * * GEOS - Geometry Engine Open Source * http://geos.osgeo.org * * Copyright (C) 2011 <NAME> <<EMAIL>> * Copyright (C) 2005-2006 Refractions Research Inc. * Copyright (C) 2001-2002 Vivid Solutions Inc. * * This is free software; you can re...
TOOL
0.97834
4.518465
{ "github_metadata": { "branch": "master", "commit_count": 6882, "repo_created_at": "2013-05-15T13:19:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 36, "forks": 13, "issues": 26, "pull_requests": 0 }, "file_meta": { "content_id": "891ec...
67c7912e-14d7-4b26-8355-a6de80fd9f33
mdarikrayhan/Competitive-Programming
codeforces/404/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define MOD 1000000007 #define F first #define S second #define PB push_back #define MP make_pair #define FOR(i,a,b) for(int i=a;i<b;i++) #define FORll(i,a,b) for(ll i=a;i<b;i++) #define yes cout<<"YES\n"; #define no co...
ALGO
0.999963
3.597739
{ "github_metadata": { "branch": "master", "commit_count": 8052, "repo_created_at": "2022-05-15T11:22:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d298f8...
691f435e-91bc-40e6-8f30-c8f1a1533718
md143rbh7f/competitions
topcoder/srm/471/EllysPlaylists.cpp
#include <string> #include <vector> using namespace std; bool okay[50][50]; int ways[1000][50], mod = 1000000007; class EllysPlaylists { public: int countPlaylists( vector<string> songs, int K ) { int n = songs.size(), ans = 0; for( int i = 0; i < n; i++ ) for( int j = 0; j < n; j++ ) { okay[i][j] = true...
ALGO
0.999429
4.543038
{ "github_metadata": { "branch": "master", "commit_count": 628, "repo_created_at": "2013-08-29T15:52:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "418a7d2e...
4b9ff33d-2ae5-422c-b092-ec8e7e31e746
Sami-BA/IMT2020
project2/extendedbinomialtree.cpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2001, 2002, 2003 <NAME> Copyright (C) 2003 <NAME> Copyright (C) 2005 StatPro Italia srl Copyright (C) 2008 <NAME> This file is part of QuantLib, a free-software/open-source library for financial quantitative analyst...
ALGO
0.999086
6.709054
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-02-24T15:56:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2686ccec1...
fdb25048-00e3-4aa0-af51-ed4e05e3e29d
verma16Ayush/leetcode
21.merge-two-sorted-lists.cpp
/* @lc app=leetcode id=21 lang=cpp * [21] Merge Two Sorted Lists */ /** Definition for singly-linked list. */ #include<bits/stdc++.h> using namespace std; struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ...
ALGO
0.999912
6.663195
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2021-05-20T10:20: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": "13995deb1...
88c38288-848e-41b3-9b4e-8557fb983316
bgg-lee/programming-reference
VIF_git/GSDS-Qual/ancient/C++/Algorithms/RodCutting.cpp
// Dynamic Programming for Rod Cutting problem // Complexity = O(n^2) #include <algorithm> #include <iostream> using namespace std; void cutRod(int prices[], int n, int r[], int s[]) { r[0]= 0; int q; for (int j = 1; j<=n; j++){ q = -10000; for (int i = 1; i<=j ; i++){ if(q<prices[i]+r[j-i]){ q = prices...
ALGO
0.999897
4.24748
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-13T02:25: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": "bf74d6ccc614...
5c382c80-9e3f-45ca-a29d-78ba299f419a
nnersisy/wordle
schedwork.cpp
#ifndef RECCHECK #include <set> #include <iostream> #include <fstream> #include <string> #include <vector> #include <map> #include <algorithm> #endif // add or remove necessary headers as you please #include "schedwork.h" using namespace std; // a constant that can be used to indicate an INVALID // worker ID if tha...
ALGO
0.987988
5.145967
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-03-31T00:54: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": "ff2684733987...
7b90561b-466a-4912-bd5b-4555a8f7e53e
alice2024B/b-squedas
busqueda_lineal/main.cpp
#include <iostream> #include "Cola.h" int main() { Cola MiCola; persona x; int opcion; do { std::cout << "\nMenu:\n"; std::cout << "1. Dar de alta solicitud\n"; std::cout << "2. Elaborar constancia\n"; std::cout << "3. Buscar solicitud\n"; std::cout << "4. Salir...
TOOL
0.940927
4.645477
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-01T04:56: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": "53f718ada262...