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
5e029cb5-d309-4153-8a6f-a055071fa6eb
twoload/myAlgo
Graph1/Graph1_2178_maze.cpp
#if 0 # Ive attended the code.plus class (https://code.plus/) # And I've referred it's codes # And core parts can be come fully from the class. #endif #include <cstdio> #include <algorithm> #include <queue> using namespace std; int n, m; int a[100][100]; bool check[100][100]; int dist[100][100]; int dx[] = {0, 0, 1, ...
ALGO
0.999879
3.7263
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2022-08-15T00:08: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": "79bbc27ae...
5e52cd18-e9e3-4f7c-bda7-c4ee79bd97ba
ishandutta2007/codeforces-k
klimoza/normal/1083/E.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <math.h> #include <cmath> #include <map> #include <set> #include <deque> using namespace std; typedef long long ll; ll INF = 4e18; int INFi = 2e9; double eps = 1e-8; ll mod = 1e9 + 7; struct Point { double x, y; Point() {} Poi...
ALGO
0.999661
3.986375
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe8bda6c85a5...
592d8d10-090f-48a4-ba59-4d966fc63554
Ishwar-Sanap/DSA-Practice
Binary Trees/construct_tree_from_Preorder_Inorder.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.999995
5.445042
{ "github_metadata": { "branch": "main", "commit_count": 72, "repo_created_at": "2025-01-06T19:26: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": "7a879917277...
9e409c8e-668b-46b3-901c-47ee921057bd
Vijitverm1234/DSA-Revision-Journey-
Binary Search/Easy and Medium/RotatedArraySearch.cpp
#include<iostream> #include<algorithm> #include<vector> using namespace std; int search(vector<int> arr, int n,int k){ int low=0; int high=n-1; while(low<=high){ int mid=low+(high-low)/2; if(arr[mid]==k){ return mid; } // Edge case when the array contains the dupliacates // ...
ALGO
0.999843
5.460021
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2025-06-25T17:41:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "558404a46b3...
03c25812-6f91-4275-96d7-7c72be1b7841
secareanu-cristina-emilia/Cpp-Programs
ex20_bubblesort.cpp
/* Bubblesort (sau Sinkingsort) e cel mai simplu algoritm de sortare. Sortarea se realizeaza prin comparatia elementului curent cu fiecare element al matricei. */ #include <iostream> using namespace std; void bubbleSort(int matrice[], int n) { int t = 0; for ( int i = 0; i <= n; i++) { for ( int j = ...
ALGO
0.999151
5.053767
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-11-09T11:14: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": "5a32e682a0c9...
462bcaeb-ae0e-48eb-bfbb-d0a40a2fb7e6
tusharjaiswal123/Data-Structure-and-Algorithms
Longest Substring Without Repeating Characters.cpp
PROBLEM: Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length of 3. Example 2: Input: "bbbbb" Output: 1 Explanation: The answer is "b", with the length of 1. Example 3: Input: "pwwkew" Output: 3...
ALGO
0.999979
5.622482
{ "github_metadata": { "branch": "master", "commit_count": 347, "repo_created_at": "2019-08-28T12:47:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55ebc244...
78cee73b-2caf-42c2-87a6-258b40e9086b
RaJuCodz/DSA
1310-watering-plants/watering-plants.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds; // find_by_order, order_of_key typedef long long ll; typedef unsigned ...
ALGO
0.99997
4.423077
{ "github_metadata": { "branch": "main", "commit_count": 229, "repo_created_at": "2025-01-29T00:23: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": "ce76676f5e...
ab1b3cdc-4c74-4e58-9cb1-07d7d2bdaac9
shauuebbit/procon
test/graph/dijkstra_test.cpp
#include "graph/dijkstra.hpp" #include <gtest/gtest.h> #include <random> #include <set> #include "data_structure/union_find.hpp" using namespace std; const long long INF = 1ll << 60; vector<vector<pair<long long, int>>> generate_random_undirected_graph(int n) { random_device seed_gen; mt19937 engine(seed_...
TEST
0.937152
6.183881
{ "github_metadata": { "branch": "main", "commit_count": 108, "repo_created_at": "2022-09-07T17:12:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a482abd02e...
908fca20-1a20-4e3a-975e-285a5f52ec1a
PiyushKumarSingh-90/C_plus_plus_25problems
19_ReverseArray.cpp
//Implement a program to reverse an array in-place. #include <iostream> using namespace std; int main () { int arr[100]; int n,t; int i, j; cout << " Enter the size of the array: "; cin >> n; for (i = 0; i < n; i++) { cout << " Enter the element " << i+1 << ": ";...
ALGO
0.999949
5.05375
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2023-12-21T15:31:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d34826976fc...
34411f08-915a-4a06-96b4-3ce0fc5d87e9
AndreyKaraulanov/labs
labs/lab9b/lab9b/main.cpp
#include <iostream> #include <algorithm> #include <iomanip> #include <string> using namespace std; int main() { int masA[100][100]; int masB[100][100]; int masC[100][100]; int N; int M; int S; int L; while (true){ cout << "Укажите размерность массива: " << endl; cout << ...
ALGO
0.997976
3.216954
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2021-11-08T17:44: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": "f520de17227...
955ff254-aad5-4e74-8fc2-84378e1e4b36
kat0028-auburn/mechatronics_project
arduino/motor_driver/motor_driver.ino
#define STEPPER_PIN_1 9 #define STEPPER_PIN_2 10 #define STEPPER_PIN_3 11 #define STEPPER_PIN_4 12 int step_number = 0; int counter = 2048/2; bool move = true; void setup() { clearStepper(); pinMode(STEPPER_PIN_1, OUTPUT); pinMode(STEPPER_PIN_2, OUTPUT); pinMode(STEPPER_PIN_3, OUTPUT); pinMode(STEPPER_PIN_4...
TOOL
0.940206
5.252013
{ "github_metadata": { "branch": "main", "commit_count": 250, "repo_created_at": "2025-04-16T16:15:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "27b3bbffd20...
819ad616-d655-4589-8e8d-f9192fc4e071
mk-hassan/GPU-OpenCL
matrix_multiplication.cpp
/** * @author <NAME> * @date 12 Jun 2021 * @link https://www.youtube.com/watch?v=tduqROrpHTg&list=PLZ9YeF_1_vF8gozOgYaW2660Na1bFhEIR * @result Matrix_A = Matrix_A * (Matrix_A + Matrix_B) * then all matrices must be of the same size */ /** * 1) command queue will be used later for buffer operations and for...
ALGO
0.997486
4.93018
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-06-12T20:40:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "620281352a5e...
f94a5319-6275-4252-a268-928015dd5c86
msunkim/GraduateProject
src/server.cpp
#include <iostream> #include <memory> #include <thread> #include <fmt/format.h> #include <fmt/ranges.h> #include <openssl/sha.h> #include <nlohmann/json.hpp> #include <zmqpp/zmqpp.hpp> #include "secure/hash.hpp" #include "db/connector.hpp" #include "db/migrate.hpp" #include "network/util.hpp" #include "secure/psi.hpp...
WEB
0.962735
4.635276
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2020-09-09T07:54: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": "fa8f14b39...
48df3287-f54f-4115-91f0-ea6ff94b6143
ishandutta2007/codeforces-f
faustaadp/normal/1510/K.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<ll, ll> pll; #define pb push_back #define mp make_pair #define fi first #define se second const ll NN = 2e5 + 5; const ll mo = 1e9 + 7; const ld eps = 1e-9; ll n, a[NN], x[NN]; void hai(ll jen) { if(jen == 0) { f...
ALGO
0.999752
3.229654
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43: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": "390b57183ca8...
3d3c5338-98ff-46ff-a0c0-e189a8d7ace1
sainick31/C
inheritance and pointers program 1.cpp
#include <iostream> #include <cmath> using namespace std; class Shape { protected: double height; double width; public: Shape() : height(0), width(0) {} void setDimensions() { cout << "Enter height: "; cin >> height; cout << "Enter width: "; cin >> width; } v...
ALGO
0.994811
5.248634
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-10-03T03:46: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": "42d214c0d807...
80caafab-3db1-4f13-80a9-5b8c3ddc42d6
glebmk/eth-algolab-2018
from_previous_years/motorcycles/main.cpp
#include <iostream> #include <vector> #include <CGAL/Gmpq.h> #include <cassert> typedef CGAL::Gmpq ET; using namespace std; const ET INIT = ET(-1); void testcase() { int n; cin >> n; vector<ET> ks; for (int i = 0; i < n; i++) { long y0, x1, y1; cin >> y0 >> x1 >> y1; ET k = (y1 - y0) / x1; ks.push_bac...
ALGO
0.999881
4.522791
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-01-30T15:58:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee4150da43...
dcb39ae5-7f11-4f91-876e-e4b22763e5e4
sh-sho1kat/CODEFORCES
Educational Codeforces Round 178 (Rated for Div. 2)/C_Card_Game.cpp
#include <bits/stdc++.h> using namespace std; // 2025-04-28 15:10:18 #define fastio ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL) #define mod 1000000007 #define inf (1LL << 62) #define all(x) x.begin(), x.end() #define eb push_back #define ff first #define ss second #define yes cout << "YES" << nl #d...
ALGO
0.999758
3.335433
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-10-04T16:16:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4bd098bd5aef...
253dce1d-e815-47dc-a4b2-8aa4223595e8
unvariant/usaco
clock/main.cpp
#include <iostream> #include <cinttypes> #include <algorithm> using namespace std; int gcd(int a, int b) { if (b == 0) { return a; } return gcd(b, a % b); } int lcm(int a, int b) { return (a / gcd(a, b)) * b; } int main (int argc, char ** argv) { int n, h, m, inc; string tmp; cin ...
ALGO
0.999823
4.084504
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-02-11T19:30: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": "33c2b2d8ecd3...
789cce55-09e9-4506-bdb7-2a3f418bd7fd
Orion545/OI-Record
Grade 10-12/2018 summer/二中集训/bzoj2850/bzoj2850.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #define lld long long using namespace std; inline lld read(){ lld re=0,flag=1;char ch=getchar(); while(ch>'9'||ch<'0'){ if(ch=='-') flag=-1; ch=getchar(); } while(ch>='0'&&ch<='9') re=(re<<1)+(re<<3)+ch-'0',ch=getc...
ALGO
0.999959
4.012833
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-05-26T05:47:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "fcb9f25660...
ebd2e847-d8be-4f19-9bcb-2f6c9b078007
Trojanking123/pat
a1106.cpp
#include<iostream> #include<vector> #include<cmath> using namespace std; const int kMAX = 100007; int n; double price ,rate; struct Saler{ int id; vector<int> child; double price; }; Saler chain[kMAX]; double minp = 0x7fffffff; int num = 0; void DFS(int id, int deepth){ chain[id].price = pow(1+ra...
ALGO
0.999746
3.531424
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2020-01-10T08:18:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb450062c...
9d3ca00e-f838-413a-9d28-61318b7f7b00
kjhmoon/kjhmoon_coding
백준/Silver/25206. 너의 평점은/너의 평점은.cc
#include <iostream> #include <string> #include <stdlib.h> #include <cmath> #include <algorithm> #include <vector> #include <iomanip> using namespace std; int main() { string subject = " "; //과목 double credit = 0.0; //학점 string grade = " "; //과목 점수 double count_credit = 0.0; //학점의 총합(평균 구하기 위해서 필요) float grade_num...
ALGO
0.994917
3.845577
{ "github_metadata": { "branch": "main", "commit_count": 237, "repo_created_at": "2025-01-26T11:53:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0449174b4d...
95608df8-5f54-4d6c-9120-0b7e06462cdc
viniciusjssouza/contests
UVA/Volume 103/10315 - Poker Hands/pokerHands.cpp
/*************************************************************************************** * UVa problem 10315 - Poker Hands - Programming Challenges * Autor: <NAME> * Data: 27/02/2008 * *************************************************************************************/ #include <iostream> #include <string> #de...
ALGO
0.999239
4.426061
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-06-18T23:26:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e3d92d600...
4874986d-9a64-4a70-8939-5cb7e4477155
vikram-rathore1/competitive_programming
codeforces/contest-570-virtual/prob4.cpp
#include <iostream> #include <string> #include <vector> using namespace std; struct node{ int depth, parent; vector<int> children; char value; }; vector<node> tree; vector<char> found; int occ[26]; void traverse(int vi, int hi){ if(tree[vi].depth == hi) found.push_back(tree[vi].value); else if(t...
ALGO
0.999985
4.217082
{ "github_metadata": { "branch": "master", "commit_count": 407, "repo_created_at": "2016-08-13T20:39: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": "53e62d76...
fba59fc7-a5c9-4119-bd23-e248b6eae793
Grey1900/coursera_white
month_concerns.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; void NEXT(const vector<int>& month_days, vector<vector<string>>& data, int& month, const int& months_count) { int next_month = (month + 1) % months_count; if (month_days[month] < month_days[next_month]) { ...
ALGO
0.999556
5.314367
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2024-01-15T08:18: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": "845b34949e...
a3b719bc-73b3-42ac-b3e0-89b48a9ef0e9
genericSpecimen/college-work
design-and-analysis-of-algorithms/5_BFS.cpp
#include <iostream> #include <list> #include <vector> #include <limits> #include <queue> #define INF std::numeric_limits<unsigned int>::max() enum Color { WHITE, GRAY, BLACK }; struct Vertex { static unsigned int id; unsigned int v_id; // id of this vertex Color v_color; Vertex* v_parent; // pred...
ALGO
0.999743
5.445541
{ "github_metadata": { "branch": "master", "commit_count": 244, "repo_created_at": "2018-02-25T13:46: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": "391455fc...
1260a34c-cb2d-4900-ba74-1825a3291112
MichaelTkach/OP_Labs
OP_Lab1/fStream.cpp
#include "fStream.h" #include <iostream> #include <fstream> #include <sstream> #include <cstring> #include <cstdio> #include <unordered_set> #include <algorithm> using namespace std; void printFileContents(string& filename) { cout << endl << "----------" << filename << "----------" << endl; char ch; ifstre...
TOOL
0.966625
4.32236
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2023-04-07T07:44: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": "934bccb8069...
09e1cbc7-b170-4498-810b-60037af06aea
Altynai/LeetCode
decode-ways-ii/answer.cpp
const int MOD = 1e9 + 7; void add(int &x, int y) { x += y; x %= MOD; } class Solution { public: int numDecodings(string s) { int n = s.size(); vector<int> dp(n + 1, 0); dp[0] = 1; auto valid = [&](int pos, int val) -> bool { if (val == 0) return s[pos - 1] == '0'; return s[p...
ALGO
0.999887
4.900606
{ "github_metadata": { "branch": "master", "commit_count": 2981, "repo_created_at": "2014-02-07T14:14:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "e1f419...
a4f5c426-f72f-4ad3-ade2-83b4ffab5cea
kai04/Programming
DP/evaluateBooleanExp.cpp
#include<bits/stdc++.h> using namespace std; bool isOperator(char c){ return (c=='|' ||c=='&'||c=='^'); } int covertChar(int c){ if(c=='T'){ return 1; } return 0; } void PrintResult(string input,vector<int> &dp){ cout<<"String:"<<input<<endl; for(int i=0;i<dp.size();i++){ cout<<...
ALGO
0.999929
4.361578
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2018-01-18T18:46: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": "de72f6820...
2128ff69-a196-4f77-9e09-b4df72bfe6ba
y-kitamu/ImageProcessing
src/slam/tracking.cpp
/* * tracking.cpp * * Create Date : 2020-05-05 15:10:51 * Copyright (c) 2019- <NAME> <<EMAIL>> */ #include "tracking.hpp" #include <future> #include <chrono> #include "map.hpp" #include "logging/logging.hpp" #include "gl/base.hpp" namespace slam { void calcHomography() { logd("calcHomography"); } void ca...
TOOL
0.984211
5.602137
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2019-03-05T11:43: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": "fea1e7a00...
14d1cd07-5e02-4b74-985d-cadce86eec50
SemaMolchanov/cpp-basics
control works/cw 3 thursday/g.cpp
#include <iostream> #include <cmath> #include <string> #include <algorithm> #include <vector> #include <set> #include <map> using namespace std; bool prime_checker(int n) { if (n < 2) { return false; } bool answer = true; for (int i = 2; i < n; i++) { if (n % i == 0) { ans...
ALGO
0.999935
5.078577
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-03-16T12:34: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": "5e1ed898cf9d...
5ddb8815-58ea-432e-85e6-e592a3a6293d
OriGoldfrydCS/System_Programming_2_T1
Algorithms.cpp
// Email: <EMAIL> #include "Algorithms.hpp" #include <queue> #include <sstream> #include <algorithm> #include <climits> #include <unordered_set> #include <iostream> #include <stack> using namespace std; namespace ariel { /** * @brief This method checks if all vertices in a given graph reachable ...
ALGO
0.999761
4.023365
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-04-18T13:21:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a878b8b109a...
0c5d057c-66a0-42ba-9062-1986fd89df1a
SSAFY12th/ssafyAlgostudy
Haesoo/Week16/BOJ_Gaaaaaaaaaarden.cpp
#include <iostream> #include <vector> #include <algorithm> #include <queue> using namespace std; int g[50][50] = { 0, }; //bool visited[50][50] = { 0, }; int N, M, R, G; int dy[4] = { -1, 1, 0, 0 }; int dx[4] = { 0, 0, -1, 1 }; struct Info { int y; int x; int color; }; bool cmp(int a, int b) { return a > b; } bo...
ALGO
0.999721
4.018392
{ "github_metadata": { "branch": "main", "commit_count": 1284, "repo_created_at": "2024-07-16T14:32:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 7, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "9c4b62e1ef...
de0487a8-4dae-448b-9075-410e926786c5
eggag32/Competitive-Programming
Codeforces/The Party and Sweets.cpp
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef pair<int, int> pi; #define debug(x) cerr << #x << ": " << x << endl #define debug2(x, y) debug(x), debug(y) #define repn(i, a, b) for(int i ...
ALGO
0.99998
3.076664
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2020-09-24T22:38: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": "5aa78bb9a...
46105b2a-7696-41e6-8c8c-4946d492c95a
SourDumplings/CodeSolutions
Book practices/《C++primer》 5th 练习代码/chapter14/Exercise14.27~14.28.h
/* @Date : 2018-01-04 20:59:56 @Author : 酸饺子 (<EMAIL>) @Link : https://github.com/SourDumplings @Version : $Id$ */ /* p569 */ #ifndef MY_STRBLOB_H #define MY_STRBLOB_H #include <string> #include <vector> #include <stdexcept> #include <initializer_list> #include <memory> using namespace std; using namesp...
TOOL
0.902086
5.482055
{ "github_metadata": { "branch": "master", "commit_count": 548, "repo_created_at": "2017-11-11T08:59:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 5, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "49042d5b...
948d6230-5de2-4a2e-8509-efe8aa2ecbfb
shaeakh/Data-structure-codes
1.data struckture codes/4_Hashing/2_1_Chaining.cpp
#include <bits/stdc++.h> using namespace std; const int TABLE_SIZE = 10; // Hash table size // Hash function int hashFunction(int key) { return key % TABLE_SIZE; } class ChainingHashTable { private: vector<list<int>> table; public: ChainingHashTable() { table.resize(T...
ALGO
0.998769
5.214629
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2022-12-01T15:00:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b4779fc2900...
21ec7d5e-34de-4b13-b766-b59bc77e775a
heeba-khan/Leetcode-Solutions
0105-construct-binary-tree-from-preorder-and-inorder-traversal/0105-construct-binary-tree-from-preorder-and-inorder-traversal.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.999999
6.631492
{ "github_metadata": { "branch": "main", "commit_count": 1727, "repo_created_at": "2023-01-06T18:03: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": "4398f986d...
704aa51d-a8c6-4da0-b0fa-ee4db2e82c60
ksundberg/CourseMaterials
cs1400/projects/lionheart/Plan.hpp
#ifndef LIONHEART_PLAN_HPP #define LIONHEART_PLAN_HPP #include "Map.hpp" #include "Action.hpp" namespace lionheart { struct PathVertex { PathVertex():location(),facing(){} PathVertex(Placement p,Direction d):location(p),facing(d){} Placement location; Direction facing; }; ...
ALGO
0.973802
4.237467
{ "github_metadata": { "branch": "master", "commit_count": 389, "repo_created_at": "2016-08-17T07:57:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 65, "issues": 4, "pull_requests": 16 }, "file_meta": { "content_id": "0992fc...
af4976ef-3f9f-4bf8-b8e7-771b47e75890
caolll/First-semester-of-freshman-year
手机 洛谷 - P1765/手机 洛谷 - P1765/手机 洛谷 - P1765.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int main() { string s; int ans = 0; getline(cin, s); for (size_t c=0; c < s.length();c++) { if (s[c] == 'a' || s[c] == 'd' || s[c] == 'g' || s[c] == 'j' || s[c] == 'm' || s[c] == 'p' || s[c] == 't' || s[c] == 'w' || s[c] == ' ')ans++; else if (s[c]...
ALGO
0.998842
3.316156
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2024-11-06T05:27: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": "362c31b03...
1e3095ae-242a-44e2-b358-e9550a06fdee
OloieriAlexandru/Competitive-Programming-Training
codeforces/691B.cpp
#include <bits/stdc++.h> using namespace std; bool sim[128]; void sett() { sim['a'] = false; sim['b'] = true; sim['c'] = false; sim['d'] = true; sim['e'] = false; sim['f'] = false; sim['g'] = false; sim['h'] = false; sim['i'] = false; sim['j'] = false; sim['k'] = false; s...
ALGO
0.999859
4.207944
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2019-05-29T19:18: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": "cd29634ae...
dce64b92-fb14-4b62-8c97-9a55eaf8a5c3
duyang92/ltcm-paper
algorithm/RONWM/RONMW.h
#ifndef _RONMW_ #define _RONMW_ #include <string.h> #include <time.h> #include <algorithm> #include <cmath> #include <iostream> #include <random> #include <unordered_map> #include <unordered_set> #include <vector> #include "../../utils/FatTree.h" #include "../../utils/MurmurHash3.h" #include "../../utils/SpineLeaf.h"...
ALGO
0.993374
3.712056
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-12-15T03:56:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c5ad3aeef...
dd2d62ec-9e0d-4b41-abc0-4a178739921f
SurgicalSteel/Competitive-Programming
Kattis-Solutions/Egypt.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int lli; typedef unsigned long long ull; #define psb push_back #define mkp make_pair #define all(x) (x).begin(),(x).end() #define PI acos(-1) #define MOD 1000000007 int toint(string x) { istringstream ss(x); int a; ss>>a; return a; } string...
ALGO
0.999985
3.946637
{ "github_metadata": { "branch": "master", "commit_count": 617, "repo_created_at": "2015-10-16T06:41:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "179f483...
b1c47019-b407-4cca-a839-774f12583a31
DTang233/rasterizer
src/texture.cpp
#include "texture.h" #include "CGL/color.h" #include <algorithm> #include <cmath> namespace CGL { Color lerp(float t, Color c0,Color c1){ Color c = (1-t)*c0 + t*c1; return c; } Color Texture::sample(const SampleParams &sp) { // TODO: Task 6: Fill this in. // return magenta for invalid level Col...
ALGO
0.931827
4.92347
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-11-25T10:37:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a5d59b49fc9...
29663995-eab2-427a-9efe-8fe538ada751
NazrulIslamSajib/Dynamic_programming
class6cointchange2ndproble.cpp
/* Link: 357 - Let Me Count The Ways uva problem https://onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=2078 statemenet: Problem: amar kache 21 coin generate korte hbe jeta cubic coin ache ami seta gula use kore koto vabe n generate korte parbo setar problem coin changing problem . */ ...
ALGO
0.999933
3.695899
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2024-05-08T11:15:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96a406c71d3...
19ee5592-b7d8-4b87-839c-55b08ae2a6de
Ziklon/algorithms
tc/testprograms/ReportAccess.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
ALGO
0.992381
4.696406
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2012-12-28T20:25:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f9d2adf4...
419bb3f3-7ef5-4fc4-bc1e-8c5352e32502
n0IQ/Competitive-Programming
atcoder/abc221/C.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; #define pb push_back #define mp make_pair #define lb lower_bound #define ub upper_bound #define ff first #define ss second #define rep(i, a, b) for(int i = a; i < b; ...
ALGO
0.999913
4.130619
{ "github_metadata": { "branch": "main", "commit_count": 1677, "repo_created_at": "2022-06-02T21:26: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": "920cc8c15...
5b560748-6aa2-49bf-be6b-533aa2cb935c
adnanaziz/epicode
cpptest/container-with-most-waterTest.cc
// Copyright (c) 2016 Elements of Programming Interviews. All rights reserved. #include "test_toolkit/test-options.h" // @pg_ignore:1 #include "container-with-most-water.cc" // @pg_include:container-with-most-water.cc void UnitTest(TestSentry::Ptr& sentry, const char* description, const vector<int>& input...
TEST
0.999503
7.018419
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2016-07-17T04:02:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 227, "forks": 124, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "b33a1...
a44621db-a796-4f17-ad01-c44fe0ab762b
miguelsndc/competitive-programming-lib
Solutions/USACO/polandball-and-forest.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define ld long double #define MOD 1000000007 #define ii pair<int, int> const int maxn = 1e4 + 1; vector<bool> vis(maxn); vector<int> g[maxn]; void dfs(int u, int p) { vis[u] = true; for (int v: g[u]) { if (v != p) { ...
ALGO
0.999033
4.946488
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2025-03-19T13:03: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": "a194ec08279...
4b963a9b-b012-44d8-9d09-7523c068f648
TanishaMehta17/Leetcode
treeDiameter.cpp
#include <bits/stdc++.h> using namespace std; int diameter(int node, vector<vector<int>>& adj, vector<int>& vis) { vis[node] = 1; int dia = 0; for (int i = 0; i < adj[node].size(); i++) { if (!vis[adj[node][i]]) { dia = max(dia, 1 + diameter(adj[node][i], adj, vis)); } } ...
ALGO
0.997305
4.10533
{ "github_metadata": { "branch": "main", "commit_count": 195, "repo_created_at": "2024-07-15T07:43: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": "01c9f17a03...
385f612c-c344-4077-9bc2-3ddcaa4e9299
SapientBits/Linkedlists
main.cpp
// // main.cpp // LinkedLists // // Created by SB on 21/01/2025. // #include <iostream> struct Node { int data; Node* next; Node (const int val) { data=val; next=nullptr; } }; class SinglyLinkedList { private: Node* head; Node* tail; int elements; public: Singly...
ALGO
0.999289
5.400448
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-01-26T04:58: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": "df14cee1ae51...
563a3634-1d3b-40b5-bb3b-557e10d1d674
Edinburgh-College-of-Art/connected-things
archive/example-code/serial-plotting/plotRandomAverage/plotRandomAverage.ino
/* Plot a random number and the average */ //==================================================================================== #include "MovingAverageFilter.h" //==================================================================================== const unsigned long baud = 9600; unsigned int bytesPerSec = baud / ...
ALGO
0.911234
4.260037
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2018-10-05T14:02:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "750424811e...
c40771f0-a846-4a2e-b73e-eccb30b67393
kndnwn49090/algorithm
baekjoon/21611.cpp
#include <iostream> #include <vector> #include <utility> using namespace std; typedef pair<int,int> pii; #define MAXN 49 int _board[MAXN][MAXN]; int _boardSize, _score[4]; int _shark_r, _shark_c; int dirs[5][2] = {{0,0}, {-1,0}, {1,0}, {0,-1}, {0,1}}; bool bomb() { int _search_r = _shark_r; int _search_c ...
ALGO
0.999686
4.70076
{ "github_metadata": { "branch": "master", "commit_count": 406, "repo_created_at": "2018-06-22T18:00:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2bcbb301...
5ecf14cf-1f15-4858-983e-f62ccd423f6d
ARSD-Bsc-Comp-Sci-2024/Discrete--structure-18101
19.cpp
#include <iostream> using namespace std; void check(int degList[], int n) { int evenDeg = 0; int oddDeg = 0; for (int i = 0; i < n; i++) { if (degList[i] % 2 == 0) evenDeg += 1; else oddDeg += 1; } if (evenDeg == n) cout << "The graph is both ...
ALGO
0.999948
4.736602
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-06-21T08:43:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "121c191f238df...
7745cbe3-4753-41ab-9dc9-03af844a310a
Sagorika28/C-plus-plus-codes
Count odd even.cpp
#include <bits/stdc++.h> using namespace std; /*Function to count even and odd elements in the array * arr : Array with its elements * sizeof_array : number of array elements * countOdd : variable to count number of odd elements * countEven : variable to count number of even elements */ void countOddEven(int arr[], i...
ALGO
0.998786
4.762209
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2020-07-08T16:33: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": "15d8e6e09...
5d45f7b5-f09c-4ee7-9ced-08150ffd7693
leopoldwe/crossproduct
thread-main.cpp
// ----------------------------------------------------------- // NAME : <NAME> User ID: lweckert // DUE DATE : 12/12/2014 // PROGRAM ASSIGNMENT # 6 // FILE NAME : thread-main.cpp // PROGRAM PURPOSE : // This file implements the main thread that is started // when the process starts. // ------...
ALGO
0.999768
3.58845
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-08-29T00:21:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b75f2b15d5...
d6823754-fb40-44b0-bd56-61b7baf99b44
MRPT/mrpt
libs/math/include/mrpt/math/CBinaryRelation.h
/* +------------------------------------------------------------------------+ | Mobile Robot Programming Toolkit (MRPT) | | https://www.mrpt.org/ | | | | Cop...
TOOL
0.990678
4.518649
{ "github_metadata": { "branch": "develop", "commit_count": 9818, "repo_created_at": "2013-10-19T21:09:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2056, "forks": 644, "issues": 26, "pull_requests": 2 }, "file_meta": { "content_id": "7...
053c0d23-cd9f-419f-91d3-122ebb4626e8
ichyo/Procon-Library
geometry/line.cpp
typedef vector<P> L; P vec(L l){return l[1] - l[0];} // 注意: 端点で交わったり直線が重なったりする場合も交差していると判定する // 二直線の平行判定 // verify : AOJ0021 bool parallel(L l, L m){return sign(cross(vec(l), vec(m))) == 0;} // 二直線の同一判定 bool equalLL(L l, L m){return paralell(l, m) && sign(cross(vec(l), m[0] - l[0])) == 0;} // 直線と点の交差判定 // 直線lとl[0]か...
ALGO
0.999893
4.985732
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2014-08-17T04:12:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3ef95094c...
4a99cee3-1c29-4a52-8789-10c321941ffb
pavelsimo/ProgrammingContest
uva/12463_Little_Nephew/P12463.cpp
/* @BEGIN_OF_SOURCE_CODE */ /* @JUDGE_ID: 12463 C++ "Combinatorics" */ #include <algorithm> #include <iostream> using namespace std; typedef long long llong; /* one red hat, two T-shirts (one blue and one green) one pair of pants (black) two pairs of socks (one white pair and one orange pair) two pairs of s...
ALGO
0.999458
3.669739
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2014-10-16T15:16:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e297fcd8b3...
aa8233db-bc2c-4604-b961-456fe389f4df
raincross7/code-similarity
codes/train_code/problem460/problem460_478.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < (n);i++) #define sz(x) int(x.size()) typedef long long ll; typedef pair<int,int> P; const ll INF = 1e18; int main(){ ll h, w; cin >> h >> w; ll res = INF; for (int k = 0; k < 2; k++) { for (int i = 1; i < h; i++) { ...
ALGO
0.999938
3.393117
{ "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": "a6b7bdf992c0...
c7187977-269d-4008-a5c6-e0358b54cf2f
kidanger/high-noise-deblurring
ponomarenko-noise-estimation/framework/CFramework.h
/* * * This file is part of the Image Processing Framework. * * Copyright(c) 2011 <NAME>. * Website: http://mcolom.info ; miguel at mcolom.info * * This file may be licensed under the terms of of the * GNU General Public License Version 2 (the ``GPL''). * * Software distributed under the License is distribute...
TOOL
0.924996
6.29336
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2019-01-25T20:13:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "07eaa961...
71777fef-bc8e-4736-a53b-2cf04117945e
bg2b/aoc24
24/doit.cc
// -*- C++ -*- // g++ -std=c++20 -Wall -g -o doit doit.cc // ./doit 1 < input # part 1 // ./doit 2 < input # part 2 #include <iostream> #include <sstream> #include <string> #include <vector> #include <map> #include <optional> #include <random> #include <cassert> using namespace std; // Part 1 is whatever, but this...
ALGO
0.999761
5.840399
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2024-11-27T01:16:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "076218deaab...
5cfa4fea-06b4-4bef-bde0-0f12772e3660
ilovanmara/FundamentalAlgorithms
Tema_DFS.cpp
/* Tema nr 11: DFS Nume: <NAME> Grupa: 2 Complexitate DFS: O(V+E) ->similar cu bfs, dar inlocuim coada cu stiva, in loc sa punem in coada fiecare vecin ai unui nod facem un apel recursiv pentru fiecare, d reprezinta timpul de descoperire, iar f timpul de finalizare. Complexitatea Topological Sort: O(V+E) : pentru real...
ALGO
0.999675
4.329025
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-10-10T13:26: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": "89eafe8fcf61...
4be50467-815d-4bb0-88ee-099548cce960
prantosky/coursera-algorithmic-toolbox
week2_algorithmic_warmup/4_least_common_multiple/lcm.cpp
#include <iostream> long long lcm_naive(int a, int b) { for (long l = 1; l <= (long long)a * b; ++l) if (l % a == 0 && l % b == 0) return l; return (long long)a * b; } long long gcd(long long x, long long y) { long long a = std::max(x, y); long long b = std::min(x, y); if (b == 0) ...
ALGO
0.999845
4.672217
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2020-05-16T04:38:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 38, "forks": 26, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "dcfa940...
7ee277c8-750b-4b8a-bccf-bb4ecc4b0acd
abracoder/Code_subMission
0025-reverse-nodes-in-k-group/0025-reverse-nodes-in-k-group.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* reverseKGro...
ALGO
0.999981
5.81603
{ "github_metadata": { "branch": "main", "commit_count": 556, "repo_created_at": "2023-09-09T04:49: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": "eda42d1d88...
66226d77-fb3d-4ec3-810b-17cf9fcdf00f
Mirzoeva/-algorithms-and-data-structures
3_1.cpp
#include <iostream> /* Реализовать очередь с динамическим зацикленным буфером. */ using namespace std; template <class T> class Queue { private: T *Data; size_t size; size_t head; size_t tail; const int increase = 2; void newBigData(); public: Queue(); ~Queue(); T Dequeue(); voi...
ALGO
0.99971
4.702233
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-06-10T18: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": "91aa98d73...
0e74d443-53eb-406f-8fea-814518d9af56
GonoBae/CodingTestStudy
Kangwon/2023-02-21-Level2_FindPrimeNum.cpp
#include <iostream> #include <string> #include <cmath> #include <algorithm> #include <vector> #include <set> std::set<int> primeNumberSieve(std::string num); std::vector<int> nums(std::string numbers); int solution(std::string numbers) { int answer = 0; std::set<int> s = primeNumberSieve(numbers); std::v...
ALGO
0.99976
4.703269
{ "github_metadata": { "branch": "main", "commit_count": 433, "repo_created_at": "2022-10-07T12:23: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": "d2820e2fad...
8a0667bf-a9d9-4036-be02-d2f4875f40d6
deep-astaad/codeforces
Feb 2023/A_Polycarp_and_Coins.cpp
/* Code by : <NAME> (deep_aman/astaad) */ #include <bits/stdc++.h> using namespace std; #define ios ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define ll long long #define int long long int #define vll vector <ll> #define pll pair <ll, ll> #define vvll vector <vector <ll>> #define vpll vector <pai...
ALGO
0.999673
4.08986
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2022-07-21T20:23: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": "88e6b68f3b7...
1a50e5cc-d349-4eaa-aa82-c48453c5b5bb
1itsgoo/ift3001
tp2/ift3001-tp2-q3/monceau.cpp
// Ce fichier n'est qu'un rappel d'utilisation des monceaux. Vous // n'avez pas a le compiler, ni a l'utiliser. // // Ce code est ecrit en C++ 11. #include <algorithm> #include <functional> #include <iostream> #include <string> #include <vector> // Imprime un triplet d'entiers std::ostream& operator<<(std::ostream& o...
TEST
0.949102
4.348559
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-11-23T17:35: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": "995c589db3...
29b4f8e0-2a64-49ff-a4cd-1ed65cc6f400
EstebanFS/Competitive-Programming
Judges/CodeForces/569/B - Inventory/569B.cpp
//<NAME> using namespace std; #include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <sstream> #include <fstream> #include <cassert> #include <climits> #include <cstdlib> #include <cstring> #include <string> #include <cstdio> #include <vector> #include <cmath> #include <queue> #include...
ALGO
0.999958
3.364923
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2013-05-28T15:40: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": "719a05788...
fd028c18-9132-4c62-860a-355029def618
thiago6891/code-eval-challenges
medium/overlapping-rectangles/main.cpp
#include <fstream> #include <iostream> #include <string> #include <vector> #include <cstdlib> using namespace std; class Rectangle { int _top; int _bottom; int _left; int _right; public: void setPoints(int left, int top, int right, int bottom) { _left = left; _top = top; ...
ALGO
0.99654
4.570903
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2014-02-06T17:17:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e8cc975ff...
6f47f541-27be-489a-a5b4-7cd6dbb2b056
ezratweaver/Learning-CPP
Chapter4/fe9/fe9.cpp
#include <iostream> double calculateDistanceFallen(int seconds) { return (9.8 * (seconds*seconds)) / 2.0; } int getHeightOfTower() { std::cout << "Enter the height of the tower in meters: "; int userInput{ }; std::cin >> userInput; return userInput; } double calculateBallHeight(int height, int ...
ALGO
0.995207
5.74512
{ "github_metadata": { "branch": "main", "commit_count": 146, "repo_created_at": "2024-01-09T12:03: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": "d598ef98e9...
0dc03c73-954b-4a39-b580-3c2b49440e9b
gabriel-lando/INF01175-TrabalhoFinal
HLS-MultMatriz/proj_matrix_multiply/solution1/syn/systemc/matrix_multiply_alt2.cpp
// ============================================================== // RTL generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC // Version: 2018.3 // Copyright (C) 1986-2018 Xilinx, Inc. All Rights Reserved. // // =========================================================== #include "matrix_multipl...
ALGO
0.977831
3.63322
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-05-19T23:16: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": "927c046789...
e653bfd1-d8f6-49a5-9a4b-3e922236aca8
yashkumar2603/CompetiPro
A_Rudolf_and_the_Ticket.cpp
// Link : https://codeforces.com/contest/1941/problem/A #include <bits/stdc++.h> #define ll long long using namespace std; #define all(x) (x).begin(), (x).end() ll lcm(ll a, ll b) { return a / __gcd(a, b) * b; } const int N = 1e5 + 10; // Type slash-n here before u begin. #define nl "\n" void solution() { // write...
ALGO
0.999949
4.293013
{ "github_metadata": { "branch": "main", "commit_count": 65, "repo_created_at": "2023-12-09T11:40:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ecad1b74fd...
924ed695-f606-4716-b38a-60484a53ea75
bossbobster/CSES-Problems
Range Queries/RangeUpdateQueries.cpp
#include <iostream> #include <string.h> #include <fstream> #include <stdio.h> #include <iomanip> #include <algorithm> #include <math.h> #include <vector> #include <stack> #include <queue> #include <bitset> #include <map> #include <set> #include <unordered_map> #include <unordered_set> //#include <ext/pb_ds/assoc_contai...
ALGO
0.999671
3.856191
{ "github_metadata": { "branch": "main", "commit_count": 280, "repo_created_at": "2021-02-24T20:06:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a783ec35a6...
5081a46b-4d61-47d3-90bd-f201ddd1da99
ay2306/Competitive-Programming
codeChef/COLCHEF.cpp
/* ____________________________________________________________ | | | Author: ay2306 | |____________________________________________________________| */ #include <bits/stdc++.h> #define MOD 1000000007 #define test i...
ALGO
0.999996
4.984408
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2019-08-29T14:45:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "78d29de73...
77cde5d7-92a4-4b13-9a1a-41f3c2967747
cmcamdy/leetcode
src/cmcandy/C_Language_Answers/algo/82_combinationSum2.cpp
#include <iostream> #include <vector> #include <algorithm> #include <map> using namespace ::std; class Solution { public: vector<int> candidates; int target, sum; vector<int> path; vector<vector<int>> res; map<int, int> m; vector<vector<int>> combinationSum2(vector<int> &candidates, int target)...
ALGO
0.99997
5.491296
{ "github_metadata": { "branch": "master", "commit_count": 141, "repo_created_at": "2020-04-03T13:08:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "619fa402...
4670dc25-5f49-4757-b427-48dffec88b92
Monse125/T2-Logs
src/kruskal_sorted_raw.cpp
#include "kruskal_sorted_raw.hpp" #include "union_find_raw.hpp" #include <algorithm> /** * @brief Implementación del algoritmo de Kruskal usando ordenamiento y Union-Find sin optimizaciones * @param graph Grafo de entrada con nodos y aristas * @return Vector de aristas que forman el árbol de expansión mínimo * *...
ALGO
0.999986
6.564386
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2025-06-08T05: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": "1d84b021ebe...
444b136e-5b4e-4ff0-a509-1b0abd22f614
MiguelRojas-05/resolviendo_problemas
leetcode/minimum_path.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; typedef long long ll; // typedef vector<int> vi; // typedef pair<int, int> pii; const ll MOD = 1e9+7; const ll INF = 1e18; //En una grilla con valores enteros positivos, encuentra la suma mínima necesaria para // moverte de la esquina superior iz...
ALGO
0.999885
4.930961
{ "github_metadata": { "branch": "master", "commit_count": 158, "repo_created_at": "2024-07-29T12:38: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": "5a469171...
90d5f14c-3a0a-4f4b-9925-02b5081f4a61
mearif12/MATH
lab7.cpp
#include <iostream> using namespace std; int main() { //input number of total point cout << "Enter the number of total point: "; int n; cin >> n; //taking user input double x[n], y[n]; cout << "Enter the values of x: "; for (int i = 0; i < n; ++i) { cin >> x[i]; } cout <...
ALGO
0.999914
5.424726
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-04-27T05:35: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": "c0253e1aa2c...
8196274f-5c48-46f8-a115-f440288c4459
Quancoder260503/Programming-Contest-Solution
AMERICA/NORTH AMERICA/QUALIFIER/2021/Ilovestrings.cc
#include "bits/stdc++.h" using namespace std; const int mod = 1e9 + 7; const int maxf = 1e5 + 10; string vowels = "aeiouAEIOU"; string consonants; int is_vowels(char c) { return (vowels.find(c) != -1); } void init(void) { for (char c = 'a'; c <= 'z'; c++) if(!is_vowels(c)) consonants += c; for (ch...
ALGO
0.999916
3.882031
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-26T07:27: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": "017eab899820...
499ff635-62f4-4fe4-9e9f-090bc1067467
NH5pml30/WrigglePie
algo/2/big_sum/big_sum/main.cpp
/* <NAME>, M3138 */ #include <iostream> #include <vector> #include <functional> template<typename type> void Merge(std::vector<type *> &A, int L, int Half, int R, std::function<bool(const type &Left, const type &Right)> Less) { std::vector<type *> buffer(R - L); memcpy(buffer.data(), &A[L], size...
ALGO
0.999282
3.707467
{ "github_metadata": { "branch": "master", "commit_count": 136, "repo_created_at": "2019-12-17T12:06: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": "e0434964...
224cd277-4534-46ef-869c-7714dce0969b
CJ-1998/Algorithm_Test
Do_It!_Algorithm_Coding_Test_C++/26_BOJ1260.cpp
/* 문제: 그래프를 DFS로 탐색한 결과와 BFS로 탐색한 결과를 출력하는 프로그램을 작성하시오. 단, 방문할 수 있는 정점이 여러 개인 경우에는 정점 번호가 작은 것을 먼저 방문하고, 더 이상 방문할 수 있는 점이 없는 경우 종료한다. 정점 번호는 1번부터 N번까지이다. 입력: 첫째 줄에 정점의 개수 N(1 ≤ N ≤ 1,000), 간선의 개수 M(1 ≤ M ≤ 10,000), 탐색을 시작할 정점의 번호 V가 주어진다. 다음 M개의 줄에는 간선이 연결하는 두 정점의 번호가 주어진다. 어떤 두 정점 사이에 여러 개...
ALGO
0.999983
5.335151
{ "github_metadata": { "branch": "main", "commit_count": 315, "repo_created_at": "2022-12-20T23:26:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8380caef1f...
b0df754a-721d-463b-bb40-398734458359
nmpogg/CodePTIT
c++/sap_xep_danh_sach_giang_vien.cpp
#include <bits/stdc++.h> using namespace std; /* 3 <NAME> Cong nghe phan mem <NAME> Khoa hoc may tinh Dang Minh Tuan An toan thong tin */ class GiaoVien{ public: string id, ten, mon; void nhap(); void in(); }; int dem = 0; void GiaoVien::nhap(){ dem++; if(dem < 10) id = "GV0" + to_string(dem); else id = "G...
ALGO
0.999582
3.69364
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2024-09-06T09:00:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fbf3e78442b...
bb526a57-06c3-4600-ba44-d2c865c1fcbd
vladbot2/ConsoleApplication26
ConsoleApplication26.cpp
//#include <iostream> //using namespace std; // //class DoublyLinkedList { //private: // struct Node { // int value; // Node* next; // Node* prev; // // Node(int val) : value(val), next(nullptr), prev(nullptr) {} // }; // // Node* head; // Node* tail; // size_t size; // // ...
ALGO
0.999023
6.126199
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-11-16T12:18:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "46b40da392...
21477e3f-d60e-48ea-a472-b6ac5c5eed7e
RodrigoEdson/C_CPP_udemy
array/twoDimensionalArray.cpp
#include <iostream> using namespace std; int main(int argc, char const *argv[]) { // array inside stack int A[3][4] = {{1, 2, 3, 4}, {2, 4, 5, 9}, {8, 7, 6, 1}}; // half stak, half heap int *B[3]; B[0] = (int *)malloc(4 * sizeof(int)); B[1] = (int *)malloc(4 * sizeof(int)); B[2] = (int *)...
ALGO
0.976163
3.564421
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2021-10-16T16:26: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": "5dc94a39469...
9a5ac594-b8ca-49c1-ae93-447afc4b999a
w3ntao/pbrt-minus
src/pbrt/base/interaction.h
#pragma once #include <pbrt/base/bsdf.h> #include <pbrt/base/ray.h> #include <pbrt/euclidean_space/normal3f.h> #include <pbrt/euclidean_space/point2.h> #include <pbrt/euclidean_space/point3fi.h> #include <pbrt/spectrum_util/sampled_spectrum.h> class BSDF; class Camera; class Light; class Material; class SampledWavele...
ALGO
0.984507
7.118603
{ "github_metadata": { "branch": "main", "commit_count": 314, "repo_created_at": "2022-03-08T00:30:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 19, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8da752541...
66f8ca81-3698-46c3-8a38-759afcc5552e
cpp-tutor/learnmoderncpp-articles
template-primer/print_tuple2.cpp
// print_tuple2.cpp : output a tuple using recursive call and constexpr condition test // note: compile with -std=c++17 or later #include <iostream> #include <tuple> using namespace std; template<size_t N, typename... Args> void print(ostream& os, const tuple<Args...>&t) { os << get<sizeof...(Args) - N - 1>(t); ...
TOOL
0.976517
6.351068
{ "github_metadata": { "branch": "main", "commit_count": 91, "repo_created_at": "2022-02-17T18:02:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "023dcb670a...
1ff25c87-74ba-4dce-bbf3-9b4982dad4dd
andrew-d-king/rnsc
source/convert/linkedList.h
/****************************************************************************** ******************************************************************************* ******************************************************************************* // All files written by <NAME>, 2004, except some of the linked list // classes,...
TOOL
0.995159
5.608306
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2013-03-19T22:17:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86b2ec4b13...
12d4f273-fddf-441b-ab3a-5416b09c7ffc
Nurbol0/Ass1
main.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; // Problem 1 int findMin(int n, int arr[]) { int minNum = arr[0]; for (int i = 1; i < n; ++i) { if (arr[i] < minNum) minNum = arr[i]; } return minNum; } // Problem 2 double findAverag...
ALGO
0.999643
4.592029
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-07T16:02: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": "d2f2a2ff16fc...
5927fe68-15a5-4dea-9d86-a959f6267481
ishandutta2007/codeforces-s
shik/normal/674/G.cpp
// {{{ by shik #include <bits/stdc++.h> #include <unistd.h> #define SZ(x) ((int)(x).size()) #define ALL(x) begin(x),end(x) #define REP(i,n) for ( int i=0; i<int(n); i++ ) #define REP1(i,a,b) for ( int i=(a); i<=int(b); i++ ) #define FOR(it,c) for ( auto it=(c).begin(); it!=(c).end(); it++ ) #define MP make_pair #define...
ALGO
0.999247
3.898659
{ "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": "aa9fc556592d...
1e9d4dee-6a90-4822-9e4f-a37824e92436
LotFullKa/ForWorkOnLinux
Projects/BigInteger_V2.0/biginteger.h
#include <iostream> #include <vector> #include <string> using namespace std; class BigInteger { public: // конструкторы и конвентаторы //default BigInteger(){ _digits.resize(0); _digits.push_back(0); } //by int BigInteger(int x) { _digits.resize(0); if (x == 0...
ALGO
0.998817
3.962692
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2020-02-12T20:45:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e452f2dfc...
7883cc73-9f8e-4371-91aa-166ee0e22d45
seungchulee/baekjoon
sds알고리즘 특강/6일차/교수님은기다리지않는다(sol).cpp
#include <stdio.h> #include <vector> #include <cstring> using namespace std; long long int to_union[100001]; long long int diff[100001]; long long int n[100001]; void init() { for (int i = 0; i <= 100000; i++) to_union[i] = i; } long long int find(long long int a) { if (to_union[a] == a) return to_union[a]; els...
ALGO
0.9999
3.742602
{ "github_metadata": { "branch": "master", "commit_count": 238, "repo_created_at": "2019-08-18T10:22:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6c7e3b60...
fe7b8311-f274-452d-8036-5c90502c18ed
TarunSaini063/Coding
DataStructure/codeforces/647_2.cpp
#include <bits/stdc++.h> using namespace std; #define ld double #define ll long long #define pb emplace_back #define mk make_pair #define mod 1000000007 #define ff first #define ss second #define FIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define all(x) x.begin(),x.end() ll power(ll a, ll b) {...
ALGO
0.999951
4.384125
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2020-04-04T07:52:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f19a7ac31...
88762ce8-bf53-4433-bf1c-ab123f8418c3
littlesam95/AlgorithmPractice
백준/Silver/1614. 영식이의 손가락/영식이의 손가락.cc
#include <iostream> #include <string> #include <vector> #include <algorithm> #define FASTIO cin.tie(NULL); cout.tie(NULL); ios::sync_with_stdio(false); #define LL long long using namespace std; LL N, M; LL Answer = 0; void Input() { cin >> N; cin >> M; } void Settings() { if (N == 1) { Answer = M * 8; } else ...
ALGO
0.999835
3.648991
{ "github_metadata": { "branch": "main", "commit_count": 933, "repo_created_at": "2024-08-28T00:09: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": "1255f908da...
238dc898-c4cd-460f-a746-bee99c207aa6
ishandutta2007/codeforces-h
he_ren/normal/1082/G.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; const int MAXN = 1e3 + 5; const int MAXM = 1e3 + 5; const ll linf = 0x3f3f3f3f3f3f3f3f; template<const int MAXN,const int MAXM> struct Max_Flow { struct Edge { int next,to; ll flow; }e[MAXM<<1]; int head[MAXN],etot; ...
ALGO
0.999862
3.599236
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2eb9aa6a3eb...
2fc993fd-9a55-4c82-8157-9c33b3708c2c
Aakash-lpu-9961/Data-Structures-and-Algorithms-
Program59.cpp
#include <iostream> using namespace std; int maxEnergies(int arr[], int n); int main() { int n; int arr[n]; int max; cout << "Total Chemicals:"; cin >> n; for (int i = 0; i < n; i++) { cin >> arr[i]; } cout << "\t"; max = maxEnergies(arr, n); cout << "Max Energy is:" ...
ALGO
0.999935
4.122472
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2022-07-05T17:10:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1873cf105ab...
bab185c1-52bf-425b-aecb-f42ee5de14a3
JonasToth/depth-conversions
src/include/sens_loc/conversion/depth_to_flexion.h
#ifndef DEPTH_TO_TRIPLE_H_Y021ENVZ #define DEPTH_TO_TRIPLE_H_Y021ENVZ #include <cmath> #include <iostream> #include <limits> #include <sens_loc/camera_models/pinhole.h> #include <sens_loc/conversion/util.h> #include <sens_loc/math/eigen_types.h> #include <sens_loc/math/image.h> #include <taskflow/taskflow.hpp> namesp...
ALGO
0.935276
7.121742
{ "github_metadata": { "branch": "master", "commit_count": 905, "repo_created_at": "2020-07-28T12:18:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db5106e7...
c625b34d-e437-44ac-a16c-7cf2e4dfe244
alexzakharov1980/ProjectExample
Vector/Source.cpp
#include <vector> #include <iostream> //std::basic_string //std::char_traits template < class Symbol > class TDefaultTraits { public: static Symbol GetTerminating() { return 0; } }; template < typename Symbol , class SymbolTraits = TDefaultTraits < Symbol > > class TString { public: TString( Symbol* ptr_symbols...
TOOL
0.948692
4.698913
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-10-21T07:13: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": "3bf754a2dd...
e4222025-bfaa-4289-adf4-73cc130744d3
gentleKay/LeetCodeCode
树-二叉树/二叉搜索树的第k大节点.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int kthLargest(TreeNode* root, int k) { std::vector<int> vec; if (!root) { return 0; ...
ALGO
0.999997
5.506363
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2020-09-26T15:31: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": "1f84cb6d6...
7d3b4105-0cb5-4253-a6fa-2bd8be73159a
flann-lib/flann
src/cpp/flann/util/cuda/result_set.h
/********************************************************************** * Software License Agreement (BSD License) * * Copyright 2011 <NAME> (<EMAIL>). All rights reserved. * * THE BSD LICENSE * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the...
ALGO
0.959395
7.107719
{ "github_metadata": { "branch": "master", "commit_count": 945, "repo_created_at": "2011-03-28T18:45:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2330, "forks": 660, "issues": 231, "pull_requests": 68 }, "file_meta": { "content_id": "6...
3467e9ee-1006-4db4-b97a-bfd16b99a956
jtemblador/Spring_CSC5_JoseTemblador
Homework/Assignment6_Prob4_StandardDeviation/main.cpp
/* * File: main.cpp * Author: * Created on: * Purpose: */ //System Libraries #include <iostream> //Input/Output Library #include <cstdlib> //Srand #include <ctime> //Time to set random number seed #include <cmath> //Math Library #include <iomanip> //Format Library using namespace std; //User Libr...
ALGO
0.995684
4.524937
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-06-10T00:33: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": "e844026d7e1c...