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
1a87d0d6-7ebb-436c-8c37-43388c5bea70
hujiese/C-background-development-interview-experience
01.计算机基础知识/03.数据结构和算法/常见排序算法/src/05.mergeSort.cpp
#include <iostream> using namespace std; void mergeSort(int* data, int* reg, int start, int end) { if (start >= end) return; int mid = (start + end) >> 1; int start1 = start; int end1 = mid; int start2 = mid + 1; int end2 = end; mergeSort(data, reg, start1, end1); mergeSort(data, reg, start2, end2); int...
ALGO
0.999858
4.878881
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-04-04T14:20:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 181, "forks": 45, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dbcbd0b99...
8b404e33-edd0-4636-baef-3009fca27cf8
flimam/HackerMTU2018-butproblem
src/bcp/cvrpbranchingrule.cpp
#include "cvrpbranchingrule.h" #include "CVRPSEP/include/brnching.h" #include <lemon/list_graph.h> #include "objscip/objscip.h" #include "CVRPSEP/include/cnstrmgr.h" #include "CVRPSEP/include/capsep.h" CVRPBranchingRule::CVRPBranchingRule(SCIP *scip, const char *name, const char *desc, int priority, int maxdepth, ...
ALGO
0.999686
5.478475
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2018-04-07T15: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": "9435286ad...
1debdce3-2bcc-4aa7-a070-52c49ab01dd8
ishandutta2007/codeforces-q
quang/normal/1220/E.cpp
#include <bits/stdc++.h> using namespace std; const int N = 200010; int n, m, s; int w[N]; vector<int> adj[N]; int cntTarjan; vector<int> stTarjan; int low[N], num[N]; int group = 0; int root = 0; long long a[N]; vector<int> ls[N]; int belong[N]; void dfsTarjan(int u, int p) { stTarjan.push_back(u); low[u]...
ALGO
0.999899
4.184732
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:56: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": "d830d29365d5...
2ac7ec64-f843-4df4-9fca-6848897b1e4c
ishandutta2007/codeforces-o
omer223/normal/1369/C.cpp
#define MOD 1000000007 #define fast ios::sync_with_stdio(false); cin.tie(0); cout.tie(0) #define foru(i, k, n) for (int i = k; i < n; i++) #define ford(i, k, n) for (int i = k; i >= n; i--) #define pb push_back #define mp make_pair #define has(set, x) set.find(x) != set.end() #define nohas(set, x) set.find(x) == set.en...
ALGO
0.999996
3.421024
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:45: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": "d4d09b763bba...
4b3136c9-e6e8-4fbf-b19a-991b2c90ba50
ishandutta2007/codeforces-a
alesyaivanova/normal/1205/B.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define ff first #define ss second #define pii pair<int, int> #define pb emplace_back #define pf emplace_front #define mp make_pair #define ld long double const int MAXN = 100009; int a[MAXN]; const int LG = 60; vector<int> kek[MAXN]; int n; int b[M...
ALGO
0.999923
3.605314
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59f54a7faf3c...
fd4c57e4-3f27-4f18-86b3-7dea69950e93
icecocoa6/abc
1/C.cpp
#include <iostream> #include <cmath> using namespace std; int wind_power(int dis) { int p = dis * 100; if (p <= 60 * 24) return 0; if (p <= 60 * 154) return 1; if (p <= 60 * 334) return 2; if (p <= 60 * 544) return 3; if (p <= 60 * 794) return 4; if (p <= 60 * 1074) return 5; if (p <= 60 * 1384) return ...
ALGO
0.999646
4.174963
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2018-04-09T01:59: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": "e9c0c260c...
2abb3a82-aed9-46d2-83b4-d9204b402436
Liurunex/Leetcode
269_Alien Dictionary.cpp
class Solution { public: string alienOrder(vector<string>& words) { if (words.size() == 1) return words[0]; map<char, set<char>> outlist; map<char, int> indegree; // build the graph for (int i = 0; i < words.size()-1; ++ i) { // add all letter into indegree map for graph for (int j = 0; j < words[i].si...
ALGO
0.999998
5.990717
{ "github_metadata": { "branch": "master", "commit_count": 417, "repo_created_at": "2017-06-09T07:44:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1467f099...
d7a3ce50-85ac-40a0-b01b-29b7b17038f5
ThomasZumsteg/exercism-cpp
nth-prime/nth_prime.h
#pragma once #include <vector> #include <cmath> namespace prime { /* Finds prime numbers */ using namespace std; bool isPrime(int nNum, vector<int> vnPrimes); int nth(int nNth); } int prime::nth(int nNth) { /* Returns the Nth prime number */ if (nNth <= 0) throw domain_error("Must be a positive non-zero nu...
ALGO
0.998427
5.865022
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2015-01-07T07:12:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0138763ca...
87891389-3eda-46ae-b7f3-98ae8d07bca2
weigao95/surfelwarp
imgproc/segmentation/foreground_crf_window.h
#pragma once #include "imgproc/segmentation/crf_config.h" #include "imgproc/segmentation/crf_common.h" namespace surfelwarp { /** * \brief Compute one iterations of mean-field CRF using brute-force * windowsed search. * \param meanfield_foreground_in float1 texture at subsampled resolution as input ...
ALGO
0.997369
6.135944
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2019-06-05T23:41:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 283, "forks": 72, "issues": 14, "pull_requests": 1 }, "file_meta": { "content_id": "1c7ae...
33d7d62b-d3d8-4d3d-b720-77fc671be225
Attic-Yellow/Algorithm
백준/Gold/7569. 토마토/토마토.cc
/* * 작성 일자 : 2023.12.15 * 문제 번호 : 7569번 * 문제 이름 : 토마토 * 문제 링크 : https://www.acmicpc.net/problem/7569 */ #include <iostream> #include <vector> #include <queue> using namespace std; int main() { // 상, 하, 좌, 우, 위, 아래 int dx[6] = { 0, 0, 0, 0, 1, -1 }; int dy[6] = { 0, 0, 1, -1, 0, 0 }; int dz[6] = ...
ALGO
0.999951
4.549055
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2023-12-14T11:07: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": "153aa6473c1...
53422559-171e-4510-a1d2-1fbb5c3f8ae9
ray42/CompeteAlgoPublic
CrackingTheCodingInterview/srcEd6/ch1/rrr7_RotateMatrix.cpp
/* * ========================================================================= * Copyright (c) 2018, <NAME> - All Rights Reserved * Author: <NAME> (ray), <EMAIL> AT <EMAIL> * ========================================================================= */ // This tells Catch to provide a main() - only do this in one...
ALGO
0.972611
5.296731
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2018-03-07T19:36: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": "c42aaab6e...
a26023f0-3ab2-427e-9764-3ae4300396bc
godaddy/procfilter
service/config.cpp
// // The MIT License (MIT) // // Copyright (c) 2016 GoDaddy Operating Company, LLC. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation...
TOOL
0.952537
6.148511
{ "github_metadata": { "branch": "master", "commit_count": 133, "repo_created_at": "2016-07-05T18:49:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 396, "forks": 71, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "d229f8...
52159c56-46f5-4519-bdc0-91b9f293dd6e
kohei1d/my-university-study
C++/practical-works/practical04/task4.cpp
#include <iostream> #include <iomanip> using namespace std; const int COLUMN_SIZE = 4; int sum(const int a[][COLUMN_SIZE], int rowSize); int main () { int i, j, row=3; int arr[row][COLUMN_SIZE]; // read user input cout << "Enter 3-by-4 matrix row by row: " << endl; for(i=0; i<row; i++){ for(j=0; j<CO...
ALGO
0.997391
4.567332
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2021-11-27T07:58: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": "d9f0b718923...
b4dd6a00-1aae-4582-925f-f3978a49b683
64325/23
123.cpp
#include <iostream> #include <string> #include <map> #include <vector> #include <stdexcept> #include <fstream> #include <cctype> // база данных магазина std::map<std::string, int> store; // корзина покупок std::map<std::string, int> cart; // функция на проверку вводимых значений std::string correctInput() { usi...
TOOL
0.950635
5.219484
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-04-22T11:08: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": "4a315fdc0ce...
2151c5b3-9e0d-4d46-bf0c-87a3cfec42e4
FatihOrhan0/algos
maxProfitWithCooldown.cpp
#include <algorithm> #include <iostream> #include <vector> using namespace std; class Solution { public: vector<vector<int> > dp; vector<int> prices; int dpHelper(int i, short haveStock) { if (i >= prices.size()) return 0; int ans; if (dp[i][haveStock] == -1) { if (ha...
ALGO
0.999645
5.112268
{ "github_metadata": { "branch": "main", "commit_count": 110, "repo_created_at": "2021-12-25T20:50:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "28a92d1a8f...
eb2d8ec8-09df-4bd5-84f1-8181b06b3200
Mehulcoder/Coding-ninjas-competitive
Dynamic programming 2/Knapsack.cpp
/* Name: <NAME> IIT-Guwahati */ /* A thief robbing a store and can carry a maximal weight of W into his knapsack. There are N items and ith item weigh wi and is of value vi. What is the maximum value V, that thief can take ? Space complexity should be O(n). Input Format : Line 1 : N i.e. number of items Line...
ALGO
0.999999
4.033358
{ "github_metadata": { "branch": "master", "commit_count": 135, "repo_created_at": "2019-08-07T17:54:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 240, "forks": 144, "issues": 1, "pull_requests": 2 }, "file_meta": { "content_id": "577a...
9c0e9449-13c5-4701-ad2e-102c57d790be
mansi104-ai/Leetcode_interview_ques
Graphs/topt_sort.cpp
#include <iostream> #include <vector> #include <stack> using namespace std; class Solution { public: void dfs(int node, int vis[], stack<int> &st, vector<int> adj[]) { vis[node] = 1; for(auto it : adj[node]) { if(!vis[it]) dfs(it, vis, st, adj); } st.push(node); ...
ALGO
0.999999
6.640929
{ "github_metadata": { "branch": "main", "commit_count": 156, "repo_created_at": "2024-01-11T09:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "66d7be3029...
2e6253ef-bec4-4a88-b4f7-45a9fff62645
simon0191/ProgrammingExercises
UVA.11995.ICanGuessTheDataStructure/iCanGuessTheDataStructure.cpp
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <vector...
ALGO
0.999939
4.003935
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2012-07-30T04:43: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": "0350f0c70...
6739a3f0-11b7-4d2b-bbb8-ebb0204175c3
Rishi-11-2/CSES
Finding_Borders.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; using namespace chrono; long long binpow(long long a,long long b,long long mod) { long long res=1; while(b>0) { if(b&1) { res=(r...
ALGO
0.999948
3.75732
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2023-05-09T06:41: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": "79cadec79...
00223db0-f2df-43b2-b049-c1f2c16815a5
ar-zoop/leetcode_solutions
Delete_nodes_having_greater_value_on_right.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; struct Node { int data; Node* next; Node(int x){ data = x; next = NULL; } }; void print(Node *root) { Node *temp = root; while(temp!=NULL) { cout<<temp->data<<" "; temp=temp->next; ...
ALGO
0.999777
5.493902
{ "github_metadata": { "branch": "main", "commit_count": 226, "repo_created_at": "2022-04-07T19:01: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": "bc0418eb32...
f2dc17ee-7553-40eb-baf7-c89b1a477104
LuisEnilton/Maratona
LeetCode/135 Candy/Solution.h
// // Created by Luis on 13/09/2023. // //Template By eduardocesb #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define optimize ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) #define INF 1000000010 #define INFLL 1000000000000000010LL #define ALL(x) ...
ALGO
0.999998
5.70874
{ "github_metadata": { "branch": "main", "commit_count": 204, "repo_created_at": "2023-06-20T00:39:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e358c13ec...
6772b75d-b2e4-4116-8304-f298c4246638
raincross7/code-similarity
codes/train_code/problem460/problem460_268.cpp
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; typedef pair<int, int> P; int main() { ll H, W; cin >> H >> W; if(H % 3 == 0 || W % 3 == 0){ cout << 0 << endl; return 0; } ll ans = min(H, W); for (int i = 1; i < H; i...
ALGO
0.999959
3.669609
{ "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": "12bfcac4f542...
9c09b2c4-c194-4c19-b64e-73df6b343e47
yplusplus/aabbyy
20140609/e.cpp
#include <bits/stdc++.h> using namespace std; const int N = 2010; const int eps = 1002; int sum[N][N]; struct point { int x,y; point() {} point(int x,int y):x(x),y(y) {} void read() { scanf("%d%d",&x,&y); } }a[500010]; int get_S(int x1,int y1,int x2,int y2) { return sum[x2][y2] - sum[x2][y1 - 1] - sum[x1 - 1]...
ALGO
0.999928
3.454768
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2017-04-24T03:24:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e54a24a9...
8ecce147-6e57-4309-8ce8-7e2d190b0275
hsiangling0/dataStructure
pre-in-postorder.cpp
#include <fstream> #include <iostream> #include <string> #include <stack> #define max 1000 using namespace std; ofstream out; int search(int in[],int root,int node){ //find the index in inoder, which value equal to root for(int i=0;i<node;i++){ if(in[i]==root)return i; } return -1; } void postorder(int in[],i...
ALGO
0.999871
4.557822
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-03-20T14:03: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": "1e261f5c033...
39759f36-ab7b-466b-8086-394e2bb2248c
Sudo248/Algorithm
duyetcaytheokieuxoanoc.cpp
#include<bits/stdc++.h> #define faster ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define endl '\n' using namespace std; typedef long long ll; struct Node{ int data; Node *left, *right; Node(int data){ this -> data = data; this -> left = NULL; this -> right = NULL; } }...
ALGO
0.999962
3.731998
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-07-17T10:21:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86113fd554...
8a6b7363-2ccf-4cfd-b30f-ce41d6ed44a5
MalayGain/TradeSimulator
models/AlmgrenChrissModel.cpp
// models/AlmgrenChrissModel.cpp #include "models/AlmgrenChrissModel.hpp" #include <numeric> // for std::accumulate AlmgrenChrissModel::AlmgrenChrissModel(double eta, double gamma) : eta_(eta), gamma_(gamma) {} double AlmgrenChrissModel::compute(const OrderBookSnapshot &snapshot, ...
ALGO
0.987253
7.151015
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-05-20T19:47:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e3f03d404942...
24c60c09-3288-4746-8b4e-bff1d9116144
atatomir/work
_USACO/2017-2018/DECEMBER/Standing Out/main.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <algorithm> #include <cmath> using namespace std; #define mp make_pair #define pb push_back #define ll long long #define piii pair< pair<int, int>, int > #define maxN 200111 class SuffixArray { public: void init(int *_s,...
ALGO
0.99997
3.598436
{ "github_metadata": { "branch": "master", "commit_count": 302, "repo_created_at": "2015-03-29T18:54: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": "142ee9ef...
92064e3d-380e-40e4-8586-a7406202cf76
gabrafo/Algoritmos-ED
Exercícios ED/Revisão P2/ex05.cpp
// Nota: Esse é um programa baseado em um exercício da disciplina de Estruturas de Dados da Universidade Federal de Lavras. Está sendo utilizado // apenas para a minha revisão para a segunda prova do semestre, e parte de sua implementação não foi feita por mim, e sim por quem organizou // esse exercício, que não é de m...
ALGO
0.998115
4.847376
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2024-10-11T15:48:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c03c89554...
d6e3c599-a784-4c1f-a2b0-a5e614f0576d
ViniciusBenetti/cash-cpp
cartao.cpp
#include <iostream> #include <string> std::string cardSplit(std::string c) { std::string cardS; for (char caractere : c) { if (isdigit(caractere)) { cardS += caractere; } } return cardS; } bool checksum(std::string c) { std::string cardS; cardS = cardSplit(c); ...
ALGO
0.997273
4.748092
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-01-11T01:11: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": "dacb6109816f...
21e27822-e2c8-4615-91ab-907542d3dc7b
ishandutta2007/codeforces-m
mnbvmar/normal/1523/F.cpp
//~ while (clock()<=69*CLOCKS_PER_SEC) //~ #pragma comment(linker, "/stack:200000000") #ifndef LOCAL #pragma GCC optimize("O3") #endif //~ #pragma GCC optimize("Ofast") //~ #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") //~ #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #in...
ALGO
0.999944
4.230094
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03: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": "26f9938fa7a5...
b5f22940-2996-4d5e-afde-2485c737d0e3
pch6828/PS_Algorithm
LeetCode/ALGORITHM/construct_binary_tree_from_inorder_and_postorder_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.999984
6.359765
{ "github_metadata": { "branch": "master", "commit_count": 215, "repo_created_at": "2020-08-31T15:20: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": "de8e60fb...
b8ad3ca8-9973-443a-8cf8-99099acdd174
algorithm-study-seoul/algo-study
수진/로또.cpp
#include <iostream> #include <algorithm> using namespace std; #define MAX 10 int n; int map[MAX][MAX]; bool v[MAX]; int mins=1e9; //최소비용 int start; void dfs(int index,int sum, int count) { if (count == n) { if (map[index][start] != 0) { sum += map[index][start]; if (mins > sum) { mins = sum; } ...
ALGO
0.999911
3.769166
{ "github_metadata": { "branch": "master", "commit_count": 102, "repo_created_at": "2019-11-09T10:57:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "e2292cf9d...
964cf4fc-18a5-49a9-a68d-226276036051
BoGyuPark/VS_BOJ
0407_Log/0407_Log/16236_아기상어_구조체.cpp
#include<iostream> #include<vector> #include<queue> #include<cstring> #include<algorithm> using namespace std; typedef struct info { int dist, x, y; }; int n, a[20][20], c[20][20], sx, sy, time; int dx[] = { 0,0,-1,1 }; int dy[] = { 1,-1,0,0 }; queue<pair<int, int>> q; vector<info> rmList; bool cmp(const info & a, con...
ALGO
0.999905
3.692538
{ "github_metadata": { "branch": "master", "commit_count": 129, "repo_created_at": "2019-01-02T14:17: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": "889f97d1...
b9e416fd-fe3b-4ee5-b76a-4b158db8f406
kalium222/algorithim_ex
binary_tree/postorder_traversal.cpp
#include <algorithm> #include <stack> #include <vector> using namespace std; #include "Tree.hpp" class Solution { public: vector<int> postorderTraversal(TreeNode* root) { return method1(root); } // recursively vector<int> method1(TreeNode* root) { vector<int> res{}; tr...
ALGO
0.999994
6.184364
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2025-02-15T04:46: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": "11e81e72b6c...
63d27c6e-a005-4eed-bdf0-2505b99b8e84
ftiasch/mithril
2012-12-05/C.cpp
#include <cstdio> #include <cstring> #include <climits> #include <vector> #include <utility> #include <functional> #include <algorithm> #define foreach(i, v) for (__typeof((v).begin()) i = (v).begin(); i != (v).end(); ++ i) const int N = 30000; int n, m, depth[N], parent[N]; std::vector <int> adjacent[N]; void dfs(...
ALGO
0.999919
4.574354
{ "github_metadata": { "branch": "master", "commit_count": 162, "repo_created_at": "2012-07-17T06:58:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "802ed26...
dae679f2-f6a6-4b81-bdda-4dcdd6550728
pranayghosh18/leetcode
1037-minimum-number-of-k-consecutive-bit-flips/minimum-number-of-k-consecutive-bit-flips.cpp
class Solution { public: class SegTreePointQueryRangeUpdate{ vector<int> segTree; int segTreeSize; void add(int idx, int value){ idx++; while (idx < segTreeSize) { segTree[idx] += value; idx += (idx & -idx); } } public: SegTreePointQueryR...
ALGO
0.999983
5.615032
{ "github_metadata": { "branch": "master", "commit_count": 495, "repo_created_at": "2020-09-05T17:22: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": "bbb8c084...
df100874-e0f0-4319-99d2-ad7a793d10e5
Fanttatraieste/pbinfo-PrimeIntreEle
PrimeIntreEle/PrimeIntreEle/PrimeIntreEle.cpp
/* * Programul verifica daca doua numere naturale sunt prime intre ele * Doua numere sunt prime intre ele <=> ele nu au nici un divizor comun (mai putin 1) * Acest cod este de asemenea rezolvarea problemei PrimeIntreEle de pe pbinfo */ #include <iostream> using namespace std; int main() { long long a, b; bool ok =...
ALGO
0.999847
4.078217
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-01-11T11:32: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": "7388c17629dd...
ead8dfa7-7959-48d9-b337-af07746f381b
veda-cpp-coding-test/KimHyeonSeok
week_4/덱/BOJ10866.cpp
//덱 #include<bits/stdc++.h> using namespace std; int main(void){ cin.tie(0); ios::sync_with_stdio(0); deque<int> dq ; int n ; cin >> n ; for(int i = 0 ; i < n ; i++ ){ string cmd; int x; cin >> cmd ; if(cmd == "push_front"){ cin >> x; ...
ALGO
0.999472
4.530017
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2025-03-30T10:25:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f23bb35dbfb...
970fe413-58a5-4d6a-afc5-010bd786ac45
NikitaSikalov/Algorithms-and-data-structures
Algorithms on graphs and strings/Z_Z-function/main.cpp
// // Created by <NAME> on 10.12.2017. // #include <vector> #include <string> #include <iostream> #include <algorithm> using namespace std; void Z_function(vector<int> &Z, const string &str){ Z[0] = str.size(); int L = 0, R = 0; for (int i = 1; i < str.size(); ++i) { if (i > R) { Z[i] ...
ALGO
0.999981
4.878511
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-12-12T15:47:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "71f582a4c2...
d49dfc58-fb57-480a-ad5e-aaec5911bde5
SlivkaSadovka/spbspu-labs-2023-aap-a
skuratov.danil/P4/findMinSumAlongSecondaryDiagonal.cpp
#include "findMinSumAlongSecondaryDiagonal.h" #include <algorithm> #include <limits> #include <cstddef> #include <stdexcept> size_t skuratov::findMinSumAlongSecondaryDiagonal(const int* array, size_t rows, size_t cols) { if (rows != cols) { throw std::runtime_error("Matrix is not square"); } size_t minSum...
ALGO
0.999687
6.267469
{ "github_metadata": { "branch": "master", "commit_count": 4963, "repo_created_at": "2023-10-13T20:52:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 35, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ec7900...
577a534b-de53-4225-a3e5-3241246d4085
JAIDHEER007/Data-Structures
Cpp/Queue/Queues_SLL.cpp
//Queue data structure using linked list #include<iostream> #include<vector> #include<sstream> using namespace std; string center(int width,string text){ int len = text.length(); if(width < len){ return text; } int diff = width - len; int padding1 = diff/2; int padding2 = diff - padding1; return string(paddi...
ALGO
0.997556
4.09739
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2020-11-03T03:36: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": "64dfdb06cad...
08d5ea61-eef5-42f2-afed-0b4565051ed0
teaspring/problems
leetcode/src/reverseInteger.cpp
/* * reverse digits of an integer * ie, 123 => 321, * -123 => -321 * */ #include <climits> using namespace std; class Solution{ public: int reverse(int x){ // take care of positive and negative overflow if(x == 0) return 0; int y = 0; while(x != 0){ int resi = x % 1...
ALGO
0.999517
4.93983
{ "github_metadata": { "branch": "master", "commit_count": 664, "repo_created_at": "2013-09-09T13:47:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "02b3802e...
73436685-3f98-4937-99a0-266af643b363
pyst1g/Programming-Cplus
AtCoder/abc/61~90/abc076/C.cpp
// finish date: 2018/01/24 #include <iostream> #include <cmath> #include <vector> #include <bitset> #include <algorithm> #include <stack> #include <map> #include <climits> using namespace std; #define FOR(i, a, b) for(int (i)=a;(i)<(b);(i)++) #define rep(i, n) FOR(i,0,n) #define ll long long #define vi vector<int> #...
ALGO
0.99985
3.647374
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2018-01-02T12:58:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "834b3401b...
41525e6d-17ef-4666-835e-29e7621c1520
superAman07/Cpp-basic-STL-to-advance-DSA
223.Delete node in BST.cpp
//In O(logn) time and O(h) space #include<iostream> #include<queue> using namespace std; struct node{ int data; node* left,*right; node(int x){ data=x; left=right=NULL; } }; node* getSuccessor(node* curr){ curr=curr->right; while(curr!=NULL && curr->left!=NULL)curr=curr->left; ...
ALGO
0.999981
3.838201
{ "github_metadata": { "branch": "main", "commit_count": 357, "repo_created_at": "2023-11-14T07:00: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": "36c5d1cceb...
f6c7e1f8-15e4-4847-a0f2-d50cf8506896
Shravani1031/DSA
a10.cpp
Assignment no:10 #include<iostream> using namespace std; class node { public: string key; string meaning; node *le ; node *right; }; class AVL { node *root; public: AVL() { root=NULL; } void create(); node* insert(node *cur,node *temp); node* balance(node *temp); int dif(node *temp); int height(node *temp); int maximum...
ALGO
0.99993
3.270651
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-04-02T09:35:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7b97db1c725...
5a78402a-686c-4356-bb49-0c8063366991
SnailForce/The-Design-And-Analysis-Of-Algorithms
Assessment/Project1/Project1/Source.cpp
#include <iostream> #include <vector> #include <fstream> #include <algorithm> #include <numeric> using namespace std; unsigned int n = 0; vector<int> result; vector<vector<int>> u; int main() { ifstream is("./data.txt", istream::in); ofstream os("./res.txt", ofstream::out); is >> n; for (size_t i = 0; i < n; i++...
ALGO
0.999715
3.670105
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-07-08T02:20:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12531b6a85...
dc9d63ce-9830-411d-a0d1-b22cc052ae4a
sayemimtiaz/competitive-programming
Ligh OJ/L-1112.cpp
#include<cstdio> #include<algorithm> #include<vector> #include<cstring> #include<iostream> #include<math.h> #include<cstdlib> #include<queue> #include<stack> #include<sstream> #include<set> #include<cctype> #include<string> #include<map> #include<fstream> #include<iomanip> using namespace std; #define S1(a) scanf("%d"...
ALGO
0.999253
3.719999
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-06-02T16:10: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": "212e81e2e4...
f2e3932a-e1ce-42e6-9089-10f424484628
mtcoafun/Algorithm
滑动窗口/最小覆盖子串.cpp
#include <string> #include <unordered_map> using namespace std; // 给你一个字符串 S、一个字符串 T,请在字符串 S 里面找出:包含 T 所有字符的最小子串。 // 示例: // 输入: S = "ADOBECODEBANC", T = "ABC" // 输出: "BANC" // 说明: // 如果 S 中不存这样的子串,则返回空字符串 ""。 // 如果 S 中存在这样的子串,我们保证它是唯一的答案。 class Solution { public: string minWindow(string s, string t) { unor...
ALGO
0.999977
6.659067
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2020-05-19T14:40: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": "067863f7b...
138e25a3-35c9-4ed1-b300-0c7bf813f7d8
Edith-3000/Algorithmic-Implementations
Dynamic Programming/Pattern - LCS/LCS Length Algorithm.cpp
/* Link: https://www.geeksforgeeks.org/longest-common-subsequence-dp-4/#:~:text=LCS%20Problem%20Statement%3A%20Given%20two,order%2C%20but%20not%20necessarily%20contiguous. https://leetcode.com/problems/longest-common-subsequence/ PROBLEM: Given two sequences, find the length of longest subsequence present ...
ALGO
0.999983
4.9492
{ "github_metadata": { "branch": "master", "commit_count": 490, "repo_created_at": "2020-07-24T04:49:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8e10d3a1...
3aa759fb-b446-4df4-8478-2c4c7c57ff6b
JeremyAdamHart/Raytracer
Raytracer/Raytracer/Geometry.cpp
#pragma once #include "Geometry.h" using namespace glm; const float INTERSECTION_OFFSET = 0.0001f; vec3 Triangle::getNormal() const{ return normalize(cross(c - b, a - b)); } vec3 Sphere::getNormal(vec3 position) const{ return normalize(position - origin); } vec3 Plane::getNormal() const{ return normal; } floa...
ALGO
0.980017
5.582013
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-03-06T06:15: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": "6f78e154b...
8340910b-9d2c-4b90-bcc6-a301c0a46ff2
QCL0920/AF-RLIO
include/rio_utils/strapdown.h
// This file is part of RIO - Radar Inertial Odometry and Radar ego velocity estimation. // Copyright (C) 2021 <NAME> <<EMAIL>> // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either versio...
ALGO
0.936862
6.237661
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-02-28T12:11:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 46, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "309f429518...
75716968-4ffa-4639-9b17-b83f6fb898bb
AngelSpinazzola/Guias-laboratorio-1
Guia 3/Ejercicio 20/EJ - 20.cpp
/*Se dispone de la información de los últimos 19 partidos del futbolista <NAME>. Por cada partido se registró: Número de partido Minutos jugados Tarjetas amarillas Tarjetas rojas Goles Existe un registro para cada partido. Los mismos se encuentran ordenados por número de partido. Se pide calcular e informar: La cantid...
ALGO
0.997431
4.269656
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-06-26T17:27: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": "e08c03d82061...
e2dd7237-862f-4b11-be9a-1f8323b593e4
Brayton-Han/Data-Structure
Homework/WEEK 13/E.cpp
#include <iostream> #include <algorithm> using namespace std; int n, m, fa[205], st[205], top=0, cnt; long long g, s, ans = 0x7fffffffffffffff; struct edge{ int x, y; long long g, s; }e[50005]; bool cmp(edge& a, edge& b) { return a.g==b.g ? a.s < b.s : a.g < b.g; } int find(int x) {return x==fa[x] ? x : fa[x]...
ALGO
0.99936
3.671684
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2021-02-01T12:43: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": "31646a7651b...
d0dac5ba-30d7-4922-b064-279528a03e7d
LeeSoMyoung/BOJ
10026 C++17.cpp
// BOJ 10026 적록색약 C++17 #define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #define rep(i,a,b) for(int i=a;i<b;++i) #define forn(i,N) rep(i,0,N) #define MAX 110 using namespace std; typedef pair<int, int> pii; typedef vector<char> vc; typedef vector<vc> vvc; bool visited[MAX][MAX]; void bfs(int Y, int X, int n...
ALGO
0.999151
3.876639
{ "github_metadata": { "branch": "master", "commit_count": 212, "repo_created_at": "2019-05-06T09:03: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": "21368de9...
07300963-8842-4fc3-b07e-02d824849e67
xinlin192/ConvexLatentVariable
codebase/HDP_TopicModel/single.cpp
/*############################################################### ## MODULE: single.cpp ## VERSION: 2.0 ## SINCE 2014-07-21 ## AUTHOR: ## <NAME> (xl5224) - <EMAIL> ## ## DESCRIPTION: ## Convex relaxation for single resolution ################################################################# ## Edited by Ma...
ALGO
0.999991
4.699861
{ "github_metadata": { "branch": "master", "commit_count": 464, "repo_created_at": "2014-06-13T20:32:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3e243ad5...
c751aec9-6e67-4496-abd1-28cb2c9469ef
HieuAnh87/University
Cplus/Cplus-ptit/Re_Array_11.cpp
#include<bits/stdc++.h> using namespace std; int n,a[1005],dp1[1005],dp2[1005]; int slove(){ for(int i=2;i<=n;i++){ for(int j=1;j<i;j++){ if(a[i]>a[j] && dp1[i] <dp1[j]+1) dp1[i] =dp1[j]+1; } } for(int i=n-1;i>=1;i--){ for(int j=n;j>i;j--){ if(a[i]>a[j] && dp2[i] <dp2[j]+1) dp2[i] =dp2[j]+1; } ...
ALGO
0.999895
4.313963
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-28T08:56: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": "b6d442b6eab2...
5053fdb3-f299-4cf4-a436-575589174f8c
HAshIRa7/Algorithms
graphs/scooter.cpp
#include <iostream> #include <vector> #include <queue> #include <climits> #include <map> #include <set> using namespace std; typedef struct vertex { int i; int j; int d; } vertex; struct pq_less { bool operator ()(vertex const &l, vertex const &r) { return l.d < r.d; } }; ...
ALGO
0.999884
3.760786
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2022-01-17T13:47:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "615d286d6a9...
2a768ce4-b49e-4395-ab67-d920d3741327
nguyentuss/Competitive-Programming
CP/OnlineJudge/CodeForce/VNOI/c11pnum.cpp
#include <bits/stdc++.h> using namespace std; #define MAX_N (int) (4*1e6) unsigned long long n , k; vector <bool> sieve(MAX_N + 1 , false); vector <long long> v; void solve() { for (long long i = 2 ; i * i <= 2800000 ; i++) { if (!sieve[i]) for (long long j = i * i ; j <= 2800000; j += i) { sieve[j] = ...
ALGO
0.999905
3.914437
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-01-20T04:18:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb7dcea7bb43...
7e789362-d2bf-4abe-bb04-865077ab1ad1
yusuufaslan/Daily-LeetCode-Solutions
june/mid-level/shortest_path_in_binary_matrix_1091.cpp
/* @author: yusuufaslan @date: 01.06.2023 @problem: 1091. Shortest Path in Binary Matrix */ class Solution { public: int shortestPathBinaryMatrix(vector<vector<int>>& grid) { int n = grid.size(); if (grid[0][0] == 1 || grid[n-1][n-1] == 1) return -1; ...
ALGO
0.99999
5.86352
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-06-03T11:11: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": "d2742f43ce3...
8a49436c-9894-432f-84cf-1f42741d4c2c
FelixMatrixx/23521215_23521704_23521494_23521821_23521208_23521327_BT05
Bai194/Bai194.cpp
#include <iostream> using namespace std; struct SoPhuc { int thuc; int ao; }; typedef SoPhuc SOPHUC; void Nhap(SOPHUC&); void Xuat(SOPHUC); void Nhap(SOPHUC[], int&); void Xuat(SOPHUC[], int); void HoanVi(SOPHUC&, SOPHUC&); void SapXep(SOPHUC[], int); int main() { SOPHUC a[50]; int n; Nhap(a, n); SapXep(a, n); ...
ALGO
0.996206
3.78945
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2023-10-18T16:01: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": "27fb7163e...
36c7b4cd-7530-4816-a955-f41f886ceedf
gA4ss/mympz
src/internal/__addsub.cc
/** * @brief 两个基本的数值队列单元进行相加。 * @param[in] z 返回结果 * @param[in] x 大数结构 * @param[in] y 大数结构 * @param[in] n 多少位相加 * @return 最后一组单位数相加后的进位。 */ unit_t __add_units(const number_ptr_t& z, const number_ptr_t &x, const number_ptr_t &y, size_t n) { unit_t...
ALGO
0.986129
4.637058
{ "github_metadata": { "branch": "master", "commit_count": 62, "repo_created_at": "2022-06-11T06:39: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": "dedd0387f...
b08dc0f6-12b6-480c-b671-84474eed75a3
VidhiAggarwal/Programming-Reference-Notes
L5- Sorting and Arrays/codes/array.cpp
#include <iostream> using namespace std; void print_array(int a[], int n) { int i = 0; while (i < n) { cout << a[i] << endl; i++; } } void selection_sort(int a[], int n) { int i = 0; while (i < n) { // Find element for ith position int min = a[i]; int minIndex = i; int j = i; while (j < n) { if ...
ALGO
0.999706
4.170184
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-09-11T09:55:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6fa04a975f...
4d3795ec-87b7-4adf-854b-552c14caa1d8
kolyaklimk/Qt-Cpp-Projects
2nd semester university/7 laba/111/rbTree.h
#ifndef RBTREE_H #define RBTREE_H #include <QString> #include <QTreeWidget> template<typename Key, typename Value> class rbTree { enum Red_or_Black { black, red }; protected: QString tr; struct node { Red_or_Black color = black; node* parent = nullptr, * left = nullptr, * right = nullpt...
TOOL
0.959091
5.001687
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-06-15T14:52: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": "ce1bf83c1d0a...
b03c74fa-4b14-4700-be7c-a24a519d4ecd
anshuvermaa/coding
algo1/stack/stack.cpp
#include<iostream> using namespace std; class stack{ int *arr; int nextIndex; int capacity; public: stack(){ arr=new int[4]; nextIndex=0; } // stack(int cap){ // capacity=cap; // arr=new int[capacity]; //we take capacity only for static stack not for dynamic...
ALGO
0.996858
3.94047
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-01-06T13:58: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": "9f015c377676...
9448bc2e-3999-4ae2-8ea9-8c4ae9c50eb4
alexey-malov/wavelet-image-packer
brainwavelets/include/staticwavelet2d.h
#ifndef __STATIC_WAVELET2D_H_INCLUDED__324897239487238947239847__ #define __STATIC_WAVELET2D_H_INCLUDED__324897239487238947239847__ #include "defines.h" namespace brainwavelets { class CStaticWavelet2D { public: typedef float data_t; public: // constructor CStaticWavelet2D(){} // direct transform private: CSt...
ALGO
0.963797
6.430544
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-07-12T20:21: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": "65863d3c89...
373edc40-3ab5-4cbb-b3e8-0c6f70ec040a
halbux/sparselizard
src/fourier.h
// sparselizard - Copyright (C) see copyright file. // // See the LICENSE file for license information. Please report all // bugs and problems to <alexandre.halbach at gmail.com>. #ifndef FOURIER_H #define FOURIER_H #include <iostream> #include <cmath> #include "densemat.h" #include <vector> #include "harmonic.h" na...
ALGO
0.91827
5.469738
{ "github_metadata": { "branch": "master", "commit_count": 3280, "repo_created_at": "2019-04-09T15:27:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 357, "forks": 72, "issues": 4, "pull_requests": 9 }, "file_meta": { "content_id": "dda3...
1661a8f9-f7b5-4fc2-b214-62f6cb278283
dfordp/sheet-timepass
hard/WordWrap(GFG).cpp
class Solution { public: int solve(int index , vector<int>&nums , int k ,vector<int>& dp) { if(index >= nums.size()-1) return 0; if(dp[index]!=-1) return dp[index]; int val = 0 ; int mini = 1e9; for(int i = index ; i < nums.size() ; i++) { val = val + nums...
ALGO
0.999989
5.695065
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2024-07-16T06:58: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": "99e86a89a44...
24de5195-f98b-48c4-b77b-c57c8d1059cd
MichaleGo/Algorithm
2018-10-short-semester/Shopping.cpp
#include"stdlib.h" #include"string.h" #include"stdio.h" #include"iostream" using namespace std; typedef struct node { long long int s; long long int e; long long int ID; }node; node mall [200001]; int cmpfunc( const void *a , const void *b ) { node *c = (node *)a; node *d = (node *)b; if(c->s != d->s) retu...
ALGO
0.999987
3.361394
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2018-10-30T08:28:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b92113232...
45f3c9d5-1363-4ee3-b31e-38c1a00792aa
masakinihirota/2019pg
ABC/131-140/132/ABC132_A_sort.cpp
#include <bits/stdc++.h> #include <ctype.h> using namespace std; #define ll long long #define all(x) (x).begin(), (x).end() const long long INF = 1LL << 60; #define rep(i, n) for (int i = 0; i < (int)(n); i++) //(i, 10) i=0~i=9まで #define repr(i, n) for (int i = n; i >= 0; i--) // (i, 10) i=10~i=0まで #define FOR(i, ...
ALGO
0.999973
3.477075
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2019-12-01T14:32:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1123967f1...
b88fa0e4-394a-4720-8ecd-9396da1e4511
king7282/algorithm
boj/Graph/16312.cpp
#include <stdio.h> #include <vector> #include <string.h> #include <queue> #include <limits.h> #include <algorithm> struct dinic { struct edge { int to, rev; long long cap; edge(int to, long long cap, int rev) : to(to), cap(cap), rev(rev) {} }; std::vector<edge> adj[2020]; // 첫번째 to, 두번째 capacity int level[2...
ALGO
0.999924
4.236175
{ "github_metadata": { "branch": "master", "commit_count": 462, "repo_created_at": "2020-09-07T05:09: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": "62404a72...
a0094c1c-c7a9-41cc-aa0c-3a4df97d5414
nolan0801/Competitive-Programming
Codeforces/Div2/796/C.cpp
/* Author : vidut_206_CNH */ #include <bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define gcd(a,b) (__gcd(a,b)) #define lcm(a,b) (a/gcd(a,b)*b) #define sz(x) (int)(x.size()) #define fast_cin() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define db(x) cerr << "...
ALGO
0.999982
3.690296
{ "github_metadata": { "branch": "main", "commit_count": 144, "repo_created_at": "2021-12-21T06:10: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": "cb3f184297...
965428ca-7082-4b71-ae60-c65efc3da184
pragyanatvade/VogueMirror
vm_deps/sensorkinect/source/XnDeviceSensorV2/Bayer.cpp
/**************************************************************************** * * * PrimeSense Sensor 5.x Alpha * * Copyright (C) 2011 PrimeSense Ltd. * * ...
ALGO
0.976993
5.221571
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2015-07-03T16:19:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3212906579...
9027c202-c678-4fe4-a09a-52804158e7fb
Red74Moon/YGL-Study
AvrgOver(20211004).cpp
//https://www.acmicpc.net/problem/4344 // 첫째 줄에는 테스트 케이스의 개수 C가 주어진다. // //둘째 줄부터 각 테스트 케이스마다 학생의 수 N(1 ≤ N ≤ 1000, N은 정수)이 첫 수로 주어지고, //이어서 N명의 점수가 주어진다.점수는 0보다 크거나 같고, 100보다 작거나 같은 정수이다. // // 입력 //5 //5 50 50 70 80 100 //7 100 95 90 80 70 60 50 //3 70 90 80 //3 70 90 81 //9 100 99 98 97 96 95 94 93 91 // // 출력 //...
ALGO
0.986352
4.068616
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2021-10-04T02:25:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b06892f64dd...
b4df27b4-55dc-4336-8a3d-cb481c43e921
twistisen/Pairproduction
extrafunctions.cc
#include <gsl/gsl_errno.h> #include <gsl/gsl_matrix.h> #include <gsl/gsl_odeiv2.h> #include <gsl/gsl_errno.h> #include <gsl/gsl_spline.h> #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> #include <cmath> #include <iostream> #include <fstream> #include <complex> #include <stdlib.h> #include <stdio.h> #include <stri...
ALGO
0.99927
3.723867
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-04-04T20:07:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94f91afd5a...
99a65679-80ac-4c6e-89d6-bdcb66715050
polyfem/polyfem
src/polyfem/solver/forms/InversionBarrierForm.hpp
#pragma once #include "Form.hpp" #include <polyfem/utils/Types.hpp> namespace polyfem::solver { class InversionBarrierForm : public polyfem::solver::Form { public: InversionBarrierForm( const Eigen::MatrixXd &rest_positions, const Eigen::MatrixXi &elements, const int dim, const double vhat); std::string ...
ALGO
0.995465
5.771541
{ "github_metadata": { "branch": "main", "commit_count": 5525, "repo_created_at": "2018-08-30T16:20:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 555, "forks": 88, "issues": 32, "pull_requests": 9 }, "file_meta": { "content_id": "60f7fd...
24d18a41-f175-46d4-adc8-cf2276d6d9a1
justin0u0/LeetCode
problems/1590-make-sum-divisible-by-p/solution.cpp
/** * Author: justin0u0<<EMAIL>> * Problem: https://leetcode.com/problems/make-sum-divisible-by-p/ * Runtime: 92ms (99.49%) */ const static auto _ = []() { cin.tie(nullptr)->sync_with_stdio(false); return nullptr; }(); class Solution { public: int minSubarray(const vector<int>& nums, const int p) { long...
ALGO
0.999723
5.250695
{ "github_metadata": { "branch": "master", "commit_count": 1181, "repo_created_at": "2020-07-01T07:06:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57846ae...
cb49b08c-9f6e-48bd-8cb3-8c781e7072b4
Bonobolion/coursework
p3/main.cpp
/* Name: <NAME> Title: p3 Due: August 6, 2019 Course: CSCE 2110 Description: This program simulates the spread of a disease based on the users input file. */ #include <iostream> #include <fstream> #include <sstream> #include <vector> #include <iomanip> #include <math.h> using namespace st...
ALGO
0.999438
4.173383
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-10-22T03:28: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": "0850259357...
2e420346-7dbe-40f0-8fd4-06344c0e6872
lapshuntanya/P41-queue
main.cpp
#include "myQueue.h" #include <string> #include "PriorityQueue.h" using namespace std; // TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter. int main() { // TIP Press <shortcut actionId="RenameElement"/> when your caret is at the <b>lang...
ALGO
0.947158
3.886026
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2025-06-17T12:53: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": "7dee03e5c6...
b3575975-d9c7-483d-90f6-1e396574538f
PaddlePaddle/Paddle
paddle/phi/kernels/impl/svdvals_grad_kernel_impl.h
// Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
ALGO
0.981404
7.420015
{ "github_metadata": { "branch": "develop", "commit_count": 54743, "repo_created_at": "2016-08-15T06:59:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 23037, "forks": 5770, "issues": 1009, "pull_requests": 823 }, "file_meta": { "content_...
71686891-a510-43b5-ab80-1bb2ba9595b9
UdaySharmaGitHub/DSA-CPP
GFG/Medium Problems/Sum_of_Middle_elements_of_two_sorted_arrays.cpp
/* Sum of Middle elements of two sorted arrays Given 2 sorted integer arrays arr1 and arr2 of the same size. Find the sum of the middle elements of two sorted arrays arr1 and arr2. Examples: Input: arr1 = [1, 2, 4, 6, 10], arr2 = [4, 5, 6, 9, 12] Output: 11 Explanation: The merged array looks like [1, 2, 4, 4, 5, 6, ...
ALGO
0.999987
6.592262
{ "github_metadata": { "branch": "main", "commit_count": 292, "repo_created_at": "2023-11-19T16:25:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f1c76ac81f...
dc614cde-fde8-4956-b9e8-b3eeaec71ecc
Ktoks/CIT
Programs/4300_Artificial_Intelligence/cs4300-code-ai-agents/prog/RubiksCube/CubeProblem.h
#ifndef _CUBEPROBLEM_H_ #define _CUBEPROBLEM_H_ // may or may not be finished #include "CubeModel.h" #include <map> #include "CubeState.h" #include "ai_search.h" namespace ai { namespace rubiks { class Problem : public ai::Search::Problem { public: enum HeuristicEnum {ZERO_HEURISTIC, FACELET_HEURISTIC, CUBIE_HEUR...
ALGO
0.999339
6.246323
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2018-08-25T20:08:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "d1f4cfb3a...
e81acb57-89c0-42e1-86a4-5ea1110a7827
Epim3dium/flip-fluid-parallel
src/sequential/fluid.cpp
#include "fluid.hpp" #include "cuda/particle.hpp" #include "time.hpp" #include <algorithm> #include <vector> Fluid::Fluid(float cell_size, int width, int height) : m_cell_size(cell_size), m_width(width), m_height(height), m_num_cells(width * height){ cell_color = std::vector<Color>(m_num_cells); cell_type = std...
ALGO
0.998235
5.684504
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2025-06-01T20:28: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": "f77be50eb53...
904d6a00-ce5e-42bc-ad2d-6cf536526145
OceannTwT/sherlock_go
main.cpp
#define _CRT_SECURE_NO_WARNINGS #include "Amazon.h" #include <fstream> #include <graphics.h> // 图形库,不自带,安装easyX附加 #include <iostream> #include <stdlib.h> #include <string> using namespace std; int mode_choose = 0; int behind = 0; int main() { chessboard A; initgraph(700, 550, SHOWCONSOLE); // 初始化图形环境 // HWND initg...
TOOL
0.907239
3.735685
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-01-18T10:57:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8dce49ac2b73...
794578f2-f209-4647-ad71-55b47b24f752
elemental/Elemental
src/blas_like/level3/Trmm/RUN.hpp
/* Copyright (c) 2009-2016, <NAME> All rights reserved. Copyright (c) 2013, The University of Texas at Austin All rights reserved. This file is part of Elemental and is under the BSD 2-Clause License, which can be found in the LICENSE file in the root directory, or at http://opensource.org/lice...
ALGO
0.994213
6.287448
{ "github_metadata": { "branch": "master", "commit_count": 3773, "repo_created_at": "2012-05-06T08:37:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 513, "forks": 110, "issues": 38, "pull_requests": 7 }, "file_meta": { "content_id": "884...
aba8ad2b-961a-49ad-b738-d49fbe429ca7
keshav57/ioi-training
IOI/1994/The Castle.cpp
/* Created By: <NAME> Problem: The Castle (IOI-1994) Link: http://www.ioinformatics.org/locations/ioi94/contest/day1prb2/problem.shtml */ #include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #define NMAX 52 using namespace std; const int adj[4][2] = {{0,-1}, {-1,0} , {0,1}, {1,0} }; int...
ALGO
0.999882
3.255205
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2014-04-21T06:24:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 93, "forks": 51, "issues": 5, "pull_requests": 1 }, "file_meta": { "content_id": "6905ab1...
6c1e7274-abf1-4f7a-be76-3f7f95078a36
vishal-mourya/pro-army
algorithms/codes/heap-rt-90.cpp
#include<bits/stdc++.h> using namespace std; const int n=4; // size of each array-- // Augmented data structure-- struct Node { int element; // The element to be stored int i; // index of the array from which the element is taken int j; // index of the next element to be picked from the array N...
ALGO
0.999926
4.738323
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2021-02-22T14:30:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab49e188c15...
ca31c9ca-a5f7-45ea-9d02-c66192f2d859
Fuser2k/project1-algorithms
code/src/sorting/impl_sort/hybrid.cpp
#include "../sorting.hpp" #include <algorithm> #include <functional> #include <chrono> /* Description: [ As of my observations, quick sort is the fastest sorting algorithm for large data sets. For the small data sets, insertion sort is the fastest sorting algorithm. So, I have implemented a hybrid sorting alg...
ALGO
0.999843
6.216884
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2023-11-11T16:27: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": "f13ed7c110c...
73401d40-5b27-4313-ad86-8297d58583da
AbylayDalabay/algo-ysda
seminar_contest/B.cpp
#include <cstddef> #include <cstdint> #include <iostream> #include <vector> template <typename T> std::vector<T> Merge(const std::vector<T>& left, const std::vector<T>& right) { std::vector<T> merge; size_t ptr_left = 0; size_t ptr_right = 0; while (ptr_left < left.size() && ptr_right < right.size())...
ALGO
0.99994
5.181131
{ "github_metadata": { "branch": "main", "commit_count": 77, "repo_created_at": "2024-09-21T13:08: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": "9d0f3c2f1fa...
cc2e30e3-b54c-42b7-a5d4-33c693f7d201
yutyan0119/Atcoder
ABC/ABC239/E.cpp
#include <bits/stdc++.h> using namespace std; template <typename T> bool chmin(T& a, const T& b) { if (a > b) { a = b; // aをbで更新 return true; } return false; } template <typename T> bool chmax(T& a, const T& b) { if (a < b) { a = b; // aをbで更新 return true; } return false; } #define rep(i...
ALGO
0.999933
4.380503
{ "github_metadata": { "branch": "main", "commit_count": 164, "repo_created_at": "2021-10-02T09:59: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": "b19209b955...
08d735c3-e1b5-4122-9f6d-179a07f8631e
matheusmtta/Programming-and-Software-Development-2
VPL_exercises/LAB03/exc4_palindromo/listaencadeada.cpp
#include "listaencadeada.h" #include <iostream> #include <math.h> ListaEncadeada::ListaEncadeada(){ _inicio = nullptr; _fim = nullptr; _numero_de_elementos = 0; } ListaEncadeada::~ListaEncadeada(){ node_t *anterior = nullptr; node_t *proximo = _inicio; while(proximo != nullptr){ anterior = proximo; ...
ALGO
0.98647
4.461326
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-10-03T02:50: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": "a0486efee2...
f490ad04-5fb7-4cdb-b105-0f1eb96e840a
Sachin-God/Steven-Halim-cp-book1-solutions
addingwords.cpp
#include<bits/stdc++.h> using namespace std; int main() { unordered_map<string, int> string_val; unordered_map<int, string> val_string; string line; while (getline(cin, line)) { stringstream ss(line); string cmd; ss >> cmd; if (cmd == "clear") { ...
ALGO
0.997583
4.350863
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2025-04-19T09:28: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": "0ba9d3eeaa8...
aa1c7939-d5e9-4274-bdfc-5487d87c1902
DavidOlv254/Sistemas-Distribuidos
Parcial 1/Practica 5/Ejercicio3.cpp
//pushback #include <iostream> #include <time.h> #include <vector> using namespace std; class Coordenada { private: double x; double y; public: Coordenada(double = 0, double = 0); double obtenerX(); double obtenerY(); }; class PoligonoIrreg { private: vector<Coordenada> v; static int numVert; p...
TOOL
0.97546
4.414447
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2018-08-21T15:48:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2caced8fa...
3087d5f8-4217-4e05-8590-166a15f0a0fe
dufferzafar/compiler-design-lab
dfa/dfa.cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <cstdlib> using namespace std; #define MAX_ROWS 5 #define MAX_COLS 5 /* INPUT FILE FORMAT: Initial state Set of final states Transition table -1 represents no transition --- 0 0 1 2 1 2 0 1 1 0 */ #define INPUT_FILE "input.tx...
ALGO
0.999861
5.212389
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2015-12-20T21:36:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc76e087e...
51a43a02-0f0c-4947-9fd1-86db16d575fa
Oaik/problems-solution
codeforces/contest/705/c/53075910.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define all(v) ((v).begin()),((v).end()) #define clr(a,b) memset(a,b,sizeof(a)) void debug() { #ifndef ONLINE_JUDGE freopen("input.in", "rt", stdin); // freopen("output.txt", "wt", stdout); #endif cout << fixed <<...
ALGO
0.999892
3.843699
{ "github_metadata": { "branch": "master", "commit_count": 101, "repo_created_at": "2018-09-09T09:44:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ffaf501...
5f2d54da-48d3-41bf-a1ab-41b0bb8b7398
han0305/Problem-Solving
nextGreaterElement1Stack.cpp
/* You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nums2. The Next Greater Number of a number x in nums1 is the first greater number to its right in nums2. If it does not exis...
ALGO
0.999956
5.476177
{ "github_metadata": { "branch": "master", "commit_count": 336, "repo_created_at": "2020-08-19T13:46:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b307f8dd...
fbef87fa-8438-4785-96d2-b7a4fb75ab24
Yu0727Harada/pro_con
ABC/ABC171/b.cpp
// // Created on 2020/06/21. // #include <iostream> // cout, endl, cin #include <string> // string, to_string, stoi #include <vector> // vector #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <utility> // pair, make_pair #include <tuple> // tuple, make_tuple #include <cstdint>...
ALGO
0.999966
4.402981
{ "github_metadata": { "branch": "master", "commit_count": 142, "repo_created_at": "2020-08-09T08:23: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": "1af7beb7...
d393aca7-74cd-4b42-8367-c59408753a19
sadjumb/cppProject
yandexTrain4/HW_04_11_2023_HashForStr/B_BaseString.cpp
#include <iostream> #include <vector> #include <cmath> bool equalSubstr(const std::vector<long long int>& h, const std::vector<long long int>& x, int l, int s1, int s2, long long int p) { return (h[s1 + l - 1] + h[s2 - 1] * x[l]) % p == (h[s2 + l - 1] + h[s1 - 1] * x[l]) % p; } int main() { long long int x_ =...
ALGO
0.999978
4.851963
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-11-29T12:33: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": "650464779a8c...
d3034634-c088-4bb9-99ef-48bc01734c1a
kanikachouhan0027/DSA
86_BFS/1_bfs.cpp
// tex 2 has a directed edge towards vertex 5. // Vertices 3, 4, and 5 have no outgoing edges. // We can also see this in the diagram below. // BFS traversal: 0 1 2 3 4 5 // Detailed explanation ( Input/output format, Notes, Images ) // Sample Input 1: // 8 7 // 0 1 // 0 2 // 0 3 // 1 4 // 1 7 // 2 5 // 3 6 // Sampl...
ALGO
0.99999
4.917233
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-08-01T12:02:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d45836ceba9...
014a3b8c-cc8d-4c98-b3c5-3debba74b3b2
yebanxinghui/leetcode
T10.cpp
class Solution { public: bool isMatch(string s, string p) { //自底向上dp bool dp[s.length()+1][p.length()+1]; for(int i=0;i<s.length()+1;i++) for(int j=0;j<p.length()+1;j++) dp[i][j]=false; // 将右下角置为true dp[s.length()][p.length()] = true; // 从后...
ALGO
0.999629
4.980093
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-05-26T12:53:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7dbeb391ca...
92849644-bfe8-4a62-bbd4-5cf1968ad3dd
coderSomya/Competetive-Programming
graphs/kruskals.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e5+4; vector<int> par(N); vector<int> rnk(N); int get(int node){ if(par[node]==node) return node; return par[node] = get(par[node]); } void merge(int a, int b){ int pa= get(a); int pb= get(b); if(rnk[pa]<rnk[pb]){ swap(pa, pb)...
ALGO
0.999985
3.747288
{ "github_metadata": { "branch": "main", "commit_count": 334, "repo_created_at": "2023-02-24T07:51:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2e51779...