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
2472eb71-9d5a-482c-8330-3a42be458625
yoshikazuuu/competitive-programming
Codeforces/practice/chat_room.cpp
#include <bits/stdc++.h> using namespace std; #define max(a, b) (a < b ? b : a) #define min(a, b) ((a > b) ? b : a) #define mod 1e9 + 7 #define FOR(a, c) for (int(a) = 0; (a) < (c); (a)++) #define FORL(a, b, c) for (int(a) = (b); (a) <= (c); (a)++) #define FORR(a, b, c) for (int(a) = (b); (a) >= (c); (a)--) #define INF...
ALGO
0.999745
3.43146
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-10-22T07:38: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": "0908fa61677...
7c2e14db-062f-4390-866b-0193fee7b3e2
pkmital/pkmAudio
pkmAudioVideoSegmentDatabase.h
/* * pkmAudioVideoSegmentDatabase.h * autoGrafittiMapKit * * Created by <NAME> - http://pkmital.com * Contact: <EMAIL> * * Copyright 2011 <NAME>. All rights reserved. * LICENSE: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Licens...
ALGO
0.924058
5.020072
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2013-06-27T11:08:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e6794772e...
f1f96fb2-67e7-47bb-b3f7-f537973b88f9
free-stardust/LeetCode
cpp/24.swap-nodes-in-pairs.cpp
/* * @lc app=leetcode.cn id=24 lang=cpp * @lcpr version=30204 * * [24] 两两交换链表中的节点 * * https://leetcode.cn/problems/swap-nodes-in-pairs/description/ * * algorithms * Medium (72.65%) * Likes: 2255 * Dislikes: 0 * Total Accepted: 905.1K * Total Submissions: 1.2M * Testcase Example: '[1,2,3,4]' * * 给...
ALGO
0.999982
6.332337
{ "github_metadata": { "branch": "main", "commit_count": 135, "repo_created_at": "2021-02-22T05:12:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e506f3b2e9...
f828c97b-b73d-4487-8bd1-6e67b30e410c
pl728/competitive-programming
main/B_Madoka_and_the_Elegant_Gift.cpp
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = a; i < b; i++) #define rev(i, a, b) for (int i = a; i >= b; i--) #define pb push_back #define all(a) (a).begin(), (a).end() #define v vector using ll = long long; using namespace std; template <typename... T> void see(T &...args) { ((cin >> args), ...); } con...
ALGO
0.999895
4.736098
{ "github_metadata": { "branch": "main", "commit_count": 91, "repo_created_at": "2021-03-05T23:40:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "61d2456407a...
09db9bed-68ad-410b-be03-d9d924ca3d60
Choyeon-17/Algorithm
BinarySearchTree.cpp
#include <iostream> using namespace std; class Node { public: int data; Node* Lchild; Node* Rchild; }; typedef Node* Tree; class BinarySearchTree { public: Node* NewNode(int data); void InitTree(Tree* bst); int AddData(Tree* bst, int data); void Preorder(Node* sr); void Inorder(Node*...
ALGO
0.999983
5.415107
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2019-11-18T12:56:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0dd1c8b3...
04e40625-660c-45db-a92d-1fa6d1e5552a
Swansonge/school_projects
data_structures/prog2/Prog2.cpp
/*=============== P r o g 2 . c p p =============== Starter Code by: <NAME> ECE Dept. UMASS Lowell Finshed Code by: <NAME> PURPOSE Read in the definition of an arbitrary convex polygon, and then compute both the circumerence and the area of the polygon. CHANGES 01-24-2018 gpc - Updated for EECE322 class. 01-30-2...
ALGO
0.995341
5.503547
{ "github_metadata": { "branch": "master", "commit_count": 120, "repo_created_at": "2019-08-21T15:19: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": "ad7afd12...
a3bb6622-9b7a-4891-9148-d358db8848e9
Yoyuuhi/cpp-atcoder
_result/_AtCoderBeginnerContest372/C-Count_ABC_Again/main.cpp
#include <bits/stdc++.h> #include <atcoder/all> #define out(X) cout << (X) << endl; #define outs(XS) \ for (auto X : XS) cout << X << " "; \ cout << endl; #define outl cout << endl; #ifdef __LOCAL #define DBG(X) cout << #X << " = " << (X) << endl; #else #define DBG(X) #endif #define rep(i, n) ...
ALGO
0.999767
4.362576
{ "github_metadata": { "branch": "main", "commit_count": 738, "repo_created_at": "2023-03-30T14:22: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": "66ec0a0723...
9d1fcde6-5ef5-4135-ac61-a2631cac67c7
Nkronemann/CS1A-Classwork
barrays/problem7/problem7.cpp
#include<iostream> #include<fstream> using namespace std; void readArrays(int a[2][3], int b[3][4]) { ifstream f("p07.txt"); for(int r = 0; r < 2; r++) { for(int c = 0; c < 3; c++) { f >> a[r][c]; } } for(int r = 0; r < 3; r++) { for(int c = 0; c < 4; c++) { ...
ALGO
0.998148
3.527018
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2024-09-04T01:33: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": "13c89a9b490...
86d28ceb-4285-4cb0-9734-76ae4957ce8c
mit-ll/SPARTA
cpp/baseline/mysql-server/m_of_n.cc
/////////////////////////////////////////////////////////////////////////////// // // Implementation of the M_OF_N user-defined-function. See section 7.7.6 // of the TA1 for details. // // Copyright MIT Lincoln Laboratory // Copyright $Date$ // Project: SPAR // Authors: $Authors$ // Description: ...
TOOL
0.981971
4.703599
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-06-02T15:41:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 37, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "31ca3b6629...
6eedc183-3ed7-4906-a581-30bfd184f8dc
mofeilu/leetcode
math/devideTwoInt29.hpp
/*Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator. Return the quotient after dividing dividend by divisor. The integer division should truncate toward zero. Example 1: Input: dividend = 10, divisor = 3 Output: 3 Example 2: Input: dividend = 7, ...
ALGO
0.999827
5.451788
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2018-12-03T01:11: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": "0b4ae162...
19cace38-4489-4035-9098-24ca54b5b3b3
anurag-shekhar/Competitive-Programming
Leetcode/StudyPlan/DataStructure-I/Day8-LinkedList/83.RemoveDuplicatesFromSortedList/RemoveDuplicatesFromSortedList.cpp
/* **************************************************************** * Author : <NAME> * Email : <EMAIL> * * Github : https://github.com/anurag-shekhar * LinkedIn : https://www.linkedin.com/in/anurag-shekhar/ * * File Name : RemoveDuplicatesFromSortedList.cpp * Created on : Tue Jan 25 2022 ********************...
ALGO
0.999983
6.366886
{ "github_metadata": { "branch": "master", "commit_count": 408, "repo_created_at": "2021-05-07T22:33:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "574c2428...
5d04dd13-6694-45ef-bed0-c1d769a2aaca
magicmoo/codeforces
#736div2/B.cpp
#include<bits/stdc++.h> using namespace std; #define CAS int CASE; \ cin>>CASE; \ while(CASE--) #define YON if(flag) cout<<"YES\n"; \ else cout<<"NO\n" #define Rep(i,x,y) for(auto i=(x);i<=(y);i++) #define rep(i,x,y) for(auto i=(x);i<(y);i++) #define Dep(i,x,y) for(auto i=(x);i>=(y)...
ALGO
0.999902
3.490587
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2021-09-06T08:07:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "408b85726...
6639d6f7-ef1e-4c98-b59d-8aaae333424d
Ma-Eltohamy/Algo-playGround
part1/graphRepr/easy/main.cpp
#include <iostream> #include <utility> #include <vector> typedef std::vector<std::vector<std::pair<int, int>>> GRAPH; void addDirect(GRAPH &graph, int from, int to, int cost) { graph[from].push_back(std::make_pair(to, cost)); } void printAdjacencyMatrix(GRAPH &graph) { int graphSize{(int)graph.size()}; for (i...
ALGO
0.999849
5.152155
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-08-22T12:48: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": "7b818388fb...
59cac853-f27d-474f-b8c6-4b6ce2ca8cbb
WorkingRobot/OodleUE
Engine/Plugins/Developer/TextureFormatOodle/Sdks/2.9.14/src/oodle2/texture/rrfixedfloat.cpp
// Copyright Epic Games, Inc. All Rights Reserved. // This source file is licensed solely to users who have // accepted a valid Unreal Engine license agreement // (see e.g., https://www.unrealengine.com/eula), and use // of this source file is governed by such agreement. #include "rrfixedfloat.h" #include "vec128.inl...
ALGO
0.975809
6.638322
{ "github_metadata": { "branch": "main", "commit_count": 163, "repo_created_at": "2023-01-18T06:19:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 97, "forks": 19, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19033298...
d8d6ec82-e8f0-4194-9382-8c87e567b757
harshgupta99/Competitive-Programming
Codeforces/Round 690 Div3/Q4.cpp
//https://codeforces.com/contest/1462/problem/D #include<bits/stdc++.h> using namespace std; vector<int> factors(int n){ vector<int> a; for(int i = 1; i*i <= n; i++){ if(n%i == 0){ a.push_back(i); if(n/i != i){ a.push_back(n/i); } } } r...
ALGO
0.9999
4.442426
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2021-06-19T09:23: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": "4c86e039ad7...
8ffcdd1e-570f-4324-b56d-4c32b8f5fc75
CJPBoss/PlaneChess
something.cpp
# include"something.h" # include<iostream> # include<string> # include<cstring> using namespace std; string &i2str(int num) { switch (num % 4) { case 0: return *new string("red"); case 1: return *new string("green"); case 2: return *new string("blue"); case 3: return *new strin...
ALGO
0.948703
3.589278
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-09-28T23:35:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3819721120...
fca03fc1-b835-4645-b4c2-62d36a8d02b0
droooney/chess-bot
app/game.cpp
#include <algorithm> #include <iostream> #include <random> #include <string> #include <vector> #include "game.h" #include "gameUtils.h" #include "utils.h" using namespace std; Game::Game(const string &fen) { this->noPiece = new Piece({ .index = -1, .type = NO_PIECE, .color = NO_COLOR, .square =...
ALGO
0.975174
5.535604
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2019-08-04T11:02:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "261806778...
9d0c6b08-7384-4386-8940-93503381b111
idemura/codecon
sln/uva-306.cc
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; // Because all unique, cycles will meet on the beginning, not // middle (otherwise two element will have same permutation // value, which conflicts with uniquity). int main() { for (;;) { int n = 0; c...
ALGO
0.999537
4.653124
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-02-10T17:26: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": "1825ce4cc...
a15e8c2a-4ab4-407b-a48a-9eacbbaefb2a
actium/timus
1800/20/1823.cpp
#include <iostream> #include <string> constexpr unsigned oo = ~0u; void solve(const unsigned v[256]) { constexpr double R = 8.314; if ((v['V'] == oo || v['T'] == oo) && (v['n'] == 0 && v['p'] == 0)) { std::cout << "undefined" << '\n'; return; } if ((v['V'] == oo || v['T'] == oo) && (...
ALGO
0.992299
5.570648
{ "github_metadata": { "branch": "master", "commit_count": 646, "repo_created_at": "2022-01-22T08:46:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "860a88ac...
ad5d53d4-d018-4af5-83d7-e42ffa6ecc41
nguyenchiemminhvu/DSA
Problems/SortingAndSearching/SmallestDivisor/main.cpp
/** https://leetcode.com/problems/find-the-smallest-divisor-given-a-threshold/description/ Given an array of integers nums and an integer threshold, we will choose a positive integer divisor, divide all the array by it, and sum the division's result. Find the smallest divisor such that the result mentioned above is le...
ALGO
0.999952
6.227441
{ "github_metadata": { "branch": "main", "commit_count": 471, "repo_created_at": "2024-06-30T06:28:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8a385b03c1...
0caa5ba5-dcd0-4e73-b1a0-2e355def7d54
Byeong-Chan/ByeongChan_PS_Note
C:C++/1234.cpp
#include <cstdio> long long dp[56][56][56]; long long fac[12]; int main() { int t, i, j, k, n; int r, g, b; int tmp; int sum = 0; long long s, ans = 0; scanf("%d",&n); scanf("%d %d %d",&r,&g,&b); dp[0][0][0] = 1; fac[0] = 1; for(i=1;i<=n;i++) fac[i] = i * fac[i-1]; for(t=1;t<...
ALGO
0.99989
3.904978
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-05-29T07:57:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd0b5abf9b...
ed19cbbc-74c6-4230-81f0-14dbf2679ffe
Sean0628/competitive_programming
atcoder/abc/abc296/a.cpp
#include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; #define rep(i, n) for (int i = 0; i < (n); ++i) #define out(arg) cout << (arg) << endl using ll = long long; using P = pair<int, int>; using mint = modint1000000007; void chmax(ll& a, ll b) { a = max(a, b); } void chmin(ll& a,...
ALGO
0.999992
4.04396
{ "github_metadata": { "branch": "main", "commit_count": 750, "repo_created_at": "2022-04-20T07:34: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": "d20115a71a...
4d559167-0106-475e-8f46-4dc469f983b9
TonyCrane/OI
luogu/codes/P2709.cpp
/************************************************************* * > File Name : P2709.cpp * > Author : Tony * > Created Time : 2019/06/01 16:04:56 * > Algorithm : [DataStructure]CaptainMo **************************************************************/ #include <bits/stdc++.h> using n...
ALGO
0.999982
3.973809
{ "github_metadata": { "branch": "master", "commit_count": 307, "repo_created_at": "2018-12-14T04:47:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "422e6094...
995b08a6-b0b2-443c-b7ca-fd83cf76475e
ymd45921/HUST-ACM-training
nowcoder/2020通常比赛/contest5889/B.cc
/** * * n方估计会死;怎么还答案错误的 * 不对不对,这样DP好像不太行…… * 害n2还是超时了…… */ #define USING_STDIO 0 #if USING_STDIO #include <cstdio> #include <cctype> #else #include <iostream> #include <iomanip> #endif #include <algorithm> #include <cstring> using namespace std; typedef long long longs; const int inf = 0x3f3f3f3f; const double ...
ALGO
0.999915
3.466304
{ "github_metadata": { "branch": "master", "commit_count": 423, "repo_created_at": "2020-12-02T04:26: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": "b8a631a4...
68251820-7d3b-4e5a-be94-69b9d80373cf
fibjs/fibjs_vender
v8/src/codegen/s390/macro-assembler-s390.cc
// Copyright 2014 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <assert.h> // For assert #include <limits.h> // For LONG_MIN, LONG_MAX. #if V8_TARGET_ARCH_S390 #include "src/base/bits.h" #include "src/ba...
TOOL
0.906913
5.232039
{ "github_metadata": { "branch": "dev", "commit_count": 1051, "repo_created_at": "2022-11-24T07:35:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "52592b9eb21...
00fef8be-e111-4a46-9982-f01f5ef7f037
gfh16/Fission2019-Unified-Analysis-Framework
include/CSHINETrackReconstructionSimplified.h
#ifndef CSHINETRACKRECONSTRUCTIONSIMPLIFIED_H #define CSHINETRACKRECONSTRUCTIONSIMPLIFIED_H #include "CSHINESiPixelGeometry.h" #include "CSHINECsIEnergyCaliSimplified.h" #include "PhysicalCalculator.h" #include "Vector3.h" #include "CSHINEParticleIdentificationSimplified.h" //oooooooooooooooooooooooooooooooooooooooo...
ALGO
0.961583
3.919141
{ "github_metadata": { "branch": "master", "commit_count": 269, "repo_created_at": "2019-09-16T09:09:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "95595a1c...
446bcfd3-1f6a-4405-b4c7-13e5417e81bc
ReciHub/FunnyAlgorithms
Sorting A Linked List/Sorting A Linked list.cpp
#include<iostream> using namespace std; struct nod { int d; nod *n; } *p = NULL, *head = NULL, *q = NULL, *np = NULL; int c = 0; void createnode(int n) { np = new nod; np->d = n; np->n = NULL; if (c == 0) { head = np; p = head; p->n = head; c++; } else if (c == 1) { p ...
ALGO
0.999993
4.695867
{ "github_metadata": { "branch": "master", "commit_count": 2052, "repo_created_at": "2018-09-24T10:03:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 487, "forks": 704, "issues": 11, "pull_requests": 110 }, "file_meta": { "content_id": "7...
315c3b99-5b63-4119-9842-8768e7c42ef9
edrumwri/drake
geometry/optimization/cartesian_product.cc
#include "drake/geometry/optimization/cartesian_product.h" #include <memory> #include <fmt/format.h> #include "drake/geometry/optimization/hpolyhedron.h" #include "drake/geometry/optimization/hyperellipsoid.h" #include "drake/solvers/solve.h" namespace drake { namespace geometry { namespace optimization { using Ei...
ALGO
0.921565
7.668029
{ "github_metadata": { "branch": "master", "commit_count": 28146, "repo_created_at": "2016-09-12T17:15:31.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "RobotLocomotion/drake", "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "co...
579e6f1e-1ac7-4c22-aae0-ddfd2dc5ea84
sagarvanave/Data-Structure
CPP/BubbleSort.cpp
#include<iostream> using namespace std; #define max 100 class bubble { public: int ar1[max]; int no; void getdata() { cout<<"Enter how many value you want to enter"; cin>>no; cout<<"Enter your values for sorting"; for(int i=0;i<no;i++) { ...
ALGO
0.999731
4.157437
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-04-16T17:13: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": "ed782a9ec8...
43b83f3f-888d-459c-8630-b8684cced325
phnam24/DSA-PTIT
ThucHanh/Duyet vet can/H_day_con_co_K_phan_tu.cpp
#include <bits/stdc++.h> #define test int t; cin >> t; while(t--) #define ll long long #define endl "\n" using namespace std; int n, k, a[1000], mark[1000]; vector<string> v; void in() { string tmp; for(int i = 1; i <= k; i++) { tmp += to_string(a[mark[i]]) + " "; } v.push_back(tmp); } v...
ALGO
0.999986
3.856737
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-01-30T14:47:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c6a8eb128fa...
0c5219a6-7529-4d7d-8e10-e69ec59ea540
rubaiyat6370/Accepted-Solutions
DoctorPathProbability.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #define S 27 using namespace std; double weight[S][S]; double input[S][S]; int vis[S]; int path[S]; double cost[S]; int n, m, index, T; int first, last; int queue[S*S]; void initData() { index = 0; for (int i = 0;i < S;i++) { for (int j = 0;j < S;j++) { in...
ALGO
0.999964
3.728781
{ "github_metadata": { "branch": "master", "commit_count": 132, "repo_created_at": "2017-07-02T06:37: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": "6ef16fa4...
8de59b6a-d306-4c4d-a511-ffe19bf12009
a894985555/Algorithm
最近点对/ClosestPair算法.cpp
#include<bits/stdc++.h> using namespace std; const int N = 1e5+10; int n,m,k; struct point { double x,y; }e[N]; int cmpX(point p1,point p2) { return p1.x < p2.x; } int cmpY(point p1,point p2) { return p1.y < p2.y; } double dis(point p1,point p2) { return sqrt((p1.x-p2.x)*(p1.x-p2.x)+(p1.y-p2.y)*(p...
ALGO
0.999944
4.0929
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2021-03-09T06:06: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": "67c5a23a4f1...
87f3376b-5936-47f9-a71e-801bfb627eed
kurpicz/dsss
dsss/string_sorting/util/algorithm.hpp
/******************************************************************************* * string_sorting/util/algorithm.hpp * * Copyright (C) 2018 <NAME> <<EMAIL>> * * All rights reserved. Published under the BSD-2 license in the LICENSE file. *****************************************************************************...
ALGO
0.997623
7.491612
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2018-10-19T15:27:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "70e796296...
2dbfb0e6-c743-43a6-b5d9-0860dad92d9b
moqsad/solved-problems
LightOJ/1255 - Substring Frequency(L).cpp
#include <cstdio> #include <cstring> #include <iostream> using namespace std; string a, b, x; int f[2000010]; // pattern && text er sum onusare f arrer man bosbe............. int main() { int i, n, m, k, ans, cnt, t; scanf("%d", &t); for(cnt = 1; cnt <= t; ++cnt) { cin >> a >> b; x = b...
ALGO
0.998445
3.702668
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-08-05T12:29: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": "d8b4f55ceb...
a4051a3d-5a98-4979-8dd4-603a61fc9f5d
Licheam/Codes
[HDU]2481.cpp
/* Coded with Leachim's ACM Template. No errors. No warnings. ~~ */ #include <bits/stdc++.h> #pragma GCC diagnostic ignored "-Wunused-const-variable" #pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wsign-compare" #define LL long long using namespace std; const int inf=0x3f3f3f3f; c...
ALGO
0.999992
4.581632
{ "github_metadata": { "branch": "master", "commit_count": 200, "repo_created_at": "2017-10-16T16:45:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a4fa6519...
e07243a1-a52f-4c3d-87f5-99bf202854f7
schaeferrodrigo/LearningCplusplus
C++_for_mathematicians_book/chapter_5_Arrays/totient.cpp
//#include "factor.h" #include "totient.h" /* long totient( long n ){ if ( n <= 0) return 0; if (n == 1) return 1; long flist[100]; long number_of_factors = factor( n , flist); long ans = 1; for (long k = 0; k< number_of_factors; k++){ if (k < number_of_factors){ if (flist[k] == flist[k+1]){...
ALGO
0.99938
4.830208
{ "github_metadata": { "branch": "master", "commit_count": 183, "repo_created_at": "2018-02-06T17:30:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6260eba...
f73ed15b-7882-46d3-b6a0-4787683004d8
bill2766/patGo
1147/1147. Heaps(30).cpp
#include <iostream> #include <cstdio> #include <string> using namespace std; const int MAX_N = 1010; int m, n; int arr[MAX_N]; void postOrder(int ind){ int left = ind*2, right = ind*2+1; if(ind > n) return; postOrder(left); postOrder(right); printf("%d",arr[ind]); if(ind != 1){ printf...
ALGO
0.999872
3.218707
{ "github_metadata": { "branch": "main", "commit_count": 127, "repo_created_at": "2021-08-19T02:21: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": "58b4bc51fc...
e4eca043-e64c-420a-9102-676b3752d710
roman-verchikov/acmp-quizes
annual_balance/annual_balance/main.cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> #define INPUT_FILE "INPUT.TXT" #define OUTPUT_FILE "OUTPUT.TXT" bool get_input(std::string &a, std::string &b); void annual_balance(std::string &a, std::string &b); void sort_max(std::string &s); void sort_min(std::string &s); int main(int ...
ALGO
0.999361
4.142521
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2011-12-29T11:06:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac4e72b2c...
10771349-56f2-4a58-92c8-f53985b86a58
Ravi-Maurya/Competitive_Programming
Cp-Algorithms/Topics/Data_Structures/Segment_Tree.cpp
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize ("-O3") #define ll long long int #define pll pair<ll,ll> #define pls pair<ll,string> #define psl pair<string,ll> #define plc pair<ll,char> #define pcl pair<char,ll> #define pss pair<string,string> #define maxheap(type) priority_queue<type> #define min...
ALGO
0.999198
3.852822
{ "github_metadata": { "branch": "master", "commit_count": 243, "repo_created_at": "2020-02-28T10:05:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae065463...
059ea4f0-ea9e-4ad1-9bc9-bcbe308df6c4
arshiyado/codeforces
1365E.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 5e2 + 10, maxp = 60; int n; vector<long long> arr; bool mark[maxn]; void input () { cin >> n; for (int i = 0; i < n; i ++) { long long a; cin >> a; arr.push_back(a); } } void solve () { long long ans = 0ll; ...
ALGO
0.999989
4.391623
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-02-13T12:38: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": "0ffb4ab8574e...
24a1b159-9fe1-4f82-91c0-a2bbac6ed9b8
The-Brew/LC-Grind
Maths/Diatributed-candies-to-people.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: vector<int> distributeCandies(int candies, int num_people) { vector<int> arr(num_people, 0); // Here i initialise vector of length 'num_people' with 0 int i = 0, count = 1; /* initialise array with 0 and count as 1 of c...
ALGO
0.999989
5.478036
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2023-01-07T05:22:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99cb35ec4d0...
966586ba-48be-4f02-8c7c-95345613a247
reguly/volna
sp/volna_output.cpp
/*Copyright 2018, <NAME>, <NAME>, <NAME> 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 retain the above copyright notice, this list of conditions and the following disclaimer. 2. Re...
ALGO
0.978054
5.15559
{ "github_metadata": { "branch": "master", "commit_count": 187, "repo_created_at": "2015-08-13T07:36:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 7, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "5dfede4c...
5f3160c1-51c2-4873-93c6-8f1c6b4570fc
CannotDeFine/Xmuoj
Xmuoj/ds006.cpp
/* * @Author: cdf * @Date: 2025-02-27 11:00:22 * @LastEditors: cdf * @LastEditTime: 2025-02-27 11:21:01 * @Description: 二叉树的遍历 */ #include<bits/stdc++.h> using namespace std; struct Node { int val; Node* left; Node* right; Node(int x) : val(x), left(nullptr), right(nullptr){}; }; Node* bu...
ALGO
1
5.232921
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2025-04-03T13:44:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab11036b1...
ecef70f6-e60a-4f45-bc47-a1beed646782
switchpiggy/Competitive_Programming
CodeForces/800 - 1000/motherMilk.cpp
/* ID: alanxia1 PROG: milk3 LANG: C++ */ #include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef struct State State; struct State { int a[3]; }; bool can[25]; bool visited[25][25][25]; int cap[3]; State create(int a, int b, int c) { State s; s.a[0] = a; s.a[1] = b;...
ALGO
0.999947
3.168719
{ "github_metadata": { "branch": "master", "commit_count": 164, "repo_created_at": "2020-08-27T23:38: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": "2962059e...
fa775b10-20d3-482c-970b-1e0929ce0a11
jtlap/nt2
modules/core/reduction/include/nt2/core/functions/expr/medianad.hpp
//============================================================================== // Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2011 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
ALGO
0.999733
6.012351
{ "github_metadata": { "branch": "master", "commit_count": 14374, "repo_created_at": "2010-11-02T16:07:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 40, "forks": 39, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ac0...
e0c0eae8-c0c8-4543-a88e-9e42a6933ee0
lawtonsclass/f23-code-from-class
csci41/lec21/fade_raylib/fade.cpp
// THIS IS THE WORLD'S UGLIEST IMPLEMENTATION AND I AM SORRY // to compile: g++ fade.cpp libraylib.a -o fade // to run: ./fade cat.png #include "raylib.h" #include <atomic> #include <chrono> #include <queue> #include <thread> #include <iostream> using namespace std; void pause(double seconds) { std::this_thread::sl...
ALGO
0.963324
4.564428
{ "github_metadata": { "branch": "master", "commit_count": 125, "repo_created_at": "2023-08-03T16:12:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "784999264...
3dabbbac-9d6d-40e9-9428-d0cd1a084cf6
Vad1mus/Chugunov-LAB
Лабораторная №10 (II сем.)/Template.h
#pragma once #include <iostream> using std::cout; using std::cin; using std::endl; template<typename T> class Template { public: Template(); void ShowArray(const T *arr, const int size); void SortArray(T * arr, const int size); int GetIndex(const T *arr, const T elem, const int size); T Min(const T *arr, const ...
TOOL
0.995899
5.312692
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-05-30T17:09: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": "481195c544...
f018cac1-eeea-4e8b-a012-c8ce5ac96273
hetiany/Leetcode
Job/Amazon/OA/mine2_Lei/SJF/short.cpp
//requestTime[]每个request到达处理器的时间,durations[]每个request要处理的持续时间。 //两个数组一一对应,并按requestTime[]从小到大排列 // requestTime[0, 2, 4, 5] //duration[7, 4, 1, 4] 题目要求,short task first,就是先处理p1,处理之后时间是7,之后处理p4 //因为她处理时间为1,最短,然后p2,最后p5,这个例子average waiting time是4 #include <iostream> #include <vector> #include <queue> using namespace std; ...
ALGO
0.999913
5.163541
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2016-11-05T03:50: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": "f8c891adb...
4b886bcd-6068-4a09-a0b2-597387c3b2a3
andrewowens/camo
src/mrf.cc
#include <algorithm> #include <vector> #include <stdio.h> #include "GCoptimization.h" #include <sys/time.h> #include <stdlib.h> #include <stdarg.h> #include <math.h> #include <string.h> #include <iostream> #include <stack> #include <ext/hash_map> using namespace std; typedef float en_t; typedef unsigned char uchar; t...
ALGO
0.99955
3.328779
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-01-11T06:10:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fcc5b2b0df...
19d24c88-b736-470c-87fd-ea98aa674736
ogu2/1.102-MOOS-project
NavigationAndControl/MOOSNavLib/LBLMaths.cpp
/////////////////////////////////////////////////////////////////////////// // // MOOS - Mission Oriented Operating Suite // // A suit of Applications and Libraries for Mobile Robotics Research // Copyright (C) 2001-2005 Massachusetts Institute of Technology and // Oxford University. // // This soft...
ALGO
0.999093
5.334846
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2012-06-26T06:54: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": "5acf6e354...
3a450bea-b06f-45c7-a67a-7b1cf7320b65
woodong11/Algorithm_Study
baekjoon/5373_큐빙/jongha_solving.cpp
#include <iostream> #include <vector> #include <queue> #include <cstring> using namespace std; enum Side { U, B, R, D, F, L }; enum Direction { right, left }; int T, n; string cube[6][3] = { {{"www"}, {"www"}, {"www"}}, {{"yyy"}, {"yyy"}, {"yyy"}}, {{"rrr"}, {"rrr"}, {"rrr"}}, {{"ooo"}, {"ooo"}, {"ooo"}...
ALGO
0.999712
4.678749
{ "github_metadata": { "branch": "main", "commit_count": 394, "repo_created_at": "2024-01-29T09:01:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b3df6c29b...
9c5d7a91-6c4a-4958-9c2a-0fb0e05d1935
tyler-lovelace1/rCausalMGM
src/inc/Fci.hpp
#ifndef FCI_HPP_ #define FCI_HPP_ /** * Extends <NAME>'s implementation of the Fast Causal Inference algorithm (found in FCI.java) with Jiji Zhang's * Augmented FCI rules (found in sec. 4.1 of Zhang's 2006 PhD dissertation, "Causal Inference and Reasoning in Causally * Insufficient Systems"). * <p> * This class i...
ALGO
0.981027
4.486385
{ "github_metadata": { "branch": "master", "commit_count": 297, "repo_created_at": "2020-01-20T14:04:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "591ffe90...
fe899dac-e94c-497d-a5fc-6bd92aec9b59
NathanPatzer/PitchDetector
Source/Note.cpp
/* ============================================================================== Note.cpp Created: 29 Jun 2022 11:06:16am Author: natep ============================================================================== */ #include "Note.h" /* given the maximum index from the fft, finds the musical not...
TOOL
0.967625
5.510379
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-07-06T16:27:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "be2bb16f09ad...
7b44d24f-ef06-465c-82c4-cd171bef3d70
nxtsourav7/Competitive-Programming
CSES/Sorting-and-Searching/Apartments.cpp
/** * author : nxtsourav7 * created : 2024-02-20 12:06:29 **/ #include<bits/stdc++.h> using namespace std; #define endl "\n" #define ll long long #define sz(x) (int)x.size() #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() int32_t main() { cin.tie(0)->sync_with_stdio(0); cout << fi...
ALGO
0.999946
4.95982
{ "github_metadata": { "branch": "main", "commit_count": 271, "repo_created_at": "2023-06-20T13:35:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4065bb4a48...
4ff9fd87-09c6-420f-819a-62b1aa4ef7ef
tumblery/PS
BOJ/1722.순열의 순서/1722_solved.cpp
#include<stdio.h> #define Max 21 typedef long long int ll; ll fact[Max], K; int N,op, ans[Max], visit[Max]; void init() { for (int i = 0; i < Max; i++) { ans[i] = 0; visit[i] = 0; } fact[0] = 1; for (int i = 1; i < Max; i++) fact[i] = fact[i - 1] * i; } int main() { init(); scanf("%d", &N); scanf("%d", &op...
ALGO
0.999862
3.531909
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2018-04-15T14:37:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d93cdb3ef...
2a61f6d3-b5de-45c5-907a-4f02ffb4a155
nikaaboda/ads
Hw7/modifiedQuickSort.cpp
#include <iostream> #include <cmath> #include <tuple> using namespace std; void print(int arr[], int n) { for (int i = 0; i < n; i++) { cout << arr[i] << " "; } cout << endl; } void swap(int arr[], int a, int b) { int temp = arr[a]; arr[a] = arr[b]; arr[b] = temp; } tuple<int, int> patrition(int arr[], int...
ALGO
0.999954
5.851985
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-03-19T01:09:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "45f81f35bc38...
4c8c5c20-83d4-46ed-b6a5-8b62aad231df
SyedaFakhiraSaghir/Data-Structures
BFS AND DFS.cpp
#include <iostream> #include <stack> #include <queue> using namespace std; class vertex { public: char name; int visited; }; class graph { public: int vert; // number of vertices int **adjmatrix; // matrix vertex *vertices; // names int i = 0; graph(int v) { vert ...
ALGO
0.999947
5.093283
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-01-14T14:56: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": "692188dab3d3...
8cb0d31f-b9be-4228-a418-875325a72b23
suyangzhu/AMD
AMD/MatrixMatrixFunc2.hpp
#ifndef MatrixMatrixFunc2_H #define MatrixMatrixFunc2_H #include <string> #include <cstdio> #include <assert.h> #include "boost/shared_ptr.hpp" #include "utility.hpp" #include "ScalarMatrixFunc.hpp" // definitions of enum, operators and callBackFunctions #include "MatrixMatrixFuncHelper.hpp" namespace AMD { templa...
TOOL
0.979671
5.626875
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-05-29T16:55:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50879cc011...
d2e393b8-f0c6-425d-a4a3-77f2f655882e
mrkajetanp/programming-exercises
CodeWars/Fundamentals/ColorChoice/ColorChoice.cpp
#include <iostream> #include <cassert> class ColorChoice { public: static long long checkChoose(long long m, int n); static long long binCoef (long long n, int x); }; long long ColorChoice::binCoef (long long n, int x) { long long res = 1; if ( x > n - x ) x = n - x; for (int i = 0; i < ...
ALGO
0.999827
4.953958
{ "github_metadata": { "branch": "master", "commit_count": 1069, "repo_created_at": "2017-02-07T19:29:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 158 }, "file_meta": { "content_id": "26a13...
9caa23f3-a737-487a-bece-cadf247fc792
friha438/datastrukturer
LABB4/LABB4/digraph.cpp
/********************************************* * file: ~\tnd004\lab\lab4a\digraph.cpp * * remark: implementation of directed graphs * **********************************************/ /* <NAME>, friha438 <NAME>, moagu002 */ #include <iostream> #include <iomanip> #include <cassert> #include <limits> // us...
ALGO
0.999342
5.757392
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2020-04-01T13:00: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": "c48b5a5d9...
0c423f2f-8384-405e-98d9-764fc085c1eb
ClickHouse/ClickHouse
src/AggregateFunctions/AggregateFunctionDeltaSumTimestamp.cpp
#include <AggregateFunctions/AggregateFunctionFactory.h> #include <AggregateFunctions/FactoryHelpers.h> #include <AggregateFunctions/Helpers.h> #include <IO/ReadHelpers.h> #include <IO/WriteHelpers.h> #include <Columns/ColumnVector.h> #include <DataTypes/DataTypesNumber.h> #include <AggregateFunctions/IAggregateFunc...
TOOL
0.936238
7.427547
{ "github_metadata": { "branch": "master", "commit_count": 183246, "repo_created_at": "2016-06-02T08:28:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 41764, "forks": 7471, "issues": 4250, "pull_requests": 622 }, "file_meta": { "content_...
c880bd6a-c815-4bd1-ba6d-22f81099963c
Sewery/competetive-programming
Codeforces/CF Round #587 (D.3)/E1_Num_Seq.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using pii= pair<int,int>; using pll = pair<ll, ll>; #define X first #define Y second #define pb push_back #define pf push_front #define mp make_pair #define all(x) begin(x), end(x) constexpr int MOD= 1e9 +7; void _speed() { ios_base::sync_with...
ALGO
0.999823
4.056996
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-07-14T17:08: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": "e94518481851...
d5c850eb-35b9-48b9-9add-f12b4330de98
mudit1998/Assignment1_dsa
2020201067_Q3.cpp
#include<iostream> using namespace std; template <class T> class deque { public: int front; int rear; int size; int count_element; T *arr; deque() { front= -1; rear= 0; size= 1; count_element= 0; arr=new T[1]; } deque(int n,T x) { fr...
ALGO
0.996639
3.589515
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-10-18T06:35: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": "d271781232...
acae4c50-c8c9-40ac-b625-11279cbaf893
ngocbinh2011/GraphAlgorithm
soThanhPhanLienThong,cpp.cpp
#include <bits/stdc++.h> using namespace std; #define ONLINE_JUDGE 1 string to_string(char x) {return (string) "\'" + x + "\'";} string to_string(const string &x) {return '\"' + x + '\"';} string to_string(const char *x) {return to_string((string) x);} string to_string(bool x) {return x ? "true" : "false";} template...
ALGO
0.999855
3.677498
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-07-30T13:27:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f09cbaa39dd...
065740d6-d3c4-46c3-adf3-5c11fb912b5d
SamuelVargha/udemy_cpp_20_masterclass
S7_data_conversions/L57_overflow_underflow/main.cpp
#include <iostream> int main (){ // overflow unsigned char data {252}; // max value: 255 std::cout << "data: " << static_cast<int>(++data) << std::endl; std::cout << "data: " << static_cast<int>(++data) << std::endl; std::cout << "data: " << static_cast<int>(++data) << std::endl; std::c...
TOOL
0.964619
4.564348
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-02-20T13:53: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": "ac795335dc05...
75300d30-b710-44a2-af69-ccfe875f04f5
zrporz/THU-IAI-2023
hw3/connect4--2023IAI_2021010699--cpp/MCT.cpp
#include "MCT.h" #include <climits> #include <cmath> #include <random> bool my_userWin(const int x, const int y, const int M, const int N, int** board) { // 横向检测 int i, j; int count = 0; for (i = y; i >= 0; i--) if (!(board[x][i] == 1)) break; count += (y - i); for (i = y; i ...
ALGO
0.999973
3.915323
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-07-01T10:54:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b47c6cca7beb...
aac27177-0d29-4bd4-9bce-18c4e7ed8fcc
ypauchard/t2mapping
itkMRT2ParameterMap3DImageFilter.txx
/*========================================================================= Program: Insight Segmentation & Registration Toolkit Module: $RCSfile: itkMRT2ParameterMap3DImageFilter.txx,v $ Language: C++ Date: $Date: 2008/01/03 22:21:12 $ Version: $Revision: 1.9 $ Copyright (c) Insight Software...
ALGO
0.984252
6.718905
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-08-22T02:04:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "1781644e23...
bc5a36a4-7197-4171-9746-ccca47758ce1
bpieszko/programming_challenges_cpp
46-snake/main.cpp
#include <iostream> #include <SFML/Graphics.hpp> #include <vector> #include <deque> #include <set> #include <sys/time.h> inline int r(int a, int b) { return a + rand() % (b - a + 1); } int main () { struct timeval time; gettimeofday(&time, 0); srand(time.tv_sec * 1000 + time.tv_usec % 1000); sf::RenderWindow win...
ALGO
0.99645
4.380426
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2018-07-06T09:08:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5bd24ee9...
dc14615d-be6e-4ec1-923d-571a91c7c792
keineahnung2345/leetcode-cpp-practices
155. Min Stack.cpp
//Runtime: 240 ms, faster than 5.05% of C++ online submissions for Min Stack. //Memory Usage: 16.7 MB, less than 97.85% of C++ online submissions for Min Stack. class MinStack { public: /** initialize your data structure here. */ vector<int> v; MinStack() { vector<int> v; } void push(i...
ALGO
0.999977
6.180559
{ "github_metadata": { "branch": "master", "commit_count": 2080, "repo_created_at": "2018-11-25T06:48:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 284, "forks": 120, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "39c...
d78a0b3e-d0f9-40bd-8cd4-893dd5560d9f
sonaspy/PAT-PTA
ADVANCED/1074.cpp
// author -<EMAIL> // coding - utf_8 #include <bits/stdc++.h> #define test() freopen("in", "r", stdin) using namespace std; struct node { int data, next, id = -1; }; int main(int argc, char const *argv[]) { /* code */ //test(); int c1, d, c2, src, n, k, step = 0, i; node mp[100000]; deque<no...
ALGO
0.999989
3.533645
{ "github_metadata": { "branch": "sonaspy", "commit_count": 525, "repo_created_at": "2018-11-25T17:50:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "965cfb1...
2750f91e-db73-41d7-bb47-2ddae07ca450
aben-lee/MGPlib
src/MT_Tools/1DMT/todo/sumobjective.cpp
#include <fstream> #include <iostream> #include <iterator> #include <algorithm> #include <string> #include <vector> #include "statutils.h" #include "Util.h" using namespace std; using namespace gplib; /*! * \addtogroup UtilProgs Utility Programs *@{ * \file * Find the model from the .final output file of 1dinvga w...
ALGO
0.998656
4.055118
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-06-20T15:13:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "107ba93c71...
49a9975b-b9cb-4afd-9217-614a4c20bda7
To5BG/dapc-problems
data2023/antitetris/output_validators/combined_validator/output_validator.cpp
#include "validation.h" using namespace std; // Output is a grid that would fit the block in the input perfectly: // - One line with two integers h and w, the height and width of the Tetris block. // - h lines with w characters, each character being either '#' or '.'. int main(int argc, char *argv[]) { // Set up...
ALGO
0.995595
4.868054
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-09-22T11:28:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a5043bbd7d...
2a622e7f-5344-4f0f-8839-990c360bb56b
pradoz/leetcode_pset
cpp/maximum-binary-tree.cpp
/* Given an integer array with no duplicates. A maximum tree building on this array is defined as follow: 1. The root is the maximum number in the array. 2. The left subtree is the maximum tree constructed from left part subarray divided by the maximum number. 3. The right subtree is the maximum tree constr...
ALGO
0.99999
6.50254
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2019-08-28T02:28: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": "9d3e68d76...
40793d70-c710-49aa-add3-7609c25c37bc
mahdi-zafarmand/LSWL
C++ Implementation/main.cpp
#include "SIWO.hpp" #include <iostream> #include <fstream> #include <vector> #include <chrono> Graph* load_graph(std::string dataset_path) { Graph* g = new Graph(); std::ifstream infile(dataset_path); int node_1_name, node_2_name; while (infile >> node_1_name >> node_2_name) { g->add_edge(node...
ALGO
0.986542
4.377887
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2021-02-04T00:08:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "18a366a1166...
be391449-473b-4527-b987-5838d585a84c
piyushraj2340/data-structure
Practice/array/sorting/mergeSort/Merge_sort.cpp
#include<iostream> using namespace std; void merge(int arr[],int l, int u) { int size = u - l + 1; int aux[size]; int m = (l + u) / 2; int i = l, j = m + 1, k = 0; while(i <= m && j <= u) { if(arr[i] <= arr[j]) { aux[k] = arr[i]; i++; } ...
ALGO
0.999977
5.4672
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2021-08-30T16:51:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5fb027d50e...
5b317472-01a4-471f-b09e-a0ec49e2a95b
matiego1/sio2
Mały preOI (24-25)/kra.cpp
#include "kralib.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> para; const int MAX = 100 * 1000; int pary[MAX + 1]; int trojki[MAX + 1]; int znaki[MAX + 1]; vector<int> wynik; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n = ini...
ALGO
0.999981
3.40256
{ "github_metadata": { "branch": "main", "commit_count": 185, "repo_created_at": "2024-02-18T09:50:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12ede031ab...
ebbe222c-1225-400f-9ce5-85b88d9ccb23
RowonChung/SSAFY21_Algorithm
류성윤/0304-1012/1012_유기농 배추.cpp
#include <iostream> #include <cstring> #include <queue> using namespace std; struct Node { int y, x; }; vector<int> dy = { -1, 1, 0, 0 }; vector<int> dx = { 0, 0, -1, 1 }; int T, N, M, K; int field[64][64]; void floodFill(int y, int x, int num) { queue<Node> q; q.push({ y,x }); while (!q.empty()) { auto cur =...
ALGO
0.999934
4.258822
{ "github_metadata": { "branch": "main", "commit_count": 505, "repo_created_at": "2024-01-22T02:28:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13763e7f02...
7a991468-7b88-43d7-9925-97d5de3a79aa
novo1985/Leetcode
Medium/134 Gas Station/main.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; class Solution { public: int canCompleteCircuit(vector<int>& gas, vector<int>& cost) { //to improve the running time, we should get -1 after one O(n) if it is negative result. /** we need:(1)current_dif, if current_dif < 0, this curr...
ALGO
0.999973
5.459772
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2016-10-10T18: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": "117ffe986...
b2a59973-124e-4fc4-8307-7254eac1eaa5
MohitsSingh/code
3rdparty/ssdesc-cpp-1.1.1/ssdesc.h
/* * SELF-SIMILARITY DESCRIPTOR * C++ IMPLEMENTATION * v 1.1 * * <NAME> * Engineering Department * University of Oxford * * Date: March 2009 * Updated March 2010 * * C++ Routine for calculating self-similarity descriptors densely across an image * * The self-similarity descriptor was first described in: ...
ALGO
0.997439
6.126387
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-01-05T13:25:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97c583d62d...
fa4fddc7-b80e-4ead-b2c8-fbea97b87be4
realAYAYA/UnrealEngine-ToonLit
UnrealEngine/Engine/Source/Developer/NaniteBuilder/Private/GraphPartitioner.h
// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "Math/Bounds.h" #include "metis.h" #include "Async/ParallelFor.h" #include "DisjointSet.h" class FGraphPartitioner { public: struct FGraphData { int32 Offset; int32 Num; TArray< idx_t > Adjacency; TArray< idx...
ALGO
0.999195
6.206369
{ "github_metadata": { "branch": "5.4", "commit_count": 164, "repo_created_at": "2023-03-14T06:10:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 66, "forks": 9, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "93135662bc...
56a8b769-e8f6-4bd1-80a6-a7e1f712d21d
ilario-pierbattista/hasp-tracker
matlab/haar/haar_horizontal_edge.cxx
#include <iostream> #include "mexutils.h" using namespace std; /* * Main function * * * * nlhs: Numero atteso di output * plhs: Array di puntatori all'output * nrhs: Numero di parametri in input * prhs: Array di puntatori all'input */ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mx...
ALGO
0.934363
5.230906
{ "github_metadata": { "branch": "master", "commit_count": 134, "repo_created_at": "2015-04-16T06:46: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": "10943282...
d337cf19-c66d-46cc-8699-f8a5687149ca
kartikayverma56/NM2
gauss-elimination.cpp
/*#include<stdio.h> #include<conio.h> #include<math.h> #include<stdlib.h> #define SIZE 10 int main() { float a[SIZE][SIZE], x[SIZE], ratio; int i,j,k,n; //Inputs //1. Reading number of unknowns printf("Enter number of unknowns: "); scanf("%d", &n); //2. Reading Augmented Matrix for(i=1;i...
ALGO
0.999779
3.102213
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-04T15:55:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "400ca2e5e815...
1f317b92-7eae-44e0-a6ff-aaf0ca3ddaa8
tjdodwell/zonkey
Model/dune_includes/QoI.hh
// -*- tab-width: 2; indent-tabs-mode: nil -*- #ifndef DUNE_PDELAB_LOCALOPERATOR_CONVECTIONDIFFUSIONFEM_QOI_HH #define DUNE_PDELAB_LOCALOPERATOR_CONVECTIONDIFFUSIONFEM_QOI_HH #include<vector> #include<type_traits> #include<dune/common/deprecated.hh> #include<dune/geometry/referenceelements.hh> #include<dune/pdelab/...
ALGO
0.994968
6.073201
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2019-03-30T23:27:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd95c604d...
c1c4d907-3f38-47ac-8531-74cb47afd179
BankNSir/RayTracingPeterShirley
ch3.cpp
#include<iostream> #include<fstream> #include "ray.h" using namespace std; // function to lerp color for each pixel vec3 color(ray &r) { vec3 unit_direction = unit_vector(r.direction()); // if y = 1 want t = 1 if y = -1 want t = 0 float t = 0.5 * (unit_direction.y()) + 0.5; return t * vec3(0.5, 0.7, 1....
ALGO
0.95895
4.562469
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-09-26T08:10: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": "9863467ccb...
64946a4a-918d-410e-926d-be1fef76fab5
batqd/case2
main.cpp
#include <iostream> using namespace std; float x, y; int wybor; int main() { cout << " Podaj 1 liczbe: "; cin >> x; cout << " Podaj 2 liczbe: "; cin >> y; cout << endl; cout << "MENU GLOWNE" << endl; cout << "_____"<< endl; cout << "1. Dodawaie " << endl; cout << "2. Odejmowanie" ...
TOOL
0.913309
3.279032
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-12-30T00:29: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": "b6df4e6d26...
c87f1148-c532-4480-99bf-c6cfea027842
Yawn-Sean/Daily_CF_Problems
daily_problems/2025/06/0609/personal_submission/cf79c_hum.cpp
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "debug.h" #else #define debug(...) 42 #endif int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); string s; cin >> s; int n; cin >> n; vector<string> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } array<int, ...
ALGO
0.999784
4.553326
{ "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": "c7f6...
8143c7fe-4e05-4e7e-8cec-213c9607ee82
gcasq/Important_Programs
Huffman_Tree/Code_Huff.cpp
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <bits/stdc++.h> #include <fstream> #include <vector> #include <string> #include <queue> #include<iomanip> using namespace std; typedef struct node{ char letter; int freq; struct node *esq; struct node *dir; string cod; }newnode...
ALGO
0.999942
3.339961
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-04-02T14:51:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7eb9d3ddfc...
d5c24b27-225d-4aa3-bb04-538aaf3cd74b
1995eaton/node-native-primegen
primes.cc
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> /* C code */ extern "C" char * gen_primes(int limit); char * gen_primes(int limit) { char *sieve = (char *) malloc((limit + 2) * sizeof(char)); memset(sieve, '1', limit + 1); int i, j, sq = sqrt(limit + 1); for (i = 2; i < sq; i++) { ...
ALGO
0.999508
5.538495
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2014-07-16T10:07:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4cfd0bf830...
9c78d508-be54-4d5c-a168-6d9cf2854f6d
raincross7/code-similarity
codes/train_code/problem015/problem015_332.cpp
#include <bits/stdc++.h> #define PI 3.14159265359 #define NIL (-1) #define LL long long using namespace std; const int64_t MOD = 1e9 + 7; const int INF = INT_MAX; int main() { int N, K; cin >> N >> K; vector<int> v(N); for (int i = 0; i < N; i++) cin >> v[i]; int ans = 0; for (int a = 0; a <= min(K, N); a++) {...
ALGO
0.999986
4.247799
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ec1d315bb111...
7c907b35-3773-4a35-a4b0-dc9ea8fefd92
muhammadhasan01/cp
Lomba Lomba/Techporia2020/Trial/deretprima.cpp
#include <bits/stdc++.h> using namespace std; /** START OF TEMPLATE DEBUGGER **/ #define sim template < class c #define ris return * this #define dor > debug & operator << #define eni(x) sim > typename \ enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) { sim > struct rge { c b, e; }; sim > rge<c> range...
ALGO
0.999784
4.532186
{ "github_metadata": { "branch": "master", "commit_count": 1187, "repo_created_at": "2019-07-13T15:49:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94dead4...
15c20869-51dd-42da-b985-3585a4671c9f
alexandraback/datacollection
solutions_5738606668808192_1/C++/minh141198/main.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair <int, int> ii; typedef vector <int> vi; #define X first #define Y second #define mk make_pair #define pb push_back #define ms(a, x) memset(a, x, sizeof(a)) #define Rep(i, n) for(int i = 0; i < int(n); i ++) #define all(x) (x).begin(), (x)....
ALGO
0.999444
3.303957
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "640802302...
3e6f57cf-bff6-4e31-98c6-89c90f0562ff
Ant4g0n1st/problem-solving
UVa/10459 - The Tree Root/BreadthFirstSearch.cpp
#include <forward_list> #include <algorithm> #include <iostream> #include <limits> #include <memory> #include <vector> #include <queue> using std::numeric_limits; using std::forward_list; using std::unique_ptr; using std::vector; using std::queue; using std::cout; using std::fill; using std::swap; using std::cin; typ...
ALGO
0.999879
4.312057
{ "github_metadata": { "branch": "master", "commit_count": 212, "repo_created_at": "2018-01-22T01:30:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4233e7dd...
abd565e8-3abd-4b9b-b9b1-253a48c73ffa
Zhefan-Xu/Intent-MPC
trajectory_planner/include/trajectory_planner/third_party/ACADO/acado/symbolic_operator/tan.cpp
/* * This file is part of ACADO Toolkit. * * ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization. * Copyright (C) 2008-2014 by <NAME>, <NAME>, * <NAME>, <NAME>, <NAME>. * Developed within the Optimization in Engineering Center (OPTEC) * under supervision of <NAME>. All rig...
TOOL
0.963228
6.813241
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2025-03-16T02:42:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 219, "forks": 21, "issues": 8, "pull_requests": 1 }, "file_meta": { "content_id": "bdf3ddb6...
be230830-dc2f-4c0c-8cd2-b51127ebe93c
changicho/algorithm-training
LeetCode/medium/2771. Longest Non-decreasing Subarray From Two Arrays/answer.cpp
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; // use dynamic programming // time : O(N) // space : O(N) class Solution { public: int maxNonDecreasingLength(vector<int>& nums1, vector<int>& nums2) { int size = nums1.size(); // dp[index][num]; int dp[1...
ALGO
0.999973
5.47403
{ "github_metadata": { "branch": "master", "commit_count": 2455, "repo_created_at": "2019-09-02T14:53:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 44, "forks": 4, "issues": 25, "pull_requests": 0 }, "file_meta": { "content_id": "44512...
80516014-bc9d-4446-9bec-3f8767b6e689
0mutatio1/c3primer
ch03/main.cpp
// Iterators #include <iostream> #include <string> #include <algorithm> int main() { std::string s("some string"); if (s.begin() != s.end()) { // make sure s is not empty auto it = s.begin(); // it denotes the first character in s *it = toupper(*it); // make that character uppercase ...
TOOL
0.944785
5.341447
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2024-05-29T02:51:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c8e0530c7...
d42db73e-79b4-44c0-bb7e-66777f2969d2
cicconet/PAT
PAT/PATConvolution.h
// // PATConvolution.h // PAT // // This code is distributed under the MIT Licence. // See notice at the end of this file. // #ifndef __PAT__PATConvolution__ #define __PAT__PATConvolution__ #include <iostream> #include "PATImage.h" #include "PATWavelet.h" class PATConvolution { PATImage paddedImage; public: ...
ALGO
0.976849
6.217098
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2014-02-20T20:55:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e1358a0b...
fd46884a-1a6b-41a8-899e-9ae21914c628
Ayush7614/Daily-Coding-DS-ALGO-Practice
Gfg/C++/printing-solutions-n-queen-problem.cpp
/* C/C++ program to solve N Queen Problem using backtracking */ #include <bits/stdc++.h> using namespace std; vector<vector<int> > result; /* A utility function to check if a queen can be placed on board[row][col]. Note that this function is called when "col" queens are already placed in columns from 0 to col -1. So ...
ALGO
0.999977
5.871752
{ "github_metadata": { "branch": "main", "commit_count": 2968, "repo_created_at": "2020-12-28T05:34:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 322, "forks": 474, "issues": 335, "pull_requests": 20 }, "file_meta": { "content_id": "14...
071618a2-5322-4f20-bce8-5f70584396db
ddtn1119/CS-1136-1336-1337-Programs
PokerGameAnalysis.cpp
#include <iostream> #include <iomanip> #include <string> #include <ctime> #include <cstdlib> using namespace std; // convert numbers to rank and suits in form of string string card(int input){ string cardStr; int rank, suit; // convert inputs to ranks and suits if the inputs are between 0 and 51 if(in...
ALGO
0.998999
4.972509
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-05T03:00: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": "3d757479566c...
6c5585c5-7608-4afb-bace-4d968e65f32f
Iamthankyou/2020
OOP practice/01.cpp
#include <bits/stdc++.h> using namespace std; class diem{ private: double x; double y; public: diem():x(0),y(0){} diem(double xx, double yy):x(xx),y(yy){} double d(){ return sqrt(x*x+y*y); } friend istream &operator >> (istream &in, diem &p){ cout << "\nHoanh do:"; in >> p.x; cout << "\nTung do:"; in...
ALGO
0.997842
3.201071
{ "github_metadata": { "branch": "master", "commit_count": 359, "repo_created_at": "2020-03-02T06:38:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 20 }, "file_meta": { "content_id": "2d5d983...
b74e0d8a-3caa-4c81-9038-bcad2436abe0
qaz5216/algorithm-study
baekjoon/5875.cpp
#include <iostream> #include <stack> using namespace std; int arr[100001]; int lsum[100001]; int rsum[100001]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int cnt = 0; string s; cin >> s; for (int i = 0; i < s.size(); i++) { if (s[i] == '(') { ar...
ALGO
0.999694
3.658555
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2022-01-17T08:24: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": "05e4257a3...