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
f0483911-8d10-4d54-91e5-f1bab9ae830e
aukgit/C-Programming-Basic
10.3 cleaning code for 3 variable bigger number - modular.cpp
#include<stdio.h> #include<conio.h> // <NAME> // clean code // modular int compare_two_numbers_return_big(int x, int y){ if(x >= y){ return x; } else { return y; } } int compare_three_numbers_return_big(int x, int y, int z){ int bigger = compare_two_numbers_return_big(x,y); if(...
ALGO
0.999368
3.142946
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2015-01-08T18:55:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc6c9f689...
a945c370-2fb2-463d-b78e-ce26c3f08cfa
ValentinaManferrari/CSC317-ComputerGraphics
1-computer-graphics-raster-images/src/rgb_to_hsv.cpp
#include "rgb_to_hsv.h" #include <cmath> #include <algorithm> void rgb_to_hsv( const double r, const double g, const double b, double & h, double & s, double & v) { //////////////////////////////////////////////////////////////////////////// double red = r / 255.0; double green = g / 255.0; double ...
ALGO
0.993288
5.5974
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2022-09-19T01:43:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97cf219fc64...
83a97d00-77c9-45fb-9d6b-077514514402
ishandutta2007/codeforces-c
cdkrot/normal/1209/G1.cpp
// <NAME> (2019) #include <bits/stdc++.h> using std::cin; using std::cout; using std::cerr; using std::vector; using std::map; using std::array; using std::set; using std::string; using std::queue; using std::pair; using std::make_pair; using std::tuple; using std::make_tuple; using std::get; using std::min; usin...
ALGO
0.999864
4.418437
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17: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": "174b9e81bb30...
37a74279-e35d-4640-8305-3f8ef08dca87
VijayKYadav/LeetCode-2025
February/Max Points on a Line.cpp
I Approach (Using Brute force) class Solution { public: int maxPoints(vector<vector<int>>& points) { int n=points.size(); if(n==1) return 1; int maxP=0; for(int i=0;i<n-1;i++) { for(int j=i+1;j<n;j++) { int count=2; ...
ALGO
0.999984
5.726889
{ "github_metadata": { "branch": "main", "commit_count": 298, "repo_created_at": "2025-01-01T07:10: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": "7e9e003dd9...
9462a9f1-0fe2-4839-91cc-cdf342850676
Niden36/chess
Chess game/pawns.cpp
#include <iostream> #include "pawns.h" using namespace std; void whitepawn(int n, int m, int moves[10][10]) { int x1, x2, x3, y1; x1 = n; y1 = m - 1; x2 = x1 - 1; x3 = x1 + 1; if (moves[x1][y1] == 0) moves[x1][y1] = 1; if (moves[x2][y1] >= 66 && moves[x2][y1] <= 83) moves[x2][y1] = 2; if (moves[x3][y1] >= ...
ALGO
0.998962
3.525043
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-09-17T19:53: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": "7159188fbb...
72f88aeb-adb4-4cf2-9c13-f718fe865c6d
emonosuke/cplib
lib/ds/segment_tree.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; // For Range Minimum Query class SegmentTree{ public: ll size; vector<ll> dat; const ll MAXVAL = (1LL << 31) - 1; SegmentTree(ll n){ size = 1; while(size < n) size *= 2; dat = vector<ll>(2*size - 1, MAX...
ALGO
0.999886
4.809899
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-02-14T06:10: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": "f380a94098...
1dcf4207-1889-4ce7-b930-31525e35b7ab
unb-academic/tep
exercises/2023/2/01/b/code.cpp
/* * MIT License * * Copyright (c) 2023 UnB * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merg...
ALGO
0.999989
4.793118
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2023-04-02T22:40:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ce45aaf4f4a...
8204d323-3c2f-47d1-a576-c2dd12ec9c84
atodor/Motifs
data.cpp
#include <iostream> #include <fstream> #include <sstream> #include <vector> #include <string> #include <cstring> #include <cstdlib> #include <sqlite3.h> using namespace std; void readGraph(char* fileName, vector<pair<int, int> > &edges, vector<double> &probabilities) { ifstream listFile(fileName); if(listFile.fail(...
DATA
0.928521
4.195988
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2025-06-30T11:34: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": "2d0915676e...
9a687e6a-9def-49e8-a742-0200e7d5c6d0
MouryaVishal/A2Z_Questions
13 Binary Tree/2 Medium/8 Vertical Order Traversal of a Binary Tree.cpp
#include<bits/stdc++.h> using namespace std; 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), left(left), right(...
ALGO
0.999989
5.116107
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2023-04-26T19:42: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": "18e39670c...
a264bbdb-499b-43fa-a067-d10c09f5ec46
believe-that-23/cf_practise
774/c.cpp
#include <bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> #define endl "\n" #define fi first #define se second #define pb push_back #define ppb pop_back() #define pf push_front #define ppf pop_front() #define eb emplace_back #define mp make_pair #define ll long long #define ll...
ALGO
0.999605
3.426331
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2021-05-20T14:17: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": "c21dd40aa56...
dfacb163-6cf1-4fe6-b174-72f282d1297f
mashfiqur05/Competitive_Programming
Graph_Theory/bi-colouring.cpp
///--- In the name of ALLAH ---/// #include<bits/stdc++.h> using namespace std; #define endl "\n" #define MX 200005 int n, m; vector<int> g[MX]; int vis[MX], colour[MX]; bool isPossible = true; void dfs (int vertex, int c) { if (vis[vertex]) { if (colour[vertex] == c) return; else ...
ALGO
0.999969
4.404424
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-11-24T08:20: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": "51ae91a0080...
60fbffed-62de-4e55-b42f-8a015b65187e
chivalry123/otkpp
otkpp/solvers/lbfgsb/LBFGSB.cpp
#include "LBFGSB.h" #include "lbfgsb_utils.h" #include <cstring> #include <typeinfo> LBFGSB::Setup::Setup(int m) : m(m) { } bool LBFGSB::Setup::isCompatibleWith(const Solver &s) const { return (typeid(s) == typeid(const LBFGSB &)); } LBFGSB::LBFGSB(Function::DerivEvalType gEvalType) : NativeGradientSolver(gEv...
ALGO
0.996776
5.956567
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2015-05-07T15:59:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f84f92527...
90442bcd-c7d0-4f7a-8a40-3a0a456c9362
TLacault/LeetCode
2536-determine-if-two-events-have-conflict/determine-if-two-events-have-conflict.cpp
class Solution { public: bool haveConflict(vector<string>& event1, vector<string>& event2) { string s_h1; s_h1.push_back(event1[1][0]); s_h1.push_back(event1[1][1]); int h1 = stoi(s_h1); string s_m1; s_m1.push_back(event1[1][3]); s_m1.push_back(event1[1][4]); int m1 = stoi(s_m1); string s_h2...
ALGO
0.999787
5.399256
{ "github_metadata": { "branch": "main", "commit_count": 220, "repo_created_at": "2023-11-04T16:46:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73c299e15f...
73804fa8-8389-469f-8a33-bde699164e90
ishandutta2007/codeforces-a
aishiteru/normal/1342/A.cpp
#include<bits/stdc++.h> #define it register int #define ct const int #define il inline using namespace std; typedef long long ll; #define rll register ll #define cll const ll typedef double db; #define rdb register db #define cdb const db typedef long double ldb; typedef unsigned long long ull; #define pb push_back #de...
ALGO
0.999464
3.520869
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51: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": "d62182f9bdf5...
bfe46af8-8dac-4ead-9c65-ce11204634e5
nimaft97/OpenCLProjects
matrix-multiplication/MatrixMul.cpp
#include "include/Data.h" #include "include/common.h" #include <iostream> #include <string> #include <iterator> #include <algorithm> // OpenCL includes #include <CL/cl.h> int main() { // initialize OpenCL cl_int err = CL_SUCCESS; cl_platform_id platform_id; cl_device_id device; cl_context context; ...
ALGO
0.985988
5.500526
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2023-12-26T21:31:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a60827f8e70...
b267299e-3b76-407d-8c1f-af61809bb5d5
buiducviet/Applied_algorithm
Segment Tree Simulation - query Max.cpp
#include<bits/stdc++.h> using namespace std; struct query { string s; int l; int r; }; const int MaxN= 10000; int n; int m; int l, r; int a[MaxN], st[MaxN][MaxN]; vector<query> Q; void input(){ cin >> n; for (int i = 1 ; i <= n; i++){ cin >> a[i]; } cin >> m; for(int i = 0; i < ...
ALGO
0.999943
5.002348
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2024-03-19T16:07: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": "73a6985996...
c26955d0-474a-408b-bb01-9bc568d6e907
ishandutta2007/codeforces-n
neal/normal/1073/G.cpp
// https://probablydance.com/2016/12/27/i-wrote-a-faster-sorting-algorithm/ // Copyright <NAME> 2016. // Distributed under the Boost Software License, Version 1.0. // (See http://www.boost.org/LICENSE_1_0.txt) #include <cstdint> #include <algorithm> namespace detail { inline unsigned int to_unsigned_or_b...
ALGO
0.999915
6.179324
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:35: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": "316204b49adc...
22540c49-2d39-4bac-9894-bed92943f67e
penthaapatel/LeetCodeSolutions
383_RansomNote.cpp
/* 383. Ransom Note Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from the magazines ; otherwise, it will return false. Each letter in the magazine string can only be used once in your ran...
ALGO
0.999475
5.976644
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2019-09-10T20:32: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": "b70fc21aa...
69a04f7d-db41-4e91-bf60-e79875fabb3e
arjan-bal/competitive-coding-library
cpp/Algebra/simplex.cpp
// attribution: https://codeforces.com/contest/1430/submission/95287878 // should work for upto 50 variables /** * Author: Stanford * Source: Stanford Notebook * License: MIT * Description: Solves a general linear maximization problem: maximize $c^T x$ subject to $Ax <= b$, $x >= 0$. * Returns -inf if there is no ...
ALGO
0.999976
4.89224
{ "github_metadata": { "branch": "master", "commit_count": 101, "repo_created_at": "2019-07-17T08:34:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e06d39d...
1c741387-7b4f-4635-9250-b123a9f9d296
Joshua1023/DS_OJ
1236.cpp
#include<iostream> #include<stdio.h> #include<cstring> using namespace std; const int maxN = 200010; struct Edge { int to, next, w; } e[maxN]; int n, m, cnt, p[maxN], Dis[maxN]; int In[maxN]; bool visited[maxN]; void Add_Edge(const int x, const int y, const int z) { e[++cnt].to = y; e[cnt].next = p...
ALGO
0.999969
3.825915
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-02-26T09:00: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": "899e5ae6c5...
373a6990-c6d3-4f8e-b674-91abca960da8
opencv/opencv_contrib
modules/fastcv/include/opencv2/fastcv/warp.hpp
/* * Copyright (c) 2024-2025 Qualcomm Innovation Center, Inc. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #ifndef OPENCV_WARP_HPP #define OPENCV_WARP_HPP #include <opencv2/imgproc.hpp> namespace cv { namespace fastcv { /** * @defgroup fastcv Module-wrapper for FastCV hardware accelerated functio...
ALGO
0.976386
7.208532
{ "github_metadata": { "branch": "4.x", "commit_count": 4557, "repo_created_at": "2013-09-11T13:28:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9757, "forks": 5828, "issues": 553, "pull_requests": 88 }, "file_meta": { "content_id": "00...
cac957e8-54f0-49c7-9232-7d0057a6cc47
igankevich/arma
src/generator/ar_model_surf.cc
namespace { template <class T> void ar_generate_surface( arma::Array3D<T>& zeta, arma::Array3D<T> phi, const arma::Domain3D& subdomain ) { using namespace arma; const Shape3D fsize = phi.shape(); const Shape3D& lbound = subdomain.lbound(); const Shape3D& ubound = subdomain.ubound(); const int t0 = ...
ALGO
0.9261
5.316932
{ "github_metadata": { "branch": "master", "commit_count": 416, "repo_created_at": "2017-04-01T09:51:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2fe95126...
9714162a-7fc6-4108-b0dc-1a478db3bff2
hmd0404-nitk-eee/algorithms_and_problems
Arrays_and_LinkedLists/Q14_LinkedList.cpp
/* CS202 Assignment Name: <NAME> - 191EE212 This program uses Linked List implementation of sparse matrices. The progran inputs matrix by rows. The program outputs the matrix in form of triplets (i, j, aij) */ #include <iostream> #include "LinkedListImpl.h" using namespace std; int main() { LinkedList matrix; i...
ALGO
0.993675
4.229282
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-08-30T07:04: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": "82ea5225a...
d46ff2ce-d7c4-4ced-b792-822793a27aad
ChaRob/ProblemSolve
백준/Silver/1189. 컴백홈/컴백홈.cc
#include <iostream> using namespace std; int graph[5][5]; int cnt[5][5][26]; bool visited[5][5]; int dir[4][2] = { {-1,0},{1,0},{0,-1},{0,1} }; int dfs(const int& x, const int& y, int len, int& R, int& C, int& K) { if (x == 0 && y == C - 1) { if (len == K) { return 1; } } if (len > K) { return 0; } cnt...
ALGO
0.999863
4.198183
{ "github_metadata": { "branch": "main", "commit_count": 969, "repo_created_at": "2023-03-02T05:44: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": "83cf55fc42...
b2592d28-f61c-4db9-93d0-8c8fffeb10fd
Camithilwen/Code-Cloning-Analysis
src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p03409/s196937195.cpp
#include <bits/stdc++.h> using namespace std; int main() { int N, a, b, c, d, ans = 0; cin >> N; priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> A, B; for (int i = 0; i < N; i++) { cin >> a >> b; A.push(make_pair(a, b)); } for (int i = 0; i < N; i++) { cin >>...
ALGO
0.999737
3.82146
{ "github_metadata": { "branch": "main", "commit_count": 243, "repo_created_at": "2025-06-06T16:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "1ca4f80024...
415b4dcb-98c2-4b74-b7ad-6836d02d8cb7
jsarthak/LeetCode
first_missing_positive.cpp
// Given an unsorted integer array nums, find the smallest missing positive integer. // You must implement an algorithm that runs in O(n) time and uses constant extra space. #include <bits/stdc++.h> using namespace std; class Solution { // set<int> vals; // for(auto x : nums){ // vals.insert(x); ...
ALGO
0.999968
5.264161
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2021-07-08T16:34:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69b1ede2d...
6876295e-6ab1-46f5-aca7-ed077bad8405
nexes/leetcode
include/medium/combination_sum.h
#pragma once #include <vector> namespace Leet::Medium { // Given an array of distinct integers candidates and a target integer target, // return a list of all unique combinations of candidates where the chosen numbers // sum to target. You may return the combinations in any order. The same number // m...
ALGO
0.999821
6.745678
{ "github_metadata": { "branch": "master", "commit_count": 685, "repo_created_at": "2020-08-28T16:23:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c14fd4fb...
73a45cd0-b48a-4216-a16c-cca2376cbd1c
YanWQ-monad/SUSTech_CS205_Projects
Project2_CalculatorEx/src/number.cpp
#include <algorithm> #include <complex> #include <iostream> #include <iterator> #include <limits> #include <string> #include <utility> #include "constant.h" #include "error.h" #include "eval.h" #include "number.h" using std::back_inserter; using std::complex; using std::copy; using std::find; using std::find_if; usin...
ALGO
0.999813
6.273623
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2022-09-21T17:41:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 167, "forks": 14, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2cc3c6...
be22deca-bc9f-456f-8356-5b8d69b9b06d
lijiansong/stl-impl
stl-impl/examples/SEARCH1.CPP
// This example compiles using the new STL<ToolKit> from ObjectSpace, Inc. // STL<ToolKit> is the EASIEST to use STL that works on most platform/compiler // combinations, including cfront, Borland, Visual C++, C Set++, ObjectCenter, // and the latest Sun & HP compilers. Read the README.STL file in this // directory ...
ALGO
0.984573
4.656228
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-03-10T06:42:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 19, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c9cf9a27...
02416ab1-3f0d-4dc6-aaaa-9c5f652393e5
fanjizhao/zonda
common/config/ZkConfigImpl.h
#ifndef ZONDA_COMMON_CONFIG_ZK_CONFIG_H_ #define ZONDA_COMMON_CONFIG_ZK_CONFIG_H_ #include <zookeeper.h> #include <map> #include <set> #include "IConfig.h" #include "thread/ThreadLock.h" #define ZOOKEEPER_ADDR_LIST_ENV_VAR "ZOOKEEPER_ADDR_LIST" using namespace std; namespace zonda { namespace common { class Wat...
CONFIG
0.907674
6.068318
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2013-02-28T06:24:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f94253a19...
947ef4d7-e245-430f-8b5d-19c3c25b6451
JaryoGuzoKiller/Problem-Solving
W1_A.cpp
#include<iostream> #include<vector> using namespace std; int T; string s; int k; vector<char>* arr = { NULL, }; int main() { cin >> T; while (T--) { cin >> s; cin >> k; arr = new vector<char>[k+1]; int garo; if (s.size() % k != 0) garo = s.size() / k + 1; else garo = s.size() / k; for (int i...
ALGO
0.999892
3.783391
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2021-09-12T12:36: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": "99c3e36cfc1...
fca74295-a1b3-464f-815c-ebd335579469
hukunhukun/adbs_lab_Storage-and-Buffer-Manager
lru.h
#include <iostream> #include <unordered_map> using std::cout; using std::unordered_map; //定义一个链表类维护最近最少访问的,最近最少访问的放在头节点 struct LRUEle{ LRUEle(){frame_id=-1;} LRUEle(int id){frame_id=id;} int frame_id; LRUEle* prev; LRUEle* next; }; class LRUList{ public: LRUList(){ size = 0; he...
ALGO
0.98585
3.58145
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-12-15T16:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a934a2b86e...
4f279178-c8f5-475e-b4cb-7c2f90d5ffc0
Xungerrrr/SYSU-CV
Final Project Part 2/Hough.h
#include <cstdio> #include <cstdlib> #include <cmath> #include <vector> #include "CImg.h" using namespace cimg_library; using namespace std; #define VERBOSE 1 #define NOEDGE 0 #define EDGE 255 class Point { public: int a, b, v; Point(int _a, int _b, int _v) { a = _a; b = _...
ALGO
0.988216
4.114529
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-03-18T08:28: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": "a4c72766aa...
0b224f70-49e2-4dd7-bf8d-b67ee577bbef
gracehoppercenter/oldict
docs/sections/csc222/resources/HSprogContests/UMD/1999/p1/solution.cpp
//----------------------------------------------------------------------- // computer networks //----------------------------------------------------------------------- #include <iostream> #include <assert.h> using namespace std; //----------------------------------------------------------------------- // main // ...
ALGO
0.998817
4.18361
{ "github_metadata": { "branch": "main", "commit_count": 245, "repo_created_at": "2025-02-25T16:00:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a4be05b3fa4...
198a9e4a-5e01-4934-9940-29c9eb76364f
pedrotzcm/Reconstructing_DNA_with_Graph_structure
DNA-Reconstruction/graph.cpp
#include "graph.h" using namespace std; void vertice::apaga_aresta(vertice *receptor){ for(int i = 0; i < vizinhos.size(); i++){ if(vizinhos[i]->fragmento_de_DNA == receptor->fragmento_de_DNA){ vizinhos.erase(vizinhos.begin() + i); break; } } } vertice::verti...
ALGO
0.999371
3.497798
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-10-03T15:57: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": "f404fa6edeb1...
0980f4f5-0e06-4e6c-89ea-9204cf46d6b5
MatsuTaku/succinct-tries
src/include/strie/dfuds.hpp
#ifndef SUCCINCT_TRIES__DFUDS_HPP_ #define SUCCINCT_TRIES__DFUDS_HPP_ #include "bp.hpp" #include <string> #include <cstring> #include <string_view> #include <iterator> #include <type_traits> #include <cassert> #include <exception> #include <vector> #include <queue> #include <tuple> #include <initializer_list> #includ...
ALGO
0.986455
7.253341
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2021-10-27T11:46:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ecba897269...
44d04e89-f9fd-4fca-920f-5fb8f6e03cdf
allenge007/my_cpp_code
gym/Anton Trygub Contest 2/j.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 1e6 + 5; int p[maxn], q[maxn], vis[maxn], ans[maxn]; void solve() { int n, tot = 0, mini; scanf("%d", &n); mini = n + 1; for(int i = 1; i <= n; i ++) scanf("%d", &p[i]), vis[i] = 0, ans[i] = 0; for(int i = 1; i <= n; i ++) { if(...
ALGO
0.999958
3.71025
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2024-09-12T14:17: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": "1d4fd3842...
24ba6a2f-4bc1-4fc4-901d-edad4521e974
ishandutta2007/codeforces-s
septimelon/normal/1181/B.cpp
#include <bits/stdc++.h> using namespace std; string sum(string ss1, string ss2) { int add = 0; string ans = ""; int ind1 = ss1.size()-1; int ind2 = ss2.size()-1; char nex; while (ind1 >= 0 && ind2 >= 0) { nex = ss1[ind1]+ss2[ind2]-'0'+add; ind1--; ind2--; if (n...
ALGO
0.999955
3.626112
{ "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": "1c8925f3f4f0...
43c7a213-525e-4005-9975-e0ed1b77b8a8
showmanlee/HowCanISolveThisQuestion
BOJ/25000/25513.cpp
// 빠른 오름차순 숫자 탐색 // https://www.acmicpc.net/problem/25513 #include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; typedef pair<int, int> pr; typedef pair<pr, int> prr; int dx[4] = {-1, 0, 1, 0}; int dy[4] = {0, 1, 0, -1}; int main(void) { cin.tie(NULL); ios_base::sync_with_s...
ALGO
0.999962
4.512901
{ "github_metadata": { "branch": "master", "commit_count": 1741, "repo_created_at": "2020-09-16T11:55:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cad938e...
c7564286-e980-4960-99b2-678c8d1b7ca3
cea-trust-platform/trust-code
src/VDF/Sources/Sources_It_Eval/Eval_Puiss_Th_VDF_Elem.h
/**************************************************************************** * Copyright (c) 2024, CEA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retai...
ALGO
0.925856
5.355666
{ "github_metadata": { "branch": "master", "commit_count": 9704, "repo_created_at": "2021-03-29T11:57:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 59, "forks": 19, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "2cbb2b...
e38f6d52-d6ff-4646-b1e9-f7dae18d0e94
vietnakid/ACM-ICPC
Samsung/SCPC2019/RollingBall.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector< vector<int> > vvi; typedef vector<ll> vl; typedef vector< vector<ll> > vvl; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector< vii> vvii; #define INF 1000000007 #define INFLL 100000000000000000...
ALGO
0.995992
3.997744
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2018-04-07T11:55: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": "2de64652c...
c3f02866-fdf6-436e-9dcd-2f2d5481a218
cyp0922/SWEA
[모의 SW 역량테스트] 보물상자 비밀번호_5658번.cpp
#include<iostream> #include<queue> #include<vector> #include<cstring> #include<stdio.h> #include<algorithm> #include<cmath> using namespace std; int N,K; char arr[28]; vector<int> v; bool cmp(int a, int b) { return a > b; } void play() { int slade = N / 4; int idx = 0; for (int r = 0; r < slade; r++) { for ...
ALGO
0.999573
4.511267
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-04-18T09:35:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd9471ef3b9a...
39a5fc5f-90f3-4507-b173-b2d29d1b7f36
openxrlab/xrsfm
src/geometry/essential.h
#ifndef XRSFM_SRC_GEOMETRY_ESSENTIAL_H #define XRSFM_SRC_GEOMETRY_ESSENTIAL_H #include <array> #include "base/map.h" #include "utility/global.h" namespace xrsfm { double sampson_error(const matrix3 &E, const vector2 &p1, const vector2 &p2); void decompose_essential(const matrix3 &E, matrix3 &R1, matrix3 &R2, ...
ALGO
0.998569
6.379139
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-08-26T00:27:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 208, "forks": 26, "issues": 12, "pull_requests": 0 }, "file_meta": { "content_id": "9e8e432b...
ece50d92-6eee-4183-8f16-8a2bb35c216b
grain1101/LeetCode
C++/191_NumberOf1Bits.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <unordered_set> #include <cstring> #include <algorithm> #include <stack> #include <queue> #include <cstdio> #include <cstdlib> #include <sstream> #include <limits> #include <set> #include <string> using namespace std; void show(auto& result){ ...
ALGO
0.999898
5.20056
{ "github_metadata": { "branch": "master", "commit_count": 445, "repo_created_at": "2017-01-21T06:07:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "40fefce2...
e8f75f55-2b2a-4fda-99a6-502b77a6cec0
openmm/openmm
plugins/rpmd/openmmapi/src/RPMDIntegrator.cpp
/* -------------------------------------------------------------------------- * * OpenMM * * -------------------------------------------------------------------------- * * This is part of the OpenMM molecular simulation toolkit originating from * ...
ALGO
0.994012
6.852607
{ "github_metadata": { "branch": "master", "commit_count": 7207, "repo_created_at": "2013-05-20T17:42:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1644, "forks": 558, "issues": 408, "pull_requests": 22 }, "file_meta": { "content_id": "...
00a6feaf-bdb4-43d1-ad4f-ca414c0aeba0
iPhreetom/ACM
BOJ/solo9/C.cpp
#include<bits/stdc++.h> using namespace std; int pay[26];//已经处理过的花费 int place_min[26]; int book[25][200];//只有位置的记录 int cost[25][25][2];//每一个位置的花费最小值? int n,m; string s[25]; string c[25]; int a[25][25]; int main(){ ios::sync_with_stdio(false); cin.tie(0); cin>>n>>m; memset(book,0,sizeof(book)); memset(cost,0,size...
ALGO
0.999947
3.152884
{ "github_metadata": { "branch": "master", "commit_count": 143, "repo_created_at": "2018-07-29T09:44: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": "3f483621...
cad69a31-1451-4ca3-a955-654e6577e739
neha-mundase20/DSA_Problems_GFG
Difficulty: Medium/k largest elements/k-largest-elements.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution{ public: vector<int> kLargest(int arr[], int n, int k) { sort(arr,arr+n,[](int a,int b){ return a>b; }); vector<int>answer; for(int i=0...
ALGO
0.999961
6.433746
{ "github_metadata": { "branch": "main", "commit_count": 233, "repo_created_at": "2024-01-28T11:01: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": "1d6f56d870...
aad4ce0e-1b3e-4b7a-a02d-0a647a694201
Lambda-Numworks/Lambda
apps/shared/continuous_function_cache.h
#ifndef SHARED_CONTINUOUS_FUNCTION_CACHE_H #define SHARED_CONTINUOUS_FUNCTION_CACHE_H #include "../graph/graph/graph_view.h" #include <ion/display.h> #include <poincare/context.h> #include <poincare/coordinate_2D.h> namespace Shared { class ContinuousFunction; class ContinuousFunctionCache { public: static conste...
TOOL
0.955934
7.541658
{ "github_metadata": { "branch": "lambda-dev", "commit_count": 12279, "repo_created_at": "2022-03-16T00:03:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 16, "forks": 2, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "85...
66dad9d9-b307-445f-bb56-8f631b82b8df
trilinos/Trilinos
packages/intrepid2/src/Shared/Intrepid2_DataCombiners.hpp
// @HEADER // ***************************************************************************** // Intrepid2 Package // // Copyright 2007 NTESS and the Intrepid2 contributors. // SPDX-License-Identifier: BSD-3-Clause // ***************************************************************************** ...
ALGO
0.945134
7.52351
{ "github_metadata": { "branch": "master", "commit_count": 104031, "repo_created_at": "2015-11-16T19:39:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 593, "issues": 263, "pull_requests": 61 }, "file_meta": { "content_id":...
ab78db2a-a891-4c54-83b6-40b83e22d11c
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/08/0802/personal_submission/cf269c_openmi.cpp
void solve() { int n, m; cin >> n >> m; vi dir(m, -1), flow(m); vvc<pii> g(n); for (int i = 0; i < m; ++i) { int u, v, c, d = -1; cin >> u >> v >> c; --u, --v; flow[i] = c; g[u].emplace_back(v, i); g[v].emplace_back(u, ~i); } queue<int> qu; ...
ALGO
0.999981
4.719143
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "54a2...
6dd358be-1a1a-4f4f-84c1-5fb6c084f64a
uakfdotb/tsharesim
src/Dijkstra.cpp
#include "Dijkstra.h" struct QueueComp { bool operator()( const pair<double, VertexID>& a, const pair<double, VertexID>& b ) const { return ( a.first >= b.first ); } }; Dijkstra::Dijkstra(Graph& g):graph(g){ VertexList(0).swap(nodelist); for (int i = 0; i < graph.vertices().size(); i++) { nodelist.push_back(g...
ALGO
0.999758
4.441913
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2014-04-27T02:36:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "797e58eb4b...
ce47f8f1-52c2-46db-9c94-1f551aae77cc
behnejad/quera
contest-44079.cpp
#include <iostream> #include <iomanip> #include <cmath> #include <vector> #include <string> #include <algorithm> using namespace std; int months[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int days_arr[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; int get_mount(int day) { for (int m = ...
ALGO
0.999946
3.890449
{ "github_metadata": { "branch": "master", "commit_count": 298, "repo_created_at": "2020-04-16T03:16:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cfea7222...
a0ec4d6d-0c5a-413f-9f48-ddabb47dcf74
Badenhoop/chair_manipulation
chair_manipulation_grasp_detection_advanced/include/chair_manipulation_grasp_detection_advanced/grasp_sampler.h
#ifndef CHAIR_MANIPULATION_GRASP_DETECTION_ADVANCED_GRASP_SAMPLER_H #define CHAIR_MANIPULATION_GRASP_DETECTION_ADVANCED_GRASP_SAMPLER_H #include "model.h" #include "grasp_hypothesis.h" #include "multi_arm_grasp.h" #include "gripper.h" #include "ros/ros.h" #include <random> #include <pcl/search/kdtree.h> #include <geom...
ALGO
0.965436
6.888952
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-06-07T08:06:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ef59fbc1b...
f44c51c8-02b0-4957-bb8a-72499c81a4ac
ZeroNerodaHero/USACO-Training-Gateway
1.6/pprime.cpp
/* ID: billyz43 PROG: sprime LANG: C++ */ #include <iostream> #include <math.h> #include <fstream> using namespace std; int primenum[100000]; int size = 0; bool isprime(int n){ for(int i = size--; i >= 0; i--){ //if((n%primenum[i])==0){ if((n%3)==0){ return false; } } ret...
ALGO
0.999768
3.425559
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2018-08-07T01: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": "b5b6243ec...
2d406d6f-8950-4087-b072-6f18fba96219
chrzyki/candc
candc/src/lib/tree/gis.cc
// C&C NLP tools // Copyright (c) Universities of Edinburgh, Oxford and Sydney // Copyright (c) <NAME> // // This software is covered by a non-commercial use licence. // See LICENCE.txt for the full text of the licence. // // If LICENCE.txt is not included in this distribution // please email <EMAIL> to obtain a copy. ...
ALGO
0.959298
4.290431
{ "github_metadata": { "branch": "master", "commit_count": 132, "repo_created_at": "2018-02-13T10:28:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c63d2...
60eb5c01-045f-4c91-86e2-f91d7d1b5d11
KoreaFriedChips/Competitive-Programming
USACO Bronze/2020 December/DaisyChains.cpp
#include <iostream> #include <algorithm> #include <cstring> #include <iomanip> #include <vector> using namespace std; #define ll long long #define pb push_back int arr[105]; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { cin >> arr[i]; } int count = 0; //loop throug all ...
ALGO
0.999874
4.025703
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2021-03-15T19:29:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f4c01ab9f...
5a5e5e51-e0b8-4e64-9e9e-38f7b5893a66
batichotti/Estrutura-de-Dados-1
aulas/lista_encadeada/lista_encadeada.cpp
#include "lista_encadeada.hpp" #include <cstdio> #include <iostream> using namespace std; LinkedList::LinkedList() { this->head = nullptr; } LinkedList::~LinkedList() { Node* node = this->head; while (node) { Node* next = node->next; delete node; node = next; } this->head ...
ALGO
0.997191
4.553948
{ "github_metadata": { "branch": "main", "commit_count": 186, "repo_created_at": "2025-04-01T16:09:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68710da825...
999b9233-2050-4ed2-9d0b-bd25324ac54f
YouwonBae/AlgorithmStudy
Baekjoon/11437/11437.cpp
#include <iostream> #include <vector> #define MAX 50001 using namespace std; int N; // 2 <= N <= 50000 int M; // 1 <= M <= 10000 vector<int> tree[MAX]; int ch[MAX]; int parent[MAX]; int level[MAX]; void MakeTree(int n, int p_n, int depth) { if (ch[n] == false) { ch[n] = true; level[n] = depth; parent[n] = ...
ALGO
0.999994
4.813361
{ "github_metadata": { "branch": "main", "commit_count": 105, "repo_created_at": "2022-10-28T14: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": "8444495303...
a52a9cb1-1f9f-47d0-93f3-003e8cb435c2
manaschakrabortty/Data-Structures-In-CPP
func.cpp
// What is a Function? // A function is a block of code that performs a specific task. You define a function once, and you can "call" or "invoke" it multiple times // throughout your program. // Components of a Function // Return Type: The data type of the value that the function returns. // It could be any valid C++...
TOOL
0.995661
4.569137
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2024-09-26T06:33:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a99344a7c...
164cd36f-fe89-4620-9249-e78323d5179d
zxc88kr/jnu-ps-project
practice/02/문자열의비교.cpp
// 문제해결프로젝트 실습 02 (4) // 학번 : 195443 // 이름 : 박찬 #include <iostream> #include <string> /** * 두 문자열을 사전순으로 비교하여 그 결과를 반환하는 함수 * @param s1 소문자로 구성된 첫 번째 문자열 * @param s2 소문자로 구성된 두 번째 문자열 * @return 첫 번째 문자열이 사전순으로 앞서면 -1, 그렇지 않으면 1, 두 문자열이 일치하면 0을 반환 */ int getComparison(std::string s1, std::string s2) { int orde...
ALGO
0.999997
4.958655
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2023-03-13T13:39: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": "dd2d105e6...
083bce92-b9d7-4867-a4bb-4789bae502d0
Tejas-TGG/Logic-Building
Problems-on-string-in-cpp/problem51.cpp
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Write a program which accept string from user and accept one character. Return index of first occurrence of that character. // // Input: // // "Marvellous Multi OS" // // M // // Outpu...
ALGO
0.998231
4.377654
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2023-04-06T06:57:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f630a1f0a3...
3cdc2d97-7ace-4c7f-882d-73f0ea3ae224
satyamrs00/codeforces
Codeforces Round 931 (Div. 2)/B - Yet Another Coin Problem.cpp
#include "iostream" #include "bits/stdc++.h" using namespace std; int main() { vector<int> coins {1, 3, 6, 10, 15}; int t; cin >> t; vector<int> ts(t); int mx = 0; for(int i = 0; i < t; i++){ cin >> ts[i]; } vector<int> tsc(ts); sort(ts.begin(), ts.end()); vector<int> dp(1...
ALGO
0.999939
4.739658
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2023-05-22T00:53: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": "adca7686ab...
9dae8bd1-ed44-414e-b475-77486764a503
YaeSaraki/OI
Algorithms/Luogu/Problems/树状数组2.cpp
/** * @problem: P3368 【模板】树状数组 2 * @link: https://www.luogu.com.cn/problem/P3368 * @category: * @date: * @Author: YaeSaraki **/ #include <algorithm> #include <iostream> #include <vector> #define ALL(v) v.begin(), v.end() #define DBG(x) std::cout << #x << " = " << (x) << '\n' //#define int long long using i64 = ...
ALGO
0.999832
5.501204
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2022-11-25T08:48: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": "f7ec667e73e...
664dd392-3e60-45a5-b6a8-709a822ffa07
adityanjr/code-DS-ALGO
HackerBlocks/More/Boredom.cpp
// http://codeforces.com/contest/455/problem/A // SPACE EFFICIENT APPROACH // FOR EASIER BUT SPACE COSTLY APPROACH, LOOK FOR THE PREVIOUS SUBMISSION FOR THE SAME PROBLEM #include<bits/stdc++.h> #include<unordered_set> using namespace std; #define fio ios_base::sync_with_stdio(false) #define ll long long int #defi...
ALGO
0.999974
3.941864
{ "github_metadata": { "branch": "master", "commit_count": 589, "repo_created_at": "2019-10-25T15:50:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 32, "forks": 46, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "04d559...
589d68aa-830b-46af-96b7-f1f28257fa5c
Dayanep/practica1
Escamilla Perez Jose Dayan.cpp
#include <iostream> #include <conio.h> using namespace std; struct nodo { string nombre; int edad; nodo *anterior; nodo * siguiente; } *primero=NULL, *ultimo=NULL; void insertar(); void ver_lista(); void jugar(); void eliminar_nodo(string); int main(){ nodo *ant, *sig; char res; int edad, opc; string nomb...
TOOL
0.934619
3.555151
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-06-11T16:42: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": "76dc2a77f2...
9b163593-e23b-4fa5-8f01-b8f9f502ec94
Sd-Invol/shoka
TheWaySoFar-Training/2015-05-05/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int N = 105; int n , ca; const double pi = acos(-1); double a[N] , p[N] , q[N]; double L , R , D; double F(double x) { double res = 0; for (int i = n + n + 1 ; i >= 0 ; -- i) { res *= x; res += q[i]; } return res; ...
ALGO
0.999784
3.768679
{ "github_metadata": { "branch": "master", "commit_count": 348, "repo_created_at": "2013-10-04T08:20:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 37, "forks": 11, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "29351b...
24acffb6-cb69-43f3-af4e-ed47587b44dd
daiwb/Algorithm
ZOJ/1729Hidden Password.cpp
/** * zju 1729 Hidden Password * 00:00.02 576k * 2004.10.15 by adai */ #include <iostream> #include <string> #include <cstdio> using namespace std; #ifdef WIN32 #define for if(0); else for #endif int main() { int kase; scanf("%d", &kase); while (kase --) { int len; char a[200002]; ...
ALGO
0.999929
3.241686
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2012-08-26T01:36:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ed0229...
b08f2aa8-a3f5-4187-b499-e2204dbb258c
rajat19/interview-questions
_includes/code/binary-tree-zigzag-level-order-traversal/solution.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.999998
6.401135
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2022-02-01T17:24:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "e679cad2b9...
e663373e-8c28-4f30-9e58-718b75796673
RavineAls/140810200037-Kripto2022
Vigenere-Chiper/vigenerechiper.cpp
#include <iostream> using namespace std; // generates key vector void getKeyVector(string key, int keyVector[], int textlen){ int k = 0; for (int i = 0; i < textlen; i++){ if(key[k]>= 'A' && key[k] <= 'Z'){ keyVector[i] = (key[k]) % 65; } else if(key[k]>= 'a' && key[k] <= 'z'){ ...
ALGO
0.999902
4.001864
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-09-18T01:32: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": "b22a943efcb9...
c4a8afa7-e076-4786-b9d6-b5bcf299b020
mateusgrellert/hm-dec-tree
source/Lib/TLibEncoder/TEncDecisionTree.h
/* * File: TEncDecisionTree.h * Author: grellert * * Created on February 9, 2017, 3:38 PM */ #ifndef TENCDECISIONTREE_H #define TENCDECISIONTREE_H #include "../TLibCommon/TComDataCU.h" #include "../TLibCommon/TComPic.h" #include "../TLibCommon/TComYuv.h" #include<vector> #include<map> #define ONLINE_TRAIN 1...
ALGO
0.947245
3.793818
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-02-10T22:00: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": "3c9254c65b...
414e74e2-408b-49aa-993f-132e9dc2c64f
a-farooq/ProblemsAndSolutions
DataStructuresAndAlgorithms/arrays/sorted-arrays-mid-numbers.cpp
/********* Given 2 sorted arrays A and B of size N each. Print sum of middle elements of the array obtained after merging the given arrays. Input: The first line contains T denoting the number of testcases. Then follows description of testcases. Each case begins with a single positive integer N denoting the size of ...
ALGO
0.999992
5.522373
{ "github_metadata": { "branch": "master", "commit_count": 420, "repo_created_at": "2020-07-09T18:48:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "93fa3578...
ef2419ca-2dc9-4bb2-b7c3-3238bb69b10c
s26856-pj/PPRG
Zjazd 5/Zad 5.1/Zad 5.1/Zad 5.1.cpp
#include <iostream> #include <vector> using namespace std; int main() { try { int liczba_elementow; cout << "Podaj liczbe elementow wektora: "; cin >> liczba_elementow; vector<double> wektor; for (int i = 0; i < liczba_elementow; ++i) { double element; ...
ALGO
0.998938
4.836885
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-09-30T14: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": "9bf127a2f27...
26986589-27db-4fee-8621-49ddd7fafd53
mclarafreitas/Sistemas-Operacionais
Threads (POSIX).cpp
#include <iostream> // Biblioteca para entrada e saída padrão #include <opencv2/core.hpp> // Biblioteca do OpenCV para manipulação de estruturas básicas #include <opencv2/imgcodecs.hpp> // Biblioteca do OpenCV para codificação e decodificação de imagens #include <opencv2/highgui.hpp> // Biblioteca do OpenCV para interf...
ALGO
0.978284
5.984181
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-07-08T11:14: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": "787bbd02772c...
9b2dfeed-c6f9-46b3-b144-eca63f1a8738
mzums/algorithms
lessons/y_2023_24/team_contest/main2.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; struct Member { int a, b, c, no; }; vector <Member> one, two, three; bool sort_a(Member x, Member y) { return x.a < y.a; } bool sort_b(Member x, Member y) { return x.b < y.b; } bool sort_c(Member x, Member y)...
ALGO
0.999972
3.87665
{ "github_metadata": { "branch": "master", "commit_count": 306, "repo_created_at": "2022-12-08T12:38:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55eb1271...
85c5e745-ea8f-48dc-9ec0-437bbcd49238
longqun/sf
BTree/btree.h
#pragma once #include "btnode.h" template <typename T> class BTree { protected: int size_; int order_; BTNodePosi(T) root_; BTNodePosi(T) hot_; void solveOverflow(BTNodePosi(T)); void solveUnderflow(BTNodePosi(T)); public: BTree(int order = 3) : order_(order), size_(0) { root_ = new BTNode<T>(); } ~B...
ALGO
0.998888
4.425083
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2017-10-27T14:56:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5334a5200...
dce65f70-f10d-4140-b623-01f8ebfa7dbe
sergeivolodin/Diff
funcs.cpp
#include <iostream> #include <string.h> #include <stdio.h> #include <sys/timeb.h> using namespace std; struct strings { char** strs; int max; }; bool is_integer(const float a) { int temp=static_cast<int>(a); if(temp==a) { return(true); } return(false); } void print_str(const char* str) {...
TOOL
0.98465
3.286101
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2018-01-05T23:01: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": "0f69564f7...
5d87a113-d496-44c7-9d14-204c7812cc8f
souravabhijith/MissionRnD-C-Arrays-Worksheet
src/scoresDescendingSort.cpp
/* OVERVIEW: You are given scores for students of a class in alphabetical order. Write a function that sorts these scores in descending order. Input is array of structures of type student (each student has name and score). E.g.: If input is [ { "stud1", 20 }, { "stud2", 30 }, { "stud3", 40 } ] (three students with mar...
ALGO
0.997642
3.59552
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2016-02-25T06:58:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "ea6c60b523...
ec859473-c38a-4b75-b929-02fc675fe29f
benkosa/UNIZA-FRI
4TERM/aus/AUS/ui/sorting/panel_sorting.cpp
#include "panel_sorting.h" #include "../color_scheme.h" #include "../logger/ui_logger.h" #include "../../structures/table/sorting/shuffle.h" #include "../../structures/table/sorting/insert_sort.h" #include "../../structures/table/sorting/select_sort.h" #include "../../structures/table/sorting/bubble_sort.h" #include "...
ALGO
0.977762
5.901226
{ "github_metadata": { "branch": "master", "commit_count": 110, "repo_created_at": "2019-09-26T20:00:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e5dc428...
51caa412-00bd-4ffb-91ed-2ffd18f49122
k0suke-murakami/Data_Structure_and_Algorithm-Koch_Curve
koch_curve/main.cpp
// // main.cpp // koch_curve // // Created by 村上候助 on 2017/10/07. // Copyright © 2017 村上候助. All rights reserved. // #include <iostream> #include <stdio.h> #include <iomanip> #include <math.h> using namespace std; double param = 60.0*M_PI/180.0; struct P { double x; double y; }; void print(P p){ // ...
ALGO
0.999681
4.656515
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-10-07T04:56:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "03ab161339...
0848de27-0fbf-4385-92cf-731122245bbf
AnanyaDas162/Code-Collection-Hacktoberfest2022
DSA/Shortest Path Algorithms/Dijkstra_algorithm.cpp
// C++ program implementing dijkstra's algorithm. // Dijkstra's algorithm is used to find the shortest paths from single source to all vertices of a graph. #include <bits/stdc++.h> using namespace std; const int N = 1e3; const int INF = 1e9; vector<int> vis(N); vector<pair<int,int>> g[N]; // weithed graph, pair -> <...
ALGO
0.999994
6.029633
{ "github_metadata": { "branch": "main", "commit_count": 828, "repo_created_at": "2022-10-07T06:34:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 39, "forks": 159, "issues": 5, "pull_requests": 19 }, "file_meta": { "content_id": "c44f69...
e4bea894-daf9-4af1-ad33-7d19b7e039fb
Abobus1k/Homework-
dyn arrays/ulitka.cpp
#include <iostream> int main() { int rows; int cols; int counter = 1; int step; bool check = false; std::cin >> cols >> rows; int** matrix = new int* [rows]; for (int i = 0; i < rows; ++i) { matrix[i] = new int[cols]; } int i = 0; int j = 0; int min; int...
ALGO
0.999816
3.476948
{ "github_metadata": { "branch": "main", "commit_count": 131, "repo_created_at": "2021-09-30T11:18:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "666400dfff...
d659ef48-4455-4ea8-b151-d42ee4f5bc43
walkccc/LeetCode
solutions/1714. Sum Of Special Evenly-Spaced Elements In Array/1714.cpp
class Solution { public: vector<int> solve(vector<int>& nums, vector<vector<int>>& queries) { constexpr int kMod = 1'000'000'007; const int n = nums.size(); const int sqrtN = static_cast<int>(sqrt(n)); vector<int> ans; // prefix[x][y] = sum(nums[x + ay]), where a >= 0 and x + ay < n vector<ve...
ALGO
0.999981
6.376556
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2019-02-23T15:46:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1254, "forks": 437, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dbc4a66...
d111ad26-9942-43fc-8e63-7d1f7f8f3271
md-ashikur/problemSolving
CodeChef/Starters 140 (Rated till 5-Stars)/MakePermutation.cpp
#include <bits/stdc++.h> using namespace std; bool solve(int n, vector<int> arr) { vector<int> v(n + 1, 0); for (int i = 0; i < n; i++) { bool found = false; for (int j = 0; j <= n; j++) { int c = arr[i] + j; if (c >= 1 && c <= n && !v[c]) { ...
ALGO
0.999897
4.898192
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2023-10-22T01:48: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": "db93f2c7345...
d46cb19e-ed1f-4d86-b07c-56e684e453b1
RQbas/Numerical-Methods
Lagrange Polynomial Interpolation/main.cpp
#include <iostream> #include <cstdio> #include <vector> #include <math.h> #include <cstdlib> using namespace std; float *horner_value(float *tab1, float var, int tab1_size) //horner scheme used in polynomial division { float *prod = new float[tab1_size]; prod[0] = tab1[0]; for (int i = 1; i<tab1_size...
ALGO
0.998771
3.548913
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2016-05-10T22:08:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ddbbca04...
b456a0dc-26c2-4dda-b81a-c21dfeff1afa
ApolloAuto/apollo
modules/audio/inference/moving_detection.h
/****************************************************************************** * Copyright 2020 The Apollo 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 ...
ALGO
0.975264
7.099041
{ "github_metadata": { "branch": "master", "commit_count": 19341, "repo_created_at": "2017-07-04T19:03:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25847, "forks": 9793, "issues": 895, "pull_requests": 104 }, "file_meta": { "content_id...
0cbc05cb-ab3f-4cd8-a360-06a266dc8e52
rgroshanrg/Competitive-Programming
learn/Recursion/quickSort.cpp
#include <bits/stdc++.h> using namespace std; int partition(vector<int> &arr, int low, int high) { int i = low-1; int j = low; while(j < high) { if(arr[j] < arr[high]) { i++; swap(arr[i], arr[j]); } j++; } swap(arr[i+1], arr[high]); return i+1; } ...
ALGO
0.999931
5.57511
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2021-06-15T14:14:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "395b3fa0f8d...
488b8a50-9b62-416d-8a85-45af217a94a6
Riddhi12349/LeetCode_dsa_problems
Longest Palindromic Subsequence - GFG/longest-palindromic-subsequence.cpp
//{ Driver Code Starts //Initial template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: int longestPalinSubseq(string s1) { // VARIATION OF LCS int n = s1.size(); string s2 = s1; ...
ALGO
0.999967
5.877025
{ "github_metadata": { "branch": "main", "commit_count": 1535, "repo_created_at": "2023-02-05T20:14:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "39f9e6e92...
680fba95-ff77-4a84-a416-fd8e167fd998
apache/cloudberry
src/backend/gporca/libgpopt/src/xforms/CXformDifferenceAll2LeftAntiSemiJoin.cpp
//--------------------------------------------------------------------------- // Greenplum Database // Copyright (C) 2013 EMC Corp. // // @filename: // CXformDifferenceAll2LeftAntiSemiJoin.cpp // // @doc: // Implementation of the transformation a logical difference all into LASJ //------------------------------------...
ALGO
0.958631
6.396482
{ "github_metadata": { "branch": "main", "commit_count": 71549, "repo_created_at": "2023-05-24T06:58:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1000, "forks": 167, "issues": 104, "pull_requests": 50 }, "file_meta": { "content_id": "3...
de1b642c-a8a5-4787-be21-8ac4d11ae036
surafelfa/CPP-Algorithms-and-Data-Structures
Intermediate Algorithm/Sorting Algorithms.cpp
#include <iostream> using namespace std; bool xIsInTheMatrix(int a[][4], int t) { int i = 0; int j = 3;// a.length - 1; while (i <= 3/* a.length - 1 */&& j >= 0) { if (a[i][j] == t) return true; else if (a[i][j] < t) { cout<<a[i][j]<<endl; i++; ...
ALGO
0.999933
4.36426
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2022-07-28T09:22: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": "37faa1f1f9...
cfdd7ef2-ac03-4530-a997-41c5b1ff16af
cliu268/cs300
hw10/q1.cpp
// Get Water // https://xjoi.net/contest/4847/problem/1 // https://www.xinyoudui.com/contest?courses=519&books=255&pages=6461&fragments=12041&problemId=8100 /* Time limit:1s Memory limit:128M Description: There are n persons lining in front of a faucet tap for water. Suppose it takes Ti time for person i to get water...
ALGO
0.999989
4.682995
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-06-18T02:12: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": "d8b81826c6fa...
798b71b5-b7a3-451a-8313-25c4cb0cd43f
Aarushi2812/Leetcode-Solutions
Longest Bitonic subsequence - GFG/longest-bitonic-subsequence.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends #include <bits/stdc++.h> class Solution{ public: vector<int> lengthOfLIS(vector<int>& nums) { int n= nums.size(); vector<int> dp(n,1); int ans=1; for(int i=1; i<n; i++){ int a=1; ...
ALGO
0.999584
5.602892
{ "github_metadata": { "branch": "main", "commit_count": 432, "repo_created_at": "2022-07-03T08:18: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": "d6a5fbf9e7...
635e05f7-1cb7-4228-a78e-f4e3b64afc49
crystalhd/codes_and_notes
100_remove-duplicates-from-sorted-array/remove-duplicates-from-sorted-array.cpp
/* @Copyright:LintCode @Author: holiday_0802 @Problem: http://www.lintcode.com/problem/remove-duplicates-from-sorted-array @Language: C++ @Datetime: 16-06-02 04:55 */ class Solution { public: /** * @param A: a list of integers * @return : return an integer */ int removeDuplicates(vector<int> ...
ALGO
0.999929
5.622453
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-07-21T03:12: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": "fb3a668258...
d27db010-1b72-49bb-888c-0e936088b393
minaminao/competitive-programming
cpp/atcoder/atcoder/abc054_c_2.cpp
#include "bits/stdc++.h" using namespace std; #ifdef _DEBUG #include "dump.hpp" #else #define dump(...) #endif #define int long long #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--) #define all(c) begin(c),end(c) const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f...
ALGO
0.999958
3.269122
{ "github_metadata": { "branch": "master", "commit_count": 179, "repo_created_at": "2017-02-10T06:54:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "850c9d7b...
494deb3d-02ea-49d8-9978-63271e94dad5
fooofei/cpp.backup.datastructure
7S迪杰斯特拉算法/DIJ.cpp
#include <STDIO.H> #include <WINDOWS.H> #include <LIMITS.H> // 注意 : 有向图中叫弧 Arc // 无向图中叫 边 Edge // 弧尾-》 弧头 // 无向的时候 两个端点保存的信息是一致的 // 这是我自己写 程序 对严蔚敏的程序代码加以优化 改进 封装为类 // author: // datatime:2012-9-15 #define QUEUESIZESTEP 3 // 队列长度每一步加和 #define QUEUEDATA int // 每次使用 需要更改的数据类型 class QUEUE { protected: int m_nB...
ALGO
0.998731
3.329358
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2017-05-10T08:36:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c515f93d...
24ccf8e4-605c-4c35-a804-bc3ce383ba75
yp6969/Generic_map
Metropolis.cpp
// // Created by Pinhas on 14/05/2020. // #include "Metropolis.h" Metropolis::Metropolis(double** _graph , unsigned int size) : size(size) , num_of_ticks(0){ junction = new edge*[size]; int cnt_roads = 0 , cnt_neighbors = 0; /* * create the junctions * count number of edges */ for(unsi...
ALGO
0.97224
4.069304
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-06-03T12:58: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": "ef9140fe9...
c13b6f25-71b1-447a-ae22-40c6c48cd55a
FrederickVitorino/RedBlackTree
ArvoreRB.cpp
#include<iostream> #include "ArvoreRB.h" using namespace std; //Função auxiliar para trocar as cores de dois nós void ArvoreRB::swapCores(No* no1, No* no2){ //Faz a troca das cores de dois nos fornecidos utilizando uma variável temporaria Cor temp; temp = no1->getCor(); no1->set...
ALGO
0.997604
4.948946
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-03-19T02:08: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": "7b2c986ee01c...
ac23d95a-bd53-489b-8695-63f5177e8a2e
liuxueyang/cpp
uva/11753.cpp
// Date: Thu Aug 3 11:09:10 2023 #include <bits/stdc++.h> using namespace std; const int INF = 0x3f3f3f3f, MOD = 1e9 + 7; const double eps = 1e-8; const int dir[8][2] = { {0, 1}, {0, -1}, {1, 0}, {-1, 0}, {1, 1}, {1, -1}, {-1, 1}, {-1, -1}, }; typedef long long ll; typedef unsigned long long ull; typedef v...
ALGO
0.999942
4.004113
{ "github_metadata": { "branch": "main", "commit_count": 1650, "repo_created_at": "2024-10-17T13:52:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e571ecc3...
21e66670-81da-4e20-8c68-2844ada713ff
hibit-at/atcoder
ABC/ABC200-299/ABC294/f.cpp
#include <algorithm> #include <iostream> #include <iomanip> #include <limits.h> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <utility> #include <vector> #include <stack> #include <complex> using namespace std; #define rep(i, n) for (i...
ALGO
0.999919
4.147372
{ "github_metadata": { "branch": "master", "commit_count": 177, "repo_created_at": "2021-03-21T07:33: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": "9bab594d...
b4bdd962-2c8e-4fe0-8646-33874f3197fc
godenkoEgor/my_code_sample
merge_sequences.cpp
#include <iostream> #include <vector> std::vector<std::vector<int>> ReadArray() { int amount; int length; std::cin >> amount >> length; std::vector<std::vector<int>> data; for (int i = 0; i < amount; ++i) { std::vector<int> current(length); for (int j = 0; j < length; ++j) { ...
ALGO
0.999994
4.927075
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2021-03-25T15:07:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "78478a41132...
bc86de7b-a859-4f57-9733-1a1086752c9c
E3lct/UE5-Study-Path
Projects/QuickSortCPP/pianyi.cpp
#include <iostream> using namespace std; int n, m; char a[103][103]={0}; int search(char a[103][103], int x, int y) { if(a[x][y]=='*') { return -1; } int dx[]={-1,0,1}; //设置偏移量,dx int dy[]={-1,0,1}; //设置偏移量,dy int account=0; for...
ALGO
0.999966
3.43258
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2025-02-23T15:10: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": "40fbd8f411a...